Top 10 Things To Do My First Week at Microsoft

  1. Wear my Google t-shirt.
  2. Set my homepage to www.google.com
  3. Continually ask, “Have you met BillG? Where’s BillG? When can I see BillG?”
  4. Show off my bright blue iPod Nano
  5. “Upgrade” my workstation to Windows XP
  6. Then just format it and install Ubuntu
  7. Randomly shout “Yahoo!” as I walk through the halls
  8. Add my gmail address to my e-mail sig
  9. Start an open-source project for Google Android
  10. Default browser: Firefox Safari

(I kid, I kid…)

Clarification on Why Study for an Interview

I had mentioned this in the Tips section, but some people on some sites might still get the wrong idea about studying for my recent Microsoft interview, so I want to write this post, which explains my opinion more (and it really is just my opinion–I have no idea what Microsoft’s policy or opinion is).

I want to make clear that cramming for a job alone will not get you this job. It didn’t get me this job, and it won’t get you a job at any place that really tests you. Thinking it will is a backwards approach.

The two books I mentioned, as well as the links I pointed out, are merely resources to help you focus your efforts. If you have to memorize the questions and answers rather than understanding them, you have a problem. If you didn’t do well in your CS algorithms class, chances are, memorizing the answers isn’t going to do much for you. If you don’t really understand pointers by this point, no amount of memorization is going to help you debug your C++.

Those resources are a way to reflect back on what you’ve learned through your entire career, starting in school. Let’s face it, how many times have you had to implement a hash table, or a heap sort, or even a binary tree? Those basic pieces are always provided for you–almost nobody writes them from scratch in production code. But should you understand them thoroughly? Yes. Should you know common gotchas? optimization techniques? how to write them? Yes, Yes, and Yes.

Even if the interviewer asks you to do some basic problem like writing a linked list function, and you’ve memorized it, then what? Ok, so you write it on the white board. Guess what the interviewer is going to do next? They’re going to ask you to analyze it, they’re going to say things like, now let’s make it circular. How do you detect a loop? Now it needs to bi-directional. Now it needs to be split in half. Now each node also needs to have children. Now it needs to be sorted. Now it needs to represent terabytes of data on disk, now it needs to be faster, smaller, smarter, better in every way.

And that’s only if you answer the problem perfectly at first, which is pretty hard to do.

You see where I’m going with this? It doesn’t matter how well you know the initial question, they will always get to a point beyond where you’ve prepared and you need to actually apply knowledge and skill and come up with something you haven’t thought of before.

I can’t remember where I read it, but someone said that Microsoft will deliberately ask you questions you can’t answer. This makes perfect sense–asking questions you know the answer to does not demonstrate the limits of your understanding. As an example, if I ask you only about basic addition, I learn little about your mathematical skills–only that you’re at an elementary level, which isn’t helpful. I have to ask about multiplication, division, fractions, algebra, trig, calculus, linear algebra, differential equations, etc. up to the point where you can’t answer anymore before I know what level you’ve achieved. It’s the same with programming.

Why did I work so hard for this job? A few reasons, I think. First, I’m a bit of a nutball. Second, I saw an opportunity I was not going to let go through any fault of my own. In the end, if they didn’t want me, so be it, but I was going to satisfied that I did everything possible to ensure success. Third, I expected the interviews to be harder than they ended up being, and I expected them to ask obscure questions about all sorts of data structures. Knowing what I know now, a lot of that preparation wasn’t necessary, but I don’t regret it–for the confidence alone it was worth it.

In the end, I thought they did a great job of discussing only basic data structures and algorithms, but really making sure they got you to think. No interview system is perfect, but theirs is really good.

Microsoft Interview Experience – Summary

Some people (I’m looking at you reddit), have complained about the length of my interview story. So sorry. I wanted to document the entire experience, for myself as well as others, so I included a lot of detail. I know a lot of people enjoy it. There are plenty of shorter experiences out there, so how else am I supposed to distinguish myself? hmmmmm?

If you don’t want to read the 9-pages worth of material, I present this summary for your edification:

  • I wanted this job bad so I killed myself studying.
  • Microsoft takes good care of you.
  • Food.
  • Golly gee, they’re nice people. Smart too!
  • The interview lasted 9.5 hours and was both difficult and fun.
  • I got an offer. I accepted.

Thank you. Please resume your comments now. 🙂

My Interview Experience at Microsoft

(If the thought of reading more than 4,500 words makes you hyperventilate, please go instead to my summary)

Please also read my Clarification on Why Study for an Interview

Like this? Please check out my latest book, Writing High-Performance .NET Code.

My Microsoft Background

Before I go into the specifics of the interview experience, I want to explain my background with Microsoft.

When I was just starting college, I got into an online community called DevHood. It was a student-focused .Net community where you could share tutorials, tips, code, and ask questions. Loosely associated with this were monthly .Net user group meetings on campus. My friend Ammon was the Microsoft student ambassador leading these meetings. By the time I’d graduated I was one of the leaders on DevHood (I’ve since dropped a few places–the site is now mostly inactive), and a strong desire to some day work for Microsoft was born. That desire has been occasionally reinforced by various MS events that I’ve been to, people I’ve spoken to, and blogs I’ve read.

Around the time I graduated I made it into an “interview” situation with Microsoft in the career center. I failed miserably. It was the first-ever interview I’d ever done with anybody, I didn’t prepare (at all), I was nervous (to the point of becoming very hot and sweating), and for some reason I thought I wanted to be a PM. Yeah….they never called me back. But it was a learning experience.

My freshman year in college is also the year I moved from using Borland C++ to using Visual C++ 6. I was also an early adopter of .Net and have generally been a fan of Microsoft. (You could maybe call me a fanboy, but I don’t think I’m completely one-sided. I consider myself pragmatic. Apple is just as good in many things as Microsoft, but I am really annoyed at the press it gets and the Apple fanboys. I think the biggest differences in OS X and Windows for most non-technical end-users are aesthetic.-Ed: please see clarifying comments below)

The effect of Google

I interviewed with Google last year, a process which I documented. Thank goodness–that experience really prepared me for this, though there were some big differences. For one, I don’t think I wanted the Google job. It was fun, nice to do, gave me a good experience, but in he end I wasn’t that disappointed. Microsoft was different. I wanted it and I prepared accordingly.

A month of e-mails and phone calls

It’s been a few months since this process started, so some of the details of timing or exact discussions may be off, but the overall story is correct.

A few months ago, I was contacted by a staffing firm that works directly with Microsoft to fill positions in various teams. I quickly responded, expressing my interest. The staffing agent who initially contacted me referred me to her boss, who was an extremely nice lady who works out of her home. She did initial questions like what kinds of things I’m interested in, can I relocate, etc. Mostly, she told me about the team that she is looking for: Live Search. She also acted as the buffer between me and Microsoft. She referred me to a Microsoft staffing person who also worked specifically with the Live Search group.

The Microsoft staffer talked to me first on the phone, about my projects, goals, Microsoft, the Live Search team, and how interested I was. He then setup a phone screen with the development lead of the team I was interviewing for, which was to take place about a week later. This phone call was postponed because of a meeting at Microsoft, and I actually did it a few days later than planned. No big deal for me, though it was a little hectic because family was visiting and I didn’t want to discuss my interviewing with them at this point.

Phone Screen

I prepared for the phone screen by writing questions for the interviewer, preparing standard HR-type questions and answers, and figuring out what I wanted to say about myself (overall), my interests, projects, current job, why I want to leave, why I want to work for Microsoft, and anything else I could think of. I also researched the team a little (I didn’t know which specific team it would be at this point, so this was mostly learning the major components of the Live Search group). I did not practice writing much code at this point.

The actual phone screen was easier than I thought, up to the end. We started with a little chit-chat, then he asked me about my current projects at GeoEye. He did go into technical details, but not too much. He asked me about my opinion on testing and other software engineering practices. I discussed unit testing and the efforts I had made to impose best practices in my current team. I was pretty emphatic in my description of software engineering practices, since I had seen such dramatic benefits in my work. We had a pretty good discussion about this sort of stuff and I felt like I was being taken seriously because of my experience. We also talked about working in teams.

After 30 minutes or so, he asked, almost apologetically, if I had time to do a coding exercise. Of course, I said yes. Oops. I didn’t do so well. With him on the phone, I e-mailed him my code at regular intervals. I took about an hour to hack out a recursive solution to a problem which I had actually never solved before. I think I panicked and not having immediate feedback I went down the wrong path for a while. I also should have thought of the design of the problem in terms of data structures, rather than just think of a vague code solution and go for it. I learned a lot from this exercise.

Even with that, he said, “I’m going to recommend you come in for an in-person interview. The coding was a little weak, to be honest, but I think you have great potential.”

He also specifically recommended reading Programming Pearls by Jon Bentley. This book was on my to-read list, so I gave it priority and ordered it, along with Programming Interviews Exposed: Secrets to Landing Your Next Job.

Preparation

