The Code Whisperer

Practical, on the ground advice for efficient software development

Archive for the ‘Software’


36 Common Software Development Mistakes

I’m a big fan of Steve McConnell’s Rapid Development book. Although the title suggests that it covers a new trendy method of software development, in reality it provides plenty of tips and suggestions for any method of development. In the book Steve lists 36 classic mistakes made during software development that will adversely affect the delivery of the project. Often these mistakes are made in an attempt to reduce timescale or bring back the delivery date, but they make matters worse.

I’ve picked from Steve’s list and my own to produce the 36 Common Software Development Mistakes:

People

  1. Undermined motivation
  2. Weak personnel
  3. Uncontrolled problem employees
  4. Heroics
  5. Adding people to a project
  6. Poor office environment
  7. Relationship between developers and “customers”
  8. Unrealistic expectations
  9. Lack of project sponsorship and buy in
  10. Lack of user input
  11. Politics over substance
  12. Wishful thinking and blind optimism

Process

  1. Over optimistic schedules
  2. Insufficient risk management
  3. Third-party failure
  4. Planning failures
  5. Wasted time during the “fuzzy” front end
  6. Skipped or inadequate requirements and design
  7. Inadequate testing
  8. Insufficient management controls
  9. Missing tasks from estimates
  10. Catch-up later
  11. Code like hell programming
  12. Insufficient coding standards and development process documentation
  13. Insufficient code reviews
  14. No defect tracking tool

Product

  1. Requirements gold-plating
  2. Feature creep
  3. Developer gold-plating
  4. Push-me, pull-me negotiation
  5. Bleeding edge development

Technology

  1. Silver-bullet syndrome
  2. Overanticipated savings from new tools
  3. Switching tool mid project
  4. Lack of source control
  5. Lack of automated build process and tool

Over the coming weeks I’ll be looking at each of these in detail.

MeWare

There’s an interesting posting on Eric Sink’s blog called Yours, Mine and Ours. It places software into one of four categories:

  • MeWare: The developer creates software. The developer uses it. Nobody else does.
  • ThemWare: The developer creates software. Other people use it. The developer does not.
  • UsWare: The developer creates software. Other people use it. The developer uses it too.
  • NobodyWare: The developer creates software. Nobody uses it.

You’ve probably used, seen or heard about software in each of these categories.

I’ve taken over producing the racing results at the sailing club I’m a member of. The chap that does it has been doing it for a long while and has developed an application to help. Most of the hard work in turning the hand written sheets produced by the race officer into 1st, 2nd, etc for the individual race is taken care of by a spreadsheet application at the club house. I get a printed sheet from the spreadsheet, plus the original sheets and sign on sheet. I then use the results application to collate the individual race result into results for the various series that go on through the summer. The application produces HTML and text files for the website and club magazine.

The results application is meware. Written in C over the last ten years at least it’s written to do one thing and one thing only. No mouse control, text interface and littered with keyboard commands. The first time you use the application it is a nightmare. It’s not intuitive, finding functions isn’t straightforward and there’s the nagging doubt that the data hasn’t been saved. However, after a few weeks of struggling, the beauty of the application becomes apparent.

  • It’s small (424Kb) and very fast
  • There’s no unnecessary features, everything in it is used
  • No major features are missing
  • It matches the way the sailing club runs its race series perfectly
  • Entering via the keyboard is quick, selecting via the mouse does slow the process down
  • There’s a very good help document

I’ve been interested and involved in motorsport for many, many years and I’ve often surprised when looking at a race or rally car in detail how good it looks from a distance and how “odd” it looks close up. When I started rallying myself I found out why. The car is simply built around the driver (and co-driver for rally cars). The gearstick is bent at the right angle, the pedals are moved and the seat bolted to the floor. Anything that isn’t needed is removed. Trim panels are discarded and the wiring loom is left on show. It’s fast and it’s perfect for the driver. Just like meware.

Would I change the results application? Of course, notably I would like to be able to generate HTML files for every race series set up not one at a time, but this would probably save only one minute a week (although it should be said that saving time isn’t everything, preventing a mistake is a strong driver too). Significantly the club is trying to manage better the flow of information from the membership database to berthing and racing, which will necessitate a change and, I suspect, a new application that more people can use straight away.

I’m not suggesting that we only develop software with a meware mindset, that clearly wouldn’t work for applications that cover a broad range of users, but there are some pointers here for niche applications:

  • A lean application is a fast application to use
  • Extra features take time to write and test and may have little use or not save the user much time. However also look at whether the feature will prevent a mistake being made
  • Match the application to the manual process before or after. For example if the user enters data from a form, make sure the order of the data is the same as that on the form
  • User interface controls such as list boxes and check boxes can get in the way of productivity. Make sure keyboard control is always an option
  • Provide good quality help information, whether built in or a simple document

