Convert or Pay the Productivity Tax

My Islamic studies professor in college frequently told this ancedote on the first day of class (or whenever he got an opportunity). It started out like this:

When the ancient muslim armies invaded other countries, they normally issued an ultimatum: Convert, Die, or Pay a tax. This usually resulted in the question: So how much is this tax? 

It’s no surprise that the muslim armies were able to invade many territories without bloodshed.

We need something similar in Software Development. Too many companies cling to Enterprise-y Version Control Systems that make even the smartest developer cringe when the subject of branching and merging is brought up.  Management clings to these systems without logic, and we suffer for that decision. It even pervades to our project management and defect tracking software (I’m looking at you, Test Director).

It’s time to issue our own ultimatum:

Convert, or pay the productivity tax.

We must stand up against the tyranny of idiotic version control. Not being able to branch and merge? What’s the use in having Version control? Not being able to commit code until it’s bug free? Sacrilege

There is a better way.

Joel Spolsky has written up an excellent tutorial on Mecurial and how it differs from traditional version control systems. Read it. Pass it around the office. Hound your manager. Light Pitchforks and Raise torches. Do whatever it takes: DVCS’s are free. They’re better than tradtional VCSs. 

Why aren’t you using them?

An Obituary for ASP.NET

ASP.NET died today. Much like Cobol, he leaves behind a legacy that will touch our lives for years to come.

ASP.NET grew up in the shadow of his older brother, Winforms. His father was ASP, his mother VBScript. They lived in a world much like our own, a world of webs and the things that connect them together.

ASP wanted a better world for his son. He worked tirelessly to make sure that his son never had to deal with bees and their awful stings. He worked with uncle MFC to create a safe environment where ASP.NET could play without fear of hurting himself or others. MFC, having no children of his own, sought this as his life’s work. Soon, the .NET framework was built, and ASP.NET’s purpose became clear: To become the framework for the web.

Like any rebellious child, ASP.NET didn’t listen to his parents.

He toiled in the web, jealous of  Winforms, emulating his ways.  Some might say he didn’t have an original thought for himself, that he just imitated his brother; they would be right.  

He saw the flaws in his classmates’ work, how they constantly forgot what he told them.  He knew that with just a little work, he could remember what they had failed to.

He knew this because Winforms remembered everything, and come hell or high water, he would too.

Staying awake late at night, he tinkered with what he would call Viewstate, believing that a cool sounding name would increase his standing with the girl across the moat, Perl. 

The Castle. From Flickr. Here: by Lincolnian Brian

Perl, the daughter of C and Larry Wall, had her own problems.  For so long she had run around with her glue, patching up different parts of the web. She spoke many different dialects, she  could even speak Gibberish and still get her job done, but she was tired. She was cranky.  Some called her insecure, but she laughed at their ignorance. Her ‘friend’ PHP treated her with contempt while imitating all of her best features.  She wondered when the world would let her retire. After all, they had PHP, they had Python, and they had Java. Why would they need her? Couldn’t she just rest?

It was not to be.

Meanwhile, ASP.NET wished to free his girlfriend Perl of all her troubles and Viewstate was his ticket.  They seemed an unlikely pair, ASP.NET and Perl, but it is said that opposites attract.

Predictably, Viewstate was heckled by PHP.  Java, being the robust gentleman he was, just kept eating resources, getting rich and fat off of all the features people were paying for. Java’s followers saw PHP as a poser, and ASP as childish; but when ASP.NET came out and they saw how easy it would be to use Viewstate, they were hooked, and for Java, the feast was over.

And so it came to be that ASP.NET was crowned king, with Perl at his side; able to rest a little more.

 Meanwhile, PHP worked to fill in the gaps of its knowledge. Simply copying Perl wasn’t enough – it lacked the magic Perl had. PHP had a huge vocabulary, but no way to categorize it.  Looking around at everyone else, it saw that they used namespaces to separate their vocabulary for their audiences. But, as is often the case with drastic change, it knew that it wasn’t going to be easy.

PHP worked to include namespaces, but not before shedding her dignity and self-respect, what little was left.