My preparation for this interview was intense. I went through as many problems as I could think of. With Programming Interviews Exposed, I read 2-3 chapters at a time, making sure I understood each problem and the answers thoroughly. Then I went back and solved each problem on paper, without cheating and looking at the answers. Most problems I could have done without reading the chapter beforehand, but a few were new to me so the book helped a lot. It also helped show how many problems can be solved with creative application of basic CS principles. It also has good advice for handling salary negotiation and other non-technical aspects of the process.

Programming Pearls was even more helpful for formulating a mental framework for solving problems. I cannot recommend it enough. The material is much more deep than Programming Interviews Exposed and it will force you to think a lot more. I read the entire book and did as many problems in each chapter as I could. Most of them are thinking questions and not necessarily coding questions.

I also found and downloaded every list of programming questions I could find:

I did problems almost every night until I started to feel burned out. I solved every problem on those lists, other than some of the database/hardware/irrelevant questions. Whatever you do, don’t give in to temptation to look at the answers until you’re hurting with the effort of solving them. Memorizing the answers isn’t enough–you really do need to understand them, whether you figure it out yourself or look them up.

On the plane trip out, I reread Programming Pearls and did the problems again, making sure I understood nuances that I hadn’t noticed the first time around.

The Trip

About a week after my phone screen, I was contacted by a travel specialist who organized my trip. I was asked to provide some basic information, such as 5 dates when I could interview. I was nervous about this since I didn’t really want to ask for more days off from work, but I just went ahead and hoped it worked out. Once the date was established (nearly 3 weeks in the future), I was sent some documents on Microsoft’s online careers site. Logging in with my Live ID account, I filled out forms specifying my travel preferences, chose travel dates and times (I picked early the morning before, a Sunday, and to leave the morning after the interview). I also chose a rental car since I didn’t want to rely on a taxi. Microsoft makes all of the arrangements for you once you fill out this form.

On July 27, my wife took me to the airport for the direct flight to Seattle. It was a 5-hour trip, during which I re-read the entire Programming Pearls book. I had an aisle seat. At Seattle, I picked up the rental car from Avis–an SUVish Ford. Redmond is about a 30 minute trip up the highway and thankfully it was easy to get there. I had printed directions before I left home. I did drive right by the hotel without realizing it, and had to circle around–they’re a little back from the road, and the single sign was facing the opposite direction.

After I checked in, I went out almost immediately to find Microsoft. It was right across the street. I needed to find building 19, which is about a 5 minute trip. I then went to Azteca, a Mexican restaurant near the hotel. It was good food–too much, but very good. Microsoft pays for your food–keep your receipts. When I checked into the hotel, they told me that I could get any food from the little shop or order in and Microsoft will pay for it. I didn’t make as much use of it as I could have. I didn’t want to binge on junk on the theory that a healthy body is a healthy mind.

After eating lunch, I went back to the hotel to study for the rest of the afternoon. I went through the rest of the list of problems I had printed out. I was so exhausted by the evening, being 3 hours behind my home time zone. I had some chips and juice for dinner, and went to bed at 8. I knew it was early, but I thought I could sleep for 12 hours. Nope. I woke up at 3:30 am the next morning. Oops.

I got up, read a bit, exercised until I was bored, took a long, long shower, ate a big breakfast, and reviewed a few other coding questions. At 9:15 I gave up and left the room. My appointment was with the staffing representative at 10:00. I was there at 9:20. One thing I noticed–lots and lots of diversity. People from all over the world walking around. I reviewed a few things some more and went into building 19 at 9:40.

I got my name badge at reception and then sat down, eventually moving over to the Microsoft Surface that they had set up. The Surface is an awesome piece of machinery. There are a number of demo apps which are a ton of fun to play with. There were games, a piano, and some graphical visualizations that all interacted with multiple fingers at a time. They also have a number of PCs and an X-Box 360, which had a couple of people playing Rock Band on it.

A little after 10, my representative came out to meet me. He said he only had 30 minutes to talk, but I think we talked for almost an hour. We discussed fairly typical HR-type things. He went over some numbers related to Microsoft, then leadership of the teams from Live Search on down to the team I would be interviewing for. He discussed benefits, and then explained the day’s events. He gave me a piece of paper with an interview schedule that went through the 2-3pm slot. He said, “I can’t tell you who comes after this. If you do well, the last interviewer will take you to the next person. If you don’t do so well, they’ll take you back here and we’ll talk about it.” Yikes.

When we were done, he escorted me outside to a waiting Prius, part of their shuttle fleet that anyone can use to go among the various parts of the campus. I was headed to building 88.

The Day of Interviews

This is the part where I’m sure I’m going to disappoint some people because I’m not going to tell you the specific problems they asked me. I don’t think that’s fair, and there wouldn’t be much point anyway. I may tell you a rough description just to give you an idea.

