Duplicate Code

visionmobile.gifVisionMobile has a great article on the 100 million club"the watchlist of mobile software products which have been embedded on more than 100M handsets"

The part that got me thinking was…

"In fact, there are phones with three (yes, three) separate instance of the same vector graphics engine, which could be employed as an engine for menu animations, one for graphics within an game and a third instance which may be exposed to developers."

There’s also another problem with phone software that also tends to manifest itself in all large software systems. Developers for some reason (probably ease of understanding for themselves) like to create new code rather than use existing software. This causes lots of sets of code in the phone that essentially do the same thing. This wastes memory (ROM), is often a waste of effort and causes yet more software that needs to be maintained over time.

I have worked on lots of mobile software over the years. Operating systems, middleware and applications. Here’s my top 10 list (in no particular order) of things that developers like to re-invent…

  • String (text) handling
  • Logging
  • Base64 encoding and decoding (converting binary to text for transmission over textual protocols e.g. email)
  • xml handling
  • application protocols (e.g. http)
  • graphics/sprite handling and rendering
  • time handling
  • error handling
  • event processing
  • and of course code build systems to build code
So if you are a mobile developer about to create yet another one of these these things - think again - it’s probably already been done!

Comments are closed.