Erik I

My public writing. You can reach me at @eitland@mstdn.io

Filed under #tumblelog, #warstories and #consulting.

Came across this:

I refactored the code from untested and untestable, to testable with 40% test coverage. The senior architect is refusing to merge because the test coverage is to low.

https://shermanonsoftware.com/2019/11/15/its-not-sabotage-theyre-drowning/

The whole post contains more examples but is still short and might be well worth reading as well if you are or have been frustrated with people or companies that seems unable to receive help, even when the solution is straightforward.

Here's my (not so) favorite a few years ago: a small, struggling company having on average 3 – 4 people stuck with manually copy/pasting into customer Excel reports at any time. I point out that the data is already available in a central location and suggest they ask one of their in own developers to add CSV output or something at that point.

Their answer: I hear you guys are busy, should we hire one more? (A few months later they fired a bunch of people as the market dried up somewhat.)

Filed under #lifeInNorway, #friendlyBanter and #photos

The bus arrives exactly on time. Me: you stick to the schedule? Bus driver from Northern Norway: no reason to do anything else as long as there isn't a bunch of local people clogging the road.

Car approaching in intersection as seen from the bus.

Snowy bridge as seen from the bus.

Train arrives in snowy weather.

Conversations like above is pretty common in parts of Norway, and considered OK. (And BTW, while I'm Norwegian I'm not one of the locals, but it is OK when people poke at us from the west coast as well as long as they stick to the facts ;–)

Filed under #lifeInNorway

First snow of the season falling on the flowers in the garden.

Today the first snow of the season arrived.

A friend of mine had asked me to help him with the drive belt on his snow blower and today we fixed it.

It turned out to be really simple: the fan attachment was held in place by four 13mm bolts. I took out four and loosened the fourth, pulled the attachment slightly away from the motor and then I could pull out the old belt and insert the new.

Filed under #reactions

Mikka Luster who is a reasonable person and writes interesting stuff as far as I know also writes this:

because the testing we did said nothing about the fitness of our candidates and more about their psychopathic subtendencies, which supported remaining calm in such environments.

as well as this:

But while learning to deal with the stress of a psychological torture scenario like a classroom test might be beneficial to a career as a psychopathic suspect, it won't help and might actually be detrimental, to a future as a physician.

and this:

LEO around the world are now trained on how to defuse these situations by using words, gestures, facial expressions, and poses. The result are less tense citizen and much less open confrontations. Confrontations which are triggered due to a reduced frontal lobe involvement in spontaneous actions and utterances. University test masters do not receive this training, yet their behavior and the environment they create is at least as damaging to some people's future as a random traffic stop.

From this I take that Mikka Luster has had a totally different experience with exams than I've had.

I totally don't think that he wants to paint everyone who does well on exams as psychopats but for someone knowing nothing about the subject it would be easy to make a partial (and wrong) inference from that.

So I'm going to write down some other observations about the typical exam situation as experienced by someone who grew up in Norway. Hopefully I'll be able to convince everyone that it is OK to do well on exams, and maybe someone can an idea or two on how to improve their own exam experience:

First, a bit that might not be easy to do something about as a student:

Mikka writes:

University test masters do not receive this training, yet their behavior and the environment they create is at least as damaging to some people's future as a random traffic stop.

I remember exams as calm, those sitting there with us would go out of their way to help (as far as allowed, they would of course not answer any questions) and generally nice. They would sit silently reading a book or something, usually in front, sometimes also in the back of the exam room. Once anyone waved a hand they'd be there either you needed paper to write on, or to go out for some air or something.

The feeling of the exam: there is nothing else I ought to do right now

I'm easily distracted. Except when I'm working focused on something that matters. That might be a hard bug, an interesting game, playing with my kids – or doing an exam.

When I sit down on the exam I have blocked off the day. My phone is off and out of reach anyway, my family and friends know I'm busy and for a good reason. As mentioned above there used to be a few people around that would help with anything practical. In short, in my mind it was the perfect opportunity to perform as well as possible.

Actually, when I lived alone that feeling would set in a few days earlier. At that time I used to work/be involved extremely much outside of school.

