blog of phrog

Nil vs Null

In Java the most “popular” error is java.lang.NullPointerException. The problem is so pervasive, so bad, that there are even things like java.util.Optional and The purpose (insofar as I understand it) is to get callers of methods to actually check if something was returned by a method call. The problem is that every object variable (any variable that is not a for a primitive type) in Java is actually a reference, that is, a pointer.

Stupid simple go code "generation"

One of the most common complaints, if not the #1 complaint, about go is its lack of generics. Generics can be extremely powerful, and very helpful in reducing copy/paste/hack coding. Generics can also lead to very confusing/abstract code. What go does offer to mitigate the headache of managing boilerplate code is go generate. Go’s code generator facility allows a programmer to write any program they like to generate any code they like.

How Many Cans

I did a post somewhere a while back about how many cans fit in various bags, along with a screenshot of a spreadsheet. I’ve now added some more bags to my collection, and created a google spreadsheet with the the stats. Here’s the summary: Cans Bag 27 Tom Bihn Synapse 19 34 Northface Diad Pro 22 38 Chrome Citizen 39 Chrome Bravo 2.