Joel Spolsky on programmer creativity

Joel has a new article entitled “Hitting the High Notes”, which probably deserves a link.

I happen to fully agree with Joel, that good programming is about finding that “clever solution,” not just a solution that “barely works.” These little epiphanies may not just be the best product of good programming, but also the reward–another striking similarity to conventional artists. I started to realize this similarity myself a few years ago, when I scribbled in one of my notebooks that programming actually seems a lot like sculpting, in that the task is both highly creative and highly technical, where the goals are simultaneously to solve a complex problem and produce something “beautiful” (or, in programmerspeak, one might say “elegant”).

This ideas of mine didn’t find themselves blooming until I came across Frederick Brooks (who, in fairness, Joel mentions), in whose wonderful collection of essays is a very useful distinction between two components to programming. The more important one, says Brooks, is the essential component, which should be contrasted to the accidental. The essential problem to programming is that it is fundamentally a creative act, and as such it requires long periods of uninterrupted thought and even a spark of inspiration to result in amazing products. The accidental component to programming is everything else that incurs cost in time: dealing with the programming languages, the text editors, the compilers, software revision systems, documentation, and all the other software development tools. Brooks’s theory (which, in my opinion, held) is that there was “no silver bullet” for programmer productivity; that even if major leaps are made to reduce the effect of the accidental problem, the essential problem would remain, and without an improvement in the essential, there would be no order of magnitude improvement in productivity.

In other words (and metaphors), even though word processing is a lot easier than typing–which was itself a lot easier than writing by hand–it doesn’t seem that any of these advancements in “text editing” made the creation of great novels much easier, since it is the content of a novel that matters–presumably–and that comes only from within the author.

But Joel is mostly right: to fight the challenges inherent to the essential problem, one must have:

  • A great work environment
  • Talented colleagues
  • Challenging problems
  • Visionary direction
  • Lots of alone time for each developer
  • Lots of brainstorm time among developers

There are probably a couple of others that deserve to be on there, but that’s a pretty good list in itself.

Mark Shuttleworth on Ubuntu and Debian

I just watched a short talk on Ubuntu Linux given by Mark Shuttleworth. Ubuntu is the distro of Linux I have run for the last year or two. Quite an amazing talk, really. You can watch the whole thing here. He is quite a fascinating figure, but more fascinating is how clear his explanation of the Debian-Ubuntu relationship is.

If Ubuntu reaches the level that Mark hopes it will, it will truly be an amazing distribution. And I had never known about the other things Ubuntu works on, like Bazaar-NG, which allows distributed revision control (probably one of the coolest concepts in Open Source I’ve heard of in awhile). Rosetta is another one of those projects, which is a very cool web-based system for allowing translation of free software projects.

It’s an interesting time to be tracking desktop OSS indeed.

On Being and Deliciousness

A really interesting article has been written at DrunkenBlog about Delicious Monster’s founder, Wil Shipley.

One of the rules of writing algorithms that I’ve recently been sort of toying with is that we (as programmers) spend too much time trying to find provably correct solutions, when what we need to do is write really fast heuristics that fail incredibly gracefully.

How right he is. But actually, it’s quite an interesting interview. I love engineers who work under OS X, and sometimes consider switching, but I’m convinced that Linux doesn’t have to be a “legacy” OS like it’s described here.

Good post on OSNews about Linux’s maturity

That’s the truth, be it sad or good, windows XP/XP-Pro they do just work “out of the box”. Install the driver given you by the vendor of the machine (or preinstalled), and voilĂ , a wifi is automatically detected, acpi works perfectly, soundcard has never been “blocked” (I learned this could happen working with Linux…), and, last but not least, printing is quick, easy, and standard of all the applications, not the nightmarish list of “todos” of the typical linux environment.

Mind you, I used Linux for 8 years, but I give to Cesar what Cesar deserves: for sheer usability of the machines features, for “mindless” operations throughout, there’s no comparison at all…
I can close the lid of my laptop now, go to sleep, and reopen it and everything working in a second; I had to twitch even the kernel sources to get that from Linux, and never reliably…

