Jun 30, 2005

Debugging ASP.NET using Firefox, Safari, etc

I've got an issue with the rendering of pages in Firefox and Safari that I need to deal with. The pages render correctly in IE, but not in the other browsers so I needed to find a way to debug the application while testing the pages using Firefox and Safari.

I found a small post on a forum that indicated all you need to do is attach to the ASP worker Process (aspnet_wp) and it would all work. Guess what - it's true. I love it when things are so simple :-)

Jun 24, 2005

Battlefield 2

I just (well, last night actually) picked up my preorder for Battlefield 2. First impressions were very good and led to a very late night!

The graphics are better, the gameplay better, the whole thing is better! All the good bits provided by the Desert Combat guys are there as well, along with a nice new ranking system. You play as squad leaders, generals, grunts, whatever.

If you liked BF1942, or DC then go out and pick this baby up.

Jun 22, 2005

Usability and Functionality

Products with high functionality are often quite difficult to use. I'm sure you've run across this yourself. You hear of a great product that people recommend so you go out and download a demo or buy a copy from somewhere and install it on your PC.

You start the program and you are immediately inundated with options with no clear idea of what to do next. The menu bar has a plethora of choices, some of which make immediate sense and others which are so esoteric you have no idea what they do. Data entry screens are so crowded with fields, drops downs, radio buttons, data grids and buttons that you can see the screen for all the controls. And the application just looks plain ugly (yes I'm talking about you MYOB).

Alternatively highly usable applications are often seen as very simplistic or single tasked. This is usually because simple applications are easy to keep clean and tight. WinAmp has always been highly usable but it just plays MP3's (and other media) - it's not a point of sale system, or an accounting package.

Does this mean that your highly functional application can't also be highly usable? No. However highly functional applications require a lot of thought to be placed on usability at the start of the design process, not at the end (where it is usually done).

Please note: Usability is not polish. Eye candy does not equal usability. Wizards and other automated assistance tools do not equal usability. Skinnable applications are not necessarily usable.

Usability is helping the users of your software to do what they want, as fast as they want, when they want. Without any distractions.

What does this mean for your application design? What should you try and do?

1. Design for multiple input methods.
Some people use like keyboards and other prefer mice. Think about both.

2. Think about the tasks.
Functional design usually focusses on getting functionality right, but not on streamlining the tasks that the functionality is meant to support. Sure, you need functionality to create a customer, and sure, you might need 150 data fields to record all the possible data, but do you need to show the user those 150 fields all at once, and are they used every single time? I doubt it.

3. Think about your users.
Contrary to popular belief not all users are programmers, and not all users have a strong background in computers. Some people have no computer skills at all and are actually afraid that making a mistake may cause loud popping noises and black smoke to rise from the back of whatever that humming beige box is under the desk.

4. Don't let programmers design screens (if possible).
Most programmers are "graphically challenged" and "usability challenged". They know what applications look nice and which ones are easy to use but can they actually make a nice looking app or one that is a pleasure to use? I doubt it - just ask them to design a customer entry screen with 150 data fields and see what they produce.

Jun 21, 2005

Visual Studio 2005 Release Date (at last)

OK, So I might be a little late with the news, but Microsoft has announced the official release date for Visual Studio 2005, SQL Server 2005 and BizTalk 2006 to be during "the week of" November 7th.

The full press release from Microsoft is here:
Microsoft Sets Visual Studio, SQL Server, BizTalk Server Launch Date: Microsoft readies next-generation tools and data platform and demonstrates continued customer, partner and product momentum leading into launch.

Jun 16, 2005

Unit Testing for ASP.NET

I just came across NUnitAsp while trying to find some way to unit test ASPX pages. It seems to be a fairly comprehensive extension for NUnit and would fit right in.

The only problem I've got so far is that it doesn't understand buttons that use Javascript in the submit instead of having a href reference. This is fairly critical to my testing and basically means I can't use it.

If anyone else knows of a good way to unit test ASP.NET please drop me a line.

Jun 14, 2005

Article on Adopting XP

There's a nice little article over at Informit.com about adopting Extreme Programming (XP) practices in an organisation. Having gone through the adoption process in the past, I'd put myself somewhere between a toe-dipper and a cannon-baller. One of those guys that eases in up to the "cringe-point" where the water temperature makes your stomach want to run up into your chest, and then just dives in the rest of the way. It means that the initial period is a bit slow, but less disruptive, while it doesn't drag out the finish once your team becomes comfortable with the process.

Jun 11, 2005

Agility, ISO 9001 and Quality

We are an ISO 9001 accredited company (so that we can deal with government bodies, etc) and there seems to be this assumption that ISO 9001 implies quality.

In reality, this couldn't be further from the truth as the ISO standard is really just ensuring that the business processes of a company are documented and (importantly) followed. For a development environment this means there is documentation cover the process of request initiation, specification and design, development, testing, etc.

The process for design, development and testing must all be documented and followed for ISO accreditation. Because the QA methods are documented and followed there is an assumption that any product produced must be a quality product, free of defects and working beautifully. This is a bad assumption - all the ISO documents produce and enforce is that the process is followed, not that the process is correct.

I can still write bad tests, test the wrong things, make poor assumptions in the product design and produce the worst user interface history has even seen (except maybe for the Edsel or Microsoft Bob) but as long as I follow the documented processes to produce that disaster then my totally useless application will still be an ISO compliant piece of software and some people could still consider it a quality product.

So, let's say we now want to introduce agile methods into the development environment. Agile methods try to minimise documentation as excessive documentation means that a team spends more time documenting and less time responding to change. Does that mean Agile methods such as extreme programming and SCRUM cannot be ISO compliant?

There is an assumption at times that agile methods should mean no documentation. This is a stupid assumption. Documentation is neccessary, just not so much as to drown your dev team. Documentation that by it's very nature is destined to be shelfware should be avoided at all costs, however no documentation would make it very hard for new developers to get up to speed with a product, would make it hard to track change history or reasons, and would make it vary hard to product a meaningful users guide in a short space of time.

Where does ISO fit into the agile spectrum? I believe it ensures that teams follow the agile methods without deviating too much into a coding free for all where each developer does what they want, when they want. The ISO documentation should describe the agile methods used by your organisation and the way such methods should be applied.

Describing the method in which test driven development is performed is a good thing. Describing the methods in which business analysts and programmers flesh out the design of a new feature is a good thing. Describing the coding standards and how they relate to developers is a good thing.

Producing pages of documentation to fix a minor bug is a bad thing. It's not agile and it's not required for ISO accreditation. Don't do it.

Don't make the assumption that ISO compliance equals code quality. Use the agile methods, improve quality and improve productivity and don't mistake ISO compliance for prescriptive non agile methods.

Most of all, when applying or evaluating agile methodologies for your specific situation, engage the grey matter between your ears and do what is practical and appropriate for you.

Jun 10, 2005

Tabbed browsing in IE 6

At last! You can now get tabbed browsing in Internet Explorer 6 - just like you could in Firefox and Opera for the last few years. You only need the new MSN toolbar.

The original story is at GeekInformed.

Jun 9, 2005

Automated Functional Testing

Today I had a bit of a look around for functional testing tools for web applications. I ended up downloading the AutomatedQA TestComplete demo and trying it out.

The demo is a bit limited in the extent of the testing suite that can be developed basically due to the limits on the size of the scripting, but all the features are there.

I tried out the test recording and some of the error trapping and it was quite nice. Since the application I'm testing is an ASP.NET application I needed to know that if I screwed around with the style sheets or added extra whitespace that the tests would still work (since that sort of thing doesn't affect functionality).

