Wednesday, June 18, 2025

A modeling problem with communication

I subscribe to the view that to be a successful thinker you need accurate mental models of the surrounding world. With an accurate modeling apparatus you can predict how the world will react to what you do. This includes other humans.

I believe, perhaps mistakenly, that this is especially true when communicating with fellow human beings. Perhaps that's why I greatly prefer one-to-one chatting over the plenum.

On fostering understanding

For instance, to talk to somebody you need to know which language they speak. You can't speak Italian to many people in Denmark, or vice versa, and expect to be understood. If you're an expert in something, and know the other person is too, you can use technical terms or slang.

This is true to an extremely detailed level.

For instance, my coworkers are software developers, so obviously I can talk about editors and programming languages and libraries of software routines with all of them.

But not all of them are subject experts in the system I mostly work on. I can use terms from that system with those that are, but not someone who is not.

Even further, if I worked on something yesterday with a person, we can talk about that, using concepts we developed yesterday. I can't have that kind of conversation with anyone else in the world.

So in other words, to improve communications you need a better model of others - the root of misunderstandings is that we don't realize what others understand.

But the problem may not be you

Yet I had an epiphany during a sleepless bout this night that I have been missing something important.

It even seems really obvious in retrospect: When I say something, I use my internal modeling to predict whether my conversation partner will understand my intended meaning. When they reply, they use their model of me.

So the problem might not just be my model of them, but also their model of me. If they have the wrong model, we may be in trouble.

Now what kind of trouble?

As long as it is merely a problem of terminology, I can try to infer some meaning or ask follow up questions.

But even though I've been using terminology as an example, succesful communication goes much deeper - sometimes we can't really talk about something without a shared understanding of values.

For example, I have deeply held beliefs about grading being incorrect, that is assigning simple absolute scores to people's performance being essentially a bad practice. I've arrived at those over time, through observation and a developed set of arguments. Yet it is not something I can easily talk about.

Say someone actually loves grading. Perhaps they got good grades in school and are proud of that, or perhaps they enjoy sports - competition is, unfortunately in my opinion, an integral part of many sports, and many of those competitions are basically made by grading, assigning an absolute score for comparison purposes.

This in itself does not mean we can't talk. I don't generally have a problem with people liking something.

But if somebody loves grading, their base model of other people may be that they like grading too - why not? So their model of me may be that I love grading too. Oops.

So as we speak about it, I don't react in the right way. I might nod and signal that I understand, but I might not smile, I might only be slightly sympathetic, to basic appeals to how getting a good grade has felt, because I have tried long ago to separate those feelings from an overall judgement of the systemic view of grading. The person may claim that without grading they would not have had the motivation to do what they achieved, and I might not even nod there, because I would have second-level thoughts about what would have occured under a different motivational regime.

Yet, in the revelation of such deeply hold belief it would not be polite to trod out a long-winded argument of why grading might be incorrect.

As a consequence, what that person sees is that I don't react in the way they would expect from their model of me, for impenetrable reasons. That's annoying! We easily end up in conflict.

The other person's model of you is wrong 

When communicating with other people there's the danger that you assume they are too much like yourself, so you get the model wrong.

But not even that, there's also the danger that they assume you are too much like them, and get their model of you wrong.

You can try to work on yourself to mitigate the former. But how do you mitigate the latter?

I guess you need to figure out some way of efficiently having them arrive at a better model. If they even bother, it may not be important to them.

Or perhaps try to work around their misconception. Pretend, act out the part, and then work from there.

Oh, well, at least my model of others now include the concept of their model of me. Only one recursion level deep at the moment, though.

Tuesday, May 2, 2023

When six becomes seven

I woke up in the night, really tired, hearing Janne rummaging around. Two weeks before the due date.

If she doesn't go to bed soon, she's probably in labour, I thought. A few seconds later she woke me up with the news that the water had broken.

So I called for help, and we went to the hospital. A few hours later, our fifth child, a daughter, was born.

Janne bled too much at the previous birth, so this time they drugged her immediately, and it did seem to work, so we could go home a few hours later by the bus.

Both are fine. It's been five years since our previous child, so I've almost forgotten how cute they are as small babies. And how quickly they go from looking around to a sour face and a cry. The rest of the children have received her well. Good times.

