Programming Tips and Tricks

August 20, 2006 – 9:16 pm

Some helpful programming tips as we enter the week ready to roll out new code:

  1. JavaScript Scope - “Optimize” JavaScript code taking advantage of the fact a function can access all local variables in the scope of the caller.
  2. Perl - Use trailing if’s and unless’s especially at the end of really long lines.
  3. SQL Outer Joins - Mix the various flavours of outer join syntax just to keep everyone on their toes.

And some general pointers for continued success, I always enjoy seeing these principles sprinkled around:

  1. Reinvent simple functions which are part of the standard libraries. Everyone knows your function is faster.
  2. Never underestimate the power of creative spelling. This can be used for simple enjoyment such as “receive” and “recieve” but is much more fun on the words that people can’t spell anyway.
  3. It’s the size that counts. It almost goes without saying that the larger a function is, the better it is. And the more jumps and GOTOs the better. That way, any change must be analyzed through many scenarios. It snarls the maintenance programmer in the spaghettiness of it all. And if the function is truly gargantuan, it becomes the Godzilla of the maintenance programmers, stomping them mercilessly to the ground before they have an idea of what’s happened.

For more fun: mindprod

You must be logged in to post a comment.