This story was written by Keith Dawson for UBM DeusM’s community Web site Develop in the Cloud, sponsored by AT&T. It is archived here for informational purposes only because the Develop in the Cloud site is no more. This material is Copyright 2012 by UBM DeusM.

Friday Four: Code Smells and Flat IT Wages

The smell of suspect code, an unlikely Linux emulator, and more.

This week, some lessons in spotting suspect code by its odor, why IT wages aren't rising, and new web APIs that you'll be using in 2013.

The smell of code
Lots of people are writing about code smells recently. This is a wonderfully compact and evocative phrase signifying telltale signs in code that deeper problems may be lurking. Smells aren't bugs, they are pointers to possible trouble.

First up is Rebecca Murphey, who spoke about code smells in JavaScript at the Fronteers conference in Amsterdam in October. Here are her slides (implemented using Hakim El Hattab's Reveal.js, as has become almost de rigueur at technical conferences today -- source is on GitHub), and here is a video of the entire presentation. Among the smells Murphey details: repetitive code; complex functions; async acrobatics; and HTML in your JavaScript. For each, she goes over code embodying the "smelly" (antipattern), the "minty" (pattern), and the opportunity for improvement each smell offers.

Next, Harry Roberts enumerates some smells in CSS, including: styles that undo earlier styles; use of "magic" numbers; qualified selectors; using !important reactively; and seveal others. (In a comment, Roberts begs readers not to hold his own code, that behind the blog, to the standards he describes.) This post makes excellent follow-on reading to About CSS Architecture.

The idea of code smells isn't new -- the term dates to the late 1990s when it was coined by Kent Beck. Coding Horror's Jeff Atwood wrote a piece on the subject in 2006. The term "code smells" is also used by practitioners of agile development.

A Linux emulator in JavaScript
This 18-month-old oddity is not useful for much beyond fostering a sense of amazement -- "JavaScript can do that!?" Fabrice Bellard has written something that looks and acts a lot like a Linux system, in JavaScript. What it is is an x86 emulator, about 132 KB of JavaScript, into which is loaded the binary of a Linux distribution. It boots to a shell prompt in just over 4 seonds in Safari on my Core i5 Mac.

Why are IT wages flat?
The Economist Policy Institute has released a detailed report on the employment situation for IT workers, particularly those with CS degrees. One finding that may not come as news to anyone who has been in the field over the last decade: wages have been essentially flat since 2000, rising less than inflation, despite the fact that "software is eating the world." The downward wage pressure caused by offshoring is partly to blame, according to the EPI report; the recession and the lingering economic weakness in its aftermath account for the rest.

The EPI report was written to counter lobbying by Microsoft (PDF) for the US government to open up 20,000 new "STEM visas" for technical workers. Microsoft has long contended it cannot find enough people to hire in the US; the fact seems to be that they cannot find enough people to hire at the below-market wages the company prefers to pay.

Five upcoming web APIs
Alex Maccaw, who is a JavaScript programmer and O'Reilly author working at Stripe, peers into the near future of Web programming and describes five interfaces that we will be using as early as next year:

I won't summarize them here; go read Maccaw's fine explication of why each will be important. The web platform just keeps getting richer.

The Friday Four gives a hat tip each week to Ron Miller, whose collection of five links for developers and IT pros runs weekly on

Related links