Rob Smyth

Monday 29 October 2007

Visual Studio Style Docking For Windows Applications

I'm currently using the DockPanel Suite in a little application I'm writing to give Visual Studio style panel docking. Really cool.

It is, free, open source, and easy to implement. My only critism is that the documentation is a bit fragmented. A quick starter (for C#) on the project web site would be good. Currently you need to download the separate documentation files.

So far I'm really impressed.

Using Continous Integration To Raise Code Coverage

I'm constantly amazed by what I learn working in a team, somebody is always coming up with something real useful. This last couple of weeks it was a simple extension to our continuous integration (CI) build box that measures the code coverage of the build and compares it to the highest recorded code coverage. If it is less the build fails, yep fails. If it is higher then the highest recorded is automatically updated with the builds coverage. Being a CI environment any build box failure must be fixed immediately. As a result the code coverage can only go up.

So far this has been amazing successful, but then our team does practice TDD (well mostly).

The implications are that if you are committing new code you are responsible to ensure that your code is covered by unit tests (code coverage is only calculated from unit tests). This is something of a subtle move in responsibility as before it was acceptable to 'think' that the code was covered now we must 'ensure' that it is covered or the build will break within minutes of the check-in.

For this to work developer boxes were set-up so that each developer can run their own code coverage (before check-in) and view the added code for coverage (using NCoverExplorer) quickly and easily. I think that things being easy is really essential.

Like many things I've blogged about I'm really recording great ideas from the team or others. This is no exception (credit here to Nigel Thorne ... a wickedly good idea Nigel).

Coding Standards Without Having Coding Standards

Every developer likes a coding standard, so long as it is the same as theirs. :-)

Coding standards have benefit but only if accepted by the team. When I worked at Citect they had a strict published coding standard that had been in place for many years. It worked well and every developer complied. In other companies I've worked in have either not had a coding standard, I've implemented a documented coding standard, or the standard was 'copy the standard of the file you are working in'. But in the team I'm working in I've recently realised that a coding standard has been adopted by the team over the last few months without any documented standard, meetings, or negotiations. It just evolved effortlessly and has been accepted by all. The trick was automating the coding standard via Resharper's reformat code command. Nobody, well at least everybody but the implementer, even thought of it as a coding standard!

I can not take credit for this. In fact I was oblivious to it until I realised that we had a coding standard. Being automated meant that any/all files can be formatted with just a context menu command click. So easy, that it is attractive to everybody so everybody uses it. Resharper provides both a hint and positive feedback by a small indicator next to the editor window that goes green when the file is formatted to the rules you have set. It gives markers to lines that do not comply. So easy it is attractive and the good old green positive reinforcement.

Hmm ... are developers becoming conditioned to the green colour (red-green-refactor). Kermit was wrong, it is easy to be green.

Tuesday 16 October 2007

Web Cam Software

I'm looking for web cam software as part of our bushfire system. The idea is to enable us to view conditions at home from work. It would be great if we could view images via our phones.

I keep coming back to this so I created a wiki page to keep my notes here.

Sunday 14 October 2007

Cheap 1000L Tank Under The House

Bought a used 1000L water tank on eBay this week for $235 delivered. $0.23 per litre is cheap and it is just a perfect size to fit under the house. The photo shows the tank being pushed under the house.

I've positioned it so that the top of the tank is level with the overflow level on the existing barrels I have collecting rainwater (you can see one in the photo). So I only have to hook them up and they all act as one tank.

These tanks feed into a small automatic pressure pump which feeds a garden tap and a sprinkler via a solenoid controlled from the home control system. I put a float switch in one barrel just below the overflow level. This is also wired to the home control system so that when the tanks are full a garden sprinkler is turned on for five minutes. The idea is that if we do not have the capacity to store the water we might as well divert it onto the garden. Hence dry spots in the garden get a higher monthly rainfall. Since Melbourne gets rain every few weeks in summer I recon this will help the garden a lot.

Sociable Golly

A few weeks back Golly became the escape artist and kept finding ways next door to play with their new puppy. They got on so well that Golly is now in demand next door so the two puppies can play for hours. We took him in at about 8am this morning and picked him up at about 1pm. Apparently they just ran, rolled, and generally played for all that time!

Proud of him. He is a gentle but confident dog. Sue ought to take a lot of the credit. She insisted he go to puppy school and has also taken him to a nearby training school. The socialization is good, we can see the difference.

Wednesday 3 October 2007

Sue want a Mini Cooper

Sue brought a demo Mini Cooper home today. I took it for a drive up and down the mountain. While it is not a car from me (I do not like it) I can see why Sue loves it. It has an amazing safe feeling on the Mount Dandenong Tourist Road, it takes the bends with amazing confidence. Mind you, I've not a new car for some years but it does feel like it is stuck to the road.

What I did not like was the delayed power when using auto but when you do take the plung to manual it is much better. Thing is manual in the mini is kinda auot-manual as there is no cluch, the gear changes are via steering wheel pads, and the engine does take a fairly wide rev range. Manual mode is easier than it sounds. I also found it a bit noisy and rough, but then it seems to be designed for a more 'sporty' feel. Sue loves it.

So I can see the attraction ... but not for me thanks.