Jan 29, 2007

Create a Web 2.0 Site

The current dot com boom is focused around Web 2.0 sites. The definition of what a Web 2.0 site is changes depending on who you're talking to, what phase the moon is in and how much interest Google and Yahoo! are paying to it.

The good news is that even if you don't know what one is, you can still create one, sell your hair-brained idea to a venture capitalist who just looks at the visuals and have a big bag of cash come your way! How? By simply following the instructions of course!

And if you just want a visual refresh to your web site so you can look like the rest of the cool kids then these might actually be useful instructions. Enjoy!

Firebug 1.0 is out

Yay! Firebug (the cool web development extension for Firefox) is now out of beta.

If you haven't seen or used this thing, then it's time to crawl out from under your rock and check it out. It's an invaluable tool for anyone doing any sort of web development.

Get more info about it on the Firebug blog entry.

P.S. Yahoo has a video of Joe Hewitt (Firebug's author) showing how it all works, including some of the advanced features.

Jan 24, 2007

Postbacks not working in ASP.NET

This was a weird one....

I recently setup a web application on a testing machine (which had a bunch of other web applications on it).  The front login page appeared OK, but when I tried login I just got blank pages back.  If I tried bringing up pages manually (ie by entering the URL directly) they appeared but as soon as I tried anything that did a postback I got the blank pages again.  All the postbacks had stopped - however it was in IE only.  Using the application from Firefox worked fine.

Obviously something unusual was afoot.

About the only thing I could see that was unusual was that the default web site is stopped (and can't be started) because there is a named web application running under the default URL.  And anyway, this is perfectly legitimate and shouldn't cause this sort of problem.

So, what's a guy to do?  Time for Google.

It turns out that I ran across an entry about problems with validators and IE that was interesting.  One of the most interesting things was one of the comments that said:

Well, the only advice I can give without seeing your setup is to make sure you also have the "aspnet_client" directory either in web root or in the web app folder.

So I coped the aspnet_client directory from the default web site to the broken web application and viola! It worked!  Postbacks were OK, the application worked fine and all was well with the world again.


Like I said - weird!

The Pong Clock

We all know about Pong - the game that started it all...

Well you can now relive those heady days of yesteryear with the Pong Clock! A clock that tells you the time by playing pong forever. As the minutes tick by the right player wins, and as the hours tick over the left player wins. Ingenious!!

Best of all, you can get a free screen saver version of it as well. Awesome!! :-)

ASP.NET AJAX is complete

... well, up to version 1.0 anyway. Scott Guthrie has all the details on his blog.

ASP.NET AJAX version 1.0 (the project formerly known as Atlas) is basically a framework for building AJAX functionality into .NET app's and it won't give you much out of the box. That's where the ASP.NET AJAX Control Toolkit comes in. 30 AJAX enabled controls for your UI pleasure - check the control demos on the web page. Best of all the control toolkit is is a community based development effort and is therefore released under an open-source style licensing model so you can see how the controls work, hack away at them and release your own varieties if you're that way inclined.

Being an official 1.0 release also means that it gets the full MS support life cycle behind it and that it works properly with .NET 2.0 & VS2005. It'll be interesting to see how many other controls start popping up now that Atlas has finally made it to a final release.

Jan 23, 2007

Snap Links

You may have noticed that external links on this blog now have a "preview" window attached to them (thanks to Snap!) so you can get an idea of what the page is like that a link will take you to.

Hopefully you like it and find it useful. If you don't you can always turn the feature off by clicking the options link in the popup window and disabling it for this site (or all sites).

Jan 19, 2007

SourceMonitor and CruiseControl - The Top 15

As a follow up to yesterdays post on SourceMonitor and CruiseControl.NET integration, Eden Ridgway has done some really nice work and posted a few styles sheets to help you create a SourceMonitor Top 15 Summary of worst methods so you can target your refactoring efforts.

Thing good thing is you don't have to use MSBuild as Eden indicates and the steps to get it working are really easy.

  • Then in your NAnt build script simply add a <style /> task after the <exec /> task for SourceMonitor as shown.
<!-- Execute the commands -->
<exec program="${sourcemonitor.executable}" commandline="/C ${sourcemonitor.input}" failonerror="false" />
<style style="SourceMonitorSummaryGeneration.xsl" in="sm_details.xml" out="sm_top15.xml" />
<delete file="${codemetrics.output.dir}\sm_project.smp" failonerror="false" />
The <delete /> task is to clean up the sourcemonitor project file. The file grows over time so leaving it around on a busy build server is probably not a good idea and will just fill up space.

  • Make sure you include the _sm_top15.xml file in your ccnet.config <merge /> task then build the project and you should see some numbers.
What if you don't want a top 15? Maybe you want a top 30? Just edit the SourceMonitorSummaryGeneration.xsl file, find the two lines that look like this
<xsl:when test="position() &lt; 16" />
and change the value 16 to 31.

Also, if you have nesting that goes to 9+ levels, then the summary won't show it. To get this showing you need to change the data-type to "text" in the Nesting Metrics section as shown here:
<xsl:sort select="metrics/metric[@id='M12']" order="descending" data-type="text" />
Finally, you might want to change the labels in the dashboard.config and xsl\sourcemonitor.xsl files to reflect that you are showing a Top 30

Update: Eden has since fixed the stylesheet errors and made it easier to customise the number of items to show. Thanks mate!

Jan 18, 2007

Integrating CruiseControl.NET & SourceMonitor

CruiseControl.NET (ccnet) includes style sheets and integration instructions for Vil - a static analysis tool that provides a whole bunch of metrics for your code such as cycolmatic complexity, lines of code, number of methods, etc all of which are useful in monitoring the health of your application.

Unfortunately Vil hasn't been updated for quite some time and it doesn't work with .NET 2.0.  Kind of a bummer.

This is where SourceMonitor steps in.  SourceMonitor is a free code analysis tool that has some really nice features in the GUI and also features a command line interface with XML output making it a perfect candidate for integration with CruiseControl.NET.  Thankfully Robin Curry has done the hard work already and shown how to integrate these tools together as well as providing a bunch of screen shots of what the results look like in the dashboard.

I followed the bouncing ball today and had it working in about half an hour.  Statistics produced include call depth, cycolmatic complexity, number of lines vs number of statements, etc.  All really useful information (assuming you know what to do with it and you can interpret it correctly!)

SourceMonitor is quick and doesn't add much overhead to the build process however viewing the detailed results on the ccnet dashboard may take time if you have lots of files to analyse (like I do).  That said, this is something that is well worth adding to your cruise control configuration and I strongly recommend you have a look at it.

P.S. If you want VB.NET analysis you'll need to get your hands on the beta instead of the current release.

Alt+Tab Replacement - TaskSwitchXP

In my "spare time" I like to tweak windows and recently I've started using alternatives to the standard Alt+Tab behaviour provided by Windows XP.

A quick search on Google for alt-tab replacements returns more results than there are candles on your grandmothers birthday cake.

The one I've settled on is TaskSwitchXP.  Why?  Because it not only provides a better alt+tab experience, but you get a few things that most others don't provide such as process information (see the image), it works with non-standard themes (like the Zune theme), supports multiple monitors and it's quick.

There are of course other tools you can use, in case you don't like this one.  For instance you have

If you've got a personal preference, leave me a comment ;-)

Jan 17, 2007

Adding the Subversion Revision to the CruiseControl Build Summary

At work we use Subversion for source code version control and the excellent CruiseControl.NET (ccnet) for continuous integration.

One of the things we do is version all of the assemblyinfo files with the subversion revision number. This way all the files we release have a build number that can be traced directly back to the subversion revision number so we can see what changes were made if there are any problems.

Unfortunately when looking through the ccnet webdashboard you don't get shown the SVN revision in the summary. This is because ccnet is designed to work with a multitude of source repositories and not just Subversion. Fortunately adding the revision to the summary page is a really simple task. Here's what it looks like:


In order to get this showing you need to edit the .xsl file used to display the summary page.

1. Open {$CC Installation Root}\webdashboard\xsl\header.xsl
2. Go to the bottom of the file and locate the "Last Log Entry" section. It should look like this.

<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"/></pre></td>

3. Copy & Paste this section directly underneath it and edit is as shown here

<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"></pre></td>
<td class="header-label" valign="top"><nobr>SVN Revision:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="changeNumber"/></pre></td>

4. Save the changes to header.xsl
5. Open your browser and navigate to a build summary. The SVN Revision should now be shown.
6. You're done. Go get yourself a coffee.

Jan 10, 2007

Apple Announces the iPhone

The web is all of a sudden flooded with iPhone stories. Here's one that includes a picture of the device and some thoughts on what this might mean in the future.

The release is in the middle of the year in the U.S. Hopefully it'll be the same time in Australia. Guess it's time to start saving again...

Yahoo buys MyBlogLog

OK, so it's probably not the size of the YouTube purchase, but Yahoo has shelled out for MyBlogLog. I posted previously about MyBlogLog as a stats and link tracking system, however one aspect I didn't really dwell on is the social side of it - something which most stats systems don't have.

It appears that this social aspect is the main reason Yahoo purchased them - they want to get a bigger slice of the social pie and this is a different angle on it. I expect that MyBlogLog will change a bit to incorporate other Yahoo social networking tools and that we'll see Yahoo ad's appearing somewhere soon as well. It'll be interesting to see how it pans out.

Congratulations to the MyBlogLog team.

Update: There's an official blog entry about the purchase and what is going to happen. Looks like a lot of improvements will be coming soon.

Jan 4, 2007


I've just finished reading iWoz - the Steve Wozniak biography. It's a pretty quick and easy read (took me 2 days) detailing how Steve designed the Apple I & Apple II, pulled pranks, organised music festivals and got into teaching.

The book was fairly interesting for me and I did get a bit out of it, but since I've read Accidental Empires previously and seen Triumph Of The Nerds I knew most of the background and apart from adding a bit more detail to what Steve did in the early days and post-apple there wasn't a lot of new history for me. There was however a lot of stuff I learnt about this personality and how he thinks and what makes him tick.

I've read a lot of resumes by I.T. candidates and one thing that comes through time and again is that they talk a lot about their skills and the projects that they've been a part of and have a passion for it, but they never seem to really grasp the details of what else is going on around them, how you can influence a business with your ideas and how the interpersonal dealings are a large and crucial part of what has to happen.

Woz shows a similar type of behaviour in hos bio. He talks about the design of the hardware and the software to run it (and does an awesome job at it too) but it's apparent that in life he's missed a lot of what is happening in terms of business and relationships. For example, his departure from Apple shows this. He was working as an engineer doing what he loves best but wanted to start another company so he tells his manager (2 levels up) that he's leaving but doesn't even think to tell Steve Jobs that he's going. So when a reporter rings the next day and asks why, even then he doesn't think to tell the Apple execs that he's left or that he's just been interviewed. The reporter misquotes (probably deliberately) and there's a big hoo-ha about Woz leaving because he doesn't like Apple. Woz blames the reporter, but doesn't see that the communication about his departure could have been made a lot smoother and not damaged his relationship with Jobs if he'd done a better job on the interpersonal side of things.

In fact, he shows a definite naivety in almost all of his personal dealings and talks about a few of them in the book. It's obvious that money is not a motivator for him - but you shouldn't let yourself get taken advantage of and throughout the book this is one of the things you see repeated.

Is he a great engineer? Undoubtedly! One of the best the we've seen. Is he a well rounded person who is successful outside of engineering? I don't think so. Is it a book worth reading? Absolutely!

Jan 3, 2007

Wallpaper for Zune XP Theme

For some reason my blog post about the Zune XP Theme has turned up on the front page of the Google search results. Anyway, I don't really like the wallpaper that comes with the theme, so I persoannly use the image below.

This is a photo of Lake Louise taken by my wife a few months back and the colours of the water and the way the light works in the image really complements the Zune Theme nicely. Feel free to use it if you like it (it even works well stretched to fit widescreen laptops).

(Click image for the full size image - 3072 x 2304)

Jan 2, 2007

Welcome to 2007

New Years celebrations this year were a little different. Being on the Gold Coast instead of in Sydney for New Years means that the usual extravagant fireworks display Sydney usually puts on was traded in for a local fireworks show at Paradise Point.

It was a lovely night, sitting by the water with the family, and when the show finally got started at 9pm it went for about 15 mintues and was a lot better than expected.

Here's a few photos - I didn't have a tripod handy so some of the photo's are a little wobbly but worked out reasonably well in any case.

IMG_3889 IMG_3893 IMG_3913