maandag 4 juli 2011

Commenting code

Ever had such a moment?

2010-01-02_1809

This Slashdot story (Myths About Code Comments) has the following comment:

Clean code tells you how, good comments tell you why.
Fixing the "how" becomes significantly easier when you know "why" the code was there in the first place.

The author calls it a cliché but it makes a lot of sense. So what happens when you talk about the code, or more specific, explain what the code does?

From A Lesson In Low-Defect Software
- or -
A Journey From A Quick Hack
To A High-Reliability Database Engine
and how you can use the same techniques to reduce
the number of bugs in your own software projects (PDF)

Why Put Comments In Code?

  • 1) Make the code easier to read
  • 2) Engage the linguistic side of your brain
The second point is especially compelling.

What does this mean? The document makes some bold statements about left and right sides of the brain. However it is hard to find documentation that supports the claims. The difference between the how and why does make it easier to understand the need for commenting code properly. We all know how the quick brown fox jumps over the lazy dog, but why the dog is lazy might need some commenting

donderdag 23 juni 2011

dinsdag 21 juni 2011

Why Git is Better than X

Scott Chacon on Git Why Git is better than X

This site is here because I seem to be spending a lot of time lately defending Gitsters against charges of fanboyism, bandwagonism and koolaid-thirst. So, here is why people are switching to Git from X, and why you should too.

vrijdag 17 juni 2011

Why Businesses Move To the Cloud: They Hate IT (slashdot)

Discussion on Slashdot triggered by this article

"Cloud services can be unreliable and pricey, and they often duplicate capabilities larger companies already have in-house. So why do many managers within organizations use them? Partly because they don't want to deal with their own company's IT department. Getting a big project started is often such a politically fraught process that for many managers it's easier to simply write a check."