Category Archives: Self-help

Know why

One of my two favorite go proverbs is this:

If your opponent has all four corners, you should resign.

On the go board, it is easiest to cover territory in the corners. If you have given all four corners to your opponent, you are probably losing. The advice is clear, concrete and to the point.

My other favorite is this:

If you have all four corners, you should resign.

Again: clear, concrete, to the point. And seemingly the exact opposite of the first proverb. How can they both apply?

Suppose you play against a better player. When you take the corners, your opponent takes something else, otherwise she wouldn’t give the corners to you. Even if you are leading in territory now, she will use the influence she gained elsewhere to surpass you.

The same deed has a different result when the doer is a master. The master knows why.

Busy tone

I like Kindle’s lack of features. I read a book and after I have finished one, I order another from the Kindle Store.

Not so with iPad. Every moment I use it I am aware of the possibilities: I can check my email and answer them. I can browse the web. I can play games. I can read books. I can check Facebook. I can check Twitter. I can browse pictures.

I descent into opportunistic curiosity hedonism. Behind every link is new information. Every moment is a moment of choice: what shall I do next? Even when I start to get bored, the hardest decision is to put the iPad down.

This morning I woke up earlier than usually and surfed the web with my iPad. Now my head is spinning and it is hard to concentrate on anything. I tried to write a blog post on a different subject but I just couldn’t organize the thoughts in my head. Part of my brain is still giving busy tone.

I’ve often wondered what causes my behavior. Perhaps I learned in my childhood, when information was scarce and I immersed myself into books, that all information is valuable. My first web experiences were immensely rewarding (and no, I don’t mean porn this time). Perhaps the kids of today have intuitively learned to devalue raw information, and don’t suffer from this problem. I hope.

Back to the routine

I did an experiment in September: I started a new blog and wrote a blog post every weekday. I used 30 minutes on writing each morning and published the post right then without much editing.

It was a success: I wrote every day and many of my writings I am proud of.

So I continued the experiment in October but decided to (a) improve the quality and (b) spend less time on it. So instead of putting half an hour on it every morning I would use 45 minutes three mornings a week. I would structure that 45 minutes so that the first 30 minutes was for writing a first draft and the rest for editing the piece. I also dedided to use some of the mornings to editing my September posts and re-publishing them on this blog or Leonidas blog.

It didn’t work.

Routines need to be easy to follow. Doing something every day is easy. Doing something every other day is harder. Going from 30 minutes to 45 minutes was psychologically hard. It felt like I didn’t need to do anything at first because I had 15 more minutes.

I was also vague to myself about what I actually wanted. Was this an experiment, a learning tool, or did I want to produce my best work? When goals are vague, one feels a pressure to reach all possible goals, but doesn’t feel the drive to reach any of them.

In short, I made my morning routine more difficult than I was ready to handle. I want to wake up, need what I need to do, and get out of the door. Trying to write a perfect blog post is not something to start a morning with.

So in November I am back to my original schedule: one post every weekday, written in 30 minutes. I make one change however: instead of posting on Antti Learns to Write, I will post here. The dichotomy in my head between quick posts and quality posts is unhealthy. Life is learning and this is me. My goal is to write every day, write as well as I can, and publish after 30 minutes. Real artists ship.

(Not) coping with multiple projects

I haven’t posted in a long time. The reason is that my mind has been elsewhere. I’ve had a lot to do on other projects and I could not put enough effort on blogging. (There is another reason, but I’ll deal with that in a later post.)

I am not a very efficient multitasker (although, who is?) so I instinctively shun away from multiple projects. Through experiment and experience, I’ve developed an understanding of my internal project portfolio rules. Here they are, put into words for the very first time:

  • I can have one primary project.
  • Concurrently to the primary project I can have one secondary project.
  • There are no tertiary projects.
  • Secondary project cannot have a deadline.

The rules are descriptive, not prescriptive. That is, this is my understanding of how I work, internally.

Sometimes I don’t listen to my internal voice and try to disobey the rules. What happens then in my head is a redefinition of projects until the rules are satisfied again. This often happens implicitly, with bad consequences.

