How do five wasted hours feel like?

Yes ‘n’ how many times does your code have to break
Before you stop coding late?
Yes ‘n’ how many hours does a man have to waste
Before he should go take a break?
Yes ‘n’ how many times does a man high five
Before he knows he missed a case?

The answer, my friend, is right in your face,
The answer is right in your face.

Another one of them Allman

I’m not a fan of holy (tech) wars, but I do appreciate clarity in representation. How your code looks is important not only because it adheres to standards hence making it easier for future generations (yea right) to decipher the madness but also from the standpoint of improved pattern recognition. Pattern recognition in terms of how you learn to recognize obvious problems looking through artifacts, for example while ‘glazing’ through log files. Similarly, when looking through code, you should be able ’see’ code smells and the like. Whatever makes code more amenable to such pursuits is not a needless war I think.

Obviously, there are many points to this, like naming conventions, style guidelines (camelcase, etc) but my pet peeve is intend guidelines (ironic, that I use ‘guideline’ yet harp on about the same in this tirade).

There’s a super wiki article on the topic that gives me comfort knowing I’m not the only one wasting my time. Anyways, I prefer to use the “Allman style” where your code looks like:

while (x == y)
{
    something();
    somethingelse();
}
finalthing();

Notice how the “The style puts the brace associated with a control statement on the next line, indented to the same level as the control statement. Statements within the braces are indented to the next level.”

Among the advantages the wiki lists, an interesting one is “Commenting out the control statement, removing the control statement entirely, refactoring, or removing of the block of code is less apt to introduce syntax errors because of dangling or missing brackets.”

//while (x == y)
{
    something();
    somethingelse();
}

The reason I like it however is because it flows less jarringly than a:

while (x == y) {
    something();
    somethingelse();
}

which is often the intend standard in most Java shops. However, I can’t stand control statements and the body being so snugly fit, so to reach a compromise between adhering to the norm and my obstinate tendencies, I’m often tempted to restructure the above as:

while (x == y) {

    something();
    somethingelse();
}

See how futile and stupid this is?

Let’s see a more practical example for better impact:

private void iHaveAnUnreasonablyLongMethodName(Stuff iAmPassedIn) throws IMightThrowThisException,
OrThisException, OrMaybeThisException {
    if ( (iAmPassedIn != null) && (iAmPassedIn.getStuff() != null) ) {
        doStuffOnStuff(iAmPassedIn.getStuff());
    }
}

Yech! See what I’m saying?…

Earth – The Book

Earth (A Visitor’s Guide to the Human Race) is a very disappointing affair, if you’ll expect so much as absolutely any substance out of it. The vantage point at which Stewart chooses to wage his war from might be potent when it comes to The Daily Show, but his latest book ends up being a hodge-podge of parodies and puns without any unifying purpose but cynicism. It reads much like Woody Allen’s attempts at literature, constantly throwing you off track with its tendency to not complete a single sentence without a humorous inclination or a punch line, lest the author be gravely misunderstood as the serious type! I mean, even Colbert betrayed his character for around 58 seconds during his recent pitch to the Congress. And this is Stewart for goodness’ sake!

Why he would choose to write a book like this is beyond me. It has no form, except looking like a college scrap book with an absurd amount of pictures, and fancy paper. Many pages could be read from every direction imaginable, none compromising the intended meaning, for there really might not be any. Obscenities are sprinkled generously, mostly where they fit the least.

Whether it was his intention or to his liking or not, a certain responsibility has been bestowed upon him by audiences hungry for even a shadow of a reliable news figure. So is it too harsh on him to expect an equally sincere attempt at a book, with some coherent purpose? What is this book but a narcissistic attempt to convey an opinion, albeit mostly cynical, about most things in the world?

Absolute hogwash. Most disappointing read in a long while.

From the web

Decoupling profits from jobs?

Interesting post about how GM profits might not lead to noticeable difference in the US job market. A few comments:

“We bailed out GM for GM jobs, remember?”

Yes. The paycheck doesn’t let us forget!

We’re witnessing a great decoupling of company profits from jobs.

Of course, he doesn’t clarify that the decoupling is localized to the US, and has nothing to with China, where the jobs are going up and are coupled with company profits.

Mechanical breakdown to be considered an act of God

Southwest decides to add mechanical breakdown as an act of God, along with wars, riots, storms, earthquakes and other acts of God. By doing this, it prevents it being liable during such incidents, meanwhile promising that they won’t slack off on the customer service (like putting you up in hotels).

I’m unsure as to what the other acts of God are; does a disgruntled atheist count? Or is this like what we say: “Oh god knows why it doesn’t work on production, works fine on my machine!”

Sad. Talk about an acute lack of accountability. Disappointing, especially considering this is coming from SouthWest.

Where will you be when the earth stops spinning?

A fascinating article about what would happen if the earth stops spinning. Essentially, an analysis of the effects a lack of centrifugal force will have on earth’s structure. Beautifully illustrated with results from the mechanism they used to model the earth. Beautiful stuff… :)