December 2005 - Posts
yesterday (boxing day) I woke feeling rather lazy, no doubt something to do with the previous days xmas celebrations and all that lovely crayfish and prawns and xmas cake [;)] So I deciced it might go for a bike ride. I had bought myslef a new bike for my birthday a couple of months ago but hadn't really had a chance to ride it much due to weather and work, in fact, only 3 x 40 km rides and 4 x 25 km rides. But i really wanted to at least try a 80 km ride up the ridge to Beech Forest. So I did [:)]
The ride, is the Old Beechy Rail Trail, which generally follows the track the old narrow guage train use to take. It's a gravel track that goes through some beautiful bushland and forest, and even goes over a waterfall as you near the ridge. The bit of the track I hadn't riden before was the Gellibrand to Beech Forest line. That part is about 20 km and climbs from about 250' to 1750' (or about 1500 feet climb). Most of it is a slight gradient only getting steep in a couple of places where the trail leaves the old train line. I found myself in mid gear range for most of it.. but the long duration of a slow hill climb really made me feel for the poor old little engine that use to do it .. I was already 20km in on my ride when I started that stretch long hill climb, and at times I kept myself going with a "I think I can " [;)]
One thing to remember as you climb that 1500 feet or so is you get to ride down it again [:D] So make sure you enjoy the view on the way up, cuase on the way down you'll be going too fast to !
Seriously, it's a great ride. Unfortunately for me it ends with another leg of about 20 km with about 1000 feet or so of hill climbing, but if you wanted an easy ride I would recommend a drive to Gellibrand and ride from there up to Beech Forest or Dinmont. Dinmont is only 14 k from Gellibrand and really that's the best part of the trail. The ride from there to Beech Forest is actually along gravel roads not the old train line. In anycase it's basically all up hill, so you can ride till you are feeling a bit tired in the legs then turn around and enjoy the downhill :)
oh, just be aware the trails are softish gravel, in places large road base, other places dirt. so you don't need serious mud tyres, but you definetly don't want to be on a road bike either.
I often joke with friends about the Elvis impersonators in regards to
C#. Why? Well because C# was marketed much to its original code
name of "Cool", the new cool language. And if you are a crappy programmer
all the better. You could walk away from any previous code, and "pretend" to be
cool. Sadly for C# this has meant it has attracted probably the worse of all
programmers to it.
What's even funnier, is these are also often the loudest anti VB
advocates. You can imagine I've encountered many of them over the years,
and time after time they were just espoulting their own ignorance. Time
after time they in fact did not know what they were talking about. And
sure enough, here's
the latest rendition...
Unbelievable huh ? The "code
monkey" tests code performance inline in one method based on ONE
iteration. I mean seriously, the guy obviously has no clue. No self
respecting developer/programmer would ever do that. Oh but that's not the
cruncher. The real cruncher comes when he shows how cool he is and reads
the IL.. or NOT. No seems blunder brain can't tell the difference between
managed code and unmanaged code. Unbelievable. Get this.. he
claims "calling into old VB6 libraries using COM
Interop". As Cory says,
what a load of crap. The guy is totally clueless.
But wait.. it gets even better. Next another C# elvis
wannabe impersonator quotes the "code monkey" as his source of proof.
yep that'd be the evlis's jumping out of the plane together without a
parachute. Talk about lemming syndrome.
Of course not ALL C# developers are like these two bozos. But many
are. And what's worse is they have blogs, but never listened to their
mummas when told to think before they opened their mouths. Morons and
Lemmings .. <sigh>
If you're lucky enough to have one of the team editions of Visual Studio 2005, you've probably got unit testing built in (well unless you've got the architect version). I must admit, I'm not big on test driven development, but I do like code testing and LOVE code coverage. So a fun thing you can do with code coverage is actually run your windows app, and see what code gets "touched". It's a good way to exercise the UI.
Here's how you do it in VB.NET 2005...
I'm assuming you have Vb's application framework turned on. In which case VB generates a Shared Sub Main for you at compile time. this is the method you want to have your unit test call. Problem is, the unit testing won't do that because the Sub Main is compiler generated... but' there's an easy trick to get there. What I do is from the Project properties, Application tab, click on the View Application Events button on the bottom of the screen. Next add the following code:
Private Shared Sub Main2(ByVal args() As String)
Then right click on the procedure and select Create Unit Tests, and make sure you turn on code coverage. That's it. you're ready to run.
Run the tests, work that UI and see how much of your code gets covered. Ideally the only things not covered will be the exception handling code, in which case you can then devise scenarios to test that too. Reviewing what parts of your code actually get hit has never been so easy. Enjoy
If you don't want to leave that Main2 in your code, you can easily modify the code that is in the VSCodeGenAccessors, changing Main2 to Main. In particular where it uses reflection.