Category Archives: Technology

The SpaceMonger 1.x Post-Mortem

(This is going to be a long story. But if you’d like to just skip to the source code, you’re welcome to.)

The Story

Twenty years ago, I was a kid in college.

Specifically, in the late ’90s, I was a college student living off-campus at Penn State, and I had a problem. The small video-game company my friends and I had started had gone bust, and I was switching back to DOS and Windows after some years of running only Linux on my computer. I’d just upgraded the DOS partition from Windows 95 to Windows 98, and the 2-gigabyte partition I’d installed it on had completely run out of space. I’d poked around at the folders in Windows for a few days, and tried using ‘dir /s’ at the command line, but there just wasn’t any way to get a holistic view of what the heck had eaten up my hard drive after installing Win98 on it: There wasn’t any way to see where all that space had gone.

Some time in 1997, after a month of futzing with my computer to no success, I was sitting in a barbershop, poking through one of the magazines, when I saw some nested rectangles with labels inside them in one of the advertisements, and I got an aha! moment. What if I could draw a picture of the hard drive? Using rectangles, like those ads? That were sized according to the sizes of the files?

I had rediscovered treemaps.

(Years later, I would find out that Dr. Ben Shneiderman had discovered the same idea about a decade before me. And it’s entirely possible that in the course of reading nearly every book, journal, and publication in the university on high-speed graphics during the video-game company days, that I’d seen an article by him the knowledge resurfaced. I don’t mind saying that he did it first, and maybe I subconsciously copied it!)

I ran back to my apartment after that haircut, scribbled some notes on my whiteboard, spent a few minutes working out the recursion — it was far simpler than calculating a BSP tree had been! — and I wrote what would then become SpaceMonger 1.0, in a single afternoon. (Warmongers seek war, peacemongers seek peace, and me, I sought disk space. It was a stupid name, but I didn’t have a better one.)

The code was clunky, but it worked, and it was fast enough for me to finally figure out what had happened to my disk. (Three answers: There were leftover installation files from Win98, and also some old forgotten images hidden away, and also Win98 was just big for the time.) I showed SpaceMonger to my roommates, and they thought it was neat and snagged copies of it. Over the course of the next week or two, I upgraded it, fixing bugs and adding features, making it nicer and more usable. By the end of that first week or so, there were a few buttons for zooming into folders, and for deleting files.

Figuring that nobody would really want software some college kid made in his bedroom, I posted SpaceMonger 1.3.0 here on my website. And, in truth, nobody really noticed for the first few months.

But then people started to download it in late 1997. They shared it with their friends. I got e-mails with questions. It got included on CDs of free software, and on websites listing free software. On a lark, I used my college French to translate it (badly!) when someone from France asked me a question over e-mail about how to use it, and thus by August 1998, SpaceMonger 1.4 was available in more than one language. I didn’t have a lot of time during my summer job to work on it, but I had enough.

Then school started up again. I was loaded up on classes, and biking four miles each way to campus from my new apartment, and SpaceMonger was mostly forgotten. I graduated in December 1998, and I took a big sigh of relief that college was at last over.

But I still had a lease on the new apartment.

Any normal kid would likely have cut the lease, taken the hit of three months’ rent, and gone out to find a job. But I’d done a lot of interviews near the end of my time at Penn State, and I was wholly convinced that the dot-com boom was not something I wanted to participate in. So I stayed in my apartment, paying rent with small consulting gigs, and spent a lot of my time researching. Studying. Thinking about what to do next.

I made a lot of weird software in those years after Penn State — like Mu, a replacement standard library for C++ when the STL was still in its infancy and seriously broken on almost every platform. Or WinBump, a bump-mapping texture-mapping tool that grew out of the video-game days.

But always there was SpaceMonger. I kept getting e-mails about it, fairly steady, asking for a new feature or a change or this or that, or just thanking me for its existence. And somewhere around early 2000, I realized that SpaceMonger had the potential to be my big commercial break, if I could make it good enough. I started coding on SpaceMonger 2.0, which became 2.1 for complicated reasons — but the full SM 2.x story is for another time.

