Edmonton IT Blogger Roll
RSS
 
Fall events

It seems that every spring and fall the developer world seems to ramp up and developers around the world flock to conferences and user group events.  For me this usually means I'm out and about for the better part of 2 months straight.  If you're interested, here's my schedule for the next couple of months.  Some I'm speaking at (presentations listed) and others I'm just an attendee.  Either way, if you're going to be around at any of these events shoot me a note and we'll hook up for a drink and conversation.

October

16th @ 7pm in Victoria BC -- Victoria .NET Developer Association -- ORM Fundamentals 

20th in St. John's Nfld -- St. John's .NET User Group -- TBD

21st in Halifax NS -- DevEast -- The Big OO

22nd in Moncton NB -- DevEast -- The Big OO

23rd @ 7pm in Fredericton NB -- Fredericton .NET User Group -- The Big OO

30-31 in Austin TX -- KaizenConf

November

10-14 in Barcelona -- TechEd EMEA

December

1-5 in Montreal PQ -- DevTeach -- ORM Fundamentals, Refactoring to Logical Layers, Fluent Interfaces

Posted on 10/6/2008 6:05:52 AM by The Igloo Coder
Justice Gray's NHibernate War Stories: Don't Use Int If You Mean Enum
NHibernate and Our Army At Love
Trust me, if the war stories were like this NHib would be a *lot* more widely adopted


Trust me.  I've been there, I've felt that pain, I've even debugged the NHibernate source to figure out what the heck was going on.   Please, I beg of you, tell my tale to those who ask, tell it truly...and let me be judged accordingly!  And let me tell you, this Hamlet quotation is appropriate because going through this problem will make you feel as if your mom just slept with your uncle.  Do I take NHibernate difficulties too seriously?  Maybe.

Anyway, some of you NHib rookies out there might think that if you have an enumeration, it's easy enough to just map it to an int for DB storage, like the following:

namespace J
{
    enum JusticeCharacteristics
    {
        Sexy,
        Sultry,
        Seductive,
        *Sassy* // This is fake code homeboy!  I can use whatever characters I LIKE!
    }
    
}



and then in the mapping file put the following for a class using the JusticeCharacteristics in a property called "Characteristics":
<property name="Characteristics"
              column="JusticeAppeal" type="Int32" />

Bold in this case stands for THIS WAY LIES MADNESS.

You see, when you do something like this NHib tries to map back and forth between two different types - the moment you retrieve the object from the database it is marked as "dirty" and thus you will get an automatic update call every time you close the NHibernate session.  Trust me, nothing is more confusing than profiling your application and noticing that you've got random update calls firing every web request!  Certainly a very confusing and time-intensive operation, made quadruply so when a himbo like myself is trying to figure out what destruction our team has wrought! 

The solution to this problem is actually pretty simple - just use the enumeration type as the mapped type:

<property name="Characteristics" column="JusticeAppeal" type="J.JusticeCharacteristics" />

Italic in this case stands for YOU ARE NOW AN NHIBERNATE NINJA.