I think it’s time to stop being geek-minded and be honest: Linux needs a lot to become a viable desktop platform for the masses; the sooner developers realize this, the better.

Otherwise, desktop linux will be only for programmers, curious (and affected by a light form of sadism) people, and people who use its incredible tools and power for something very specific, like simulations, where a Desktop environment is probably useless anyway.
Eugenia is right: why do I have to find a solution to watch Star Wars trailer when it*s obviously supposed to just click&work? is it the computer who has to relieve me of some work, or vice versa?

Lorenzo

Right on. Linux is great for me to work on because everything already “just works” for me. Once you do your tweaking and reading of newsgroups, you can actually get to work. But the second I had to install Linux on my new laptop, I was back to the old tricks.

Linux has a ways to go, but what’s interesting is that it is not that far away, and all these changes are coming. Once Linux gets to the point that things “just work,” then what do we have? Well, we have a free OS that works as well or better than Windows XP, and also comes with tens of gigabytes of free software, excellent package management, a great developers community and powerful new ideas everyday. In other words, computers in the ideal.

Whereas with Microsoft, the “just works” part is there, but all these other elements are missing, and there are no efforts to get to them. Will Microsoft Windows ever have the enormous free and open source software movement that Linux has surrounding it? No. Will it ever get powerful UNIX integration beyond Services for UNIX? No. Will it ever get a development community that is smart, clever, active and passionate? Not so long as IT reigns.

Linux has that glimmer of what computers could be in it, but it’s just missing on some of the basics. But we’ll get there.

Doom 3 and modern gaming

Was over Max’s house, and while he played online poker, I played Doom 3 on his brother’s insanely overpowered Alienware desktop machine. The game is extremely well-done, from graphics to gameplay, but I really have no patience for First Person Shooter games anymore… they get boring so unbelievably quickly, and I just don’t have the time anymore.

The only FPS that might, MIGHT draw some time out of me is Max Payne 2, which I’ve had sitting at home, unopened (except when I tested Cedega by installing it under Linux–it worked), for quite awhile.

Look at me, the old fart at 20, yearning for the days of good adventure games like Full Throttle, Day of the Tentacle, King’s Quest and Curse of Monkey Island… *sigh*

New Years Resolution

To upgrade this website to Movable Type, among other things.

Last-minute hacking with my version of Metacity, and I finally got what I wanted. Basically, I was using xfwm4 for window management, and since it is NETWM compliant, I was supposed to notice no difference at all in GNOME. Except that’s not true, since xfwm4 doesn’t know about gnome-panel, and since a lot of useful hotkeys I want to use in gnome-panel are generally bound in metacity. Plus, the gnome theme manager doesn’t work without metacity. So, shame on GNOME developers, basically. You claim you are compliant, but you aren’t.

But then I did some reading and figured out metacity is actually a bit better than xfwm4 anyway, just that some of its features are hidden in gconf and other places. Also, someone has coded a neat app called devil’s pie which lets you manager your windows at a very fine-grained level, which I like… though it is a bit buggy right now, it shows promise.

So, the main thing I was annoyed by is vertical/horizontal maximize. xfwm4 has this working fine, and I’m quite used to it. Metacity doesn’t treat it as a “toggle,” so if you hit maximize vertical button twice, you just sit there with a maximized window… it doesn’t switch back and forth. I find this annoying since when I have vim windows open, sometimes to see more I just quickly maximize vertical rather than scrolling down, and then toggle it back afterwards.

Someone coded a patch to this. You can find it on bugzilla here at Bug #113601. Unfortunately, no one has written a “proper patch” that also works with session management and such, but I don’t really care, I wanted this patch to get back to work. So, in order to jive with my Ubuntu system, I created some debs with the patched version of metacity.

more vim

nonsense, but useful nonsense:

if you have tags working, cd into the directory with the tags and hit something like:

vim -t env_alloc

vim will automatically open to the file with that symbol. Nice.

