Archive for January, 2008

The January 2008 Caffeinated Codey Winners Are…

Due to the writer’s strike, the normal panel of Caffeinated Codey judges are out picketing on some Hollywood street corner. Luckily, I found a worthy Canadian scab who was willing to cross the picket lines. It is none other than the cultural icon, himself, Justice Gray.

  1. For Greatest post in Caffeinated Coder history award…Russell Ball for “Rory Blyth routs Canucks“. Russell Ball made internet history when he wrote his most famous sentence: “Justice still dominated in the Best Post Title category”. Two key words I’d like to focus on here were:
    “Justice”
    “dominated”
    (note: order of the words here is also key) I don’t think I need to explain further.
  2. For Worst post in Caffeinated Coder history award…Russell Ball for “Rory Blyth routs Canucks“. The best example of ballot stuffing since Nigeria. The combination of this Rory guy, his automated vote-spamming bot, and the pre-teen girl brigade of the Pacific Northwest pretty much rendered all fair polling moot. The Society of Hot Women from 18-38 organized a massive nude march in support of me, which wouldn’t have been so bad if it wasn’t in the hallway outside of the apartment I share with my wife. To say she wasn’t pleased with this outcome was an understatement. Thankfully some signed photographs of yours truly sent everyone home happy, at least as happy as nubile women can be when they’re being gently rejected by the most handsome (and married) man on the planet.
    Some people have asked me if I thought I could’ve won if, prior to voting, I had perhaps posed for a picture like this:

    in which it looks like someone is about to sit on Santa’s lap to tell him what a bad boy he’s been, only “Santa” is wearing leather, a riding crop, and assless chaps. To the contrary, I think we can all agree that everybody loses when photos like this surface. Enjoy your tainted chalice, Mr. Blith!

  3. “Meet me at the asylum” award… D’Arcy Lussier for “What Justice Gray means to me, by D’Arcy Lussier“. I almost wrote a “What Justice Gray means to me” post myself, given the tributes were so inspiring. That is, I almost did until D’Arcy left everyone with the odd taste of awkwardness in their mouth with his rambling soliloquy. The best part of this post was actually not D’Arcy’s post itself but the reactions that followed, including statements like:

    “I officially renounce my Manitoban status”
    “On behalf of all Winnipeggers, I officially apologize for D’Arcy Lussier’s Epic Story”
    “I think D’Arcy had been smoking Peyote for six straight days when he wrote that post. This is his personal Mount Vesuvius.” which gets special mention for dropping a Zoolander reference

    Was this a tribute post, a cry for help, or somewhere in between? Even after I had the frightening experience of the Britney Spears of software development explaining his “logic” in private, I still can’t be certain.

  4. Most atrocities committed with PAINT.NET award… also D’Arcy Lussier for “What Justice Gray means to me, by D’Arcy Lussier“. See above. Although special mention has to go to D’Arcy nearly wrecking Bil Simser’s marriage by posting shots of Bil’s genitalia in said post.
  5. Joanie loves Chachi award… Beth Massi and Donald Belcham. With their VB vs. C# bantering and their constantly making puppy eyes at each other, I think it’s safe to say that Beth and Donald are well on the fast track to having their own sitcom. Did you ever think you’d see the words “Donald rocks” written anywhere, much less by a *woman*? It appears that British Columbia’s Victoria Code Camp was full of surprises…and budding romance. What is next, duets at the karaoke bar? We’ll follow this one up later.
  6. “Plagiarize *this*, mother*@&#&#@” award… Ayende Rahien for “Is Plagiarism the best compliment“. Ayende finds out that someone has written a book that essentially cut and pastes both his and Scott Hanselman’s blog posts without giving any credit. Ayende then posts about it at which point angry legions of developers are mobilized and within seconds the book is *no longer available* on Amazon. The poor sap who tried ripping this man off is likely sitting somewhere in a Turkish prison trying to scrub tattoos of a rhino off of his left buttock, a fitting punishment for those who participate in idea theft.
  7. “Greatest recommendation ever” award… Mo Khan for “Justice Gray for MVP“. Short, simple, to the point and full of RIGHT. Blog posts are almost always laced with some form of opinionation, but Mo’s post carefully and lays out fact after absolute, irrefutable fact in making his point. As a completely unbiased observer I had no choice but to agree with his inevitable conclusions. If only all blog authors could write this convincingly!!

There you have it… I think we can all agree that I certainly got my money’s worth there. I am also confident that I made my point to the striking bastards that I can outsource their jobs to the new third world of the blogoshere (a.k.a Canada) faster than a bra being removed and hurled at the host of a Justice Gray rally.

I’d like to officially award Justice one of the JetBrains licenses with his guest contribution. He certainly has earned it, especially since I originally only envisioned people contributing individual awards towards this post.

As for the promised polldaddy voting action and the other R# license award, I’ve got a slight twist up my sleeve that I’ll explain in my next post on Monday. Until then, good luck recovering from the Paint.NET inspired nightmares that you will surely suffer from after reading D’Arcy’s post.

Thinking of Breaking Away from the Blogging Herd?

Blogging communities like GeeksWithBlogs offer the advantage of a pre-established readership, free hosting, and no hassles when it comes to setting up and maintaining your blog.

Unfortunately, you also give up a lot of control when you become part of a large blogging community and ultimately miss out on the basic joys of tinkering. For the more capitalist minded among you, you also forgo the possibility of ever monetizing your blog.

If you are currently considering migrating your blog to your own domain or getting ready to start your own blog and aren’t sure which direction to go, here are a few things I would recommend based on my recent experience.

  1. Consider Using WordPress - SubText is a fine blogging engine, but I have been won over by the enormous number of plugins and themes available for WordPress. That translates into a lot more functionality as well as a more professional look and feel of your blog. I initially assumed that it would require a lot more technical investment on my part because it runs on PHP and mySQL, but so far I have been able to make a large number of customizations without ever having to refer to a tutorial due to the similarity of PHP and classic ASP as well as the intuitive design and naming conventions used by WordPress.
  2. Choose a Readable Theme - With over 1500 free themes to choose from, it’s easy to get distracted by designs that are flashy but make it difficult to accomplish the primary purpose of a blog, which is to facilitate reading content. Make sure the text is the main focus of your page and that it is in a clear font. Simpler is usually better.
  3. Expect Issues with Importing Old Blog Posts - Even though SubText provides a nice xml export feature (BlogML), the import process into WordPress was still a little bumpy. I found a plugin to help with the process, but there were still some issues with formatting and category names after the import process.
  4. Don’t Underestimate the Damage Done by WYSIWYG Editors (i.e. FckEditor) - WordPress lets you change themes effortlessly, but if you have pre-existing posts that were created with a WYSIWYG editor, then the chances are good that the HTML in your old posts is so polluted with inline tags that the CSS stylesheets in your fancy new theme won’t work properly. I’m still in the process of manually cleaning up the HTML from my old posts and it is a mind-numbingly tedious process that I’ll probably give up on before I finish.
  5. Get Sophisticated with Subscriber Statistics - SubText offers some rudimentary statistics on readers, but I took the opportunity to switch to Feedburner and install plugins for google analytics and WordPress.com Stats. I have been impressed with the level of reporting detail they offer when it comes to analyzing site traffic.
  6. Widgetize your Blog - What’s the fun of tinkering if you can’t go crazy with the plugins? Some of my favorites so far are Popularity Contest, ShareThis, KG Archives, Twitter Tools, Yet Another Related Posts Plugin, and Subscribe To Comments.
  7. Expect a drop in Subscribers - This is one of the advantages that a blogging community offers, so you can definitely expect to lose a few readers during the transition. In the case of GeeksWithBlogs, it didn’t help that I was removed from the main feed as soon as I put my notice up and had no ability to set up 301 redirects.
  8. Learn about SEO (Search Engine Optimizations) - If you want to make up for your drop in readership, then you’ll probably want to roll up your sleeves and learn a little about the black art of search engine optimization while setting up your blog. If you use WordPress, start by using these plugins: All in One SEO Pack, Jerome’s Keywords, Head META Description, Enforce www. Preference, Google Sitemap Generator, and Google Analytics plugin. If you want to get really serious about it, I hear Max from codesqueeze is planning on offering a 2 day advanced course on SEO later this year in exotic Fargo, ND.
  9. Test in multiple browsers/readers - I had to abandon my first theme completely after I realized it looked absolutely horrible in Internet Explorer. Unfortunately, I had already wasted a lot of time trying to customize it. I also forgot to retest my comment section functionality after installing the second theme and thus didn’t find out that it was broken until several days after going live.
  10. Find a Good FTP Client - the web interfaces supplied by hosting companies will work in a pinch, but you’ll really want a good FTP program. I am totally hooked on SmartFTP, which I discovered after consulting Scott Hanselman’s tool list.