The good thing is that if the html controls are named (ie they have an id attribute) the test scripts address the controls by name, so if ordering changes, the scripts are still OK (unless you embed tabs of course).

If you click on a control the mouse click is positioned based on the top left corner of the control, not the top left corner of the page, so font size changes, extra whitespace, etc don't invalidate the test.

Best of all, the price (yes it's commercial) is quite reasonable. I still want to try to see how it works on load testing, etc but it looks quite good so far.

Jun 7, 2005

.NET Development toolset

I'm trying to figure out what an ideal toolset is for my development team. Currently the toolset consists of VS.NET 2003, SourceSafe, the Ants code profiler and MS Virtual PC 2004.

In the past I've used a whole suite of tools. VS.NET 2003, NUnit, NAnt, CruiseControl.NET, VMWare, WinCVS (and related tools), Compuware DevPartner Studio and more.

With the application that's being developed I'm pretty sure that at least a good chunk of these tools will be needed, but I'd love to know if anyone has other suggestions that might be useful. I'll follow with what I went with after I've settled in a bit more and run things through with the dev team.

Also, if anyone has good recommendations for doing effective load testing on web applications I'd appreciate some feedback.

Jun 6, 2005

First Day...

I started in my new role at a new company today and it's been quite a busy day! I walked into the office first thing this morning and exactly 1 minute later I was in the board room in a meeting with another company about software development. That meeting then extended into another which went until lunch, and then from there I had a quick break before being thrown deep end into yet another one. When they told me in the interviews that I needed to get up to speed quickly, I understand why :-).

I haven't yet had a chance to look through the code or get a handle on the current development processes. Once I've done that, then it'll be time to look at ways to improve things. Given the conversations I've had today I'm pretty sure I'll be targeting testing and quality assurance first. I'll also need to see if any of my developers have done and TDD or been exposed to agile methods before.

It's all very interesting and it looks like this has been a good move for me.

Jun 3, 2005

Last day

After 9 years this is my last day with my current employer. It's been quite a ride and a really great opportunity.

I've been involved in every aspect of the business, programming, design, troubleshooting, firewalls and networking, sales, marketing, trade shows, hiring and firing, starting business units, running international projects, developing new products, web site design, the works!

What a great time! I couldn't have wished for a more enjoyable, flexible and fun workplace. If any of my colleagues read this - thanks for the laughs and for making each day something to look forward to instead of something to be endured.

Monday sees me start with a new company with a focus on the educational sector. It's quite a departure from the textile and retail sectors, but a new challenge is what I wanted. One of the big things I'll be looking into is moving the main application forward, so I'll need to get up to speed with .NET v2.0, esp. the ASP.NET and C# changes. It should be fun.

Anyway, today promises to be a bit of fun - my gamecube is in the meeting room, and a long lunch is likely. Somehow I don't think I'll be that productive today...

Jun 2, 2005

Agility vs Discipline

Over the last 14 years, I've done plenty of software development. I've worked on projects that have been run in a very structured manner and others that have been run in a more "flexible" manner, as well as open source projects.

I've always found it very interesting to see how different projects are run, both as a team member (ie a grunt) and also as a manager.

So I found it very interesting when I came across the book "Balancing Agility & Discipline: A Guide For The Perplexed" (Amazon link). I've recently been focussing on adopting some of the agile methods into my development teams, but some of the methods don't really sit well with me. This book takes a very pragmatic approach to combining the best of both worlds to fit your particular needs and gives some foundation to backup my thinking.

If you're interested in incorporating some or all of the agile methods into your project teams, but aren't too sure about how they would fit to your organisation, I'd recommend grabbing a copy. Alternatively, if your so agile that you don't know where you're meant to be pointing, then this may help you to put a rudder on your project and get some direction again.

Well worth a read.

Jun 1, 2005

Test driven development and VB6

Just as I wrap up things here at work I've been thinking about our legacy VB6 code (used in a retail point of sale application).

A lot of what we do in that code is quite complex and difficult to test, but it definitely needs testing. Up until now we've basically had a single person running test scripts manually for each new release. It's a slow process and quite painful, so it hardly ever gets done.

For our .NET code we've used many of the agile methodologies, such as TDD (test driven development), refactoring and continuous integration. These processes have worked quite well and at times have proven invaluable.

So I thought why not see if we can apply some of these methods to VB6? Well it's not so easy (as you may already know). The problems being that VB6 is a closed box, most of the logic is embedded in the forms, and those forms are not exposed to COM even if you write the application as an ActiveX exe (which we didn't).

