Apr 16

Unbelievable for a Reality TV hater, but I want to talk about Ramsay’s Kitchen Nightmares. Such a revelation. Both Fox and BBCAmerica have spent a ton of time making Gordon Ramsay look like a gaping asshole. I finally tuned in like you do passing a car wreck. No bodies. No blood. Very little ego for a celebrity chef turned emperor turned TV host. And he seems to legitimately care about the people he visits, a cardinal sin in reality TV (there’s a fantastic recurring bit on That Mitchell and Webb Look where viewers are encouraged to tune into what’s ostensibly a serious science program but is in reality an excuse to “have a good stare at” freaky disabilities).

Story Engine

I’ve been following a comics blogger who breaks books down (there’s a nice link list in this MetaFilter post) into what he calls their “storytelling engines”, the simple theme that runs through a book which all stories revolve around. Having found Ramsay’s Kitchen Nightmares, my concern now is that we’ll be burnt out on it within a couple of weeks, because there’s not a lot there. I hate to admit to being of the hoi polloi, but theres not a ton of conflict. Sure a cook or two might leave, but the shows always end happily with the place back on track after basking in the genius of Gordon Ramsay. Then again, we’ve only seen a handful of shows scattered across Seasons 2, 3 and 4, so maybe they’ve had fist-fights and grease fires galore in the ones we’ve missed.

Knife Sharpening

I worked in a restaurant for six or seven summers. We had three or four head chefs over that time (the turnover wasn’t as bad as it sounds— it was a seasonal place). This gives me just-a-touch more than 0 experience to relate while watching the show, but I think the lessons are applicable outside a kitchen. This is what reality TV should do, present a mirror for us to examine ourselves, rather than a chance to watch those worse off (or so much better off) than us and gawk. In the episodes we’ve seen, there aren’t horrendous health code violations; incompetence is present at some restaurants, but it’s yet to be the underlying problem. The problem is stasis. Comfort. People get into the business, find a way to survive and then stay in their rut. Some even succeeded for a time: the chef at what was Rococo (you can see the first 10 minutes of the episode here) made it into the Michelin Guide and achieved a star back in the ’90s. A decade later, he was serving the menu that had earned him a star. It’s an understandable bit of self-doubt to think the menu is what made the restaurant great. He refused to believe the success was a result of his desire to learn, to invent, to grow. It must suck to wind up being a drudge slaving away at the same mechanical process every day when the person who designed the process was you.

Working for myself now, this scares the shit out of me. How do you prevent that? Being part of a group of even semi-competent co-workers helps to keep you fresh, exposes you to new ideas. Having to solve other peoples’ problems whether I wanted to or not kept me learning. Now that I’m my own head chef*, it’s up to me to keep learning, to keep tossing successful projects in the trash and moving onto new ways. It’s terribly easy to find a computer language, master a framework in it, churn out the same menu for years and then find there are no customers for the one dish you know how to make. The trick is remembering that every day.

* Mature, I know, but I can’t hear the phrase “Head Chef” without thinking of a fellow busboy shouting, “I’ll give you head, chef” just as he exited the kitchen back into a dining room full of elderly patrons.

Oh, and I like posting from Textmate a damn sight better than the Wordpress client, mainly because of my super-slow Textdrive hosting.

Apr 9

Claymore

Apr 9

When I started at my previous job, we were small-time. Sites were ASP or (horrors) ColdFusion talking to an Access database, and even that was only for fancy clients who wanted a record of the Contact Us form submissions from their site. We got a little bigger and a little better and we started rolling out small tools to manage pieces of sites (typically press releases or job postings). Again, ASP talking to Access. Like Mike Mulligan and his steam shovel, the more we worked, the better we got and then, like Mike, we dug ourselves into trouble. We built a site for a client with enough web traffic that Access couldn’t keep up (hard to imagine, I know).

