simplify

Barack, you’re campaign is pissing me off

August 11th, 2008 by matt Posted in politics, rants.

This is bullshit. I have supported the Obama campaign since well before it was officially announced. I’ve been on their mailing list forever. I struggled to get the pretty-but-poorly-designed website to understand that I had moved from California to Oregon. These days I patiently receive a constant stream of emails from the campaign asking for money. All of which is no big deal to me.

But, I’ve gotta say that something is wrong if you have to start building false suspense in your campaign with this “Be the first to know who my VP is” crap. First off, I’ve been on your mailing list forever. So I damned well better be “the first to know”. But apparently it doesn’t work that way, because I still have to go to some web page and type in a bunch of the info that the campaign already has. WTF?

It’s not like I’m going to run out and vote McCain because of this. It’s just an annoying smudge on an otherwise shiny campaign.

Edit - Here’s the page I hyperlinked in the text of my post but isn’t showing in Google Reader:

http://my.barackobama.com/page/s/firsttoknow

Names Matter (How I Code)

August 4th, 2008 by matt Posted in How I Code, humane, programming.

I’ve had this website for about 11 years. I’ve been aware of blogging, in one form or another for about 8 years. But it wasn’t until this year that I started blogging. I resisted for many years. There were just so many ass-clowns with blogs. Why be another? Still, when I sit and code there are often ideas which will come to me and I want to get them out. And yet the topics I’ve talked about on this site (so far) are technical in topic but not in detail. There’s a reason for this. It’s hard to document the mental process you go through when you’re programming. I tried once this past spring when I was working on a small project with LINQ. But even though I typed out a lot of material, it was very hard to pull together something readable out of it and I eventually gave up. This time I’m trying a simpler topic and we’ll see how it goes. The writing is still rough because I wrote it on the spot and backtracked over code I had just written. Hopefully I’ll figure out how to do this more smoothly in the future because there are ideas and notions, both small and large, which I’m uncovering every day and would like to share and discuss.

***

I work with several different technologies on a regular basis. Lately I’ve been working on a .NET Windows app. It’s one I created originally in 2004 and have been maintaining for a client ever since. I’ve been adding some new database searching functionality to the app.

To display the search data in the app I have a series of tabs, all of which contain a customized listview. Each listview has a Display() method which takes in a list of thigns to display. The difference between each list view is the subset of the data shown and how each column is treated. (There are some columns with special handling.)

After a while I notice this pattern where I’m going to update only the currently visible list view, so I end up with a dispatch table which abstracts away exactly which Display() method I’m going to call.
I started off with a List for doing dispatch, with each tab’s index pointing into the table. But that bothered me.

Mainly, I wondered, what would happen if I added or removed tabs in the future? I didn’t savor the idea of mixed up tabs or a null pointer exception.

At first I thought a hashtable would have the same problem, but that’s because I was “complifying” it, and thinking about using a string for the lookup - either the tab name or tab text.

Then, “Duh”, I thought, “just use the tab itself as the key”.

And it really is a duh, because I’m pretty sure I’ve gone through this exact same internal dialog many times in the past. Oy.
So eventually I ended up with this:

protected delegate void ListProcessor(List<Item> list);
protected Dictionary<TabPage, ListProcessor> listViews = new Dictionary<TabPage, ListProcessor>();

I’m still not so happy with the delegate since it is almost the signature for map(), and that seems like a smell. Also bugging me is some vague nag about polymorphism which won’t quite bubble all the way to the top of my brain.
So, anyway, I go on to set up my event handler which captures a tab change. Except there seems to be some kind of retardation here. If you handle TabIndexChanged, that doesn’t fire if you change the selected tab. You have to handle SelectedIndexChanged instead. Which, in retrospect, makes total sense. But the naming could be a lot better here. I’m still not entirely sure what TabIndexChanged does, although I suspect it has to do with tab-reordering. Still, names matter, and that one naming choice is confusing. Speaking of how names matter, here’s the handler I created for SelectedIndexChanged:

        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            UpdateCurrentListView();
        }

I wish VS would let you enter the function name as soon as you break it out. I’m going to have to rename it anyway, might as well.
Since I’m calling UpdateCurrentListView() from another place, without the event signature, I can’t just point to UpdateCurrentListView(),
but I can give it the same name.

        private void UpdateCurrentListView(object sender, EventArgs e)
        {
            UpdateCurrentListView();
        }