SM 1.x managed to succeed because it was conceptually simple, easy to use, and free. It did exactly one thing and did it well. It was included by a bajillion download sites, and you can likely still find it online somewhere without searching very hard. Even decades later, I still get e-mails from people who love SM 1.x, people who liked SM 2.x but still go back to the original.


SpaceMonger is approaching 23 years old now — it’s older now than I was when I first wrote it! And it’s well past time to release the source code, so that a new generation of programmers can learn from my ideas and mistakes. There are some good ideas in there, and some awful mistakes, and in just a minute, we’ll talk about what were the best parts and what were the worst.

So the source code of SpaceMonger 1.4 is now posted on my GitHub account, released under the MIT open-source license. That means you can copy it, you can recompile and remix it, you can mutate it, you can reuse it, and you can even sell it — you just can’t claim you wrote it. (Also, you can’t complain if it doesn’t work, since it’s free.) It was designed to compile under Visual C++ 6 (i.e., Visual Studio ’98), but you can probably make it compile under today’s tooling with some effort. Good luck, and let me know how that works out for you if you try 🙂

At some point here, I also intend to release the source code of SpaceMonger 2.x. It’s much, much bigger and more complex than SM 1.x was, and includes a whole lot of neat stuff that the open-source community might want to steal. In particular, its treemapping engine uses some algorithms I’ve never seen elsewhere, algorithms that took me forever in front of a whiteboard to discover, algorithms that make it able to do almost instantaneous treemap layouts, layouts that were so fast that it could even do that cool animated zooming thing it did, even on a clunky old Windows 98 computer. I don’t have the energy to package all that up yet and release it right now, but it’s definitely coming… one of these years when I can get around to it.

SM 1.x, the Good, the Bad, and the Ugly

In the proper tradition of a software post-mortem, I’m going to say not just went well with SM 1.x, but also what went poorly. Maybe somebody can learn from it.

The Good

  • It had a beautifully simple UI. I’ll defend its UI to the hills: It opens to an empty window with just a row of buttons at the top, all greyed out except for the one you’ll want to click. It’s designed to be so obvious that it doesn’t need documentation, and I think it worked, based on how so many people in so many countries had no trouble using it, even if it was in a language unfamiliar to them. I read a lot of books on UI design in the mid- and late-’90s, especially Al Cooper’s About Face and Inmates, and SM 1.x resulted from a very conscious effort to be as simple a UI as possible. It’s still faux-3D and pixelly, like most software was at the time, but its UI is conceptually elegant even despite its age.
  • It did one thing and did it well. It scanned your disk and showed you which folders were eating it up. It didn’t have 10,000 features. It didn’t attempt to be everything to everybody. It had the one feature that everybody needed.
  • As it turned out, my problem was everybody else’s problem too. There’s a counter-intuitive notion in software that the best designs result from not designing for the many but designing for one. I built a piece of software that solved my problem and then I gave it away, and it turned out that a million other people had the same problem and wanted exactly that tool to solve it.
  • It was free. I can’t really overstate how much of a difference this made. Everybody everywhere could get it, and they did. I didn’t make a buck off SM 1.x, but even today it can be found all over the world. In some ways, it’s tempting to wonder what might have happened had I followed the open-source model with it: Would it have grown, or would it have floundered? (This was long before Git or Mercurial or distributed version control!) Would there have been other contributors, or would that effort have been a waste? It’s hard to say, but at least it was free.