Tuesday, January 31, 2023

Tao Te Ching

I've been reading through this translation of Tao Te Ching which I really enjoyed. Like this, on the trouble of inner mud:


The ancient Masters were profound and subtle.

Their wisdom was unfathomable.

There is no way to describe it;

all we can describe is their appearance.


They were careful

as someone crossing an iced-over stream.

Alert as a warrior in enemy territory.

Courteous as a guest.

Fluid as melting ice.

Shapable as a block of wood.

Receptive as a valley.

Clear as a glass of water.


Do you have the patience to wait

till your mud settles and the water is clear?

Can you remain unmoving

till the right action arises by itself?


The Master doesn't seek fulfillment.

Not seeking, not expecting,

she is present, and can welcome all things.


Friday, August 26, 2022

On problem-based learning in primary school

I watched a passionate TED talk about problem-based learning in primary schools.

The university I went to followed this model religiously. 2/3 of our time was spent on semester-long projects. It works. The average time to complete a comp.sci. master's degree at this university was 5.0 years, where the average in other traditional universities in Denmark was > 8 years when I last looked at the numbers.

Besides the benefits mentioned by the speaker in the above video, there can also be a strong social aspect in being divided into small, tightly-knit groups where people would help, motivate and look after each other - and learn how to forget their egos in the name of making the project work.

Thursday, September 23, 2021

Bicycle pedal care

I mostly get around on bicycle. I'm a bicyclist in the sense that it is my primary means of transportation, but I'm definitely not an enthusiastic bicyclist in the sense that I want to spend time on my bicycle. I want my bicycle to be as care-free and as cheap as possible. Yes, these two can easily be at odds, but they can also go together. For instance, some of the low-weight, high-speed bicycle gear is definitely not care-free.

Now when it comes to the pedals, there are a couple of things I've learned from 20 years of maintenance.

Which ones to buy

First, there are two kinds of cheap pedals. There are the ultra cheap ones that claim to be completely sealed, hence needing no maintenance.

This turns out to be a lie. The sealing means that it is really difficult to maintain them, but it does not stop water from leaking in and ruining the oiling of the ball bearings.

It took me some years to understand how, but I think it's simply a basic physical property of the metal that when you apply pressure to it, it will flex just a tiny amount, and that tiny amount is enough to let water in when you're bicycling in wet weather.

So eventually, the drive train starts creaking, and it turns out it's the pedals, and then it is really difficult to get any kind of greasing into them, so you end up having to buy new ones. I thought for some years that this was okay, due to the low price. But for me it's really just cumbersome (buying stuff takes time) and distasteful to have to discard a big lump of metal each year.

And it turns out there is another kind of cheap, just slightly less cheap, pedal which allows you to remove the end cap that faces outwards so you can easily get to the ball bearings. That end cap is not under pressure, so I don't think it makes the pedal more leaky, but it does make it trivial to get the ball bearings re-oiled. So these pedals last a lot longer.

Preventive maintenance

One thing I did learn is that pedals is a wear part. In retrospect that should not be surprising, after all it's the main interface for transferring power from your body to the bicycle. So you need to be able to take pedals off, even if it's just for oiling.

Unfortunately, pedals can get stuck pretty hard on the pedal arms. It probably does not help that many pedal arms are made of aluminium while the cheap pedals are steel, so they tend to grow fond of each other.

So, first, when you screw in pedals, give the thread a bit of oil to try to prevent the metals from exchanging electrons.

Then, and here comes the repetitive part, each time you fix something unrelated on the bicycle, take a wrench, give the pedal a nudge so it is no longer tight, and tighten it up again.

You don't need to tighten it hard. So if you are a strong, independent, fair-skinned, but not pale, okay, perhaps somewhat pale, computer scientist like me, and do this a couple of times a year, it should untighten with a little nudge, no trouble at all. The whole procedure takes 10 seconds per pedal plus two minutes to find the wrench and put it back.

Wrenching pedals

The fun thing about pedals is that they turn around as you pedal. And if you think about it, they don't turn the same way with respect to their axle, since one axle is pointing to the right and the other to the left.