Better? Worse? I don’t know. Ok, yes, I do know. Better. Just not WOW better. Anyway, onto the meat and potatoes of what I’m doing. Here’s UpdateCurrentListView():

        private void UpdateCurrentListView()
        {
            listViews[tabControl1.SelectedTab](foundItems);
        }

It’s just one line of code, but even though I *just wrote it*, I knew I wasn’t going to know what it did in about 5 mins. I try really hard
not to let things like that go by. People have to read this stuff, and more often than not those people are me!

The name “listViews” made sense for the dispatch table when I was first setting it up and inserting functions into it. Actually *using* it didn’t make sense at all: “listViews” sounds like a *list* of *views*. In reality this is a list of functions.

I also am not a big fan of the automatically generated names VS gives things. It works well enough, but it doesn’t scale at all. You can only have so many textBox15’s before you gouge our your eyes and swear you’ll stop programming forever.

Then there’s the list of items that will be displayed. That list is shared among all of the views in the containing class. When I originally created it, “foundItems” seemed like a friendly name. But down here (at this level in the code) you’re not thinking in terms of things being found. You want to have a more generic idea of what you’re dealing with.

Some refactoring gave me:

        private void UpdateCurrentListView()
        {
            displayOnTab[tabs.SelectedTab](SearchResults);
        }

I realized that while my dispatch table was technically a list or collection, the way I’m using it is as a multi-dimensional function. So why not just name it like a function?

So that’s what I did. Also, I’m only using one TabControl. Might as well go with a friendly name like “tabs”. And SearchResults is generic enough so that I don’t stop and think about the data but specific enough so I have a mental picture of what is happening in the UI when this code executes.

This reads fairly well, is only moderately redundant, and it has a decent English flavor: there’s a subject acting with a verb upon an object.

Good times.

It’s OK to make things pretty

July 29th, 2008 by matt Posted in humane, programming.

I have an announcement to make.

It’s OK to like pretty things. And you know what else? It’s OK to make pretty things too.

That’s right. And not just pretty things others make for you. Not just the candy coated interface you see on your latest OS or on your phone. It’s OK to make your programs pretty too. It’s OK to make your docs pretty. It’s OK to make your website pretty. Pretty pretty pretty.

Aesthetics are important. How you feel about the tools you work with matters. It matters a lot.But making things pretty isn’t just about aesthetics.

Bear with me here.

Beauty is a form of wealth. And wealth comes in many more forms than we imagine. I’m not talking tangible wealth - cars, yachts, bling. I’m talking about something a little more intangible but still very valuable.

I create wealth all the time when I’m programming. Again, I’m not talking about money or the literal value of the code I’ve written. I’m talking about the good stuff that just *falls out* while I’m working. And this isn’t because I’m particularly awesome, it just happens. I  think it happens to anyone who works in a creative field.

For instance, say I am writing some code, and I realize that I’m essentially repeating the same 4 lines of code in several different functions. So I Extract Method and boom, I’ve created some new wealth which wasn’t there before. Of course that is more intentional. What I’m getting at is directly related, but a little different. I’m talking about a sort of accidental wealth. For instance, say I’m doing a lot of work with lists. And I realize after a while that I have several places in my program where I am iterating over lists in the same way. So I pull out that code and consolidate it into one spot. Pretty soon I realize that the iteration function I created is handy in a LOT more places. And not just in this one project, but in all of my projects. Pretty soon I’m coding in a whole new way and I actually start to *think* in a whole new and more powerful way.

I don’t know what you’d call this. There’s probably some huge German word for it which would roughly translate as “the thing that gets you more things without you seeing it at first”.

Beauty can work in this same way. For one thing, there is just the simple aesthetic pleasure of working on something pretty. I remember back in the dotcom days I was working on a site that had a pretty UI designed by some skilled graphic designers. I had to start building out the site with placeholder HTML before we had the UI and it was an OK project. Nothing thrilling, kind of ho-hum. But then the designer’s UI came in and WOW, I suddenly liked working on that project a whole lot more. Of course one of my coworkers was working on an even prettier website, and after a while I really wanted to work on *that* instead, even though I knew that the technology under the hood was awful to work with. Apparently sometimes the grass is always greener, even if the green comes from a spray can. So working on something pretty can definitely improve your attitude about your work, and I would argue that a better attitude improves the quality of your work too.