I found a few articles one the web - one about using VB6 with NUnit and one on Debugging VB6 Binaries in VB.NET which all seemed promising, but nothing really works for our legacy code.

The problem comes down to the following:
  1. Our code is not very object oriented (VB6 isn't OO in any case). In fact our code is not even very "class oriented".
  2. Unit testing for VB6 effectively requires that the classes be in an ActiveX EXE or DLL file so that COM can get to them. We don't have any .DLLs and classes are embedded in the application.
  3. To test form logic you really need to have a model/view/controller environment (or something similar). We don't have this.
What this means for our legacy code is that all the nice things about the XP/Agile methodologies that we've applied to our .NET development can't be applied to our legacy code without a massive rewrite. It would be easier to rewrite to VB.NET in any case.

We can't even safely apply refactoring, because refactoring really relies on have a strong set of unit tests you can run after each small change.

Oh well. It was a nice idea while it lasted ;-)

P.S. If you've got some good tips on apply agile methods to VB6 development I'd love to hear them

Here we go...

So, after some time of thinking about it, I've decided to start a blog.

What will I talk about here? Who knows - only time will tell.

At this point in time, I'm about to wrap up my current employment (3 days to go) and move to a new company as a .NET Technical Architect. Should be very interesting, and I'll post updates here to see how things pan out.

It'll be interesting to see how things progess in a new environment, and how different various software companies are. After all, I've been at this one company now for over 9 years. That's a long time to stay in one place in the software industry!

Anyway, I'll try to keep things moving in terms of the blog, and try to post new stuff fairly regularly.

I can't wait to see what the future will hold :-)