Snippets and Thoughts From the Life of a Software Developer
Hyper-log-log
written by tomjen,
estimated reading time about 4 minutes
In which the author presents a neat algorithm that counts distinct elements from very large input sets with bounded memory.
Zipfs law and my ineptitude, part deux
written by tomjen,
estimated reading time about 3 minutes
Sometime ago I tried my hand at proving Zipfs law using Saint Thomas Aquainas Summa Theologia. The attempt was a complete failure, so I wanted to try again (once bitten, twice shy, and you don’t grow up to be a nerd). This time however I went with Kotlin (an awesome new language for the Java virt...
Do people get married later than normal?
written by tomjen,
estimated reading time less than 1 minute
Fair warning: this entry doesn’t contain or use a single line of code. I got curious browsing Gabminders data and saw that they did have historical data for first age of marriage for a bunch of countries. I took the data from England, because they have fairly early records.
How it works: Automatic garbage collection
written by tomjen,
estimated reading time about 13 minutes
Most “modern” programming languages do not require (or permit) the programmer to write code that directly handles memory. The reason is two-fold: first allowing this means that the programmer may end up introducing hard to find bugs which can lead to the program leaking memory, corrupting data or...
Unusual Datastructures: The Bloom Filter
written by tomjen,
estimated reading time about 8 minutes
As a programmer you are familiar with basic data structures: arrays, hashtables and linked lists. These data structures easily cover more than 99% of use-cases (with arrays and hastables alone covering something like 98.5%) but knowing which use-cases each is suitable for are important otherwise ...
What 80/20 really means
written by tomjen,
estimated reading time about 2 minutes
I am so bad at understanding exponential numbers that I almost expect it is a flaw that is purposely built in, but of course it is just because humans didn’t grow up in an environment where there was a use for it, so I didn’t inherit the gene to do so. As a crouch for this, because humans are gre...
Racism
written by tomjen,
estimated reading time about 13 minutes
What can an oversimplyfied computer model tell us about racism?
Understanding Pointers in C
written by tomjen,
estimated reading time about 15 minutes
Are you currently learning C, but either haven’t learned pointers yet, or do they seem to be totally mysterious? Then this article is totally for you. Pointers have always been the first point where early programmers hit a really difficult subject, so if you feel stuck with it don’t worry – they ...
PhpStorm and the Brilliance of Emmet
written by tomjen,
estimated reading time about 2 minutes
I have a man-crush on the IDEs made by intelliJ, because they are clearly build from the principle that makes great software: know your customers very well and anticipate exactly what they want to do, then make that easy. Case in point, Emmet, an HTML shorthand (also with a cheat sheet). HTML is ...
The winner takes it all
written by tomjen,
estimated reading time about 4 minutes
What does books, songs, movies, photography and websites have in common? Three things: high upfront costs, low marginal costs (the cost to let one more person see, hear or use the product) and the price is the same (on the internet: free with ads). Normally when you buy something it is a trade-of...
Wonder and Complexity
written by tomjen,
estimated reading time about 3 minutes
Have you ever yelled at your compiler? I have. Heck I have even flipped the machine the bird, even though it couldn’t possibly care. Even though I knew perfectly well that it couldn’t care. Why do we do this? Because we get frustrated when it doesn’t understand us. After all what we are trying to...
Why ads suck
written by tomjen,
estimated reading time about 7 minutes
“Ads suck” may seem like an obvious truism, but they actually don’t have to – papers used to print job ads and people would buy the papers so that they could read them. Think about that for a moment, people would buy newspapers to read ads. Sure if you had a good job those particular ads wouldn’t...
Not some mere addition
written by tomjen,
estimated reading time about 5 minutes
This has absolutely nothing to do with computers, technology or programming, but I found it interesting as an exercise in shifting perspectives regardless. In philosophy there is a somewhat famous problem called, depending on who you talk to, either the “Repugnant conclusion” or the “Mere additio...
Shares killed newspapers
written by tomjen,
estimated reading time about 4 minutes
TL;DR: by making it possible to share individual articles newspapers have to compete too hard for them to make a profit, which forces them to go with more annoying ads. GigaOm recently had to shut down its operations because they ran out of money — or as they put it: >Gigaom recently became un...
Diving into String (Java)
written by tomjen,
estimated reading time about 2 minutes
Ah yes, String. Almost certainly the most used class in the Java and yet I bet you never looked at the source code? Well there is no time like the present, so lets dive in (source code, if you want to follow along). Okay, first thing first, what happens when we create a string? public String(Stri...
Taking apart StringBuilder (Java)
written by tomjen,
estimated reading time about 5 minutes
If you are a Java developer, you almost certainly know that it is better to use a string builder than to add strings together. You may also know that you should use StringBuilder rather than StringBuffer because the latter is thread-safe which means it has a wasteful overhead if you don’t need it...
30 days of cold showers
written by tomjen,
estimated reading time about 5 minutes
I don’t know where the idea of the 30 day habit started, but I found out about it via Steve Pavlina, who may have invented it. The basic idea behind this is relatively simple: you have some habit that you are considering adopting but aren’t entirely sold on the idea – so you try it out for 30 day...
Zipfs law
written by tomjen,
estimated reading time about 4 minutes
Recently I have been reading Christian Rudders book Dataclysm, and in it he mentions a very interesting result: If you rank all the words in a text and then multiply the rank of each word by how often it occurs what you get is, approximately, a constant. This is just another way of saying that th...
30 day challenge january — plan the next day
written by tomjen,
estimated reading time about 1 minute
I don’t know where the idea of the 30 day habit started, but I found out about it via Steve Pavlina, who may have invented it. The basic idea behind this is relatively simple: you have some habit that you are considering adopting but aren’t entirely sold on the idea – so you try it out for 30 day...
ArrayList under the hood
written by tomjen,
estimated reading time about 13 minutes
List<string> strings = new ArrayList<string>(); How many times have you written something like the above? Likely many times if you are a Java developer. ArrayList is one of the most common List types if not the most common and why not? It is basically an automagically re-sizing versio...
30 days habbit, November 2014: take a picture a day, track with habit RPG
written by tomjen,
estimated reading time about 2 minutes
I don’t know where the idea of the 30 day habit started, but I found out about it via Steve Pavlina, who may have invented it. The basic idea behind this is relatively simple: you have some habit that you are considering adopting but aren’t entirely sold on the idea – so you try it out for 30 day...
30 days habbit, November 2014: take a picture a day, track with habit RPG
written by tomjen,
estimated reading time about 2 minutes
I don’t know where the idea of the 30 day habit started, but I found out about it via Steve Pavlina, who may have invented it. The basic idea behind this is relatively simple: you have some habit that you are considering adopting but aren’t entirely sold on the idea – so you try it out for 30 day...
Trusting Wizards
written by tomjen,
estimated reading time about 9 minutes
There used to be two groups of highly trained experts whom the average person could reasonably risk expect to need help from and whom they had no real way to check up on, other than talking with other members of the same group: Doctors and lawyers. Not incidentally those are both licensed profess...
30 DAY HABIT, OCTOBER 2014: MEDITATION WITH BEEMINDER
written by tomjen,
estimated reading time about 3 minutes
Sorry for the delay in posting this, I had totally forgotten about it I don’t know where the idea of the 30 day habit started, but I found out about it via Steve Pavlina1, who may have invented it. The basic idea behind this is relatively simple: you have some habit that you are considering adopt...
The Acceleration of Anti-Addictiveness
written by tomjen,
estimated reading time about 7 minutes
This essay is a response to Paul Grahams “The Acceleration of Addictiveness”1. I very strongly advice you to read the original essay if you haven’t already done so. Also keep in mind that I am writing this more than four years after he published his essay, so while I have the benefit of hindsight...
The counter to “if you have nothing to hide”
written by tomjen,
estimated reading time less than 1 minute
If you have nothing to hide, you have nothing to fear One of the sleaziest political arguments (if not the sleaziest political argument) of all time. The worst part about it is that it is a simple saying, which takes 30 minutes to refute which might as well be an eternity when you are given 15 se...
Don’t give your users a bad first experience
written by tomjen,
estimated reading time about 1 minute
Some months ago I got around to upgrade my old CRT-tv to a flatscreen. I first figured that if I hooked up my old Mac Mini to it I could use that to watch whatever service (netflix, youtube, etc) that I wanted. The tv cut of the sides of the screen and I was pretty pissed and assumed it was becau...
Shutdown phrases
written by tomjen,
estimated reading time less than 1 minute
Thank you, I will take that under due consideration. I can’t believe you suggested that. Sometimes the best thing to do is to shutdown a conversation right then and there, without going into a debate over something, for whatever reason. Most of the time the other person will respect that, happily...