But that’s not where all the wealth comes from. It’s not just the good feeling you get working on it. It’s the way things play out in your mind. Imagine you’re building an application and you have some objects that get manipulated. I don’t know about you, but for me, when I create new objects, especially ones that live in the database, it takes me a while to believe in the thing I’ve created. Not just believe in whether it will work or not, but to actually think of the thing I’ve created as real. But when you allow yourself to make things beautiful, to make that a priority on par with functionality and correctness, the things you create become tangible. Icons are a great example of this. Icons - good icons - can look great and really add something to your application. I’m not just talking about the icon for your program, I’m talking about the icons you pick to represent things within your program.

Think about a personnel database. The typical app that comes to mind is some byzantine Windows app or maybe a clunky web app which dumps out people’s stats in row after row of icky blandness. Now imagine that instead of row after row of text, there is a thumbnail image of the actual person. And imagine that you can click on that person to get more information about them. Imagine that you can drag that person around by their image. That you can transfer Tricia from Accounting to Distribution Support by literally dragging her from one department to another. Certainly you can do those same things with just text in a list, but it doesn’t feel the same way. You wouldn’t see Tricia as a real person. You wouldn’t *believe* in the idea of Tricia.

And it’s the same way with any entity in your application. Why should only the user-visible objects in your app have icons? Why should only the user-visible screens look nice? It’s very common to have programmers build out apps that look great to the customer, but when the programmer needs to get under the hood everything is fugly and lacks imagination.

That’s not right. That doesn’t serve anyone. And there are unseen opportunities missed! I’m not saying to spend all of your time making things pretty. I still stick by my Big 3: Make it Work, Make it Right, Make it Pretty. But making things pretty is definitely allowed and maybe even downright necessary.

Home Sweet Home

July 25th, 2008 by matt Posted in not good enough, weird.

(Warning: Most of my posts are about programming. Not this one. This is not a post to read during your lunch break, afternoon snack, FourthMeal ™, etc.)

When I was about six years old I had decided that I loved to draw. My mother, seeing a budding artist, encouraged me to no end. I would scribble little drawings and then show her. Invariably she would tell me that she liked my drawing and maybe ask what things were in the picture. But I remember this one time when I was very bored and for reasons I won’t go into in this post, I had no place to go outside and play. So I was six  years old, bored, and had a pencil and paper. And a devious sense of humor.

On this one particular day I was suddenly struck with inspiration. I sketched out my picture quickly, giggling at my creation the whole time. When it was done I ran right off to my mom to show her what I had drawn. Smiling, she picked up the paper to take a look.

I think I knew something was wrong when I saw her jaw drop and the blood rush out of her face. And then I saw the blood rush back until her face was red. See, I had drawn a lovely scene: A smiling stick figure, on a toilet, with a giant tail of poo crawling out of the toilet and around the page. On the wall next to the person could be seen a sign which read: “Toilet, Sweet Toilet”.

Needless to say, I didn’t get my pencil and paper back for a few days. My point?  Well, my sense of humor has grown up since I was six but my tendency toward dark or gross humor has remained the same. So I hope you will appreciate the great restraint I have used in relating the following story to you.

When I think about owning a house, most of the time I kick myself that I didn’t buy a place back in the late 90s when I probably could have swung it and would have caught the early wave of the housing bubble. Reality usually settles in though. I remind myself that I often make dumb money decisions. That means I probably would now be upside down on some piece of sub-par suburbia with a crazy ARM mortgage that I’d have talked myself into and generally hating life. And then there is my whole rant about how most homeowners don’t really own shit, than the bank owns their house and their future, and that modern American home ownership is a socio-economic trap on par with sharecropping or indentured servitude. Even so, I’ve gotta say that most of the time when I think about owning vs. renting, I can say I definitely wish I owned my own home.

Not this week. This week I am flat-out grateful that I don’t own a home.

Why? Because I don’t have the pay the plumbing bill. It turns out that this lovely old house, with its well built, farmhouse-meets-craftsman style, high ceilings, and pseudo-wood floors, has been sitting on a huge pile of shit. For quite a while.

When we toured the house in December I thought I smelled a little something. But I thought maybe there was a horse stable nearby.We’re in the kind of area where a horse corral next door wouldn’t be that unusual. Not being familiar with the neighborhood I didn’t think much of it.

After we moved in we started to smell something in certain rooms. It was a phantom smell which would only appear at certain unpredictable times.  We complained to the landlord, but since we couldn’t pin it down very specifically and we weren’t nagging about it I guess she didn’t take it too seriously. It was annoying but honestly we didn’t know what to make of it.

Many months passed and the smell would come and go, always mild, always smelling like horses or cows or something like that. And we wondered.

