Classes of Software Author

Why not start Saturday with a rant? Not an ordinary rant though – this one is about the way people write software, in particular the class of software that I come into contact with more than any other: embedded device software.

I have concluded that there are different classes of people writing this kind of software professionally. The three I most commonly encounter are:

  1. Software Engineers
  2. Computer Scientists
  3. Hardware Engineers

Each of the three has a place in the software food chain, but it is important to understand where that place is, and what limitations they have due to their background & training.

For example, a person trained as a computer scientist will tend to focus on the elegance of the algorithm. A software engineer will be looking more at how to take an algorithm (or more likely a number of them) and produce an efficient, reliable and maintainable application from it. Hardware engineers seem just throw something together with little care about the algorithm or the quality of the implementation (“as long as it works what’s the problem?”).

So, where do they all fit in the food chain of software? I would like to draw a parallel with other kinds of science & engineering here. In a research laboratory one would generally look to employ top notch scientists to concentrate on new ideas and concepts. I would expect computer scientists to end up in the same kind of role for software. Engineers, of whatever discipline, take the results of the research and apply some specific real-world experience to it to make products that people can rely on. Whether it is bridges, electronic devices or software, the same basic expectation is present: it must work, and keep working. Unlike a research lab. where failure is expected some of the time, in the real world that is usually unacceptable.

What about hardware engineers? Well, to be frank, they just don’t belong in the software food chain. That’s not to say that they shouldn’t be writing software, just that none of the software they write should ever leave the confines of their workspaces. It is odd that a group of people who are so precise and careful with hardware designs (they are engineers after all!), are generally so bad at writing software. I can only put it down to a lack of training.

How can one identify members of each class? Well, there are some tell-tale signs in the code they write (again, these are broad generalisations, so expect exceptions to show up from time to time):

  • Computer scientists seem to avoid comments, rely heavily on language and compiler features, and rarely worry about validation of parameters or error conditions (and when they do, they normally handle it by aborting everything). Alignment, endianess and other ‘hardware-specific’ aspects are just not on their list of concerns (“doesn’t the compiler handle that?”).
  • Hardware engineers might write comments, but not often. They may test for error conditions, but inconsistently, and they will probably abort rather than handling the error in the application. They also tend to ignore indentation, remove as much white space as possible, and will have a tendency to just throw something together first, then make it work afterwards, if possible.
  • A software engineer will tend to work out a design, at least in their head if not written down, will have a defined error handling mechanism for everything, and will avoid the use of ‘clever’ language features and compiler options that might not be understood by everyone, or portable to other systems. The better ones will write code defensively to prevent future maintainers from making mistakes as well (such as always using braces even when there’s only one line in the block, or using parentheses to make the order of expression evaluation clear). Comments will be everywhere, and whitespace will be used to improve readability. Expect to see support for endianess, and care taken with the likes of structure alignment and packing.

Is it really that black & white? No, of course not. There are numerous people who were trained in one of the three disciplines but have managed to cross over successfully. Unfortunately, there are just as many who think they have done so, but really just continue to write software the way they always have.

Many good software engineers studied Computer Science at university, so it is not as simple as looking at the title of the training course they followed. Depending on the university, CS may be a very ‘pure’ course (e.g. Cambridge in the UK) or perhaps a more practical one. There are also courses with names like Computer Systems Engineering, or just Computer Engineering, at many universities now.

How am I qualified to make this rant? Well, if I need to be qualified to rant about something, I think that my Bachelor of Engineering – BEng (Hons) – degree in Computer Systems Engineering from the University of Kent, at Canterbury, UK would be a good start. Then I am also a Member of the Institute of Electrical Engineers and a Chartered Engineer. Finally, I’ve been working with software for embedded systems (ranging from military systems that cannot crash, ever, to consumer devices that people do not see as computers, so do not expect to have to reboot) for over ten years now.

Digital Media Survival Tests

