[]RSS

About Archives Artwork Comic Contact Philosophy Projects Tags

The art of the yuppy programmer, or why wrappers are a load of egotistical bullshit

[Comment]

November 10th, 2007 in Rants. Weblog

]broken] I’m tired of wrapper libraries. They’re a cognitive consumerism gone awry, wrappers for wrappers wrapping wrappers. Every development team I’ve known has their own1, each somehow better than the others, most ignoring the long history of thinking gone into libraries written throughout computing history.

What’s wrong with using the basic standard libraries, ported where they don’t exist? I mean, really, why do we need another date class, or another wrapper on file paths?2 Are you or your development team so challenged that you can’t reliably use fopen or fprintf? Is your own brew of file.Open() more reliable than, say, C#’s, Java’s, Perl’s, the STL’s (or whatever toolchain you’re immersed in)?

I’ve heard the excuse that standard libraries fall short in some way: maybe they’re not available for a required platform, or maybe they’re missing a key set of functions. Then port the libraries (there are enough free implementations out there), or add a companion library, class, or unit. It’s really not that difficult. Re-wrapping the entire damned universe should be left to the crazies with their tin-foil hats and couches covered in plastic. And the standard libraries aren’t so bad that you need to be protected from them. In fact, they’re pretty damned good, once you’re willing to get over your own ego.

I think that teams are looking at the problem of abstraction the wrong way. Wrapping concepts in your product’s domain is a good thing (as long as you don’t overdo it). But where’s the value in wrapping things that have thousands of existing implementations? Why repeat what’s been thought, built, and tested thousands of times over? Just learn the fucking standards, understand that they’re imperfect, and make peace with the fact that they don’t fit your personal mental model of things. Assume that where your mental model differs that it’s wrong or unimportant, because it probably is.

And if you’re not willing to use the standards, at least use the de facto libraries for the platform. If you’re targeting Windows prefer the Posix libraries3, then default Win32 libraries for your toolkit, and as a fallback, any absurdly popular library that has a vibrant community. The same goes for whatever platform you’re on. But if you’re tempted to write your own basic-concept-wrappers, in your own brand of library magic, then you’re full of shit. Get over it: you’re not that good. None of us are.

That’s why we share standards. That’s why out of thousands of class libraries, only a few bubble to the top. Only one or two of them are good enough to be worth using. Spend your time on problems related to your application, on the things that your users will actually care about.

  1. And yes, I’ve fallen to this bug myself in decades past
  2. Companions to the standard libraries are good, as long as they don’t repeat what’s already available
  3. Because it’s the right thing to do

Rails, learning, and SUCK -= 1

[Comment]

April 14th, 2007 in Rants

I spent a few hours today working on a Rails application and I have to say that it’s growing on me. I finished working through the Pragmatic text on Rails, most of the Rails wiki, and a few of the common tutorials. I’m finding most of what I need in the documentation, though the little things are still a chore to hunt down. But when you do, boy is it fun.

I’ve learned a few things that have kicked my stubborn ass. My first impression of the migrations/ActiveRecord stuff, for example, was way, way off base. The SQL abstractions are based on a standard object-relational representation, and not some hair-brained scheme (of which I’ve seen many). The database conventions are sensible, and the resulting code is obvious — well worth using.

It’s also fun to be back in Ruby land. I like how the obvious is … well, just so obvious:

:default => Time.now + 1.week

A Rails anti-rant (or, why I’m going to learn Rails anyway)

[Comment]

April 10th, 2007 in Rants

When I bump into something new my first impressions stick. I’ve been developing software for long enough to know that gut feelings are feeble at best, so I work hard to keep my mind open. And keeping the cranial door from closing is hard. But it’s always worth it, as no matter how it turns out I learn something new.

Enter Ruby

My first brush with Ruby was in 1997, when a Japanese client asked if we would consider binding it to part of our product. I was immediately impressed at how crisp the language was. After using it for a few days, however, I found the libraries and documentation lacking.

It took me a few years to check back in with Ruby, and by 2000 the documentation had improved. At the time I was using Perl fairly heavily for general scripting and CGI, PHP for fun CGI, C/C++ for applications, and was looking at embedding the Mozilla EMCA script in a product. While the Ruby documentation was better, my time was already committed to Perl and C/C++. It would have been nice to switch to Ruby then, but Python was also looking good and it was hard to tell if either would go anywhere in CGI land.

So I liked Ruby, but never had a chance to put it into production. And lacking real daily use, I missed out on internalizing a great language.

On the Rails

