Archive for Business

You are browsing the www. Michael Righi .com archives of Business

Sizing Up Software, Part I (0)

Note: This article originally appeared in the August, 2009 edition of TEQ Magazine.

Older brothers can be very cruel to their siblings. Just ask my little sister. As kids, we often split the chore of washing the dishes after dinner. I dreaded this task, but one evening I had some fun with it at my sister’s expense.

After enjoying our mother’s chicken tetrazzini, I raced to the sink to wash my half of the dishes first. But instead of washing the dishes to perfection until half remained, I carefully washed 50% of every single dish in the sink. Each plate resembled a half-moon made of Parmesan cheese and chicken skin. Hilarious.

Sure, if I had done the job properly it would have taken less time, but you should never underestimate the wicked dedication of an older brother.

The moral of my story is that work assignments and job performances can be measured and interpreted in different ways. This is especially true with software projects.

As a software developer, I am commonly asked how “big” my applications are. (The cheeky side of me wants to answer with a physical size. “Well, I once built an iPhone app that was 2×3 inches!”) In all seriousness, when I’m asked this question I assume the person wants to hear about the scale of my software, so I tell them how long it took to build, how many concurrent users it can handle, and how large the underlying database is. Interesting stuff if you’re trying to gauge a developer’s experience, but what if you want to measure the progress of a project under development?

Some programmers measure their progress by counting how many lines of code they’ve written, but this practice makes me taste my lunch again. Why? First, the numbers aren’t isomorphic across different languages. (Twenty lines of C++ might accomplish the same as five lines of Java, or one line of Ruby.) Second, measuring progress by counting the lines of code encourages the development of bloated software. To quote Kanye West quoting Daft Punk, I’ve seen many applications that would be “harder, better, faster, stronger” if they were rewritten with half the code.

Last year this issue became an important one for my company. During negotiations with a client, I proposed that our fee be split into thirds, with the second payment due after three months. However, my customer wanted to cut the second check when “half the software was complete.”

But what does “half the software” mean? Half the lines of code? If so, then we’d have to somehow predict the final line count in advance. Since our software was web-based, it was suggested that we measure the number of pages built, but even that’s not perfect. If 75% of the pages are 65% complete, is that considered half? Besides, when web applications are measured by page count, developers are rewarded for building clunky user interfaces that use more pages than necessary.

Fortunately, I was able to convince my customer that “half the software” was too vague, but others aren’t always so lucky. I once saw a project whose members were unwittingly encouraged to ignore problems, because their success was measured by the number of bugs filed. If there’s no Dilbert cartoon for that, there really should be.

Good software developers view their work as a craft, and their software as a work of art. To them, judging software by silly metrics makes no more sense than judging the beauty of a painting by the canvas size, or the strength of a bridge by the number of rivets.

Instead of using lousy software metrics, companies should focus on what really matters: software quality. Yes, this is harder to measure because it’s more subjective, but it can be done.

What makes software good? For starters, good software isn’t bad, and bad software is easy to identify. Some of the many things that can make software bad include a lack of comments, poor formatting, mismatched naming conventions, copy-and-pasted code, deprecated method calls, and broken syntax that doesn’t even compile.

Just as it can be difficult to smell your own B.O., sometimes it’s hard to recognize when your own code stinks. That’s why my team uses an open-source Java application named Hudson. Hudson is a continuous integration tool, which is a type of program that automatically compiles, tests, and analyzes software on a recurring basis. Think of Hudson as a friend who sniffs you once an hour and tells you when it’s time to reapply the Old Spice. (To my fellow geeks: Old Spice is a form of deodorant.)

Once an hour, Hudson downloads and attempts to compile the latest source code for my team’s software projects. It then runs our code through a gauntlet of unit tests to ensure that our latest changes haven’t broken anything. Next, Hudson sends our source code through another tool named Checkstyle, which analyzes the code against a set of known bad practices.

In the end, Hudson generates a lovely web-based report that spotlights our projects’ health. Each project is summarized with an icon, showing either a shining sun for the really healthy projects, or a stormy thundercloud for the projects that should be taken out behind the shed. Clicking a report reveals more detail, including which unit tests failed and why, along with beautiful graphs that highlight the results of Checkstyle. For each issue, you can drill deeper into the reports to discover the source of the problem, along with suggestions for how to fix it.

Hudson is extremely customizable, and it does a million things I haven’t mentioned here. There are also many other tools available for measuring the quality of software, but Hudson and Checkstyle are the ones my team prefers.

I’ll admit that Hudson does a better job of telling you when software is bad, rather than telling you when software is good. For this I think you’ll always need code reviews and the opinion of an expert human being. Also, measuring the health of a project doesn’t really help you track its progress, so please don’t use tools like Hudson for this. Measuring the progress of a software project is such a difficult thing to do, that I’m going to revisit that one next time.

