Paul Hammond's Blog

Agile, Software and Life


Feed your aggregator (RSS 2.0)


individual post icon

Taxi I travel a reasonable amount for work.  I live 25 miles from London's Heathrow airport and 20 miles from London's Gatwick airport and neither is conveniently accessible to me using public transportation.  As a result, I regularly need to use a taxi company to deliver me to and pick me up from the requisite terminal.

I have been using the same company for a couple of years now.  For almost every single journey, they have been good enough that I would have given them a "completely satisfactory" rating.  They were always on time to pick me up from my house, the were always waiting for me a little sign bearing my name when I came through the arrivals door with even when my flight was delayed, and their cars were always clean and comfortable.

Note that I said "almost" in the last paragraph.

There have been 3 occasions lately when they let me down.  All three were for early pick-ups at my house (usually at 4:30am) for day trips to Dublin.

The first time, no car had arrived by 4:40am, so I called the company.  The dispatcher called me right back and told me that the driver had gone to Bayseed Road instead of Hayseed Road (where I actually live).  This seemed reasonable until I used Windows Live Local to discover that there wasn't a Bayseed Road within 200 miles of where I live; a little white lie to save face with the customer.  He arrived at my house at 4:50, and I got to the airport with plenty of time to spare, so I let it go.

The second time, once again I had to call the company at about 4:40am.  Again, the dispatcher called me back.  "Sorry, the driver overslept, he's just getting ready and will be with you in 15 minutes".  At least they were honest this time.  Once again, he arrived at about 5am and I just made my flight (although I didn't get the decent breakfast I wanted).  Being a fairly easy going guy, and given the continued excellent service the rest of the time, I let it go.

Yesterday, I had another 4:30am pick-up.  At 4:35am, when the car didn't show, I called the office.  No answer.  And there was no answer the following 15 times I called between 4:35am and 5:00am.  A no-show, and no explanation.  At this point I had to take my own car, leaving my wife without it for the day; she had plans so this was pretty inconvenient.  I called the office later on, and spoke to the owner of the company - he was very apologetic.  He told me he would call back with the reason for the no-show.  He didn't call me back.

Three strikes, they are out.  I am now looking for other taxi companies to do business with, and the original company have lost business to the tune of £80 for every single trip I make.  Despite a very high satisfaction rate for most of the journeys I made with them, just three failures were enough to make me "fire" them.

So how can you apply this story to your development team?  For me, this was all about trust, about making a commitment and sticking to it.  The taxi company was providing me a service, one that had potentially difficult consequences for me if it wasn't provided to a satisfactory level.  Despite providing a good enough service most of the time, the few times they failed completely killed any trust I had in them.  I would feel 0% confident about booking another 4:30am taxi from them.  Also, I had to chase them for status updates in each case, and for that last incident I couldn't get an answer.  If the drivers were running late, someone should have called and reset my expectations.  For that matter, someone should have called the drivers to make sure they weren't running late in the first place.

Once your team makes a commitment, they MUST do whatever it takes to keep that commitment.  If they cannot meet the commitment, then they MUST communicate as early as possible with their customer to understand the ramifications of missing the commitment, as well as collaborating on what an alternative delivery might look like.  Even though the trust between your team and your customer will be eroded a little, proactively facing negative news will help maintain a "win-win" attitude between the two parties.

individual post icon

Microsoft has released Internet Explorer 8 Beta 1.  The release is intended for Web Developers and Designers so that they can be ready to take advantage of the new features that are offered.

There are a number of important changes from a developer's perspective.  The main areas (unashamedly cut-and-pasted from the Microsoft site) are:

  • Choice of layout engine (IE5 quirks mode, IE7 strict, IE8 standards).
  • CSS2.1 Compliance.
  • HTML Improvements (fixes to cross-browser inconsistencies).
  • Improved Namespace Support.
  • Performance Improvements (in multiple subsystems).
  • Developer Tools.

You can read full details for these items over at the Features page on the Microsoft site under the "Faster, Easier" section.

I just installed the software, and the one feature that immediately caught my eye as a developer was the Developer Tools dialog.  Microsoft shipped the IE Dev Toolbar before, which was nice, but this is built right into the application.

I particularly liked the CSS hierarchy feature.  You can select an element in the HTML tree, and it shows you all of the CSS that has been applied to it, and where in the hierarchy it came from.  You can turn the individual items off to see what effect that has.

Developer Tools Screenshot

The Layout tab also gives you details about the layout for the currently selected element.  In this example, you can see the size of the element itself, the padding, the margins and the offset from the parent.

Developer Tools Screenshot

You can also switch between the three compatibility modes and the rendering of your page will update immediately.

Developer Tools Screenshot

The Outline tab has many of the features of the original Outline options in the IE Dev Toolbar, allowing the visual outlining of tables, tables cells, divs, etc.

The Script tab in the left pane gives you a whole load of debugging features that I didn't look at yet.  Judging by the UI, the debugging features are going to be very comprehensive.

While looking through the site, I also found a link to the Internet Explorer Developer Center, which has some excellent resources.  This includes full details on using the Developer Tools, as well as Defining Document Compatibility in your HTML using the X-UA-Compatible meta tag, and VPCs for IE6, 7 and 8.

For more information about other new features in IE8 (such as Activities and Web Slices), check out the main Internet Explorer 8 Download Page.

individual post icon

As you can probably tell (unless you are reading this in a feed reader) I have spent the last few evenings in my Shanghai hotel room creating a new layout for dasBlog.  It has been a while since I coded any HTML or CSS, but it was great fun.  I need to go back and clean up a few things (too many bad habits from wanting to rush to the finish line!) but I am pretty happy with the results.  It is nicer than the very plain white at least.

Let me know if you like it.  And let me know if you find any display bugs in your favourite browser...

Enjoy!

individual post icon

Visual Studio 2008 and .Net 3.5 were released to manufacturing (RTM) on Monday just gone.  Here is a link to the main Visual Studio 2008 Developer Center.

Scott Guthrie has a blog posting about the VS2008 release here.

More importantly, he has a posting about uninstalling Beta 2 of Visual Studio 2008 here

I think I will still probably rebuild my laptop instead of risking the uninstall process.  In the past I have always ended up with random Beta bits hanging around and it just makes everything unstable.  That is the price of early-adoption I guess.

Microsoft's development tools and technologies go from strength to strength and I am proud to be part of this company.  Congratulations to all on the VS team!

individual post icon

I attended a number of excellent sessions at the Agile 2007 conference in Washington D.C. this year.  One of the most thought provoking for me was the session by Bob Martin on Developer Professionalism and Craftsmanship.

I have worked as both a developer and as a manager of developers for many years.  As time goes by, it is very easy to lapse into bad habits, to forget that my profession is as defined as any other craft and deserves to be treated as such.  As with any defined craft, consistent high quality relies very much on two things - good quality teaching, and large amounts of discipline by every one of its practitioners.

Bob listed a lot of attributes that he believes makes a "professional" developer.  Many of the items were related to Agile development practices; short iterations, feedback loops, deferring decisions etc.  Of the rest, I wanted to highlight some that resonated with me, because I have seen many teams (and definitely myself!) fall short in these areas.

Progressive Widening and Deepening

For progressive widening, start small and get wider.  For example, when coding a login screen, simply show the username box and a button and allow a login with just the username typed (no checking).  Then add a password box and still allow the login with no checking.  Then have the user enter a username that is checked.  Then a password.

For progressive deepening, develop your features in layers - ensure a feature completely works in each layer (e.g. the UI) before moving to the next.  This will help with decoupling your application layers from each other.

Don't Write Bad Code(!)

Go fast by going well; ensure your code is clean at all times.  Bob gives a good analogy with a kitchen; if you wash up as you go when preparing food, next time you cook everything is already prepared.  If you never wash up, you are always surrounded by food stained plates and pots and pans, and it gets worse over time.  At this point Bob said, quote, "using Test Driven Development is a matter of minimum professionalism".

Test/QA "Should" Find Nothing

This should be the default expectation for every single team member, and developers (more than anyone else) should be driven by this expectation.  The goal for TDD should be 100% code coverage, which in turn will contribute to this expectation.

Debugging Should Not Be Necessary 

When writing your code, debugging should not be necessary because you are writing such small amounts of code to pass your tests (which you wrote first!).  Worst case, debugging should be in code you *just wrote*, in which case you could even delete the code and write it again!

"Manual Test Scripts Are Immoral"

Manual test scripts are essentially programs, and people shouldn't execute programs.  Running manual test scripts is high-stress and tedious and therefore error prone; .  Testers should invest their time in exploratory testing, because, and again I quote, "testers are creative people with diabolical minds".

Definition Of Done

I blogged about the importance of "Defining Done" before.  Done is when all acceptance tests pass.  Bob's tips included:

  • ALWAYS automate "done".
  • Have end-to-end tests for every definition of "end-to-end".
  • An important tactical point he made was that all acceptance tests should be done by the mid-point of the iteration at latest to ensure they can be built in to the build process for at least half of the iteration.

[Note: I do have a small issue with the ideologies above.  I work predominantly in the Web space, and automating the UI part of what we do is a tough problem - multiple browser and OS combinations gives us tough challenges when automating.  It is definitely possible to do, but the cost can be quite high when creating and maintaining your test suites.  I'd love to hear from anyone who is having success with TDD and automated testing in the Web development area.]

Finally, Bob talked about the concept of an Apprenticeship in software engineering - something I think is a fantastic idea.  I have a new developer on my team, and I am going to spend time with him over the next year or so helping him become the best developer he can be.  I am also going to challenge the other developers on my team to reflect on the areas where they could be more disciplined, and support them in becoming better developers.

Let's not settle for being reasonable engineers, lets become master craftsmen and create masterpieces of coding beauty, solutions that we can be proud of...

[Bob Martin gave this talk at another conference this year, and Julien Delhomme has written up Bob's full list here: http://juliendelhomme.com/?p=18]

individual post icon

I spent Monday and Tuesday on an offsite with my team, and one of the things we talked about was Myers-Briggs Personality Types.  In case anyone is interested, I am an ENTP.

I stumbled across a Programmer's Personality Type test this morning, and thought it would be fun to share.  Just as in Myers-Briggs, there are 4 scales:

  • Doer - Planner (D-P)
  • Low Level - High Level (L-H)
  • Solo Situation - Team (S-T)
  • Conservative Programmer - liBeral Programmer (C-B)

I took the test and came out as a DHTC.

You're a Doer. - You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.
You like coding at a High level. - The world is made up of objects and components, you should create your programs in the same way.
You work best in a Team. - A good group is better than the sum of it's parts. The only thing better than a genius programmer is a cohesive group of genius programmers.
You are a Conservative programmer. - The less code you write, the less chance there is of it containing a bug. You write short and to the point code that gets the job done efficiently.

What's your Programmer Personality Type?

individual post icon

Further to my post last week regarding the Visual Studio SP1 Beta, SP1 has now been formally released - links below.

Whilst this should fix a number of issues in VS2005 running on Vista, there is a Vista specific update to SP1 (called "Visual Studio 2005 SP1 Update for Windows Vista") due early in 2007.  The "General Information" link above mentions a beta of this update "coming soon".

individual post icon

A couple of weeks back I blogged about getting Web App Debugging working on Windows Vista RC1, and I mentioned an annoying "attempted to read or write protected memory" error when building your solution.

Brian Peek (whose solution I originally quoted in my first post) kindly left me a comment with a possible solution to the memory issue:

"Hey there...saw your link to my site on the IIS debugging stuff.  You may be able to get rid of the memory protection issues by installing VS2005 SP1 Beta 1 at:
http://www.microsoft.com/downloads/results.aspx?pocId=&freetext=Visual%20Studio%202005%20Service%20Pack%201&DisplayLang=en

I haven't managed to test this yet (since I have now installed the RTM version of Vista and the error is no longer happening), but if you are getting the memory error on pre-RTM Vista builds, you might want to install the SP1 Beta.

Thanks again Brian!

individual post icon

I recently got a new laptop and am running Windows Vista RC1.  I had been having a bunch of trouble getting Visual Studio 2005 to behave, particularly when trying to debug web applications.  It took me a little while to figure out, and I had to pull together a few different resources from the web in order to get things working.  I thought I would document them all together here for others to take advantage of (and so I can find them later if I need them!)

When creating web applications, I wanted to use "Local IIS" instead of "File System".  This requires the "IIS 6 Management Compatibility" option installed within IIS7.  Also, once this is installed, you still need to run Visual Studio as administrator for this to work.  Scott Guthrie has a blog post entitled "Tip/Trick: Using IIS7 on Vista with VS 2005" that includes screen grabs of these two steps.

Once this was working, I was still having trouble debugging web applications.  Brian Peek has a post with three simple steps to ensure debugging works correctly:

1) In the "Internet Options" control panel, go to the Security tab.  Add "http://localhost" to your list of "Trusted Sites"
2) Again, for "Trusted Sites", clilck the "Custom Level..." button.  Change the value of User Authentication to "Automatic login with current username and password".
3) In the new IIS manager, ensure that the web application directory is both:
a) in the "Classic .NET AppPool".
b) has "Windows Authentication" enabled in the Authentication section.

