Devicescape Software, Inc.

Today, Monday January 17, 2005 marks the day when Instant802 Networks, the company I joined around 18 months ago, becomes Devicescape Software.

A few people around the SF bay area might have already caught sight of the yellow sweatshirts sporting the new company marketing device (they were handed out at a private launch party last Thursday held at the Bubble Lounge in San Francisco). The photo on the right is a clue as to why the rotated letter ‘e’ is the ‘icon’ over the name. You’ll find similar shots on the new website, though perhaps none as good as this one 😉 That said, next time I will remember to clean my keyboard before taking photos – you can see the dust on the top of the power button if you look closely! [Hint: you’ll probably want to click on the photo to get the larger version before looking for this.]

Ritz PV2 “Single Use” Cameras

For a little while now people, myself included (though intermittently due to other committments), have been working on getting the newer Ritz PV2 cameras unlocked so that they can be used as cheap digital cameras. This is not so much because they have stunning image quality (most, if not all of us have much, much better quality digital cameras already). Part of it is for the challenge. For me though there was also an element of being able to give a cheap camera to a couple of young kids I know and have them play with photography.

The PV2 is ideal for this since it has an LCD (enabling them to see the photo they’ve just taken immediately), it is cheap (no real loss if it gets broken), it runs on standard AA batteries and it was designed to survive well enough to be recycled by the store (and they are in a pretty tough plastic case).

Recently, there has been a bit of a breakthrough and the camera can now be reprogrammed a little bit so that an easily available Windows (and Mac OS X for that matter) driver can read the photos from them and reset the counter to zero allowing the camera to be used again. You can get more information about this from a number of places:

I’m sure I’ve missed some. Almost all of those pages have links to other sites though so keep following them. There’s a lot of information out there. The I-Applicance forums are perhaps the most up-to-date, but they can be a little difficult to follow these days since there is so much activity there.

Election Technology

I decided not to comment on the political aspects of the latest US Presidential election in my blog, but one thing that has been bugging me for the last few days is the poor quality of the technology that they use to collect and count the votes in what is their most important election.

Firstly, there were all the debates about the lack of a paper trail on the fully electronic machines. I don’t even know why this was a debate. It seems to me to be obvious that a paper receipt should be printed. It is odd that nobody debated this for ATMs or lottery ticket machines, but when it comes to something as important as voting there is a question about the need for a receipt.

Next, a couple of my colleagues voted using the optical scanner machines. They did get a paper receipt, but not one that verified that the machine had read their selections correctly! The California lottery terminals work on a similar scheme (you fill in the circles with a pen and machine ‘sees’ those marks), but the lottery folks felt the need to not only print your selected numbers on the receipt, but also to remind you to check them before leaving the store. Why was this basic step missed from the optical scan voting machines?

Then, today I read an article at Wired about machines in North Carolina losing votes because they could not hold as many votes as the manufacturer (UniLect) claimed. So, why did the machine not stop accepting votes when the limit was reached? My ATM manages to stop trying to hand out cash when it runs out; the same ATM will tell me that it is unable to issue a receipt when it runs out of paper too. How come this basic resource monitoring was not part of the machine’s design? That’s not the end of it though. Why was the machine not tested by the county officials before the election? Surely, testing the maximum number of votes it can hold is one of the acceptance tests?