Enter SQL Server. We tried to keep up the pretense this expensive piece of software was a one-time thing, but success here bred more work and attracted more clients who could justify the expense of a machine and a SQL Server web connector license or whatever the hell it’s called. This left reusable bits of code all over, but we didn’t have that many clients who needed their own server. We sucked it up and added a shared SQL Server for mid-sized clients so we could keep using the same code. At this point, some of the most inventive work being done in development was justifying why a new site wouldn’t work with Access. It wasn’t long before that second shared SQL Server came on line. Our codebase was driving our hardware and platform decisions.

This ossifies a company: if you can’t take on jobs smaller than six figures because you can’t hide the software licensing costs, you lose out on smaller jobs. That doesn’t look like a problem to a company in this state because they’ve developed a mindset that says, “We only work on projects that are worthy of our time and platform” (at The Daily WTF, this would be called “enterprise-y”). There was no reason we couldn’t have put MySQL or Postgres on Windows and gotten 90-100% of the same performance for free.  Small projects don’t add a lot to cash flow, but they can be portfolio pieces, they can turn into bigger jobs, they can create connections that lead to bigger jobs. If they do none of those things, they do wonders for development teams. They’re calisthenics. Clients with small budgets don’t have small plans; they want everything the guy at the next table is having, they just don’t want to pay his tab. “Do more with less” was the derisive slogan of the final season of The Wire; when it comes down from management, it is worthless. But when it’s baked into a (well-managed) project, it can force developers to step back and figure out how they can recreate the code they’ve been cutting and pasting in a smaller space. That’s the kind of challenge that not only keeps developers learning, but keeps them interested and in fighting trim.

Mar 26

Dearest Self,

When designing and building a system, don’t just treat the base-level objects as black boxes (”as dumb as they can be, but no dumber”), but the modules they roll up into should be black boxes as well. That way, when you get pulled off progress on one of the modules, you can just tie things off and leave them. If they don’t support the few places they interact with others, they’re not done yet. Also, documentation never hurts.

Mar 21

I’m coming to (near?) the end of what can only charitably be called a “difficult” project. Unfortunately, I don’t think I will be working with any of the parties involved in the future. For future readers and my present sanity, this feels like a good time to define what I don’t do for a living; sometimes that negative space tells more about a thing than the thing itself.

I don’t work without specifications (requirements). Real specs, not three pages of bullet points in Microsoft Word. You don’t have to know it all when we start and it’s part of my job to get those requirements right, but it is a bad idea to put hands to keyboard before I know exactly what I’m doing. Every development project changes in definition from when it starts. That’s the beauty and pain of requirements. You sit down thinking it’s stupid to have to tell me what to do and then we start talking about what to do and the conversation chases dozens of tangents. Ratholes appear. Better to find them up front and deal with them (or pour concrete down them) than find out “Later”.

I don’t put together the requirements without talking to you. I don’t know your business, you do. Even if you just got hired last week and this is your first assignment, you still know better. You know who to ask (and who the office gossip says to avoid), you know where to go for answers outside your company and you know how to ask relevant questions that get helpful answers (compare and contrast with my: “So how do you guys ship stuff to people?”).

I don’t build the system for you. I build it for your customers, your users. It’s rare that you’re going to be a perfect example of your customer and even then, no. You can’t serve two masters (the application vs. career success). This doesn’t mean every project has to involve one-way glass, video cameras, white lab coats and a testing facility, but it does mean putting together some kind of test, even if it’s just simple hand drawings of screens to show to random folks in the hallway to make sure we haven’t missed something glaringly obvious. Oh, and about those paper protoypes: I don’t work without some kind of screen mockup. It doesn’t need to be the Sistine Chapel. It doesn’t even need to look like the final screen. We just need some kind of reference so when I hand in my work, there’s an agreed-upon set of things that should be there. This also saves me bugging you in the middle of the night, so invest in your sleep up front.