After these steps I now have site development working against a local IIS7 server, and debugging is working just fine.  There is one last issue that is apparently a Vista RC1 issue without any workarounds.  When building solutions, I quite frequently get the error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt.".  If this happens, the only fix is to restart the IDE.  Roll on Vista RTM install!

individual post icon

One of my favourite sites is the Daily WTF.  It features true horror stories from the technical trenches, as submitted by avid readers.  Examples of the worst coding skills, the most arrogance and the stupidest people are abound.

A post appeared the other day that is one of my all-time favourites: “Make this your top priority”.  If this one post alone isn’t enough to make you subscribe to the feed, I don’t know what is!

Perhaps the most famous of the entries though are the Paula Bean entries.  Check out “The Brilliant Paula Bean” and “The Brilliant Paula Strikes Back”.

Hilarious.

 

individual post icon

Microsoft has made the Consolas font available for download.  Consolas is one of the 6 new fonts previously only available in Window Vista (Calibri, Cambria, Candara, Consolas, Constantina, Corbel).  It is a fixed-width font which makes it a great replacement for all text editors, including Visual Studio.

Be aware that it is a ClearType font, so you need to have ClearType enabled to get the best out of it.

I have been using Consolas for a while, and I really like it.  Check it out…

Consolas

Download the Consolas font here.

