Agile:Rant: If you do some of the work…

Here’s a snap of the peaches we bought from our local big-name supermarket:

unlucky for some

“Ripen at home”. What’s that all about? I have to do some of the work here…and I’m still paying the same price. I don’t see any payback when I get to the checkout, what’s going on here? Does this mean I’ve bought a product that isn’t ready to use when I get it home?

Surely they should be cheaper? After all, they’re getting picked earlier, thus freeing up space on the peach tree for the next lot, thus…oh, I see, early release means earlier return on investment (and in this case earlier repeat growth). May be we software folks could learn something from this…

Incidentally, I’ve just realised what I’ve done here – I’ve provided some meaningful hints about this posting in the title (agile:rant) and in the categories (project management, rants)…this is exactly the conversation Korby and I had during TechEd 2005. Thoughts on classification, attribution, taxonomy, intelligent searching…coming soon.

TechEd 2005 – E-mail or blog?

A couple of years ago we were all happy exchanging e-mail addresses…this year, it seems that all I did was exchange blog addresses.

Why the sudden interest in blogs? My first few thoughts on this are: Blogs open us up to our readership, they provide a means of working out how somebody ticks. Couple this with the fact I can publish information about “a topic” and push it out to the world…no longer do I have to rely on somebody sending me an e-mail to which I then have to reply (actually, it’s easy to rely on somebody sending me an e-mail, the bits that’s hard is for the sender: I might take an age to reply.) Blogs alleviate this “waiting game” – if the information is published via a blog, it’s there and waiting for others to read. I find this rather interesting, so I’ll blog some more about this topic as soon as I have some content.

Here are the blogs of a few of the folks I met:

Korby Parnell. Korby’s got a lot of good stuff to say, especially about GotDotNet – thanks for the t-shirt and badge, I’ll wear ’em at the next .net event! Korby, Adrian Bateman, Maarten Visser (more here) and I had a late lunch followed by a very lengthy chat on Friday – we were discussing taxonomies, specialisation, association, adding meaning to searches, etc. The chat went on through the afternoon until we reached a point that we all had to split and head our separate ways. Watch this space…there’s a huge work in progress here, if only we can find it and specify it.

Oh, and if you take a look at Korby’s blogroll, you should find that it follows my “separation theory”, as noted here.

Betsy Aoki. I missed Betsy at a recent UK Community Leaders LiveMeeting, it was good to catch her in a couple of sessions and to chat in between times. I’ll be blogging about Besty’s TechEd 2005 sessions later this week – I have written notes and drafts in place already. There was, just to give you a taster, much talk of Robert Scoble (good talk I hasten to add, just in case Robert is reading this! Hey, let me dream about something!)

Speaking of the Scobleizer…look what he just posted. Lordy!

Eileen Brown. Eileen has a really cool picture of herself on her blog: I was lucky enough to learn about the history behind the photograph. My primary reason for pinging Eileen was to chat about blogcasts…Eileen and John ran a great session for MVPs last month.

Benjamin Mitchell. I sat in on Benjamin’s WSE 3.0 session, which, despite the video recorder not functioning at the start, went very well. Obviously the faulty VCR wasn’t Benjamin’s fault and he did a good job of padding until a new one arrived! Benjamin was at my end of the table for dinner on Monday night so we chatted about “how we get things done”. Benjamin and I seem to share a common thread when it comes to “how much work do we take on” and “how much free work do we take on”. There aren’t enough hours in the day… Anyway, Benjamin, Peter McMahon, Durgaprasad Gorti Adrian and I manned the “Ask The Experts” stand for many hours on and off. From what I saw, Benjamin has the “Scott Hanselman desktop“!

Mat Stephen. Amazingly, when I got back to my desk and tried to add Mat’s blog to my aggregator it told me it was already there. True enough, it was mentioned during the aforementioned blogcast session…I even had it written down in my notes! Mat’s some guy, I met him in the flesh on the Thursday of TechEd, then on the Friday we shared the same coach to the airport. Whilst at the airport we knocked back 2 * 1.5L pitchers of lager! We were also joined by three guys from Ireland…the time at the airport just flew by!

Anyway, that’s TechEd 2005 over, I’ve still got seven or eight posts about it to finish…tomorrow (Monday) I go back to my day job, so it might be later next week before they see the light of day.

In the words of Betsy Aoki, when asked about Microsoft’s policy on blogging (there isn’t one, in case you were wondering – isn’t it amazing how some of the best work is done without a “policy” in place?): “code smart, blog smart”