Each interview followed a similar pattern: discuss your work, tell me about [software engineering topic] and your experience with it, now let’s do a coding problem. Sometimes I did a problem quickly and they made the problem more complicated, or gave me a completely separate one. I was not asked riddle-type questions. I was not asked dumb, typical HR-type questions (“What’s your biggest weakness?”).

Between every interview they will talk to each other and they will send e-mails to the other people in the interview loop. Yes, they’re talking about you behind your back. And yes, they will tailor future questions to cover areas missed by previous interviewers, or to follow up on a weakness. Also, not every interviewer is on the team you’re interviewing for. I liked this because it gave me an opportunity to learn more about other groups.

In the first interview, the coding problem was to generate a well-known data set. I first considered how to generate the nth iteration of the dataset, but she quickly steered me to solving iterations 1-n (which is much easier). I went over the algorithm in my head and out loud, before writing any code. Then I wrote the simplest, naive code that I could think of. I immediately saw some inefficiencies and worked to address them. She prodded me slightly to the answer she was looking for (I would have gotten there).

The first interviewer was also my lunch escort. We went to a cafeteria in a nearby building. I got a salad–not trusting my stomach for too much more. The food is not free, but it seems pretty cheap (coming from DC). The drinks are free. I got water. During lunch, I spent most of the time asking her questions about what she does, working at Microsoft, and the Redmond area.

After lunch, she took me back to the lobby to wait for the next interview. I took the opportunity to use the restroom and look at the art (there is original art everywhere). I liked the boat made from junk.

The interview after lunch was with the same person who gave me the phone screen–the dev lead for the team. He asked me if I had looked at the project they work on, and as soon as I said I had, he asked me what I thought they could do better, or features to implement. I was prepared with some intelligent things I noticed (which luckily coincided with some of the things he had first noticed when he joined the team). We talked for a bit about software engineering, testing, and task “chunk” size–i.e., how big of a task am I comfortable accepting at a time. This was an interesting topic which I hadn’t really considered before, but after a little time understanding the question I used my experience to give an honest answer.

He gave me two coding problems. Actually, before that he had asked me if I had ever done a certain problem and I answered that I had. So he gave me another one–a geometry/graphics-related question (not too deep). I had seen the problem before when taking computer graphics in college, and I knew the form of the answer. I just had to write specific code. Then I had to explain as many test cases as I could for the function. That problem didn’t take too long so he gave me another–a function to score a round in a certain game (one that I hadn’t played for a long, long time). He explained the rules, I explained them back as I understood them, and then I verbally sketched an algorithm to solve it. I wrote the naive code, fixed some algorithm mistakes and inefficiencies and I was done. I think I did well on this.

Then he took me to my next interview, which was the dreaded 2-3pm one. The same pattern ensued. This was a maze problem, and though I struggled a little solving it, I had immediately known that depth-first search was the way to tackle it, which was what he was looking for.

And…what happened next? Was I done? Do I get to continue until 5pm or am I done?

He took me to the next interview. 🙂

The next one might possibly have been my favorite. The guy I talked to had a lot of patent cubes, so I asked him about those and what his previous projects were. He then asked me a very interesting conceptual/coding problem about how to design a filter for the Live Search engine. We talked through it, and I came to a decent solution, which I then had to code. Definitely the most interesting problem of the day.

Then on to the next…it’s 5pm now. They’re offering me food, but I’m politely declining because I just don’t eat in high stress situations like this. That might be bad, but it worked for me.

A little bit of talk about software engineering practices, working in a team, etc. Then he gave me an array-summation problem. I was very familiar with this problem and explained that I knew a naive way, but that it wouldn’t work in all cases (i.e., bad input). He asked me to explain the problems, which I did. It was more like a discussion. He then gave me a tree-related problem, which I solved very quickly because I had practiced the exact problem before. Then he made it harder. He gave me a hint which at first confused me, but once I understood what he meant, I grasped the solution.

It’s now 6pm. I was sure I’d be done. There are fewer people in the halls now. The day is over.

He takes me to the next interview.

This is with the boss. The dev lead’s boss. I’m unsure of his exact title, but he was in charge of the team I was interviewing for and one other.

We talked for 45 minutes without a hint of coding. This was a wide-ranging discussion about everything from MS benefits to housing to traffic to the future of the team, the impact of Yahoo, comparison to Google, and culture at Microsoft. I gained a lot of insight and appreciation for what they’re doing. At one point he started talking salaries and benefits, and I got extremely excited and I had to fight to keep a smile off my face (hey, I don’t want to look like a dork too early). I was thinking that they were definitely going to make me an offer. Then he said other things which made me come back to reality. Finally, jokingly, almost reluctantly, he said he may be obligated to give me a coding problem, so let’s do a quick one.

