Monday, April 24, 2006

Day 356

[reading: Dave Sim, "Church & State I"]

I guess I'm starting to have a bit more respect for graphic designers—Anne and I spent about two and a half hours this morning tweaking and fine tuning the layout for some business cards. I think the end results are rather good, but it took a huge amount of time—it was almost an evolutionary process: we'd randomly generate a large number of different designs, and then pick the least ugly each time round, until we evolved an attractive business card.


I also spent a bit of time playing with embedding version and build information into the binaries for the product. I'd previously added a tracing framework and embedded $Id$ information (for ident) into the code; with a judicious combination of
  • preprocessor hackery (for__DATE__ and __TIME__) to embed
  • static global objects in each source file, whose constructors register information with
  • a Singleton object (to get around the problem of arbitrary order of initialization of global C++ objects), whose contents enable
  • tracing out the build information when trace files are flipped, which in turn needs
  • recursion protection (to prevent a flip which triggers a trace of build info which triggers a flip which triggers a trace which triggers ...)
I think I've now arranged things so that every trace file starts with a dump of the version information and build date for all of the objects. Which will be useful if things go wrong in the field. Not that that will happen, of course.

In the end, my code changes only amounted to around fifty lines. I guess that for software, I've got the experience to know exactly which fifty lines are needed; for graphic design, a proper designer would have the experience to know precisely what tweaks to the layout are needed and would look good.

No comments: