Code is up

… on Github.


Got around to putting my most useful programming projects up on You can now easily get the newst versions, repost bugs, read the source code and fork the code to make your own version.

The projects that are up so far are:

  • npcg – the random encounters and NPC generator for the AMAR RPG
  • hyperlist.vim – the VIM plugin to easily and effectively manage HyperListS
  • hypergraph – the tool to make graphical representations of HyperListS
  • mailfetch – collect mail from different imap accounts, filter and store locally
  • imaptools – Client-side tools for imap mail
  • pc41 – Facilitating serial/USB connection to an HP-41 calculator

The next project up will probably be my collection of HP-41 programs found on this site.

Update (2015-08-28): I have now put all my relevant HP-41 related programs up on my Github page. The pages and links on this site is now updated to point to my Github projects.

Graph your HyperLists online with HyperGraph

While I was at it, I decided to make HyperGraph available as an online service. With some wrestling with Ruby (the programming language) and obscure encoding issues, I got it up and running. Now you can take a shopping or todo list, a project plan or business process in form of a HyperList and get a graphical representation in a few seconds. I love when I get into my geek cave and work on stuff like this.

The domain is where I make my online services available (currently hosting the AMAR NPCg and HyperGraph).


Random encounters and NPC generation for AMAR

It’s been liberating to do some coding lately. I finally got around to update my Non-Player Character (NPC) generation program (npcg) for the Amar Role-Playing Game. I have added a major feature – the ability to generate random encounters for the game. I also improved the generating of human NPCs and fixed several bugs. The online version of the program went south after Ruby (the programming language) was updated to version 1.9 as the templating engine I used – Amrita – stopped working. The nerd in me woke up and rose to the occasion. After two weeks of Ruby coding and a major overhaul, I am proud to present the new online version of NPCG :-)

If you have any questions or suggestions, don’t be too shy to speak up.

The Kingdom of Amar

The Kingdom of Amar

Hidden risk of outsourcing IT

There is a potentially undersold risk as a company considers outsourcing IT development or operations: The loss of internal productivity to mentor outsourcing consultants are often difficult to recuperate.

When we learn complex systems, our competence usually follows a Sigmoid curve (also known as “S-curve” or “Logistic curve”).

“Many natural processes, such as those of complex system learning curves, exhibit a progression from small beginnings that accelerates and approaches a climax over time.” (1)


“In this case the improvement of proficiency starts slowly, then increases rapidly, and finally levels off.” (2)

When a company is looking to outsource the development or operations of proprietary complex IT systems, the consultants will usually follow this learning curve. But in order to eventually become productive, the consultant will rely on mentors to learn the ropes.

An internal competent developer or system administrator is assigned as a mentor to the external consultant. The mentor will experience a drop in productivity, and regain the productivity concurrent with the consultant.

Spreading the burden among several mentors may make the productivity loss less visible, but the combined loss of the mentors may even be greater.

According to a recent survey I did, the productivity loss of the mentor was at least 50%. The time needed from scratch to a fully productive developer was 24 months. The question is “How long would it take for the productivity of the consulatant to make up for the productivity loss of the mentor?”. Or in other words “How long until this scenario goes break-even?”.

To calculate this, we turn to the Sigmoid function:


Productivity of the consultant (p) is the Sigmoid function over time (t). We adopt the function to go from 0 to the time needed to become fully productive (T).


Then we adopt the function for the mentor’s productivity (P) starting from his dropped productivity and back to full productivity after T time. The drop (D) is the fraction of his full productivity (1).


The reason for the slight difference in the equations (the factors “7” and “8”) represents the fact that even after the time “T”, the consultant would on average still be a notch lower in productivity than the mentor.

The two curves combined with “T = 24” and “D = 0.5”:


The accumulated productivity of the consultant over time is the area under the blue curve, i.e. the integral of p(t).


To get the accumulated loss of productivity of the mentor over time, P(t), we first invert the mentor’s productivity to get his productivity loss, Q(t).