Setting up your own blog is definitely not for everybody. If all you want to do is focus on writing good content and not worry about anything else, then I would recommend sticking with the blogging community site.

However, if you want to learn about all the gooey goodness that goes into making a blogging engine purr, then I would highly recommend the experience of setting up a blog on your own domain. So far I’m glad I did it.

Two Days Left to Snag a Free R# 4.0 License

Just a reminder, I’ll be accepting guest Caffeinated Codey submissions until midnight on Wednesday. Just email it to me at rt_ball@yahoo.com. If I pick it for Friday’s Caffeinated Codey post, then you’ll win a free ReSharper 4.0 license. See here for full details.

I’m feeling generous, so I’ll even offer up a few inspirational freebies for those of you who can’t immediately think of any award-worthy material to recognize.

Here’s a screenshot from the header of Obie Fernandez’s new blog. It’s got that I’m-too-sexy-for-this-blog look about it that reeks of a professional photographer following him around for an hour shouting “Now… give me your best Antonio Banderas look…Jes…Perfecto!…”. It’s not technically a post, but surely this is deserving of some brutally creative award (sorry Obie, it’s just too easy…).

If you prefer focusing on something that was intentionally funny, you can always look to D’Arcy Lussier’s epic “What Justice Gray Means to me” guest post for inspiration. Any post that includes such paint.net atrocities as this one certainly deserves an award of some sort.

Of course, you can also pick a post from January with actual technical merit and slap on an award name and description as an afterthought. That’s usually my preferred method and probably the most deserving of your attention given this month’s prize.

Whichever way you choose, happy judging!

10 Lessons in Scalability from MySpace

I just read an interesting article called Inside MySpace.com. With 40 billion page hits a month (which they reached just three short years after launching), MySpace is currently living on the scalability frontier and thus offers unique insights into what kind of architecture and hardware it takes to service such massive demands.

scalability graph

Here are ten tips that I gleaned from the article.

  1. Master/Slave architecture is Good (used when less than 1 million users) - When mySpace outgrew a single database server, it first moved to a master-slave configuration where the master server received all the updates and then propogated the data to the other read-only slave databases. Unlike many applications that rely heavily upon reporting or infrequently updated data, MySpace was not able to utilize any OLAP style optimizations because it has to deal with a high degree of updates.
  2. Vertical Partioning is Better (used between 1-3 million users) When the site grew to the point where disk IO became a bottleneck and it was taking too long to transfer data between servers, mySpace moved to vertical partitioning model and divided the workload by logically grouping data onto different databases and servers according to function. Thus every time a new feature was added, it got its own database and server.
  3. Horizontal Partitioning is Best (used currently [3-27 million users]) Vertical partitioning eventually ran into roadblocks when it came to shared data and particularly demanding features, so mySpace developers ultimately re-engineered the app so that data was logically grouped according to users. Thus a user logged on to a centralized server that stored only authentication information and the location where that users’s data is stored.
  4. Optimize for Acceptable Data Loss When Possible - By acknowledging that they were able to tolerate a certain amount of data loss, MySpace was able to increase scalability by extending the time between database checkpoints and thus saving on significant IO in exchange for what they consider to be an acceptable risk of losing between 2 minutes and 2 hours of data.
  5. Microsoft is a Viable Vendor Option - When I first started working in the industry during the dotcom bubble, scalability was a big issue because everyone expected to eventually have to deal with MySpace-like growth problems. I remember encountering several Java developers who dismissed Microsoft based solutions with the phrase “It will never scale”. Despite pushing the limits on the number of simultaneous connections supported by SQL Server, MySpace has definitely proven that Microsoft is a major player in this arena. In fact, when MySpace migrated all their apps from ColdFusion to ASP.NET a few years ago, they noted being able to handle the same load with 40% fewer servers.
  6. Virtualized Storage trumps a SAN - Before mySpace upgraded from a SAN to virtual storage, they required 2 full time people to manually redistribute data across the SAN on a continuous basis.
  7. DoS (Denial of Service) safeguards are NOT so helpful - After having several of their windows 2003 servers randomly shut down, the mySpace IT Pros realized that they had to disable the Denial of Service safeguards built into Windows 2003 because they were being inadvertently triggered by the immense amount of traffic.
  8. Consider a Separate Caching Tier - To save on database hits, mySpace added a layer of servers between the databases and web servers that are devoted exclusively to caching data objects.
  9. Who Needs Load Testing? Since it is impossible to do realistic load testing on this scale, mySpace has dramatically streamlined their deployment cycle so they can rapidly get feedback and make corrections on their live site.
  10. Design Matters - In a related article, there is an interesting quote from Jakob Nielsen about how focusing on the usability aspects of the site and redesigning the flow to reduce the number of clicks required would have an even more dramatic effect on scalability than most of the technological solutions.