Finally, a plumber came out this week. He was supposed to check out a clogged bathtub drain, but as a side note the landlord had asked him to check out that smell we’d been talking about for months.

Our house sits on a block foundation, which means there is a crawlspace underneath. The moment the plumber got a whiff of the smell he wanted to go under and investigate. (And God bless him, because I sure as hell wasn’t doing that.) He came back up practically laughing.

See, the house we’re in had an addition built sometime in the past 20 years or so. It’s a small extension to the house, with a toilet and sink, plus the washer and dryer. Apparently whoever did the plumbing for the addition back then wasn’t what you’d call a “detail oriented” type. See, the drain pipe that he added on (and I’m going to assume it was a He), was never capped at the end.

Get that? The end of the  drain pipe - the pipe that takes everything out to the sewer - was wide open. Apparently it was that way ever since that addition was built 15-20 years ago. So let’s do the math here… open sewer line plus toilet, sink, washing machine, and adjacent kitchen, plus 15-20 years = ? Yup, a big old pile of crap under the house. The plumber said it looked like the bottom of an outhouse down there. Nice!

Bonus: This old house used to have cast iron piping. Most of which had been replaced, but apparently one leg of the main line out to the sewer was still cast iron. And what happens to cast iron when you mix it with water, kids? Yup, rust. Which it had. A big old hole had rusted out of that section of pipe, in mid-air, under a whole other section of the house. So if you’re keeping track we had not one, but TWO places where shit was falling out of pipes and piling up under the house.

Added bonus: The line to the sewer was also clogged. Which meant that everything we thought we were flushing was instead backing up into the crawlspace. The plumber was amazed we didn’t have a 4-inch deep puddle of sewage under the house. I guess the dirt here drains well or something. I’d really rather not think about it.

So, as you might imagine, we spent the week in a hotel. A special cleaning crew came in and removed all of the “debris” from the crawlspace, then they fumigated and cleaned and deodorized and fumigated some more. They ran a giant HEPA-filtered air mover in the house for days. And the plumber did his thing.

And now, finally, at the end of the week we are back home. And things seem fine. But I have learned one hell of a lesson for when we do buy a house: Always get the plumbing checked out. Twice. Maybe three times.

If you made it this far through this nasty story, I have a present for you. I was looking on YouTube for video of the Golgothan from Dogma. Sadly that turns out to be the one clip YouTube doesn’t have. However, they did have this clip of Kevin Smith talking at Cornell. It’s funnier than the Golgothan:




Django - You know, Boba’s Dad

July 17th, 2008 by matt Posted in not good enough, programming, programming languages.

For the past six months I’ve been pretty heavy into a Python web framework called Django. For the most part I’ve been quite happy with it, especially since for a few months prior I had been playing with PHP and that wasn’t making me too happy. Still, there have been a lot of things to get used to:

First off, it’s Python. Don’t get me wrong, Python is a fine language, but it is new to me. I assumed incorrectly that being comfortable with the language would be enough to make development a breeze. It was not. Python is an exceedingly obvious language, at least if you take a little time to learn it. Much more so that previous languages which felt as powerful such as C++ or Perl. Still, coding in Python has it’s quirks. There’s the whole indentation-as-syntax thing, which works much better than I thought it might, but still doesn’t read as well as I’d hoped. But, for the most part the indentation scheme avoids Brace Wars, which I find myself getting irrationally religious about. (Let’s not go there.)

Nits about Python:

You can’t mix indentation types. For instance, you can use tabs or spaces, but not both. Which makes sense on an individual line, but gets annoying if you cut and paste some code from somewhere. I have found 4-space indents work better for me than tabs, but sometimes I cut and paste code when I’m learning something new, and about 70% of code I find seems to use tabs. That’s when Python has a hissy. I don’t understand it, but I trust there’s a good reason it can’t do it on a line-by-line basis. That would certainly make my life easier.

Another thing I kept running into was with creating libraries. I’d code up a class, thow it into a folder in the PYTHONPATH and try to import from it. And what would happen over and over until I learned better? My module was never found. Reason? No magical “__init__.py” file in my folder. Yes, just the presence of the file means “hey, there’s some code here to import”. Not the way I’d have done it, but then again I don’t know the whole story.

Overall my Python nits are minimal. I don’t get the exhilaration I used to get from making something with amazing performance in C++, and I don’t get the  smile that comes across my face when I code in Perl. But I do get things done. I guess it’s a lot like VB in that way. Except not stupid. :)

My problems with Django are still evolving, but so far my biggest problem with Django is configuration. OMG it is a fucking pain in the ass.

