Flat font for your terminal

I use the terminal extensively. Over years my screen has grown wider but not taller. I really like to be able to see a lot of lines, but I cannot read small font sizes. What to do?

I needed a font that was readable at small heights, and I was willing to trade width for the height. I found DroidSansMono which is moderately wide, but I really wanted it much wider and a bit lower.

Using FontForge I transformed DroidSansMono to be 130% wider and have less white space at the top and bottom. I call it DroidSansMonoWide. It works for me. Maybe it works for you, too?

Posted in Uncategorized | 1 Comment

Parallel disk I/O: Is it faster?

Being the developer of GNU Parallel I often meet the question: Is it faster to do disk I/O in parallel or sequentially?

The answer is a very clear and resounding: It depends.

In the simplest case where you have a single spinning disk (“one spindle”) it will normally be faster do sequential I/O. But see http://unix.stackexchange.com/questions/124527/speed-up-copying-1000000-small-files for an example that contradicts this.

If you instead have a RAID6 over 40 spindles, things are different: On such a system I got a 6x speedup by running 10 jobs in parallel. Fewer jobs or more jobs gave less speed up.

Network file systems are stored on physical servers, so the above applies to network file systems, too. On top of that the network can introduce a latency, so that it is slow to open a file, but when the file is open, you get the data fast. In this case you will often see a speed up, too. Distributed network file systems that are spread over several nodes will in most cases work faster if you can keep all nodes busy.

In the general case: If there is long latency (which is not caused by the parallelization), then parallelizing may be a good idea, because while one job is waiting due to the latency a a different job can be receiving its data.

With SSD, RAID, different network file systems, and caching there is really only one safe answer: Test with different parallelization and measure.

Posted in Uncategorized | Leave a comment

Recording long session with Samsung Galaxy S3

Today I recorded 6 hours worth of video on my Samsung Galaxy S3. I used a thin tripod with a mobile phone mount. That worked great. I asked the organizer if recording was prohibited. It seems it is harder to say “Yes it is prohibited” than say “No that is not allowed”, so I recorded the session.

I have a 32 GB SD card so space would not be an issue; at least that is what I thought. But the card broke down (fsck failed), and I had forgotten to bring a MicroSD to SD-card adapter, so I could not just fix it on my GNU/Linux laptop. Instead I had to rely on the internal memory of the phone, so I had to adjust the quality to 1 Mbps which is around 1 GB/hour.

I had brought a extra battery and a USB-battery pack. The extra battery was not important, but the USB-battery pack worked brilliantly. It was connected to the phone during must of the time.

What I would do next time:

  • Bring an extra empty MicroSD card
  • Have an MicroSD card adapter in the laptop
  • Bring USB-battery pack and cable
  • Find a way to stream+upload using wifi directly
Posted in Uncategorized | Leave a comment

Det lave fødselstal

Publiceret i JP 2014-10-05 under titlen “Ønskebørn fra Burma”.

For et år siden var jeg i Burma, hvor jeg besøgte et børnehjem. Børnene er raske, men lever yderst spartansk, og børnehjemmet er afhængigt af religiøse donationer for at løbe rundt.

Vi er knap 7,5 milliarder på jorden, og hvis alle skal have en cykel, et køleskab og en laptop, kommer vi til at trække meget store veksler på Jordens ressourcer. Jeg er ikke i tvivl om, at miljøet ville finde det helt fint, hvis vi var lidt færre mennesker.

I Danmark har vi i dag både arbejdsløshed og manglende praktikpladser, og vi bruger ressourcer på at stoppe udlændinge i at komme til Danmark, for at de ikke skal tage arbejdspladserne eller komme på offentlig forsørgelse. Det ville ikke være et problem for samfundet, hvis antallet af praktik- og arbejdspladser svarede bedre til antallet af danskere.

Derfor bliver jeg lidt forarget over, at man ser det som et problem, hvis fødselstallet daler, og vi bliver færre danskere. Hvis vi mangler børn, så lad os gøre det nemmere at adoptere: Børnene fra børnehjemmet i Burma vil være lykkelige over at blive adopteret som ønskebørn.

Hvis vi mangler arbejdskraft, kan vi slække lidt på reglerne for de udlændinge, der vil gøre alt for at blive 100 pct. danske. Og miljøet vil vinde i begge tilfælde.

Posted in Uncategorized | Leave a comment

Patenteret teknologi – advarsel

Jeg bladrede for nyligt i et teknologiblad. En af annoncerne proklamerede “Patenteret teknologi” om deres apparat. Det var tydeligvis ment som noget positivt, men det første jeg tænkte var: “Tak for advarslen, så ved jeg, at jeg næppe kan få kompatibelt udstyr og vil være i lommen på een leverandør til f.eks. reservedele”.

Da jeg var dreng, tror jeg, at jeg muligvis betragtede “patenteret teknologi” som noget positivt – uden dog at kunne forklare, hvorfor det skulle være positivt. Men idag kan jeg se, at min rygmarvsreaktion er at det er negativt, og at jeg ovenikøbet kan forklare, hvorfor det er negativt.


Posted in patent | Tagged | Leave a comment

Happiness – what else do you want?

I recently watched MoreVanilla SkyInceptionSurrogatesTotal Recall, Equilibrium, and The Matrix. While there are a lot of things I do not like about those movies, they circle around an important question: Given the choice would you choose to be happy for the rest of your life?

Bhutan has a Gross National Happiness Commission that oversees legislation, so that legislation does not decrease the national happiness. Whether it works in practice I do not know, but I honestly believe it is important.

For a short time I consulted for a company that focused on customer’s satisfaction. Everything else was secondary. And there is some truth to it: If the customer got a crappy solution, but was satisfied, then that is better than a customer who got a perfect solution but was dissatisfied.

Dan Gilbert demonstrates that happiness can be synthetic.

His lecture made me actively commit to choices – and not try to undo a choice where the alternative would only be marginally better. Also I actively stop myself when I start thinking “if I had only done this or that, then everything would be better,” and instead accept the way things are now. Given the choice between a bit more money or more happiness, I always choose the happiness option these days.

The movies considers different techniques for making you happy: Glasses, entering a dream world, implanted memories. I don’t really see these techniques would work in reality, and Dan Gilberts synthetic happiness only goes so far. But what if you could be drugged into happiness?

Except from the bad side effects cocaine and heroine seem to give its users happiness. So what if you could make a drug that would give you the same high every time and which had no side effects? Or an implant that will give you a boost of happiness at the push of a button?

What do you want from life – deep down? When I ask people they tend to answer: “I want to be rich/famous/powerful/have a family/make a difference”. And why: “Because then I will be happy.” But what if we could short circuit that, so you can be happy without going the indirect way?

Posted in Uncategorized | Leave a comment

Perl profiler with NYTProf and Kcachegrind

I have been unable to find this simple example:

perl -d:NYTProf testme.pl; nytprofcg; kcachegrind nytprof.callgrind

Posted in Uncategorized | Leave a comment


Navn Sprødhed Smag Pris/kg
Jonagored 50 Neutral 15
Pink Lady (Cripps Pink) 80 Sød, neutral 22/18 på tilbud
Kanzi 80 Sød, med kant 24
Kiku 60 Kedelig 20
Royal Gala 70 Neutral 16
Royal Gala (Superbrugsen) 70 Syrlig 16
Polsk Gala 30 Vattet 10
Royal Gala (øko) 70 Sød 18
Aroma 50 sød 15
Gråsten 40 vattet 20
Aroma 60 sur, men fin blandet med Pink Lady 15
Elstar 60 God syrlig 15
Posted in Uncategorized | Leave a comment

Q: Hjælpes produktionsvirksomheder ved et ‘nej’?

Pernille spørger:

Hvordan bliver produktionsvirksomheder påvirket, hvis Danmark står uden for patentdomstolen?

Kære Pernille.

Tak for spørgmålet.

Hvis virksomheden har sin udvikling og produktion i Danmark, men eksporterer til EU-patentområdet, så vil virksomheden have nogle fordele, som konkurrenten i EU-patentområdet ikke har: Virksomheden behøver ikke respektere EU-patenter i sin produktudvikling og produktion, sålænge selve produktet, der eksporteres, ikke krænker EU-patenter.

Man kunne f.eks. forestille sig, at computerkontrolleret åbning af en støbeform på det rigtige tidspunkt er patenteret. Man ville kunne opnå samme effekt ved manuel åbning af støbeformen, men da mennesket ikke har samme præcision, er man nødt til at kassere en større del af produktionen. Hvis patentet ikke gælder i Danmark, så kan virksomheden frit bruge den computerkontrollerede metode i produktionen, hvis bare slutproduktet ikke krænker patentet.

Produktionsvirksomheder, der udtager patenter, vil kunne udtage EU-patenter uanset om Danmark er med eller ej. Jyllands-Posten slår fast, at det ikke giver en væsentlig besparelse ved at være med: http://jyllands-posten.dk/politik/ECE6714169/ja-til-patentdomstol-giver-ikke-jobfest/.

Har du lige som Pernille spørgsmål om EU-patentdomstolen, som du ikke har kunnet finde svar på, så skriv til patent@tange.dk.

Posted in patent | Leave a comment

Q: Kan et pizzeria rammes af softwarepatenter?

Jesper spørger:

Kan pizzeriaer rammes af softwarepatenter, som Pernille Skipper hævder på http://ekstrabladet.dk/nyheder/politik/danskpolitik/article2283842.ece

Kære Jesper.

Tak for spørgmålet.

Der er flere patenter, som kunne være relevante for erhvervsdrivende som et pizzeria:

Så også pizzeriaer risikerer en ubehagelig ekstraregning. Heldigvis er ingen af oventstående patenter gyldige i Danmark. Men hvis patenterne var udstedte som EU-patenter (og Danmark var med), så ville danske virksomheder kunne opkræves licens for brugen af disse. Pizzeriaet kan prøve at holde softwareleverandøren ansvarlig, men ofte indholder softwarelicenser en pasus om, at man ikke kan holde leverandøren ansvarlig, og under alle omstændigheder aldrig mere end hvad man har betalt for softwaren.

Står vi udenfor EU-Patentdomstolen, vil kun 10% af patenterne være gyldige og dermed bliver problemet mindre.

Har du lige som Jesper spørgsmål om EU-patentdomstolen, som du ikke har kunnet finde svar på, så skriv til patent@tange.dk.

Posted in patent | Leave a comment