Tuesday, 9 December 2014

Old new things for ADNUG

For the longest time, updates for the Adelaide .NET User Group (ADNUG) were sent out by email. Then around 3 years ago the transition was made to use LinkedIn Groups. There’s currently over 200 members there.

Earlier this year, I created a Twitter account for the group. Follow @AdlDNUG

A lot of user groups are also moving to Meetup to help coordinate their events. A few weeks ago ADNUG signed up, so you can now join https://www.meetup.com/Adelaide-dotNET/ and register to attend our events there.

More recently I was wondering what happened to the old email list. Hopefully most made the switch to LinkedIn – but maybe some didn’t bother, so I figured it might be worth firing up the list again just to see if it would help get the word out a bit further. Using MailChimp, I now have the email list running again. I plan to send out an email about once a month with meeting news and other relevant info. If you’d like to subscribe, click here.

Finally, after catching up with the ADNUG organising team today, I decided we should also be on Facebook. So if you like ADNUG, you can now share that fact with your friends!

By the way, our next meeting is this Wednesday 10th December, 6pm at Marcellina Adelaide. David Rogers will be presenting on the MembershipReboot library and claims authentication. Register now!

Looking ahead, as I mentioned in the email that went out a couple of days ago, I’m hoping to get some US-based Microsoft speakers to do virtual presentations next year. Just because we’re in Adelaide shouldn’t mean we can’t get access to great speakers where ever they might be – home grown, interstate, or even overseas.

So now there's lots of ways and lots of reasons to keep up with what's happing with .NET in Adelaide!

Thursday, 20 November 2014

Testing for Exceptions with NUnit

I’ve been aware for a long time usual way of writing a unit test with NUnit that expects an Exception to be thrown is to use the ExpectedExceptionAttribute on the test method.