Now someone, and I suspect this happened early in the history of the pedalled bicycle, figured out that the spinning motion is great on the right side as it will tend to tighten in the pedal screw. At least when you pedal forwards, which I think we sort of standardized on.

But on the left side, the spinning motion will tend to unscrew the pedal. So on the left side, the thread is flipped so that it also gets to enjoy this tightening goodness. As a consequence you need to wrench the pedal the opposite direction on the left pedal - it has a links (left) thread, not a right one.

So this is why you don't need to tighten the pedals more than a gentle nudge, despite the forces involved in pedaling.

It also means that left and right pedals are not interchangeable. They are usually marked with L(eft) and R(ight). If you don't pay attention to this, you can easily destroy the thread on a soft aluminium pedal arm.

As for the wrench itself, back in the day, there used to be very little space between the pedal and the pedal arm so people would have special, thin pedal wrenches. Combine that with stuck pedals, and you would be sure to have a sad experience.

But all the cheap pedals I've bought over the past 15 years have had plenty of space for a standard 15 mm wrench/spanner, which I also use for the bolts on the back wheel axle. So no need for special equipment.

Wednesday, August 4, 2021

Daniel Schmachtenberger and civilization

I recently came across this interview with Daniel Schmachtenberger which I really enjoyed, partly because it concerns something I find myself spending more time thinking about, partly because of the absolutely attractive view of human that he is show casing through his attitude.

There are things in our modern life which we should be proud of, things that have been developed over centuries by us and the people before us. The internet is one example. Another is our governance structures, the refinement of which has prevented much suffering.

But there are also things that are dark. The are things that cause people suffering in new ways. Loss of meaning of life itself, replaced with void or empty consumerism, and loss of even the meaning of work. Corruption of the information that feeds our governance structures. Appraisal of comfort over long-term planning. Self-centered competition over compassion.

Daniel Schmachtenberger has the interesting take that our culture makes a difference to who we are. And even if we find it difficult to control ourselves and our emotions, we can change our culture and our environment.

Wednesday, June 26, 2019

Consumerism and alienation

Came across this quote, which is really one of the reasons my children are in the Waldorf kindergarten and school system:
“The relatively new trouble with mass society is perhaps even more serious, but not because of the masses themselves, but because this society is essentially a consumers’ society where leisure time is used no longer for self-perfection or acquisition of more social status, but for more and more consumption and more and more entertainment…To believe that such a society will become more “cultured” as time goes on and education has done its work, is, I think, a fatal mistake. The point is that a consumers’ society cannot possibly know how to take care of a world and the things which belong exclusively to the space of worldly appearances, because its central attitude toward all objects, the attitude of consumption, spells ruin to everything it touches.”
― Hannah Arendt, Between Past and Future
I don't think consumption itself is a problem. The problem is the attitude - if there is no thoughts about production, no consideration at all, then the result is a complete alienation towards the world. It is like existing in a prison, getting everything spoon-fed.

Monday, May 6, 2019

Danish blog

I finally got around to dusting off some notes I have taken over the past year or so and got my Danish blog published. I intend to use it for Danish things that just seem pointless to blog about in English, but it is currently mostly about the local Waldorf/Rudolf Steiner School that my oldest son attends.

Thursday, January 31, 2019

What a dumb thing to say

Have you ever witnessed a stranger remark something and thought it to be a dumb thing to say?

I sometimes ponder that kind of sayings years later and realize that I was wrong: I was in fact the dumb one.

I couldn't see why it made sense at the time, either because I was not experienced enough, or because I was stuck in a certain mindset, or just didn't give it enough thought.

The world is beautiful
These days, realizations like these make me incredibly happy - the world suddenly grows more beautiful. 

And it can off-hand remarks, not intended to be deep, but just a reflection of a large sum of experiences.

For instance, one of the adults in the kindergarten my children attend once explained to me that you cannot really change the children in the kindergarten. They are who they are. But you can help them be the best version of themselves.

That really stuck with me. I think it sums up how to approach other people - we should always help them be the best version of themselves. Imagine a world where your partner, colleagues, managers, customers, students, shop assistants, everyone had the aim of helping you be the best version you could be in a given situation.

That's beautiful.

And the ability to see this is truly one of the gifts of growing older. I can understand things I couldn't understand before.

