def filename
  self.uri.split('/').last
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 16:29 Star_fullStar_fullStar_full

If we now reformat the C# c...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 16:18

Last but not least we can u...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 16:00

We can get rid of another t...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
/// <remarks>
/// This namespace holds our own extension methods.
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:57

Importing the entire System...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:41

The Ruby version uses the A...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:28

Introducing temporary local...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:17

Now we remove the superfluo...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
public string FileName
{
    get
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:14 Star_full

Let's now work on improving...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
def filename
  delim = '/'               # temporary local variable instead of passing as a literal parameter
...

C# On Get the Filename segment o...

by jwmittag, January 01, 2008 15:11 Star_full

To make the Ruby and C# ver...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
def filename
  self.uri.split('/').last
...

C# Get the Filename segment o...

by jwmittag, January 01, 2008 15:04, 11 refactorings, tagged with Comparison, Scott Porad, asp.net, DotNET, .net, C-Sharp, CSharp, C#, RoR, Ruby on Rails, rails, ruby

On his Blog "Progress vs. P...

89f45d140c5d9b14fd63720ea8b0cb47 Talk