Posts Tagged ‘programming’

Test Your Might!

November 30, 2008

“We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.” — Larry Wall

Good programmers are like Judo masters — they both practice the art of maximizing efficiency.

Larry Wall (the founder of Perl) defined laziness as:

The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer.”

He’s not talking about programmers with bad work ethic here. No, he’s talking about expert programmers who know how to make every keystroke count.

From Wikipedia’s article on Judo:

“The word “judo” shares the same root ideogram as “jujutsu”: “jū” (柔, “jū”?), which may mean “gentleness”, “softness”, “suppleness”, and even “easy”, depending on its context. Such attempts to translate jū are deceptive, however. The use of jū in each of these words is an explicit reference to the martial arts principle of the “soft method” (柔法, jūhō?). The soft method is characterized by the indirect application of force to defeat an opponent. More specifically, it is the principle of using one’s opponent’s strength against him and adapting well to changing circumstances. For example, if the attacker was to push against his opponent he would find his opponent stepping to the side and allowing his momentum (often with the aid of a foot to trip him up) to throw him forwards (the inverse being true for pulling.) Kano saw jujutsu as a disconnected bag of tricks, and sought to unify it according to a principle, which he found in the notion of “maximum efficiency”. Jujutsu techniques that relied solely on superior strength were discarded or adapted in favour of those that involved redirecting the opponent’s force, off-balancing the opponent, or making use of superior leverage.

Master software developers have a strong command over their tools. One of the most important tips from The Pragmatic Programmer is to Use a Single Editor Well:

“The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.”

They’re also fluent in multiple programming languages and understand how to choose the best one for the job. When more than one language may be appropriate, they choose the most expressive language available.

Consider The FizzBuzz Problem (a simple “weed-out” problem given to interview candidates) which has been stated as:

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

There are many general purpose programming languages that could be used to solve this problem. Programmers have invented a game called Code Golf. The rules are simple — solve a problem with the shortest possible program.

Here’s a list of scores which demonstrates how various languages stack up to solve the FizzBuzz problem. We see Ruby and Python coming in at 56 characters each. Compare that with C# (123) and Java (130) and you start to get the idea here. If you were the policy carrier responsible for insuring these programmers against carpal-tunnel syndrome, who would you rather cover?

Cream of the Crop

November 15, 2008

In a book called Good to Great, Jim Collins and his team of researchers built a list of 1,435 companies and identified the top 11 to determine what makes them tick. One of the principles of effective businesses is that they manage to get “the right people on the bus”. I believe this is especially true in the software industry.

Paul Graham had this to say about the variation in productivity between commoon programmers and truely spectacular ones in his essay Great Hackers:

“Productivity varies in any field, but there are few in which it varies so much. The variation between programmers is so great that it becomes a difference in kind.”

So when you’re hiring, how do you identify a great programmer? Joel Spolsky has written an article The Guerilla Guide to Interviewing and it is a definitive contribution on this topic. The book Programming Interviews Exposed is another fantastic resource. You should definitely read these and apply their wisdom.

I recently fielded a question on stackoverflow (a software development Q&A site) which related to this topic, so I’ve decided to republish my answer to this blog. Here is my interview outline to help you craft specific questions to fire at your candidates. I’ve tried to list these topics in order of importance.


General Intelligence (brain teasers/logic puzzles)

Computer Science Knowledge

Programming Exercises

Tools, Technique and Methodology

Security

Basic Mathematics

  • Numeral systems (convert from one base to another)
  • Probability Theory
  • Distance between two points on Cartesian plane (Pythagorean theorem)
  • Square root (Heron of Alexandria, successive approximation)

Cryptography

  • Public key cryptography
  • Symmetric-key cryptography
  • Hash functions
  • Cryptographic protocols (secret sharing, zero-knowledge proofs)

Discrete Mathematics

  • Logic
  • Set theory
  • Graph theory
  • Information theory
  • Combinatorics
  • Proofs (like existence of irrational numbers, infinite primes)

Anyone has conducted a significant amount of interviews in this industry knows that the majority of potential recruits won’t last through the first 30 minutes of the interview, so much of this list will be unnecessary most of the time. Before you dismiss my more complex topics as overkill, just keep in mind how expensive and emotionally taxing it can be to recognize that you made a poor hiring decision and to later correct it. Good luck in building your team of awesome developers!


Design a site like this with WordPress.com
Get started