August 2005 Blog Posts
Check it out, though the sound quality is terrible.
Remember that online games are written by humans and thus are subject to the bugs and flaws that humans are so good at introducing.
This was made quite evident by an article for the current issue of 2600: The Hacker Quarterly that a former coworker of mine wrote. It’s an interesting read and I encourage you to check it out, though it is only in print on dead trees.
In this article he describes a flaw that became apparent to him within a newly released BlackJack game on the Paradise Poker website. In BlackJack, when the dealer is showing an ace, the dealer offers the players the option to purchase insurance. This is a way for the players to pay to cut their losses should the dealer have ten (10, Jack, Queen, or King) in the hole.
On this particular online game, he noticed that when the dealer did have a pocket ten, there would be a noticeable pause before he was prompted with the Insurance request. When there wasn’t a pocket ten, the prompt appeared immediately.
After doing some quick calculations, he realized this bit of information gave him an edge over the house. He ended up playing the next seven hours exploiting this bug and made a nice chunk of change during that time.
Obviously I don’t know what caused the flaw in the game, but my guess is that there was some calculation the system needed to make to determine whether or not to offer insurance. That calculation may have taken more time to perform in the situation the dealer had a ten.
Let’s pretend I am right (not a huge stretch as I am always right) and think about that for a sec. The code itself may have been completely correct in the sense that it did what it was supposed to do. It was the amount of time the code needed to execute that ended up being the tell. No different than when a poker player twitches when holding a great hand.
The fix may have been to change the execution profile of the code so that it made the same pause no matter what was in the hole. Talk about a challenge for game developers. Not only does the code need to be bug free in syntax and semantics, but they now need to worry about the execution profile for their games.
Who knows if there are several other timing flaws like this in other games. It didn’t even require my friend to hack into anything. He simply observed the timing disparity. Now imagine if he was running a timing program specifically designed to look for other timing flaws. Something that would notice discrepancies down to the millisecond.
If you’re heading off to Burning Man this year and want to swing by and say hi (and have a drink), we’re staying in Hysteria (the outermost ring) between 8:00 and 8:30. Our camp will be clearly marked with these camp identifiers.
Today I’m in San Jose staying with my friend Kyle ready to get a bit of work done. Tomorrow bright and early we’re heading off to the BRC.
As many of you know, I will be heading to Burning Man this weekend. That’ll put a crimp in my blogging for a week since I won’t be bringing my tablet to the playa.
There are a lot of misconceptions about Burning Man, often propagated by those who have never attended, but sometimes propagated by those who have attended and did not understand the event. It is often characterized as a lot of drugged out former hippies walking around nude. Certainly you might find a few, but walk the halls of Congress and you’ll find the same (except for the nude part perhaps). Heck, our president is an ex-coke abuser.
In reality, Burning man is more of a music/arts festival and an experiment in radical participatory community and survival. Heck, even the CEO of Google has been in attendance in the past.
In any case, just to show how tame this temporary community can be, I was going over the events calendar and found this gem: Daily Mathematics Discussion/Presentations/Lectures Detail. Sweet!
Oh you know this geek will be there. I may even give a short presentation as I’ve always liked discussing the Monty Hall Problem. It’s a very simple problem, but there are always holdouts who love to argue against the correct answer. Besides, I should keep it simple. You really can’t expect to engage a bunch of drugged out nude hippies in deeper conversations about the whether axiom of choices should truly be accepted as an axiom of set theory.
Gizmodo had a piece on an armored iPod yesterday which was made by someone in Japan. My wife helped me translate the original site and send a tip to Gizmodo. So the “Phil” in the little thanks section is me. Of course I was hoping for a link. ;)
Jeff Atwood writes that truly great programmers are not only lazy, but dumb too.
If you ask my wife, you’ll learn that I’m about the laziest guy around. In fact, I’m quite tempted to end this blog post at that, but I’ll fight my natural state and continue.
To bolster my case I should add that my short-term memory makes you wonder if the movie Memento was inspired by me.
So what was I writing about? Oh yeah, by this criteria I must be the greatest programmer ever! At least I thought so until I read that humility is also a key trait to programming success.
Humility?
Look. I’m here to make computers obey my every command, not seek enlightenment in a monastery after 20 reincarnated lifetimes of trying not to step on insects. How does one embrace humility while trying to act as a complete and total authoritarian to a machine? To the machine, I am God! Bwahahaha.
If you thought your last girlfriend was controlling, you haven’t seen a developer with a computer. You ever see how a software developer gets when the computer doesn’t obey his/her commands to the letter? Let’s just say the stream of profanities is enough to make a grown sailor cry to momma.
But here goes... he’s totally right! There’s nothing more frustrating than that developer who won’t admit a gap in his or her knowledge. That person has ceased to grow as a developer.
Heck, I met a guy who just might have well known everything there was to know about writing software (as others seemed to indicate). But I also learned that he was an arrogant insufferable prick and was nearly impossible to work with. What’s the use of a developer who knows it all when he is incapable of sharing it with his team and brings down everyone’s morale?
So to bolster my claim to the title of “Best Programmer In The World” (and in an attempt to wrestle the title away from Jeff), I humbly admit that I know jack shit about software development. In fact, I’m really just a janitor using the computer at the library to post this. The persona of “Haacked” is really one of my many fine personalities. Good evening and I’ll get to that spill in room #327 soon enough.
Well my Page Rank (and traffic numbers) are suddenly down as of last week. It wasn’t a gradual drop as one would expect, but more of a rapid freefall descent like any stock I’ve ever purchased.
But this post isn’t here to whine. I’m just giving a bit of thanks and link love to those who linked to my blog in order to help my PageRank. It’s reminiscent of a modern day “HaackedAID” benefit. (For the price of one link a day, you too can join us to help helpless bloggers like Haacked one day have hope to emerge from the basement of Google PageRank and live a normal and overly obsessed about numbers blogger life. Won’t you help. This is Sally Struthers signing off.).
So as I said, I really appreciate those of you who linked to me to help. It was very kind. It didn’t work.
Nonetheless, throw some link love right back atcha, but in Romper Room style.
I see Scott Cadillac, and there’s Jayson, and, oh look over there! It’s Ryan Rinaldi and Barry.
Ummm... this is what happens when you drink very very strong coffee. You start bringing back bad memories of Romper Room.
Well I didn’t have a date with Destiny, but we had a productive meeting with the client, and then he proceeded to ply us with drinks until we were all having a very merry time at some bar (I think it’s called the Jungle Room) in the Mandalay Bay).
It was such an obvious attempt to thwart our attempts to limit the scope of the project to fit the budget (Sure! We’ll build you an online presence complete with mobile integration, CMS, CRM, and AJAX in exchange for a Snickers bar, a bit of string and some pocket lint. Just buy me another drink!).
God I love Vegas.
I’m in Las Vegas for a business trip. The usual scope definition/requirements gathering type of planning meeting. You just have to love the slot machines in the airport. They seem to attract badly dressed tourists like moths to a flame.
My PageRank has been in decline lately. I was as high as a five, but just checked and am now down to three. Was it something I said? Or is this the result of rel="nofollow"?
My guess is that it’s a little bit of both. It seems that this has been implemented far and wide, but in such a manner as taking a sledgehammer to pound in a nail.
Hopefully I can correct this in Subtext. First, I need to make sure that rel="nofollow" can be turned off and on easily in Subtext. I really don’t need it since I delete comments left on my blog almost immediately.
Better yet is to have Subtext render the rel="nofollow" in the attributes of comments for a short period of time (configurable of course). After that period is over, the rel="nofollow" is removed. By then you should have surely deleted the comment. That way we can all spread the Google Juice around.
If that doesn’t help, then I’ll start link whoring. Hello? Link to me!
UPDATE: My blog’s homepage is ranked three, but my archives are ranked five. Odd.
Well I’ve decided to start a new magazine called Desert Survival. Check out the inaugural issue.
Ok, I lie. I built this using the fun and friendly Magazine Cover creator. Took me all of five minutes. Now it’s time to quit goofing off and get back to work.
[Listening to: Bruce Lee - Underworld - Beaucoup Fish (4:42)]
You ever work on a project trying to change out how something works and uncover a beautiful elegant extensible design that just makes it a snap? Me neither, but if I do run into such a phantasm, I’d probably get very excited.
Well that’s how I feel about A List Apart's new design. It just makes me go “Unnnhhh!” (and that’s a good thing in case you didn’t know).
Taking a look at it, my first thought was “Steal Steal Steal!” And by “Steal” I mean, “Be Insipired By”.
It’s such a cleanly laid out site that makes good use of screen real-estate. I think current web-design is often stuck in late 90s mentality that a page width has to fit within 800 pixels. Heck, my own site is stuck in that mentality. But I noticed that A List Apart (ALA for short) requires at least 952 pixels of width to fit it all in. By not kowtowing to the remaining grandmas who still can’t crank the resolution above 800x600, a lot of space is opened up to present more information in a much cleaner fashion.
If I didn’t have so much work to do right now, I’d redesign my blog right now.
Putting the ball in the back of the net in a competitive game of Soccer is one of the most exhilarating feelings around. Why, I think it can feel as good as ... well I won’t go there. Suffice to say, it’s a great feeling, even in a city rec league. As long as there are teammates patting you on the back, refs blowing a whistle and a net to capture the shot, it just feels great.
Scoring two in a game, well, that’s even better.
Missing a third great game-winning opportunity, well that almost makes you forget about the first two in frustration. That’s the nature of sport.
My league team that played so dreadfully last season has bounced back this season and we are riding high on an unbeaten streak. We won our last three or four games in a row until this past sunday when we could only pull out a 2-2 tie, both scored by yours truly. Unfortunately, I had a fantastic opportunity to put the game away off a corner kick. I beat the goalie with my header but a defender standing in the goal headed it out just in time. A great defensive play, much to my dismay.
I attribute my personal improvement to taking the entire weekend off from work, which was a welcome and refreshing break. It’s amazing what a full weekend away from the computer (apart from checking emails and reading blogs which don’t count) can do for a person’s sanity. I recommend it.
Last night after the game, we went out to dinner in K-town for some Soon-Dubu (Korean Spicy Tofu Stew). I love Soon-Dubu. The spicier the better. Unfortunately, it has its downsides the day after. For those of you familiar with Korean food, you know exactly what I’m talking about. Let’s just say spicy going in, spicy going out and leave it at that.
UPDATE: They now have a book on Amazon.com!
This site (postsecret.com) is one of the most interesting, compelling and touching (in that pulling the heart strings kind of way, not in the Michael Jackson sort of way, though there is a bit of that I suppose) website/blog I’ve ever had the pleasure of discovering. I found it via Ian White’s blog. (Apparently he is a geek.)
This is a site where people anonymously send a postcard with a secret. Some are sad, others are anger inducing, and then there are the humorous ones like this one.

After reading over my last blog post, I wondered why my posts take such a virulent tone towards Joel Spolsky when I think he’s wrong. Looking around the web, I noticed I am not the only one.
I mean, I’ve never met the guy. He hasn’t killed any puppies that I know of, nor has he insulted my mother. In fact, I am pretty sure he doesn’t even know my mother.
Then I read this snippet of a great comment from Melissa in my blog...
Joel just likes to write with conviction, irrespective of the matter at hand. He probably has strong opinions about light butter/no butter/movie theater butter on his heat-expanded maize kernels, and he could probably write a persuasive as hell argument for his position and the more suggestable among us would immediately agree and get on their knees to show their appreciation for Joel's relieving them of their obligation to think for themselves.
That’s it! Joel is an authority in topics of software, and like it or not, authority carries with it power, which carries with it responsibility (thanks Uncle Ben). He writes that BDUF is absolutely necessary, and suddenly hundreds of software middle managers across the country are thwarting their teams efforts to engage agile methodologies.
“If Joel says BDUF, then we do BDUF. We’re bringing back Ye olde Waterfall Methodology.
So it’s not that I think he’s wrong, it’s that he is so forcibly and authoritatively wrong. I’d love for him to try and make BDUF work with some of my current clients. A few weeks into it and I’d have to have the straight jacket and padded room reserved (Lord knows I’ve had a stay there).
So that explains my harsh attitude. Well... that and the arrogant tone he takes. That seems to get my dire up. Especially when he put down corporate developers.
In any case, one post mentioned why anyone is still reading Joel. Well as much as I like to get my panties in a bunch when he says something stupid, 99% of his writings are still top notch insightful and worthwhile. In every position I’ve been in, I would circulate links to various articles he has written to help improve software development practices. 99% of the time, he knows his stuff. It’s that 1% of the time I wish he’d just shut up.
[Listening to: Stretch 'n' Vern / Get Up! Go Insane! (Fatboy Really Lost It Mix) - Fatboy Slim - Greatest Remixes (7:14)]
Now I like to take shots at myself for producing drivel now and then, but today, I’m going to take a shot at someone else’s drivel. I really should be working right now, but I really need to stop a moment to respond to some FUD. Once again, Joel Spolsky sprays more ignorance on his readership with this quote...
I cant tell you how strongly I believe in Big Design Up Front (BDUF), which the proponents of Extreme Programming consider anathema. I have consistently saved time and made better products by using BDUF and Im proud to use it, no matter what the XP fanatics claim. Theyre just wrong on this point and I cant be any clearer than that.
First, as Brad Wilson mentions, Agile does not mean no design.
The primary mantra of agile methodologies is to do only what is necessary, and no more. For a product company like Joel’s FogCreek, a functional spec is absolutely necessary. (As an aside, I’m a fan of his Painless Functional Specifications Series and have used it as a template for functional specs on several projects). They are not treading new ground with their products and the requirements appear to be very stable from release to release. For example, for CoPilot, Joel dictated the requirements which the interns implemented.
However, I’d point out that the spec he published for all to see is a great example of doing what is necessary and no more. Notice he didn’t list out the specific database tables nor class diagrams. This spec is not an example of big design up front. It is a great example of doing just enough design up front as necessary. How very agile of you Joel and you weren’t even trying.
The second fallacy is that Joel takes his narrow product-based experience and applies it to all of software development. When you are the one who gets to define requirements and your project does not explore new ground, Big Design Up Front hands down can work. But try applying that approach to a client project and watch with horror as three months into the project, the client changes his mind on a feature and leaves you with a hunking mass of outdated and useless UML diagrams you spent eighty man-hours producing.
Agile methodologies are designed to manage change. When you don’t have change to worry about, you can resort to BDUF (though even then I’d only do what is necessary). Agile methodologies weren’t designed to handle developing the software for the Space Shuttle. Requirements are fixed and hardly change in such a project.
But most real world projects have a lot of change. Where does that change come from? The client! There are other sources of change during a project’s lifecycle as well, such as new technologies and from new ideas gained during the project, but the majority of it comes from the client changing his or her mind.
Your typical client knows jack shit about how software is really developed. Yet you expect the client to be able to express extremely detailed requirements for what he or she wants? Might as well hand her a keyboard and tell her to write the code for what she wants. Would you try that with a home builder?
“Hey, I’ve written you a list of exactly how I want my house to be. I’ll be back in a month to see the finished product. Can’t wait!”
I sure hope you wouldn’t. Most likely you’d want to check in every now and then and see how things are going. And as you see the house develop, you might change your mind about a few things.
Developing software for a client is very much like that. A client often doesn’t know what she wants until she sees it. As the project unfolds, the client (and development team) learns more and more about the product and starts to realize that some of her initial requirements don’t really make sense, while also recognizing that there are other requirements that she hadn’t thought of, but your demo reminded her.
Try BDUF on a project like that, and you’re setting yourself up for disappointment and failure. That’s where an agile methodology really shines. Divide the project up in iterations, do just enough up front high level design to give the system coherency, and then flesh out the design during each iteration via some up front iteration level design and refactoring. Again, do just enough design as necessary, but no more.
Well it had to happen sooner or later, my first gray hair. Today, a gray hair, tomorrow I’m shopping for Depends. I need to quit working so much.
I just hate it when software designed to save you countless hours of development work just don’t work out of the box. Especially when you pay good money for it. I’ve come to expect a few hiccups here and there with open source software. But purchasing an expensive rich editing component from a leading vendor, performing a fresh install, and having buttons popup javascript alert boxes with debug information is inexcusable. Along with some other features just plain not working.
It just makes me angry! And you don’ want to see me when I’m angry! Grrr...
Let me know if you like these videos I’m posting or if you’re one video away from cracking my skull with a wet noodle. Cause if you want to crack my skull, you’re really going to have to wait in line.
Meanwhile, watch as this skateboarder skates through a pool full of blue balloons for a neat visual effect.
Update: As Diego points out, I always forget to link. Damn it! Well I linked it now!
I don’t know about you, but running into an unlocked workstation in the office is like finding a voucher for a free airline ticket and hotel stay at Vegas complete with gambling money. In other words, pure fun. (Ok, perhaps I overstated that a bit. I’d much prefer the free stay in Vegas. Anyone? Anyone?)
There are any number of interesting pranks you can pull, but my favorite continues to be to take a screenshot of the user’s desktop, and then move all desktop shortcuts into a backup folder. Also make sure to hide all the taskbars. Then find a decent inconspicuous vantage point and watch as the unsuspecting user flounders with an unresponsive desktop. That’s usually good for a few laughs.
Alternatives include replacing desktop background with embarassing images and changing all the sounds in the systems to embarassing sounds, or simply to sounds for other system functions. The last one is quite subtle, but can be quite confusing as it shows how reliant we can become on sound to navigate a computer.
In any case, in his role as desktop hijinks party pooper, Scott Hanselman has unveiled his latest installment of his “Some Assembly Required” column.
In this installment, he highlights a fine piece of USB hardware, a wireless pc lock, used to automatically lock your machine when you are away. The hardware unfortunately comes with some lame software, so he proceeds to build improved software that can not only lock your machine when you’re away, but set your IM status to away (along with other functions and an extensibility model). That’s pretty sweet and all, but if this catches on, finding unlocked workstations could be a thing of the past (unless you happen to wander into the business or marketing department, the source of all email viruses in any company).
Well, I guess there’ll always the prank of stealing the USB dongle.
Security Question
I am a little ignorant about how USB works, but one security question this raises is what happens if you walk away, and I put an intermediate USB device between the dongle and the computer, and record the data going back and forth. When the user returns, he or she is quite unlikely to notice if the dongle is in the back of the computer (think corporate workstation). How will this device and software protect against that?
Man, I’ve been so heads down busy with work lately that I haven’t had time to regale you with the fantastical events that have been going on around here. Tales of wizards, warriors, and actuarials. Seriously, kick-ass actuarials.
Instead, I’ve simply been linking to other people’s mindless drivel, rather than producing my own. However, I did have a moment to breathe today and watch this hilarious video.
Seriously, go check it out. Now! Satisfaction guaranteed or your money back. If I have ever lead you astray with one of these video links, you let me know. But I don’t think I’ve gone wrong yet. Except for maybe that chair sex video. You know, the one that put Paris Hilton out of business. Seriously, furniture fornication was probaby out of line.
Ha ha ha! Thanks for publishing this one Robb. If anyone is offended, my finger is pointing at Robb. I’m just the messenger.
A farmer walks into his bedroom where his wife is lying on the bed, reading a book. The farmer picks up a sheep he had brought with him in the room and throws it on the bed.
“That’s the pig I screw when you’re not in the mood,” says the Farmer.
“That’s not a pig, that’s a sheep, “ replies his wife.
“Shut up, “ says the farmer, “I’m not talking to you!”

