All posts by Tor Håkon Haugen

My first contact with Linux

I remember it like it was yesterday. The thrill. Wandering away from the safe and boring, and into the unknown. Yes, I’m talking about my first installation of Linux, Slackware 4.0 – which places my first contact around mid 1999, since this year also saw the 7.0 release.

Unfortunately, I don’t remember the name of the guy who introduced me, or his handle on the internet. It was at the local computer club, and in a short evening he showed me the ropes, helped me install Slackware and recommended using Enlightenment (E16) instead of Gnome or KDE.

The Librarian

Before this point, I’ve already read skimmed through at least one book on Linux, which is almost a short story in itself. I got curious about this whole Unix thing a few years earlier and took a trip down to my local library to see what they had on the topic. I asked the lady at the desk, but she didn’t know what I was talking about, however, the guy with the “stuffed penguin doll” certainly did.

Yet another guy I don’t remember the name of, but who made a lasting impression. “You don’t want Unix, you want Linux. Take this book, it will answer all your questions and make you wise” – well, the first part of that sentence is true anyway. So, it turns out that one of the librarians was a Linux geek! And when he spoke about his weekend Linux adventures at work, no one understood a damn thing. But I got it. I understood. At least I understood the core concept, I did not understand how much work it was to save a RAID gone bad. That would come later.

Got root?

So, I mentioned the thrill earlier, and in hindsight this might seem silly, but the thrill of being root for the first time was more powerful than you probably can imagine. This feeling quickly faded though, since I was root only on my own machine, but still, it felt big at that moment.

Back in 1999, you could not just install Linux and expect everything to work out of the box. Just setting up the graphical environment required a lot of leg work. Like knowing the vsync and hsync of your monitor (CRT monitors, remember those?), screen resolution, colour depth and a few other bits and pieces. If you got it wrong, it would just flicker your screen and crash. Fun times, glad they are over.

The Linux kernel

At some point I started compiling my own kernels. Adding and removing features to make it as small and streamlined as possible, and yet still be able to boot. I learned a lot about hardware back then, well, a lot about which hardware I had at least. Also, I learned how long it took to compile the kernel on my machine. It was just long enough that you didn’t want to make too many mistakes. So, circa 20 minutes?

Looking back, I’m glad most distros shipped with the source code as well as the compiled binaries. Downloading a new kernel took ages, that is around 38 minutes assuming we download a 17MB .gz file on a 64 Kbps (ISDN) connection.

Dial Internet

Eventually, we got internet, dial-up of course, but probably not the one you are thinking about, unless you made the connection from the previous paragraph. If you did, kudos. Anyway, my parents went straight to ISDN, two lines, always on. Except I wasn’t always on, because dial-up still cost money by the minute.

I had an Teles ISDN card where IRQ address had to be set manually (ISA bus), luckily there was a German project (German domain at least) called ISDN4Linux which helped a lot when setting up the correct kernel modules and software config. I guess ISDN was more of a European thing.

A funny thing about this ISDN card – well, funny might not be the right word – from time to time, the card would stop working. Rebooting the machine did not help. However, changing the ISA slot did. So, each time it stopped it was just a matter of turning the machine off, moving the card between one of the ISA slots available, and power it back up. Yeah, that was not a funny thing. I should not have written that.

I don’t know if anyone else ever had that problem, but the solution, as I mentioned, was easy. And as long as I never put the lid back on, or fastened the screw securing the card, it was a quick and painless experience. Except for the part were the machine had to be powered off and back on. Okay, skip quick and painless, let’s say: easy but tedious.

The year of the Desktop

Despite a lot of talk about “the year of the desktop”, it never really happened for Linux. Well, it happened for me. I used Linux full time on my desktop for over a year and a half around 2004. It was good and it felt good. I was master of my domain, still rocking Enlightenment as my go-to desktop environment.

Linux and Enlightenment with XMMS, gkrellm and a few other applications running
XMMS and gkrellm, those were the days.

Picture above: If you read Norwegian, I did eventually get paid for that Windows XP stint. If you don’t read Norwegain, I still got paid.

Now, however, I was using Gentoo. A Linux distribution that was compiled for your hardware on your hardware, promising more speed and control. The speed gain would come after installation and certainly not during, because downloading and compiling every package took ages – and this time I’m not talking about 38 minutes anymore, but hours.