Looking back, this should have been the easiest problem of the day, but I just got off track and missed the (now, painfully-) obvious solution. It was a problem about finding the nearest object in a geographic region. I cringed when he suggested the golden hint to me, and my thought was DUH. Maybe it was too late and I was tired.

Finally, at about 7:30pm I was done. He called the shuttle dispatch and walked me out, where we chatted for a few minutes before I insisted he didn’t have to wait with me.

Aftermath

I drove to the hotel and called my wife. I was elated. I knew I hadn’t been perfect, but I had just gone through a 9.5 hr interview. That couldn’t be bad. I thought for sure I was going to get an offer.

I ordered some Thai food from a delivery service, which I ate starting at 9pm. I watched a little TV, then went to sleep. I woke up at 4am the next morning to head to the airport for an early flight home. It had been a very long day.

The next day I talked to the staffing guy (the one who had started my interview day) about the experience. He was very…confusing? not sure how to describe my interaction with him. He told me that they were very happy with me and I did very well, and yet some of the feedback indicated slightly weaker coding than someone else they were interviewing. He needed to hear back from the team about the other person before a final decision was made.

Needless to say, this was not what I wanted to hear. I was pretty upset about it so my wife and I indulged in a little night out dinner to assuage the disappointment. I was sure I was not going to get the offer.

Two days later, I was at work when I got an e-mail from him. They are going to make me an offer! I quickly left the room (I share it with a co-worker) and called my wife. She was ecstatic. I was ecstatic. I was not expecting it, after the previous conversation. Looking back (and considering other conversations), I wonder if he was trying to gauge my dedication and desire for the job. My other, more cynical, thought was that he was trying to prep me to take a lower salary or not negotiate as hard because I must have “just squeaked by.” Maybe it’s just to make victory all the more sweeter. Most likely he was on the level, but I do wonder… it just seemed odd.

That night when he called, I was feeling pretty miserable because I think I was food poisoned that day–I was feeling horrible–vision was literally shaking–very scary. But I kept it together and we talked benefits, salary, relocation, and the next steps. We did the “what-salary-do-you-want/what-is-your-offer” dance, which I lost of course. Does anyone get an offer without stating their expectations first? In any case, the formal offer was worked out over the next few days. I was on vacation in Utah when I got it (all electronic). It was acceptable and I am now going to be a Microsoft employee in September!

Random Thoughts

I’m going to go work on a team that is a direct competitor to Google, and they are a very significant challenge. Microsoft has a lot to do to catch up to Google, but there is something exhilarating about working for the underdog. Even once the technology is better than Google’s, there is significant mind share that needs to be won. We all have our work cut out for us.

This is completely subjective and I’m biased, but I thought the people I interacted with at Microsoft were nicer than at Google. Maybe it’s because I did better, maybe it was my attitude, or maybe I was lucky with the people I spoke to.

When I drove up to the Microsoft campus the first day, it felt right.

There’s a lot to do in the next month–prepare the move, finish up stuff at work, prepare to buy a house, gear myself up for a difficult, demanding, but rewarding job–it will be a lot of work, but hopefully fun at the same time.

Tips

My tips for the Google interview experience apply here. In addition:

  1. Be enthusiastic. I got the distinct impression that they value this highly. Demonstrate it with your projects, your interests, your conversation, and even your tone of voice. That last is a hard one for me, especially over the phone. I’m enthusiastic, but I definitely have a hard time showing it verbally.
  2. Practice, practice, practice. Spend a lot of time practicing with pen and paper. Write out every search algorithm by heart. About half the problems they asked me are in the two books I recommended above. But beware that they’re going to expect you to go beyond those problems. Consider these problems as refreshers in basic computer science, not a primer to help you get the job.
  3. Know your computer science. If you don’t understand serious computer science, memorizing answers to lists of problems isn’t going to help you. Understand recursive and iterative solutions to common problems. Know data structures, big-O, and common algorithms. Know what methods and data structures can be used to solve which problems. You probably won’t be asked about advanced data structures or techniques–you just need to understand the basic ones really well.
  4. Know the team. Research as much as you can. In my case, I knew what the project was and I could actually use it and come up with suggestions. This may not always be possible. If not, learn about the larger organization that you can get information for.
  5. Have lots of intelligent questions. Many questions I asked to most people. Here is a sample: Favorite thing about working at Microsoft, Least favorite thing; My specific role. How big the team will be grown, impact of external events, comparison to competitors, strategy, where will the team be in the future, what’s your commute like, work-life balance, what do you work on (since not everybody you talk to is on the same project), what is your specific role, what other projects have you worked on at/outside of Microsoft, why did you move to this team, and lots more. The important thing is to be genuinely interested. If you are, then coming up with questions on the fly is easy, and you will have a natural discussion rather than reading a script. I moved from “script” to “natural” through the day as I became more comfortable.
  6. You must know what you’re talking about. This allows you to have nice conversations instead of feeling like you’re being quizzed. You’ll feel more like a peer, and hopefully so will they. You’ll already belong. Also, you can’t fake this so don’t try.
  7. The interviewers at Microsoft seemed much more willing to give me instant feedback than Google was. I could ask them what they thought of my code and they gave me honest feedback. I appreciated this.
  8. The book I read on the way home was The Neutronium Alchemist by Peter F. Hamilton. It’s the sequel to The Reality Dysfunction. Highly recommended for sci-fi fans.