Now, I should qualify that: If you already have a current Python, you can install and run Django pretty easily. You just download it, install it, then use the django-admin.py script to create your first app. Once your app is created you can use a mini Python appserver while you develop. You can make changes to the live app and they will get swept up into the current instance of the appserver. It’s similar to the webrick server you would use with Rails. And since sqlite ships with later Python releases, you can have a working, database-backed webapp up and running in about 5 minutes. Of course it won’t do much (aside from the wonderful built-in admin system), but still, to get started that fast is great.

Of course, no one is going to put an app into production with the little webserver that Django gives you. For production you need to tie in with a real webserver. Traditionally that means Apache, which is what I use. There are other high performance web servers that people are using (apparently with great success) with Django, but I’m old school. At least for the time being. Besides, Apache is widely available and supported on a lot of servers, so it makes for an easy target.

Or so you’d think, anyway. Getting a full stack of Apache, mod_python, MySQL, and Django turns out to be the biggest obstacle to working with Django “for reals”. I’m probably spoiled by years of working with stacks that have more integration like .NET, or just more raw ammo, like Perl/CPAN.

I believe I can honestly claim that out of the past 3 months, I’ve spent approximately 1.5 to 2 months dealing with Django configuration. Part of that is my fault. For one thing, I want to have a proper deployment waterfall: development box, staging box, client review, then client’s production.  Which means trying to set up the same damned thing over and over again. Which shouldn’t be a problem, except that I’m developing on my Intel Macbook, staging on my G4 Mac Mini, pushing to review on a Django-friendly Ubuntu hosting provider, and then finally pushing out to a Fedora production box. If this was Perl I probably wouldn’t give a shit. But it ain’t.

The weak points turned out to be mod_python (the Python interpreter which you embed into Apache) and MySQLdb (the MySQL access library for Python). The mod_python install actually hasn’t been so bad. I did have trouble at one point getting mod_python to use the correct Python version. (I cheated and renamed the one that was in the system PATH first. Lame but it worked.) Getting MySQLdb was much more of a pain in the ass. Apparently very few people use MySQL from Python (Postgres seems to be far, far more popular), because there’s basically one dude who maintains the MySQLdb library. That’s a recipe for a lot of blind corners and situations where things don’t work so well. I spent an inordinate amount of time getting MySQLdb working, and I think I still don’t have it working right on my development box.

Oh, that’s right. Did I mention that? I can’t run the full Django stack on my Intel Macbook. Partially because of the MySQLdb crap (I clearly have Intel, it clearly thinks I have PPC. Wtf?), but also partly because of one other library, Python Imaging Library. That fucker will NOT build on my Macbook. Since the main client app I’m working on uses that (sort of… I think the feature it was included for never gets used), I can’t run Django for client development on my primary machine.

All of which means I’m shelling over to my Mac Mini (which hangs daily, btw. Fun.) and developing there (In pico. Yay.), or sometimes I just give up altogether and code on the review box.

Now, this all probably sounds kind of negative. And it is, but only about short-term things. When everything is actually up and running, developing with Django is fast and pretty enjoyable. But getting to that point costs a small portion of your soul.

Worse, I think my Joel score just went down.

Yahoo Doesn’t Need A Fail Whale

July 14th, 2008 by matt Posted in humane, not good enough, rants.

I haven’t posted in a while. I’ve been crazy busy. But it’s more than that: I don’t want to post just to hate on people. And every single time I think I have a good thing to write about, it comes out negative. And that has kept me away. But, apparently I can’t deny what I am.

I’m a hater.

I just can’t help it.

Maybe it is the heat, I don’t know. But shit like this just pisses me off, and has for *far too long*:


A gentle note to Yahoo:

I DO NOT LIVE IN MOTHERFUCKING FRANCE!

And dammit, Yahoo, you know this. You’ve known me forever. Look - I’m logged in! Read my profile. Or see that I’m connected from a well known ISP in the US, with an IP address which simply *does not roam*. And cookies! You’ve got the cookies.  You can look at those and see every place I’ve asked about. None of those places is in France, or Mexico, or anywhere else you’ve asked me about.

I can’t believe this fail has lasted as long as it has. Why not just go all the way and give me a pulldown list with every country in the world on it. (Be sure to put Afghanistan first on the list and the US way down past Uganda too. Bonus points!)

See how negative I’m being? Feel the hate? It just seems so wrong.

But man, it *feels* so right.

