97 Things Every Programmer Should Know

(Chris Devlin) #1

Collective Wisdom from the Experts 55


Once you’ve learned the ropes of a new language, you’ll be surprised how
you’ll start using languages you already know in new ways.


I learned how to use delegates effectively in C# from programming Ruby;
releasing the full potential of .NET’s generics gave me ideas on how I could
make Java generics more useful; and LINQ made it a breeze to teach myself
Scala.


You’ll also get a better understanding of design patterns by moving between
different languages. C programmers find that C# and Java have commoditized
the iterator pattern. In Ruby and other dynamic languages, you might still use
a visitor, but your implementation won’t look like the example from the Gang
of Four book.


Some might argue that Finnegans Wake is unreadable, while others applaud it
for its stylistic beauty. To make the book a less daunting read, single language
translations are available. Ironically, the first of these was in French.


Code is in many ways similar. If you write Wakese code with a little Python,
some Java, and a hint of Erlang, your projects will be a mess. If you instead
explore new languages to expand your mind and get fresh ideas on how you
can solve things in different ways, you will find that the code you write in your
trusty old language gets more beautiful for every new language you’ve learned.

Free download pdf