Archive for October, 2011

Movember, eh?

I’m all over that:

Movember, Day 0

Movember, Day 0

Updates as the regrowth of my glorious beard commences.

“He has raised me from the pit, and He will set me high”

Go to Code with the Language You Know, Not the Language You “Should” Know

This article is a much-needed dose of truth and sound advice in an area (the professional side of being an engineering professional) that gets drastically ignored in most of our educations. The author’s observations match mine fairly well, and about the only thing I would add is a shorthand that I’ve myself had to learn in the past few years:

“When in doubt, remember that you are a professional craftsmen. Think, feel, act, and speak like one.”

For much more practical, particular advice about the realities of being a professional engineer, I strongly suggest reading the whole article. If you don’t, however, here’s one incredibly important point that I think more people need to hear:

You are not defined by your chosen software stack: I recently asked via Twitter what young engineers wanted to know about careers. Many asked how to know what programming language or stack to study. It doesn’t matter. There you go.

For years, I obsessed over whether I was learning the “right” languages and in doing so totally missed focusing on things that actually could have improved my professional prospects. (E.g. learning the rudiments of the businesses in which I worked, learning basic finance and economics, learning how to present myself and how to handle corporate environments and politics.) Time spent worrying about what languages you should know is just wasted cycles. Use the language that best suits the task, and, if you don’t know it, then learn it. But I think you’ll find that, for the vast majority of programming tasks, the best-suited language is “whichever one you already know.”

“Pilsner should be in Roman type, and begin with a capital.”

From the wonderful Letters of Note blog comes this brilliant missive from H. L. Mencken. I idolize Mencken and think he was one of the best writers the English language has ever had. His lucidity and enchanting way with language far surpass any writer who has lived since.

This letter, sent to the abstract painter Charles Green Shaw, is a scattered list of seemingly haphazard observations. It bares reading in its entirety, but below is an excerpt from the transcription provided by Letters of Note:

10. I believe in marriage, and have whooped it up for years. It is the best solution, not only of the sex question, but also of the living question. I mean for the normal man. My own life has been too irregular for it: I have been to much engrossed in other things. But any plausible gal who really made up her mind to it could probably fetch me, even today. If I ever marry, it will be on a sudden impulse, as a man shoots himself. I’ll regret it bitterly for about a month, and then settle down contentedly.

11. I believe in and advocate monogamy. Adultery is hitting below the belt. If I ever married the very fact that the woman was my wife would be sufficient to convince me that she was superior to all other women. My vanity is excessive. Wherever I sit is the head of the table. This fact makes me careless of ordinary politeness. I don’t like to be made much of. Such things please only persons who are doubtful about their position. I was sure of mine, such as it is, at the age of 12.

12. Pilsner should be in Roman type, and begin with a capital.

13. I usually lie to women. They expect it, and it is pleasant to watch them trying to detect it. They seldom succeed. Women have a hard time in this world. Telling them the truth would be too cruel.

14. I am completely devoid of religious feeling. All religions seem ridiculous to me, and in bad taste. I do not believe in the immortality of the soul, nor in the soul. Ecclesiastics seem to me to be simply men who get their livings by false pretenses. Like all rogues, they are occasionally very amusing.

I strongly encourage you to read the whole thing. It is well worth your time and attention.

Perl No Better Than Pseudorandom Syntax

I’ve never kept secret the fact that I loath Perl. I think it’s a horrid abomination of a language that should be burnt to the ground and have salt plowed into its smoldering ashes. I think Larry Wall should be tried in the Hague.

And now, I have some empirical evidence for my syntactical complaints.

We present here an empirical study comparing the accuracy rates of novices writing software in three programming languages: Quorum, Perl, and Randomo. The first language, Quorum, we call an evidence-based programming language, where the syntax, semantics, and API designs change in correspondence to the latest academic research and literature on programming language usability. Second, while Perl is well known, we call Randomo a Placebo-language, where some of the syntax was chosen with a random number generator and the ASCII table. We compared novices that were programming for the first time using each of these languages, testing how accurately they could write simple programs using common program constructs (e.g., loops, conditionals, functions, variables, parameters). Results showed that while Quorum users were afforded significantly greater accuracy compared to those using Perl and Randomo, Perl users were unable to write programs more accurately than those using a language designed by chance.

Per the linked blog post, the really interesting thing about the quoted paper (PDF) is that it does a great job of empirically testing differences between languages. This is the kind of study that computer science is in of, and yet so little of this research actually gets done. Language design is an extremely important field of study in computation, and one that doesn’t get anywhere near enough love.

