Jach's personal blog

(Largely containing a mind-dump to myselves: past, present, and future)
Current favorite quote: "Supposedly smart people are weirdly ignorant of Bayes' Rule." William B Vogt, 2010

Intangible costs matter in compensation packages

If you commute to work by car, what would you rather have: free parking or a $4k increase in annual salary?

Note that if you pay $15/day for parking, and take no days off, that comes out to $3900. So the raise is strictly more than the cost, even.

I would pick parking. That's because even though raise > parking_cost, the actual comparison is raise vs. parking_cost + intangible_costs.

See Full Post and Comments

The mythical C and C++ replacements

I watched this recent talk by Bryan Cantrill, and thinking about it got me to write up some older periodic thoughts. It's probably worth reanalyzing this topic every few years (especially if I look deeper into any of the languages listed below) but consider this the first one.

Unlike Bryan I'm more interested in the theoretical replacement language for game programming rather than systems programming. The big "enemy" here is C++, but C is still very common especially at the library and middleware layers, so I think we're in alignment in generally aiming at C and C++ together.

See Full Post and Comments

Ramblings on data structure literals

I've been stewing a bit about Clojure's pretty data structure literals, and finding myself wanting them in other languages. In Common Lisp, maybe enough to use one of the various reader macros for maps. But what is it I really want?

In PHP, you used to have to do array() to make a new array or list. You could have data literals though: array(1, 2) for lists/arrays, array('foo' => 3, 'bar' => 4) for maps. It worked for me. I didn't need literal syntax for sets or anything else.

Later on I learned Python, I prefer the syntax a bit more. (1,2) for a "tuple" (list), [1,2] for an array/list/stack/queue/... very versatile, {'a': 3, 'b': 4} for a map. In JavaScript it (can) be about the same for arrays and maps, though you can leave off the key quotes for maps, but leaving them there (and using double quotes) has the nice side-benefit of being more likely to be valid JSON. It depends on whether your value is something serializable or not of course.

See Full Post and Comments

Japan Trip Part 2: Day log

In the previous post I discussed my initial planning and costs for my two-week trip to Japan that I took last month, this post will just be about my personal notes as I wrote them up on what I did each day as well as some choice pictures. The whole picture gallery can be found here.


I left the morning of the 15th PST from Seattle, had a brief stop in San Francisco, then continued on to Tokyo and arrived on the 16th local time in the afternoon. I made it to the hotel (Hotel Villa Fontaine) around 4:30pm. The main flight was long but not as bad as it could have been, I had just enough leg room and could stand and stretch. The extra leg room upgrade was the correct choice. I managed to avoid using the crapper but it was quite the relief to land and use the first one I found at the airport. ;) I didn't test out the well-known common spray features until I got to the hotel though.

See Full Post and Comments

Japan Trip Part 1: Planning and Costs

Last month I went to Japan for two weeks! Yes, by myself. Leaving on Dec 15th, with the help of an 11 hour flight and timezone changes I arrived on the 16th and stayed until it was time to leave on the 30th. Most of the time was in Tokyo. I had a great time, and kept some notes about what I did most days, so I'm typing them up as well as embedding a few choice pictures. If you want to look at pictures without context, they are here.

For this post I'm going to just write about my travel prep, and leave the details of my time there for my next post. I didn't fully commit myself to going until around November 6th. As such my flight and hotel costs almost certainly could have been lower, but I don't think the whole trip was that expensive. I paid $1358 for the base flight, which went from Seattle -> San Francisco -> Haneda plus about another $170 + $180 + $50 for some leg room extension upgrades on 3 of the 4 flights. At least this seemed to qualify me for 2 free checked bags rather than $50 each as is pretty common. For the international flights, being as tall as I am (about 6'5"), I found this to be a necessity rather than a luxury. There were some additional possible upgrades to what looked like a pod you could fully recline in, something to consider for next time.

So in total, cost of flight was about $1750. With earlier planning, and/or if you're smaller so don't require the extra legroom seats, I'm sure you could find something for half as much. (I actually found some flights around $800 even as late as I was looking but they were multi-stop huge travel time endeavors.)

See Full Post and Comments

Logit and Expit

Logit, or log-odds, is a sometimes useful function for dealing with probabilities in a more intuitive fashion. Expit is its inverse. This was kind of a tricky algebraic proof for me, but I am out of practice... For the following, assume I'm using log() function in base 2, because I'm a programmer.

[math]logit(p) = log(odds(p)) = log(\frac{p}{1-p}) \\
expit(p) = \frac{exp(p)}{1+exp(p)} = \frac{2^p}{1+2^p}

In order to prove these are inverses, I am going to prove that

See Full Post and Comments

Just let me type

I like typing. Many programmers don't seem to, but that's ok, we still manage to work together. Except I basically have to use Eclipse for work. (Some people use IntelliJ but I've tried it, it's not sufficiently different or better for my work use-case...) And Eclipse frequently gets in the way of me just typing. I know there are things I could do to alleviate it, but I shouldn't have to!

For example, I want to add braces around a lambda to expand it to a more complicated lambda. I move the cursor to the start of the lambda body, type '{', and... I get a '{' at the end of the line. Syntax error, not what I wanted... I'm still not sure how I eventually got my brace there but it totally took me out of my thought processes to solve this error.

Other times, the whole UI will lock up as I'm typing due to the intelli-sense stuff. I type . and try to type the method name, but it locks up. I'm not even pressing ctrl+space to have it autocomplete, it can still lock up. The worst is when it "can't find a completion" and has to pop up a dialog telling me about that after I waited for many seconds, and I know the completion exists, but some issue has made Eclipse unable to find it which usually resolves with some form of restarting/project nuking.

See Full Post and Comments