[Via Sharp as a Marble]
Oh yeah, this little curse is going around right now as Microsoft recently released some new security updates. I love Robb’s take on the real message underneath the Automatic Update dialog.
Curse you, Bill Gates!
And your stupid “automatic updates” too….


[Via Sharp as a Marble]
Reading this post from Jayson’s blog caught my attention for two reasons. First, his very strong reaction to some code that swallows an exception. Second, the fact that I’ve written such code before.
Here is the code in question.
public bool IsNumeric(string s)
{
try
{
Int32.Parse(s);
}
catch
{
return false;
}
return true;
}
Jayson’s proposed solution is...
I personally would use double.TryParse() (and downcast accordingly depending on the result) at the very least. At the very most I'd break the string down to a char array, and walk the array calling one of the (very) useful static char.Is<whatever> methods…first non<whatever> value, break out of the loop and return false. I've posted before about the speed at which the framework can process char data…it's very fast and effecient (sic).
For the sake of this discussion, let’s assume the method was intended to be IsInteger(). Using Int.Parse() to test if a string is a number doesn’t make sense since it immediately chokes on 3.14 (get it? Chokes on Pi. Get it? Damn. No sense of humor). If indeed this method was intended to be IsNumeric then I would suggest using double.TryParse and the discussion is finished.
Now in general, I agree with Jayson and often raise fits when I see an exception blindly swallowed. However, when you only deal in absolutes, you start to become a robot (yes, I am resisting the offhand political joke here). For every absolute rule you find in programming (or anywhere for that matter), there is often an example case that is the exception to the rule. As they say, the exception proves the rule.
The problem with simply parsing the string character by character is that it’s quite easy to make a mistake. For example, if you simply called char.IsNumber() on each character, your code would choke on "-123". That’s certainly an integer.
Also, what happens when you want to extend this to handle hex numbers and thousands separators. For example, this code snippet shows various ways to parse an integer.
Console.WriteLine(int.Parse("07A", NumberStyles.HexNumber));
Console.WriteLine(int.Parse("-1234", NumberStyles.AllowLeadingSign));
Console.WriteLine(int.Parse("1,302,312", NumberStyles.AllowThousands));
Console.WriteLine(int.Parse("-1302312"));
This is one of those cases where the API failed us, and was corrected in the upcoming .NET 2.0. In .NET 2.0, this is a moot point. But for those of us using 1.1, I think this is a case where it can be argued that swallowing an exception is a valid workaround for a problem with the API. However, we should swallow the correct exception.
Since there is no int.TryParse() method, I’d still rather rely on the API to do number parsing than rolling my own. It’s not that I don’t think I am capable of it, but I have a much smaller base of testers than the framework team. Here’s how I might rewrite this method.
public bool IsInteger(string s, NumberStyles numberStyles)
{
if(s == null)
throw new ArgumentNullException("s", "Sorry, but I don't do null.");
try
{
Int32.Parse(s, numberStyles);
return true;
}
catch(System.FormatException)
{
//Intentionally Swallowing this.
}
return false;
}
So in 99.9% of the cases, I agree with Jayson that you should generally not swallow exceptions, but there are always the few cases where it might be appropriate. When in doubt, throw it. In the rewrite of this method, notice that I don’t catch ALL exceptions, only the expected one. I wouldn’t want to swallow a ThreadAbortException, OutOfMemoryException, etc...
I would also put a //TODO: in there so that as soon as the polish is put on .NET 2.0, I would rewrite this method immediately to use int.TryParse() and make everybody more comfortable.
This is a case where I do feel uneasy using an exception to control the flow, but that uneasiness is ameliorated in that it is encapsulated in a tight small method. Also, one objection to this post I can anticipate is that it is freakin’ easy to parse an integer, so why not roll your own? While true, the principle remains. What if we were discussing parsing something much more difficult? For exampe, suppose we were instead discussing a method IsGuid(). Now you have to deal with the fact there isn’t even a Guid.Parse() method. You have to pass the string to the constructor of the Guid which will throw an exception if the string is not in a valid format. Yikes! I thought constructors were never supposed to throw exceptions.
In this case, I’d probably prefer not to roll my own Guid parsing algorithm, instead relying on the one provided. Why write code that already exists?
So Jayson, in general you are right, but please don’t beat me to death with a wet noodle if you see something like this in my code. ;)
This is the must see video of the month. I would love to see this video in reverse.
Here’s a link to the full video.
Here’s a link to Watch the video in segments
[Via Boing Boing]
So you’re ready to bore the world with your stuttering lisp via podcasting. Congratulations! Join the thousands of others podcasting their mind numbing undifferentiated message.
But there is a way to stand out. You need an audio logo. Audio logos arguably have a stronger impact than visual logos. Think of the following companies: NBC, Intel and 20th Century Fox. Can you hear in your head their audio logos? Now that’s impact!
Michael Whalen, an independent film score composer, recently started a podcasting logo division, geared towards the more limited budgets of the typical podcasting outfit.
So when the time comes for me to unleash my nasally atonal discordant voice upon the world, it’s heartening to know that my drivel could be accompanied by a kick ass audio logo from someone who’s done work for ABC News, PBS, Apple Computers, etc...
Very early this morning my slumber was disturbed by an extremely lound noise. Like Maverick in Top Gun, those durn shuttle astronauts did a fly by enroute to Edwards, setting off car alarms and howling dogs in the neighborhood. Couldn’t y’all have flown by quietly. There were people sleeping you know. Next thing you know, them punk astronauts will attach a huge bass subwoofer in the back of that thing, spinners, just to let you know what’s up.
All kidding aside, I am glad to hear they made it back safe and sound (a big sound). I wish I would have known they were swinging by. I wonder if I would have been able to see it from here.
Before I mention this, I better knock on wood and cross my fingers so as not to jinx it, but I haven’t had any comment spam for several days. In fact, for the past month, the amount of comment spam on my blog has been greatly reduced. Is rel="nofollow" actually working despite the naysayers? Or have I become such a small fry, that I am not worth the extra CPU cycles and bandwidth to graffiti my site?
Not that I’m complaining, mind you. I love it! I doubt it will last for long, but I can enjoy it while the calm lasts. I just hope it isn’t one of those things where by mentioning it, I bring it on myself.
Whatever the reason, I’ll still be working hard to make sure Subtext is resilient to spam.
A long time ago, in a galaxy far away, I wrote a really simple little class for converting State Codes to State Names and Vice Versa.
Essentially, this class contained two enums, one for state codes such as AK and CA. Another enum contained state names such as Alaska and California. There were static methods that facilitated converting between the the two as well as string representations.
Simple stuff really, but very helpful if you deal with states all the time. However, just today I received an email from Omer pointing out that I am trusting the order of the two enums values to be aligned to allow conversions between the two. While it happens to work, it creates a dependency on the order of the values that doesn’t need to be there. You never know when we’ll annex Iraq as our 51st state and need to add a value to the enums.
In any case, I took Omar’s Omer’s suggestion to have one of the enums refer to the other. For example, here’s a snippet of the StateCode enum.
public enum StateCode
{
/// <summary>Alabama</summary>
AL = State.Alabama,
/// <summary>Alaska</summary>
AK = State.Alaska,
///... and so on
}
Download the revised code here. Thanks Omer!
Well I am back home in the good ol’ U.S. of A and strongly feeling the effects of jet lag despite the few coffees I’ve had in a pathetic attempt to stave off the lethargy.
Despite many of the fancy schmancy meals we had (which were all extremely delicious), my favorite meal was when we went out to a gritty smoky Yakitori place in a nook underneath the train tracks in the Ginza district. As you can see in the photo to the right, the place is tucked against the curving wall of the tunnel.
This was my father-in-law’s favorite Yakitori place, so we brought along a picture of him taken at this place and sat down to enjoy some beer, sake, and delicious Yakitori. A close family friend surprised us by joining us, a full hour and forty minutes by train from his work place.
I wish I could find a Yakitori place in Los Angeles that was even half as good as this place.
Technorati Tags:
japan,
tokyo
In ten minutes we’re getting on the train to go to the Narita airport. I always feel sad when leaving, but excited to get back to work and the exciting opportunities therein. The fact we are flying Singapore airlines is some consolation. They have a fantastic in-flight entertainment system. If only they had wi-fi.
Technorati Tags:
japan,
tokyo
And if so, is he angry? I wondered this after reading Is Object Oriented Programming The Problem? in which Don invokes the programmer archetype, "Mort" to make a point.
Who is Mort?
For the uninitiated, Mort is a creation of arrogant software developers (I don’t exclude myself from this group) used to lump together and define the quintessential "average" developer. Actually, "creation" isn’t the correct word. In the same way that Design Patterns are discovered, not created, Mort is a discovery. He’s a Developer Pattern (If nobody has that term trademarked, I hereby claim it for myself).
Mort isn’t the only Developer Pattern I’ve seen in the wild, but he is the only one famous enough to go by a single name (think Pele, Madonna, etc..) that I know of. Other Developer Patterns that come to mind...
- The Bleeding Edge Liberal
- This one thinks Release Candidate software is so five minutes ago. Alpha and Beta software only, baby.
- The Conservative Curmudgeon
- This one still promotes punch cards as the solution to all software woes and believes things were better when a bug was best taken care of with a can of raid and a fly swatter.
- The Trainer
- The last time this one wrote a try/catch block was during the lesson on exception handling.
- The True Believer
- This one thinks that for any problem, there is one and only one correct solution. This person also believes there is only one true programming language and that language is...
I digress. As I stated before, Mort is the prototype of the average developer. He works 9 to 5 in some cubicle farm of a large bureaucratic corporation (perhaps he’s a government employee), and he rarely if ever attends a developer conference or discusses software development outside of the workplace. He almost certainly is not a technical blogger.
We worry for Mort.
Yet, so many advanced developers, trainers, language designers, get their panties in a tussle over how Mort is doing and what he is capable of. Is Mort switching from VB to VB.NET? Why not? Is Object Oriented Programming too difficult for Mort to grasp? How can we make it easier on poor old Mort?
What I’d like to know is just how many Morts are there out there? For example, if you ask the average developer if he or she is Mort, will you get an honest answer? I may have been in the mold of Mort when I first started writing software, but I most certainly am not Mort now, right? Right?!
Does Mort even know he’s Mort? Or is the "other guy" always Mort. There’s not much you can do for Mort unless Mort takes the first step and admits that he is indeed Mort. If Mort is defined as the "average" developer, we can’t all be "Not Mort"
Personally, I’ve never given Mort much thought. If Mort indeed does exist, I personally don’t have much interesting working with Mort. I’d much prefer working with a Jane or Juan. As a manager, my whole job was to hire someone better than Mort, though I can’t claim I was always successful.
From my experiences with Mort-like developers, Mort is capable of writing crappy code in any language, OO or not. Alot of times, this was due to what I call intellectual laziness. "Hmmm, this seems to solve the problem, I’ll move on." Mort spends very little time reading up on the tools and platforms he uses to get his job done. Call it, programming via Intellisense. We all do it at times, and I wouldn’t want to program without it, but when Intellisense is the only means of learning an API, that’s a problem.
Mort cares little for learning about tools outside of the IDE that can help him be more productive and less error prone. For example, Mort won’t write automated unit tests, instead settling for a quick spot test, leaving the broken code for someone else to discover and fix.
Sorry Mort, but you know it’s true.
What is the Problem?
In any case, in answer to Don’s question, Is Object Oriented Programming the Problem?, my response is no, it is not. The problem is that developing Software is an extremely complex and difficult task. Engineering a sky-scraper sounds like a complicated task with many moving parts, but consider that the number of moving parts in a typical software project makes building a skyscraper look like building a small tower using Duplo blocks.
The problem is complexity and how to manage it. I am afraid there are no easy solutions. Consider that 80% of the time spent in all software projects is during the maintenance phase. This phase is typically where the use of procedural languages causes pain if not done well. If a developer cannot understand OO principles, then that developer will also very likely have trouble with writing modular code in a procedural language. Using a procedural language requires even more diligence due to its lack of language constructs to enforce encapsulation, etc...
I don’t know about you, but the thought of working on a legacy classic ASP project makes me cringe (I usually turn down such projects). I’ve seen reams and reams of spaghetti code using a procedural language (some of it written by me as a brash youth) as to make me dry heave. This is not to say a large system can’t be built well using procedural languages, just that it takes much discipline.
Of course, OO is not a panacea. Equally bad code can be written using an OO language, especially when OO principles are not well understood and you end up with procedural code anyways, or really bad OO-like code. But there’s hope! With well factored OO code, with a light sprinkle of Design Patterns where appropriate, sometimes the internal workings of a class or system are well enough encapsulated that you have a chance of maintaining a large system. There aren’t as many variables to juggle in your head at any one time.
Are DSLs the Solution?
So where do Domain Specific Languages (DSL) fit in? The history of programming languages is the story of using abstractions to hide complexity. Assembly is a abstraction layer on top of the 0s and 1s that make up binary. C is an abstraction on top of Assembly. SmallTalk, C#, and Java uses objects to abstract details of lower level languages... and so on.
Are DSLs the next level of abstraction? It would make sense, but they may be hard to deliver upon. It was thought that Component Technology would deliver the building blocks to make Mort’s life easier. Simply put the blocks together like a big Lego structure and voila! You have a working payroll system! In this scenario, your DSL is simply composed of Domain Specific components (building blocks) and your general purpose language is used to glue these blocks together.
But alas, it is never so simple as that. The problem is that although we can divide the world into distinct "Domains", the variations within a Domain might as much as between Domains. For example, the differences between Chinese dialects are more than the differences between any two Romance languages in Europe.
The result of such variation is that you will rarely find just the right DSL for your situation or the DSL will itself be not much different than a general purpose language. One solution to this problem is to build a custom DSL for your business. But I wouldn’t task Mort with that project. Make sure your Joel’s are working on that one. Perhaps with a custom DSL, Mort has a chance to make a very meaningful contribution, without causing too much damage. If he’d only show more of an interest in building better software.
So What is the Solution?
This may come as a surprise coming from a technophile like myself, but I don’t think that we’ll find a technical solution for Mort. Even if DSLs prove themselves to be the next great abstraction level for software development, we’ll just take the extra productivity gains produced to do even more with software. We’ll build larger and more complex systems, and as we’ve learned, complexity is the problem in the first place.
Rather, I think the solution is to quit pandering to Mort with our condescending paternalistic attitude, and instead demand better from Mort. If the capabilities of the average developer truly is as bleak as many make it out to be, we shouldn’t just accept it, but work to raise the quality of the average developer. "Average developer" should describe an acceptable level of competence.
We have to realize that Mort is responsible for a lot of important systems. Systems that affect the general population. When I hear of recent cases of identity thefts such as Choicepoint among others, especially those caused by lax security such as using default passwords for the database, I think of Mort. When I read that $250 million worth of taxpayer money has gone into an overhaul of the FBI Case File system, and the system has to be scrapped. I think of Mort.
Given this much responsibility, we should expect more from Mort. So Mort, I hate to say this but software development is not like working the register at McDonalds where putting in your nine to five is enough. I am all for work-life balance, but you have to understand that Software development is an incredibly challenging field, requiring intense concentration and strong mental faculty. It’s time for you to attend a conference or two to improve your skills. It’s time for you to subscribe to a few blogs and read a few more books. But read deeper books than How to program the VCR in 21 days. For example, read a book on Design Patterns or Refactoring. Mort, I am afraid it’s time for you to quit coasting. It’s time for you to step it up a notch.
Mort, Can We All Get Along?
So Mort, if you really do exist, and you recognize who you are, I apologize if I came off as a bit harsh or critical in this post. I wonder if we’re being a bit too arrogant for pigeonholing you. Is the Mort archetype really useful for this discussion?
Perhaps my experiences have been with a sub-Mort, and not with you. I really would like to think the average developer deserves more credit. But from some of my experiences, there are large numbers of just plain bad developers out there. For you, I’d like you to know we’re thinking of you, and we know best. If you’re not willing to step up, then the best thing you can do now is go grab me a beer while we work to solve this problem.
We here at “You’ve Been Haacked” (well, actually just me) bend over backwards (and sideways) looking to enhance your Haacked experience and deliver more bang for your buck (What!? You’re not paying for this content? You lousy cheapskates!). To that end, we are adding Job Postings to the litany of entertaining drivel posted on this site. At least, we are adding this one job posting and reserve the right to add others. Here is an opportunity to work closely with yours truly on a project or two. Please, only reply if you have the skills to pay the bills.
Web Application Developer / Solution Architect
We are a startup technology consulting company that believes IT matters more than just TCO and ROI calculations (And we prefer two-letter acronyms to three-letter acronyms). We have an immediate need for web application developers and architects who want to work with an experienced team of motivated, intelligent, and fun folks.
Our focus is on delivering business value more than just pure technological solutions, though solid technical skills are critical. What else would we shoot the breeze about during internal conference calls? So we are asking for a lot, since we hope that you’re just as comfortable talking to the client as you are with your fellow developers.
Right now, this is a short term contract position, but if things work out well, you never know. You’ll be working in a most comfortable office environment, your home! Alright then, let’s get to the usual litany of job posting details.
Compensation:
Three to six month contract $65 - $95 / hour depending on experience, skills, and general all around awesomeness.
Requirements
- 2+ years of technology consultant experience with direct client interaction (You know, "clients". The folks that pay the bills.).
- Excellent communication skills: spoken, written, visual, and otherwise.
- Motivated, autonomous, self-starter. You need to be able to work effectively from home.
- You must have in-depth knowledge (2+ years) of several web application
technologies such as:
- (X)HTML and CSS. Ideally, you’re a fan of CSS ZenGarden. If not, fake it.
- XML Web Services (SOAP, WSDL, WS-*)
- Web application security
- XML, including XSD, XSLT, etc.
- Must know Microsoft ASP.NET and C# as if your life depended on it. This job does.
- Object Oriented Design.
Bonus Points:
- DotNetNuke or knowledge of other content management / extranet / portal technologies.
- SQL Server 2000 preferred, though excellent knowledge of other DBMS will be considered.
- SharePoint
- MapPoint Web Services
- BizTalk
- Experience with CRM, ERP, or financial systems
- Experience with full product development life-cycle and development processes.
- Know UML and understand Design Patterns, when to use them, and when not to.
- Experienced with Test-Driven Development and NUnit.
If you are interested, and you have what it takes, and you think we have what it takes, send me your resume to haacked at gmail d0t com (<--- Yeah, that’s a really challenging puzzle to weed out the riff-raff and spammers).