The Bad

  • Building it on MFC. To this day, my opinion of “development frameworks” is colored by my MFC experience. I chose MFC at the time because it was this big development framework that Microsoft was proselytizing, this thing that everybody was using, that was The One True Way to code things for Windows.

    Boy, what a crock that was.

    MFC was a disaster, an architectural experiment gone wrong. A generation of programmers built stuff on it, but the moment that anything better was available (Java, VB, C#, the web), they rightly all jumped ship. MFC was originally built to be “wrapper classes” to make Win32 programming easier, but somewhere along the line, it developed Strong Opinions that everything should follow a Document/View model and be architected in a certain way, and everything went downhill from there. MFC is simultaneously overbearing and under-supportive: It insists you do everything its way, but “its way” doesn’t include most of the things you need to do in real-world software.

    I built SM 1.x entirely on MFC because I’d bought books on it the previous summer, and I spent most of SM 1.x’s development fighting with MFC’s constraints. If you study the source code, you’ll see that many pieces simply avoid MFC altogether and just access Win32 directly, just because of how bad and unusable the MFC classes were.

    To this day, I am still skeptical (and often rightly so) of “frameworks” that promise to do everything; as Spolsky said, every abstraction leaks; and my corollary to that would be that the bigger and more complex the abstraction, the worse its leaks will eventually be when they happen. The bigger they are, the harder they kabong.
  • Not continuing it. During SpaceMonger 2.x’s development, I stopped all work on SM 1.x. SM 2.x took years — it wasn’t released until 2006 — and meanwhile, there were bugs found in and features missing from SM 1.x, some of which would have been easy to do. I should’ve made some token efforts to keep it going, which would have kept rivals like WinDirStat from gaining traction in the interim. I lost a lot of good will in those intermediate years as people waited and waited and waited…
  • Thinking translation was a good idea. I got complaints for years after doing the translation to French in SM 1.3.4. The text was wrong, there wasn’t enough space, things weren’t quite right — if I knew then what I know now, I’d never have released it in any language except English, because I simply couldn’t support more than one language.

The Ugly

  • Not archiving well. The only source code that exists is SpaceMonger 1.4, because I just coded right over top of the existing source. Today, in a world full of Git version control, that’s nowhere near the problem it was then, but I should’ve made better backups of the code. Little did I know that twenty years later I’d still be talking about it.


So that’s it. SpaceMonger 1.x is long-last released as source code. It’s not perfect. It was written by a college student two decades ago, and the first version was less than a day’s effort. But it works, and maybe there are things to be learned in it by other programmers. In a future post, I’ll talk (again) about the algorithms it used, and explain how SM 2.x did it even better; but for now, having the source code and a decent story is likely good enough for one night’s efforts.

So have questions? Found a bug? Want a feature?

heh… now, at long last, you can handle that yourself 🙂


Filed under Programming

React Considered Harmful

This is one of those strange posts I never thought I’d write.

For the record, I love ReactJS. The principle of being able to build an entire website using forward-only data flow was sheer raw brilliance, and was a fundamental architectural shift in how website UIs work.

But —

Continue reading

Comments Off on React Considered Harmful

Filed under Programming

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

I’m still doing things

It’s been a while.

The credulity of my tagline — where I’m still writing but you’re not reading — seems to be a bit stretched lately, as it’s been months since I last posted anything about anything.  That’s not for a lack of interesting things to write about, but mostly for a lack of time in which to do it:  I most often think of things to say while driving to or from work, or while lying in bed at night having spent my evening feeding and cleaning up after small children, and neither scenario is especially conducive to posting on one’s blog.  Even when I do get a little private time, I tend to spend it working on Smile, rather than posting here about Smile, which doesn’t especially help with anybody else knowing what’s going on with it.

So let’s talk about Smile.

Continue reading

1 Comment

Filed under Smile, Technology

A Smile Posting!

Okay, so it’s apparently been forever since I talked here about Smile.  Which is sad, because I think hard about it every day, and I work on its code multiple times a week.

So here goes with a big status update.

Continue reading

Comments Off on A Smile Posting!

Filed under Smile

UI Tip: The User Is Busy

I’m passionate about user-interfaces. And so I thought it would be worthwhile to expand on a UI discussion I was in on Slack today.

You should never call a user dumb. I prefer to use the phrase busy, one of the great suggestions from Al Cooper’s About Face. I prefer that phrase because nearly all users are not dumb: The bell curve and a whole heap of population statistics say otherwise.

The real issue is that most users are just too busy and too harried to really think about your software or to spend any time with it or to spend any time learning it. They only use it because they have to use it, most likely because some manager at their company bought it and said, “This is your new [X] now.”

Continue reading

Comments Off on UI Tip: The User Is Busy

Filed under UX

Windows 10

Microsoft really screwed the pooch with Windows 10.

Over the past six months, I’ve had the opportunity to both install 10 and use it on quite a lot of machines.  It’s better than Windows 8, but that’s a lot like saying two broken legs are better than cancer:  You really wish there was another option.

So, look, lest you all think I’m just a hater, I have intentionally upgraded my devices to Windows 10, and stuck with it for long enough to get a real feel for it.  I want to be using the new operating system.  It’s just simply not ready for prime time.

Continue reading

Comments Off on Windows 10

Filed under Technology

How to Pass an Interview with Me

I do a lot of interviews. I mean, seriously, a lot of interviews. One a day is getting to be pretty normal.

I’ve read before Jeff Atwood’s classic “The Non-Programming Programmer,” and it’s still disturbingly valid, half a decade later: A very large percentage of the phone screens and in-person interviews I do are dismal, epic failures: The person can’t code, and, more significantly, doesn’t realize how poor their coding skills are.

Our dev shop is populated by really capable people. We get stuff done. Our flagship product has two and a half million lines of code in it — and growing — and there are a raft of satellite products orbiting not far from its gravitational well. And it’s not large because it’s wasteful; it’s large because that’s the smallest we could make it and still do what it needs to do.

And what that means is that if you want to join our staff, you have to know what you’re doing. We don’t have time to hand-hold. You need to be able to make stuff on your own. If you can’t deal with a business person giving you some abstract requirements and saying, “I need this in a month,” you’re not going to last. (Yes, we’re Agile, and we do plan better than that quote might imply, but a lot of stuff really boils down to, “Here’s a rough idea, go build it.”)

When you bomb out of our interviews, you’re actually doing yourself a favor. I know it seems like we’re being mean, but I swear we aren’t. In our initial interviews with you, we give you programming problems. Easy problems. These are all things that should have been homework in your Freshman or Sophomore year of college.

And any one of our current employees can do these problems in about five minutes. Literally. We’ve had phone screens that ran 15 minutes total. The reason we give these easy problems is because the real work is way harder. You’re never going to last in a two-million-line codebase full of graph algorithms and complex data structures if you can’t count letters in a string. We know this because we used to have weaker interviews, and people bombed out hard during the first month of employment afterward.

So here’s the deal. If you want to work for us, here are the critical parts:

Continue reading

Comments Off on How to Pass an Interview with Me

Filed under Programming


The latest: We’re expecting! The due date is the middle of February. First ultrasound looks good. Robin’s pretty sick a lot of the time, but there’s only a month left in the first trimester, and we’re hoping the nausea settles down after the first trimester like it did with Alan. She’s a lot sicker this time, and thinks that maybe that means we have a girl. Hard to say, but we’ll find out!

Alan keeps growing. He’s at the just-shy-of-terrible-twos now and exerting his independence by means of tantrum. (Lord help you if you want to change his diaper, or if you leave the room without his permission.) We took him to the zoo for the first time last weekend, and he was far more interested in the carousel than the animals. Ah, well. He recently learned that he can stack his alphabet blocks into towers, which has been highly entertaining to watch. Still no speech yet except for going “nyaah” when he sees a cat (it’s his “meow”), but with any luck, he’ll at least figure out “Mommy” and “Daddy” soon. He certainly knows what we’re saying, and nods (and waves his arms) and shakes his head (and waves his arms) to indicate “yes” and “no.”

What’s new in Smile-land? Back in April, I started rewriting the interpreter in C. It was never going to be fast enough in C#, and I always knew a C or C++ port would be necessary. I rejected C++ after a few attempts (more thoughts on that below). So far — well, I have a garbage collector and a working String object and a bunch of unit tests and that’s about it for the last three months. I only get an hour here or there at best to work on it. But Ben recently challenged me to have a minimally-usable interpreter by Christmas, and that’s put a little more fire under my butt to do something about it.

On C++

I rejected C++ because C++ is C++.

Continue reading

Comments Off on MayJuneJuly

Filed under Personal, Programming