Still, maybe I should be more compassionate. Maybe Yahoo US is underfunded and just can’t make it better. Hey! I know: Maybe the guys at Yahoo Japan can make it better. Seems like they have some extra budget over there…



Seaside

June 12th, 2008 by matt Posted in programming, programming languages. (2 Comments »)

Today I noticed that Randal Schwartz has a video up where he demos Seaside, the up-and-coming web development framework based on Smalltalk. I’ve been hearing about Seaside for about two years now, but I just haven’t had the time to look into it. Actually, that’s not entirely true. I’ve been learning new tools, languages, and platforms like crazy lately, especially over the past 10 months or so. But almost all of that has been driven by the need - real or perceived - of clients or potential clients or my own product development. Seaside, while interesting, doesn’t have the clear “this piece goes here” aspect that has warranted focused attention. Still, every now and then I’d see some mention of Seaside on Hacker News or proggit and my ears would perk up.

I don’t know Randal, aside from his reputation in the Perl community. But apparently at some point last year he went all Paul-of-Tarsus over Seaside. Ever since then I’ve been seeing “Randal Schwartz” and “Seaside” together all over the place. At some point I found Randal’s Smalltalk blog and subscribed. (Btw, Vox is just awful. My 2 cents.)

Here’s what my news reader typically showed for Randal’s feed:

  • Talked about Seaside to Perl guys in French Polynesia
  • Suckered some Perl dudes into listening about Seaside.
  • Seaside talk @ North Pole
  • I snuck my Seaside talk into another Perl conference.
  • More Seaside talking

Of course I’m exaggerating. But not as much as you’d think. He seems to take a special pleasure in sneaking up on Perl programmers with Smalltalk. And he really does seem to get around. But for all of that, there never seemed to be a video. So I was left to wonder: What is the big deal with Seaside?

[Full disclosure: I missed my whoppertunity to see Randal give his talk in person this year because I’m a tool and missed BarCamp.]

Early misgivings and/or questions I had about Seaside:

  • If you’re going to run Smalltalk, why not just run Ruby?
  • If it’s Smalltalk, it’s image-based development, right?
  • Do you remotely debug the image or what?
  • Can I tie this into Apache?
  • Why would a JAPH like Randall give up Perl?

After watching Randal’s presentation I do feel like I understand things a little better, though most of my original questions still linger.

I won’t go over the entire talk. I took a few notes though.

  • He talked about GemStone, a commercial solution that handles distributed data managment/replication, and Magma, a free solution which I guess does roughly the same thing with more work required. I spent a little over a year building a distributed fail-over system for Windows Workflow. So I can appreciate having that kind of power ready to go, and would love it in a web platform.
  • I have mixed feelings about the idea of a continuation-based framework. I struggle with the idea of preserving state too much, especially with something like a web application. But honestly we do a lot of state management in other platforms just to maintain sessions. So I’m not so sure it matters. I will say that the continuation scheme for Seaside seems to just fall naturally out of the capabilities of Smalltalk. Contrast this with Windows Workflow. If you know WF, you know that it didn’t just “fall out” of .Net: it was carved out with a chainsaw.
  • I don’t like the sound of a “canvas” approach to doing HTML. He describes it just like doing 2D graphics drawing, except instead of a canvas or DC you have an HTML “canvas” to “draw” to. I’ll have to see it hands-on to be sure I understand it, but in general I’m against programmatic HTML generation. I think this is one of the fundamental mistakes which happened with Perl web development. I believe strongly in the separation there, and also in the idea of assembling and transforming documents rather than building them programmatically.
  • While I have misgivings about image-based development (especially after breaking my first Squeak image in about 10 mins a few years back), I really, really like the idea of being able to do live debugging. That’s one of the few things I liked about classic VB: You could make changes and continue on. Smalltalk seems to take that all the way down to the VM, which sounds great. I would have killed for that ability in Perl and would love it in Python.

Toward the end of the talk, Randal sat down to do a demo. Unfortunately, the knucklehead behind the camera followed Randal instead of focusing on the screen, so we see almost none of the code or the Smalltalk environment he’s using. (WTF?! Why do the camera people always focus on the speaker during technical presentations? That’s almost never where the action is. Granted, PPTs can get dull, but when actual code or images are being shown on the screen the camera should focus there!)