I don’t know anyone that handles scope creep well, but let me define that in my terms: changes or additions to the requirements after they’ve been fully thrashed out and after work has begun. Even as an hourly contractor, I get skittish. “Hey, it’s just more work for you.” Sure. But if it affects things that have been finished and vetted, it’s A Bad Idea. However, things come up and needs change. My rule of thumb is that if the change would alter how data is stored, then let’s suck it up and do it now. Otherwise that means the work has to get done later and data migration will have to be done. Better to do one difficult thing now than one difficult thing and one risky thing later. If it doesn’t change the data, we should talk about creating a “Things for the next version” list.

I don’t work without a QA person or team. This doesn’t have to be anyone with a degree and 100 years of experience in Quality Assurance. It just needs to be someone other than me who can run through the system as a user, spot things that don’t match the requirements and tell me about them in a meaningful way, e.g., “Here’s what I did, here’s what should have happened, here’s the big explosion I got instead” as opposed to “COMPUTER BAD!” I’ve never met a developer who could qa their own work, myself included. After spending weeks or months or years designing the flow of things, we have a bad habit of “testing” the system by using it in the exact fashion it was designed (”Click on this button, then give it a value between 1 and 10 but never a decimal and then wait five minutes”) instead of beating on the thing until it can withstand all challenges.

After all that, surprisingly, there are some things I do do*. Email me at tclancy@gmail.com if you want me to do them for you.

I know it comes out like “doo-doo” and I know that was a poor way to phrase the fact I know it, which was even more fun.

Mar 7

I do my Windows development on a beast* of a Bootcamp’d Mac Pro tower and that works just fine, or it would if every project I worked on were virgin territory, untouched by human hands. Unfortunately, some of what I work on has been touched by human hands, and they’re all thumbs. I suppose it’s coming from an agency background, but it’s strange to me how many people act as though their site/ app is the only thing on a box. In celebration of my MSDN discs finally arriving (well worth the six months’ wait, the 100 emails and phone calls and general frustration, thanks for asking), I built a VM in the background while I worked today. I couldn’t get SQL Server 2008 to install (because I am dumb and don’t understand what they mean when they describe all the account logins), but everything else is, for better or worse, current MS tech: Server 2003, VS2008, SQL 2005. I even threw IE8 and Silverlight on for laughs.

Then immediately put Firefox on as IE8 . . . I don’t understand how it gets things so wrong. They’ve added a bunch of features from Firefox, but they can’t simply copy them because then people would notice they copied them. So they copy them and screw them up. Firefox 2 added the yellow URL bar to let you know when you’re on a secure URL. Firefox 3 adds a little green section to show you who owns the SSL certificate so users are (theoretically) better protected against phishing. If you like that, IE thinks you will love their idea: everthing but the actual domain in the URL bar is greyed out so it’s barely legible. Given the cool kids have been talking for 3-4 years about how the URL bar is the new command line and frameworks like Rails go to great pains to make the full URL informative, this is a fantastic way to fuck that up. A+. And it just goes from there. Everything feels off-brand. All that’s missing is some Engrish.

Either way, now I have a nice new VM image I can re-use for development on projects:

  • SQL Server
  • Visual Studio
  • Tortoise SVN
  • Launchy
  • Taskbar Shuffle

And a little here and there. As soon as I was finished, I sent a copy up to my Amazon S3 account so I could get at that VM from any machine anywhere in the world. As it slowly ticked that 12 gigs into the cloud, I realized I’d just blown 50 cents. Where do I ever go? Stupid bloggers trying to make coding sound rock’n'roll.

* A beast to me anyway. Not compared to the 4 proc, 64 gigs of memory monsters the cool Mac kids have for opening what must be some massive Youtube videos

Mar 7

Quite like the SQL Server 2008 beta program’s header image

Feb 23

This post exists as a note to myself so I can remember the pain. So far:

