Skip to content
Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Holy Wars

elbeno, 26 January, 201526 January, 2015

All right, I have some opinions. Here are the definitive answers to the three most important dilemmas facing programmers today 🙂

* Static typing vs Dynamic typing

Static typing. I suppose dynamic types are OK if you’re hacking together a small tool. But static (strong, preferably HM-inferred) typing allows you to reason about your program much more powerfully. Correctness by construction, enforced by the compiler, is a wonderful thing. I used to write a lot of unit tests; now I write many fewer, and instead I write my code closer to the ideal of “if it compiles, it runs correctly”.

* Spaces vs Tabs

Spaces. The traditional argument for tabs is that they let everyone see the file the way they want. Except, in today’s world of reviewing code on the web, they don’t. People don’t get to control all the ways they see a file (eg look at github diffs).

So spaces are the only way to provide consistent, aligned code. File size isn’t a consideration: one texture can dwarf all the source code a single programmer produces in a year. Number of keystrokes or ease of cursor motion isn’t a consideration: use a real editor, please. (Hint: hitting the tab key shouldn’t insert a tab character.) Which brings me nicely to…

* Emacs vs Vi(m)

Emacs. Now don’t get me wrong; vi is a great editor. But emacs isn’t an editor, it’s a lisp OS. As such, it’s a great everything (including a great environment in which to implement vi). That said, both are light years ahead of anything else. What do you mean, your editor can’t delete trailing whitespace/edit files over ssh/show ‘git blame’ inline/do <other thing that emacs & vi have done for decades>?

Also, org-mode. My case rests.

—

In case anyone think this is a serious rant, I do actually work without complaint (mostly) in code that uses tabs, and even sometimes in dynamic languages. So it’s not too serious. Except for the emacs/vi vs everything else part 🙂

Programming

Post navigation

Previous post
Next post

Related Posts

Splines and modulation

2 March, 20082 March, 2008

My efforts to equally subdivide a curve along its length have, in part, been leading to this. First, I extended the sampling to work with splines (made up of cubic Bézier curves with c1 continuity). This shot shows 4 curves put together to form a spline: Next, I wrote some…

Read More

RotateAVI updated

15 April, 200729 July, 2007

The latest version has a minor update. Nothing functional, just a display thing. But every little thing makes it a bit easier to use. Rotate AVI files from your digital camera easily!

Read More

Why Reading Books Matters to a Programmer

29 April, 200829 April, 2008

The programming book market these days is small. Nothing like what it was eight years ago or so. And apparently, programmers don’t read books (any more). It’s mostly true. But of course, there are still books worth reading. I’m going to take as read the easy arguments: let’s assume that…

Read More
©2026 Why is a raven like a writing desk? | WordPress Theme by SuperbThemes