Project managers and developers, please stop measuring code with silly metrics.
At best they provide useless data, and at worst they encourage good people to do bad things. Instead, focus on measuring the health of your software and improving its quality. And if you’re still not convinced, just ask my dad about the time he asked me to mow half the lawn.

You can learn more about Hudson at http://hudson.dev.java.net , and Checkstyle at http://checkstyle.sourceforge.net.

Special thanks to Joe Gallo for editing and contributing to portions of this document.

A Recession Fueled Entrepreneur (0)

The economic meltdown is causing devastating effects for millions of people, and I’ve witnessed its collateral damage first hand. Some of my smartest, hardest working friends — people that I used to consider untouchable — now find themselves unemployed. Even the most fiscally prudent and financially conservative people have been harshly impacted by the incredible scope of the stock market and housing crashes. Unlike in the past, you didn’t have to be reckless with a credit card, buy a Miami condo with no money down, or risk your life savings on a dot com IPO to be impacted this time around.

I’m fortunate to live in Pittsburgh, because my city has not been affected as badly as other places. BusinessWeek labeled Pittsburgh one of the best places to ride out a recession, Smart Money magazine called Pittsburgh a recession-proof place to retire, and the New York Times said that Pittsburgh is the envy of many recession-plagued communities. In short, Pittsburgh is an awesome place to be in a horrible economy.

That said, if Pittsburgh is one of the least affected cities in the country, I can only imagine how bad things are elsewhere.

My grandfather — we called him Papa — was a big believer of investing in the stock market as the means to a comfortable retirement. When I was ten years old, he helped me purchase my first shares of a publicly traded company, and when we spoke he’d often dispense stock advice. To Papa’s delight, he met CNBC anchor Larry Kudlow at an airport a few years ago. “Michael,” he would later recount, “this man wore the sharpest pinstripe suit you’ve ever seen!”

Papa passed away two months ago, and although his death was an immensely sad and difficult thing to deal with, in a small way I am happy that he didn’t have to live out his final years struggling to get by. In just a few months, his investments lost more than a decade’s savings, and I don’t know what he would have done had he lived another twenty years.

My grandfather’s generation was sold on three ideas which my generation — I’m twenty-seven years old — has trouble believing today. The first is that investing in the stock market for the long term is the best way to save for retirement, the second is that climbing a corporate ladder is the surest way to success, and the third is that social security will be there for your golden years.

Between October 2007 and March 2009, the Dow Jones Industrial Average dropped more than 50%. I am still a believer in free market capitalism and the American economic engine, but I know that this crash has shaken the confidence of many of my friends. Tomorrow morning my company is rolling out its first retirement plan in the form of a Simple IRA. Although most of my employees are in their mid-twenties, and despite their knowledge that it’s best to buy low and sell high, some of them are hesitant to trust the stock market after what’s happened lately. Personally, I’ll be maxing out my IRA, but it’s difficult to blame them for lacking faith.

Another evaporated belief is the notion of climbing a corporate ladder to a comfortable retirement. Gone are the days of joining a company like General Motors with an entry level position, and counting on the business to take care of you for life. Many people my age couldn’t explain to you what a pension fund is, or for that matter how it differs from a mutual fund. Workers of my generation have had stability replaced with insecurity, and endurance replaced by transience.

So much doubt has been placed on the future of social security that many people my age just assume we’ll have none. Social security strikes me as a pyramid scheme that could only be stable in a world where life expectancy decreases while child bearing increases. (Octomom to the rescue!)

Faced with an unpredictable stock market, a non-existent corporate ladder, and an unlikely social security payout, I have never been more at peace with my decision to be an entrepreneur.

As an entrepreneur, I have much more control over my destiny than I would if I worked for somebody else. The stock market’s success is influenced by swings of emotions outside my control, while my company’s success is influenced by the quality of service I provide my customers. This I can control.

If I were an employee of a large business, my corporate ladder could be kicked out from underneath at any time. But, in the words of former Pittsburgher Paul Graham, as an entrepreneur I can grow a corporate ladder underneath me instead of climbing someone else’s to the top.

And when it comes to retirement, rather than relying on my government for socially offered security, I feel more comfortable depending on myself.

Of course, being an entrepreneur has its drawbacks too. Two weeks ago I worked eighty hours in seven days, and in addition to worrying about putting food on my plate, I enjoy the added stress of anguishing for my employees too. Don’t get me wrong; it’s not all roses.

Despite the stresses of being an entrepreneur, I’m much happier to be running my own company in today’s economic climate than I would be working for somebody else. Past and present employees of some large companies (Lehman Brothers, Bear Stearns, and AIG come to mind) must feel like hapless passengers aboard the Titanic. However, being an entrepreneur in a small business is like being the captain of a small speed boat. It doesn’t make the waters any safer, but at least you’re in control of navigating them.