And when I get surprised by people who I believe should think better saying something that does not seem right, I try to spend my brain cycles on why they'd reach that conclusion rather than how wrong they are.

I'm finding that works really well when trying to come to terms with politics. Today I'm more interested in the politician than the party.

Internet culture
I love reading, I guess I am really a curious person. The internet is full of forums with people discussing all sorts of things, in great detail, donating their personal time to illuminate the rest of the world with their arguments and experiences, from a point of view that is hard to reproduce. For instance, I don't know how it's like to be an 18 year old girl. Or an investment banker.

But seeing things from their perspective is valuable. And I have participated myself too. Over the years, I must have written several thousands of posts here and there.

The interesting thing is that for me, replying makes the man-that's-dumb mistake harder. I don't like being wrong, so once I start a reply, somewhere an unconscious part of me starts wondering if I am really right, or whether there could perhaps be meaning somewhere in the words that seem so dumb.

In the end I often end up not clicking the submit button.

In some cases I have gone ahead, only to realize months later, to my great agony, that I was in fact the dumb one.

But when I then go back and look at the discussion thread again, I can see that often, it's not really a case of two people being stupid to each other, but more a resolvable failure of communication.

As I grow older and start condensing hard-earned truths myself, I'm starting to experience it from the other end - people who obviously think what I say is dumb because they do not appreciate the context. It can be really annoying if it's people I care about.

I need to work on my communication.

The reverse situation
In some sense, the reverse situation is much worse. I and everyone else think something sounds profound and correct and smart, only to realize, years later, that it is in fact pretty dumb.

When I do that myself, I'm somewhat happy that I can now see my mistake. But honestly, seeing other people do it makes me depressed.

Friday, February 16, 2018

When five becomes six

Janne woke me up saying she thought now was the time. But she wasn't sure. She had a few false starts, keeping her frem sleeping.

She did sound so as if this was different, though, so I started calling for help. She also called the midwives at the hospital who apparently didn't quite believe she was going to give birth yet.

Just before the help arrives, Lys woke up, so I had to comfort her. When I get up, Janne is weird - apparently she's less and less sure. But the rest of us think it's better if we just go, so we arrive at the hospital 15 minutes later where the midwife examines her and concludes that she's ready to give birth as soon as the water breaks. Not long after, our fourth child is born, a son.

He's a bit blue but alright.

Unfortunately, Janne's uterus doesn't contract itself properly, so she looses too much blood, almost 1.5 liter they think, so there's a little emergency until the staff manages to get it to stop, partly by medication, partly by pushing down on her stomach.

They then kept her for a day for observation before releasing her and the child. That's now just about four weeks ago.



We're going to call him Dag - "day" in English.

Saturday, December 9, 2017

Emotions and intuition

Not yet done with my layman journey into thought processing and intuition, my model is as follows: Thinking intuitively, you first acquire experience, probably mostly through trial-and-success/error, then let yourself pattern-match the situation at hand against this experience.

Now the funny thing is that, at least for me, when I need to evaluate several options, the way this pattern matching gets communicated up through the system is in many cases through emotions.

What I think is the right path makes me more calm and happy, whereas a path which I for some reason have had a bad experience with or expect to have will make me more anxious. Which actually makes sense. But it can come out in an incoherent way.

Incoherency

For instance, our course teacher at university in software management, an experienced and well-honed practitioner and pragmatic thinker once told us a story about a project which he ended it with a tired expression and the remark: "Just thinking about how to work with that is just almost unbearable."

I think what he meant to say was that going along that path would be long-winded and tedious. But what I actually understood from this was much simpler: his intuition had decided this was the wrong path and sent him a bunch of negative emotions instead of an honest, objective assessment. We didn't get facts, we got a tired expression.

Intuition can be right, and I certainly believe it was in his case, but bad at communication so you may end up with the wrong set of arguments for why. Which is not surprising if intuition is a complicated, haphazard pattern-matching process.

Now if the arguments are ideas, you can use logic to examine them and quickly discard those that are bogus, but it's much harder to work with emotions.

Emotional decision-making

While I believe that intuition is really powerful, much more powerful than logic when it comes to coming up with ideas and making decisions, emotions are certainly not something you want to be in control of decision making.