7:30am - My old copy of Agile Web Development with Rails may be more of a hindrance than a help. It’s from the days of yore (Rails 1.2 or so) and I’d like to work with the current 2.0 version of Rails, but this means some of the book’s command-line instructions have to be ignored and the “modern” equivalent found online. Turns out database tables get created in a “user-friendly” migration instead of the older convention of raw sql files. I’ll need to find the way to add indicies and other db tuning info to the migrations. It’s all irrelevant if I can’t figure out why my model doesn’t show any fields when I try to create it in the admin. I either fouled something up using the old conventions or there’s some miscommunication between Rails and MySQL (it groused about not having the mysql gem installed a while back, but I installed it– of course, that barfed when trying to install its documentation, but it said it installed correctly and I don’t see the log warnings anymore). I feel like Aptana is more of a hindrance than a help right now as I’m drowning in options and ways to investigate what’s going on.

7:45am - Going back and reading the link above in a more linear fashion, it does clearly say “no dynamic scaffolding”, which may be my problem, that I’m trying to rebuild the scaffolding over what I initially generated. All I see when I go to the scaffold page is a create button with no fields. Pressing the create button adds a record to the database, so it’s not a db communication problem (whatever it is, it’s the same problem described by James here with no solution provided). I just went back, deleted all my databases and all the files/folders I could find related to the one model I’ve been trying to create (User). And that . . . did not work. Awesome. I can see why people love this so. It really is like magic.

7:50am - Ok, so I’m a little dim. Apparently “no dynamic scaffolding” doesn’t mean “There’s a new way to do this”. It means “Gone”. Either I’m really stupid or the tutorial linked above dances over some bits that need doing. Moving on to this tutorial since it seems to address this problem. If nothing else, I learned that I could do the Model & Controller destruction via script instead of deleting the relevant files by hand. Really helpful when starting on a framework or language, which is usually a set of fits and starts. That worked, but it took two tries. The first time I did it without specifying the fields at the command line, e.g., “ruby script/generate scaffold User”, then added my fields to the migration and ran the db:migrate task. Nothing doing. So I destroyed the model & controller, re-ran the generate with all my fields listed in the line and then restarted the server without bothering to run db:migrate (the new 001_create_users.rb matched the older one exactly). It would appear the key difference is that the second run offered to overwrite the user views. Not sure if they weren’t there the first time around or if I did something different. Either way, it works. And I got about 3% of where I wanted to get in the first 2 hours.

8:10am - A discussion that explains things a little more clearly. It makes sense that the scaffolds are just a starting point, but the one thing that puts me off Rails every time I start up again is the attitude of the community. It’s endemic. I tried to get help in IRC once and anyone with a question is treated like an ass for not being part of the club. I do this for a living, I just don’t do it in your language and framework of choice. The community feels so closed-minded, but closed in a really interesting way, because I’m either getting too old or there’s a stink to the Rails Borg that makes it an Insiders Club no one but misanthropes would actually want to be accepted into. I have a Powerbook and a copy of Textmate. Neither of them changed my life. If they were gone tomorrow, I could cope. My simplistic observation of how to “belong”:

  1. Mac laptop
  2. Textmate
  3. Glasses
  4. Short haircut

Actually, I have all of that. Still not interested. I should point out your development machine needs to be a laptop so you can develop on the road at all the places no one is ever going to ask you to go. From that discussion: “dynamic scaffolding was a crutch that kept people from really getting Rails from the start”. See? It’s not about being able to get whatever you want done. It’s about learning Ruby and Rails and falling deeply in love with them. Bad enough when developers lose sight of what an application is supposed to do for people and start gold-plating features because the app becomes an end goal in itself. This guy wants you to move another step of abstraction past that: you need to spend some time learning the framework upfront. He’s not so much turning the value proposition of Rails upside-down as he’s throwing it out. I’m guessing he has full-time employment with no real deadlines.

Feb 19

The main point of buying programming books from Wrox is the SI Swimsuit Issue-quality cover models. I’m calling a party foul on this fellow: note the casual, “Gosh, little ol’ me?” pose that leads to a reveal of his skin art. If anything, you’re scaring off your target audience, not attracting them.