TechEd 2005 – Viruses, Rootkits, Spyware and Malware

Mark is one of the guys behind SysInternals.

His session was littered with demo’s of spyware and malware at work – all running inside a virtual machine, so no harm done. Mark also demo’d rootkits and explained how they work – the concept isn’t new, but it’s only now we’re starting to see these things surface (and since rootkits are meant not to be seen, no pun intended, this might not be a surprise!)

The key takeaway was: “use more than one anti-spyware product”.

And if you’re using Windows XP SP2, always enable DEP (Data Execution Prevention). Here’s how.

I picked up some excellent tips and “fodder” for my soon to be completed and inaccurately named “The Seven Habits of Securing and Protecting Your PC” article…

TechEd 2005 – What’s new in .NET 2.0

David Platt is some guy. Even after a lengthy session on the beers last night (it was hard not to, TechEd UK folks were here for a huge social gathering!), this session kept my attention right to the end…in fact, there could have been more of it and we’d all have been happy!

David talked about the BCL, performance, security, the garbage collector, generics, “out of band” (I forget what this was about, when I remember I’ll update this post), debugging, clickonce. He made a good job of this, the demo’s were short and sweet.

Given the title of this session and this blog post, you’d think I’d write more about what’s new in .NET 2.0…however some of David’s surrounding comments are worthy of being written about!

Cool quotes
David made reference to Moore’s Law:

Moore’s law is the empirical observation that at our rate of technological development, the complexity of an integrated circuit, with respect to minimum component cost will double in about 24 months.

He then went on to tell us about Platt’s Law:

It doesn’t matter how fast the hardware gets, the software guys will piss it away

David’s a great believer in “lowering the friction of the process, take software to the next level, write better code…make it easier to do it right and harder to do it wrong”, .NET 2.0 helps us realise this quote. “Laziness trumphs everything” – make it easy to do the good/required stuff, like security, and folks will do it. “The bar needs to be raised” All good stuff.

I found this next quote rather appealing:

Crap is conserved

Consider two piles of crap (think of crap code if that helps). Even if you reduce the amount of crap in one pile, it has to go somewhere, thus you simply move it to the other pile (or a new pile). The total amount of crap remains the same. Less crap “here”, means more crap somewhere else.

In a quick poll of the audience, “what language are you folks using?”, 85% percent replied with C#, the remainder using Visual or another language. That’s a lot of C# developers…

TechEd 2005 – SQL Server 2005 end-to-end development

Euan Garden and Brian Randall formed a double-act to make this an interactive session with some comedy to help things along.

Stealing from the session’s summary slide, this is what we got to see:

Less code
Client – Async Execution -great for creating more responsive user interfaces. This was demo’d using two grids with delays introduced using T-SQL’s WAITFOR – 5 seconds and 7 seconds respectively. Brian coded the example almost from scratch, demonstrating that without async queries the grids took 12 seconds to populate completely. With async queries, the grids were populated with a wait time equal to the longest query, i.e. 7 seconds. The demo’s were shown in a WinForms application and a WebForm application.

Client – UDTs
Server – Paging – SQL Server 2005 introduces row_number() which allows us to write queries that return specific ranges, e.g. 30 thru 40: a great boon for paging those large result sets.

Server – Recursive Query

More Productive
Server – Error Handling– SQL Server 2005 offers structured exception handling.

New Capabilities
Server – DML with OUTPUT
This was really cool. SQL Server 2005 lets us write something like: delete top(1) from table_foo output deleted.* – the result set containing the one record that was deleted. And it works with inserted.* and updated.* too. Neat.

Server – XML Schema File Loading

TechEd 2005 – Keynote (Tuesday)

Opening with a huge puff of smoke, the sounds of a fire extinguisher operated by a stressed out IT Pro, this keynote took a new approach and an approach that we all could relate to. Hot on the heels of the IT Pro, well, not hot on the heels per say, the Developer was woken from his slumber grumbling about not having slept for days because he’s too busy developing applications. Naturally an argument between the IT Pro and the Developer raged…the IT Pro moaning that the Developer didn’t test enough and didn’t write enough documentation…the Developer arguing that he doesn’t have time for all of that: “the code compiles, what more do you want?”

Enter the Information Worker. This outspoken young lady complained about them both, citing the fact that she has to visit six applications in order to learn about her customer’s recent order…contact system, stock control, despatch system, invoice system, credit control system, etc. “Oh, IT Pro, I need you to fix my problem now, it’ll take you a minute”, she suddenly interjected.

