Latest trending topics being covered on ZDNet including Reviews, Tech Industry, Security, Hardware, Apple, and Windows. Animoto turns your photos and video clips into professional video slideshows in minutes. Fast, free and shockingly simple - we make awesome easy. Hyde Park Group Food Innovation The Joel Test: 1. Steps to Better Codeby Joel Spolsky. Wednesday, August 0. Have you ever heard of SEMA? It's a fairly esoteric system for measuring how good a software team is. Don't follow that link! It will take you about six years just to understand that stuff. So I've come up with my own, highly irresponsible, sloppy test to rate the quality of a software team. The great part about it is that it takes about 3 minutes. With all the time you save, you can go to medical school. The neat thing about The Joel Test is that it's easy to get a quick yes or no to each question. You don't have to figure out lines- of- code- per- day or average- bugs- per- inflection- point. Give your team 1 point for each . The bummer about The Joel Test is that you really shouldn't use it to make sure that your nuclear power plant software is safe. A score of 1. 2 is perfect, 1. The truth is that most software organizations are running with a score of 2 or 3, and they need serious help, because companies like Microsoft run at 1. Of course, these are not the only factors that determine success or failure: in particular, if you have a great software team working on a product that nobody wants, well, people aren't going to want it. And it's possible to imagine a team of . But, all else being equal, if you get these 1. Do you use source control? I've used commercial source control packages, and I've used CVS, which is free, and let me tell you, CVS is fine. But if you don't have source control, you're going to stress out trying to get programmers to work together. Programmers have no way to know what other people did. Mistakes can't be rolled back easily. The other neat thing about source control systems is that the source code itself is checked out on every programmer's hard drive - - I've never heard of a project using source control that lost a lot of code. Can you make a build in one step? By this I mean: how many steps does it take to make a shipping build from the latest source snapshot? On good teams, there's a single script you can run that does a full checkout from scratch, rebuilds every line of code, makes the EXEs, in all their various versions, languages, and #ifdef combinations, creates the installation package, and creates the final media - - CDROM layout, download website, whatever. If the process takes any more than one step, it is prone to errors. And when you get closer to shipping, you want to have a very fast cycle of fixing the . If it takes 2. 0 steps to compile the code, run the installation builder, etc., you're going to go crazy and you're going to make silly mistakes. For this very reason, the last company I worked at switched from WISE to Install. Shield: we required that the installation process be able to run, from a script, automatically, overnight, using the NT scheduler, and WISE couldn't run from the scheduler overnight, so we threw it out. Do you make daily builds? When you're using source control, sometimes one programmer accidentally checks in something that breaks the build. For example, they've added a new source file, and everything compiles fine on their machine, but they forgot to add the source file to the code repository. So they lock their machine and go home, oblivious and happy. But nobody else can work, so they have to go home too, unhappy. Breaking the build is so bad (and so common) that it helps to make daily builds, to insure that no breakage goes unnoticed. On large teams, one good way to insure that breakages are fixed right away is to do the daily build every afternoon at, say, lunchtime. Everyone does as many checkins as possible before lunch. When they come back, the build is done. Everybody checks out the latest version of the source and goes on working. If the build failed, you fix it, but everybody can keep on working with the pre- build, unbroken version of the source. On the Excel team we had a rule that whoever broke the build, as their .
This was a good incentive not to break the build, and a good way to rotate everyone through the build process so that everyone learned how it worked. Read more about daily builds in my article Daily Builds are Your Friend. Do you have a bug database? I don't care what you say. If you are developing code, even on a team of one, without an organized database listing all known bugs in the code, you are going to ship low quality code. Lots of programmers think they can hold the bug list in their heads. I can't remember more than two or three bugs at a time, and the next morning, or in the rush of shipping, they are forgotten. You absolutely have to keep track of bugs formally. Bug databases can be complicated or simple. A minimal useful bug database must include the following data for every bug: complete steps to reproduce the bug. If the complexity of bug tracking software is the only thing stopping you from tracking your bugs, just make a simple 5 column table with these crucial fields and start using it. For more on bug tracking, read Painless Bug Tracking. Do you fix bugs before writing new code? The very first version of Microsoft Word for Windows was considered a . The whole team was working ridiculous hours, the project was delayed again, and again, and again, and the stress was incredible. When the dang thing finally shipped, years late, Microsoft sent the whole team off to Cancun for a vacation, then sat down for some serious soul- searching. What they realized was that the project managers had been so insistent on keeping to the . There was no attempt to keep the bug- count down. The story goes that one programmer, who had to write the code to calculate the height of a line of text, simply wrote . The schedule was merely a checklist of features waiting to be turned into bugs. In the post- mortem, this was referred to as . Many of the programmers in the company giggled, since it sounded like management thought they could reduce the bug count by executive fiat. In general, the longer you wait before fixing a bug, the costlier (in time and money) it is to fix. For example, when you make a typo or syntax error that the compiler catches, fixing it is basically trivial. When you have a bug in your code that you see the first time you try to run it, you will be able to fix it in no time at all, because all the code is still fresh in your mind. If you find a bug in some code that you wrote a few days ago, it will take you a while to hunt it down, but when you reread the code you wrote, you'll remember everything and you'll be able to fix the bug in a reasonable amount of time. But if you find a bug in code that you wrote a few months ago, you'll probably have forgotten a lot of things about that code, and it's much harder to fix. By that time you may be fixing somebody else's code, and they may be in Aruba on vacation, in which case, fixing the bug is like science: you have to be slow, methodical, and meticulous, and you can't be sure how long it will take to discover the cure. And if you find a bug in code that has already shipped, you're going to incur incredible expense getting it fixed. That's one reason to fix bugs right away: because it takes less time. There's another reason, which relates to the fact that it's easier to predict how long it will take to write new code than to fix an existing bug. For example, if I asked you to predict how long it would take to write the code to sort a list, you could give me a pretty good estimate. But if I asked you how to predict how long it would take to fix that bug where your code doesn't work if Internet Explorer 5. It could take 3 days to track it down, or it could take 2 minutes. What this means is that if you have a schedule with a lot of bugs remaining to be fixed, the schedule is unreliable. But if you've fixed all the known bugs, and all that's left is new code, then your schedule will be stunningly more accurate. Another great thing about keeping the bug count at zero is that you can respond much faster to competition. Some programmers think of this as keeping the product ready to ship at all times. Then if your competitor introduces a killer new feature that is stealing your customers, you can implement just that feature and ship on the spot, without having to fix a large number of accumulated bugs. Do you have an up- to- date schedule? Which brings us to schedules. If your code is at all important to the business, there are lots of reasons why it's important to the business to know when the code is going to be done. Programmers are notoriously crabby about making schedules. There are too many planning decisions that the business needs to make well in advance of shipping the code: demos, trade shows, advertising, etc. And the only way to do this is to have a schedule, and to keep it up to date. The other crucial thing about having a schedule is that it forces you to decide what features you are going to do, and then it forces you to pick the least important features and cut them rather than slipping into featuritis (a. Read my article Painless Software Schedules, which describes a simple way to make great schedules. Do you have a spec? Writing specs is like flossing: everybody agrees that it's a good thing, but nobody does it. I'm not sure why this is, but it's probably because most programmers hate writing documents. As a result, when teams consisting solely of programmers attack a problem, they prefer to express their solution in code, rather than in documents. They would much rather dive in and write code than produce a spec first. At the design stage, when you discover problems, you can fix them easily by editing a few lines of text. Once the code is written, the cost of fixing problems is dramatically higher, both emotionally (people hate to throw away code) and in terms of time, so there's resistance to actually fixing the problems. Software that wasn't built from a spec usually winds up badly designed and the schedule gets out of control.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |