BinaryClock still is undergoing an update cycle-the main work is almost done, all we need is FontBucket. Things that made the maintenance process easy were covered a few days ago-now we look at stuff that makes updating difficult:

Duplicate code
Functional programming has its merits when creating maintainable code. If all code doing x is in one location, modifying x to do y is easy. You just have one place, edit that, recompile and the changes are done.

However, when code doing x is spread all over 10 files..have fun finding all instances! Number one, it is next to impossible to find all the instances. And even if you manage to find all of the instances, you will still loose hours and hours of work…

‘Unmanaged’ globals
Please don’t take this post as support for all the antiglobal fetishists-but Globals can be a major nuissance if defined in 20 different files…

A good solution is globals gathering, but more on that another day!

Dumb header structure
Headers are one of the best parts of C-when used right. However, once one has a bunch of 20 headers including into different files at random, the juice is cooking when maintenance is concerned.

If I add x to header y, will this affect file z? The solution here is easy-have a “common” header for all the files, and subinclude the other headers into the main header. Then, all files just contain one include..the one that leads to the main header!

Feel free to share your updating experiences!

Related posts:

  1. Updating software painlessly – the BinaryClock updater speaks up
  2. On procedure/file headers
  3. Software exorcism review
  4. HiRes+, DIA and PenInputManager.h for OnBoardC
  5. Initialize your structures, it may save your back

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

© 2012 TamsPalm - the Palm OS / web OS Blog Suffusion theme by Sayontan Sinha