Emotions tend to make us, well, emotional.

There is a purpose to emotions. Hunger makes us look for food, excitement makes us focus and endure hardship, indifference or lazyness makes us conserve energy, fear makes us careful, affection makes us bond and mate, and hate and anger makes us defend ourselves and punish destructive antisocial behaviour.

But these are primitive mechanisms. You can see a house cat take a liking to the occupants of the house or a dog get angry at someone passing by too close to the territory. A person following only emotions is like an animal.

Emotions are simply not sophisticated enough devices. Following them makes for shortsighted decisions, although, ironically, they may serve a long-term goal - love for instance is certainly necessary for the survival of the human species.

Detachment

So while I'm still a firm believer of the power of intuition, I think it's important to be able to detach from the emotional aspect to get anywhere. So not get emotional, but instead listen to the conclusion and try to figure out if it is guided by experience or if it is simply an artifact of who you are.

This is to me a three-way paradox. Intuition can provide the answers but not explain them, emotions can communicate the answers but at the risk of leading straight into an emotional and uncooperative dead end, logic cannot provide the answers but perhaps offset the emotions and help dig up an explanation from the intuitive depths.

I don't think you can be an effective thinker without emotions, despite emotions being in some sense the antithesis of thinking.

As a side note, I think I should clarify that detaching oneself from an emotion is a tool to use in certain situations. Much of the joy being a human comes from immersing oneself in emotions. It's just that when it comes to making important decisions, it may be better to set aside the immediate joy, or fear for that matter, and look into the future. Even if you hate that person, is it really a good idea to act on it? Or even if you love that person, is it truly best for you to act on it? Maybe your fears are unfounded?

Tuesday, November 14, 2017

Accepting

Tonight, as I was dual-wielding my 1-year old daughter Lys as she was supposed to fall asleep, yes, I was holding both of her hands, at her request, I suppose it gives that extra 60% of comfort or something, I got thinking about the transformative experience it is to have small children.

I think that the experience eventually wears off, although I would assume some residuals are always left. But I can't say for sure yet. Lys will be 2 years old this February but she isn't our latest child, unless you only count born children.

For me, the transformation is mostly about accept, of my own situation and that of my children.

For instance, I can't control even basic necessities in my life - like sleep. Not if I am to take care of my children. The moment I might need sleep the most, I may not sleep well for next week if one of them is ill. That's just the way it is.

But that part is sort of trivial. Much more interesting is the uncontrollable human situation.

Hurting

An example is hurting people. Let me start with myself: as I held my daughters hands tonight, it struck me that I'm inadvertently hurting my children all the time. Why?

Well, it's just impossible not to. Physically, it's like a human in an elephant house in a zoo, the difference in size is just so big that the small party is going to take a hit sometimes. I going to trample a toe or scratch an arm when I swing them around giggling.

But also emotionally, it's just so hard to understand where small children are, and I don't always have the time or concentration or mood to even try to be there. And as is obvious with three children, sometimes someone has to let it go. We can discuss and think about priorities and what's the greater good when we find ourselves in a conflict, but in the end someone must chose a path. That's just the way it is.

Being mean

But it gets worse. There are so many ways to hurt other people, to be mean to them. I have yet to see a child who doesn't occasionally try out most of the obvious ones. And despite my children being, in my opinion, generally lovely, lively and relatively reasonable, they have too.

I try not to let them get away with it, but I don't control them. You can't control other people, and my children are definitely, albeit still in a small manner, people. Nor should I. Talk is cheap, leading by example is not. They need to understand and choose for themselves.

So, as I parent, I will watch them be mean to each other and to other children and vice versa. That's just the way it is.

Accepting

For me, the transformative part comes about because of force. Before being a parent, there are many aspects in life where I could maintain an idea of how things should be, possibly an illusion, but still. But it's no longer about me, only, and I find myself being forced into accepting things that I don't, at the outset, like.

In this accept, I've started to see some things that I haven't understood before, not only in small people.

You can't accept something without putting preconceived notions or what I think of as morality aside. Morality, even if well-founded, like the pretty obvious idea that you should never hurt others, is really one-sided in its emotional nature. Once morality enters, it calls for an immediate action, clouding cool judgement. So X hit Y. Shame on X!