individual post icon

I just wasted about an hour of my time.  I should have known the answer to this sooner really, given recent pushes for locking down security out of the box.

I restored a SQL 2005 database from another server onto my local development box.  Then I tried to connect to it from within some ASP.Net code.  Every time I did so, I kept getting “Invalid Connection”.  That was it, no further information that was of any use whatsoever.

Now, anyone who has transferred a SQL database from one machine to another knows that the Users and Logins get a little messed up.  Take “sa” as an example.  The login “sa” still exists, but the database user “dbo” invariably gets orphaned from the “sa” login.  You can fix this quickly and easily by issuing the following command in the database you are having issues with:

use [YourDatabaseName]
go
exec sp_changedbowner ‘sa’

For other Logins/Users that become unstuck, there is a good troubleshooting guide here called Fixing Broken Logins and Transferring Passwords.

However, once I had fixed up my users, I was still getting the same error.  After about an hour of drilling through almost every dialog in the SQL Server Management Studio, I found the utility called “SQL Server 2005 Surface Area Configuration” in the SQL Server 2005 start menu group.

When you run it, click on the following link at the bottom of the main screen:

SQLServerSurfaceArea1

Once the component list has loaded, select “Remote Connections” from the left hand treeview, and then ensure that “Local and remote connections” is selected (along with whichever option works for you for the “Using” statements).

