20130410

Occam's razor


Eric Isaacson programmer par excellence

Occam's razor in the vernacular might be "Keep It Simple Stupid!".  William of Ockham was a 14th century logician and Franciscan friar. He wrote in latin but, roughly translated, Wikipedia has it as a principle of parsimony, economy, or succinctness used in logic and problem-solving.

I try to apply the principle in my work as an electronics design engineer. I often use Microchip PIC processors in my designs, mostly 8-bitters, and typically code in assembler. Recently I have tried my hand at 'C' (just the ANSI flavour) - apparently it is the "way to go" and, anyway, one's hand is forced by the need to use C-friendly libraries.  But I hate the verbosity and obfuscation of 'C'. What requires little thought and a few simple statements in assembler can consume hours of research and require far more typing in 'C'. In short it contravenes Occam's razor.

OK - I like the way 'C' encourages good structure and offers ready made functions to save one having to re-invent the wheel. But couldn't these good things have been provided in a simpler, more intuitive way? So I figured I would create a new language and call it 'Occam' - but I am too late - Occam already exists but is not at all the 8-bit job I was looking for.

'C' poses itself between low level (i.e. assembler) and high level languages. It's not that I have anything against high level languages - they have their place - just that I hate unnecessary verbosity, and not only in the field of programming.

Long ago in the heyday of MSDOS I purchased and used A86, an assembler for the PC. The author Eric rightly claims that A86 "is the finest assembler available, at any cost under any terms, for the Intel 86-family of microprocessors". No painful setup red-tape is required - you write your assembly statements, assemble and, hey presto you have an executable.  That's as good an example of Occam's razor as you'll get.


Shalom is often translated as 'peace' but means much more - well-being, completeness, wholeness, health, soundness, tranquility, prosperity, fullness, rest, harmony, the absence of agitation or discord. How is 'shalom' encoded in brain neuron-patterns?  Similarly, a high level programming language command like "draw a 3D cube with rendering" – who cares how it is encoded? Except that you do care at the hardware level I work at. I care about every bit and every micro-second and, for some applications, only assembler will fit the bill.

2 comments:

  1. How come you didn't mention Tintin? I thought he had something to do with Occam's razor? :D

    ReplyDelete
  2. I can neither remember any such connection nor find anything on the subject online - so tell me more!

    ReplyDelete