When Rails first appeared on my radar, I was already knee deep in Perl, PHP, and JSP. I took the time to look at it, but it immediately reminded me of Struts. I hated Struts (and JSP in general). I found them constraining, as they forced the whole MVC/OO approach. And while MVC/OO are good tools, they’re heavy enough that you have to carefully weigh the cost before assuming they fit. So my first thought was, “Oh crap, another MVC framework.”

The Framework Dilemma

And on principle, I hate frameworks. Frameworks are a developer’s way of making a mark on the world. The fundamental premise of the framework is to provide an encompassing abstraction for something, which is to say that it aims to solve one set of problems well. Unfortunately, frameworks almost always leave another set of problems unsolved, and damned near impossible to solve at all. Some frameworks end up to be useful, of course, but I distrust them by default. And I know: I’ve fallen to ego and built my share of white whales.

Anchors in reality

Luckily, I have a second stick for measuring tools: I look at the things people build with them. I have this theory that beautiful things are created by unencumbered and inspired people. None of the JSP/Struts sites I had seen were at all interesting. Java, for that matter, has turned out very few inspired works. But Rails and Ruby had promise, I just knew I couldn’t see it yet. The software people were building with it was fun. The sites were beautiful. I saw inspiration.

And you can’t ignore inspiration. That’s what I still see in Rails, which is why I’m still investing my very sparse free time in learning it well. Inspiration is an objective measurement, where my gut reaction is based on my limited sample set, my limited understanding of the samples, and my human cognizance.

Inspiration reset

[Comment]

March 31st, 2007 in Rants

It’s funny how it goes. You use stuff, you find it useful, and you consider it pretty good. Then you use something else and a gap appears — what was pretty good now looks like crap, and you realize that your perception was warped. It happens to me all the time, and the resets are really cool. When I get a glimpse at something I really like, it refreshes my spidey senses and kicks my ass. And that’s a good thing.

So I spend most of my time in Windows Land. It’s ok. I’ve even pimped out my development machines with every tool I need. Then I boot my Ubuntu system at home and it kicks my ass. This is what real tools look like. I browse AmieStreet for some new tunes, and it kicks my ass again. It’s what browsing music should be like. Suddenly I’m inspired again. I queue up some tunes in Rhythembox, and it’s what iTunes should be like. Simple, solid, and does what I want. There’s inspiration everywhere, I just have to remember not to get stuck in the crap.

I’m tempted to buy a license of VMWare so I can boot my Windows development partition from a productive environment.

Ten things Linux distros get right (that MS doesn’t)

[Comment]

December 30th, 2006 in Rants. top10

brainI use Windows and Linux every day. They’re both competent operating systems, each with reasonable applications and windowing systems. I find myself more productive on a Linux system, though, because of a few very simple differences.

So what are the differences?

  1. A useful terminal emulator. So what if it’s only useful for developers: I’m a developer. I like a terminal with capable cut-and-paste, tabs, and resizing.
  2. All-in-one application sources. Man, I love my apt (or yum, or distro-specific tool of choice). Finding and downloading applications for Windows is a crap-shoot in almost every way. I find this especially handy when building new systems: it takes far longer to build, update, and add needed applications on a Windows system than on most Linux systems.
  3. Cut-and-paste, and focus handling. Middle-click cut-and-paste is even more useful than middle-clicking a URL to a new tab, and XWindows does scroll-wheel window focusing right (scrolls the window under the cursor).
  4. Frequent, painless patches and new stuff, all the time. I’ve had a 3d desktop (compiz) and funky search (deskbar) for more than a year now (and I avoid the bleeding edge).
  5. Multi-desktops. Using a single desktop now is a lot like working at a grade-school desk: it’s just too small to be useful.
  6. Good, free tools. Like vim (or emacs). I know they’re old and crusty, but they both live and breathe text editing.
  7. No reboots. I rarely have to reboot a Linux system when patching. Windows is getting better about reboots, but they’re still too frequent.
  8. Open formats and protocols. My stuff (and my network) is mine, locking my stuff in proprietary, costly formats doesn’t work for me.
  9. No need for paranoia. I don’t like the anti-malware tax: the cost, the CPU cycles, and the wasted fear. Signed application bundles are a big part of how Linux gets this right: you don’t have to fear installing new stuff (the rest is in frequent patching and limiting possible damage).
  10. Respect. Don’t tell me what or how to do it: give me choices. And don’t treat me like a criminal, because I’m not.

Update - Someone dugg me, though the server is holding up well (thanks Dreamhost). Remember folks, top 10 lists are for fun.

Update - 2007 - Someone dugg me again. I guess Digg users have a short memory.

Also check out Three more things Linux does right (or that Windows does grossly wrong).

5 things I don’t want to see on your weblog

[Comment]