[ExpectedException(typeof(ArgumentException)]
[Test]
public void Test()
{
    var sut = new ThrowUp();

    sut.DodgyMethod(3);
}

I hadn’t noticed that around the release of NUnit 2.5, an alternative was added. The Assert.Throws method allows you to be specific about which bit of code in the test should be throwing an exception.

public void Test()
{
    var sut = new ThrowUp();

    Assert.Throws<ArgumentException>( () => sut.DodgyMethod(3) );
}

I think it’s a good improvement, and makes it a bit clearer where the exception should be coming from.

Tuesday, 11 November 2014

ADNUG November–Azure for Developers

With the recent announcement that Azure now has two data centres located in Australia, I thought it was appropriate for the Adelaide .NET User Group (ADNUG) to spend some time looking at what’s involved in hosting your applications in the ‘cloud’.

The session will review what features Azure offers, and then we’ll step through hosting a simple web application and then scaling it up and out.

Register at http://www.acs.org.au/branches/south-australia/events/upcoming-events/event-details?eveID=10310633303016

Wednesday 12th November 2014 at 6.00 pm at Marcellina Adelaide (273 Hindley Street, Adelaide)

6.00 Pizzas and Networking
6.20 What’s New (Ryan Spears)
6.40 A Developer's guide to Microsoft Azure (David Gardiner)

Look forward to seeing you there!

Saturday, 25 October 2014

In the garden–Spring 2014

Not a lot of veggies planted at the moment. It has been an unusually warm spring so far. This week we had one day that got up to at least 36°C. That's more common for January than October.

Globe artichoke
A globe artichoke that Narelle planted last year has shot up again.

Lemonade fruit
The lemonade tree has been been very productive again. There's still a few fruit left. We've made quite a lot of juice this year.

Cabbages
These cabbages are growing well, though the cabbage moths (well actually their caterpillars) are doing their best to get in first.

Tiny lime fruit
We planted a lime tree a couple of years ago. It doesn't like our cold winters, but now the weather has warmed up it has put on a fresh lot of leaves. I'm hoping this tiny fruit will stay on the tree and grow to full size!

The roses are having their first bloom after winter. They are looking very colourful.

Roses in bloomPink standard rosePing roseIceberge rosesPink rosesYellow rosesDSC_4040DSC_4038DSC_4039

 

Lavendar flower with beeBearded iris flower
Lots of lavender and bearded iris are also flowering. The bees really like the lavender.

Plenty of weeding to do at this time of year too – but I'm not going to take photos of those!

Sunday, 12 October 2014

A healthy start

This week was my first working for RL Solutions, a software company which provides solutions for the healthcare sector. RL have their main office in Toronto, Canada (checkout the pictures on their careers site). I couldn't find a bus that would travel that far each day, so (sensibly) I've joined the development team based in their Adelaide office.

Backpack with RL Solutions logoI get the impression from the four interviews I had before being offered the position (including with Sanjay, the founder and CEO) that RL have definite ideas about the kind of people they want to hire (not just looking for technical expertise). One of the things that appealed to me was the approach RL is taking in creating a modern, mature, healthy, fun and social work environment. That seems to manifest itself in a number of ways (some just relevant to Toronto or Adelaide and some in common) and I think it's a really positive thing.

My first few days have been spent getting to know the other Adelaide staff (helped in no small way by going out to lunch together on my first day), working through the company's induction programme (they are pretty organised around this), and starting to familiarise myself with the application and codebase that I'll be calling home.

I will also say it is nice to work in a modern building again – one where you don't have nagging doubts that the lifts will deliver you to the floor you requested, and that (a bonus for occasional bike commuters) has shower facilities! I'm still in the CBD though, so no changes to my daily commute.

A nice surprise was the 'welcome' pack waiting on my desk on my first day – including a company-branded backpack.

It's going to be an interesting time, especially learning a whole new business (hospitals etc.) – quite a contrast to my previous industry areas of commodity handling and higher education online teaching and learning. It might prove quite useful to be married to someone with a nursing background, not to mention that our family seem to be rather regular consumers of the health system!

I'm looking forward to it Smile

Saturday, 27 September 2014

The Grand Final

Riders having a break on the way to Outer HarbourYesterday was my last in the office at Eka (formerly MatrixGroup). It was great to catch up with everyone one last time after just over 3 years being on staff. A few final handovers, farewell lunch, attending and presenting at my final Developer meeting and monthly company meeting. I'll miss working with the people there, but I'd decided it was time to move on.
In the meantime, I'm taking a short break. Time to relax, get some kms on the bike, enjoy Adelaide's beautiful spring weather, one or two jobs around the house and do some family things for the first week of the school holidays.
After that I'll be starting something new – more about that in a couple of weeks time!
The photo is from my ride on Tuesday with the Mud, Sweat & Gears blokes heading to Outer Harbour. That turned out to be a handy 93km round trip! I must be doing ok as I pulled up pretty well. It is pretty flat for most of the ride, which probably helped.
(Oh yes, it's also the AFL Grand Final today)

Friday, 19 September 2014

Beware of Invoke-WebRequest in PowerShell DSC

PowerShell has a handy cmdlet named Invoke-WebRequest. I was making use of this in a Script resource as part of a DSC script.

The weird thing was that most of the time it worked, but sometimes the DSC script hung, and as best I could tell, it was within the Script resource that was calling Invoke-WebRequest, but I couldn’t understand why.

Eventually on one particular server, I was able to cause something surprising to happen – calling Invoke-WebRequest caused a modal dialog to appear. The interesting thing was that the server had Internet Explorer Enhanced Security Configuration enabled. Not surprisingly that’s the default for Windows Server.

I posted a question to Stack Overflow and a comment added to the answer made me realise what is actually going on.

I had naively assumed that Invoke-WebRequest is just a nice wrapper around the .NET Framework’s WebClient class, but it turns out it is a bit more than that. It also appears to reference IE-related code.

If you're curious as to what Invoke-WebRequest actually does, then fire up your favourite IL decompiler and point it at C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll (that's the path I found the full assembly at).

While the implementation of Invoke-WebRequest actually uses System.Net.WebRequest, it also creates an instance of the IHTMLDocument2 COM object, and I suspect this is the trigger that causes the IE warning to appear.

So if you just want to hit a web address without requiring all the extra features of IE processing, just call either WebClient or WebRequest directly from PowerShell, or Use Invoke-WebRequest but probably not in a 'headless' environment.