Redmond, here I come.

Related links:

Fixing Printing Problems with IE7 and Vista

If you are having problems printing from Internet Explorer 7 under Windows Vista, check to see if you have AVG 8.0 installed. If so, get the latest version from http://free.grisoft.com. I did have build 8.0.101 and upgraded to build 8.0.138–everything works fine now.

I’ve also seen reports that it could be an error while running IE7 in Protected Mode. There’s a thread in the Microsoft forums about this.

Good luck.

log4cxx + VS2005 + Windows SDK v6.0 = compile error

If you are following the instructions to build log4cxx 0.10 in Visual Studio 2005, and you have the Windows Platform SDK v6.0 installed, you may get errors compiling multicast.c in the apr project.

I found the solution, and it’s pretty easy. Open up multicast.c and edit the lines:

136: #if MCAST_JOIN_SOURCE_GROUP

148: #if MCAST_JOIN_SOURCE_GROUP

to be, instead:

136: #if defined(group_source_req)

148: #if defined(group_source_req)

 

e voilà! now it compiles.

Nuclear Energy and the Question of Uranium Supply

In the replies to my article about nuclear power, there were statements about the supply of uranium the world can provide and that in the end, nuclear power may not be the panacea we hope it would be.

I respectfully disagree.

First, let me state my bias: I am an optimist. I almost never buy into doom and gloom scenarios in any domain. I am cynical about a few things (the ability of politicians to do what’s best for us, for example), but by and large I think things generally work out.

That said, I don’t believe we’ll run out of uranium anytime soon.

It is easy to find reports out there on the availability of uranium. For example, this one by the World Nuclear Association, or another by the European Commission. Those both limit the supply to less than the next 100 years on the outside, and just a couple of decades worst-case.

However, this is by no means the whole story. All of these studies make assumptions that I think are a bit weak, such as the amount of known reserves, current exploration, research, funding, scientific breakthroughs, etc.

Once nuclear energy is a more fundamental part of our energy and economic infrastructure, technology will improve, efficiency will improve, uranium harvesting will improve. It’s cliche, but I’m still going to point out the silly estimates of oil reserves (we’ve had 50 years of oil left for the last 100 years), or food reserves, or overpopulation, or [pick fad]. The reality is that humans are amazing at developing technology to increase our efficiency to amazing levels. We make huge leaps that completely negate all previous predictions. There is no reason to think this will end.

One idea that came up a few times in my research is the idea of mining uranium versus reusing it. Currently, most nuclear plants can only use uranium once before discarding. By using different processes, breeder reactors, including plutonium in the process, the efficiency and life span of uranium can be dramatically increased. Unfortunately, it looks like politics gets in the way of some of these ideas (such as the usage of plutonium).

Politics is tricky. On the one hand, we don’t want bad guys to get a supply of high-grade, volatile nuclear material. On the other hand, we need to learn to take advantage of it for the advancement of all mankind.

A report by the IECD and IAEA estimate uranium supplies lasting from 270 to 8,500 years, depending on our technology and process. There is also an interesting essay by James Hopf, a nuclear engineer, at American Energy Independence. It may be a little biased, but it’s worth reading.

Read the references at the bottom of the Wikipedia article on uranium depletion. There is also a good summary of some of the main studies and ideas on the subject in the article itself.

Adapting to Changes

Change is a fact of life. Nowhere is this more obvious in a medium where the very thing we make is completely intangible and malleable: software development. There is almost nothing that is impossible in software–there are only limited resources.

This malleability has been one of the reasons for the enormous pace of change we’ve seen in computers in the last half century, but at the same time it’s been a stumbling block to true engineering practices.

Regardless of philosophy, change will happen in all software projects to some degree. There are two extremes of development that most organizations fall between:

  • A single coder hacks together whatever the boss needs changed today. (Also fixes bugs from yesterday’s fixes.)
  • NASA’s awesomely rigid development practices for the Space Shuttle software (see the Manager’s Handbook for Software Development on the Book list) resulting in extremely high-quality, virtually bug-free software (at a very high price).