Don’t get me wrong, I think that fully electronic voting machines are the way forward, but I also recognise that there needs to be a proper audit trail and proper controls over who has access to the machines and the software that they run. A number of web sites (e.g. http://www.thudfactor.com/voterfraud/) have shown how easy it is to rig an election using an electronic machine. What was not stated so clearly was that it is also possible to design one that with appropriate testing, and a proper audit trail, can do the job fairly. Here’s my simple list of requirements:

  • A printed duplicate receipt with details of the selections made, and a transaction number. One copy goes to the voter, the other is kept in the machine, much like a cash register in a store.
  • The software needs to be separate from the data that describes the choices that can be made. This means that the software company cannot know in advance what the choices will be, nor the order in which they will be displayed.
  • The machines need to be thoroughly tested before every election, using the exact software that they will be running on the day, and the exact data set that they will be using. If they contain a real time clock, it should also be set to the same date and time as the start of the election (to avoid the possibility that the software will change its behaviour based on time & date information).
  • The machines should have votes entered into them until they stop accepting votes. Also, they should stop accepting votes if the receipt paper runs out or anybody tries to tamper with the machine during the election.
  • Finally, at the end of the testing the paper copies of all the votes should be counted to see whether they match the electronic count.

The advantages of electronic voting are obvious – touch screens that can display information in a number of languages as well as walk the voter through the election one choice at a time, rather than presenting them with a form to fill in, should make it much less likely that the voter will accidentally make the wrong choice. It is up to the software industry to make them demonstrably reliable so that the voters will trust them. Maybe this is one case where importing a machine might be a good idea too (that way the manufacturer will be less likely to have an interest in the result of the elections it will be used it, something that was clearly not the case with at least one US manufacturer).

Comments?

Fake iPod Generation 5

Fake iPod Generation 5An article at Gizmodo talks about the fake iPod shown to the right. They provide a link to the full size ‘ad’ image too which includes a spec. While this is clearly a joke, I would have changed a few things to make this more realistic:

  • Drop the Dragonball CPU in favour of a high speed ARM or XScale CPU, perhaps with Jazelle Java acceleration technology built in.
  • With such large hard drive, there’s no need to have so much flash, but at least 256MB of RAM would be handy. Perhaps even more.
  • For wireless support, include 802.11n Wi-Fi or even WiMax for always-on wireless access (at least in metro areas, where one or both of these technologies might be used to light up a whole city).
  • Add USB host support to get the photos off my camera and on to that HD while I’m travelling. Better still support for doing this over a wireless link, but that requires my camera supporting Wi-Fi or Bluetooth – and the one I have now doesn’t have either option 🙁

They are spot on with the OS though. There is no reason at all, at least not once you move to a real CPU, to have a port of the BSD/Mach based Mac OS X on a handheld device like this. I run the Familiar distribution of Linux on my iPaq which has a much lower spec than even today’s PDAs and it works just fine. NetBSD proves that BSD can be ported to many platforms (they claim more than Linux, though that must be getting close now). Why not have Mac OS X on a handheld?

[If folks over at Apple are reading and like the idea, perhaps I could do the port for you – I have been porting operating systems to embedded platforms for much of my career!]

Software Patents

It has been a busy week for the patent lawyers out there who are trying to extort money for what they claim is an invention, but is in reality only another arrangement of binary bits in the memory of a computer.

Top of the list, at least in terms of headline grabbing appeal, was the Eastman Kodak vs Sun case over Java. Kodak, the company known for photographic products, attacking one of the premier server companies, Sun, over a freely available object-oriented programming environment, Java? Yes. Seems that Kodak gained three patents when it acquired Wang Laboratories a while back, numbers 5,206,951, 5,226,161 and 5,421,012. These relate to certain aspects of object-oriented programming, and a jury in Rochester, NY decided that Java infringed them. Kodak was planning to ask for over $1B in damages. You can read more about this in an article at Groklaw.

In a surprising turn though, Sun has settled with Kodak out of court for $92M (less than a tenth of the damages Kodak was asking for). So, what some were hoping would become the test case that got software patents off the books again, seems to have escaped quietly.

In other patent news, Acacia, a company of lawyers that buys patents with the sole intention of “enforcing” them to make money, has acquired a patent from LodgeNet it believes it can use to extort money from wireless hotspot owners. An article at Wi-Fi Networking News has more information on this one. This is one of two patents in the area of browser redirection, the other being held by a company called Nomadix. Many believe that both of these are essentially worthless though as there were other browser redirection systems up and running before either one was filed with the patent office. One such claim comes from Jim Thompson, former CTO and VP of engineering at Wayport, who claims that Wayport had their portal up and running before the LodgeNet patent was filed. He also goes further in claiming that the idea is ‘obvious to one “skilled in the art”‘ – i.e. something that does not belong in a patent in the first place.

It is not all bad news though. Much less widely publicised was pubpat.org‘s success in getting all claims in the Microsoft FAT patent rejected in a re-examination. So, if you know of a patent that is clearly bogus, especially one for which there is well documented prior art, send all the information you have to the folks at pubpat.org and perhaps they can get it overturned. Even better would be to get the whole concept of software patents (and their close relatives the process patents) back off the books, but I don’t think that is likely to happen without a high profile test case, like the Kodak vs Sun one could have been.

Running Linux on an iPAQ

IBM has posted an article on its developer site about running Linux on an iPAQ.

I have had my iPaq, a 3835 model that I picked up cheap in an online auction, running Linux for a couple of years now. My installation is now a bit out of date, but it runs happily with my Linksys compact flash Wi-Fi card in the sleeve. It is a little bulky by comparison to the newer models (mostly because of the need for the sleeve to get the CF slot).

If you have an iPaq that you no longer use on a daily basis, either because you have moved on from the whole PDA scene, or simply because you have upgraded to a newer model, running Linux on them can be a fun experiment. Not something for the novice yet though.

If you want more information, check out the excellent resources at handhelds.org. You will find all the software you need there to save your PocketPC installation and install Linux, as well as detailed instructions for every supported model.

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.

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.

Embedded Systems Conference

Not much to report from this year’s embedded systems conference really – there was nothing that really leapt out as significant. I did manage to snap a few photos though:

Notice the huge amount of empty space at the Wind River booth. Not sure what they were trying to achieve, but I heard many more negative comments about it than positive ones. The best one was the quip that they had simply “increased the footprint and reduced the content.”

Giveaways were certainly much harder to get this year – and I didn’t see any t-shirts at all (though I did hear that one place did have them). The place did seem busier than last year though which might be a positive sign for the embedded industry.

Linux Smartphones

Motorola has a couple of Linux based smartphones: A760 and A768. Check out the photos of the latest model, only available in China at the moment, on the excellent LinuxDevices website – a must-read for anybody interested in embedded Linux.

Motorola is not alone either, an earlier story on the same site describes NEC’s 3G Linux-based phone.

Of course, to put this in context, these phones are hardly low end devices. According to this article about the Motorola A768, it has 96MB of RAM. That’s more than I had in my desktop PC just few years ago. Still, these phones should prove that Linux can certainly fit into places where PocketPC and PalmOS can go, and bring all the advantages of a relatively robust process model OS.