Programming language notes, links

Time machine

Here is a post for years and years ago that was stuck in drafts. Some of it is still useful, but a lot is amusing to look back on. Oh, those were the days ...

General Programming

Lots of good multi-language examples at this site. It's nice for comparing how similar algorithms are implemented in different languages.

This is an awesome page, full of useful and interesting bit-twiddling tricks. In particular, with the trick to count set bits in a word, I've been able to reduce by a factor of 50 (!) the amount of time it takes to count bits in a range of memory.

Lots of information about regular expressions:

Programming Challenges

Sites to keep you in shape:


The Haskell implementation of the Sieve of Eratosthenes is just cryptic. I'm not sure how a functional style of programming helps. It's much more complex that a straightforward implementation (like in Scala) would be.

This is a nice overview of various ways to calculate Fibonacci numbers:


Well worth a read if you're interested in the motivations behind Go.


The ruby equivalent of Perl's Data::Dumper() is pp (pretty print):

   require 'pp'
   d = [6, 28, 496, 8192, {:a => 1}]
   pp d

   optparse - parsing of command line options
   ostruct - creations of "structures" on the fly. It's really just a class layered on top of hashes, but with a convenient syntax for setting and getting attribute values.

To profile a Ruby app, no changes to your Ruby code are needed. And you'll discover the bottleneck isn't where you hoped it would be.

  ruby -rprofile file.rb


Google style guides:


Popular posts from this blog

Patching VMware Tools in Fedora 18

Questions to ask about yourself, your job, your company