SQLServerSurfaceArea2

As it says in the dialog, by default SQL 2005 is locked down to “Local connections only”.  Changing this to “Local and remote” made my “invalid connection” issue magically disappear.

Finally, I can get on with some work…  :-)

individual post icon

Just found this over on ScottGu’s blog – the App Offline feature:

Basically, if you place a file with this name [ed: app_offline.htm] in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application.  ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).

 

This provides a convenient way to take down your application while you are making big changes or copying in lots of new page functionality (and you want to avoid the annoying problem of people hitting and activating your site in the middle of a content update).  It can also be a useful way to immediately unlock and unload a SQL Express or Access database whose .mdf or .mdb data files are residing in the /app_data directory.

 

Once you remove the app_offline.htm file, the next request into the application will cause ASP.NET to load the application and app-domain again, and life will continue along as normal.

 

This is a really nice feature – very useful for putting revisions of a site live.  This way you can diable the site temporarily and simply trust the ASP.NET engine to “do the right thing”.  Deleting (or renaming) the file once you are finished results in ASP.NET beginning to serve your site again.

individual post icon

A while ago, some of the guys in one of the UK Developer and Platform group here at Microsoft started putting together “MSDN Nuggets” – short videos (under 10 minutes) that demonstrate some new feature or technology.  This is a great idea, and is a very convenient way of getting an overview of technologies, especially when finding time for in depth research and reading is limited.  There is nothing like a hands-on demo to really aid learning.

Sadly, I fell behind with my watching – it was hard to figure out what I had seen and what was new etc, and I had to remember to download the videos locally so I could watch on the train.

However, I just stumbled across a post from Mike Taulty about the MSDN Nugget Viewer he has written (Mike is one of the guys who presents the nuggets).  This is very cool; it allows for both online and offline viewing, and keeps a track of what you have watched.  Highly recommended.  It is also written in .Net 2.0 and uses ClickOnce installation…  :-)

There is also an MSDN Nuggets gadget for Windows Live which is nice.

individual post icon

Just found out from the IEBlog that Microsoft have released a beta of the IE Developer Toolbar.

It has some pretty nice features - you can view the HTML DOM of the current page, update attributes and styles of items on the page, toggle various useful pieces of info (such as image size, image path etc), and outline various types of element on the page.  You can also do single click validation of the page etc.

Most web developers will probably find something useful in there.  :-)


Search phammond.com.
Blog Post Calendar
<September 2008>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

Month View
Images from Flickr
{ paul hammond }. Get yours at bighugelabs.com/flickr
© 2008 Paul Hammond Send mail to the author(s)

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Sign In