My Apprenticeship - Wednesday, August 11, 2004

11 Aug 2004

In the summer of 2009 I revisited my 2004 summer apprenticeship at Object Mentor. What follows is the original 2004 post and then some 2009 commentary.

I successfully broke the connection between the ChessBoard and the Pawn and the King. Pawn has its own PawnChessBoardIntereface and the king has KingChessBoardInterface. Each of these interfaces are pretty thin, so I’m back in a more comfortable place, design wise. I’ve also figured out a way to keep the rest of the pieces from needing to know about the ChessBoard. Instead of creating a FindAllLegalMoves method for each piece object, I’m going to look at the type of check the king is in. The king can be attacked straight on, diagonally, or it’s a knight attack. If it’s a Knight attack, this particular attack can’t be blocked so I don’t have to worry about trying. With diagonal or straight attacks I can find the squares between the king and the attack and then check to see if any of the king’s men can move to one of those squares with my, already created, isItALegalMove method. But I still have to create a method to find those squares between the threat and threatened.

David left his laptop power adaptor at home, so he mentioned a trip to CDW to get a spare. Paul, Micah, and I immediately perked up and jumped on that bandwagon. Micah’s wife called a little on and I overhead this little snippet of conversation: “Well I’ve already got lunch plans at, uhh, CDW.” We are nerds.

David is working on dot Net (he’s to be Object Mentor’s dot Net expert) Asp now. Asp is a scripting language, like PHP, but it’s Microsoft’s baby. Visual Studio has this Asp GUI (Graphical User Interface) creation tool which is WYSIWYG (What You See Is What You Get). But, as with most WYSIWYG stuff, you only sorta get what you saw in the tool. The idea sounds pretty cool: by dragging and dropping you can create a web-based GUI in a few minutes. And what it mostly does for you is give you a good start – there’s a bunch of manual code editing after the tool finishes. So David is messing around with it and he keeps checking the changes he’s made in Internet Explorer. Then he decides to check the results in Mozilla (an alternate browser): Guess what he sees?

Nothing. Absolutely nothing. And the stuff he’s asking Mozzila to do is totally stuff Mozilla can do (little boxes where you can type in data: A web form), but Microsoft has rigged it so that its product won’t work with competing browsers. Micah tried to open up the page with Safari, but still no go. He thinks there’s a way to get it to work on other browsers, but the point is, that by default and design, Asp has way decreased compatibility on non Microsoft products. Not cool, man.

As I was new to computing this willful disregard for other browsers was shocking to me. Now I just sort of accept it. Many of my readers probably develop web sites and know this, but I would estimate that supporting IE6 and IE7’s non standard behavior eats up 10-20% of any development team’s capacity on average. There may be weeks where you are only burning 5% on IE but then some huge hairy IE6 bug will come rolling in and you’ll lose a week of a developer’s time. Microsoft will tell you that if their browsers strictly interpreted html, most of the internet would be broken. They’re probably right: There are a lot of old webpages out there that have some busted html that only works in IE. But supporting them means making crazy problems for people who want to follow the spec.