NOTE: I just noticed that the original article on Baseline magazine seems to be inaccessible now. I spent 10 minutes fruitlessly searching on what is one of the most frustrating, advertising laden sites I have ever seen ,but all I found was the title for the article sans content buried in mounds of gaudy advertisements. I guess it’s a good thing that I took notes while I was reading it.

Comment Section Working Now

I just got an email from a reader letting me know that the comment page was throwing an error. After delivering a brutal caning to everyone on the QA staff, I fixed it. Sorry about that…

Many thanks to Christopher Boyle for bringing this to my attention.

Seven Things I Want to Do Differently in 2008

This is the sequel to my Seven Things I Did Right in 2007 post. Now I am going to cover the “Stop Doing” and “Start Doing” categories of my agile retrospective format.

What I want to start doing in 2008

  1. Become a Committer on an Open Source Project- I took a few steps towards open source involvement with the Cruise Control project this last year, but still haven’t even submitted a fix to an open source project yet. Partly I want to become a committer because I feel guilty for all the free stuff I’ve enjoyed from the open source world over the years without ever contributing anything back, but I also think that this will be a good career growth opportunity in that it would expose me to new codebases, development styles, and project types that I don’t usually get to work on.
  2. Establish Book Reading Habit- I can’t help but feel embarrassed every time I walk past my bookshelf these days and see the dozen technical classics that I’ve only partially read. I decided that the only way I’m going to finally finish them all is if I carve out a regular reading schedule. I’m going to start by spending 2-3 lunch hours a week reading in a nearby cafe.
  3. Seek out new kinds of speaking and writing opportunities - This year I’d like to challenge myself to speak at bigger venues like code camps or conferences. As far as writing goes, I would like to submit at least one article to a major publication like MSDN magazine as well as seek out some paid guest blogging opportunities.
  4. Learn Ruby - Partly I have this as a goal because I am sick of reading all the hype without any first hand experience on which to form my own opinions. Mostly, however, I finally have a real reason to use it because my wife wants me to build a site for her new jewelry business and my hosting company already has the required Ruby infrastructure in place.
  5. Start using ORM frameworks and IoC containers - I feel as though I missing out on a couple of extremely key technologies by not using frameworks to assist with data access and dependency injection. That is why NHibernate and the Windsor Container are at the top on my list of things to learn and start incorporating into current projects in 2008.

What I started in 2007 that I want to STOP doing:

  1. Staying up too late - I used to get to bed at a decent hour, but during the last six months I have been regularly staying up until 1 or 2 in the morning reading blogs, writing posts, and playing around with new tools and technologies. Although that is a very productive time of the day for me, I’ve also noticed my alertness the next day tends to suffer. A sleep deprived developer is a stupid developer, so I’m going to try to discipline myself to stop working a little bit earlier each night this year.
  2. Reading only about technology - For the first time ever, almost all the reading I’ve done this last year has been technical. Besides making me extremely boring to talk to, I fear that I am also on a course to burn myself out. My first task is to find some good fiction books to read this year. I’m open to suggestions…

Since continuing old habits is much easier than starting new ones, time will tell whether or not I will be successful in any of these endeavors. Regardless of the outcome, I do think there is value in at least taking the time to formulate and verbalize a plan.

.NET Framework Debugging 1, Reflector 0