Given the skew of the audience that reads this blog, I fully expect:
  • 99.999999999999999% of you read this post and thought, "Thanks for sharing something completely obvious" (trust me, it won't be the first time)
  • 0.0000000000000001% freaked out and raced to their production application and now have me to thank for saving their system performance
  • one of you doesn't even know what NHibernate is, but that's okay Dad! I'll explain it to the entire family over dinner this Christmas!
Posted on 10/5/2008 9:08:06 PM by justice.gray@gmail.com (Justice)
Anonymous Access to SVN Repository for IglooCommons

I've had a problem with the anonymous access settings for my VisualSVN installation that is hosting IglooCommons.  It just didn't work without prompting for credentials.  Understandably, no one seemed to care until the other day when Sebastijan shot me an email claiming that he wanted to take IglooCommons for a spin.  Interestingly, Rob posted a fix for my problem on the same day, saving me the pain of having to figure shit out on my own.

So now, IglooCommons has been released to the masses!  I expect the race to download to be tantamount to a snail race!

Posted on 10/5/2008 1:15:17 PM by The Igloo Coder
Exclusive Photo!

After digging deep into the seedy underbelly of the .NET community, I managed to get some details on the PDC conference and TechEd Europe.  My sources having survived a hectic rickshaw chase through the streets of Balzac managed to get to me their precious, illicit cargo.  In their possession was a photo, a photo I thought some .NETters would find interesting.

Below are Don Belcham (left) and James Kovacs (right) trying out one of the possible uniforms for their tour of duty as a elite JetBrains booth babes while at these events.

JetBrainsBoothBabes1



Tom Opgenorth  ...
Posted on 10/4/2008 3:19:10 PM by
Ruminations

Today was my last full time day on this contract.  Tomorrow I start up full-time with another.  Personally, I've gotten in the habit of looking a my past contract and conducting my own personal retrospective on what I learned or how I would do things differently.  I figured that because my memory is getting worse in my old age, I'd started putting these things down on my blog.

For a greenfield project, don't use the database someone hands off to you

The project I was working on was greenfield - almost.  The business analyst spent a lot of time and effort gathering requirements, and this spilled out into him creating the database for us.  On the surface, to most people, this seems like a good idea.  In reality, I'd rate it slightly above mixing nuts and chewing gum for a snack.  Why do I say that?  Because, the database schema that was handed to me was highly normalized and (so I was told) optimized for reporting purposes - at the expense of the application.  This application was more like an order-entry system, with snapshots of the data at points in time being very relevant.  This "...optimization for reporting..." cause a lot of unnecessary work on the part of us poor developers.

The argument of "...the schema is this way to make reporting easy..." doesn't fly with me.  First off, we don't have any reports defined.  In fact, reporting wasn't within the scope of this project.  So, why are we worrying about it?  Secondly, if a certain schema was necessary for reporting, then that is where views and stored procedures come into play. 

I very much wish that we would have said, "Thanks for the effort, but we will create the schema we need to delivery the product.". 

Lesson learned for future projects:  Greenfield projects should not accept databases designed by someone who has no stake/input/authority on the application architecture.

People are inherently obsessed with local optimization at the expense of the whole.

One example of this I've already quoted:  effort was expended to create an academically pure database that would be good for reporting.  This local optima cost the project in the whole, because it incurred extra effort in developing the application.

A second example in support of this claim is a touch more elusive.  I witnessed a fair bit of "requirements dickering".  Rather than looking at the project as a whole and trying to get the most bang for the buck (this project had a hard limit on dollars, but not on time), a lot of time was spent on arguing requirements.  There was a perception that unless everything that was in the requirements document was done, "professionally" tested, and properly signed off, the application as a whole was not useful.  It seemed that everything was important and had to be done.  This obsession with getting everything done was, in my opinion, getting in the way of getting things of value done.

To misquote Napoleon:  he who defends everywhere defends nowhere.

Lesson learned for future projects:  Really to me, this experience did provide more anecdotal evidence supporting the Agile Manifesto and agile techniques.  Being a lowly contract developer, I was in no position to dictate priority or importance of work.  I'm kind of used to that as a consultant.  My opinion and advice was provided and the project leadership did with it what the wanted.  However, the process did open my eyes a lot.  I hope that if I ever find myself running the show in similar circumstances, I have the wisdom and the patience to see the big picture, and not the black and white words of some document written almost a year ago.



Tom Opgenorth  ...
Posted on 9/30/2008 7:43:08 PM by
Expected Downtime

Looks like I'm getting a new static IP this week, so if you can't reach my site on Oct 3 , well now you know why.



Tom Opgenorth  ...
Posted on 9/29/2008 11:25:22 AM by
A HA HA HA HA HA HA HA HA HA HA HA HA HA HA
I rarely if ever do this but...

I told you so.

I TOLD YOU *ALL*!!!

At last my brothers in arms, we are *VINDICATED*!!!!

Celebration is forthcoming next February!!!!  Big announcement to come!








Posted on 9/28/2008 8:24:53 PM by justice.gray@gmail.com (Justice)
New Hardware in the Family

One thing I've always regretted about building my new house was not running copious amounts of CAT6/CAT54 and RG6 co-ax to every wall in my house.  Being that my career is so depending on technology, in hindsight it seems not having a wired house. 

Then along came wireless, and I thought my problems would be solved.  Turns out they were - to a point.  Wireless is indeed handy, but there are some spots in my house where the signal isn't the best.  I'm not enough of a radio geek to pretend to understand why, I just accept the limitations and carry on.  In particular, the room where I keep my XBOX 360 is kind of crappy, which made me sad.

I thought I was going to crawl around in my attic and spend some quality time pulling cable.  Before I did that, I started looking around for some sort of wireless repeater/relay/bridge.  I came across the Netgear WNHDEB11 HD/Gaming Wireless kit.  It was a bit tricky finding someone in Canada who had one in stock, but eventually Maurice at HardData found me one.  One of the things that I like about this is you have two Ethernet ports on the back so it's pretty easy to hook up things that don't have a WiFi card but do have a NIC.

Setup was drop dead easy.  It took maybe all of 20 minutes to set up the kit.  I don't know if this was something a non-tech type would be able to do easily, but they could do it.  I didn't like the lack of documentation in the kit.  They expect you to drop in the CD, and read a PDF on it for installation and configuration directions.

I have my XBOX360 and my laptop currently plugged into one end of the bridge.  Speeds don't seem to be that bad, all in all.  Using Speakeasy.net's speedtest, I had about 2800kbps download and around 900kps upload against the Seattle, WA server.