TheJach.com

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

Orwell on Object Oriented Programming

I was re-reading Orwell's Politics and the English Language tonight, it's been many years. One new insight I got from it came from this subsection of a paragraph:

As I have tried to show, modern writing at its worst does not consist in picking out words for the sake of their meaning and inventing images in order to make the meaning clearer. It consists in gumming together long strips of words which have already been set in order by someone else, and making the results presentable by sheer humbug. The attraction of this way of writing is that it is easy. It is easier -- even quicker, once you have the habit -- to say In my opinion it is not an unjustifiable assumption that than to say I think. If you use ready-made phrases, you not only don't have to hunt about for the words; you also don't have to bother with the rhythms of your sentences since these phrases are generally so arranged as to be more or less euphonious. When you are composing in a hurry -- when you are dictating to a stenographer, for instance, or making a public speech -- it is natural to fall into a pretentious, Latinized style. Tags like a consideration which we should do well to bear in mind or a conclusion to which all of us would readily assent will save many a sentence from coming down with a bump. By using stale metaphors, similes, and idioms, you save much mental effort, at the cost of leaving your meaning vague, not only for your reader but for yourself.

This is the essence of bad OOP, characterized most humorously by Steve Yegge's Execution in the Kingdom of Nouns. It's a funny observation that many Javalanders are very happy with Java, and as Orwell says, it's easier, and quicker once you're in the habit, to fire up Eclipse, autocomplete and autorefactor this and that, sling giant names and namespaces around that still somehow fail to describe what's happening, and be satisfied by completing your story with the minimum of mental effort. Clojure is the antidote for anyone unhappy about being in Javaland. But I don't think Clojure will ever be as popular as Java, and it can at most hope to be bundled with the JDK. Simply because as Hickey says, simple does not mean easy, and as we've seen repeatedly in history, people choose the presently and evidently easy path even when it's against their long term interests. (Not that working with Clojure is an exercise in doing things the hard way -- it wouldn't be as popular as it is if it didn't make certain things, like Java interop, very easy as well as very simple -- but Clojure does require more mental effort overall because it makes it harder to get away with sloppiness.)

See Full Post and Comments

Installing NoMachine on Gentoo

I had some trouble getting the NoMachine server to work on my Gentoo box, but eventually I prevailed. I'm putting this out there in case anyone else had some issues.

This page is accurate to start out with: https://www.nomachine.com/AR03L00789 Extract the archive to /usr/NX, run the installer with --install redhat. If you want to add the /etc/init.d/nxserver service to startup, you'll have to use rc-update yourself.

If you don't install to /usr/NX, you may find an error starting the nxnode or nxd services. At least I did. Anyway, now you can try to log in, but you'll probably fail. In that case, run /usr/NX/bin/nxserver --userlist and verify there are no users. That's the first problem. Remedy it with /usr/NX/bin/nxserver --useradd <yourusername> --administrator. You're not done yet though. The nx user needs to be in the wheel group (su), so run usermod -a -G wheel nx. Finally, run /usr/NX/bin/nxserver --restart and you should now be able to login. Have fun!

See Full Post and Comments

Remark on the decline of Hacker News

Hacker News has been going downhill since at least 1237 days ago (https://news.ycombinator.com/item?id=2403696). But it's an interesting decline. Maybe not for the most part anymore, but for a large part, the site is still pretty good. Every now and again something really precious will still come along, even if it's rarer than it once was. But a lot of things are just sorta-good, sorta-precious. For instance, this post about the Stalin Scheme compiler is on the front page this evening: https://news.ycombinator.com/item?id=8214343

The first thing a good hacker should notice is "Cool! A language compiler! And for a dynamic and powerful language like Scheme, not C!" It's a technical project only certain types of hackers would be interested in. This makes it good. But what makes it less good is that it's such an old project, that any hacker who has had a slightly more than passing interest in Scheme the language has probably come across Stalin before. And Chicken Scheme, and so on.

So there's the problem of Hacker News submissions being sorta-good. This is what keeps the site alive. Now we look at the comments... not only are they almost all meta (a bad sign in itself), there's a crap ton of people complaining about the name! One even hints at getting the creator of the project fired from his position as a professor at his university, because of the name. This isn't outside the realm of possibility. The linked post is at once both a display of what keeps Hacker News good-enough and the ultimate real problem with Hacker News: its comment culture. The Hacker Aesthetic is all but extinct. People have to watch what they say, even if it's clearly a joke. It's depressing.

See Full Post and Comments

What if we used Scrypt with one-minute work factor for SSNs?

I've only lived about 24 years on this planet, and already I feel like my SSN has probably been compromised somewhere due to the leaky information channels I've had to transmit it, database hacks (published and unpublished) of big companies (government or non-government), a couple mistakes on my part, and maybe some other reasons. It'd be nice if this weren't so, just about every story I hear of people who do get an attacker is unpleasant. I don't want it to happen to me.

Would Scrypt be a panacea? No. But it would surely be better than what we have now. We could make it so that there's only a single point of failure instead of multiple ones in easily identifying the link between a person's name and their SSN by having that unhashed association existing within one government agency and nowhere else. (Make it illegal to store SSNs unhashed.)

If my SSN is required, the party requiring it can give me a publicly known salt (for instance, their company name) and request I send them my full legal name and the result of scrypt(SSN, genSalt(work_factor) + salt + interactionNumber) where work_factor is such that on the latest AMD GPU generating the hash takes, say, one minute. For an average person's CPU, this could take quite a bit longer. interactionNumber is just an integer representing how many times the company has had to request the SSN. Say they're a loan company: you want a loan, you give SSN hash (and probably a hash with a credit agency's salt+interactionNumber too so the loan company can look up your credit score). If you want a new loan, or an extended loan, you give a new SSN hash with a new interactionNumber.

See Full Post and Comments

Random birthday gifts

It's difficult to shop for others when you don't really know what they want. Especially if they are financially stable enough to in all likelihood already have what they want that's in the $20 or less range.

My method: I grab a random word from my computer dictionary with cat /usr/share/dict/words | shuf -n 1, enter it into Amazon's search bar, and see if anything I think the other person might be kind of interested in shows up. If not, I try more words. This has led to some good finds, and the recipients did enjoy them. It seems unlikely I or they would have found them otherwise.

I'm thinking of making a simple Clojure application that makes this process easier (since sometimes I'll have to go through a lot of random words). I spent some time today looking at doing native UIs in Clojure, alas it looks like there's no really awesome solution yet. (My feelings about Seesaw are a little cold...) I've thought about having a web app instead since holy crap the box model and the image tag are a godsend to UI development, but then I can't use PhantomJS. We'll see if I maintain interest in this or not.

See Full Post and Comments

Understanding opposing frameworks

I was reading about the ideological Turing test and Krugman's remark about not being able to explain what a Keynesian economic argument is struck me as interesting. Personally I don't have too much respect for Krugman -- he has made what I think are really stupid statements (especially on bitcoin) in the past.

I admit I don't really get what a "Keynesian economic argument" should look like; my econ knowledge and opinions are acquired in my spare time. I admit I don't know the underlying framework of the theory that generates various statements. All I know is that when I encounter certain statements, the framework I'm reasoning from disagrees with them. For some cases (like some things Objectivists say) I do understand the underlying framework, because I used to be there, but I reexamined the foundations and found them lacking, so I moved on. For unfamiliar cases, the fact of disagreement may give me pause to consider reevaluating my foundations again, or if I'm particularly interested to evaluate the other person's foundations (if they even have any).

Should I spend more time understanding an opponent's framework? I'm not so sure I should. Imagine someone comes to me and proclaims 2+2=5. Well, reasoning under PA (and ZFC et al.) I know that's false. I'm very confident in PA answering this sort of question correctly, so I'm not very inclined to double-check the axioms and arithmetic functions. I'm also not too inclined to understand what sort of madness led the other person to proclaim such a wrong fact, even if their madness is a coherent logical system (e.g. PA with one additional axiom that special-cases 2+2 to be 5, but 1+3 is still 4 and so on).

See Full Post and Comments