7 Sources to Help You Conduct a Peer Code Review

The end of the year is swiftly approaching, and as the budget cycle is coming to a close, the work piles up quickly.  I have had a staff of three from January through August, and with the piling work, we have had to triple in size.  A staff of nine is very different to manage compared to a staff of three.  There are many things to wrangle during ramp-up: a new corporate culture, new policies, new development environment, new standards, new team members.  One of the tools in the technology manager’s arsenal is the peer review. 

The CodingHorror web site outlines why they think software development departments should perform code reviews in their article called “Code Reviews: Just Do It.”  Jared Richardson also describes the value of peer code reviews on his blog.  The basic reasons for implementing code reviews are obvious: reduced bugs, reduced rework, cross training, quicker ramp-up time, sharing of ideas, developer growth, mentorship opportunities, and team building.

Karl E. Wiegers has written a great article called “Seven Truths About Peer Reviews” available on processimpact.com that outlines a number of different methods to conduct your peer code review.  Some of the peer review methods methods he describes are inspection (both Fagan Method and Gilb/Graham Method), team reviews, walkthroughs, pair programming, peer deskchecks, and passarounds.  It’s a good read, and you should take a look.

Peer reviews do not need to be long, drawn out, complicated processes.  Jason Cohen describes some best practices for peer code review on his web site, SmartBear.com.  He has written a great looking book called “Best Kept Secrets of Peer Code Review” that you can order free on his site.  He recommends only reviewing code for five to ten minutes at a time, to keep everyone sharp, focused, and on point. 

You should definitely walk into your peer code review with a plan in mind.  Here is a Code Review Checklist for Macadamian that will help you organize your approach and keep you focused.

Finally, peer code reviews can be rough on the ego of the developer.  Here are “Ten Commandments of Ego-less Programming” based on Jerry Weinberg’s book , The Psychology of Computer Programming, from 1971.  This article describes how peer code reviews result in shorter project completion times, lower defect counts, and how developers had to set their egos aside to make it happen.

I am sure that code reviews will be good for my team, our projects, and our clients.  The hurdle is making them part of our development routine.  What do you think of code reviews?  Do you use them in your technology department?  What results have you seen?  Leave me feedback and let me know.

htmlSQL – Query your Page Elements like a Pro!

While stumbling across the InterWeb, I came across this really neat page.  The page, by Jonas John, describes htmlSQL, a PHP class to query the web by an SQL like language.  I know, I know, this is PHP, not C#.  But the idea really interested me.  I have spent a lot of time focusing on WatiN, which does a similar thing.  It allows you to take control of objects on the page and fill in forms, click buttons, etc.  Getting an element in WatiN requires you to search the page using the Find methods.  One of the troubles I have had is making sure that your find returns one, and only one, page element.  Being able to query the page with htmlSQL would be a great way to verify that.  A class like this would make it very easy to leverage the page DOM on the fly. 

Do you see any other uses for a class like this?  Are there other products like this?  What are your thoughts about htmlSQL?

The Truth About High Content to Markup Ratio and SEO

A common SEO tip for web developers is to keep your content to markup ratio high.  This is supposed to make the crawling of your site easier, more efficient, and faster.  It is possible, however, that more modern site crawlers like Google ignore code already, since they behave like a text based browser anyway.  However, implementing this as a SEO strategy cannot hurt. In fact, it has benefits for not only SEO reasons, but for general web development practices as well:

  • Keeping the amount of code on the page low helps overall site maintenance and usability, focusing on your content. 
  • Including CSS and JavaScript in external files increase content-to-code ratio as well as making your site easier to maintain. 
  • Having validated HTML code will help the crawlers understand your site , as well as make your code compliant for maximum browser readability and performance.

For more information:

Generating sitemap.xml files in C#

One of the things that I would like to tackle before the end of the year is including sitemap.xml files with all of the new sites that my team develops. We could generate these files manually, but this would be tedious at best. There are a number of tools that will generate these files for you. Some of them are stand-alone desktop applications (Sitemap XML). Some web-based tools are built in PHP (AutoSitemap), Perl (TM Google Sitemap Generator), Python (Google WebMaster Tools), etc., and you can use in your own local environments. There is even a web site that you can submit your URL and it will generate the sitemap.xml file for you (XML Sitemaps).

My requirements for this feature are pretty simple:

  • Something built in C#
  • Something we can include in our projects
  • Something that can be run as part of our build process
  • Something that can be completely hands-free

So far, the only thing that I have found is the GoogleSiteMapProvider on the CodeProject web site. This project:

  • [Is] instantly useable with the majority of ASP.NET applications
  • [Is] a full ‘binary’ solution – no integration of code or compiling – just drop in a binary, modify the web.config and go
  • [Is] extendable so that more complicated ASP.NET applications could redefine the provider without restriction

