2011-12-14

Learn a new programming language

I'm a Java EE developer and I like it. I believe there's no engineering discipline other than IT in which you can give shape to an idea so quickly. Yet I feel that the day to day implementation of business logic doesn't always satisfy my creative drive.

I'm reminiscent of that first year in college. With each course I got introduced to a new language. The many programming assignments involved writing recursive matrix manipulation algorithms and unrolling them, or building an AI for the game of Tetris. I felt my brain expanding. How to revive those moments today?

Enter the challenge. I'm going to spend an hour each evening solving the Project Euler problems one by one, but not using Java. Instead I'll implement each solutions three times, in languages that are different from what I'm used to and different from each other:

  • Objective-C — Yes, it's also an object oriented language, but with an entirely different syntax, C-like header files and no garbage collection. The world of iPhone and iPad has become an exciting platform for developers. About time to build my first app. IDE: Xcode 4 
  • JavaScript — On stackoverflow.com someone commented "Java and Javascript are similar like Car and Carpet are similar." Dynamically typed, prototype oriented, with strange constructors and unfamiliar scoping rules. HTML5 they say, is the future of the mobile web. And JS is going to be a big part of that. IDE: Aptana Studio 3
  • Clojure — Functional is a different paradigm from imperative or object orientated. It's old, think Lisp, 1958. And it's hot again, with aspects of functional programming in C#, Scala and Python. Given the increasing number of cores in processors I think taking advantage of concurrency is key. With its software transactional memory, atoms and dynamic var system Clojure takes on the challenge! IDE: Enclojure plugin for Netbeans

The first assignment from Project Euler is "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000."

You'll find my solutions in a future post. Right now, I'm off to installing the IDE for each language and getting Hello World up and running:

Do you know another language that I should try?