On Stable Software

Some interesting thoughts from Michel Martens on Ruby Rogues on simplicity in software:

  • The reason software is often bloated is that we judge software by its adoption rate. And the easiest way to make software more popular is to make it solve a lot more people’s use cases. Thus, we drive software developers to make their products more and more complicated.
  • Sites like Ruby Toolbox judge software by (among other things) how often it has been changed lately. Therefore it penalizes simple, stable packages in favour of complex, ever-changing ones.

If we really want well written, stable software, we are going about it the wrong way.

Compiler Design in C

Many years ago, I read a wonderful book called Compiler Design in C, and the author, Allen Holub, has now made the full text available on his web site. Even though the code is horrendously out of date and probably doesn’t even compile nowadays, it’s really easy to follow along, and it gets results quickly: by page 30, you have a working compiler for a simple language, and the rest of the book fleshes that out for increasingly realistic scenarios.

Definitely worth a (re-)read.

Remembering Menya

Ten years ago today, on February 13, 2001, Menya died, a victim of metastatic breast cancer.

I will always remember how in 1996, after chemotherapy, surgery and radiation, her first thought was to start a support group and web site, ibcsupport.org, so people could get better information than was available in books. And how in 2000, while she was in treatment for a tumour in her brain, she started bcmets.org because there wasn’t an online group at the time that made people with metastatic breast cancer feel welcome.

I will always remember how she fought with doctors, passionately arguing her case, and winning most of the time through sheer persistence – and how she inspired other people to do likewise.

And I will always remember her last months, blind, speechless, and unable to control most of her body; reduced to a wasted heap of flesh on a bed.  All she wanted was to die, but the days of defeat stretched out forever without joy.

I have come to dread each October, with its regimented optimism, its tyranny of cheerfulness, and its pink ribbons that are forgotten by half way through November.  I feel for the women I know who have metastatic breast cancer, most of whom will die from it and whose researchers receive pathetically small amounts of money from the major fundraising organizations.

I’m not sure if there is a point to this, except to commemorate the tenth anniversary of the death of a tragic heroine.  Menya believed that you are not properly dead as long as people remember you, so if you want to do something nice today, please read some Menya anecdotes and remember her fondly.

PHP vs Java: responding to bugs

About a month ago, someone found a bug in PHP that caused it to hang when you used certain floating point numbers.  People were outraged, but a fix appeared the next day.

It turns out that the same bug happens in Java, it was reported to Oracle 3 weeks ago, and there has been no response whatsoever.  Not that Sun was much better in this respect, but the response to bugs says a lot.

Reminds me of the infamous F00F bug in Intel processors circa 1997, which Linux had worked around before Intel even acknowledged the problem.  I seem to remember everyone talking back about how open source saved the day and should be the way of the future.  How we fail to learn…

Sleep patterns

I don’t really like the term “hacks” as a synonym for “tricks” or “secrets”, but here are some good sleep hacks (2Mb PDF):

  • Be consistent about the time you wake up
  • You can reduce the amount of sleep you need gradually
  • Don’t drink caffeine in the afternoon or evening (BTW, hack 16 is the famous Caffeine Nap)

Mirror Image

Why does a mirror reverse left and right, but not top and bottom?  You’d think that if there was any symmetry to the universe, it would work both ways: my left-right axis is at 90º to the mirror, as is my top-bottom axis.  Why don’t they both change?

The answer is that the mirror doesn’t rotate left-right or top-bottom.  It switches front and back – pushing your face back through your skull and out through the back of your head.  But your mind wants to interpret it as a rotation, as if you had walked around the back of the mirror and turned to face the observer.

Feynman explained this pretty well.