The good feeling of the exam approaching

Prior to exams I would typically read for days straight, at least when I lived alone and studied for my engineering degree. The last day before the exam I'd say to myself – or rather just observe as I got tired – that “there's nothing more I can do now, either this works or it doesn't but from now on until the exam starts all I'll focus on is getting a good nights sleep, getting up, getting breakfast, show up on time and in the correct place.”

Getting a chance to be judged for what I can and not for how well my teacher liked me

My exam results was often better than the grades my teacher assigned me. This is a general problem. Recently national tests in Norway has shown that while a large subset of the population (about half of them, say no more as that is a topic for another time) does better on average on national standardized test, the other half of the population get better grades on assignments etc.

I belong to the subset of the population that does better on exams. Lessons can be really boring, and especially when I was younger I'd went my frustration. That doesn't help your grades. (And to be fair, some of what I said in class wasn't too insightful either: “Why do I have to learn English? I'm going to be a farmer!)

Finishing up

I think the posts were interesting and well written. I just didn't think people should link psychopathy with doing well on exams.

Our current exams are not ideal, but they at least around here they are are a compromise between getting things fair and equal for everyone while simultaneously keeping costs down.

Peoples perceptions about exams might differ for a lot of reasons and I guess some of it comes from early experiences with exams. I know a couple of people who had terrible dentists as kids and the stories that especially one of them can tell about how far they are willing to go to avoid dentists even after they are adults is pure madness in my opinion, but obviously real for them considering they can for days with pretty bad teeth before finally admitting that it wasn't a headache after all and they need to go to the dentist.

Finally: one more personal observation. Airports. Airports are way more scary to me than exams. On exams I can walk out, get my phone back and the only thing that happens is I don't pass the exam this time. Airports on the other hand where officers can stop you for no good reason after you have traveled for 24 hours straight, asking invasive questions seemingly to catch you for something you don't know what is, ransack your belongings for half an hour or more – even force you to unlock your personal devices – that is way more scary than exams – in my opinion.

Or rather: adjusting the plan

Filed under #risingEarly

Yesterday I decided to sleep an hour extra tonight.

The result: I'm waking up tired and confused.

Hopefully I'll also be less tired during the day though.

BTW: Sleep as Android is how I get up. That alarm clock is amazing and I think it has followed me since shortly after I got my first or second Android phone. Itis customizable so I can decide for example how much I am allowed to snooze and more importantly it just doesn't give up. (Not affiliated in any way, just a happy user.)

Filed under #lifeInNorway

People who receive work assessment allowance (AAP), sickness benefit or attendance allowance no longer need to apply to NAV to be able to travel to another EU or EEA country in connection with temporary stays.

https://www.nav.no/en/Home/Relatert+informasjon/important-information-about-cash-benefits-and-short-or-long-term-stays-in-eu-and-eea-countries

This above is probably close to the nicest way it is possible to describe the scandal that has unraveled this week:

It seems bureaucrats have sent a good number of people to jail and/or fined them heavily on accusations of fraud because they traveled abroad while receiving allowance or benefits from NAV.

What was the problem? According to our agreement with EU they are not allowed to restrict peoples movement within the EU that way as long as recipients adhere to the rest of the rules, things like filling in necessary forms etc.

To make matters worse, it now seems NAV has been made aware of this a few times already after being defeated in court, but has continued anyway.

The government is also receiving some deserved criticism for not acting after they were warned last year. Some of the worst criticism has died down though as it turns out some of the parties that was loudest in their criticism was in charge when this started. Ooops.

When I was younger and more stupid than I am now I would probably have said something more: maybe I would have said that “bureaucrats and politicians should have gone to jail over this” or something to that effect.

That option is not in our laws as far as I am aware and I have also become more careful to stop judging others and leave it to those qualified, but I do wonder what will come out of this.

Filed under #web and #linking

Daniel Janus has written a really interesting post about the current state of the web: Web of Documents

While I don't necessarily agree with everything I agree with most of it and found it very clear and well-written. I'll try to get back with another post that describes where our views differ, but for now, if you are interested in the state of the web read Web of Documents.