These actors were the personification of many typical problems – the keynote was aimed at how SQL Server 2005 and Visual Studio 2005 can get the IT Pro, the Developer and the Information Worker talking to each other and how it can make them more productive.

SQL Server 2005 performance
The keynote had to be viewed by some 6500 attendees so naturally it was broadcast via video. Three screens (in the main keynote area) – the middle, we saw the presenter, the left screen and right screen were setup to view two different but identical machines: one that was running SQL Server 2000, the other running SQL Server 2005. Both we running 64-bit Windows. A really cool graphical view of PerfMon presented the CPU usage, disk usage, query throughput, etc. – it was awesome. The demonstration was clear, cranking up SQL Server 2000 by a factor of 2, then 4 caused it to bottom out very quickly. The same example over on SQL Server 2005 was night’n’day.

The speaker then went on to highlight the monetary differences between ownership of SQL Server 2005, Oracle 10 and IBM DB2. I suspect that there may well have been some jiggery-pokery with the numbers, but basically the TCO of SQL Server is cheaper than Oracle and IBM…a fellow attendee caught whilst I was manning the Ask The Experts (ATE) stand, he was from Oracle and felt a little hard done to. OK, I can sympathise, but hey, this is a Microsoft conference, if they want to bash Oracle (who won’t entertain mention of SQL Server at their conferences!) then so be it! So what if Microsoft used seven slides to perform the Oracle bashing?!

I was surprised to see a mallet being used to destroy a network device. This was, however, a rather excellent way of demonstrating SQL Server 2005’s mirroring capabilities. Going back to the “two screen” view mentioned earlier, now both screens were displaying two identical computers running SQL Server 2005…one of them has *2 the load the other *4. However, after the mallet incident, the machine on the left took over from the machine on the right…thus doing it’s own work and that of the other machine. The fancy performance monitor flinched only ever so slightly and then levelled out – it was still “just ticking over”!

So, the result of the keynote: SQL Server 2005 and Visual Studio 2005 are going to improve not just physical performance, but employee performance…I had to leave the keynote sharp, but I’m guessing that our three actors made up and are now the best of friends!

TechEd 2005 – Catching Up

These events are excellent for catching up with folks that I normally communicate with via e-mail.

This includes: TurboDemo, AutomatedQA and International Developer.

I’ve also found a few new products to consider for review. Without giving too much away, I found what looks like a great web service, SOAP, http testing framework that includes loadtesting…more later.

And I found Jason on the Borland stand! Borland were demonstrating Delphi 2005, StarTeam, Calibre RM and all your favourite Borland products. Cool stuff, Borland at a Microsoft conference.

TechEd 2005 – More SQL Server 2005

Good Lord! Take a look at the “open table” menu option…it used to have a row limit option. In SQL Server 2005, the row limit option has gone! If you do choose to use the open table menu option, make sure that you hit the ‘stop’ button very soon after the open table process starts…don’t go off to lunch: huge amounts of memory will be consumed in the process!

The afternoon session saw the introduction of the dynamic management object (associated with DMVs, dynamic management views). The DMO replaces some of the functionality of DBCC – it surfaces some of the performance events, disk usage, table usage, backup and restore activity and user statistics (to name a few). One really cool feature is the ability to copy the DMO, thus allowing time-based historical stats to be built up. Indeed, the ability to fire a SELECT * from … in order to gain access to what was previously locked inside DBCC is a real boon. And it can be exported to Excel too…this caught a few folks attention!

Whilst I’ve seen it before, Kimberly demo’d the help inside SQL Server Management Studio (SSMS) – it’s rather neat: it will work off the locally installed help, online help comprising of (currently) Codezone, the MSDN and a Questions collection (more about this when I get to it).

TechEd 2005 – Misc

One interesting “feature” that I’ve got stuck to my name badge is a RFID tag…it claims to have a random number only and does not contain any personal data…

…the RFID is monitoring the flow of people in and out of the preconference session rooms (it’ll be switched off after the keynote demo). Neat. You can remove the RFID of course, should you wish to be excluded.

And, lunch…was sponsored by Borland. The highlight of lunch, apart from the food and the Magnum white (ice-cream) was the “flooky” meeting with and dining with Michael Rys of W3C and XQuery fame.

TechEd 2005 – SQL Server Management Tools

Kimberly Tripp‘s doing an excellent job of showing off the new features in SQL Server 2005, and she’s making reference to SQL Server 2000 for comparison…