Now my examples may have been somewhat dramatic, but honestly I don't think those are terribly deep. I may witness a child of mine being mean, but I'm not going to like it and will try to find a reason behind and do something about that.

What I have accepted is that this is human nature. And this accept of the human nature has opened some doors for me in much deeper territory.

I'm finding it easier to read about politics (and send an occasional email to a party), to understand and learn from the Waldorf kindergarten and school that we've ended up sending our children to, to work with people.

How much is visible from the outside, I don't know, probably I'm just tired and grumpy. But it feels different.

Tuesday, June 13, 2017

Some ways to get probabilities wrong

An interesting set of paradoxes in probability.

Some of them are somewhat mind-boggling.

It's too bad school doesn't generally teaches us enough to get the intuition right.

Friday, March 24, 2017

Lys' vuggevise/lullaby

Despite not having blogged much for the past years, or rather, not writing down many blog posts, because I do in fact have had a lot of blogs composed inside my head, I sometimes wish I had a Danish blog for stuff that only makes sense in Danish or for Danes.

This is one of them. For reference, here's someone singing an original version, with gestures (apparently the text is by Oskar Schlichtkrull and music by Finn Høfding). Obviously, when trying to get your baby daughter to sleep, you don't do any gestures.

Lys' vuggevise v. 3
Gentle, deep voice

Jeg har en flyvemaskine,
den har vinger på.
Du kan tro at de er fine,
for de er malet blå.

Og når jeg flyver om natten,
så tager jeg lygter på.
Der er ingen der kan ta' dem,
for hvem kan himlen nå?

Min mor, hun sidder og strikker,
og hun har lovet mig:
Den dag der ik' er flere masker,
flyver hun og jeg.

Min far, han ligger og læser.
Men han har sagt til mig:
En dag hvor vinden rigtig blæser,
flyver han og jeg.

Min kat den sidder og spinder,
for jeg har lovet den:
En dag hvor solen rigtig skinner,
flyver vi afsted.

Jeg flyver hen over havet,
jeg flyver over land.
Propellen har jeg selv lavet,
den kør' så hurtigt som den kan.

Og mens min motor den brummer,
så kigger jeg op og ned,
for at se om der er andre folk der flyver,
så'en en dag hvor solen bare bli'r ved...

Here's a rough translation:

I have a flying machine,
it has wings on.
You can believe they're so fine,
because they're colored orange.

And when I fly at night,
I put the lights on.
There is noone who can take them,
because who can reach the sky?

My mum is sitting and knitting,
and she has said to me:
The day she's out of stitches,
she and I will fly.

My dad is on the couch and reading.
But he has promised me:
A day where the wind is really blowing,
he and I will fly.

My cat is in the window purring,
because I've promised it.
A day the sun is really shining,
we will fly away.

I'm flying over the ocean,
I'm flying over land.
The propeller is one of my invention,
turning as fast as it can.

And while my engine is humming,
I'm looking up and down,
to see if other people are out flying,
such a day where the sun is high...

Monday, December 12, 2016

Disappointment...

That's the feeling you get a late night when you hit M-/ in Emacs (hippie-expand), and Emacs doesn't use the web page you are looking at in Firefox as a source to auto-complete the word you've halfway written.

I think I need to retrain myself to use the browser built into Emacs.

Some people use an IDE that semantically analyses their code and pops up a suggestion box at every opportunity with an exhaustive list of valid choices.

I program with structural templates/duck types in Python and Emacs lets me complete all sorts of stuff, in comments, from other comments, or from the documentation I'm editing. It'll sometimes suggest some weird stuff, including whole line completions. It doesn't care. I don't care. I guess we're hippies.

Hippie van by ma noelle
It won't complete stuff we haven't shared between each other recently, though. I suppose the Lisp engine would rather get into it than wade through a lot of boring code analysis.

Tuesday, June 7, 2016

Intuition and design

So I was writing about intution, and somehow got sidetracked into how not to do ranking. Like a review of a game where the reviewer would judge the game on 5 different aspects, game play, sound, story, graphics etc. and then compute a final score based on fixed weights. How you'd fit a smash hit like Minecraft into that, I don't know.