Reflector has and will continue to be one of the coolest, most useful development tools around. However, when it comes to demystifying .NET framework classes, there is a new game in town.

Here’s a glimpse into what a method in the System.URI .NET framework class looks like using Reflector.

Not bad…but here is what it looks from inside the Visual Studio debugger after configuring it to use the newly available Microsoft symbol server.

Besides actually allowing you to see the control flow in action, manipulate input values, and replay edge case scenarios, this new approach lets you see all of the original developer comments. The ones I’ve looked at so far have tended to add real value to the code reading experience rather than just pointing out the obvious.

Also, since it is derived from the actual source code files rather than a reverse-engineered approximation, the code can serve as a valuable learning tool by showing real-world examples of best practices rather than the 2-3 line fluff usually found in documentation.

Well, ok…the code fragments above are screaming for some “Extract Method” refactorings, but in general I’m guessing the Framework has some instructive examples of how to program given the vast amount of effort and review that goes into the framework classes.

If you haven’t given it a try yet, the setup process to get this working is fairly easy. It simply involves installing a Visual Studio 2008 QFE and changing a couple of debugging configuration options (see Shawn Burke’s post). Within minutes, I was able to F11 into WebClient.DownloadString(). For some reason this just magically worked the first time, but the next day I had to right click on System.dll in the modules window and select “Load Symbols” in order to get it to work.

Below you can see in the Modules window how it shows that the symbols are loaded for System.dll and you can see in the call stack window that I am inside a framework method. If you look in the directory on your local machine that you configure as the symbols location, you’ll also be able to see the downloaded PDB file after you do this step.

Reflector will still hold an esteemed place in my developer toolbox when I need to peek inside all non-framework dll’s or verify the contents of a deployed dll, but I doubt I will use it anymore to spelunk framework dll’s (at least the ones whose symbols have been released).

Update: Although the setup was seamless on my Vista box at home, I haven’t been able to get the QFE to install on my Windows XP laptop yet. I don’t know if this is a common problem or if my machine has some unusual quirk due to the hundreds of utilities I install on it.

A Glimpse into the Mind of a Budding Young Developer

A friend of mine whose wife is an elementary school teacher just sent this to me.

You just can’t teach that kind of literal thinking in Computer Science programs. Yet another piece of evidence to support the claim that programmers are born, not made.

Want a Free R# 4.0 License?

So there I was, wondering how I was going to reward the winners of the January 2008 Caffeinated Codeys. I was just about to give up hope and begin sobbing like a little girl when I suddenly remembered the obscure “contest sponsorship refactoring” (Alt + c + s + desperate email plea) in ReSharper.

Like every other function in R#, this refactoring magically made things better by offering me a couple of free licenses to give away. It even spit out the following FAQ section to answer all of your pressing questions.

FAQ

  1. Why would the good people of JetBrains possibly trust you with something as valuable as the coveted 4.0 licenses? - I told them my name was Jeff Atwood.
  2. What if I already have v3.0? - Continue to curse VS2008 for a few more months until R# 4.0 comes out and then brag to your friends about getting a free upgrade.
  3. What if I don’t currently have a copy of R#? - Download version 3.1 and get a free upgrade when 4.0 comes out (last I heard at the end of 1Q).
  4. What if I already have my R# needs satisfied? - Then you can get a free copy of DotTraceProfiler ($500 value). I haven’t tried this one yet, but it looks incredibly cool and useful and it was made by Jetbrains so I’m excited.
  5. What if I have a technical sugar daddy who buys all my licenses for me, no questions asked? - First give me your email so I can send you my resume. Next, go for the “swag” option. There has been a hint of potential R# swag, which means that you might be able to make your friends jealous with an R# Jedi coffee mug or some other such marketing treasure.
  6. Which body parts/organs do I need to sell in order to win? - Absolutely none. All you have to do is put on your Caffeinated Codey judge hat and pick a post in January that you liked. Then think of a creative award name, write 2-3 sentences of witty commentary about it, and send it to me (rt_ball@yahoo.com) by EOD on January 28th. If I choose to publish it as one of the 10 awards, then you will win.
  7. What if there are so many good submissions that you publish more than one guest submission? - In that case, the submission which gets the most votes in the 5 day polldady vote that follows will win.
  8. What can I do to make my submission more likely to be chosen? - Review prior award posts to get a feel for the general tone of my commentary. Make your commentary humorous (although this is not strictly required). It would also help to send a funny, semi-relevant photo to go with it. Of course you can also start sucking up to me as much as possible.
  9. Is there any other way to win this great prize? - I will be including a poll at the end of the January 2008 Caffeinated Codey post and the author of the post with the most votes after 5 days will also win a free license.