Filed under #life

Woke up at about 0348, made coffe and have now been listening to podcast and browsing Instagram for about half an hour. Now it is time for some reading (there was a 40% sale a couple of weeks ago so I used the opportunity to get myself a new Bible, and I'm looking forward to reading it :–)

Time used for this post: approximately ten minutes, while still listening to podcast.

Update: finished reading. It is now 0448 and it is about an hour since I woke up.

I don't expect to stick to this schedule for months or years but for now it works.

Filed under #testing and #softwareengineering

In a discussion about Kent Becks post Test Desiderata someone asked when they are inexperienced in software testing but still the only one on the team that care about writing tests. I answered it briefly on my way to work yesterday but I'll try to clean it up a bit and add it below as it seemed useful.

But first: if you are at all interested in testing and haven't read Test Desiderata yet, read it. Kent Beck is famous in the field of software development and for good reason!

That said, here is what I wrote, expanded and edited somewhat. The context is still someone who tries to write tests while nobody else cares:

Testing is primarily a tool

Always remember, and particularly if you are alone fighting a good fight to improve quality: if nobody has told you to test and what tests to write then they are just a tool to help you.

I think I was lucky when I was introduced to testing as the guy who introduced our team to it presented it as a tool to reduce boredoom and busywork instead of as a “best practice” that should ideally be followed to be nice.

In his words (as best as I can recall them, and with apologies if it turns out he quoted someone else):

Only software developers launch the entire space shuttle every time they want to test a small change they've made.

Every other engineering discipline uses a test bench or text fixture.

  • Glenn Richard Bech, sometime in 2007 or 2008

He then went to prove how we could often save time by testing our new features automatically in 15 seconds flat or something like that instead of having to wait forma full server restart that could easily take 2 minutes just to get to the point where we could start manually verifying our changes.

Start small

A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over, beginning with a working simple system. John Gall

This law holds true for testing as well.

(And if you can keep things simple while expanding it to cover all needs – all the better!)

When planning, look for tests that will speed up your work right now

I often find that adding a minimal test suite will speed up my work significantly.

By starting with those tests you will be building confidence for yourself and goodwill for your work. After all no reasonable boss will get angry with someone who is successfully working to do their work faster and more effectively.

Getting upset if they feel someone is spending time on unnecessary busywork however would be understandable.

Don't care about overall coverage, only that what you are working on now is reasonably tested

Stay with your work. Don't switch context just to improve some statistics.

In addition to the context switches, it also creates noise.

Observe and make at least a mental note when the tests are help you

Your tests can work as both a

  • lab bench, keeping your code in place while you work on it
    • how? write a simple test that feeds the code the inputs that are currently working to make sure nothing breaks.
  • fall protection
    • how? check in the code, run everything at least every time you are about to push new code, and – especially if nobody else cares – after you check i n code from others: to verify old important code still works.
  • a colleague that does pair programming with you, pointing out when you are about to forget something important
    • how? it is hard to explain but you'll hopefully experience it.

If some advice you get doesn't make sense and you can ignore it, do that after trying to understand what it should help for

Don't waste time just because someone says something is a good idea. In keeping with the ideas above keep your tests lean and focused on value add and removal of tedious work instead of focusing on doing it “right”.

So much time is wasted every day in discussions both in teams – but also inside peoples minds – about the correct way to do things. Just don't be so open minded your brain falls out.

(And for anyone working in a team: most of the time, stick with the rules.)

Michael Feathers book “Working Effectively with Legacy Code” might come in handy at some point

If you work late with legacy code this book might help you. If you don't have time can however probably manage without as well 😏:

A couple of months in the laboratory can frequently save a couple of hours in the library.

Frank Westheimer

Filed under #music

These days I always start my days listening to a podcast I find interesting, but during the work day I often listen to music. Today I came across this track that I immediately loved:

https://m.soundcloud.com/omnisetrecords/ilya-fly-tender-evening-voices-dancing-in-the-moonlight-remixout-19-09-18?in=omnisetrecords/sets/ilya-fly-tender-evening-incl

Enter your email to subscribe to updates.