Monthly Archives: March 2019


I swear there is no part of the Node ecosystem that isn’t a flaming tire fire. Does anyone ever design anything before implementing it anymore?

Try this example:

  • NPM is a package manager. But you can’t install packages from local source (i.e., on this computer) in older versions because NPM was only really designed to work with a single remote repository. (New versions at least let you add multiple remote repositories, as a somewhat hacky extension.)
  • There’s a workaround hack feature called npm link that lets you set up a symbolic link — a pointer — to a local package. It doesn’t work like a standard link command, so you’ll have some relearning to do if you want to use it.
  • But nevermind that learning, because npm link has no shortage of problems and bugs and failings and workarounds and workarounds to the workarounds. Also, it has disastrous data-destroying bugs on Windows.
  • But nevermind the bugs, because it’s not compatible with the normal npm install commands anyway, so the one use case you’ll have for it — installing packages from a local directory to make sure your design works — isn’t really usable with it anyway.

None of that would have been an issue with a little more advance thinking and a little less advance typing. Two small design changes early on — (1) allow multiple repositories to be listed in .npmrc and check them in order, and (2) allow the file:// protocol to point to a local directory of .zip files or tarballs as a repository — would have been enough to obviate all of this. NPM scopes, link, yalc, lerna, and a dozen other things built on top of the initial bad design would have been completely unnecessary.

But, no, can’t spend time on that! — you gotta move fast, be first, break things, change the paradigm, own the market, declare your IPO, and retire like a king. Never, ever design or plan anything, because that takes too long! Just shove something barely-passable out the door, and if enough people use it, make a slightly better layer on top to hide the roughest parts, and then if that gets used, another on top of that, and after enough layers, you might not even notice the sand you built on. After all, when you’re changing the world, who cares if anything actually works?

Comments Off on NPM

Filed under Uncategorized

SpaceMonger Redux, Part 2: The Project

I’ve wanted for a long time to describe in detail how SpaceMonger works. It’s been more than twenty years since I wrote SM 1.0, and there were a lot of innovations in SM 2.1 that I still really haven’t seen appear in any discussions elsewhere: I worked really hard to make SM fast and as smooth, even on the ridiculously limited computer hardware of the early 2000s.

Part of the work in making SM 2.1 was finding and using unusual algorithms that aren’t given much attention outside computer science literature — and part of that work was discovering and inventing new algorithms that, to the best of my knowledge, haven’t been published anywhere since. In this series of articles, I aim to fix that fact: It’s bothered me a lot that I’ve been hoarding some knowledge over the years, and it’s well past time that I share it.

Continue reading

Comments Off on SpaceMonger Redux, Part 2: The Project

Filed under Programming

SpaceMonger Treemapping Redux

I was asked recently (for the 97,000th time), “I loved the treemap layout algorithm in SpaceMonger. I’d like to implement something similar. How did that algorithm work?”

I’ve been meaning to write a few articles on this for a while now, so here we go with the first one: How did SpaceMonger 1.x’s treemapping work?

Continue reading

Comments Off on SpaceMonger Treemapping Redux

Filed under Programming, Uncategorized