Say, for instance, that I am working on a primary project and a secondary project within the limits of my internal rules. A third project comes along that I feel is more important than either of the two. I put my energy into it, and magically, one of the other projects drops away, without me even noticing it.

A dropped project is no longer a project — it is just a thing I am supposed to work on, a thing I have lost my passion to do. Automatically, I try to avoid it, and if I absolutely have to work on it, my mind is elsewhere. Whatever the result, I will not be proud of it, since it is not my child anymore.

My best strategy to deal with these rules is to have one long project (primary or secondary) overlapping a lot of short projects (of the other variety). The long project keeps utilization high, and the short projects ensure that many projects finish. Incidentally, it makes sure I have time to write the blog as well.

Play your moves

If I had to play an even game of go against Takemiya Masaki, I would lose. I could have three hours of thinking time per move, he five seconds, and he would still beat me.

Takemiya has a master’s intuition and I don’t. His moves just work, and it looks like magic to me. No amount of elaborate scheming could turn the game to my victory.

Asked what amateurs should do to get stronger, Takemiya said: “It’s very important to play what you feel. It’s best not to think of the difficult parts of go or to worry about it too much.”

You cannot train your intuition if you worry about what your teacher would play. When confronted with a choice between the “right” move and the move that you like the best, choose your move.

When you play your move, you are excited and your heart pounds quicker. The worst that can happen is that you lose the game. The worst that can happen? No, the best! You have learnt something, and your hormones help you to remember it. Your intuition is a little closer to perfection.

If you only play other people’s moves, you will never know why (and if) they are the correct moves. Worse yet, you learn to ignore intuition, your most important tool.

Software design is not unlike go.

Every methodology I’ve come across has, at its kernel, a very small section labelled “do magic here”. — Katie Lucas

The magic is using your intuition. You can create a first-class design if your intuition is good. Otherwise it is like playing an even game of go against Takemiya Masaki. No amount of time will be enough to win you the game.

No amount of time? Well, obviously, if you are five years old and have a knack for go, by training for twenty years you may become as strong as Takemiya.

Similarly, to design great software, you should train your intuition first. Read books, learn from others and above all, play your moves.

Love of abstractions

2-3 Turing machine

Once, when I was seven, my teacher gave the class an assignment to draw a picture of a bird. We used wax crayons and the teacher told us: “Be sure to use colors on every part of the picture. There should be no white on the paper when you finish.” I set out to draw the most beautiful bird I could, but I soon found the task Herculean. I pressed as hard as I could, but tiny spots of white always remained within the strokes of my crayon.

At the end of the lesson, I had barely managed to fill a dozen square centimeters with satisfactory saturation. The only color I had used was the blue of sky, as I had had no time to shape the bird yet.

I found it deeply unjust when the teacher disapproved my attempt, and congratulated pupils who had completed their drawings with a lighter hand.

Fast-forward twenty-two years.

I spent the last two weeks of my summer holiday at the European Go Congress. This was my first tournament in over two years, so I didn’t have high expectations. I ended up winning six games out of ten, which I was very happy about.

I adore this game. The way high-level concepts emerge from simple rules is very similar to how numbers form beautiful patterns in mathematics.

Come to think of it, this is almost the definition of fascinating: complex behavior arising from simple systems.

This is what draws people to computer science, and this is what draws them to go.

As I did twenty-two years ago, I still find it natural to start thoughts from a blank slate, with no presuppositions. When I am given a set of rules, I intrinsically consider them to be complete – even though I don’t follow all rules quite as literally as I did back then.

I am thankful that I have a hobby and a job where this trait of mine is a strength instead of a weakness.

“There is a better way to do this.”

There are three wrong reasons not to use this sentence.

  • You haven’t considered any alternatives.
  • You are certain that the current way is better than any alternative.
  • You think talking about alternative solutions is a waste of time.

There is a good reason: when your audience already knows that none of the above is true.

Truth is shorter than fiction