It seems like this is a great fit for our architecture. The solution was to have a single assembly with three main types:

  1. An HTTP Handler which would return the XML on request (called GoogleSiteMapHandler)
  2. A Provider Type (called GoogleSiteMapProvider)
  3. A Controller class to glue the Handler and Provider together

This is a great place for us to start. The source code is available, it seems to fit my needs, and is simple to use.

Anyone else using something different? Do you have any other ideas? Have you found any other tools that might be useful for this? Leave a comment and let me know.

10 Firefox Extensions That I Can’t Live Without

Firefox is the best browser available.  It is easy to use, pretty fast response time, has tabbed browsing, rarely crashes, and the extensions capability is fantastic.  I thought that my list of favorite extensions would make for a good topic. 

  • Firebug – A great way to debug JavaScript, view the HTML source of the page, examine the page’s CSS, step through the page’s scripts, navigate through the DOM, and view all the HTTP requests the page has made.  Invaluable for any web developer.
  • HTML Validator – “A Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen on the form of an icon in the status bar when browsing.”  Great to easily see if there are any HTML validation errors, and what they are.
  • Page Validator – “Validates a page using the W3C Markup Validation Service. Adds an option to the right-click context menu and to the Tools menu to allow for easy validation of the current page. Opens the results in a new tab.”
  • IE Tab – “Easily see how your web page displayed in IE with just one click and then switch back to Firefox.”
  • User Agent Switcher – “Adds a menu and a toolbar button to switch the user agent of the browser.”  This is great for testing any user agent specific code for your site (for web analytics purposes, for example), i.e. spider filtering, crawler filtering, etc.
  • Download Statusbar – Similar to the built in download statusbar, but is only visible when necessary, and is extremely compact along the bottom of the window. 
  • PlainOldFavorites – “Use Internet Explorer Favorites directly from Firefox. No need to import, export or synchronize – the same Favorites appear everywhere.”
  • del.icio.us Bookmarks – “This extension seamlessly integrates your browser with del.icio.us (http://del.icio.us/), the leading social bookmarking service on the Web.”
  • Smart Digg Button – Uses the Digg API to determine if the current web page has been submitted to Digg.  If it has, it displays the current number of Diggs of the page. Click, and it takes you to the submission. If there are no Diggs, clicking takes you to the submission form.
  • StumbleUpon – “StumbleUpon lets you “channelsurf” the best-reviewed sites on the web. It is a collaborative surfing tool for finding and sharing great sites. This helps you find interesting webpages you wouldn’t think to search for.”

One of the other cool features built into Firefox is the ability to apply skins, which change the look of your browser.  Here is a list of my favorite skins:

  • Classic Compact – “A very compact version of Firefox’s default theme, which minimizes vertical space consumed by menu, tool, tab, find and status bars as much as possible without hurting overall appearance.”
  • Vista-aero – “The most IE7-like theme with Vista Aero style! Clear and cool! Based on myFirefox themes.”  Just in case you miss your Internet Explorer 7.

So what are your favorite Firefox extensions?  What do you think of Firefox in general?  I figure that between Firefox the Browser Wars winner and this list of my favorite Firefox extensions, I should get lots of comments.

3 Indispensable Tools for Candidate Review

Tools are a great way to shorten time to complete tasks and improve quality in a process.  Hiring, Candidate Review, and Performance Review are no different.  Here are three tools that I have founds myself using while reviewing candidates.

SkillSurvey

So I got an automated email last week.  Big surprise, eh?  If you are like me, you get dozens of these a day.  This one was a little bit different.  It was from a company asking me to provide a reference for one of my old consultants.  That piqued my interest.  I opened it up, followed the link to SkillSurvey, and filled out the questions.  The simple instructions walked me through the process, and reassured me that my comments were anonymous and would be aggregated.  There were less than 10 questions, and were simple radio button scales.  I had the ability to put in freeform comments, and send it off. 

360Metrics

 Every other year, I have been encouraged by my management to do a 360 degree review of myself.  I log into 360Metrics and choose up to 3 direct reports, clients, peers, and managers.  Each of them receive emails to complete a set of predefined questions that rate and rank my skills on on a set of core values.  They are periodically reminded over the course of the review cycle.  When the review period closes, I receive an email and can generate an aggregate report of my ratings and comments. 

BrainBench

Every time I open up a requisition to find a new candidate for our team, I get a flood of resumes.  Eighty percent of those resumes have some sort of certification.  Most certifications we see are from Microsoft.  But some certifications come from BrainBench.  They offer certifications for individuals on a wide variety of specializations from Computer Software to Management, from Aptitude to Office Skills, from Communication to Industry Knowledge.  Obviously, the ones we see most often from BrainBench are technical in nature.  BrainBench also provides Pre-Hire Testing and Employee Development services to Employers.

Benefits

  • These tools are simple to use
  • The questions can be asked and are easy to analyze quantitatively
  • The same questions are asked of all candidates, so the questions and the delivery are consistent
  • They have open ended questions that allow you to analyze free-form text
  • Since these tools are web based, they can be leveraged (both from the candidate and from the hiring manager) 24 hours a day, 7 days a week.

Drawbacks

  • The tools may not be measuring what you are looking for
  • It is not difficult to “game” the system to produce phony or inaccurate results
  • The perception of these tools is that they measure which candidate is “better” than another
  • Some of these tools may give an advantage to good test-takers
  • The process may be too objective, and not interactive enough

Conclusion

I think that these tools can be a big help, and a great time saver.  Tools like SkillSurvey leave the evaluation up to the hiring manager, and help facilitate and focus the collection of critical hiring information.  However, the risk of relying on tools like BrainBench is that you take the interpersonal aspect out of the process.  You may miss an enthusiastic, bright candidate who is a bad test-taker, or who has the right attitude, but a different set of experiences. 

I am sure that there are lots of other tools available in this arena.  What tools have you used?  What have your experience been with them?  How do you use them in your process?

Windows Live Search Gets an Upgrade

On the Live Search Blog this week, Microsoft’s Search Team announced that it has released an upgrade to its Live Search engine.  The enhancements to the search engine include:

  • Improved Core Relevance – Improved search results for the searches you do day in and day out
  • Reduced Spam – Constantly improving to stay ahead of the curve to filter out sites that use illegitimate or malicious SEO techniques
  • Dramatically Improved “Snippets” – The site summaries have been improved and expanded in the search results page
  • Much Bigger  Index – The index has grown to 20 billion pages – 4 times larger than before
  • Smart Logic to interpret some keywords – for example NW and Northwest are the same

Take a look and see if you notice the difference.  Leave feedback about your Live Search experiences here.

TouchGraph Google Browser

Pandia reviewed a new tool called TouchGraph Google Browser.  This tool allows you to visualize the connections between sites.  You can read the initial review on the Pandia web site, and you can check out the TouchGraph Google Browser on the TouchGraph site.  The TouchGraph team is a group of interface designers who are exploring better ways to visualize information.  In addition to the TouchGraph Google Browser, they have also developed TouchGraph Amazon Browser and the TouchGraph Facebook Browser using the same visualization technology. 

This has some really interesting implications for Search Engine Optimization, Web Analytics, and Web Site Development.  Optimizing a site to have each of its pages appear in a graph like this could have its site map generated dynamically.  Having a Web Analytics Dashboard where you could click on each of the pages, or series of pages, and view data relationships between them would be very powerful. 

Check it out and let me know what you think. 

The Interview Killer – What Goes in the Head Tag?

As a department that designs, develops, and constructs web sites and web applications, one of the skills necessary is HTML development.  There are lots of other technical skills that are important – database development (i.e. Oracle or SQL Server), SQL and PL/SQL, C# .Net, ASP.Net, JavaScript, CSS, Java, Struts, and so on.  But since this is web development, it is critical to be able to understand and develop HTML that is interpretable by modern browsers.  To that end, it is important to ask technical questions about that technology.  And it is always good to start at the top.  So, one of the questions we typically ask in our interviews is, “in an HTML page, what goes in the Head Tag?”  Now, you would think that technical professionals with over 10 years in the industry would be able to answer this basic question with ease.  We have struggled to get an acceptable answer with this question.  Here are some of the ones we have heard:

  • “You put tables in the head tag.”
  • “Bold tags.  Bold tags go in the head tag.”
  • “Dynamic content goes in the head tag.”
  • And the only answer that we have gotten that was accurate… “the Title goes in the Head Tag.”
  • None of the items (which I will not list here) that go in the Head tag were ever mentioned.

Typically, the delivery of this question is the Interview Killer.  People realize that this is an easy question, and that they should have answered this without problems, and get nervous, and the interview takes a dive from there. 

Do you have a question that is an Interview Killer?  Leave a comment and let me know.

Week(s) in Review – Test, Test, Test!

It has been a bit of time since I have posted, and over that same period of time, I have been lax in reading the blogs I am subscribed to. The last 2 weeks the team has spent lots of time implementing Watin UI tests on one of our new sites. We have started to flush out a shared reusable library and leveraging that to develop site-specific unit tests. Roy Osherove has written three articles over these past two weeks that are very interesting, and directly relevant to the realm of Automated Unit Tests. One article is about A New Unit Test Platform called XUnit, which has many improvements over nUnit. The second article is about Code Reuse in Unit Tests. And, the third article is about Throw Away Test vs Tests That Last.

Scott Guthrie and Scott Hanselman have also written two great articles in the Continuous Integration arena. ScottGu’s article was regarding Automating Environment Specific Web Config Settings. Scott Hanselman wrote an article about Managing Multiple Configuration File Environments With Pre-Build Events.

Take a look at these articles They are great reads.