About the only social media achievement I am proud of in my life is that I am currently in the top ten of answerers on the Prolog tag of Stack Overflow. I’m especially proud of this because it’s something I’ve achieved by passion alone. I am not an especially talented Prolog programmer. Nor am I a particularly active Stack Overflow user. I don’t use Prolog professionally… in fact I tend to follow a mama’s cooking” philosophy to it which is probably less than it deserves. I even have a longstanding feud with one of the other dudes.

But I continue to enjoy answering questions on the Prolog tag of Stack Overflow. I tried Documentation once for about an hour and decided it was absolutely the stupidest idea I had ever tried out. In fact I rather hope it fails.

Each Tag is an island

If you are a casual Stack Overflow user—in other words, someone who programs but doesn’t answer questions—you may not realize that tags are informally governed by different groups differently. Stack Overflow overall is not against helping people with homework, but the Prolog tag is very much against it. Why? Because most people do not encounter Prolog as a momentary flight of fancy; instead, they get it as coursework towards some degree. A lot of seemingly innocuous questions have tells” that give this away, such as a genealogy problem, or a subway route problem, or whatever.

Prolog questions are not exactly in abundant supply. With high-volume tags like Postgres or even Haskell, you have to answer quickly. There are a lot of people who care about pruning duplicate questions. You can gain reputation quickly for a single good answer because there are a lot of eyeballs on a decent question. I’m not prepared to call this a virtuous cycle; it’s just how these things work on a higher-profile tag.

In the Prolog tag, there will be a handful of questions each day, there is no time pressure to answer in a minute or less, and a great answer on a genre-defining question might get ten upvotes. One upvote is probably the mean on the Prolog tag. There are so few Prolog experts on the site, it can take multiple days for an obviously bad question to get closed. So it’s a lot more common to answer a duplicated question.

I actually like this aspect of the Prolog tag. It gives me a chance to hone my writing. Some of my very best writing has gone into Stack Overflow. And I try to write to a specific audience: the person asking the question. I try to meet them where they are. I can guess with (I believe) reasonable accuracy what nonsense notions they believe about what Prolog is doing, because I have had those notions, and recently. Prolog is unusual, in that there are not a lot of great precedents for how it works. So there are a lot of wrong mental models of what it is doing out there.

Another interesting thing about Prolog is that there really aren’t any bad books about it. There were, in the 80s, but the books that are still circulating now are excellent. There is no shortage of great documentation about Prolog, both tutorial and detailed.

Documentation” is useless for Prolog

Let me summarize the situation:

  • Prolog already has ample (but confusing) documentation
  • There are lots more ways to fail to understand Prolog than ways to understand it
  • Clues about your mental model’s deficiencies are often obvious in the way you ask the question (“what does append/3 return?”)
  • The community is too small to use Stack Overflow’s moderation functions effectively, and the incentives don’t add up for us to use them anyway

What does Documentation bring to the table?

  • Another way to document something already amply documented
  • No help for approaching different mental models
  • Moderation-heavy process for editing and managing documents

What problem is Documentation trying to solve? I guess the idea here is to find a way to move questions (especially frequently-duplicated questions) into some kind of wiki. But that’s more stuff for people to read, who are already having trouble reading. Stack Overflow isn’t just question-answer, it’s programmer-to-programmer technical support. Documentation isn’t for anybody. It doesn’t speak to this use case. It isn’t rewarding to work on. For #prolog folks, it’s a step in the wrong direction. And indeed, almost nothing has happened on it since the day of the debut, because it obviously does nothing for us. There are 16 topics.

What about other tags?

Consider Postgres. The tag is pretty high-volume. There are a lot of server admin questions, a lot of beginner SQL query questions, but a lot of people. The same mental model thing happens, to a lesser degree. It should be documented” ten or 100 to one compared to Prolog. Instead, it has 22 topics instead of 18. Why?

I think it’s because the same comments apply. Documentation is unicast, Q-A is point-to-point. Wrong mental models of SQL are a common problem that is mostly not addressed by reading the documentation.

Another point on Postgres: it has some of the best official documentation of any project anywhere. What’s there to say about Postgres that isn’t already said in the official documentation? Examples?

Why do we like Stack Overflow?

Stack Overflow is great. We use it all the time, even if we hate it, because Google finds answers to our questions there. It’s the universal programming help desk. Stack Overflow solved a legitimate problem: taking a bunch of programmer technical support discussion and restructuring it into a resource.