ASP.NET’s  rule was fought by Python, the snake that nipped at its heels, reminding him that Viewstate had left him slower and heavier than he used to be. Perl couldn’t even fend Python off, as he came with everything.  Python was winning. He could do everything that Perl could do, and he could speak clearly at the same time.

The web was a cruel world.

ASP.NET knew he would lose his kingdom if he didn’t change. Python and Ruby had been dating, but broke up when they realized that Django and Ruby-On-Rails were copies of each other. They are currently settling out of court. 

The infighting gave ASP.NET a chance to get it right; a chance to regain all that was lost. He hoped he could even pass the torch on, and allow he and Perl to retire to an island in the Caribbean, free from tax laws and all of the problems the race for #1 causes.

So he began his work, looking back on the design documents he inherited from his father. He still understood his mother’s language, but wanted to use a language he’d embraced early on in his life, C#. C# was a tribute to C, Perl’s mother, and C++, Perl’s aunt.  He knew that C# would encourage the remaining Java followers to embrace his work.

But that wouldn’t be enough. He would need something more, something that PHP’s friend Zend, Django, and Ruby-On-Rails had. He would need MVC.

from Flickr:

The climb to Mount MVC was treacherous. Along the way he met a strange traveler who insisted on proving each step was valid before taking it. After three such tries he finally was able to gather the name of that strange, traveler: TDD. TDD and his little brother, Unit Test had just come back from the Agile mountains, hoping to spread their word among the heathens, pressing them to change their heath-ren ways. They had read the ancient texts, and knew that the evil Bugs could be squashed with their Agile religion.  They were confident of their success, haughty even.

But this story is not about them.

Shaking his head at TDD and leaving, ASP.NET would later realize that he was jealous that he could never have learned those ways. It would have taken much work, too much mocking, as his work depended very much on dependencies that were not easily removed.

Arriving at Mount MVC, nestled in the bosom of the Separation of Concerns in the Agile mountains, ASP.NET sought out the answer to his problems. There he waited and meditated, feeling the ebb of the web flow through his consciousness. From where he sat, gazing over the ranges below, and watching the various forms of life try to communicate.  His answer wasn’t something in the Mountain, it was the mountain itself.

Studying how the mountain was laid out in the Separation of Concerns, how it all interacted in symbiosis, ASP.NET knew he had his answer. He bounded back down the mountain.  He passed TDD easily, as TDD was stuck in a failing test. ASP.NET thought about stopping to help, but realized that TDD just hadn’t written the passing test yet.  Eager to reclaim his throne and his bride, ASP.NET sprinted back to his kingdom, arriving just as the tribe of Django, Zend, and Ruby looked as if they would converge on his castle, pitchforks in hand.

If he didn’t hurry, there would be nothing to save.

He asked Perl for one last favor: she was to hold a code-golf tournament to keep them occupied while ASP.NET toiled in his labratory.

Perl obliged, knowing that if C did not show up, she would win any code-golf tournament held (Her fears were unjustified, it would turn out, as C was still locked in her own Obsfucation contest. It was a similar last ditch effort to retain her own followers: Long abandoned except for by OpenGL, Unix, and Win32. As an extra-long aside, Win32 and Unix were still fighting, with Unix claiming that his hot Girlfriend, Apple OS X, could knock the sock off of anything Win32 had. That too, is a story for another day)

While the tournament was progressing, or rather, getting shorter, ASP.NET went back to web fundaments, back to what his father had taught him. The web could indeed forget, but he knew the ways around that without sacrificing his soul. Eating cookies while he worked, he looked at his father’s own manuals.  Seeing the answer before him, and remembering what he learned in the Agile mountains, ASP.NET finally had his creation.

He named it ASP.NET MVC, in honor of the Mountain.

Using the best parts of his father and his own life’s experience, he created something that would appeal to anyone who might defect to the Django, RoR, or Zend tribes. As a tribute to the zen masters in the Agile mountains, he even included something that he himself still thought silly: TDD.

