What’s in Your Project Folder?

I think that almost every developer likes to try out a new computer language occasionally. Many devs that I’ve spoken to tend to write the same application in each language, over and over again. An expression analyzer is one I get told about. Others like to write a pocket calculator simulator, or maybe a to-do list. It is a great way, after a quick scan through the manual, of feeling your way around unfamiliar syntax without being distracted by the algorithm. You’re not scratching your head trying to work out how to do it.

One thing I’ve noticed is that people have two opposite tendencies. Either they bring with them all the habits of the languages they cut their teeth on. You can still see shades of BASIC in some F# or PowerShell code, for example, and the OO orthodoxy in a functional or declarative language. Alternatively, the programmer takes to the characteristics of the new language with such enthusiasm that, for example, pipelines are used everywhere in PowerShell even if they slow things down.

I asked Phil for his views: he groaned and said that the habit of writing the same application in every language they came across probably explains the plethora of boring notepads, calculators and to-do lists in the Windows Store. He’s more in favor of moving firmly into unfamiliar territory and doing new programming assignments whenever you try a new language. Rosetta code is a great place for this.

There is a point in that. Some programmers like to occasionally take a break from the languages and IDEs that they use in everyday work, and do something in a completely different development environment. Open-source Linux-based developments are particularly popular for this. I can see a lot of sense in this because it is so easy to adopt programming habits that are fine-tuned to the facilities such as intellisense and debugging. These are adaptive when you lurk within the comfort of a development framework such as Visual Studio, but just make things more painful when you step outside.

So I wondered how you, the Simple-Talk readers, tackle the task of learning a new language. What sort of language are you currently trying out? Do you work through writing simple applications, all the way from Hello World upwards? If so, what sort of application makes for an interesting learning experience? Is the IDE important? If so, do you use a debugger and profiler to understand better what is going on when the code runs? Do you go so far as to work on completely different languages and IDEs as a relaxation? I’d love to hear from you in a comment.