Rambling about programming and life as a programmer

Montreal on Rails tonight

Posted by webmat on October 2, 2007

Update: This article has has a new home on Go to the article.
Comments are closed here but still open there :-) 

Tonight is Montreal on Rails #3! I can’t wait to attend: this will be a nice refreshment from my gruesome C++ tar pit at work, ugh! :-)

The first 2 were very interesting and filled with great people to meet. Tonight promises to be just as great, and as a bonus, we’re leaving behind the small McGill University classroom to be welcome instead by Fred and Ben from Standoutjobs. Can’t wait to see that either!

And great big thanks to Mat and Carl for organizing this monthly meetup!


Posted in garbage in, programming, ruby-rails | Tagged: , | 1 Comment »

Podcasts I listen to

Posted by webmat on September 29, 2007

Update: This article has has a new home on Go to the article.
Comments are closed here but still open there :-)

Here’s the deal. I have to beat writer’s block. I wrote a first post a while ago, then came the time for a little vacation and haven’t gotten down to write here again. Well, except for this quickie.

I thought I’d write a list of the podcasts I listen to. This way I can just point people here when they’re curious. I’ll put this somewhere else soon, to update it when I discover new stuff, but now I’m just in brain-dump mode :-)

Those I listen to religiously

  • The Linux Action Show! – Bryan and Chris entertain us with Linux news, the occasional interview, tips on development, system administration, desktop compositing, and So Much More!
  • .Net Rocks – Carl and Richard meet the cream of the crop in the .Net world. Great podcast to learn about tons of tools and practices related to .Net development and other MS technologies surrounding it. There’s even good stuff for non .Net developers.
  • Hanselminutes – Scott Hanselman’s the ultimate geek. He seems to follow everything in the world of development. He often talks about .Net development, but has a very open mind and covers a broad range of other technologies, including a bit of Ruby on Rails once in a while. He also covers lots of other technology-related topics. He pretty much always manages to keep the podcasts around a no-fuss 30 minutes, hence the name Hanselminutes.
  • Security Now – The ultimate security podcast, with host Leo Laporte and security expert Steve Gibson. All episodes are worth going back to, since the formula is about the theory behind concepts of security as well as security tools, rather than being a news-centric podcast.
  • Macbreak Weekly – Definitely a news-centric podcast, very entertaining crew that transmit their passion for the Mac (and the iPhone) very well. The discussion often revolves around digital media as well, with very interesting insights. Oh, and Merlin Mann is often one of the cohosts. Very funny guy :-)
  • The Ruby on Rails podcast – The podcast extraordinaire if you’re interested in Ruby on Rails. Interviews with the big names in the Rails community. Lots of talk about different tools that can aid you in your quest to create the ultimate Rails app. The summer has unfortunately brought few new shows, but one came out recently. Let’s hope the pace picks up again, I miss the RoR podcast :-)
  • FLOSS Weekly – Very promising podcast about Free, Libre and Open Source Software (not about dental floss). Some very big names have been interviewed on the show (Guido van Rossum, “Maddog” Hall, Jeremy Allison, Randall Schwartz…) The first host, Chris, has a very busy schedule and the pace has really slowed down for a while. But there has been interest by Mr Shwartz and Allison to host the show once in a while as well. I can’t wait to see that happen (the most recent show is hosted by Schwartz, actually).
  • You Suck at Web Design – Short, funny podcast by Matthew D. Jordan about being a freelance web designer (and the journey to get there). Twisted humor and cringe-inducing stories await you here.

Those I listen to occasionally

  • net@nightAmbermac, the ultimate web geek speaks with Leo about what’s going on the internet. Interviews with web entrepreneurs. Shows recorded live on (can be good or not).
  • Windows Weekly – Paul Thurrot speaks with Leo about what’s going on in the world of Windows and Microsoft in general. The subject may seem dry, but the hosts definitely make up for it. A plus for anyone working in IT with lots of Windows machines. Thurrot knows the Windows world inside out, but is very balanced: he uses (and loves) his Mac and uses Ubuntu as well, so you can count on his opinion to always be fair.
  • This Week in Tech – News-centric podcast about the world of technology in general. Very interesting hosts, including once in a while Merlin Mann, as well as John (don’t ask :).
  • Penny Arcade Podcast – Every once in a while, Gabe and Tycho take us through the creative process of creating the day’s comic strip.


Huh, well! I appear to be beating my writer’s block little by little :-)

Let me know if you’ve discovered something interesting here or if you’d like to share the podcasts you listen too once in a while.

Posted in garbage in, programming | Tagged: , , | Leave a Comment »

On using C++

Posted by webmat on September 25, 2007

Update: This article has has a new home on Go to the article.
Comments are closed here but still open there :-) 

Sorry for this content-free post, but this is just too good:

When your hammer is C++, everything begins to look like a thumb.

This especially strikes a chord, since I’m currently working on something in C++ at work. Ugh!

Posted in programming | Tagged: , , | 3 Comments »

An epiphany about Functional Programming and Lazy Evaluation

Posted by webmat on August 12, 2007

Update 2: This article has has a new home on Go to the article.
Comments are closed here but still open there :-) 

(Update: be sure to read the comments, as the language used in my article was not entirely exact, in functional programming legalese ;-) Many readers helped to clarify things a bit.)

I had a mini-epiphany recently. Altough I haven’t had the chance yet to program with a functional programming language, it’s a subject I’ve had my eye on for a while. My ear perks up when I hear about Erlang, Haskell, F# or Scala, 4 functional programming languages.

Recently I’ve been dipping in the intricacies of memory management, at work, in .Net. This was in the context of the Dispose pattern (I have a post in the making about the subject). Both subjects are not directly related, but I found a parallel that might help to explain lazy evaluation to programmers used to more traditional programming languages.

I won’t go in depth in the subject or define the concepts precisely here. I might however revisit what follows when I’ve had time to actually get more experience with an FP language. So here was my revelation:

When specifying a computation in a programming language, lazy evaluation is to the detailed, manual sequencing of operations what garbage collection and automatic memory management is to the detailed, manual management of memory.

In other words, with advanced virtual machines such as Java’s or .Net’s, by allowing the VM to manage the memory, we more or less get the advantage of having world-class computer scientists optimize the management of the memory we use. The programmer declares what he needs in term of memory, instead of specifying precisely how he needs it (stack vs heap, who’s responsible of freeing the memory, etc.) The amount of control over the precise performance is lessened to a certain extent, but the resulting performance gains can often be quite stunning. For example, I read recently that Java’s allocation of memory on the heap requires around 10 processor operations instead of 60 to 100, for the best C++ compilers. See Brian Goetz’ excellent article on IBM’s website.

In the same manner, with a functional programming language’s lazy evaluation, optimizations can be made without the programmer needing to state them explicitly. The interpreter can decide when to execute the code, namely if and when its outcome is needed, and not before that.

Since the precise order of execution is not guaranteed, the bits of computing specified by the programmer in an FP can be optimized in other ways, too. For example, if the VM sees that a given instructions in the code is not dependent on the outcome of the previous instruction, it can execute them both simultaneously, if there are more than one cores available. It’s managed automagically by the interpreter, no threading headache necessary. Conversely, the programmer can specify the ordering of instructions only when necessary (e.g. when interacting with an outside system).

This is why FPs are often mentioned in the current debate surrounding the looming concurrency challenge. This kind of optimization is also being done by Java and .Net’s VMs, but to a much lesser extent, because of deep differences between imperative (Java, C++, C#) and functional programming languages.

Posted in programming | Tagged: , | 10 Comments »