A story on the BBC web site presents the results of some durability testing on digital media cards. They took five formats commonly used in digital cameras – CompactFlash, Secure Digital, xD, Memory Stick and Smartmedia – and then subjected them to a number of tests that would destroy most electronic devices, and defintely destroy regular film!Memory cards nailed to a tree (© BBC News)

The tests that the cards survived were:

  • Dipped into cola
  • Put through a washing machine
  • Dunked in coffee
  • Trampled by a skateboard
  • Run over by a child’s toy car
  • Given to a six-year-old boy to destroy

Having survived all of that, they then took it up a level and tried a sledgehammer as well as nailing the cards to a tree. Unsurprisingly, none of the cards survived these tests!

WRT54G

Been working (as in work-related working) on something rather odd today – replacing the Linux software that comes pre-installed on the Linksys WRT54G home gateway box with VxWorks for a reference platform to send out. Normally when I’m hacking these commercial systems for use as reference platforms and/or eval systems it is either the other way around (replacing VxWorks with Linux), or just replacing the Linux system that is already there.

There’s a lot of information about hacking this platform available on the web, but perhaps the most useful pages were the Seattle Wireless group’s WRT54G page and the WRT54G Single-port Serial Modification page. My small collection of version 2 WRT54G units now have front panel mounted 9-pin D-type connectors.

One odd thing about all of this is that all of the version 2 units came in boxes labelled version 1.1. Don’t know how these guys keep track of the different versions! Comparing the box to a real version 1.1, there is a subtle difference: the real version 1.1 does not have the Wi-Fi 802.11g certification box checked.

Shouka

Sunday we took a trip up to Six Flags Marine World in Vallejo. Since we had a couple of young kids (6 & 8 years old) with us, the big roller coasters were of the list. Instead, we watched a few of the shows – the sea lions, the ski extreme water stunt show and Shouka the new killer whale (see photo).

The entry was half price thanks to a coupon, but it still cost just under $100 for two adults and two children. Even worse, not everything was included in that price – things like the go-carts required additional fees. Of course, the food was expensive and nothing more than fast food options (though they had a pretty good selection of cuisines to choose from).

Other rides? Well, there were the bumper cars, both the featured water rides (on the rubber tyre ride they managed to get me lined up with the waterfall and drenched) and the kids did most of the rides in the Looney Tunes kids area. We did a few more of the smaller rides along the way, and checked out the butterfly house and the walrus area.

Bayport Alameda Update

9am on a Saturday morning is not a time I normally see much of, but today I was outside the sales office at Bayport Alameda along with many other prospective house buyers for the first lottery for houses in the new housing community on Alameda.

Not the most organised event I’ve ever been to (I could have made several suggestions for ways to get the whole operating proceeding much, much more efficiently), but by 10am they had all the numbers in plastic boxes ready for the drawings (one for the next phase of Cove houses, and one for Harbor houses).

The drawings were relatively quick, and the house I was interested in was chosen by the first person drawn, so no new house today. The prices also took a fairly significant jump in price (about 5%) from the previous phase.

There are a number of things about the way that Warmington Homes, the builder, are running this that puzzle me:

  1. Why have these ridiculous lotteries when you have 485 houses to sell? The only reason I can see is that it lets them create artificial demand and pump the prices up.
  2. Why are they selecting the options, and it seems from today’s sale, even some of the upgrades, rather than letting the new home buyer select them – the houses are not even started yet, so letting the buyer decide shouldn’t have any impact on the schedules.
  3. How come some of the houses in the lots being sold today were pre-sold? And how can I get one of those?
  4. Why are they not able to tell people what the options selected for each model being sold are before the day of the sale? For that matter, why not make the prices available too.
  5. Why do I have to keep turning up to the lotteries until I win the chance to buy a house? Surely, I could just put my name on a list along with the models and/or lots that interest me and they could do the whole thing without requiring me to be there?

Just some thoughts. I guess I will be there for the next one too though, so I might be seeing a lot more of 9am on a Saturday over the summer this year.

