I recently came across this article about something called ‘The Galahad Principle’, in contrast to the ‘Pareto Principle’.

I frequently find myself settling for 80% solutions: most of the time, it’s good enough, and the extra energy needed to get it to 100% is simply not worth it. I can be remarkably flexible when it comes to working around these last 20% of a lot of things! But that post also remarks upon something that I recognise: only when you’re at 100%, you can trust ‘the system’ completely and do not need to expend energy for a workaround every time.

Two weeks ago, I attended Agile Camp NL, and I had a blast! I only knew the organisers vaguely, so I had some socialising to do — which I’m not very good at, but somehow the environment was very conducive to making new friends. And we were helped by some of the ice breaker excercises. Since the theme of the ‘camp’ was the agile way of working, we had to answer the question ‘what makes your way of working agile?’ in duos.
My workplace claims to be agile, but is actually pretty static and locked-down, so there’s not much agility in what I do in the office. But I thought of how I use routines in my daily work.

Saying you’re agile because you use routines is kinda weird (which is why it’s such a good icebreaker), but if you follow the Galahad Principle, it makes sense. For instance: we have cats (as you all know), and every day we have to clean the kitty litter. The bag of dirty litter goes into the trashcan, which is outside our back door. The back door has to be locked when we go to sleep. And there is a heavy curtain in front of the back door, which we close on cold winter nights to better keep the warmth in.

We have set up a routine, which goes as follows:
– The door is not locked before the kitty litter has been cleaned (nothing so frustrating as standing with a bag of dirty litter in your hands and having to rummage through a drawer for keys — not to mention the (un)hygienic aspects of doing so);
– The curtain can’t be closed before the door is locked (otherwise we can’t see that the door hasn’t been locked yet and we might forget it).
We follow this routine 100%. So if the curtain is closed, we know that the kitty litter is done and the door is locked, so we do not have to do anything else with the back door when we go to sleep.

And having this routine actually saves a lot of time and energy, precisely because we can trust it — because we follow it 100%. If we had followed it only 80% of the time, it would have been useless. And the time saved means we can expend that energy to something else that needs doing.
Automate the boring stuff away, or create a routine and keep yourself to it, and spend your (mental) energy to stuff that matters.

(Also: I still need to write up all of the awesome sessions I attended at Agile Camp, but I’m also behind on the course work for the RPG Writer’s Workshop, and that has priority for now.)

Washing and drying hands

If you’re not one of the 16% of people who don’t wash their hands after using the toilet (and thus get poop on their smartphone), you will have to dry your hands afterwards. andrewducker linked me to a TEDx video on how to dry your hands with a single paper towel.
I can verify that it works: we have the tri-fold type in the office, and my hands were dry after doing this. You should start using this method too.

And if you’re one of the icky people who don’t wash their hands, remind me of that fact when next we meet — I’ll avoid shaking your hand or handling your phone.

PSA for the EEs

Remember people: www.maxim.com will take you to the website of the men’s magazine ‘Maxim’, which seems to make a sport of photographing women with as little clothing as possible without them being naked.

On the other hand, www.maxim-ic.com will take you to the site of the Dallas Semiconductors label ‘Maxim’, which makes such fine products as the MAX232 level converter or the MAX6954 and MAX6966 PWM’ing LED drivers (which they have graciously agreed to gift me with, so that I may evaluate their utility in my commercial products).

I must lead a sheltered life, becuase I was all ‘WTF is this shit!?’ when I typed in www.maxim.com and didn’t get to the site I was expecting.

Teach me Seymour!

The people that I know, know a lot. Sometimes I am able to tap in their collective minds via direct queries, but that only scratches the surface of their knowledge on a particular subject. Most of that knowledge has been acquired as the result of a personal interest, not as the result of formal education. In fact, most of that knowledge can’t be acquired through formal education.

Wouldn’t it be cool if we found a way to share this knowledge more freely? Wouldn’t it be cool if we could stage a series of lectures or workshops in order to allow other people to further their knowledge about a certain subject?

Subjects that I could teach or inform about are:
– Search engine internals;
– Microcontrollers and other digital electronics;
  – Embedded systems and DRM;
– Build and maintain your own hardware;
– Programming
  – in Visual Basic;
  – in Prolog;
  – in PIC assembly;
– Databases, datamodelling and SQL;
– Roleplaying games.

Are there things on this list that you would want to know more about? What is your list of things you could teach?

When you design a database, you should always normalise your tables. I myself stop at 4NF, and this habit has served me well in all these years.

People might whine that normalised tables are ‘harder to casually analyse’. That argument is nonsense. Sticky notes and printouts are for ‘casual analysis’ — a database is for the cold, hard facts.
People might whine that joins are hard to do. These people need to teach themselves SQL in a hurry, and stop complaining. Lack of skill is no argument to do things in improper ways.

Yes, you will get more tables, and you will have to do some extra joins. But the advantages far outweigh the disadvantages:

  • Your domain analysis will, of course, be a little harder and take a little longer, but this is a good thing. It forces you to think the domain over, to check and double check with the domain experts — and this ensures that you don’t get any nasty surprises later on because you overlooked something.
  • You don’t duplicate data. This means that it is much easier to keep your data consistent. I think this is actually the most important advantage.
  • Your data is stored ‘atomically’. That is, a single object/concept occupies a row in a single table. This itself has it’s own set of advantages:
    • It is easier to create new relations between objects later on;
    • You can change a single table independently of the rest of the tables, as long as you don’t change any columns that are used in relations.

Modularity is a Good Thing, and this also applies to databases.

The main argument against normalisation is performance. Joins are expensive (in terms of CPU cycles), but not overly so. If you run a website or application where database performance becomes an issue, there are a few things you can do to speed things up:

  • Look at where you can add indexes (hint: the fields on which you join are prime candidates for that);
  • Consider defining views or stored procedures for multi-join statements. These procedures and views are stored in ‘compiled’ form in the database, meaning that the execution plan is already in place by the time you do your query;
  • If you need some data that can only be generated by an iterative process (which SQL is ill-suited for), then consider creating a table to hold this (non-normalised) data. A scheduled process could fill this table with data gained from the normalised tables. Of course, your application should never write data in this table: the data in the normalised tables is The Truth and therefore leading!

Normalising the tables in your database makes things so much easier. Trust me — it always pays off in the long run!

Note that, if you have baked a pizza at 200 degrees for just over 10 minutes, the oven turns itself off when you take out the pizza and there is no time left on the timer.
If you subsequently shove in another pizza and turn the oven back on again, it will not magically select the previously set temperature, but the maximum temperature of 250 degrees.

Adding 50 degrees to the heat when baking a pizza and not shortening the baking time will result in black smoke. Most smoke will stay inside the oven — so by the time you smell it, it is already too late. Opening the oven will release the smoke, resulting in coughing and watery eyes. Also, the burned smell will linger for days.

Just so you know. Use this information to your advantage.

Don’t ask me how I know this.