November 12th, 2006 in Rants. top10

flowerI don’t usually do the top-ten shtick, but I’ve seen too many horrible personal websites linked from , , and this week to resist. There are just a few things that you don’t do in a weblog (and satire is good for the soul).

#1 - Pictures of yourself

Your momma may like your mug, but it doesn’t add anything to your writing. In fact, your picture shatters any hope that I might imagine you as more interesting or intelligent than you are. Let your posts paint it, and stay hidden well behind the curtain.

It’s difficult to undo the effects of prejudice, especially when it’s the result of one of the lower-order inputs like sight and sound. Once I’ve seen your face, my subconscious draws its own conclusion. After that, anything I read is filtered through that picture and what my mind has made of it. And if you’re the average geek, the picture ain’t that pretty.

Let me decide if I want to see behind the curtain. If you decide for me, it’s going to take a lot of great writing to change what my mind’s eye has already seen.

#2 - Hubris (be yourself)

Don’t try to be too cool, too corporate, too fancy-shmancy, or too anything that you’re not. Figure out who you are and write from that. If you’re not honest, I’ll see it and move on.

Advertising is another hint of hubris. I know that you have to pay the bills (don’t we all), but don’t be greedy. If the ads hinder your content, to the left, right, and everywhere, I’ll curse you for your arrogance. If you want to make more money from your site, here’s a hint: write more, and write better — or be creative.

A noisy site is another sign of an inflated view of self. I think it’s cool if you work on other stuff. I’m interested in the things you’ve read. But don’t push it in my face all at once: it’s loud and it’s abrasive. Just avoid the noise. A front page full of dozens of different things doesn’t highlight any one of them well.

Be balanced, be humble, and be yourself. Everything else just gets in the way.

#3 - Ignorance (duh)

I know that we’re all learning, but there are a few sins of ignorance that I find especially repulsive. I wont stick around long if all I find is sloppy, ignorant, senseless drivel.

To start, you need to write clearly and correctly. Bending the rules can be fun, but IM-speak or plain-old lazy writing is just lame. Learning to write well takes time and effort (I’m still just a hack), but if you want to be widely read then it’s a requirement.

Your reasoning needs to be sound too, or at least interesting. A good rant is golden, but a rant rife with logical fallacy is painful to read. One you can write clearly the holes in your thinking become apparent. Fill in the holes (or be more creative), and people will find your writing more interesting.

#4 - Stolen, crappy, or ugly content

Blatant dishonesty is worse than arrogance, and presentation (while superficial) makes the first impression. If it’s not yours, if it’s crap, or if it makes my eyes bleed, I will never be back.

I’m always up for a good 101 Reasons Ruby Sucks rant, but only if the writing is clear, the reasoning is balanced, and it all makes sense. A good rant is useless if you don’t know what you’re talking about. An incoherent rant is even worse as it’s unbearably annoying. And any rant rendered in #0F0-green on black with comic-sans will make me run screaming. It doesn’t have to be beautiful, but it does have to be readable.

Due to the magic of , I skim thousands of posts monthly. I’ll k-line you as soon as I see link-jacked or lifted content. I’m only interested in original content, so if it’s not yours then why return to your site?

Link logs are cool if you add something to the links, and you make it clear that the stuff is located elsewhere. Never make me click through the RSS to your site just to get at the links, as that’s an obvious cash-grab. And always give credit where it’s due, especially when it’s from another blogger. Links are a dime-a-dozen and I’m only going to return if I see something unique or interesting.

Learn to write well. Learn to reason well. Learn to find the interestingness in your opinions. Find a clear, simple presentation. Do that, and I might just read your site every day.

#5 - 404s, server-down, and bandwidth exceeded

I love to read, but I can’t read what I can’t see. I don’t care if your server has gone down in a huge ball of flames, or if your webhost is holding your offspring hostage for payment: keep the site up. Good hosting is cheap, as is reasonable weblogging software.

And don’t submit your site to the major aggregators unless you can handle it. It used to be funny when a site was , but now it’s just sad. If you wan to play with the big boys, be prepared for it.

The winning formula

[Comment]

November 1st, 2006 in Rants

whiskI was talking about web appilcations with a friend tonight, about how certain sites hit that sweet spot. What is it that makes their stuff better? What is it that we see that defines the difference?

So what makes them special?

  • Google: authoritative answers
  • Flickr: inspiration in photography
  • Wikipedia: knowledge out the wazoo

The smaller sites are similar too, though with a narrower focus:

  • 37Signals: simple life hacks
  • JoelOnSofware: interesting software rants
  • BoingBoing: compelling wild and weird stuff

