Saturday, 17 December 2011

Christmas baking

Christmas has always been one of my favourite times of the year. Probably because growing up, Mum would always be making yummy things to enjoy before, during and after Christmas day.

I wouldn't put myself in the same class as Mum, but I do like doing a bit of cooking too – particularly the sweeter recipes Smile

image

Here's some shortbread and mince pies that I made today. I think I should have cut the pastry for the pies smaller as it expanded a bit when it was cooked. Still tastes nice though.

Saturday, 26 November 2011

Is it worth going naked (2011)

Internode have just announced that for customers with existing ADSL2+ broadband, transferring to a Naked plan whilst keeping your existing phone number is now possible.

Just over a year ago I compared the costs, and decided it wasn't worth it. So has anything changed since then?

Current monthly expenses (Nov 2011)
Service Description Cost
Broadband Internode Easy-Broadband-Classic (50GB)* 47.45
Telephone HomeLine® Budget# 28.95
Total   76.40

* – 'grandfathered' plan no longer available to new customers. Price includes 5% discount.

# – HomeLine Budget plan activated before newer conditions were introduced which disallow non-BigPond ADSL providers, and also includes $6 to enable Caller Number Display.

This is almost the same as last year, with the only change being Telstra are charging $2 more per month than they used to.

Easy Naked monthly expenses (Nov 2011)
Service Description Cost
Broadband Internode Easy Naked Broadband (30GB)* 56.95
Telephone Internode NodePhone2-Special 0.00
Total   56.95

* – price includes 5% discount

Whereas last year I could have got 150GB/month, now for the same price now I'd get only 30! There's also a one-off setup fee of $79 (for 2 year contract) or $129 outright.

So all other things being equal, there's a saving of $19.45/month, but with the downside being 20GB less quota. So, could I survive on only 30GB/month? Well looking at the last 12 months, apparently not always:

Graph of monthly internet usage

The next step up is the 200GB plan for $75.95 with 5% disc included. This pretty much nullifies the savings. It's a pity they don't offer something between the 30 and 200.

The other thing I'd need to figure out is how this would work with my existing PennyTel VoIP account. As I understand it, my trusty old Sipura SPA 3000 only supports receiving calls from one VoIP provider, and I assume that would need to be NodePhone for the number porting to work correctly. A bit more investigating is required on this front.

Sunday, 6 November 2011

Cooking on Saturday

Yesterday I made some cupcakes. We'll enjoy eating these in lunches this week Smile