Remember friends, just because all languages are Turing equivalent, doesn’t mean that all languages are equal.

N is a Number: A Portrait of Paul Erdős

Despite tepid reviews on Netflix, I had high hopes for this 1993 documentary on the life and work of Paul Erdős and I’m happy to say that I wasn’t disappointed. The filmmakers give a concise, beautiful picture of the greatest mathematical mind of the 20th century. The film includes lots of footage of Erdős himself, as well as interviews with many of his friends and colleagues.

The film is a sweet and sympathetic portrayal of a truly strange and brilliant man. It does an excellent job of both conveying the gravity of his life and work, while also presenting, largely without comment, just how strange a man he truly was. It also manages to convey the scope and importance of his work, while also making it accessible to a general audience. The few proofs presented in the film (either by the filmmakers or by Erdős himself) are well-chosen and lucidly presented.

I particularly enjoyed the interviews with several of his collaborators, who were able to give amazing insights into his life, work, and personality. He’s a fascinating character and hearing him described by the colleagues who knew him best is both fascinating and touching.

I highly recommend the film. It’s well worth your time and attention.


Two Short Book Reviews

Sorry for the light posting lately. I spent most of the past two weeks preparing for a job interview at work. (I’m applying for a more coding-heavy role.) The interview was a few days ago and I haven’t heard back yet, but now I’m getting caught up on all the stuff I didn’t do while I was plowing through pages and pages of practice questions.

In prepping for the interview, I picked up a couple of new texts to help me sharpen my skills. I wanted to say a few words about two of them.

The first is Cracking the Coding Interview by Gayle Laakmann McDowell. The book is a collection of 150 programming questions, with solutions provided. It also feature brief, high-level overviews of major areas of knowledge. The questions themselves are excellent, but the provided solutions can be hit or miss. Most include sample code which appears to be correct, but the descriptions of their solutions can sometimes be vague and hard to follow.

I was also unimpressed with the overview at the beginning of each chapter. They tend to be too shallow to be very useful, and I found a few technical mistakes in them. (E.g., the book asserts that a full and complete binary tree will have 2n nodes. This is wrong. A full and complete binary tree will have a number of nodes that is one less than a power of two. To be more specific, it will have 2h+1-1 nodes, where h is the height of the tree.)

All in all, if you’re prepping for an interview, this will be a handy book to have for the list of excellent coding questions it provides. I would recommend looking around for a used copy at a reasonable price.

The second book I wanted to comment on is Algorithms by Robert Sedgewick and Kevin Wayne. The Sedgewick and Wayne Algorithms book is one of The Texts in algorithms, and it largely lives up to its reputation. It’s well organized, clearly written, and has excellent explanations and samples. It also has an excellent website that includes all the sample code from the book as well as notes and other resources.

Unfortunately, it too had some noticeable mistakes. The authors of this text, however, have taken the laudable step of making all the known errors available on the book’s site. This allows you to double check code that doesn’t appear correct or which doesn’t behave correctly when you run it.

I highly recommend this book. It’s a fantastic resource programmers of any level. For my purposes it served as a fantastic study text, but it would also be an invaluable reference resource or learning text as well.

One note: I got the Kindle edition of the book, and while the publisher did an awesome job with it, it’s probably worth it to get a physical copy. If for no other reason than it lets you pencil in the corrections to the mistakes listed on the book’s web site. That being said, I seriously doubt you’ll regret getting the Kindle edition.

Disclosure Notice

The Latest in Culinary Science

Ladies and Gentlemen, the Ham Daquiri:

Great Moments in Globalization, Part n+2 in a Series

Globalization.  Tasty, tasty globalization.

Globalization. Tasty, tasty globalization.

This is a Mexican beer, named after a region in the Czech Republic, which I purchased from the very nice Japanese family that owns the little grocery on the corner.

Return top

Magic Blue Smoke

House Rules:

1.) Carry out your own dead.
2.) No opium smoking in the elevators.
3.) In Competitions, during gunfire or while bombs are falling, players may take cover without penalty for ceasing play.
4.) A player whose stroke is affected by the simultaneous explosion of a bomb may play another ball from the same place.
4a.) Penalty one stroke.
5.) Pilsner should be in Roman type, and begin with a capital.
6.) Keep Calm and Kill It with Fire.
7.) Spammers will be fed to the Crabipede.