It’s interesting that most of these guys are third generation web, and they all eclipsed their competitors by being damned good at their shtick. Being best is far more important than being first, and picking something we all want or need is absolute.

In product-land, the iPod is another clear winner. It does tunes. It does them well, end-to-end. No fuss. Like Google or Flickr, the iPod is clearly the best, with a limited set of features.

You’ll also notice that big success lacks the sickly-sweet corporate fermentation process. You won’t find meaningless mission statements or shallow product vision papers. What you find is clear, pragmatic thinking. Make it simpler. Make it better. Do one thing well. Damn the competition, because we’ll kick their ass.

Killing our language

[Comment]

September 30th, 2006 in Rants. Weblog

This is the first part of an ongoing look at how corporate culture is eroding our language. Corporate munging of our language offends me, mostly because it’s so un-artistic, and evasively dishonest.

Today’s word: Leverage. Here is its common, annoying usage:

Leveraging the latest in browser and web technologies …

Beef #1 - Cover your ass

This use of leverage applies the passive voice — a voice that removes the attribution, ripping the people or purpose out of the phrase. Writers usually do this to cover their ass. If you don’t imply that someone has done something (or say what was done) then you can’t get fired for it.

By blurring blame and responsibility we can hide or exaggerate meaning. And the possibility of dishonesty is the likelyhood of it, so the construct is often misused. It lets us get away with stretching the truth.

Beef #2 - Meaning(less)

Leverage is a weak, lofty replacement for “uses” ( or “uses to advantage”). The above phrase could be reworded:

Using the latest in browser and web technologies …

But even when we remove leverage from the mix, the sentance is weak. It’s horribly vague. Which technologies does it use? Why do we even care? And while the vagueness allows room for dishonesty, the greater crime is its bland weakness.

The gray vague of unsympathizing sea. — Lowell

Inspire me

This use of Leverage is uninteresting, pompous, and muddling. We have such a rich language, why would anyone want to choose the least useful way of using it? And people writing about products should be especially wary of weak language: if they don’t inspire or interest us, they will be out of work.

The slow dog days of summer

[Comment]

July 30th, 2006 in Rants. Weblog

It’s summer, and the heat is getting to me. It’s getting to too (1, 2, 3); they’ve suffered a few power outages, each resulting in severe, cascading failures. Running a service is painful, growing is painful, and they’re feeling a bunch of both.

I’ve noticed that even when things are running smoothly at Dreamhost that my site is slow. Dog slow. Today, I’m seeing front page load times of 5-10 seconds. Now that’s not all Dreamhost’s fault: is sucking back the query time against the database (on a network with continual latency issues). And Wordpress is fat, onioned with layers of abstractions. So both Wordpress and Dreamhost are sucking. Of course my site design part of Wordpress’s suckage too: the front page here does 3 different ’story’ queries, which results in some absurd combination of queries (66 in total).

I’m impressed at how quickly a set of reasonable things can become unreasonable. Dreamhost, Wordpress, and my site layout only take 2-3 seconds to generate on a good day. On a bad day like today, it’s 5-10 seconds. And on a post-California-blackout day, it can be 60+ seconds. That’s the problem with suck: when things go all to shit, they get there quickly.

I have to say that I’ve been tempted to revert to a more primative system: plain-old HTML, some simple PHP (or Perl) setup, or a simpler tool ([Blosxom]?). But does that really fix anything? I keep on finding myself back at this point, asking if I should write it myself. Should I? I don’t want to, and yet I do. I’d love to replace what I have with less suck, but everything else sucks somehow too. And I don’t really want to reinvent the suck.

Suck is the balance. On the good days the suck hides waiting. On the bad days it’s out in full force, in your face, sucking the life out of you. But then again it’s been hot out, I haven’t been sleeping, and I’m grumpy. Maybe things suck less than I think, and I should shut up and do something interesting.

Software versus prose

[Comment]

July 25th, 2006 in Rants. Weblog

Another 37Signals insight: Writing words vs. writing software, a comparison of writing software and writing prose.

A choice quoted quote:

“Books aren’t written - they’re rewritten. Including your own. It is one of the hardest things to accept, especially after the seventh rewrite hasn’t quite done it.” -Michael Crichton

Rewriting isn’t always bad. The software industry just needs to learn to accept it as part of the process of improvement. Rewriting shouldn’t prevent finishing the damned thing, though. Not that I’ve ever seen that before.

Another great writer’s quote from the article:

“Remember this: Don’t spend too much time visiting writing groups. You are not writing then. You are writing when you are WRITING.”

Reading your RSS feeds IS NOT WRITING SOFTWARE. Back to work I guess …

Next page [>>]