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

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

Passionate about what again?

I was looking at my resume from 2014, which I haven't really updated since then since I've been employed. One of the line items is "Passionate about Linux-as-a-platform and open source software."

But I haven't really made any open source contributions worth mentioning since 2012. And while my employer runs Linux in production, a lot of the fellow developers seem to prefer their macbooks or their mac towers to the Linux tower option (we have no Linux laptop option so I use a windows laptop to remote to my Linux tower), and there's been talk for a while now about running docker in production instead. In any case I don't work anywhere near that level in our tech stack, my life is mostly a backend Enterprise Java app hell with occasional forays into our enterprise frontend hell...

I've since learned to be more passionate about making quality software first, but I'm still pretty ambivalent when it comes to existing tire fires. That is, it's fine to make them a bit worse, try not to make them a lot worse (though that is hard to do), it's better to make them more manageable or contained (yay a few unit tests here and there..), and it's impossible to ever put them out. So I think for my resume update I'll put "Passionate about Linux-as-a-platform, open source software, and quality software first." but I know in an interview setting I'd only be able to talk about the benefits of using and contributing to open source, without having much to show on the contributing part since 2012.

See Full Post and Comments

Google WhoIs Protection Doesn't Protect

So, I own the domain but not its content. All my domains I've registered through google (and they then register it with enom) because it used to be pretty simple to register and then configure, it was a consistent $10, they didn't try to upsell me a gazillion things, and their auto-renew policies are kind. (I lost a domain to iDotz before. Never Again.) Additionally they provided whois protection for free. I don't really care about that these days but it was more important to me then (and should have been more important to an old acquaintance I once freaked out when I discovered their name and address simply by checking whois...), in any case it's a nice to have, especially because I hate being forced to be dishonest to protect something. The last name I gave Google was fake as you'll see, but the address used to be a place I lived.

Tonight I was going through my spam folder because gmail's spam filtering has gotten a lot worse than it once was. Found a non-spam email of course. And then I found a spam email about the above domain name expiring this month and telling me to click a link to pay for renewal. (If you actually check the whois, you'll see that it doesn't expire until January.)

What startled me was that it contains the very fake last name and once real address (from which you could infer my last name of course if you wanted to do it the hard way) that google knows, but isn't part of the public whois record. So what gives? How did the info leak? Was there a DB breach I didn't hear about? Or is it trivial to just contact the whois privacy agents and get the real data?

See Full Post and Comments