I did save a bit of time when I worked as a sysadmin at a school. Using computers in the computer lab and a boot disk, I could harvest their collective processing power to install Gentoo on my laptop using distcc, a distributed C/C++ compiler system. Also, the school had way faster internet then I had at my apartment.

Then games drew me back to Windows. Now days it’s mostly Lightroom keeping me back, but the way Windows is heading, Linux as desktop looks way more interesting again. I’m still using Windows 8.1 at home, and it’s not because it’s great.

What’s this all about then?

I learned so much about computers back then, and Linux really was a big driver in that regard. Do I miss it? I would be lying if I said no, but on the other hand, my previous rant post have showed me that this probably is more about nostalgia then anything else.

I guess that’s basically it: me dipping my toes in lake nostalgia, again.

The digital natives are not who you think it is

This post got (un)popular on Hacker News. Let me just clarify that this post was meant to be humoristic and a bit tongue-in-cheek, but that seems to have been lost in translation between brain and keyboard.

I have heard the term “digital natives” applied to todays youth because they have grown up with the Internet, iPads, and whatnot. But I beg to differ. When it comes down to the meat and potatoes, they do not know jack shit.

My digital upbringing

In comparison, I grew up with the 286, 386, 486 and all the other x86’es. I learned not only about the meat and potatoes of computing; I learned the full haggis.

During my teenage years, I had computers upon computers in my room, some spilling their guts.

A harddisk located outside the computer chassis. Have the digital natives seen such a setup?

Later I had my own little server setup in the basement of my parents’ house. This was after ISDN dial-up, in the heyday of DSL technology. Look at this beauty: now this is a server rack.

Today, all of this have been reduced to a laptop in the corner running VMware’s free hypervisor, ESXi. I have one virtual machine on it, running Linux, and when the disk fail (it has happened before), I will do like any grown man without a backup would: cry. But you better take my word for it, because when it happens, this blog post will be gone with it.

Rocking that floppy

I have installed Windows 95 from floppy disks, or “the save icon” as the young kids would recognize it. Not only that, I have installed Linux on an IBM PS/2 server – again from floppies – and I got the thing online. But it is only that much you can do with a 486 on a rather obscure hardware.

This weird knowledge has helped me in career. Installing weird stuff on weird stuff. Making DOS talk to Novell NetWare. Write small custom programs to deal with big proprietary hardware.

Digital natives my ass, all they do is stream videos on YouTube and Twitch. Let me share my digital upbringing in full by showing you this image:

A desk filled with computers, monitors and various other computer related items. Early 2000.

On the far left you can spot an IBM PS/2 server with a 100 Mbit hub on top with a custom power supply, the original failed during a thunderstorm. Then there is a Linux “server”, the one with the guts hanging out on the first image. Finally, on the desk, my main computer at the time, a 230 MHz(?) machine with Windows 98 running.

If anybody is a digital native, it is me. I did not just grow up with computers, I grew up alongside them.

Maps, activation codes and server-side validation

If you skip server-side validation, someone will eventually find out. Hi, I’m someone, and this is a story about why you should think about server-side validation.

Story time

In July 2013, I bought a new, previously owned, Volvo V60. As part of the deal, the dealership included the latest map update. So, I left the dealership with the car and a box containing not one, not two, but three DVDs. Each that would spend hours in the DVD tray while updating the maps.

Now, these DVDs were probably dime a dozen. You could buy them used on the Internet, pick them up at any Volvo dealership and I would not be surprised if they were available for download from the Internet as well. So, to prevent piracy, you had to type in an activation code when starting the upgrade progress. But wait – then everyone with an activation code could sell their DVDs and the code to the next person once they had updated their maps? Well, no. You see, the activation code only worked on your car.

Getting the activation code

The way you got your activation code was simple: you would visit a web site, type in your vehicle identification number (VIN for short) and a drop-down list would show the part number for the maps you had the right to use. I mean, you could literally type in any valid VIN for that brand and model series and see what map options they had. You could even request their activation code sent to your email address. Now that is user friendly.

So, the activation code only worked with the correct combination of map number and VIN. However, when I entered my VIN, the part number for my DVDs did not show up in the drop-down. A few others appeared, presumably already installed by the previous owner.