Ever searched for something and found the answer on a forum like Java Coder Ranch? Where you have to skip to page 19 to try and find the actual answer to the problem, only to find out you went too far and now you have to page backwards slow to avoid all the Thanks!” shit? Had to stare at the page for a little too long to try and figure out if you’re looking at the date the comment was left or the date the schmuck joined the forum?

Stack Overflow took a thing that was already happening (asking questions and getting answers) and stripped away the bad and useless shit that was holding that information captive. They came up with a more sensible concept of what was going on and developed a totally new interaction for it.

So… what’s the problem Documentation solves? What thing do we all do that Documentation somehow improves? The truth, we both know it, is that Documentation doesn’t fit into any existing workflow. It doesn’t even fit into Stack Overflow’s workflow, and it was built to fit in there.

Documentation also deprives the programmer of the feeling of helping someone. Which feels better, giving a dollar to a guy on the street, or dropping a dollar into a jar that says for the homeless” on it? Knowing you are helping a specific person is a huge motivator. Documentation deprives you of that source of pleasure. All the complaints about Documentation on Stack Overflow have the same flavor: it feels like a lot of work.” It is a lot of work, and so is answering Stack Overflow questions! But answering those questions feeds our desire to be charitable to each other, in a way that writing examples for documentation just does not.

So… the reward scheme is messed up, the value-add is unclear, it’s demotivating, it’s labor-intensive, it’s not going to do anything to staunch the flow of bad questions, it doesn’t clearly improve any real existing problems while creating some new ones… what is Documentation good for?

Stack Exchange: Documentation is a fail. Drop it.

December 23, 2016






In case you missed it, the Go guys announced an official font today.

Fonts and typography are like a weird little undercurrent in programming. Knuth famously took about a decade off from his massive Art of Computer Programming project to invent TeX and METAFONT. He did this because he found the second edition printing much uglier than the first and decided he needed to fix this problem.

Knuth spent a decade mastering typesetting and typography. And his book is incredibly beautiful. Knuth, being of pure light and glory that he is, also designed the only font any of us has needed to use since 1975. That’s why everybody uses Computer Modern today, right?

computer modern snapshot, courtesy Wikipediacomputer modern snapshot, courtesy Wikipedia

Unfortunately, Knuth spewed enough bullshit about aesthetics and typography that programmers started to believe him. After all, if he could compute the time complexity of shell sort, he must be able to perceive things others of us cannot. TeX and LaTeX became the official arbiters of aesthetics amongst programmers, and just as rejecting the user-hostility of Linux was the mark of an inferior computer user, rejecting the horrifying ugliness of Computer Modern helped maintain a hostilities between programmers and designers that only began to erode after Web 2.0 started to take shape.

Plan 9 also manifested this tradition with their incredibly ugly color scheme and, surprise, custom-made fonts. Take a look at the beauty” of Plan 9:

snapshot of Plan 9 via 9Frontsnapshot of Plan 9 via 9Front

This is justified by Rob Pike (recognize the name from Go?) according to the 9Front FQA as:

…the color scheme is (obviously) deliberate. the intent was to build on an observation by edward tufte that the human system likes nature and nature is full of pale colors, so something you’re going to look at all day might best serve if it were also in relaxing shades.

What an odd move on the part of the Go team! I like go fmt though, it really represents an attempt to address a way that programmers create more work and bullshit for each other by homogenizing things. Maybe the official Go font will help with that? I doubt it, because font choices on the part of one programmer really don’t affect another.

They’re supposedly doing this to get past encumbrance” issues with using other people’s fonts, but that sounds like a misunderstanding or a red herring. In practice, there are already free and unencumbered fonts, and most of us just don’t wed our interfaces to specific fonts that closely.