The trick is after you make them to immediately put them in the freezer (otherwise there probably wouldn't be any left!)

Tuesday, 1 November 2011

Springtime in the garden

Inspired by fellow .NET developer Bill McCarthy's occasional blog posts on his garden, here's some of the flowers blooming in our backyard at the moment.

Lavender, roses, snapdragons, roses, roses, sweet peas, geraniums/pelargoniums, hollyhocks, dianthus and more roses.

 

 

 

 

Yes, we do have a few roses - most of which are coming into bloom right now. Also a bit of work when it's time to prune them!

Thursday, 27 October 2011

Samsung Omnia 7 with firmware updates

Today there were new firmware updates from Samsung for my Omnia 7 phone.

Samsung Omnia 7
Component Original "Mango" Samsung Update
OS version 7.0.7392.0 7.10.7720.68 7.10.7720.68
Firmware revision number 2424.10.9.13 2424.11.8.2 2424.11.9.2
Hardware revision number 3.15.0.4 3.15.0.4 3.15.0.4
Radio software version 2424.10.19.12 2424.11.7.2 2424.11.9.1
Radio hardware version 0.0.0.800 0.0.0.800 0.0.0.800
Bootloader version 4.9.2.9 5.8.0.5 5.9.0.6
Chip SOC version 0.36.2.0 0.36.2.0 0.36.2.0

One thing I've noticed is that there's now "Internet Sharing" in the settings page (aka tethering). Nice to see that added, not that I'll necessarily use it.

Tuesday, 25 October 2011

Going Solar

14 of our 24 panelsEarlier this year I started thinking about whether we should invest in getting solar panels installed on our house. I'd seen a friend as well as my in-laws get them installed on their houses, and with our family power-bills not being an insignificant cost it seemed like now was the time to do it. Not to mention taking advantage of the South Australian government's Solar feed-in scheme

After getting a number of quotes, I chose Solar Depot to supply and install a 4.56 KW system ( 24 x 190W panels) with an Power-One Aurora PVI-4200 inverter.

Because of our roof orientation, they've been installed as two lots of 7 panels facing almost due north (see photo), and one group of 10 facing north-east. North is generally best, so the 14 panels should generate most over summer. In winter however they'll be shaded a fair bit of the day by trees, so my plan is for the north-east panels (which won't suffer shading as much) to pick up the slack. The inverter is able to take the two different voltages and combine them into one output going back to the grid.

A few weeks after the panels were fitted, our new electricity meter got installed. So now rather than just watch the dial spin backwards when the sun is shining, we are now selling electricity back to the grid.

Aurora InverterThe inverter turns out to be reasonably easy to get data out of too. The manufacturer distributes a free application that displays all the generation and running statistics. Physically, it has both USB and RS-485 serial interfaces. The USB sounds convenient, but it turns out that's not intended for end-users to use (pity). When I get a chance, it would be great to connect the RS-485 back to my Home Server virtual machine and maybe even write a plugin for Media Center to display our power generation!

This wasn't a cheap system (our mortgage seems to have taken a bit of a hit over the last few months), but the intention is that all going well, we won't have any more power bills to worry about for the foreseeable future.

Monday, 24 October 2011

Error deploying TFS Lab - TF259096

I've encountered this error a couple of times now:

Environment message: Type=Error; Message=TF259096: Team Foundation Server has stopped the following operation because of an internal error: Deploy environment. Additional information: Sequence contains no matching element. Try the operation again. If the problem persists, contact your system administrator.;

I'd added a new Hyper-V host to SCVMM 2008 R2 and was trying to deploy a lab to the new host. It failed with that error. There's a good thread in the Microsoft forums that gives the clue as to what's really going wrong. It turns out that TFS Lab Management doesn't support clustered Hyper-V hosts. Sometimes "doesn't support" means "well it might work, but don't call us if you have problems". In this case it means "No, it doesn't work".

If you run the "Visual Studio Lab Management Health Check" report from the TFS 2010 Best Practise Analyzer (part of the TFS Power Tools), you'll also get this error highlighted as "Host is part of a host cluseter" (sic).

Removing the clustered host from the TFS configuration isn't enough. It also needs to be removed from SCVMM too. Having done that, you should be able to deploy again.

Hopefully this limitation will be removed with TFS v.Next.

Thursday, 29 September 2011

Samsung Omnia 7 updated to Windows Phone 7.5

Last night I got notified that the RTM "Mango" update for Windows Phone was available. I'd been running the developer release of Mango for a few months, so there weren't any huge surprises. One thing that did happen though was some firmware updates from Samsung were also applied.

I'd made a note of the original version numbers so here's the comparison of what got updated.

Samsung Omnia 7
Component Original "Mango"
OS version 7.0.7392.0 7.10.7720.68
Firmware revision number 2424.10.9.13 2424.11.8.2
Hardware revision number 3.15.0.4 3.15.0.4
Radio software version 2424.10.19.12 2424.11.7.2
Radio hardware version 0.0.0.800 0.0.0.800
Bootloader version 4.9.2.9 5.8.0.5
Chip SOC version 0.36.2.0 0.36.2.0

Tuesday, 20 September 2011

Esther Duflo: Social experiments to fight poverty

We (Narelle, friend Jane and I) watched this TED video last year, and somehow tonight's conversation came around to TED talks and this one in particular. It took a while to find it (we were searching for "malaria", "mosquito" and "nets" on the TED site without luck as we'd remembered the bit about mosquito nets).

A most impressive and compelling presentation.

Sunday, 18 September 2011

A busy, but enjoyable weekend

It's been pretty full on in the Gardiner household over the last couple of days. We've managed to pack car-shopping, basketball carnivals, entertaining friends for tea on Saturday, and Church, car-cleaning and visiting friends for an extended afternoon tea today on Sunday. Perfect Adelaide Spring weather certainly didn't hurt. It's nice to be sitting down Sunday evening to catch our breath before the work/school week begins again tomorrow!

Saturday morning I left a bit earlier than normal to pick up my parents and head out to Nuriootpa (in the Barossa Valley) to check out a potential car to replace our trusty but outgrown Camry. The car in question is a 2010 Kia Sorrento Si (petrol). After test driving the current model the previous weekend I was impressed, though the price tag for the 2011 SLi diesel was a bit high for my budget (I felt a bit sad for the salesmen as their faces dropped when I informed them of that).

Searching around for used cars that didn't have too many kms on the clock had turned up this particular specimen. The challenge would be driving up to check it out and still get back home in time to take the kids to basketball.

2010 Kia Sorrento SiWe made good time (thanks to the new Northern Expressway) and after a test-drive I agreed to purchase the vehicle (subject to a satisfactory mechanical inspection).

Just enough time to visit the Nuriootpa Bakery before racing back down to Adelaide.

The basketball carnival was good fun, but sadly the team I coach had to be content with just participating rather than winning. There were a few close games, but it wasn't to be.

No rest yet – then racing back home to get ready for some friends coming over for tea. With Narelle cooking up a storm, it was a very enjoyable evening. Her Crème caramels were a particular hit, with some people going to extraordinary lengths to pry out the last bit of toffee left in the bottom of the dishes.

Sunday morning, and off to Church. Then some time at home to do a bit of gardening and clean up another friends car that we've been borrowing while she's been away on holidays.

Yummy afternoon teaThen just enough time to head around to some more friends who were celebrating a successful morning's participation in the City to Bay fun run. I think the kids (not to mention myself) thought we'd landed on our feet when we saw all the yummy things for afternoon tea. A wonderful relaxed afternoon.

ps. If you're looking for a well used but reliable car, I plan to selling the Camry in a few weeks time.

Sunday, 4 September 2011

TechEd 2011–Day 3

Having now completed my instructing and hands-on lab duties, I was free to immerse myself in the breakout sessions for the remainder of the conference.

Chris Walsh and Jake Ginnivan presentingI took in two Windows Phone sessions. Firstly – WPH305 - Multi-tasking and Application Services in Windows Phone 7.5 with Chris Walsh and Jake Ginnivan.

They delved into the new background agent and search integration features coming in the Windows Phone 7.1 update. I can see myself using the background agents as a way to download new data for my Aussie Toilets app. The search integration is also relevant. It would make sense to offer the nearest public toilets when someone is searching for a particular location.

Next in WPH307 - Analyzing and Improving Windows Phone Application Performance, I got to see Jeff Wilcox go through tips on improving app performance. Again, some ideas on how to improve Aussie Toilets, and Jeff kindly emailed me a code sample that I will make use of.

Fruit muffin and savoury muffin for morning teaAfter morning tea (a muffin and a muffin!), I battled the crowd to get a seat in DEV411 - The Future of C#: Good things come to those who 'await' with Joseph Albahari. One of only a few '400' level talks this year, Joseph delivered an impressive presentation on how easy it is to make your code work asynchronously with the new language features coming in C# 5. This was made even more compelling as he contrasted how difficult it was to achieve the same results without the new features.

WP_000117After lunch, on a whim I went along to SEC311 - SCVMM 2012 Network & Storage with Alessandro Cardoso. I've used SCVMM 2008 R2 in the context of managing TFS Labs, so it was interesting to have a look at the next version, but a fair bit of this talk went over my head.

WP_000121Finally the 'locknote' presentation by Norm Judah. I was a little disappointed with this, as I didn't think Norm really spoke about anything particularly new or revelatory. It was ok, but not riveting.

One lovely surprise today was getting an Amazon gift card email from Microsoft! Enclosed was the following text:

Thank you very much for your extraordinary effort and flexibility as a TLG at TechEd 2011. We are honored to have had worked with you.

That so was totally unexpected so I popped back in to the hands-on labs to personally thank Kim and Ronald (the lab organisers).

The second surprise was chatting to a fellow conference delegate on the way back to Brisbane airport. We were talking about Windows Phones, and when I said I'd written an app 'Aussie Toilets' he smiled and pulled out his phone and showed me he had it installed on his phone! A real buzz to meet someone who's using my app and likes it!

So TechEd 2011 ended on a positive note for me. I did enjoy my time doing the instructor and hands-on labs. I do like helping people learn new things work through problems they might be having.

Thursday, 1 September 2011

TechEd 2011–Day 2

One good thing about my hotel room – the shower is tall enough that I don't have to do the limbo to wash my hair. I've stayed in much fancier places that can't get that right!

Operations Manager 2012 - application error exampleFirst session today was another non-developer one – SEC306 Operations Manager 2012: New Features. This started off looking like it was going to be a "death by PowerPoint", but they finally got into some demos. Looks like a good tool, and they even showed what it can do for your in-house apps, so there was some developer interest after all (see photo showing example diagnostics from an app failure).

I then got to finally see the infamous Chris Walsh present WPH306 What's new for Windows Phone 7.5 Games Developers XNA and Silverlight.

Next up was my second Instructor-led lab – "Build Your First Windows Phone 7 Application". Again we had more interest than we could cater for. Great to get lots of positive feedback, especially on how easy it was to develop the applications using Visual Studio. Also, as this lab had to run on the PC hardware (because we were using the phone emulator), we had no complaints of slowness that have plagued the other labs.

After lunch, I just managed to get a seat to see Anthony Borton kind of present DEV309 Visual Studio vNext Directions. I say "kind of" as because of restrictions imposed by Microsoft, Anthony had to change his content at the last minute and rely on videos from Brian

Hands-on labsBack to helping out in the hands-on labs for the rest of the afternoon, except for the last bit, as I was asked to run a repeat of the "Microsoft ASP.NET MVC 3: Fundamentals" Instructor-led lab. A smaller group this time, but very keen and some good discussions on how they might adopt MVC for their web projects.

After this, the convention centre was transformed into the "fun factory", with different areas laid out with X-Box games, go-kart racing, table tennis, basketball and other stuff, plus lots of yummy food for tea.

Nice food for teaIcecreams for dessertSilly gamesXBox 360 Kinect - Star WarsGo-kart racingSome new friends?Shooting hoops

TechEd 2011–Day 1

View from motel roomA thundery wet night last night. Glad I brought my spray jacket, but even then I got pretty wet walking home. Wednesday morning the storm had gone and we were left with a beautiful clear day.
First up, I caught most of Adam Cogan presenting DEV316 - 15 rules to developer heaven. Some interesting thoughts on using addins for TFS to get better visualisation of progress (this will improve in v.next), and using screenshots or screencasts to verify work is "done". Also the idea of user stories including acceptance criteria.
Next was my first Instructor-led Lab – "Microsoft ASP.NET MVC 3: Fundamentals". It turns out this was probably one of the most popular labs of the conference, and unfortunately we had to turn a lot of people away.
After the lab, I checked out Rick Claus presenting SRV305 - Diagnosing the Diseases of DNS. Yes, my main focus is development but it can be useful to have some understanding of related areas.
After lunch, I caught Reid Purvis and Sashank Pawar doing DAT309 - Virtualising SQL Server with Hyper-V.
Yummy treats for afternoon teaTime for a quick bit of afternoon tea, then I was helping in the hands-on labs for the rest of the day.
Before heading back to the hotel, I enjoyed catching up with Narelle and the kids, and then my parents in two Skype conversations.
My youngest asked "would you like to come home Daddy?" – now that does tug at your heart strings. I'll be home soon.

Wednesday, 31 August 2011

TechEd 2011–Day 0

It was a very early start for me Tuesday morning, waking up at 4:15am in order to get to the airport for the 6am flight to Coolangatta via Sydney. (A big thanks to my brother-in-law David, who also got up early to give me a lift!)

The flights went smoothly. We were a bit delayed landing in Sydney, so I was in a rush to get to my connecting flight. It was a relief to discover that it was the same plane, so no risk of missing it or losing my luggage Smile

I caught the Gold Coast Tourist Shuttle from the airport to my hotel – probably half the price of a taxi and just as convenient.

WP_000090I'm staying at Ipanema Holiday Resort. At about 1.2km, it's the furthest I've been from the convention centre, but its a pleasant 10 minute walk so that's fine. Plus, as I'm paying for this trip myself, the price fitted my budget.

After registration, I had a "Technical Learning Guide" briefing meeting. It was good to see quite a few familiar faces from last year.

Something new this year was the addition of two "Kick-off" sessions preceding the keynote. I attended the "Developer Kick-Off", which included some highlights on Windows Phone, Visual Studio v.Next and Azure (specifically GreenButton's Pixar in the cloud service).

Audience at Keynote addressThe keynote was probably one of the better ones I have seen. It was hosted by Adam Spencer (ABC TV personality and pure math fan), who was great, and I'm only glad he didn't try and show us all the digits of the largest known prime number. He was joined by Jarod Green (creator of the Beached Az cartoons) and Jane Cockburn (Senior Product Manager at Cochlear)

I did think it was ironic that there were so many mentions from the keynote speakers of developing software, when in reality the 'developer' portion of TechEd has seemed to be sidelined in the last few years by the organisers.

WP_000099Following the keynote was a welcome reception, which provided some nice food for tea and my opportunity to grab a JetBrains Resharper T-Shirt.

About this time, the skies opened and The Gold Coast experienced a nice little tropical downpour, complete with lightning. I'm glad I'd brought my sprayjacket for the brisk, if slightly moist, walk back to the hotel room.

A phone call to the family to talk to Narelle and the kids, then a bit of work before turning in for the night.

Sunday, 7 August 2011

Watching PASS presentations on my Windows Phone

Anyone who works with SQL Server (including the database engine, integration services, reporting services and/or analysis services) should be aware of PASS – the Professional Association for SQL Server.

PASS run a number of events throughout the year. The largest of these is the annual summit, held in Seattle. This is widely regarded as the place to hear the world's best speakers on all things SQL Server related. It's no surprise that my old boss Rob is one of them!

If you can't get to Seattle then there's other options, one being the free "24 hours of PASS" online training days*. These are virtual events run through LiveMeeting, but depending on your local time zone if you don't feel like staying up into the wee hours, watching the recordings might be a better option.

First of all, if you haven't done so already, register as a PASS member (it's free). You'll then be able to attend the next 24 Hours of Pass (Sep 7-8), and also watch recordings of previous presentations.

Recordings are available as either a LiveMeeting presentation, or WMV streaming video. Watching these offline on my phone required a few extra steps:

First off, the WMV files are published using MMS:// to support streaming. This does make it difficult to save locally. I discovered that you can also access the same file using HTTP:// so that solved that issue.

Normally you can copy a WMV file onto your Windows Phone by selecting the file in Zune to sync with your phone. There must be something about the PASS videos that Zune didn't like, as it came up with an error C00D11CD (C00D1189). The suggestion for this is to re-encode your video.

So I fired up Windows Live Movie Maker, loaded the original WMV file, then saved the movie using the "Windows Phone" mobile device settings. The new file copied successfully onto my Windows Phone!

So if you see a guy on a bus commuting in Adelaide watching the occasional SQL Server video (to complement his regular collection of podcasts), chances are it could be me Smile

* – another great option is to get involved with your local PASS Chapter (mine being the Adelaide SQL Server User Group)

Update 7th August

The PASS videos I've seen are 940x528, 844x528 or 704x528, 2fps at 276kbps. Audio 16kHz at 16kbps.

If you use one of the default Windows Phone settings in Movie Maker, you'll end up wasting a lot of bandwidth – the videos are pretty much

I created a "Custom Setting" in Movie Maker with identical frame rate (fps) and kbps. I scaled the video down to better fit the Windows Phone screen size (800x480). The 940x528 went to 800x450, 844x528 went to 766x480, and 704x528 to 640x480.

Tuesday, 26 July 2011

Magic Tricks

There's been a few changes for me over the last couple of days...

On Saturday the basketball team I coach won their first game ever! These are young kids, most of whom are playing in their first season. They've been improving every week, but up until now we've found that we've struggled against the opposition. More often than not, the 'mercy rule' comes into play. When we are 10 points behind, the other team has to run back to their key, so at least we can dribble the ball down the court before they steal it and score againSad smile

But not yesterday! With the help of a fill-in player everything fell into place. Our shots were dropping, passes were being caught and before I knew it I had to do something I'd never expected I'd need to do – I called a timeout to tell my players that *we* were 10 points in front and that we now needed to run back to let the other team have a go.

It was a great feeling and so satisfying to see the surprised but happy faces of the kids.

The other big change for me was that Friday was my last day at LobsterPot Solutions. It's been great to watch LobsterPot grow from when I became Rob's first full-time employee to where it is now – as Adelaide (and now Melbourne's) preeminent SQL Server and Business Intelligence consultancy.

So what's next? I've decided to accept an offer to join MatrixGroup, and I'm looking forward to the new challenges this will present.

When I told my kids, they responded with "You're going to work for the Magic Tricks Group?"Smile Which allows me to indulge in my love of the Muppets by closing with a quote from The Amazing Mumford..

"A la peanut butter and jelly sandwiches!"

(which always seemed a very odd thing to have on your sandwiches until I learned that jelly was American for jam.. but then to me that's still an odd combination to have on a sandwich!)

Monday, 18 July 2011

DDD Adelaide 2011 in review

On Saturday we had our first DDD Adelaide conference, and I came away feeling very satisfied that I'd heard some great presentations and high hopes that this event can grow bigger and better next year.

Sessions

There were nine presentations squeezed into the day...

Introduction to iPhone/iPad development using Objective-C. Lama Chandrasena gave an overview of creating apps for iOS devices. Looking at the Objective-C samples made me glad I get to write WP7 apps in C# Smile

Creating Windows Phone apps with the Caliburn Micro framework. Some guy talking about WP7 development..

Cross Mono, cross platform for a Windows .Net developer. Cristian Prieto gave a good overview of the features and benefits of the Mono toolset and libraries. Even if you aren't wanting to do cross-platform .NET applications, there are still some useful bits of Mono that you can use for your Windows deployments too.

Case Study: Design Patterns for a Row Versioned Data Warehouse in SQL 2008 R2. Jeremy Huppatz gave an interesting presentation on some of the challenges he faced in developing a data warehouse for one of his clients.

Easy Web Deployment – Begin the Enjoyment. Despite his laptop not being very obliging, Malcolm Sheridan spoke about the various tools available to ease deployment of web applications and SQL databases. I've used a lot of these myself, so could identify with many of the points Malcolm made.

Kinect. This talk didn't even have an abstract when it was up for selection, and yet just the title was enough for people to vote it into the conference. Lewis Benge gave a thought-provoking talk and demonstration of using the just-released Kinect for Windows SDK.

This is the only video I took of the day. The funny bit at the end is when the stick figure 'explodes', as Lewis walks out of the view of the Kinect sensor Smile

Looking behind the curtain of jQuery. Jared Wyles knows his JavaScript and jQuery inside out. By the end of Jared's talk I was left in no doubt of this! Some good tips on improving your JavaScript performance too.

Beyond Branding. Paul Turner spoke about branding SharePoint sites. I didn't realise you could use PowerPoint to create a theme for SharePoint 2010. Would have been nice if Paul could have been around for longer than just his talk.

Joins, SARGability and the Evils of Residualiciousness. If you want someone to wrap up a conference with what can sometimes be the most difficult slot of the day (eg. the last one), then look no further than Rob Farley. What Jared is to JavaScript, Rob is to T-SQL. Some great pointers on understanding SQL Server query execution plans and realising that sometimes there's more than meets the eye to an execution plan that on the surface may appear to be optimal.

A few of us headed over to Marcellina's for a nice pizza and good conversation to finish off the evening.

Thanks

Thanks to Peter Griffith for organisation, Lewis Benge for the free lanyards, laptop covers and magazines, and other interstate speakers for their support.

Looking forward

I was really pleased with the turnout. I'd have to check with Peter but I think the attendance was one of (if not) the best we've had for these kinds of events. We're smaller compared to Sydney or Melbourne but I'd love to see this build up so that we can run at least two tracks next year. That would be pretty tricky to do all on our own, but if we can work with the other state's DDD events then I think it will be possible for us to benefit from things being organised at a more national level.

DDD?

And in case you're wondering, 'DDD' is short for 'Developer! Developer! Developer!' and comes from a speech Steve Ballmer (Microsoft CEO) made at a software developer conference a number of years ago.

Saturday, 2 July 2011

DDD Adelaide 2011–The votes are in, registration is open

Just in case you missed the news, voting has closed and the the sessions as voted by you are now listed on the DDD Adelaide site.

Now we just need you to register to let us know that you'll be there on July 16th. While you're at it, please spread the word with your colleagues. We want as many people there as possible!

Register via EventBrite or ACS, and I'll see you there!

Monday, 13 June 2011

DDD Adelaide 2011–Voting is open

The session proposals are in and listed on the DDD Adelaide website.

It's now up to prospective attendees to vote for their favourite sessions, so we end up with the topics you want to see!

Review the sessions, and then vote via the survey now!!!

Voting closes midnight 23rd June (attendee registration will be available from the 24th).

Thursday, 2 June 2011

DDD Adelaide 2011

Mark this in your diaries – the "DeveloperDeveloperDeveloper Adelaide" conference or ("DDD Adelaide" for short) is going to be on Saturday July 16th.

Following in the footsteps of DDD Melbourne and DDD Sydney, we hope that the Adelaide event will mirror their success!

Suggestions for speakers and session topics are currently being accepted (Go to www.dddadelaide.com for details), then following the DDD model, the list of topics will be available to vote on to decide the final list.

It will be held at UniSA's City West Campus.

Finally, an case you were wondering this is the successor to CodeCampSA.

Monday, 23 May 2011

Turn on "Warnings as Errors" for all projects in a solution

It's a habit of mine to always try to address any compiler warnings, as more often than not a warning is an indication that something is wrong with your code (even though it is still may be compilable). One way to ensure this is to make warnings cause a build to fail (just like errors do).

For a single project, you can turn this on within the Build tab of the Project Properties page:

Treat warnings as errors in Project Properties

If you have a large solution with lots of existing projects, this can be a bit tedious so I wrote a PowerShell script to automate the process. It finds all C# projects, and for each .csprof file updates every configuration block found and adds a new <TreatWarningsAsErrors> element. (If you don't use TFS then just comment out the line that calls TF.EXE)

 

Get-ChildItem -Recurse -Filter "*.*csproj" | % {
    Write-Host $_.Name
    
    $filename = $_.Fullname
    
    $proj = [xml]( Get-Content $_.Fullname )

    $xmlNameSpace = new-object System.Xml.XmlNamespaceManager($proj.NameTable)

    $xmlNameSpace.AddNamespace("p", "http://schemas.microsoft.com/developer/msbuild/2003")
    
    $nodes = $proj.SelectNodes("/p:Project/p:PropertyGroup[@Condition and not (p:TreatWarningsAsErrors)]", $xmlNameSpace)
    
    $touched = $false
        
    $nodes | ForEach-Object -Process { 
        $e = $proj.CreateElement("TreatWarningsAsErrors", "http://schemas.microsoft.com/developer/msbuild/2003")
        $e.set_InnerText("true")
        $_.AppendChild($e) | Out-Null
        $touched = $true
    }
    
    if ($touched) {
        Write-Host "Checkout $filename"
        & "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" checkout $filename | Out-Null
    
        $proj.Save("$($filename)") | Out-Null
    }
}

Wednesday, 18 May 2011

Checking build durations over time

I've written a PowerShell script to iteratively grab changesets from TFS, and do a build of the solution from that changeset. For each build I record the time taken. This is useful if you think builds are taking longer than they used to and you need some quantitative evidence. You can save the output to a CSV file and open it up in Excel to display a pretty graph etc.

To use the script, you'll need to have installed the Team Foundation Server Power Tools which include PowerShell cmdlets for TFS.

# Iteratively build changesets from TFS to measure build speed
#
# Run this from a folder that is mapped as the TFS workspace

# Load VSVARS.BAT (From http://blogs.msdn.com/b/ploeh/archive/2008/04/09/visualstudio2008powershell.aspx)
function VsVars32()
{
    $vs100comntools = (Get-ChildItem env:VS100COMNTOOLS).Value
    $batchFile = [System.IO.Path]::Combine($vs100comntools, "vsvars32.bat")
    Get-Batchfile $BatchFile
}

function Get-Batchfile ($file) {
    $cmd = "`"$file`" & set"
    cmd /c $cmd | Foreach-Object {
        $p, $v = $_.split('=')
        Set-Item -path env:$p -value $v
    }
}

VsVars32

# Get changeset history since 1-Jan-2011 and checked in by me
$history = Get-TfsItemHistory "$/Project/Branch" -Version "D01/01/11~" -Recurse | Where-Object { $_.Owner -eq "DOMAIN\username" }

# Process changesets from earliest to latest
[array]::Reverse($history)

$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"

$history | % { 
    & $tf get /version:C$($_.ChangesetId) /Recursive /Overwrite /NoPrompt 2>&1 | Out-Null

    # clean first
    & "msbuild.exe" /t:Clean /noconlog /v:q /nologo 2>&1 | Out-Null
    
    # build
    $duration = Measure-Command { & "msbuild.exe" /noconlog /v:q /nologo  }

    if ($LastExitCode -eq 0)
    {
        Write-Output "$($_.ChangesetId), $($duration.TotalSeconds)"
    }
    else {
        Write-Warning "$($_.ChangesetId) build failed"
    }    
}

Monday, 9 May 2011

Visual Studio network performance with TFS through a VPN

I've been accessing a TFS server remotely through a VPN connection. I'd noticed that the performance was not that great, and then discovered this suggestion to specify the defaultProxy element in the devenv.exe.config file.

That worked pretty well, but I noticed that things were still a bit sluggish, so added a bypasslist element too, to ensure that anything on a 192.168.0.0 network doesn't use the proxy either. That's working nicely now.

<?xml version="1.0" encoding="utf-8"?>
<system.net>
   <settings>
     <ipv6 enabled="true"/>
   </settings>
   <defaultProxy enabled="true" useDefaultCredentials="true">
     <proxy bypassonlocal="True" proxyaddress=http://proxy-server:8888/>
     <bypasslist>
       <add address="192\.168\.\d{1,3}\.\d{1,3}" />
     </bypasslist>
   </defaultProxy> </system.net>

Wednesday, 4 May 2011

Updating multiple lines in Visual Studio project files

A while back I blogged about how to change text from a single line in a Visual Studio project file. What about when you need to replace a number of lines of text? This worked for me:

$regex = new-object Text.RegularExpressions.Regex "\<Target Name=`"AfterBuild`"\>.+\</Target\>", ('singleline')
Get-ChildItem -recurse -filter "*.*proj" | % { $text = (Get-Content $_.FullName) -join "`r`n"; $regex.Replace($text, "<Import Project=`"`$(SolutionDir)\Module.targets`" />`r`n") | Set-Content "$($_.FullName).tmp" }

We have to do a little more work compared to the first approach. We need to join all the individual lines into one single line so that the regex will operate correctly. Because we want to set options on the regex, we create that separately too. Note that the above example writes to a new .tmp file, so you can confirm the replace is working properly before overwriting the original files.

Project files are just XML files, so this technique should work for any XML file.

In my case, the solution was checked in to TFS, so the project files will need to be checked out before they can be updated. The checkout can be incorporated into the pipeline like this:

Get-ChildItem -recurse -filter "*.Service.*proj" | % { & "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" checkout $_.FullName; $text = (Get-Content $_.FullName) -join "`r`n"; $regex.Replace($text, "<Import Project=`"`$(SolutionDir)\Web.Module.targets`" />`r`n") | Set-Content "$($_.FullName).tmp" }

References:

Tuesday, 26 April 2011

Assuming culture

I've just had an interesting bug report for Aussie Toilets. The stack trace starts with this:

System.Reflection.TargetInvocationException: TargetInvocationException ---> System.FormatException: FormatException
à System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider)
à Gardiner.PublicToilets.Services.DataService.<LoadManifest>b__3(XElement x)

There's a small clue there, but the other big hint was the user's regional setting:

Culture: fr-FR

It turns out in a number of places I'd been assuming the default number format, particularly instances of Decimal.Parse(), Convert.ToDouble(), and the popular String.Format().

So if you're in France, you'd be used to seeing "123.49" written as "123,49". The bug in the application was that the data being read was originally formatted in the former, but with the user's regional settings set to 'French (France)' the parsing methods were assuming it would be formatted as the latter.

I've resolved the problem in this instance by explicitly specifying the InvariantCulture, as the data isn't displayed to the user. If it were intended for user display, then allowing the user's regional settings to influence the display would be quite appropriate.

FxCop (aka Visual Studio Code Analysis) will warn you about these kinds of issues, specifically CA1305 – Specify IFormatProvider. I've changed this warning (and a few others) to an error to ensure I don't get caught by it again.

Visual Studio Code Analysis Settings - changing warnings to errors

Expect Aussie Toilets v1.4 soon!

Sidenote

When I first started working on Aussie Toilets, I was doing it from the perspective of a parent who has had first-hand experience trying to find a public toilet for a young child. I hadn't really considered another market for the app might be the overseas visitor. Maybe I should consider providing translations for some of the labels for these users too.

Thursday, 21 April 2011

Aussie Toilets app v1.2

'Aussie Toilets' version 1.2 is now available in the Windows Phone marketplace. This is my Windows Phone 7 app that shows the nearest public toilets to your current location.
wp7_278x92_blue
The latest release includes the April 2011 dataset, and significant performance improvements. Specifically, toilet locations should load almost instantly. So now if you're in a hurry to find the nearest public toilet, you'll be relieved (ha ha) to know you won't be kept waiting any longer than necessary.
I'm quite chuffed that 'Aussie Toilets' is currently sitting at no. 3 in the top selling apps of the 'Navigation' category in Zune. Not sure if this is just for Australia or global. So far I've had over 1,200 downloads, which isn't too bad at all.
PS. I have received a bug report from an Austrian user of Aussie Toilets – turns out I hadn't tested the app outside Australia! This may explain an issue I had with getting 1.2 passing the Marketplace requirements (as I assume the testing would be taking place in North America). So expect v1.3 very soon!

Update 24th April, 3.30pm
Version 1.3 is now available in the marketplace

Monday, 18 April 2011

The big Four Zero

Today I am 40 years old!

I know this because as you can see the in the photo below, I'm wearing a badge (made by my daughter) that says "40 years old" Smile

Photo of David wearing a '40 years old' badge

Yesterday I celebrated the occasion with family and friends at a picnic lunch in Belair National Park. The weather couldn't have been better and I think everyone really enjoyed themselves (I know I did).

Extra special thanks to my lovely wife Narelle who worked very hard to make it a fantastic day, Narelle's Mum & Dad for decorations, barbecue knowledge and other help, my Mum and Dad for having me in the first place Smile, my sister Fiona for putting together a wonderful birthday scrapbook, and my kids for helping with the games.