Today’s thoughts about programming languages

Maybe some of you have heard me ranting about this already?

  • I’m not productive enough in C++ and I feel too limited by Java
  • A large chunk of Java frameworks seem to serve no other purpose than to workaround limitations in Java
  • I believe (and hope!) that Java will cease to be the default language in the non-Microsoft world, and that other JVM-based languages such as Scala, Groovy and JRuby will become more important
  • How can I convince a client to allow Scala, Groovy or JRuby in a project?
  • I should really get some C# experience!
  • It seems like I almost always resolve to PHP when I need to get something done quickly… which reminds me of an upcoming blog post about a recent fight with SoapServer and SimpleXML to implement WSSE UsernameToken authentication.

The C++ cut is the deepest

When you hear me speaking about C++,  you probably notice the passion. I might expose a similar passion when I pinpoint some of Java’s weaknesses. Maybe I do sound like “Dick” in the article Java is Slow! at The Daily WTF?

From GW-BASIC on my first computer I went through QBasic, QuickBasic, QuickC and Turbo C++ until “reaching” Visual C++ in high school. It is more than 10 years since I wrote CalcEm, the first Open Source emulator for Texas Instruments calculators TI-82 and TI-83. It is hopelessly outdated now, but it was a great achievement for me at the time. (I’m actually sitll proud; the last CalcEm version is ranked as 102 on the all-time top downloads list at ticalc.org with 43556 downloads.)

Maybe C++ entered at a sensitive point of my life? When learning Java at the university it only felt crippled when I already knew C++, so I only used Java when I had to and C++ (as in g++) when I got to choose. Sometimes the choice was bad, but it was about learning after all. I remember that our Kalah C++ implementation ruled the competition!

C++ made me feel in control! I never felt as much in control when using Java, and I still don’t. But I’ve learned not to demand so much control.

My friends may have heard me dreaming of working at Tandberg. I don’t languish for ThoughtWorks so much these days. (They do have Martin Fowler, but they also use Lotus Notes. Go figure.)

This is why I never applied for a job at UIQ. I like C++ so much that I cold not stand the horrible subset of C++ that Symbian has inherited from Psion. Instead I got stuck with a stone-age C++ compiler on Tru64. But I got away and now I’m your Java man!

Just let me do a little PHP, Python, Ruby, Scala or Groovy too! And wouldn’t C++ be great for something? 🙂

Really cool consultancy opportunity at Novell

Miguel wrote:

We are looking for consultants to work on a six to nine month project at Novell to write a prototype for a Visual Studio addin in C# or C++ that will connect Visual Studio and its debugging infrastructure to a remote Linux machine running Mono and the Mono Debugger.

This sounds like something in my taste. If it was in Sweden I had already applied!

 

Beautiful Code

I’ve been reading Beautiful Code from time to time during the autumn. It’s mixed bag and I actually skipped some chapter that was too deep into maths for my taste. Chapter 22: A Spoonful of Sewage was an instant favorite; it is a a fascinating head-first dive into a bug hunt in Sun Solaris’ synchronization primitives. It was a bit over my head but interesting nevertheless. Another very interesting chapter was Chapter 23: Distributed Programming with MapReduce about Google’s “programming system for large-scale data processing problems”.

Only because of the title of this blog, I’d like to mention that more than one chapter mentions the Divide and Conquer approach used by the Quick Sort algorithm, including using a subtle bug found in early (or naive) C, C++ and Java implementations to show off JUnit.

I’ve thought of sorting the chapters by programming languages and see what language the most author used for his or her beautiful code. At least Lisp, Python, Perl, Ruby, Java, C# and C++ are present. Some day I want to do a bit of Lisp programming, but I haven’t found a suitable project yet. Maybe I should buy a Lisp book too first…

Where is my own Beautiful Code then? If “get the job done” is considered beautiful, it could be the PHP code for any of my web sites! 🙂 I’m pretty happy about the architecture for my unfinished MidaSync project; maybe I should try to describe it here some day.

For MidaSync I also wrote a D-BUS wrapper for C++ that I’m quite proud of, but at some point it became a bit “magic”. For example it relies on the presence of a partial specialization to create a D-BUS path from an object exposed through D-BUS. I’ve never released this properly and I think that the D-BUS wrapper in OpenWengo is used by today’s C++ developers in need of D-BUS support.