It seems a lot more likely to me that this is a funnily obvious manifestation of a bug in the amber. At worst, maybe just a weird piece of Russ Cox’s brain that occasionally explodes out into the real world; at best, a complete set of fossilized notions from the glory days of Unix, that:

  1. typography is important. (I agree that it is, but people seem to survive using Word and Pages without lightning burns)

  2. our weird aesthetics based on math are better than the outside world’s aesthetics, which seem to be based on the crazy notion that good looking things should look good (#MadLads!!!)

  3. perhaps most sadly funny, the idea that Unix and its inheritors in Plan 9 and Go have something positive and meaningful to say about typography and aesthetics today, after all the phototypesetters have been put to bed and nobody uses troff anymore, or even TeX outside academia.

A missed kerning opportunity from the announcementA missed kerning opportunity from the announcement

I think it would be nice if number 3 were true. TeX is still an amazing piece of technology. The things that Knuth discovered really should be enshrined in a better system that isn’t quite as stuck in the 70s. (Did you know that the way you run external commands from TeX is by writing to file descriptor #18!) LuaTeX 1.0 is out, maybe that will save everything? You can use real fonts now… but we need to accept that real fonts are made by real typographers using software that is not Emacs.

Why do we care so much about this? Maybe we just spent more time than most staring at text on a screen.

I don’t think the Unix etc. has made its final statement about typesetting. But for us to get there, maybe we should try and let go of typography. The battle’s over, Adobe won.

November 17, 2016






Ho lee shit.

I’ve been burning with anticipation for this album since they released It’s Just Us Now” a couple months ago. You heard it right?

This is an amazing song. At just the moment when it should go nuts, they draw back and create more room for Alexis to sing. Wow! And the video manages to reinforce it somehow. I’ve been listening to this song every other day since it came out, and generally pestering my friends about it.

And then today, they released the rest of the album. Guess what? This thing is fucking incredible. Every song on here is just as powerful and surprising, in a totally unique way. Music you could head bang to, or have a moment of transcendence, or shed a tear to.

Congratulations, you fucking did it! Your first album, you were just a mess, but we loved it. Your second album… I think you must have been studying music theory, and suddenly there was structure. A bit too much structure. Third album: good songs! But this, this is the album where it finally comes together, where the unbridled chaos of the first album meets the intelligence and emotion hiding inside you, and it feels like you finally said something. Something brave and messy, something felt and understood and meant. It’s thrash, it’s pop, it’s dance, it’s total chaos. It’s sweet, it shreds, it’s scared, it’s raining fire. Is that a goddamn saxophone?

And it’s bold! It’s triumphant and glorious! It’s really incredible… an amazing end to a pretty trying week. I’m pretty sure it’s going to be on repeat for me for the next couple years, replacing The Griswold’s Be Impressive.

November 12, 2016






A response to What’s an Engineer to Do?

To fritter away a huge lead in the race. That’s what Apple’s doing. And Apple’s fans, like me, are so upset about it because we see the trajectory.

Apple in 2002 was facing an uphill battle, but they were going against idiotic PC manufacturers that didn’t care about build quality or design aesthetics, and OS vendors that didn’t care much about developers or power users. The hardware side was racing to make things faster and cheaper and the software side was really excited about lock-in and not much else. So Apple racked up a lot of geek cred by making decent hardware that looked good, was enjoyable to use, and basing the OS on something very geek/programmer friendly.

The industry has now had 16 years to copy from Apple’s playbook, and they have. Dell, HP, Microsoft—they all have good looking hardware that’s inexpensive and well spec’ed. When Apple’s was the best, geeks didn’t mind paying more for it—it’s the best! But geeks do mind paying more for middling or mediocre. Geeks do mind having to explain that Apple is somehow better despite being most expensive of all and somehow not having the best hardware. And frankly, I don’t think most of us care that much about 3 mm. (Does Apple have an anorexia problem?)

But the bigger issue for me is that I belong to that class of developer whose life is fairly portable. I could run IntelliJ on anything, Emacs on anything. I need Unix, I need sed and awk and sh and all that stuff, but otherwise, I’m not really wedded to the Mac—at work, anyway. But Microsoft has spent at least six years or so trying desperately to get us developers to give Windows a shot, and now there’s Bash-on-Ubuntu-on-Windows, the worst named Unix subsystem of them all. But I tried it out and it works out of the box.

So what’s keeping me with Apple exactly? In 2010, they have the best hardware, the best phone and the best laptop and the mini for my parents, everything’s in iTunes and life is great. In 2016, their phone has been getting worse for the last two years (the iPhone 6 is too big for my hands), I have the watch and never wear it because I don’t care about it, the new MBP leaves me cold, and I’m hearing nothing but negativity about the port situation. In 2010, where would I go? To Lenovo or Dell and get some thick ass brick that breaks on the way to the house and won’t run Linux? But it’s not 2010, it’s 2016. Windows comes with Unix, Dell and Microsoft have superb looking hardware. I’m thinking about ditching my smart phone and my smart watch anyway. What’s keeping me here? The dock is pretty?

Things are just starting to get wonky. Apart from the stupid touch bar, the iPhone has to lose the headphone jack so it can be a micron thinner, but the MBP gets to keep it? How do you plug an iPhone into the MBP anyway? And why do they keep making macOS look more like iOS when they’re never going to let macOS have a touchscreen? Why do all the other products feel like they’re fire-and-forget? My Apple TV for instance—I love it, but I’m the worst guy to ask; I have no cable, no dish, I’m not a sports fan or an HBO subscriber. I literally just watch Netflix and Hulu. What happened to all the games that were coming to Apple TV? Why does Vevo somehow fuck up rendering on my Apple TV?

Why would you buy a PC anymore?” Because sometimes you have shit you have to do, and for that, you need Unix. I need Unix, but I’m not sure I need macOS. And that uncertainty is probably why Tim Cook should think about this question. I promise I’m not the only developer who feels this way, and if the developers leave your platform, it’s going to get spooky on Mac. And faster than you’d expect.

November 3, 2016






I’ve been worried about flour more than programming (outside work, anyway). Here’s everything I’ve discovered.

Bread

This has been my interest lately.

The fundamental thing to know is that you’re after a certain ratio of about 5:3 flour to liquid. Beyond that you need some salt (about 1/2 tsp per cup, or more) and some yeast. The amount of yeast is mostly a function of when you want to bake; if you can let it rise for a day, you can use 1/4 or 1/2 tsp. I have been doing 1/2 tsp and baking in 18-24 hours.

You decide whether you want a uniform crumb or a bunch of big old air pockets. For a baguette or a nice boule, you probably want air pockets; if that’s the case, don’t add fat (oil or butter) because it will interfere with that, and also plan on letting it rise more in the final proof. If you want a uniform crumb, adding fat is fine and do a better job squeezing out the air between proofs.

When you first get started, you tend to conflate the recipe with the shape and the baking method. These things are fairly independent; you can follow Jim Lahey’s important recipe and then make baguettes with it following this Food Wishes recipe. In fact, if you read both, you’ll probably notice that the difference between the two recipes is pretty minute.

I made a great loaf of white bread following a Breaducation’s recipe, but I didn’t take the documentation all that seriously, or the temperatures, or the mixing steps… in fact, apart from the actual recipe, the only thing I really took was his kneading method, which is superb. And I screwed up and added too much honey.

By the way, it’s pretty hard to make a sweet yeast bread. Yeast wants to eat sugar, so if you give it a sugar-rich environment, it will basically eat all the sugar. So the fact that I screwed up and added double the amount of honey the recipe called for really had no perceptible effect on the outcome.

That’s the funny thing about bread. You can actually hose it pretty badly and it will still be OK. Get the ratio of flour and water mostly right, and bake it long enough, and it will be basically alright.

Spritz it with water on the way into the oven. I haven’t noticed a huge difference using the cup-o-water method and a good dampening with the spray bottle.

Another great recipe is this Real Irish Soda Bread recipe from Serious Eats. It’s trivial and you have amazing bread when it comes out. It’s not sweet, really; it’s actually fairly salty, but it takes butter and jam better than anything. The internet will tell you that you can’t use baking soda at high elevation to leaven this bread, but it works fine here at 4500 feet.

I have grown to favor King Arthur flour, especially bread flour, although the soda bread you should really use all-purpose for. In general, if it’s a yeast bread I want to use bread flour; if it’s a flatbread or a quick bread, all-purpose. I don’t know if this rule is perfect but it’s the one I’ve noticed and been following.

By the way, if you just try following some of these recipes, you’ll make some really amazing bread, on the first try. It’s not that hard.

Biscuits and Scones

The trick with biscuits and scones is: keep the butter cold, cut it up, and cut it into the flour. You want the dough to be lumpy with bits of butter. Don’t overmix. You really aren’t after doughiness in these recipes. If it seems like it might fall apart if you look at it funny, it’s probably perfect.

Scones and good biscuits are similar. If you want to make one of those bizarre American oversweet triangle cakes that Starbucks sells, try making cream scones first and you’ll have a much better experience.

Pancakes

The recipe in Ratio is one of the best I’ve ever tried, and after you read it you will see how easy it is to modify.

Pasta

Get yourself a pasta machine and make pasta all the time. It’s really easy. You almost can’t overwork the dough. In Ratio, Michael Ruhlman basically says, one egg per adult serving, plus 1.5 times that weight in flour. I find using Bob’s Red Mill semolina flour gives amazing results. You can cut it with AP flour or whole wheat flour or whatever. I make a big pile and fold the eggs in with a fork and then just sort of work it for a few minutes, throw it in the fridge under some olive oil for 20 minutes. I’m not even sure that step is necessary.

Get the pasta machine out and roll it to the 2nd to last setting for everything. Well, I might do the last setting for ravioli. Send it through the first setting a few times, folding it in half between, until it really looks like a big noodle. Then go one setting at a time. It’s pretty easy; I’ve made pasta from scratch probably about 50 times and the first time it came out just as good as the last, minus my nerves.

So that’s what’s been on my mind lately.

September 21, 2016






I have a project of 140,000 lines of Java + 3000 lines of JS in an Angular application. I have Maven build about 20 separate Java modules and then exec Grunt to build the Angular front-end. The build takes 2 minutes on a warm machine that has run the build before. One minute of that is Grunt. Fully half of my build time is taken up by the 2% of my codebase in Javascript. This is to build” artifacts for a language that does not get compiled in any real sense on my end at all.

The reasons for this inefficiency are many: my 3000 line Angular program somehow drags in 300 MB of node_modules and 30 MB of bower_components; Grunt is supposedly less efficient than Gulp because it has to make a lot of disk copies; my template is probably too fancy, etc. But this is a 50x discrepancy. There must be a lot of negative multipliers combining here to lead to inefficiency like this. And that is what the software engineers of the world don’t like about Node: the whiff of amateur that pervades the system.

Maven is not a good program. It’s verbose (input and output), it inflicts XML on humans, its documentation is awful. But it has a much more appropriate level of flexibility. It has made the NRAOs Java code a lot more maintainable. Anybody can check anything out and run mvn package to build it, mvn deploy to deploy it (well, usually). And this is what makes Maven a great program, even though it is also an awful program. It’s prescriptive and pervasive. It wouldn’t be great if it were optional.

People don’t like that Java is slow and plodding in terms of change. But let me point out that Maven was established long before Grunt was ever a thing, and off in Node.js land, they’ve already gone through Gulp and are on to Webpack and a few other build systems besides. This time next year, I’m sure webpack will be a memory and something else will have taken root. In five years, there probably will have been five or ten more Javascript build” tools that all do less work than Maven less efficiently. And Maven will still be the de-facto build tool for Java and my packages that use it will still build the same way as they do today—with lots of unhelpful, pedantic logging; with the same bullshit in the XML file to convince Java that I don’t need compatibility with Java 1.3; with the same dependency hell that I have learned how to deal with. Because that’s what Java is like.

I don’t think Node or any other technology can be inherently bad. But, technologies can be immature, or they can foster a community that encourages amateurish (or bad, or insecure) behavior. Eventually, maybe someone falls in love with it and leads a big crusade to clean things up. Or maybe it becomes so popular that heartless buck-chasing programmers hammer on it until the old ways become unpleasant and new ways take root (this is what happened to PHP). But it feels like we’re dealing with Node.js in its awkward teenage years. A great Cambrian explosion of ideas, mostly bad ideas, playing out on npm. A lot of libraries with an air of perfunctoriness. It connects, but there’s no error handling.” This kind of thing is upsetting to engineers, and we are mean.

The difference between Java and Javascript is very small. It’s basically that Java was designed to kidnap Unix and Windows developers and haul them off to Sun’s niche platform, whereas Javascript was designed to help high schoolers impress their long-distance girlfriend. Java has never become cool, despite squeezing out frameworks with sassy names like Play and Ninja. They’re like having a cool Dad who lets you drink a beer with him when you’re 17—it’s your senior year, after all.

Side note, a lot of the appeal of Node is that you have Javascript on the front-end and the back-end. You know, so you can pass JSON around. Is it hard to pass JSON to or from any language today? Not really. But you could have the same domain objects! But nobody really does that. The work that is done in the front-end and the back-end are different. You could make a big fat object and use it on both sides, but how are you going to avoid trying to send mail from the front-end or writing DOM nodes from the back-end? This is really about maintaining comfort. Teenage-you didn’t like hanging out with Dad’s friends. Awwwwkk-ward.

Maybe Javascript will grow up someday. Who knows? Sometimes high schoolers grow into excellent engineers. Only time will tell.

August 24, 2016