So the big payoff I expected from the video never came. I’d seen Alan Kay’s Squeak demo before though, so I was able to guess a little about what was on the screen and still got some value out of the video. Here are a few thoughts from that portion:

  • After not looking at Smalltalk in about 4 years and having learned Scheme in the interim, Smalltalk seems much more lispy than I remember. I guess my perspective has changed.
  • It is still not entirely clear how (or if) you can do remote debugging of the web app if you’re executing it on a server.
  • Seaside seems to emphasize or rely upon a lot of round-trips. It also seems to focus on owning the entire app, whereas the trend lately has been toward pulling together apps from smaller pieces with an ajaxy front end.

Hurdles I foresee with Seaside:

  • People have to understand continuations or have them abstracted to the point where everything is “magic” and they don’t understand anything.
  • People have to learn Smalltalk. There seem to be a lot of languages to learn these days. Randal says he can teach you the syntax for Smalltalk in 30 minutes. Big deal! I learned the syntax for Scheme in about 10 minutes and I still don’t know what the hell I’m doing with Scheme or Lisp. Syntax is usually the easy part. Libraries and idioms are the hard part of learning a language. (Most of the time anyway. I found Erlang to be an exception.)
  • The number of competing Web frameworks seems to be growing at a geometric rate right now.
  • No high volume apps running it. Perl has Slashdot, Rails has (for better or worse) Twitter. Django has the Washington Post. PHP has Wordpress (and everything else ever). What’s Seaside got? Dabble DB is mentioned often, but it isn’t on that same level.

Randal gave a nice talk and demo, but it’s one of those subjects that probably requires a few hours, not 40 mins. I was hoping with a demo video I’d have a shit-or-get-off-the-pot moment where I’d feel Seaside was either worth taking time to learn or something to toss. That didn’t happen; I’m still on the fence. For now, Seaside remains on my “someday” list.

Choke

June 7th, 2008 by matt Posted in culture.

Just got word last night that my favorite Palahniuk book, Choke, has been made into a movie that’s coming out in the fall.




Hollywood did such a great job adapting Fight Club, I’m almost afraid they can’t do it again.

Don’t do it Barack!

June 4th, 2008 by matt Posted in politics. (1 Comment »)

Don’t do it Barack. Don’t make Hillary your veep.

She’s not worthy. But that isn’t the important thing. The important thing is the crossover vote you will surely lose if you align yourself with Hillary.

... as long as you don't pick Hillary!Reagan had the “Reagan Democrats”. You could have the “Obama Conservatives”. There is a lot of support for you from conservatives, libertarians, and quasi-libertarians such as myself. There could be even more in the months to come. But tread lightly.

I have supported your campaign since it was only a rumor. I have your bumper sticker on my car. I voted for you in my state primary. In fact, I had to fight red tape just to have my vote counted. So I’m a pretty loyal guy. But if you give Hillary the nod, I’m going to have second thoughts.

You may be led to believe that Hillary represents a great deal of Democratic votes. That is a load of crap. Those votes are already yours. In practical terms it is pretty clear that no one who would vote for Hillary would instead vote for McCain. So with Dems, you’re golden.

The real hassles lay ahead. No doubt you’ll have to deal with the Greens and the Naderites in the fall. That’s going to be enough of a problem. Don’t make it worse by ostracizing those of us who have made the effort to cross over and support you.

Do us all a big favor: Pick up the phone and see what Bill Richardson is up to.


UPDATES: Jimmy Carter knows what I’m talking about.

And here’s the type of voter you risk with a Hillary ticket.

Where the fuck is my Ari Gold?

May 12th, 2008 by matt Posted in contracting, programming, software industry.

Software development is its own unique thing. It is not a profession that can be directly equated to any other. This tends to frustrate people who try to understand the profession. This is true even for software developers, who would like an established model to follow. This is why you see some software companies run like a law firm while others are run like a band of pirates.

Architecture is often seen as a parallel to software development, leading to the trend over the last decade for everyone who can design a program to declare themselves a “software architect”. Of course software is also like plumbing and gardening and a bunch of other professions. And yet it is still unique.

Software by its very nature is an abstract concept, and there are only a few professions that deal in abstract concepts. Law is certainly one. Acting is another, and that’s what I’d like to talk about today.

Think about one of your favorite TV or movie actors. Why do you know this person? 99% of the time, you know an actor because of some role they played which you saw and liked. It was probably some great role you saw them in too. You know George Clooney from “ER” or films like “Ocean’s Eleven” or “O Brother Where Art Thou?”. You probably don’t know him from “The Facts of Life” or “Streethawk”. (Remember Streethawk? It was awesome.) In any case, you know most actors by what roles you’ve seen them play, and how well (or in some cases how terribly poorly) you think they’ve done.

The software world doesn’t work like that. Think of just about any well known person in the software world. How do you know about them? Did you see their amazing code? Probably not. More likely you bought their book, or you saw them speak, or you read their blog.

Of course there some exceptions - programmers who are known mostly for their work. These are almost exclusively in the free software field though, like Linux Torvalds or RMS. (Of course RMS is more like a Tim Robbins: Respected and talented with a passion for activism. But I wince when he opens his mouth.) And even in these cases, most people have never seen any of their code, even though they’ve probably used it.

If you’re a great actor, pretty much all you have is your portfolio of work. But that’s ok: If you’re talented and had good opportunities, you can point back to your portfolio and get more work. In software it doesn’t work that way. Sure, you may have a portfolio of work, but nobody cares. Unless you have an existing relationship with an employer, getting hired consists largely of two things: What specific technologies you’ve worked with lately, and how long you’ve worked with them.

No one calls up George Clooney and asks if he has recent experience playing a 5′ 10″ lesbian biker with a mohawk. (Although I am now tempted to make that call.)

That sort of thing happens everyday in the software world. Why? Our representation is different.

You've got Gold!

In Hollywood, if you’re lucky enough to break in to the movie business, chances are good that you’ve got an agent. You commit to an agent for an agreed upon amount of time. Your agent works actively to find you a part in a movie. You audition, and if you get the part your agent gets a percentage of what the studio pays for you. From what I hear, that percentage is usually in the 10-15% range. Sometimes a little higher depending on what they are doing for you. It is a simple system that seems to work.

The software business in different.

If you’re a contract programmer like I am, things usually work one of two ways: Either you work for a consulting company directly and you let them find you work, or you advertise yourself on places like Dice and negotiate each contract through a recruiter to get a job you want.

That first scenario is most like having a Hollywood agent. You typically don’t commit to the consulting company for any fixed length of time, but otherwise it is the same. The consulting company works to match you to a suitable position. You interview for the position, and if you land the gig your consulting company takes a percentage. Except the percentage they take is more like 40%.

If you work under the second scenario, you generally have more control over things, but you’re also taking more risk of being out of work. More often than not you’re going through the very same consulting companies to get contracts, but you’re not staying exclusively with them so you’ve improved your bargaining position somewhat. You’ll probably be able to negotiate a better deal than 40%.

There is actually a third scenario where you find your own contract. Often you still need representation either because the client requires it or because you don’t want to do billing and cash management yourself. In that situation you have all the bargaining power, but even so, the lowest commission I’ve been able to negotiate is 14%.

So why can’t contract programmers have a Hollywood-style agent? After all, most actors aren’t George Clooney or Tom Cruise. We’re not talking about the top 1% here, we’re talking about the average Joe, the character actor. Why can’t I commit to an agent for a few years, have them find me work, negotiate for me, and only take 10-15% of my earnings?

The answer, as best as I can tell, is commoditization. In our industry the middlemen - hiring managers, HR people, recruiters, etc. - work extremely hard to commoditize labor. To most recruiters, if you’ve got 5 years of experience with C++, you are the same as anyone else who has five years of experience with C++. Never mind that you are an actual person with unique skills and personal qualities that are hard to encapsulate in a resume.

This can be greatly frustrating at times. Most recruiters out there are non-technical people. They aren’t idiots, but most aren’t passionate about what they do and are generally focused on short term goals. Their job becomes one of matching up acronyms in the job requirements with acronyms on your resume. This is reinforced by hiring managers within their client companies, who are almost always in some huge hurry. This system practically guarantees that the best people for a position will never get selected.

Even more frustrating is the need to go through the negotiating process every time you want to work. Really, that’s what an agent is for, and sorry, you’re out of luck there. There are no true agents in this business. Instead, you get a recruiter who either deals in large volume or fat margins. The amount of money they make pimping you is unlikely to be much different than the money they would make pimping someone else. Multiply that by hundreds of developers a year and it all averages out. Why bother to cultivate a personal relationship with talent?

If you’re a movie actor, when you complete a film you have something tangible to point back to and say “I did that”. Not only that, but thousands or maybe millions of people have seen what you did. Your unique skills and personal qualities come through.

If you’re a programmer, when you complete a project, even a highly visible one, you can also say “I did that”. The difference is only a handful of people are really going to understand what you did. Any programmer who has tried to explain what they do to their mom knows what I’m talking about. Is it any wonder that programmers have to turn to non-programming means to stand out?