Backing Up

I really hope this is a topic you can ignore, but I’m going to cover it anyway.

In the late 1990’s I was involved in a major project for a prestigious motor manufacturer. Having very good cashflow they weren’t adverse to spending a bit of money, so I was horrified when I found out that the source control server, with 6 months worth of design and development work on it, firstly wasn’t being backed up and secondly wasn’t in the server room but in the development team’s office situated under an air conditioning pipe that had developed a leak.

Let’s have a look at some data loss scenarios and how they could be recovered from, assuming the appropriate backup policy was in place:

Developer checks in the wrong code
Roll back to the previous version in the source control system. No loss of work.

Developer loses or corrupts checked out code
Revert to the previous night’s backup, loses up to one day of work.

Developer machine corrupt
Re-image the developer machine, get the latest source from the source control and restore the previous night’s backup, loses up to one day of work.

Source control server corrupt
Restore the source control from last night’s or later backup. Checked in code since backup may reside on developer’s machines. Worst case scenario is that each developer loses one day of work each, although this is highly unlikely.

Office destroyed
Build new source control server and restore the source control content from the last off site backup. Build new developer’s machines using image of developer’s machine held off site. Get latest source control on to developer’s machines. The amount of work each developer loses depends on how often backups are sent off site, but this could be as little as one day.

This last scenario is drastic but does happen. To be honest if the office has been destroyed there will be other factors to consider, but with the right backup strategy and a trip to the computer retailer you could be up and running really quickly.

With backing up across the Internet now available and very cheap, it’s possible to build a backup strategy that offers maximum protection with the minimum of fuss. Backups are only important to people when things go wrong, so generating them must be as effortless as possible.

Here is our backup strategy:

  • Source control exists on a server in our office. Code is checked in as soon as possible provided it compiles
  • The source control repository are backed up across the Internet to Data Deposit Box. The Data Deposit Box software runs on the server and detects changes to the repository, extracts, compresses and encrypts them, then securely transfers them to their secure data centre where they are stored in encrypted form
  • Source code changes not checked in are backed up at the end of the day to a file server in our office. The developer’s machine has backup software that backs the files across the network and then shuts the machine down. This backup also includes Outlook PST files
  • Other files such as documents and images are held on network file servers never on individual workstations. Documents and selected other files are backed up to the Data Deposit Box servers using the same technique as for the source code repository
  • A disk image of a developers machine has been taken and is kept on a file server
  • Copies of virtual machines are kept on the file server and backed up from developers machines weekly
  • File servers are backed up completely to external hard drives, which are stored off site
  • USB memory sticks are used to hold backups of this blog, software and licence information for developers products and the latest release code for our products. These are backed up to a files server and tend to go everywhere with me
  • Software installation CDs are kept in a fire safe in the office

I believe this is a pretty comprehensive backup strategy and with the use of Internet backup I’m confident that we could be up and running in a different office in a matter of hours if total disaster did strike.

Free Windows Search Tool

Agent Ransack in action

Free Windows search tool Agent Ransack in action

If, like me, you’ve been frustrated with Windows search not handling all file types then take a look at the oddly named Agent Ransack.

In addition to simple searching, Agent Ransack can search using regular expressions, making it substantially more powerful than the Windows standard search.

A highly recommended addition to your developer’s toolkit.

Creating PDF Documents

In 2005 my good friend Mark Evans and I had a stand at the NEC in Birmingham’s Classic Motor Show. Mark was launching the DVD to his latest series on Discovery RealTime An MG is Born, and I was launching our Restoration Manager software.

We had quite a large stand and wanted to have large images of the MG’s restoration and a Restoration Manager cover shot. Having found a company that could produce images on foam boards at a realistic price, I set about producing PDFs of the images. For various reasons to do with producing a large PDF with good quality images, this turned out harder than expected, until I found pdfFactory from FinePrint Software. Since then I’ve used pdfFactory exclusively and have recommended it to several of my private clients.

However, I was away from the office and needed to convert a Microsoft Word document to a PDF and didn’t have access to my trusty pdfFactory. A quick Google and I found Doc2PDF Online, which provides a free service converting files under 2MB to PDF format, which it then emails to you. I was so impressed I used it to convert the Generic Coding Standards posted yesterday.

Please note I have no connection with these two companies or recive any benefit in recommending them - I’m just a happy user!