Other nonsense:

:ab #d #define

vim abbreviations, make it so whenever you type #d it will be replaced by #define

you can actually execute a proper shell from vim, just use the :shell command.

finally, there is a “confirm” option for the substitute command, so:

%s/foo/bar/gc will globally replace foo with bar and confirm each replacement.

Finals: Phase I over

Only two more to go.

In other news, my Averatec laptop almost broke again today when I had it on my lap and it almost fell off. I caught it last-second, but this damn laptop is so small that sometimes I don’t even realize how close it is to being off the edge of my lap!

The thing has been working better and better. I got a program called fvcool which can send the Averatec into “low-power mode”, which means that the CPU gets sent HLT instructions and “powersave signals” on idle. The result is that it runs a lot cooler and saves more battery power, but at the expense of “real-time” apps like movie playing and even some MP3 playing, so you can’t have it on all the time.

The only bad thing about this laptop is sadly a trivial thing: the paint job. We all know laptops (except the TiBook/AlBook) are made of plastic under the shiny silver finish, but we wish that that silver finish would never come off. However, Averatec apparently used cheap paint, and so there are “palm prints” under where my palms have rested near the keyboard, as well as already a couple of spots (on the corners of my laptop) where the paint has rubbed off just from getting in contact with things. Kinda sad, because high-quality paint isn’t exactly expensive. Regardless, I’ll just have to paint it myself (or have M help me)… it might be a bit of an ordeal, but I think it’s possible to do. I’d just have to figure out a smart way to cover the LCD, keyboard and touch pad… maybe I can get M’s help when I come to that juncture.

Maybe I’ll switch this laptop’s color to something a little less “blah” than silver–a really shiny black would be awesome, I think.
In addition, I fixed some of my nasty X issues, so now my machine doesn’t hard lock ever. So that’s good too.

Now I gotta get studying for Basic Algorithms… fun fun.

Retchmail

So, ESR always talks about how fetchmail is the best UNIX program on the planet: well-written, standards-compliant, stable, etc.

That’s why I use it (with procmail) instead of downloading messages with something like evolution or thunderbird. Basically, evolution isn’t standards compliant and so it doesn’t deal with my mail server well, and thunderbird is ugly.

But evolution does let me use normal mail spools, which fetchmail and procmail can deliver to.

But fetchmail is annoying in some ways. For one, it stores passwords in clear text, in the /etc directory, and ESR thinks that’s good enough. If you don’t want to run daemon mode (like me), since I want to be able to quickly download the latest e-mail, that means plain text passwords in my home directory. I’ve written a shell script fetchmail wrapper that gets around this restriction so my password is never stored on my hard disk at all, but only passed from my keys to fetchmail directly, but what a pain, really (I wrote this a few weeks ago).

Now the other thing is that i have four mail accounts and it serializes access! Jesus! It doesn’t open up connections to each of my accounts, stick messages in some buffer and then write them to disk serially. Instead, it does wait-request-wait-request for each message of each account in order, and then at the end of a message download it actually delivers the message to procmail. So that means it takes me about 30 seconds to check mail on my four accounts, whereas it could take as long as my slowest account (pixelmonkey), which is about 10 seconds.

So, I just found it funny that someone got so fed up with this that they wrote retchmail. Here’s a quote, and a link:

quote:

Eric S. Raymond’s Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6? and IPSEC.

Oh, you were asking about RETCHMAIL. Sorry.

RetchMail is the world’s most stupidly fast POP3 retriever.

It is almost completely unlike fetchmail: RetchMail lacks features, isn’t particularly robust (although it won’t delete a message until sendmail says it was delivered okay), has nearly no documentation, and is actually fast.

5. Is RetchMail standards-compliant?

Quick answer: HA HA HA HA HA HA no.

Just to be extra clear about this: yes, it is morally wrong for us to have written RetchMail, and it is morally wrong for you to use it. But try it, it’s really fast!


Heh, that’s open source; it’s all about choice. Here’s a link.