I want my blog to have three qualities:

  • Quality, because the only noble goal for a blog is to improve the signal-to-noise ratio of discourse.
  • Sincerity, for the same reason.
  • Regular updates, to not lose either of my readers.

Consequently, I am going to try a new blogging format: exactly five sentences, at most one image and at most one code sample.

The 15 minute noodle soup

Sunday evening. It is +3 ºC and raining: a fitting weather for the last soccer session of the summer. So when I come home, I am wet, cold, and starving.

I strip out of my dripping clothes and step to the kitchen. I don’t turn the lights on since I haven’t installed curtains on the kitchen window, and I don’t want old ladies oogling at me in my underwear. I take a bowl of noodle soup from the fridge and put it in my microwave. I press the one-minute-button twice, see “200” – meaning two minutes – on the display, and press the start button. I then go to my bedroom and turn the TV on, just in time to see a dancing dog in Finland’s Got Talent.

Fifteen minutes later I remember my soup, and go to the kitchen.

The microwave is still on! I have overcooked a noodle soup by 13 minutes on full microwave power!

Luckily, after I clean the microwave, everything seems to be okay. I am surprised how little damage that amount of cooking does to the food. Instead of noodle soup I get fried noodles. Which is actually better, since I own a fork. All my spoons are in a box somewhere on the Baltic sea.

The microwave

So, how did it happen?

Well, I just bought the microwave. It looks nice. It looks simple to use. It is simple to use. Unless, of course, you try to use it to heat food for a time duration of your choice.

The machine has six buttons, a LED display and a door. The thing that tricked me is that the three time buttons and the power level button all look the same. I remembered that the three time buttons are 10 minutes / 1 minute / 10 seconds, so I pressed the second button from the top. Bzzzt! The power level button is on the top, so I pressed the ten-minutes button instead of the one-minute button.

Another problem is that there are three digits in the display that needs to display four digits. So it cuts out a digit. When I am entering time, it displays ten-minutes, minutes and ten-seconds. It shows things like 03.2, meaning 3 minutes and 20 seconds, not 32 seconds, which is the way everyone will read it. To make matters worse, the heating countdown uses minutes, ten-seconds, seconds format. There are two modes in the display with only a small dot to make a distinction between them.

To recap, I thought I pressed the one-minute button twice, but I actually pressed the ten-minute button twice. I thought the display said 2.00 but it actually said 20.0. I thought I would get soup, but I actually got fried noodles.

The control panel

Now, if this were all, I would say this is just bad design. However, it is only a beginning.

  • There are five different power levels, but no ways to tell which level is active. Imagine you are heating multiple portions of the same food, and want to use the same setting for all of them. You enter the power level and heat the first portion. Now, are you still on the same power level or some other one? Can you just enter the time or do you have to re-enter the power? My guess is that the power setting resets to the maximum after each heating, but the only way to know for sure would be to test it.
  • There is an enter-the-weight-of-the-food-instead-of-the-time mode. It’s used for thawing and I guess it can be useful if it works. (I haven’t dared to try.) The button that says “One minute” now means “one kilogram”, the display now shows kilograms instead of minutes, and so on. That is merely confusing. The real problem is, there is absolutely no indication that the interface is in the special mode. The two modes look exactly the same! Only after you press the start button might you notice that the amount you entered wasn’t time but weight.
  • When you make a mistake, which you will, there is no way to take it back. There is no Cancel or Reset button.
  • Ok, I lied. There is a button that says “Start/Reset”. The tiny print under the button says “Press and hold to stop.” If you think this means that pressing and holding let’s you take back a mistakenly entered time amount, think again. Reset only works when the microwave is heating food. When it’s not, it’s just a start button. So when you press it to correct a mistake, you are actually committing it.
  • The display is always on. When it has nothing else to do, it shows zeroes. This is annoying in many ways: First of all, you get the feeling that the microwave is waiting for something, before it considers its heating duty finished. Secondly, it feels like you have forgot to set the time or it’s midnight. Thirdly, it feels like the microwave makers are conspiring with the electricity company. And finally, it’s just damn irritating.
  • The door button is so rigid that I have to use two hands to use it: one to press the button and the other to keep the microwave still. When I want to heat something, I need to put it down before I can open the door.

There are probably others I haven’t noticed yet. You see, I have only used the microwave four times so far.

I believe the designers made a bet of how many usability problems one can fit into six buttons, a led display and a door. The winner is a genius. If only he used his power for good.

mikro3.jpg

You might be wondering why I bought that microwave oven instead of any other. Here’s the story.

I have few requirements for a microwave oven. 98% of my weighted use cases are covered if the microwave warms fast food fast. The user interface needs only one dial, the time dial. I don’t need a power dial. I am a man. I always use the maximum power.

With this in mind I went to the local appliance store and said “I want a good microwave”. The helpful clerk showed me the selection of about ten microwave models. They had bells, whistles, pre-timed multi-heating dual-mode programs and whatnot. The choice came down to the two simplest. One you already know. The other was a model with similar features but with a plastic casing and an interface made of dials instead of buttons.

I wanted something that fits my other kitchen appliance, so I chose the metal-cased button-interfaced microwave. With only six buttons it looked elegant. And as we all know, elegance equals usability. I believed I bought the easiest-to-use microwave in the store.

Sigh.

Usability is much more than just looks. What matters is the interaction. Hiding a complex interaction behind a simplistic interface just makes it worse. Great interfaces are simple because the interaction is simple. In this case the interaction of entering time, choosing a power level and having a secondary mode was just too complex set of features for a six-button interface to handle.

The role of the interface is to remove ambiguity from the actions of the man and from the responses of the machine. The interface failed me and my microwave, because it didn’t let us express ourselves clearly. It is like having an interpreter who only knows ten words.

Incidentally, I am not the only one grumbling about microwave interfaces.

Decisions

Everything you do has two parts: the decision making and the manual labor. For example, when you are coding, you first decide what you want to write and then you type it. Often the two parts are so intertwined that it is not practical to separate them, other than conceptually. When you start typing a function you rarely know exactly what you will write. Instead, you continuously make small decisions as you go.

The decisions are the important part. A well-trained Neanderthal could do the typing. But to do the right decisions you need skill and experience.

An obvious way to improve productivity, then, is to add the number and impact of decisions. There are a number of ways:

  1. To give more room for decisions, reduce the time spent on manual labor. This is the virtue of laziness, as popularized by Larry Wall:

    Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so that you don’t have to answer so many questions about it.

  2. Many decisions are not important but they have to be made. Naming conventions are a good example: when choosing between CamelCase versus ALL_CAPS in constant names, the actual choice doesn’t matter as long as one of them is used consistently. To improve the impact of each decision, let someone make these less important choices for you. Use an existing pattern, or a framework that has reasonable defaults. David Heinemeier Hansson thinks this was one of the main reasons for Rails’ success. Rails has made the choices so you don’t have to:

    Rails is opinionated software. It eschews placing the old ideals of software in a primary position. One of those ideals is flexibility—the notion that we should try to accommodate as many approaches as possible, that we shouldn’t pass judgement on one form of development over another. Well, Rails does, and I believe that’s why it works.

    With Rails, you trade flexibility at the infrastructure level to gain flexibility at the application level. If you are happy to work along the golden path that I’ve embedded in Rails, you gain an immense reward in terms of productivity that allows you to do more, sooner, and better at the application level.

    […]

    One characteristic of opinionated software is the notion of “conventions over configuration.” If you follow basic conventions, such as classes are singular and tables are plural (a person class relates to a people table), you’re rewarded by not having to configure that link. The class automatically knows which table to use for persistence. We have a ton of examples like that, which all add up to make a huge difference in daily use.

  3. Distribute decision-making. If a tech lead makes every decision by himself, he ends up using his valuable developers as Neanderthal typists. The better way is to push the decision making down to the developers. They have the best understanding of the code base. If they also have an easy access to customers they are in the best place to make many of the decisions.

And after writing this, I now realize these are all instances of the same advice: make each decision only once. Essentially, I just repeated the DRY principle three times. Ironic, isn’t it?