And the integral of Q(t).

The big question is “At what time (t) does the consultant’s productivity make up for the mentor’s lost productivity?”




… we get:


…which reduces to:


Graphically represented:


The question is so big that WolframAlpha cannot display the numeric result within its standard computational time. But with the help of my trusted old HP-41 calculator, the answer was achieved: It takes 19 months of mentoring for the outsourcing project to break even.

The hidden risk is that if the consultant quits before that time, the outsourcing is a losing proposition.

So, if a company considers outsourcing IT to let’s say a Baltic company, one must be very certain that the turn-over of their consultants is above this break-even by a good margin.

The risk management: First figure out how long it usually takes a new employee in the company to get up to full production speed. Add some time if the consultant speaks a different language, is of a different culture and especially if the mentoring is done from a distance. This will be your “T” time.

Then, by a few short pilots, figure out the mentor’s productivity loss. This will be your drop “D”. Along with WolframAlpha and an HP-41, this is all you need to calculate the break-even for the outsourcing project. With the use of some employment statistics from the outsourcing company or the IT industry of that country, you will have a pretty clear picture of the risk involved.

One can, to some degree, mitigate this risk through effective Knowledge Management. A competent Knowledge Manager with an excellent company wiki solution and efficient training setups could shorten the time to break-even by perhaps 20%. Nevertheless, it’s a serious risk to consider – especially since tacit knowledge from years of experience in the company is hard to transfer. Add to this the risk of the mentor quitting or is put on other tasks. Thus the consultant’s stay should exceed “T” with a good margin.

Update (2015-01-18)

An approximation formula will suffice for quick gain/loss calculations. This formula gives the net gain (if positive) or loss (if negative) for any given time (“t”):


In search for perfection (yeah, tech stuff)

Only a short while after having settled with dwb as my browser of choice, it was announced that it was unmaintained. Development had stopped and it was left in limbo. Again I was out hunting for The Browser. Revisiting Luakit and Uzbl, I discovered Vimb that seemed promising – but it had a few snags that ended up prolonging my quest. I hang around in the IRC chat channels of several tech projects, including a handful browsers. Got chatting with the main developer (“The Compiler”) of a new browser on the block just before X-mas – and it turned out that his qutebrowser served well as a Christmas present.

Qutebrowser uses a different underlying technology (QtWebKit), written in Python, has a very clean configuration, extensible and actively maintained.

It still lacks a few features like a form filler, session management and support for AdBlocks “easylist” (although it has a more rudimentary adblocker). But these are on the roadmap, and with the pace of development, I am sure these and many other neat features are not far away.

One thing that bugged me was how QtWebKit rendered fonts. Fonts were noticeably slimmer rendering web pages less readable. After some hours of tinkering, I solved the issue by first getting a better font setup for my system (here), then installing the Ubuntu package called “texlive-fonts-extra” and setting the font “Lato Heavy” for the following font settings in qutebrowser: “web-family-standard”, “web-family-serif”, “web-family-sans-serif”, “web-family-cursive” and “web-family-fantasy” (and the font “Droid Sans Mono” for “web-family-fixed”). Now fonts are beautiful and very readable.

After wading through more than a dozen browsers, qutebrowser fits the bill quite nicely.

And when I thought I couldn’t get closer to Nerdvana

… doors started to open.

I have written about my technical setup before. But now, ladies and gentlemen, it is getting HOT. Like hard core porn hot.

The setup goes like this: Linux (Ubuntu 14.04) as the operating system (easy package management – it does the job well). No kludgey memory-hogging desktop environment, just a damn good Window Manager straight – the i3. Lean, mean, keyboard driven and very efficient. Check out my config here.

The i3 window manager in action

The i3 window manager in action

Adding a conky bar with essential info at the top of the screen. And the perfect e-mail setup for good measure.

The e-mail client, mutt

The e-mail client, mutt