For most of us, neither extreme is appropriate. Deciding the right balance of change control is a hard problem, but it’s not impossible. Still, some organizations manage to do so badly at it that it deserves to be studied and dissected.

The Census

As an example, consider the 2010 Census, a project that has been covered in the press and on tech blogs over the last few months. The following is from the second paragraph of the report on the GAO’s study of this massive program:

In October 2007, GAO reported that changes to requirements had been a contributing factor to both cost increases and schedule delays experienced by the FDCA [Field Data Collection Automation] program. Increases in the number of requirements led to the need for additional work and staffing. In addition, an initial underestimate of the contract costs caused both cost and schedule revisions. In response to the cost and schedule changes, the Bureau decided to delay certain system functionality, which increased the likelihood that the systems testing…would not be as comprehensive as planned.[…] Without effective management of these and other key risks, the FDCA program faced an increased probability that the system would not be delivered on schedule and within budget or perform as expected. Accordingly, GAO recommended that the FDCA project team strengthen its risk management activities, including risk identification and oversight.

The Bureau has recently made efforts to further define the requirements for the FDCA program, and it has estimated that the revised requirements will result in significant cost increases.

As with many government projects, there is enough failure to go around. The key idea I want to focus on is a failure on the part of the government agency and on the part of the contractor implementing the technology to adequately plan for change.

Before that, though, I want to say that I have no knowledge of their specific management or technical practices, other than what is publicly reported. For all I know, all parties performed extremely well and still failed. (However, from friends and acquaintances in government and contractor positions around D.C., I think it’s fair to say that most organizations here are behind the curve in software best practices, to put it politely.)

With that (admittedly harsh) assumption, it’s apparent that the agency failed to adequately plan, think through requirements, and communicate effectively to the contracted company. On the developer’s side, it’s apparent they didn’t have effective mechanisms for handling changes.

Before a project is undertaken, a set of fundamental principles must be agreed upon:

  1. The client will change their minds. There is no such thing as “written in stone.”
  2. Making changes is hard or impossible.

These two principles are fundamentally in conflict. On the one hand, the developer must know that changes are going to occur: sometimes large changes. They can plan for that from the code level up to their organization and processes.

On the other hand, the client, must realize that they can’t just suggest a change at the end of the project and expect it to be thrown in and work correctly.

The tension between these two principles implies certain practices and expectations on all parties, which in an ideal world would lead to a successful outcome more often.

Developer Responsibilities

The developer, knowing that the client does not understand the full set of requirements up front, designs their system in a way that can easily handle change. This means modularity, this means testability. From details as small as designing methods to operate on Streams instead of filenames, to as large as easily reusable components.

The first step is a change in mind set: an acceptance that change will occur, and that it’s ok. When I first started development, frequent changes really frustrated me. Sometimes they still do, but I’m getting better (I hope). Once the mind is malleable, practices can be implemented to handle it effectively.

A few coding practices that encourage changes:

  • Test-driven development (or at least full unit testing). In this day and age, with how easy it is to accomplish this, is there a good reason not to do it? I’m not convinced by many arguments against unit testing. A full suite of unit tests gives you confidence in your code, and the ability to safely refactor even large portions of your program. Full TDD I could go either way.
  • Constant refactoring to fit the best design possible (within reason. Obviously, there is no “best” design). Software, like everything else in the universe, obeys the law of entropy. Without constant maintenance, it will degrade. Designs degrade as you add on to them. Classes degrade as you stuff them full of things. Don’t stand for it–take the time to make things neat. Get some good books on refactoring if you don’t know how to start.
  • Highly Modular. Apply all your OO-design skills here. It matters. Cohesion and coupling really do matter.
  • Small, frequent iterations. Most software systems these days are too big and too complex to understand at once. Iterative development is the key to success.
  • Strong source-control practices. Does this even need to be discussed? If your organization doesn’t have good source control, you’re doing software wrong.