With his creation complete, he carryed it down to the tournament. Seeing that the entrants were down to 28 characters, he knew it would end soon. Perl soon landed the coup de grâce with the -e modifer. Python and Ruby didn’t stand a chance. PHP and Java were cut in the first round.

ASP.NET showed his son MVC off to the crowd; everyone noting his strength, good looks, and physical prowress. MVC promptly pulled Ruby’s hair. Django took far too long to object. Zend, seeing his tribe in peril, left immediately to try to learn what the word ‘debugger’ meant.

Like any son, MVC didn’t listen to his father. He instead took in his father’s lessons in his own rebellious fashion. If ASP were still around, he would probably have chuckled, seeing his own parenting pains exacted upon his son.

ASP.NET died today. This was his story. He is survived by his Wife, Perl, his brother Winforms, and by his son, MVC. MVC is said to hike in the Agile mountains, fully steeped in the ways of object oriented principles.

Zend still hasn’t figured out what a debugger is, and Ruby is plotting her revenge against MVC for his hair-pulling stunt.  They have the makings of a cute couple.


How Stack Overflow Propelled me to the Front Page of Google

I’m a nobody in the world of programming. Literally. I’ve published next to nothing, I’ve done very little in the way of public projects, and I’ve never done any of the cool stuff that even a guy like Portman Wills or Jin Yang has. Heck, I’m a nobody.

Yet I’m still on the front page of Google when you search my name

Google Search for my name

More importantly, I’m on the front page when potential employers search my name.  Even better, my blog is the seventh link. Not bad for something with 2 readers (Hi mom!).

How did this happen?

I attribute it to Stack Overflow.  Two years ago, if you had done a search for my name, you would have come up with the yellow-belly from Star Trek: The Original Series. Not cool.

Commodore George Stocker

You’d have also come up with some guy that got blocked on Twitter. But me? I was on the second page… Where no one has gone before.

Anyway, back to how Stack Overflow rocked my Name to the top of Google.

It has amazingly good SEO practices. Not the shady, back-alley kind, but the Google-Optimized sitemap, the friendly URLs, and its sheer size.

It wasn’t all Stack Overflow though. I also had to give up my fear. Fear of seeing my name out there on the internet, fear of decloaking and showing the world I’m more than just a screen name (Gortok, in case you were wondering), and fear that I’d screw something up in some untold way. You know, like when you take the last bagel at a conference and everyone gives you the stink-eye.

The biggest part is that I had to build my online brand, and Stack Overflow gave me the tools to do that. That’s worth double the time I’ve spent there.

Extra: From the I-buy-a-volvo-and-I-always-see-a-volvo-on-the-road-department:

Good Idea, Bad Idea

GoodIdea, Bad Idea



When I let the cat out of the bag Wednesday, I took a chance that someone else who reads by blog (all two of you) wouldn’t have the same idea and beat me to the punch. I then further took a chance by telling the crowd about my work with Markdown.

Good Idea: Being public about your intentions.

Bad Idea: Being public about your intentions if you care about someone eating your lunch.

In this case, I don’t care if someone comes along and does the same thing, or even does it better. That’s a win/win. I get a blog engine and I’m not on the hook to maintain it, and I get a blog engine I want to use. I’m well aware of the frameworkitis that can make its way into developing a blog engine, and I hope to avoid that, if at all possible.

Also, I contacted the Department of Cliches Department and asked them if I could extend my cliche quota to five since it was friday, their response? Not a chance in hell.

Has “Dedicated” Lost its meaning?

Coming into work this morning, I heard the word ‘dedicated’ on radio advertisements no less than 15 times. That’s in a 45 minute commute.

It appears that everyone and their brother is dedicated to their customers these days:

dedicated picture on teh google

I submit that we should remove dedicated from the marketing-speak lexicon and replace it with:

“We like money. We will make sure you keep giving us money by giving you the best product [or service] we can.”

At least then they’d be honest about it.

Missing the target, Accurately


Missing the Target, Accurately


I’ve been blogging since 2000. That’s a long time in internet years. I’ve blogged about college life on Livejournal, about Soccer Refereeing on Blogspot, and about personal and computer topics at my old Gaming Clan’s site, and most recently, here.

I’ve used Movable Type, WordPress, TypePad, Livejournal, and BlogEngine.NET. They have one thing in common: They all miss the target, accurately.

That’s not to say they’re bad, but none of them are great, either.

Or, as Winston Churchill might put it:

Even Winston churchill thinks Blog engines suck

It has been said that WordPress is the worst form of blog engine except all the others that have been tried.

For most of my adult life, I couldn’t put my finger on why I disliked each blog engine, but it just felt like something was amiss. Until this question about creating a blog engine on Stack Overflow:

Cal Henderson (of Flickr fame) gave a keynote “Why I hate Django” at DjangoCon 2008, which is well worth a watch for many reasons. In one bit he asked how many of the audience were working on blogging engines. So many people put their hands up in fact that of those that didn’t he asked “Why aren’t you?”

Anecdote aside, I see so many questions and answers here that relate to building blogging engines I just have to ask, since I don’t get it: why are so many people writing what surely must’ve been written countless times already? If you are writing one such engine, why are you? Because I seriously don’t get it.

I’d thought about that for a long time too, but then I saw this answer:

Honestly? I think it’s probably some combination of the following


  • It still hasn’t been perfected (and amazingly, it hasn’t)

He goes on to write:

I could never shake the nagging irritation I felt when I couldn’t get TypePad to do something I wanted, however trivial. Why, again, couldn’t I search my own freaking blog? To find an old entry, I had use either the next/previous links (lame), category links (assuming I’d bothered to categorize the entry I was looking for) or even worse, the proverbial “archive” links, organized descendingly as they are by date, hoping I might get lucky and choose the right month-year combo during which I’d happened to submit the entry in question. And why couldn’t I just create a new, non-blog-oriented page containing some other kind of managed content, like my reading list, or a collection of movie reviews? Sure, I could succumb to the rigid structure of the TypePad system and simply “tag” all movie reviews as “movie-review” and dump them into the blog alongside everything else — but why should I have to do that? I was an engineer, for God’s sake — I’d done this before. A blog was just CRUD — a web app in its simplest form. Why hadn’t anyone gotten one right, after nearly a decade of requirements gathering?

Screw it, I thought. I’m going to do this myself. Again.

Indeed, I feel the same way about BlogEngine.NET (that’s what powers this blog). In no particular order:

  • Tattered Blog Layout (seriously, have you seen the front page of my blog?)
  • Posting Code is a nightmare.
  • WYSIWYG editor is so 2000 and late.
  • I can’t publish entries ahead of time without mental and physical gymnastics
  • No mechanism to delete drafts
  • The user experience is annoying at best.
  • Oh, and passwords? Stored in plaintext.

Experiencing Stack Overflow’s handling of  posting content was my lightbulb moment. Until that point I never thought it could be better for us. It is:

It’s almost as if Stack Overflow was meant to be a blog:

It's a venn diagram.

Leave the blog part, and you have what I want out of my blog engine.


  • Easy to post using Markdown
  • Live Preview
  • Posts and Comments should be able to be voted on
  • No nesting of comments
  • Clean, uncluttered UI
  • RSS
  • Post Scheduling
  • Open ID authentication
  • Invisible Rate limits
  • RESTful URLs
  • Adding Non-Blog content as easy as adding Blog content

A Blog engine should make it easy to blog. It should be even easier than easy; it should be a joy to blog. 

I asked Jeff Atwood in an email whether or not the Stack Overflow team was going to branch out their source code and take this type of project on (since many of the underpinnings are already there). He declined, so I’m going to do it.

Wish me luck.


Revisiting Perl

As I wrote in a previous blog post, I did indeed dig out my Programming Perl book over the weekend and pulled out this particular solution. I’m sure there are other Perl solutions that are much more elegant and much shorter, but give me a break, ok? It’s been a while.

#! usr/bin/perl -w
$file = $ARGV[0];
$output = “new$file”; 
open (FH, “$file”) or die $!;
open (FH1, “>$output”) or die $!;
while(my $line = <FH>) {
    $op = lc($line);
    print FH1 $op;
close FH;
close FH1;

What is your Perl solution?

Edit: After Googling for a solution, I found the following on the interwebs:

perl -wpl -e ‘s/^.*$/U$&/g;’ filename

How’s that for small?

Standups: A Cure for the common Meeting

Meetings: A classified ad for hell:

Business people love meetings. Oh God, do they love meetings. Need to pass information along? Hold a meeting! Need to appear like you’re in the thick of it all? Hold a meeting! Want to crucify your subordinates under a mountain of action items? Hold a meeting!

Evil yes, but Meetings are a nasty requirement for ‘getting everyone on the same page’, and letting everyone know where the reelase stands. Unless you’re in chaos driven development, this is a Good Thing™.

To this end, the Agile folks came up with the Daily Standup meeting.  In order to get rid of the ‘ew, meeting‘ feeling, a stand up does the following and only the following:

  • Starts precisely on time
  • All are welcome, but only “pigs” (Team Members) may speak
  • Limited to 15 minutes
  • Occurs at the same location and same time every day

Each “pig” answers the following questions:

  • What have you done since yesterday?
  • What are you planning to do today?
  • Do you have any problems preventing you from accomplishing your goal?

The metaphor of the pig comes from a joke that is appropos to software development:

A chicken and a pig are together when the chicken says, “Let’s start a restaurant!”.
The pig thinks it over and says, “What would we call this restaurant?”.
The chicken says, “Ham n’ Eggs!”.
The pig says, “No thanks, I’d be committed, but you’d only be involved!”.


A key requirement of the daily standup meeting is that participants stand up during the meeting. The “stand up” part keeps the meeting down to a sane 15 minutes. You can read Martin Fowler’s excellent expansive treatise on the topic, or you can follow these three four simple steps:

  • Stand Up
  • Last in, First to Talk
  • Stay focused on “Yesterday, Today, Obstacles.”
  • All team members participate

That’s it.


Curly’s Law

I’ve been writing SQL Scripts in Oracle over the past few days, and since it’s not my native SQL land (I much prefer SQL Server), I sent an email to one of our native PL/SQL guys and asked him to look over the script I wrote.  One of the things he mentioned for me to fix was that the script should be in all lowercase because the server is a Unix server. Ok.

So I did the complete non-programmer thing and I started going through and changing the SQL Keywords to lowercase, as well as all the table names.  About a 1/3 of the way through it I realized thatt I could just as easily create a small application that would do this for me.  My instinct was to use Perl, but given that I haven’t used it in years, I opted instead to create a C# application to do it for me. Over the weekend I’m going to pull out my Camel Book and see what I can remember.

The C# code is trivial, but it’s fairly representative as to how I write code. I follow Curly’s Law:

Curly: Do you know what the secret of life is?

Curly: This. [holds up one finger]

Mitch: Your finger?

Curly: One thing. Just one thing. You stick to that and the rest don’t mean shit.

Mitch: But what is the “one thing?”

Curly: [smiles] That’s what you have to find out.

An algorithm, function, method, or whatever you call it in your favorite language should only do one thing. That’s it. One. It feels a lot like speaking in three word sentences, but once you get the hang of it, it makes it much easier to test your code. And who wouldn’t want to test their code? (grin)


namespace LCConverter
    class LCConverter
        static void Main(string[] args)
            string oldfilename = CreateStringFromFile(args[0]);
            string newfilename = args[1];
            string lcFile = oldfilename.ToLowerInvariant();
            GenerateNewFile(newfilename, lcFile);
        private static string CreateStringFromFile(string filename)
            return System.IO.File.ReadAllText(filename);

        private static void GenerateNewFile(string newfilename, string lcFile)
            System.IO.File.WriteAllText(newfilename, lcFile);


Spending 10 minutes creating this tiny little application could have been spent manually checking the SQL scripts, but that’s no fun, and now I have a way to do it for all of the SQL Scripts I write. I can simply write them in ways that are readable to me, and convert them to the ‘required’ way with no fuss.