Apparently, the company selling the maps had not yet received the order from the dealership. This was late Friday afternoon, if I recall correctly, so contacting the dealership would have to wait … but then I thought, what if I change the options in the drop-down list? It cannot be that easy? Surly they would validate the input, check it against their database one more time before sending out an activation key?

You already know the answer; I opened developer tools and changed the product to match the one I had. I pressed submit and a few moments later, voila! You got mail!

“Dear Valued Volvo Driver, […] Here is your activation code.”

Would you look at that. It was almost too easy. So, just to confirm, I found another number on the Internet and, once again, I received an email with a new activation code.

So, here you have a service that gives you a list of choices, and they do not even check if you have selected within that range. That is just lazy.

In the end, I could have saved me the trouble; after the weekend, the part number automatically appeared in the drop-down list, and a year or so later, Volvo put the maps on the Internet for free. All you had to do was download them to a USB stick and plug it into your car. Well, you also had to upgrade your navigation system to remove the need for an activation code, for a small fee, of course.

Doing the right thing

I reported the bug to the company responsible for the map service, but I never heard back from them. Since this service no longer exists, I think it is okay to share this story. I did not break any rules, from my point of view, but I can see how this could have been abused.

To be honest, for a split second, I was thinking about sampling a few VINs, note down the map options and crossmatch them to generate a lot of activation codes, which I then could try to figure out how the code generation worked. But that would have been crossing a line.

So, the takeaway is this: Do not trust the client-side, always do server-side validation.

I don’t keep bookmarks, I keep tabs

Ever since browsers added tabs – and the ability to restore them on start up – I’ve been using them almost religiously. Bookmarks, on the other hand, was never my thing. And while I do have them, 219 to be precise, I don’t use them. They are out of sight, whereas my tabs aren’t.

Right now, I have 30 tabs open in Chrome (I just closed four to tidy up a bit) and 26 in Edge. I have kind of a system, with emphasis on “kind of”, where Edge is used for work-related sites that require login and Chrome is used for (almost) everything else.

Tabs are like to-do lists, ever-growing and mostly ignored.

So, to close a few – and at the same time expose some of my various interests – I will post some of them here. That way I can close a few tabs, keeping just this page open instead.

(I see the irony, no need to point out that this will end up as a glorified bookmark)

On Corona

All I need to know about the corona situation in Norway (in Norwegian). This page is gold if you like graphs and statistics. It’s also an exception to my general rule of not reading VG (it’s a tabloid newspaper after all).

On security and cloud (advent calendar 2020)

You would assume it was possible to read one article per day during December – this was an advent calendar after all – yet it didn’t happen. I never got around to reading any of them. Not one. I’ll might get to them, eventually, once they are outdated.

On learning Vim

I use Vim as my coding editor, for the most part – I’ve written about it before (in Norwegian). My plan is to read these guides some rainy day, so it could be any day now, according to the forecast. Could even be today.

On programming

Reading material or just for reference; I don’t know yet, but I still kept them around.

On stories

The name of this site should be self-explanatory.

On Linux productivity

I use Linux – maybe I could learn a new trick or two. Or maybe I’ll just pretend I’ll find the time to read 89 pages on various Linux tools I’ll never use again.

On algorithms

Algorithms, they are all around us, might as well learn a few. The fact that this site contains 26 e-books – one in what I assume is Chinese – didn’t stop me from keeping it in a tab for months. But will I ever read one of them? Will you? Let me know in the comments section.

On ports and pools

Network ports and connection pools, that is. Obviously work related … I don’t have a pool.

On calculus

What is it? Let’s find out … another day.

On the Internet

It’s no secret: I miss the old Internet, or at least the idea of the old Internet.

There you have it: 16 tabs I can close, pretending I will read them later – just like I’ll pretend to clean up my bookmarks.

Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future

Elon Musk in front of a SpaceX Dragon capsule
“OnInnovation Interview: Elon Musk” by OnInnovation is licensed under CC BY-ND 2.0

Ashlee Vance har skrevet en bok om Elon Musk (2015) — og jeg har lest den.

Elon Musk er mest kjent som mannen bak både bilprodusenten Tesla og romfartsorganisasjonen SpaceX. Boken tar for seg — i all hovedsak — disse 6 områdene:

De viktigste læringspunktene

De viktigste poengene jeg har trukket ut av boken er:

  • Musk tror på det han gjør — og han går “all in”.
  • Les mye, det er en enkel måte å lære på
  • Prøv å forstå det grunnleggende og bygg videre på kunnskapen.
  • SpaceXs mål er ikke å tjene mest mulig penger — men tjene nok til å realisere målet om å kolonisere planeten Mars. Alt handler om å nå denne visjonen.
  • Musk vil ikke miste kontrollen fordi han er redd andre eiere vil prioritere økonomisk gevinst.
  • De fleste produsenter er ikke interessert i ekte innovasjon, men å redusere risiko og tilby små forbedringer over (relativ lang) tid.
  • Etablerte bedrifter er for byråkratiske til å gjennomføre store endringer.
  • Musk forstår at selv om noe “alltid har blitt gjort sånt”, så betyr det ikke at det er den eneste (eller beste) måten å gjøre noe på.
  • Musk spør ansatte om hva de gjør for å tilegne seg deres kunnskap.
  • Sett mål som gjerne er 10x dagens bransjestandard og jobb hardt for å nå det. Om du ikke når målet så kan du likevel hatt en fremgang på 3x eller 4x enn alle andre.

Mine tanker: Tenk stort. Ikke la deg begrense av “etablerte normer”. Forstå hva du driver med.

Elon Musk er en “serieentreprenør” — hvor han tidligere kunne avfeies som en litt eksentrisk fyr som var heldig med Zip2 og, så er det klart at han faktisk vet hva han driver med. Men hadde Tesla og SpaceX gått tom for penger (noe som var en reell fare) så ville vi sannsynligvis husket han annerledes.

Vertikal integrasjon

På mange måter har Elon Musk benyttet seg av vertikal integrasjon. Produksjonsteknikker i SpaceX kan nyttiggjøres i Tesla og omvendt. Teknologien til Solar City med solceller og batterier hjelper til med strømproduksjon til Teslas ladenett.

Elon Musks prosjekter (PayPal)

  • — Bank på Internett før Internett var “voksent”
  • Møtte stor motstand fra etablerte og fra regulativer.
  • Slo seg sammen med PayPal og senere endret navn til PayPal
  • Musk ble erstattet av Peter Thiel som CEO mens han var på ferie


  • De fleste bilprodusenter kjøper deler fra andre bedrifter. De fleste biler ganske like, og dermed også “immune” mot store forandringer. Å oppdatere elektronikk og styringssystemene i bilen kan ta år fordi det er så mange aktører involvert.
  • Tesla har (av nødvendighet) lært å produsere det meste selv, og utrolig nok funnet ut at dette på sikt er både billigere og bedre.
  • Elon så på komponentsammensetningen i et batteri og fant ut at summen av elementene var mye billigere enn hva batterier ble solgt for og konkluderte med at det burde være mulig å produsere mye billigere batteri. (ref. forstå det grunnleggende, ikke ta noe for gitt — first principle thinking)
  • Tok en stor risiko ved å bygge ut Teslas ladenett i USA og senere Europa, samtidig som kundene ble lovet gratis lading. Dette ble gjort mens Tesla enda slet med å produsere og levere nok biler.


Mål: Kolonisere planeten Mars.

  • Observasjonen til Musk var at romfartsindustrien hadde stagnert siden månelandingen. Det var ingen driv. Ingen ambisjoner. De etablerte institusjonene handlet på gammel vane og — kanskje ikke overraskende — var utrolig konservative og holdt seg unna alt som minnet om risiko. Kanskje ikke helt unaturlig etter katastrofene med romfergene.
  • Reduser kostnader, sats på gjenbruk. Romfart er dyrt — alt som kan brukes flere ganger trekker ned den totale kostnaden.

Solar City

Startet av fetterne til Musk, med god hjelp av Musk (angivelig hans idé) — senere kjøpt av Tesla.

Interessante observasjoner:

  • Ingen andre firmaer i bransjen tilbød en ferdig løsning til sluttkunder. Du måtte selv bestille inn solceller og senere finne noen som kunne montere.
  • Ingen andre firmaervar interesserte i å dra teknologien videre, men satt på gjerdet og ventet på bedre teknologi og rimeligere priser.