I have also put up a copy of the n (with some annotations for where the models are, and where today’s lots were). I will try to update it after each sale (assuming I go to them). Also, remember that the reason given for not having this plan as a take-away document in the sales office was that it might change – if I see it has become outdated (or somebody lets me know), then I will try to get a new photo and update it, but no promises there.

Nov 6, 2004 Update: I have added a category for Bayport posts to the blog, moved all the existing posts to this new category and also added a new entry with some info about today, and some graphs of the prices over time for the various plans.

Bayport Alameda

This morning was the special viewing of the new homes being built in Alameda on the site of the old naval base housing: Bayport Alameda. The grand opening is next week, but for those who were registered on their mailing list, and like me have been watching the houses appear, today was a chance to look around.

There are 10 models (9 real ones, and the sales office which is also a model, though much harder to imagine because of the changes made to make it a viable sales office space). Of the 10, the four in the photos below were our favourites (though I could easily live in any of the ten models):

Cove - Malpeque Cove - Trinity
Harbor - Athena Pointe - Riviera

The four models shown are:

  1. Cove – Malpeque
  2. Cove – Trinity
  3. Harbor – Athena
  4. Pointe – Riviera

Amazing Colour Photos

A friend sent me a link to some amazing scans of some colour photos taken by one Sergei Mikhailovich Prokudin-Gorskii in Russia. So what? Well, they were taken almost 100 years ago. The site explains more about the technology that was used to create them, and is also offering prints of the ones that have been scanned so far.

This is an amazing collection, not just because of the technology used to take them, the outstanding scanning and restoration work that Alex Gridenko has done, or even that they are colour photos of a time before most colour photos but because the many of the photos themselves are really stunning.

RSA SecurID for Windoze

While at the N+I show in Tokyo I got given one of the funny little RSA SecurID for Microsoft Windows tokens. Every 60 seconds it generates a new 6 digit number, but as far as I can tell from their website there is absolutely nothing I can do with this freebie.

Perhaps more amusingly, on the rear of the token there is a URL to go to if you find one of these tokens somewhere. That is an old URL, but it does redirect automatically to the new page. There they tell you that if you found it in your office, and your employer uses the tokens, return it to your IT department. If you find it in a public place, or at the office and your employer does not use them, then hand it in. If it is not claimed within a week destroy it!

A final thought… I wonder why people are so interested in making it difficult to login to ‘doze boxes, when there are so many flaws in the OS and the most commonly used MS apps, that really most attackers have no need to login; they just have to wait for the authorised user to do so, and then take over the machine remotely.

Rinku Town & Kansai International Airport

Heading home after a week in Japan. Friday night I find my way to the Kansai Airport Washington Hotel in nearby Rinku Town (we had been to a meeting in the Osaka area, so it made sense to just stay in a hote here and fly back directly from Kansai Airport.

The hotel was OK. The rooms are very small, but everything is new and clean. The only downside to the hotel is that the free airport shuttle stops at 10:23am and doesn’t resume until after 3pm. That means that for me to catch my United Airlines flight departing at 3pm and I needed to catch the 10:23 bus. To make it worse, the UA checkin area doesn’t open until 12 noon.

Kansai airport is new, but as inefficient and confused as most at the moment. The gentleman in front of me had a tiny pair of nail scissors removed from his bag and placed in a large cardboard box by the UA security team. He then carried that box through airport security (where they x-rayed a box with just the scissors in it) without even a question.

On the plus side though I am connected wirelessly for free here at gate 17 waiting to board (SSID: kixmbl) – something even SFO cannot manage – the wireless there doesn’t make it out to the gate areas where most people would actually find it useful.

In about 12 hours I should be back in San Francisco ready to repeat Saturday.

Leaving Tokyo

Friday morning, and after meeting George, an old friend from Wind River who is living part time in Tokyo now, it was off to Shinagawa to catch the Shinkansen to Osaka.

Before leaving, I snapped a few photos from the window of my hotel room, on the 17th floor of the Century Hyatt, and also one of the train as it pulled into the station (rapidly).