What I really wanted to talk about was design.

Software development is full of design decisions. How do we present the information to the user? How do we let them act on it? How much to show, how much to hide?

How do we structure the code internally? What data do we store, how do we model it, how much do we capture? What other software do we build on?

What interface do we provide to other software developers?

It's a sea of decisions. Although it can be helpful for analyzing some outcomes, you can never hope to get through this sea with logic alone. You can often make reasonable deductions that something is simultaneously a good and a bad idea.

This makes it hard to discuss and evaluate these decisions. Often, we do not have the words, and even if we had, the actual components involved may be interrelated in such a complex manner that you'd never get anything out of studying them directly. You'd have to condense this complexity into something simpler, a process which may take much longer than the design process itself. And in simplified form, you can't be sure deductions are still valid.

So we're left with the intuitions we train for ourselves.

In other words, a prime concern of a software developer should be training this intuition effectively, i.e. input good training data with valid, confirmed outcomes - this works in this situation, this doesn't.

The main road to wisdom in programming, as in other crafts, I believe, is learning by doing. So experimenting or playing around if you wish, and seeing what happens. Not just in a strictly scientific sense where the experiment is artificial and controlled. It may be as simple as recognizing a common problem, working out a possible solution and implementing it and watching it unfold.

Sometimes you can take a shortcut by learning from others. There are various ways to go about this. Reading literature, or source code, or asking questions, or getting them to comment on your work. It's mostly about basic curiosity. Typical developer chat when someone is talking about something new they've done circle around how they made it work and what problems they encountered.

But the annoying thing about learning from others is, again, that it can be hard to talk about these things. Design decisions change when the details change. Sometimes minutia can decide whether one model is better than the other. How do you communicate this effectively? The person you are talking doesn't understand your problem completely. You don't understand the situation the other person was in either. So how do you know that the advice is correct?

I think this is here analytical skills are important. You always have to be sceptical, train your intuition into recognizing discrepancies and evaluate what context causes something to be judged to be good or bad.

For instance, if someone you know to have developed a sound intuition about a certain area find an idea of yours to be cause of alarm, you'd be a fool to ignore it. But unless you possess the same intuition about the problem, it can be hard to deduce exactly what causes the alarm and whether it's a problem in the context.

Frustratingly, it can also be hard to explain the root cause on the spot. Often, there is no explanation in the intuition. And examples can be hard to think up. I've sometimes been asked for an opinion, found cause for alarm but haven't been able to figure out why until several years later. I know that because those alarms haunt me for years, making me feel like a grumpy old man seeing ghosts everywhere.

One example I have is that of software you depend upon, as I touched upon in my previous entry. Over the years, I've come to the conclusion that some dependencies serve you exceedingly well, and others serve you hell.

Probably the hardest part of design is designing for the future. We never know what happens. Still, careful design mitigates the risks.

Monday, May 30, 2016

The failure of logic

Some time ago, I read a book about experiments on brains, You Are Not So Smart. As it turns out, many of the ideas humans commonly have about their own thinking capabilities are pretty far off the mark because our brains in some way work with illusions.

For instance, human eyes only have a small field in the center where the resolution is good, yet when we open our eyes, a wide field of vision appears. Because the images our brains see is something it has composed itself.

One of the recurring themes was logic versus intuition.

The point was that people mostly think with intuition.

Intuition is powerful. It lets you reason from the cumulative experience you've had. It works effortlessly and often only takes moments to do its job.

Logic is extremely limited. Like a simple computer processor, you can only work with a limited set of concepts at the time and make simple deductions.

People seem to think they make rational, logical decisions. But when you actually test them in experiments where intuition and logic disagree and logic has the upper hand, then most people don't wait and think through the deductions. So they arrive at the wrong conclusions and aren't actually as smart as they think they are.

But it has occurred to me that in some instances, you can see the opposite problem. People trying to use logic to solve problems that require more than simple deductions.

For instance, how do you use logic to decide what you're going to do in life? What education, where to work.

In the software world, an eternal question is what software to bet your future on. It affects end-users as well as developers. In the office next to IOLA, there once was a company that was betting on a particular technology offered by Microsoft. It was even embedded in their name. From the outside, they appeared prosperous. Then one day Microsoft decided to shut down their framework.