I am a vi-guy to the core, and I prefer to use console tools as much as I can (urxvt is the terminal with zsh as the shell). With key bindings for everything and with minimal use of the mouse, I get the speed and efficiency I want.

I use VIM for almost all my text editing – from writing books and articles (with the added benefit of LaTeX) to writing hyperlists, all my e-mails… and this very blog post. I swear by mutt as the e-mail client. It spawns vim as the editor. Essential vim plugins are netdict, visincr and gundo.

Newsbeuter - the rss reader

Newsbeuter – the rss reader

I use newsbeuter for newsfeeds, irssi as the Internet Relay Chat client and mcabber for my facebook chat :-) Zathura is the pdf reader of choice.

Using irssi to chat

Using irssi to chat

Just the other day, as I was struggling with a bug in the latest release of the trust old vifm console file manager, I came across an alternative – ranger. An ultra-neat file manager capable of all sorts of acrobatics – like displaying images right in the console (via w3m)! Wanna dig in? My config file should get you grooved in.

The amazing ranger - file manager on steroids

The amazing ranger – file manager on steroids

Then it’s the browser. I have been very happy with uzbl – until the latest git updates. Stability issues started creeping in and I was forced to look for alternatives. I have tried plenty – and I gave luakit another go. The config files are written directly in the programming language of lua. A bit of steep curve for simple configuration tasks but as you get used to lua, it offers amazing extensibility to the browser. As I started to fell in love with luakit, another vi-like browser popped up on the radar – dwb. How could I have missed this gem in all my trails and tribulations trying to find the perfect keyboard driven browser? OMG what a browser! Don’t leave home without it. With such an easy configuration, you’ll be up and running and turning into a fan in no time.

Dwb - über-cool browser

Dwb – über-cool browser

I have spent 14 years choosing my tools, fine tuning their operations and polishing every detail. I owe much work efficiency to this passion.

When I thought I couldn’t get closer to Nerdvana, I stumbled right into its core. Sadly, I now have few ideas left of how to improve my tools set :-/


The case against patents

Thomas Jefferson once said:

Accordingly, it is a fact, as far as I am informed, that England was, until we copied her, the only country on earth which ever, by a general law, gave a legal right to the exclusive use of an idea. In some other countries it is sometimes done, in a great case, and by a special and personal act, but, generally speaking, other nations have thought that these monopolies produce more embarrassment than advantage to society; and it may be observed that the nations which refuse monopolies of invention, are as fruitful as England in new and useful devices.


And the debate on patents are more relevant than ever. Big companies suing each other for billions has become commonplace. Collecting patents to fuel an arsenal of defensive legal leverage, tip-toeing the mine field of patents when trying to invent something new, using patents to stifle competition rather than innovate, forging patents alliances that centralizes power and keeps the smaller players off the playing field. The list goes on. And the net value is hardly innovation incentive.

I want to bring to your attention an article that details the economic effects of patents (link to the full article). The abstract reads:

The case against patents can be summarized briefly: there is no empirical evidence that they serve to increase innovation and productivity, unless productivity is identified with the number of patents awarded—which, as evidence shows, has no correlation with measured productivity. Both theory and evidence suggest that while patents can have a partial equilibrium effect of improving incentives to invent, the general equilibrium effect on innovation can be negative. A properly designed patent system might serve to increase innovation at a certain time and place. Unfortunately, the political economy of government-operated patent systems indicates that such systems are susceptible to pressures that cause the ill effects of patents to grow over time. Our preferred policy solution is to abolish patents entirely and to find other legislative instruments, less open to lobbying and rent seeking, to foster innovation when there is clear evidence that laissez-faire undersupplies it. However, if that policy change seems too large to swallow, we discuss in the conclusion a set of partial reforms that could be implemented.

The article is an excellent read and complements the book, “Against Intellectual Monopoly“.

Also check out Johanna Blakley’s neat TED talk on the same: