Arnt Gulbrandsen
About meAbout this blog
2018-12-20

15000% improvement

I've been working on something that, I think, ought to perform 30%-200% better than the current solutions, depending on the workload and how the measurement mixes values for average/­typical/­best-case/­worst-case time and space. Some workloads might get more than 200% improvement, and I hope less than 30% will be rare.

The very first time I tried to measure the entire system, however, my measured result wasn't 30% improvement or 200%, it was a little over 15000%. Three zeroes. And I wasn't even trying to make a misleading benchmark — I just wanted to measure how well my code worked and I suppose I unconsciously concentrated on parts where the differences should show up clearly.

15000% certainly is a clear difference.

It's also totally meaningless. It measures something you'll never, ever do. However, it's a fantastically big number, I know that I was honest, and it has taught me that even if benchmark results are laughably unrealistic, it's not always because someone tried to brag or mislead. Maybe they are just myopic. Focused on the details of their work.

I've spoken harsh words about other people's benchmarks in the past. I don't think I will do that any more.

Update: 1500000‱.

Update: And the best way to represent it is with a logarithmic bar graph. Most people do not really understand a log scale, but the difference still looks very large and so the meaning is preserved. The label on the y axis makes it formally correct.

2018-12-11

A recipe for limoncello and marmalade

There are many limoncello recipes on the web, but so many are careless or incomplete that I add ours to the cacophony. Key points: You have to use the right kind of alcohol, you have to taste every day while you steep zest in alcohol, and the leftovers make lovely marmalade. Ingredients:

  • Alcohol (60-96%, not 40%)
  • Sugar (either white or light brown)
  • Water
  • Lemons
  • Pectin

For 1l of 96% alcohol, you should have 1-1.5kg of sugar, 2kg of lemons, and the amount of pectin depends on the lemons and your endurance. The amounts below assume 1l of 96% alcohol.

The reason that you can't start with 40% alcohol is that the end result has to contain about 32% alcohol in order to remain entirely fluid in the freezer, and the alcohol is mixed with a syrup. If the syrup is to reduce the alcohol content by only 8%, you would have to make it with just a few tablespoons of water, and you simply cannot dissolve enough sugar (more…)

2018-10-20

He's dead, but he won't lie down

Windows XP should be dead years ago, but but the number of web browsers using XP seems to not even decrease. And not at a negligible level, either, XP is used several times more than linux.

Progress is hard.

2018-10-11

Art on this blog

Art was not the purpose of this blog, but I posted a photo of a bridge and liked the result. Whenever I posted something after that, I'd see some art when I proofread what I had just posted. Until the flooded bridge was no longer on the front page and I discovered that I missed it.

So I'm going to post some pure art every year, enough that there usually is something on the front page of the blog, because art is good for the mind. Perhaps that's also why I have a painting, a reproduction, and an abstract photo in my office too, (more…)

2018-09-21

Seeing like a state

This is the third blog posting in three days. The intelligent reader may have guessed it: I'm tidying my office again. Yes I am. One desk is tidy already, and while working on the second desk, I found a book called Seeing like a state in one of the piles.

There was a note sticking out of page 352, so of course I opened the book and started reading.

The book is a strong condemnation of various well-intended reforms and schemes. Why did so-and-so agrarian reform fail? Because the reformers expected reality to match a simplistic model and when it didn't, they tried to bend reality to their model instead of the other way around. In some cases reality eventually bent (at considerable cost to the people whose lives were being reformed), (more…)

2018-09-20

Jelly Pro, Android 8.1

Many more months have passed, the Jelly Pro is still in my life, and it now runs Android 8.1.

Android 8.1 runs well, but one configuration setting absolutely must be changed: settings → smart assistant → power save manager and then turn that off. The power saving regime provided by Android 8 is better, and the third-party power save manager Unihertz has included confuses (more…)

2018-09-19

Live code for a small main()

This is the simplest possible java main(): int main(String[] argv){return 0;}. How many classes, constructors and methods does it require?

The simple answer, of course, is the String constructor and the String[] constructor, so that's two functions.

But it also requires whatever those two functions require, which is where the fun begins. (more…)

2018-09-11

The changing nature of breakage

Software is changing. So are its problems.

Software today is developed in a more regimented and orderly manner than twenty years ago. A few good practices have taken hold:

  • Version control
  • Code review
  • A sort of of agile development
  • Coding standards
  • Wide use of libraries, toolkits and frameworks

These are good things. Even if the agile development is often a parody of what it could be, it's still a net positive factor, in my opinion.

These good things have bad effects, too. Perhaps most notably, developers don't know what their third-party code does, and that affects what they know about their own software, and what the users can know and do.

Code gets used because of some known function, without anyone learning the full scope of functionality. Take Ruby on Rails and the action-mailer package, for example. If you want to send HTML, you probably want an add-on package that modifies your site's CSS for common mail reader compatibility, Premailer is the most common one.

There will be an issue in the issue tracker to add Premailer and fix CSS compatibiliy. Some team member will take the issue, add the necessary five lines of code, test that it looks right in gmail and outlook, write a test, and that was it. The premailer web site doesn't say whether premailer takes care of printouts (@media print {...} in CSS), and most likely noone on the team will ever know whether that works or not.

That lack of knowledge results in poor documentation and bugs around the edges. The team doesn't know everything its software actually does, (more…)