Well, here’s my first post from TechEd 2005, Amsterdam…I didn’t get much sleep last night, considering I was on the 0550 flight out of Edinburgh wasn’t a good idea, but, as they say “we are where we are”. And here I am blogging from a break in the session…

My first key takeaway revolves around upgrading from a SQL Server 2000 database to a SQL Server 2005 database. It’s something most of us, as SQL Server users, will have to do at some point (hopefully real soon). I was pleased to learn that Microsoft have set themselves a [stretch] target of 3 minutes for a 2000 to 2005 in-place upgrade. Kimberly also went to great lengths to explain the ins-and-outs of moving a database (she demo’d Northwind, which doesn’t ship with 2005) using detach and attach.

Further examples demonstrated the performance gains to be had from a 2005 upgrade, especially with regard to fast file initialisation: Kimberly created a 2gb database without fast file initialisation enabled…it took 103s. She then proceeded to create the same database with fast file initialisation enabled…the result: 12s. Wow.

One halleluhaj moment is the fact that 2005’s dialog boxes are now non-modal, i.e. you don’t need to open Enterprise Manager (or 2005’s SQL Server Management Studio, SSMS) in order to do more than one thing at a time!

Demos were in a Virtual PC window, with 1GB running XP-32 on an AMD-64…the VPC was very “performant”!

Off to TechEd 2005…

With any luck I’ll get some time to blog about what’s going on, etc. It’s going to be a busy week, apart from TechEd sessions there are evening events planned for Monday through to Thursday…it never was going to be a holiday!

When Tests Get Hard

I attended Charlie Poole’s When Tests Get Hard session.

The first thing that Charlie said summed XP up for me: “lots of little bits that I’d being doing, but brought together”

Why is testing/TDD hard? A quick poll of the attendees revealed

  1. no obvious programming interface
  2. set up time too great, especially for databases
  3. code in containers or managed by containers can prove difficult to work with
  4. “Graphical User Interfaces (GUIs) either look good or they don’t”, another fine quote from Alan!

Charlie followed it up with: testing connected sets of objects is hard because:

  1. tests become dependent upon one another
  2. objects have to be put into a known state
  3. it’s hard to figure out what failed

We went on to look at why GUI testing is hard.

GUIs are hard to test because there is tight coupling to other parts of the application, including the business logic. The solution to this is to separate the business logic from the UI, to use interfaces to permit substitution and factories to create business objects. This ran into an interesting discussion regarding the use of interfaces: some folks have argued that using interfaces isn’t the simplest and most expressive “thing”. Charlie believes that they are, on the grounds that they make it clear that a class has a capability. A similar discussion can be found here.

GUIs are hard to test because there is one large program handling all user interaction. Charlie’s recommendations revolved around using separate classes for UI logic and for validation. He also recommended the creation of smart controls (NUnit’s status bar being an example of such a thing – if you have NUnit installed, take a look here: C:\Program Files\NUnit 2.2\src\uikit). The key takeaway from this point was that the forms know too much about the objects that are dropped on them.

GUIs are hard to test because the design is driven by the IDE. Today’s modern IDEs will let you create a form, drop a button on it, double click on the button and write code for the button click. Granted, if you are doing the simplest thing, this is the right place for code, but in the long term it’s the wrong place for code (sure, you’d refactor it out, right?) We should resist the temptation to insert code into a UI just because the UI makes it easy. We should split code into two parts, presentation and behaviour (the use of partial classes and inheritance can help with this). Charlie recommend that we all read or re-read Mike Feather’s The Humble Dialog Box.

GUIs are hard to test because of technical issues of the platform. Charlie reiterated the need to be clear about what testing is needed, i.e. don’t test the platform (except to learn how the platform can help you with your testing), or put other way “don’t test other people’s stuff”

I liked Charlie’s “The Hardness Paradox” which basically stated that if something that is hard to test, it has to be a good thing. This will force us to look more deeply at how are applications are designed, with a view to making them easier to test. Humoursly, we compared this to a bang on the head – were it not for the fact that it hurts, we might keep doing it! Why should we shy away from difficult activities? We’ve cracked TDD for [elementary] classes, now we’re moving on to the next stage: testing the UI, the database, the web service, etc.

Quote for the day:

“If you don’t talk to the customer, the details don’t come up” – Charlie Poole, Edinburgh, 30th June 2005

Lastly, I also had the luxury of joining Charlie, Clarke, Barry and Peter for dinner (Colin joined in but didn’t eat!)

(Oh, and NUnit 2.4 is under development! Can’t wait!)