What are you waiting for? Load those RSS readers and let the sarcastic commentary flow…

By the way, much thanks to Illya and Eugenia from Jetbrains for their help and sponsorship.

Seven Things I Did Right in 2007

I know this is rather late in January to be doing this, but I’ve been rather distracted with the blog migration and this was one of several posts that’s been languishing in a half-finished state in my drafts folder for the last several weeks.

Instead of doing the typical new year’s resolution list full of unrealistic goals, I decided that I would follow an agile retrospective format and sort my thoughts into the “Keep Doing”, “Start Doing”, and “Stop Doing” categories. In this post I will just focus on the “Keep Doing” part and then I’ll tackle the other two categories in the next post.

Here are seven things I would like to keep doing in 2008.

  1. RSS Surfing - It wasn’t until the beginning of 2007 that I really became an avid reader of blogs. Now I struggle to keep my hundred plus feeds organized and prioritized, especially since I supplement the flow of information with posts from Reddit, DZone, and del.icio.us. Despite the overwhelming amount of material, I am still hooked on the blog format and see it as the single biggest driver for my professional growth this last year.
  2. Blogging - Besides enjoying the actual process of writing, I have been surprised by the affect this blog has had on my motivation to learn new things and dig deeper into my current understanding of technologies and practices. I don’t know how many times I’ve stopped in the middle of writing a post to research something more in depth or try out something new because writing about it helped me detect a gap in my understanding that I otherwise would not have noticed.
  3. Speaking - I volunteered to speak at two .NET user group meetings for the first time in my career this last year and was pleased with the results. Whereas blogging encourages me to dig a little deeper into small pockets of knowledge, a commitment to speak for 30-60 minutes on a topic forced me to go very deep into a subject and begin to gain some real expertise. There’s nothing like the fear of looking stupid in front of a group of people to make you hone your skills.
  4. Social Networking - Last year was the first time I made a consistent effort to develop and maintain professional relationships outside of my immediate workplace and it has had a profound impact on my professional growth. I’m not talking about the benefits that come from shmoozing my way into opportunities that I’m not qualified for or don’t deserve. I just mean that I’ve noticed that the more time I spend interacting with really smart people, whether through conferences, user groups, blogs, or email, the more new ideas I encounter and the higher expectations I tend to adopt for myself.
  5. Automating My Workflow - It takes effort and discipline to invest in your own productivity, especially since it often slows you down in the short term. Traditionally I have been too focused on my short term goals to put much effort into removing inefficiencies in my own work processes. This last year, however, I worked hard to start identifying and streamlining my own needlessly repetitive tasks with the help of tools like ReSharper, WinKey, and SlickRun. I’ve been extremely happy with the results so far and look forward to learning new productivity tricks this year.
  6. Taking Professional Risks - Last fall I took a big risk by changing jobs. I had invested almost 5 years at my old job in learning the intricacies of the internal systems and the business domain as well as earning the trust of my co-workers . The idea of starting from scratch was scary. Although there were times when my ego didn’t appreciate becoming a novice again, the rate of my professional growth has skyrocketed from being exposed to new methodologies, domain challenges, codebases, and people.
  7. Regularly Experimenting with New Tools - Thanks in part to Scott Hanselman’s tool list, I’ve added more tools and utilities to my developer toolbox this last year than I ever have before and it has dramatically increased my productivity. Some of the new tools that I picked up this last year include ReSharper, SlickRun, PowerShell, MbUnit, FxCop, NDepend, Espresso, JIRA, NCover, WatiN, Firebug, Nant, and Rhino.Mocks.

I have certainly done plenty wrong this past year, but I like to spend time focusing first on the positive aspects of whatever I’m trying to improve. I find it helps me solidify good habits that I may have only accidentally acquired in the first place and will probably lose unless I make a conscious effort to recognize their value.

Next Page »