How do you decide which programming language framework will serve you well for many years?

I think you can use logic to elucidate some points. Likewise, you can try things out to gain more knowledge. But overall it is a huge trade-off with many factors.

Some people realize that and try to split the hard decision up. So you might look at it from different angles and make up a matrix comparing all the choices.

Helpful as it may be in understanding the problem, it can lead down a path where people spend their time arguing about unimportant matrix details. And someone may get the brilliant idea that all that's needed is a scheme for assigning scores to the various parts and then combining them with weights into a final rank.

This is, I think, the ultimative failure of the faith in logic - thinking that simple-minded strategies will beat the raw power of a trained human brain. How do you assign the weights so that the end result is meaningful? Nobody knows.

If you need a complex ranking, feed the details to a trained intuition, one that has seen what works and what doesn't, and let it decide.

Friday, February 12, 2016

When four becomes five

We're now a family of five. Since last week.

Now, there's a history of quick births. Last time we arrived at the hospital in an ambulance.

This time Janne woke me up at around 2:40 in the night. At that point, there was plenty of time. So we called the grand parents.

By the time they got here, maybe half an hour later, Janne wasn't sure there was still plenty of time, so we hurried of, arrived at hospital safely thanks to my father, and half an hour later, it was all over, Janne had given birth to a little girl.

They wanted to keep Janne around for while because she'd lost a bit more blood than they liked, but changed their mind later the same day after having tested her hemoglobin level. By five o'clock in the afternoon, we were all together again.

So for the past week and a half, we've been taken care of a little baby, once again. Rewarding in some ways, demanding in other ways. She's got a nice loud scream for when she's not happy.

Friday, January 15, 2016

Stimergy

I've always been attracted to the idea of self-organization by informal means, and there was an article not long ago talking about stimergy in a software development context.

The idea is that everyone somehow knows what to do without talking to each other, but just by doing the work and observing the signs left behind, implicit and explicit.

For instance, how do we add a new page to the app? By copying an existing. How do we know something is wrong? Well, either someone already removed the problematic part so we don't see it anymore, or someone added a FIXME note with the intention of doing it later. Or perhaps it just sticks out so visibly that nobody is in doubt it's bad.

Arrows


I think of it as a room full of arrows lying on the floor.

If you are bad at software development, the arrows will be pointing in random directions, and confusion ensues at every point in the process. You can never sprint, only stumble.

The goal is to make sure everything is tidied up so the arrows point in the same direction, the direction we want to go in. We need to constantly check and revise the code to align the arrows, not only align them to each other but also align them with the evershifting goals of the system. The goal of training newcomers is to teach them to read the arrows and make new arrows point in the right direction.

For instance, if a function is named after how it was conceived, not after how it is currently being used, it's pointing in the wrong direction. When you later try to reason with it, your mind will tend to go down the wrong paths and you'll reach the wrong conclusions, leading to bugs, or at least waste time having to retrace your steps.

You can add a comment to the function, but it's far more powerful to fix the name so it's pointing in the right direction, even if it's more work up front. Arrows matter.

I think this is a powerful metaphor.

Simple processes


I also think it's a powerful method.

Everything is done by engaging with the main activity, programming. It's through this activity that we learn and exchange the acquired knowledge.

Anyone can contribute to the direction. The value of the contribution is correlated with the confusion the contribution leaves in the greater system. It can be negative, but it can also be a stroke of genius, the subtle touch that makes the arrows of the system appear in greater clarity and alignment.

It is dynamic. If a bad decision is made, it's precisely as fixed as the program. The effort it takes to fix the program is the effort it takes to change the decision, no more and no less. Once something enters the program, it takes a life of its own, removed from the egos of programmers involved. The ego might point in one direction, but the code has its own signs.

Yet it's really simple. It works for ants.

Ant by Katja Schulz

Ants


Of course we're not ants. We need to and should communicate. We can pre-align our internal arrows to solve a complex problem much more efficiently than a bunch of ants that are mostly relying on evolved instincts.

But once the program starts, the communication becomes fragmented and loses some of its relevance compared to the work we actually do. You want to know what I did last week? Look at my commit log.

Thursday, January 14, 2016