Skip to main content

Posts

Showing posts from February, 2012

You are not here not reading this post...

Some days it's hard to really appreciate what a software developer is or does. And I have "been one" for over a quarter of a century and I still don't know what I do. I can translate management speak into meaningful English and then understand what "they need" as opposed to "what they think they need." I can translate "business requirements" into an internal mental model composed of data stores and processes and subsequently translate that model into "working code" in any language you care to mention to produce a "deliverable". But... I still don't truly understand what happened along the way. I think it is more to do with the underlying nature of the universe rather than the mechanical processes. Codds rules and normalisation for instance, one can learn, understand and apply these rules to great effect but what does "de-normalisation to 2NF" mean to a bunch of atoms and molecules which don't

Sherlock Holmes and the "Case of the Errant Erlang Macro"

The compiler dutifully informed me that: case error_logger:logfile({open, ?IMP_LOGFILE} ) of was giving out: /imp_scan.erl:137: syntax error before: '}' ...and boy did I end up scratching my head until finally, applying Rule #1 (you spelled it wrong) coupled with the Holmes conjecture I realised that (a) I was indeed wrong again and (b) the compiler was correct and here was the problem: -define(IMP_LOGFILE,"/tmp/impscan.log"}). Yes, having decided that the string was best made a constant I refactored the code and accidentally left the trailing closing brace in the macro, hence my confusion! The error message was referring to that brace but because the parameter was itself a tuple I had become confused. Just another day on the job. PS: As I like to call it, the "Holmes conjecture", How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth? .