Other practices on the developer’s part read like a list of Extreme programming fundamentals:

  • Communication – The key to any relationship, whether personal or corporate, is communication. The right amount should be discovered and adhered to. It should probably be slightly more than you’re comfortable with (since many developers would rather not talk to anyone ;).
  • Simplicity – I believe that the single hardest thing to do in developing software is to manage complexity. It’s requires more brainpower and creativity than all other activities. Coding is easy. Coding so that it is easy to understand a year from now is difficult. If the design is needlessly complex up front, then change is that much harder to implement.  Always remember that software complexity increases exponentially.
  • Courage – Stand up for correct principles. Don’t allow politics to interfere with what needs to be done. Don’t be afraid to change the design if it needs to happen. Change coding practices as needed. Never be afraid of the truth–just deal with it.
  • Respect – Both sides need to remember that the other is expert in their domain. Humility is key.
  • Responsibility – this is something I fear is lacking much in government. Everybody needs to take responsibility for their part. This implies accountability. This can be shared responsibility at some levels, or the-buck-stops-here responsibility at higher levels. If no one is responsible, nobody cares if it fails. Courage is a prerequisite to this.

This mind set needs to encompass not just pure software development, but also processes at the organizational level. This can take many forms, but a few ideas:

  • Personal relationships between clients and developers
  • Flexible team structure and members
  • An easy way to submit and discuss change requests
  • A culture that accepts changes
  • A good understanding of the problem domain

Jeremy Miller (The Shade Tree Developer) talks a lot about processes and practices and it is a very good read.

Unfortunately, there exists an attitude at many companies that it’s better to milk the clients for as much money as possible rather than do the hard work of getting a good process.

Client Responsibilities

I think my introduction and the discussion about developer responsibilities may imply that because software is so ephemeral, it is therefore easy to change it. After all, it’s not a physical object that has to be broken down and rebuilt–what’s so hard? To anyone who has worked on non-trivial projects, this is laughable. Let’s clarify:

It is easy to program. It’s painfully, mind-bendingly, insanely difficult to design software. So difficult, in fact, that no one can do it well. The sooner everybody understand that, the sooner we can get started with real work. Good design is thought-work, iterated over and over, added to experience and analysis.

Some details are easy to change. Others are fundamental to the structure of the building. By way of metaphor, changing your mind about a house you’re building to suggest a stone facade instead of brick is relatively easy. Deciding you would like to have ten stories added onto your house changes the game significantly. Now you have to build a completely new foundation.

I believe the customer’s responsibility is to gain knowledge and insight into the development practice so they understand why things are difficult. Computers are so fundamental to our culture, we can no longer afford to have companies and agencies run by people who don’t understand them to some degree. The exact degree is debatable, but it’s certainly higher than where we’re at now. In my own situation, I think that when I started my boss did not realize how seemingly-trivial changes could be phenomenally difficult to implement, and therefore bug-prone–all because of design decisions made earlier. I now have him understanding that there is no such thing as a simple change.  (Of course, I still occasionally underpromise and overdeliver–I have to maintain my miracle-worker image after all. 🙂

A client who wants software done and doesn’t want to end up paying an extra $3,000,000,000 for software should understand that critical requirements can’t be left until the product is being delivered. “We didn’t think of it before” is not a good excuse.

A client who understands this will realize how critical initial requirements are and ensure they’re communicated clearly. Most of all, they don’t wait around twirling their thumbs, only to reject the system when it’s done because it doesn’t meet their requirements. They will insist on periodic feedback and demos to make sure things are going the right way.

The responsibility for huge failures is on everybody’s shoulders. I believe that it can often be traced back to an unwillingness to face up to the truth, lack of responsibility, and misunderstanding the nature of the project.

Large projects aren’t doomed to fail

There is a fundamental truth, however, of all projects: there exists at least one change that is too large to do. Maybe the Census required that change–I don’t know. I do know that if both sides follow the best practices they can, the number of must-fail changes can be minimized.

That said, here’s why I refuse to believe the census project wasn’t sorely mismanaged from the outset by all sides: FedEx, UPS, Amazon, Wal-Mart, Microsoft, and dozens (hundreds?) of other companies have built enormous and complex systems for managing large databases and mobile platforms involving thousands of partners. It is ridiculous to me that they could not have built a system for our government quicker, cheaper, and less epic failure than the one they got. If the Census is fundamentally more complex than the problems they deal with, someone please let me know.

Change is part of everything now

The ability to adapt to change is critical, not just for software developers, but for everyone in our society. Technology, events, trends, and money all flow so quickly now that those who can adapt quickly will succeed.

It’s not just software companies that need to adopt sound development practices. There will always be companies that build out our infrastructure (Microsoft, Google, Cisco, etc.), but in the end every company will be a software development company. Disregarding good practices because “we’re not a software” does not work anymore. It’s not true. You are a software company. We all will be.

Idealism or…

If a lot of this seems idealistic, that’s ok. I wish the world were like Star Trek as much as the next geek, but I realize that there are a lot of motivation$ out there. The world is what it is, but if we aren’t trying to improve it by working towards a standard, then what’s the point? We can improve it. There is no excuse for such catastrophic wastes of time, money, and effort.