Saturday, December 31, 2005

Recipe Blogging: Chocolate Nemesis

My wife found this one in this month’s issue (December, ‘05) of Good Housekeeping.  It’s quite easy to make, and it is simply an amazing cake to eat.

Chocolate Nemesis Cake

  • 1/2 c. water
  • 1 c. sugar, divided!
  • 1 Lb. bittersweet chocolate, chopped (See Notes)
  • 2 sticks unsalted butter, cut up
  • 7 large eggs, at room temperature
  • softly whipped cream or creme fraiche (See Notes)
  • fresh raspberries for garnish

Preheat oven to 325F.  Grease bottom and sides of 9–inch springform pan.  Line bottom of pan with parchment paper (See Notes).  Dust side of pan with flour.  Set pan on sheet of heavy-duty foil and wrap foil up the sides of pan to prevent water from leaking in during baking.  (You may need to double-seam fold two sheets together to make a very wide piece of foil — you want the foil at least halfway up the sides of the springform.)

In a heavy saucepan over medium-high heat, disolve 1/2 c. sugar in the water, stirring occasionally.  Add chocolate and butter, stir until completely melted and mixed.  Remove pan from heat and cool chocolate 15 – 30 minutes.

Meanwhile, beat eggs wtih remaining 1/2 c. sugar at high speed until mixture thickens and roughly triples in volume, about 6 – 8 minutes.  Using a wire whisk, gently fold in the melted chocolate mixture, completely blending in.  Take care to not deflate the whipped eggs.  (See note)

Pour batter into springform pan and set inside a large roasting pan.  Set an oven rack at the middle height in the oven and place the roasting pan on the rack.  Pour enough boiling water in the roasting pan to come halfway up the side of the springform pan.  (I angle a large pot lid over the springform to protect the cake from splashes or bad aim.  School of hard knocks there, folks.)

Bake the cake for 25 – 35 minutes until the edges just begin to set and a thin crust forms on the top.  Carefully remove the springform from the water bath and let cool on a rack.  Cover and refrigerate overnight.

About 30 minutes before serving, remove from refrigerator, run a knife around the edges to loosen the pan, then remove the foil and side of springform.  Invert on a plate, remove the parchment paper and turn cake right side up on a serving plate.

NOTES

  • Use pre-cut parchment paper circles if you’ve got ‘em.  If not, start with a square (more or less) sheet of parchment and fold it in half.  Now fold it in half along the seam.  Fold the paper over the closed corner several times until you’ve got a narrow wedge.  Set the tip of the wedge in the center of the pan and cut it with scissors at the edge of the pan.  Unfold it and Poof! you’ve got a more-or-less circle which should fit right inside the pan.  Thank Jacques Pepin for this cool trick!
  • I used the best quality chocolate I could get my hands on easily — Ghirardelli.  It’s nothing extraordinary, and I’m looking forward to trying this cake again with Valhrona or some other really special chocolate.
  • Folding with a whisk is really fairly easy and it’s nothing to get wigged out about.  Pour the chocolate into the eggs in small batches and use the whisk to lift the mixture from the bottom of the bowl up through the middle.  You’re not using the whisk to beat the eggs, you’re using it to gently raise the heavier chocolate which has sunk to the bottom of the pan and distribute it through the rest of the mix.  It sounds a lot more complex than it really is.  Folding seems to have an undeserved mystique around it.  Just do it.
  • I didn’t do it on when cooking this cake, but I think a trick from my cheesecake baking would work really well here.  I remove my cheesecakes when they’re still very soft in the center.  I put the pan on a cooling rack, then invert a large bowl over the top of the rack and cover that bowl with several layers of towels.  The residual heat in the cake will finish off the cooking in a very, very gentile fashion.  For cheesecakes this helps mitigate the nasty cracks which form when a cake is overcooked or cooled too rapidly.  It also helps keep the creamy, beautiful texture in the cake.  I will try this same trick with this Nemesis cake the next time and I expect some good results!
  • Creme fraiche would be a perfect foil to this very rich, heavy cake.  Unfortunately creme fraiche is tough to find in this corner of Dayton.  We made due with Cool Whip.  Philistines R Us.

Friday, December 30, 2005

Code Camp Links Fixed

It’s always good to remember that one is fully capable of shooting oneself in the foot.  Apropos: My move of our .NET group’s site to ASP.NET 2.0.  It’s slick to move everything over to neat master pages which really make life a lot easier, and I’m having fun playing with menus and general ASP.NET 2.0 features.

Of course, if one’s moving from HTML pages to ASP.NET pages, then one ought to leave a few.htm files up on the server which redirect folks to the new locations of important stuff like our upcoming Code Camp

Now fixed.

Duh.

Thursday, December 29, 2005

Latest Reading List

It’s been quiet with blog posts this last week, but hey, it was Christmas so give me a break!

Here are a few things off of my reading list this last month:

Tech Stuff

Bauer’s and King’s Hibernate In Action.  I’ve been doing a modest amount of work with NHibernate and this book is often referenced in the NHib community.  It’s a great book for Object/Relational Mapping concepts, and NHibernate is a pretty close port of Java’s Hibernate so things seem to clearly map over so far — at least in the first quarter of the book I’ve read so far.

Troelsen’s Pro C# 2005 and the .NET 2.0 Platform, Third Edition.   A bit too wordy, and definitely not targeted at graduate students as he says on the back cover — the material’s deep, but also starts out at the introductory level.  Despite the wordiness, it’s a terrific read with great details on a lot of different topics.  He is the first author who has made a clear case why going into IL is a Good Thing.  (On a side note, how can it be the third edition for the .NET 2.0 platform??)

DeMarco’s & Lister’s Peopleware.  Published something like 20 years ago and it amazes me how little management has learned about how to feed and nourish creative tech staff.  The same mistakes are being made now as two decades ago.  Read this book if you’re interested in how to set up a productive environment for your staff, or if you need ammunition to convince your management on how to do things the right way.

Liberty’s Programming ASP.NET , 3rd Ed.  Lots of shiny stuff on doing ASP.NET well.  Not even close to a reference for all the goodness in v2.0 of ASP.NET, but there’s a tremendous amount of goodness therein.  My primary source for learning ASP.NET.

Fiction

DeCandido’s novelization of Serenity.  What a piece of ghosa. By far the worst novelization I’ve ever read.  DeCandido tries to write in the folksy manner that Joss Whedon’s characters speak in — and fails miserably.  It’s clunky, schizophrenic, and scattered.  DeCandido even manages to foul up the gobs of one-liners Whedon had in the movie.  Inept treatment of terrific material.

King’s and Straub’s Black House.  The usual over-long King story, although Straub appears to have kept him somewhat in check.  Some interesting concepts and neat writing style.  Got this as a gift, so the price was right.

Rowling’s Fantastic Beasts and Where To Find Them.  Toungue-in-cheek book about the beasts of Harry Potter’s world — cast as a schoolbook, complete with margin scribblings from Harry, Ron, and Hermione.

Mignola’s Hellboy Volume 1: Seeds of Destruction.  I love the movie Hellboy, but got hooked on it without having read any of Mignola’s work.  This graphic novel is just stunning.  Amazing colors, amazing art, amazing story, and quite different character interactions than how things go in Del Toro’s movie universe.  I’m happy, happy, happy I got this as a gift!

Non-Fiction

Kimmel’s Grace-Based Parenting.  Sensible, funny, calm writings on how to raise kids who are strong enough to stand up to the many problems they’ll face as they grow from brats I mean young children through teens to adulthood.  It’s written from a Christian standpoint, but there’s a lot to appeal to any parent (or potential parent) regardless of your religious beliefs.  I like that Kimmel comes from the viewpoint that overprotection is a patently Bad Thing, and that extremism in any area of parenting is a recipe for raising children who will head off on destructive paths.  It’s sort of like a kinder, gentler Rosemond before Rosemond went completely psycho.

Thursday, December 22, 2005

Dayton-Cincy Code Camp Session Abstracts Posted

Continuing with my iterative development of the Dayton-Cincinnati Code Camp’s page, you can now find abstracts linked from the Camp’s schedule page.

What?  You’re a .NET geek who lives in the Dayton/Cincy/C-Bus region and you’re not registered?  The deuce you say!  Go sign up right now.

More Code Camp Updates

The Dayton-Cincinnati Code Camp’s schedule is now updated to show each session’s presenters.

Wednesday, December 21, 2005

Dayton-Cincinnati Code Camp Schedule Final!

The schedule for the Dayton-Cincinnati Code Camp is finalized!  We’ve got a killer lineup of sessions, but then I may be biased…

Register for the camp via Microsoft’s service.  Find general information about the camp at its home page.

Right now I have just the session titles posted; I’ll have abstracts and speakers linked in tomorrow, but for now I’m off to bed.

Great Presentation Blog

Jim Weirich, one of the presenters at our Dayton-Cincinnati Code Camp, referenced Garr Reynolds’ Presentation Zen blog in passing.  Holy smokes, what a neat find!

Check out Reynolds’ post on “naked” presentations, and his very interesting post on the Takahashi Method, where slides contain only one or two words in absolutely huge text.  This is kind of like Beyond Bullets on steroids.  Talk about having things stripped down to their bare essence!

The “naked” presentation post gets a bit mystical and touchy-feely, but the essence of it is terrific: strip down your presentations and cut loose all the cruft one hides behind.

I haven’t dug through much of Reynolds’ writing yet, but it looks to be very thought-provoking.

Building the Case For Moving to .NET 2.0 / VS2005

I find it interesting that few folks in our .NET Developers Group are even evaluating Visual Studio 2005 or the .NET 2.0 Framework for adoption of the IDE or Framework.  Adoption of new technologies in a larger company isn’t (and shouldn’t be!) a trivial matter.  Companies need to figure out the cost/benefit of such a move; it’s a business after all, and as much as we’d like to, we can’t always head off into a new area just because it’s cool.

I’ve been doing a very small bit of work looking around for articles talking about productivity gains from moving to the next generation of Visual Studio, the .NET Framework, or SQL Server.  I haven’t been working that hard at researching, but Jason Haley’s Interesting Finds pointed out this series of Case Studies.  I looked at a few of them and found them interesting, but they’re Microsoft marketing kool-aid rah rah BS, so read them with several large grains of salt.

I’d love to come across non-marketing bullcrap articles from IT folks on the benefits (or bad impacts!) they’ve found from moving to VS2005, SQL2005, or the 2.0 Framework in general.

Please pass on any links or experiences you’ve had yourself.  All this may eventually find its way into an article over at VisualStudioHacks.com where I post a weekly clip on odds and ends.

Tuesday, December 20, 2005

Amazing Ruby Online Tutorial

I just did my first-ever Ruby code, courtesy of this online tutorial.  It’s quick, it’s simple, it’s cool.

Go check it out.

(via Jim Weirich)

Developing as a Non-Admin

I'm finally trying to kick the crutch of developing using an account with admin privileges. That same account was my regular account for day to day use, too. I’ve always known it’s a really, really stupid thing to be doing (see LeBlanc and Howard, Brown, or talk with any long time Unix user who will rightfully heap scorn upon you), but I just went with the path of least resistance.  Hey, I quit a two-pack a day smoking habit.  How hard can it be to kick this admin account thing?

Today I ran into my first small hitch while trying to get finicky NCover working for something I’m writing.  NCover’s very tempermental with its command-line parameters, so you really need to run it from a batch file or NAnt task.  I was trying to get an old NAnt build file working and was running into issues where everything appeared to work nicely, but no coverage report was being generated.  Arrgghhh.

I’d run into this in the past where NCover’s support library CoverLib.dll would lose its mind and require re-registration.  It was so nasty that I just added an exec for registering that library into my NAnt task — it re-registers itself every time the dang coverage runs.

So back to the admin/non-admin issue: regsvr32 will appear to execute just fine to register a DLL if you’re running as a non-admin account, it just doesn’t really do anything.  The DLL wasn’t successfully registered, and I got no feedback that the process failed.

Quick answer?  Use the “runas” to spawn another command window for executing my NAnt task.  This second window was spawned as one of my admin accounts.  Voila!

Monday, December 19, 2005

Reading: Peopleware

One of our DevGroup’s members gave me an extra copy of DeMaro’s and Lister’s Peopleware. I’ve had it on my reading list for quite some time and was happy to get my mitts on a copy.  (Thanks, Steve!) 

I just finished reading it and it’s wonderful stuff.  The book is formed by a bunch of short articles about particular aspects of how to form a productive, nourishing environment for your creative engineers.  It’s easy reading with a lot of head nodder momements.

The book is also discouraging in some aspects — many of the sheerely stupid ways management treats their folks haven’t changed at all since the book was written in 1987.  Thankfully, while there are plenty of horror/war stories throughout the book, it’s much more focused on the positive things which can be done to foister a great environment where good workers want to gather and get great things done.

It’s only about 180 pages long, and can most likely be gotten from your local or regional library system — but it’s such a great book that you might think about adding it to your library.

Friday, December 16, 2005

Converting VS2003 Web Projects to VS2005

Today’s Interesting Finds from Jason Haley’s blog has a link to an article on converting VS2003 web projects to VS2005 from the C# team.  A question about this came up in Wednesday’s meeting of our DevGroup, so hopefully a few attendees might actually be reading my blog and see this!

Other solution/project conversion blurbs on the net:

 

Saturday, December 10, 2005

Life As A Single Parent

No, my wife and I aren’t splitting up, rather I’m happy to report she’s back from a two-week biz trip, which means I get to close another chapter in my life as a frequent single Dad.

Pam travels extensively; she’s normally gone on travel at least twice a month, often three, and sometimes four times a month — but those trips are usually two or three days with the occasional four or five day tossed in.  I’m fortunate that as much as she travels she’s still around quite a bit to help out with parenting. 

This two week period as a single parent was the longest stint I’ve had since starting a stay-at-home/work-from-home Dad job five or so years back when our daughter Lydia arrived on the scene.  Self-deprication aside, I count myself as a pretty good Dad who can handle pretty much anything while my wife’s away.  For all my experience as a parent over the last five years, this two week period was an eye-opener and gave me even more appreciation for the many single parents who do this constantly.

My schedule and workload the last two weeks was pretty normal.  The daily routine runs something like: wake up and let out the cats who won’t sleep until my normal wake up time, go back to sleep, wake up (again), make coffee, read some RSS feeds if my son’s decided to sleep in, get the kids up, get breakfast made, get kids dressed/cleaned/brushed, drive daughter off to school, drive back home, stop by Kroger or Meijer to load up on veggies and bananas, get back home, start laundry, get a snack for son who is chewing my leg off, finally sit at computer to get a bit of writing done, handle e-mail correspondence for my DevGroup and small biz, get son down for a nap, take care of chores I can’t do when Zeke’s mobile and in the way (unload/load dishwasher), FINALLY get a shower, sit down at computer and get 30 – 45 minutes of quiet studying or coding done while Zeke’s asleep, wake Zeke up, drive to school to get my daughter, get home and fix lunch, head off to piano lessons if it’s Monday, get back from piano, back to the computer for some more e-mail and perhaps knock off a bit of writing, get afternoon snacks done, change laundry out, start dinner, get kids fed, get son into bath, play with kids for a few minutes, get son off to bed, change laundry again, get daughter into bath, unload/load dishwasher again, get daughter out of bath, have an argument about doing chores before goofing off, get daughter into jammies/teeth brushed/hair brushed, get daughter into bed and settle down to read a book or two with her, sit on couch to watch a bit of Firefly/LOTR/Hellboy/STNG/Battlestar Galactica/Band Of Brothers to wind down a bit, kick myself again for holding myself to not having any vino/whisky/other alcohol while my wife’s off on travel, head back to computer where I sit down at 9pm and work at getting into a zone to knock out some software or semi-intelligent sounding prose for an article for the VisualStudioHacks.com website.2

I’ve left out various non-stop chores which don’t fall into set chronological moments, such as the innumerable toys and books which land on my keyboard, tossed there by my 15 month-old son who is a constant, joyful interruption; intervention between son and daughter who love each other dearly, never more so as when they’re screetching at each other while trying to settle who gets to play with what; constant diaper changes (I’ll leave out graphic descriptions because I love my readers); rushing into the next room because my son’s in there and it’s been too quiet for too long, and any number of other varied errands and disturbances.

I also had several other events to deal with these last two weeks including painting two rooms (primer + two coats), fixing two busted toilets, dealing with the very nice but not so good at killing bugs guy from Orkin who has been telling me for five months that we should be seeing a decrease in carpenter ant activity “right after I put down this new stuff”, a follow up doctor’s appointment for my carpal tunnel-like problem which is now thankfully resolved, and finally two busted fillings to get repaired while the dentist talks about a possible root canal to fix another tooth.  Thank God the cars work.

I’m not throwing out that list as a lure for your sympathy (well, not too much, at least).  I only had to do this for two weeks and I really don’t deserve accolades for getting through that short stint.  Rather, I’m documenting for myself what my daily routine looks like — so that I can reaffirm just how blessed I really am.  I’m blessed with two kids who are, despite my numerous jokes, really terrific and low-maintenance kids.  How many 15–month and five-year olds love, and I mean love, all their vegetables? (“Kale?  YUM!”)  How many actually help out on occasion with chores around the house?  They’re also healthy (knock on wood), sharp as tacks, and are both endowed with a wonderful sense of the rediculous.  Laughter and giggles are thankfully a constant part of life around here.  I’m also blessed with a wife who is, occasional grumbling aside, a great help around the house and a great Momma.  I’m blessed with a terrific neighbor who has helped out in a pinch when I’ve had a short-notice meeting or two pop up.  Add to that a grandmother who lives 1.4 miles away and takes my daughter off my hands once a week.

How in the world does a single parent get this stuff done 24x7, 365 days a year on their own?  I’m amazed that any single parent manages to 1) stay moderately sane and 2) avoid stringing their kids up by their toes in the garage.

You want to do something to get yourself some seriously good Karma, or perhaps help balance out some of the negative things on the list you’ll need to present at the Pearly Gates?  Find a single parent and do something special for them.  Buy ‘em a couple sessions of Merry Maids.  Give ‘em gift certificates for a couple take out dinners.  Take their kids off their hands and send them off to a movie.  Or just take their kids off their hands so they can have a quiet hour to themselves.

You’ll probably never understand just how appreciated your effort would be.

Friday, December 09, 2005

Federal Spending

Interesting post by Angry Bear on what federal spending looks like over the last 30 years.  You might be surprised (as I was) that the rate of spending hasn’t exploded in non-Defense areas — but he doesn’t cite any sources for his information.

Possible Firefox Exploit

A lot of hay has been made in the past about how secure Firefox was -- and then such claims rapidly fell off as more folks took a harder look at the browser.  Here's another potential exploit, this one for the recently released version 1.5.  Funny how this topic pops up more and more as Firefox’s user base increases…

One of the biggest problems I had with Just Say No To Microsoft was author Tony Bove’s calling non-Microsoft products more secure while brushing over the fundamental concept that such products don’t have the user base Microsoft’s products do.  Bad Guys aren’t interested in doing Really Bad Things to software used only by a small percentage of folks.

(via Slashdot)

Now Playing: Bloc Party — Silent Alarm

Tuesday, December 06, 2005

Tentative Code Camp Schedule Posted!

Check out the tentative schedule we’ve got posted for the Dayton-Cincinnati Code Camp!

This is only a preliminary schedule, so don’t be bummed if you’ve submitted topics which didn’t make it onto the schedule.

Register for the Camp at Microsoft’s registration page.

Submit topics to me or James as noted on the Camp page.  Submission deadline is 12/21/05, but it would be a big help if you get things in sooner.

Now Playing: Elvis Costello — When I was Cruel

The Woes of Good Espresso

My flow during the day isn’t found in software development; development flow time is usually an hour or two late at night after the family’s asleep and I can work on getting into the coding zone.

My flow time during the day is found in the few moments where I can concetrate on pulling a shot of espresso.  I don’t count myself as a great barista, but I think I pull a consistently good shot.  There’s something flow-like about getting a shot just right: getting the equipment properly prepped, dosing out the right amount of beans, tamping the grounds just right (surprisingly difficult and very critical to the process), getting the temperature/time surfing down, and finally seeing the reward as espresso of a liquid honey texture drips out the spouts of my machine.  All this will sound absolutely nuts to readers who don’t care about espresso; just take away from this that I really enjoy this short time during the day where I can focus on doing one thing pretty well.

Why the “Woes” in the post title?  Because my two kids who have developed quite an affinity for my shots.  All my work results in… not much espresso left for me.  I’m lucky to have one sip left after my 16 month old son slurps up the crema and when I can get the demitasse back my five year old daughter.

Bah.

Still, there are a lot worse things in life than to have to share one’s espresso with kids who enjoy their small bit…

Now Playing: Ned’s Atomic Dustbin — God Fodder

Sunday, December 04, 2005

Construction Sort of Done

Well, that went quicker than expected.  It would have gone a bit quicker except for the various stuffed animals and books my son decided needed to live on my keyboard…

I like the wider display — the narrow content column in the previous template had been driving me nuts for a long time.  (But not so nuts I was willing to sit down and fix the dang thing.)  I’m also much happier with the white background for reading the snippets I post up.

I’ll give this a spin for a bit, perhaps tweaking a few fonts and sizes.  Leave me a comment if something about the changes drive you completely apes#it.  I may even pay attention.

Under Construction

Y’all may notice that the blog looks like crap right now.  No kidding.

I’m in the process of stealing bits and pieces of the template from Jason Follas’s blog and things are going to be ugly here for a bit while I iron out the kinks.

The end result should be much purtier than my initial template from Blogger.  White background (easier to read code snippets), and wider columns, again for easier reading of the many earth-shattering revelations I post up here.

Have a bit of patience with me while I noodle this all out.

New Microsoft Security Portal

Paul Maher announces a “Developer focused Security website” via Microsoft.  It looks to be more a portal than a resource site — there isn’t a whole lot of content directly on the site.  Intead it’s a link farm and you’ll need to troll other sites for information.  That’s not necessarily a bad thing, but I tend to agree with Ian Smith who comments on Paul’s post “ if those behind this initiative, with a specific passion around this area, couldn't be bothered to check the content they're linking to, why should the developers it's aimed at be any different?”

I’ll get around to jumping through all those links some day, just not today.

Saturday, December 03, 2005

NHibernate Many-To-Many Confusion

More NHibernate learning tonight, this time with many-to-many relationships.  We’ve been using Simon Green’s killer NHibernate templates for CodeSmith to generate business entities and mapping files.

I found one hitch, though, via my unit tests: I was losing all entities of a similar type when deleting one of them.  ‘Tis a puzzlement.  Using the debugger and peering at the database while stepping through, I found deleting the first entity resulted in the remaining entities getting deleted too.

Background: the entities are Person types with names, e-mails, etc., but also hold an IList defining a many-to-many relationship with a PersonType entity which stores, well, the type of person we’re dealing with.  (Member, speaker, sponsor, etc.)

My unit test looks like so:

Person p1 = TestFactory.CreateDefaultMember();

Person p2 = TestFactory.CreateDefaultMember();

p2.FName = "Bubba";

Person p3 = TestFactory.CreateDefaultMember();

p3.FName = "Goober";

p1.Save();

p2.Save();

p3.Save();

// cruft elided

p1.Delete();

p2.Delete();  //mass ugliness here!!

p3.Delete();

My test died out at the p2.Delete() statement.  By using the debugger I noticed that the PersonType record was deleted at the statement p1.Delete().  Hmmm…  A quick dig into the mapping file for the Person entity shows the collection defined so:

<bag name="PersonTypes" table="PersonTypeLink" inverse="false" lazy="false" cascade="all">

   <key>

      <column name="PersonID" sql-type="int" not-null="true"/>

   </key>

   <many-to-many class="nUGSoft.Entities.PersonType, nUGSoft.Entities">

      <column name="PersonTypeID" sql-type="int" not-null="true"/>

   </many-to-many>

</bag>

Whoops!  Note that portion “cascade=’all’” ?  Hibernate’s documentation (forget NHibernate’s dox) says cascading shouldn’t usually be used when dealing with many-to-many or many-to-one relationships.  I changed that option to “none” and things look much better now.

I’ll follow up with Simon and see if he’s got some specific reason for having had cascade=”all” set.  I’ll post a follow up here if there’s something of interest which comes out of that.

Wednesday, November 30, 2005

More Gold From Rally Software's Agile Blog

Rally Software’s blog has been spectacular since it started in late October.  Their current post talks about laying off of the demand for/demand against pair programming — but not abandoning the quest for better software through better collaboration.  Good stuff, especially the summary at the end.

Hanselman's Best Accomplishment

Scott Hanselman and his wife have a new family arrival.  Amazing that Scott managed to nicely contribute to the latest round of Ask The Pros even during the last week of their pregnancy.

Great Article On Debugging

OK, "Great Article" is not an unbiased rating since I wrote the article I'm posting about: Ask The Pros: Debugging at VisualStudioHacks.com.  It’s the second in my Ask The Pros series and has lots of tips from Really Smart Folks across the industry.

I’ve been very lucky to have had such terrific response from a lot of great developers/architects/Really Smart Folks who have taken time from their busy schedules to respond to the first two articles.

Monday, November 28, 2005

More Gold From Sam Gentile on Agile Projects

Sam Gentile has had a run on great posts the last few weeks.  Here’s another great one on estimating, plus how important FIT is to their team of developers and customers.  Read on, MacDuff!

My New Toy I Mean Vitally Important Work Equipment

I just picked up a Treo 650 to replace my old Motorola v60 cell phone.  I loved my m500 PDA and v60 cellphone combination because I could get both gadgets in one shirt pocket.  The Treo is even Way Cooler because it combines both, still fits in my shirt pocket and gives me even more power than the prior combination.  I love having my calendar, task list, and contacts all on my cell, plus I’m very familiar with Palm OS as I used an m500 for a number of years.  (Want to buy it, cheap?  Make an offer)  There are a plethora of Palm OS widgets I can stuff on this gadget to make my life happier.  Woo hoo!

The Treo’s a very nice size and will still fit in my shirt pocket [Dude, you’re at home in sweat pants all day! — ed.], and it’s very light.  I’m not signed up for the data package, so my only use of the keyboard has been for a couple test task and calendar appointments.  The keyboard seems fine for short stuff; I definitely won’t be doing any long user guides on it…  The only really odd thing I’ve found so far is the speaker placement: it’s on the top of the phone which means I have to hold the phone at a seemingly odd spot just below my ear.  Dunno, the pizza delivery folks didn’t seem to have any problem with understanding me tonight, so it can’t be too bad.

The camera sucks, but then I don’t think I’ll be using it but once every three years.  The camera’s actually a hinderance because the defense contractor I worked for in the past and may work around again prohibits cameras of any type on their premises, even in the unclassified rooms.  I could go on a rant about anal-retentive, out of control, overburdended with stifiling processes goobers, but I’ll save you from that.

Tangental topics being back under control, suffice it to say that I’m pretty excited about scoring one for only $200.  It’s going to make my life a lot easier.

Sunday, November 27, 2005

Good Fitnesse.NET Intro

Cory Foy has a nice introduction to Fitnesse.NET over on the Apress blogs.  I still haven’t had a chance to play with Fitnesse.NET, but I sure do like the concept.  His post is a straight-forward, simple intro to getting Fitnesse.NET up and running.

Saturday, November 26, 2005

Less Is More

Ben Carey pointed out this terrific post on “Less as a competitive advantage” at 37Signals’ blog.  Great stuff, and really hits hard the concept of YAGNI.

Wednesday, November 23, 2005

Microsoft's Whacked Out TDD Approach

I've blogged before (more than once) on how Microsoft really does listen to their customers.  They’ve got a prime opportunity right now to do the same thing and clean up the mess they made with their so-called Test Driven Development guidelines.  (If you’re not familiar with TDD please do not read that thing first.  Go elsewhere to learn about TDD.)

Folks far better than I have written some great posts about Microsoft’s error.  Check out Ben Carey’s postRoy Osherove’s musings, Scott Bellware’s comments, thoughts from Mike Gunderloy, and Sam Gentile’s very well written response.

Do the right thing, Microsoft: pull those guidelines off now, then go and learn what TDD’s really about.  (Or listen to the few Agile bloggers you have in your own company.)

Tuesday, November 22, 2005

Debugger Blog

I’m working on an article for Visual Studio Hacks which deals with debugging.  Bill Wagner offered up a great pointer to Jim Gries’s blog on debugging.

Gries’s blog is great stuff.  Check it out!

Sunday, November 20, 2005

Saturday, November 19, 2005

Great Second Home

Ben Carey blogged on this terrific-looking vacation home company.  We’ve got a couple acres on a small lake in rural Alaska and I can just see one of these on our property up there.  The flat roof might be troublesome with the snowfall, but wow, what a great philosophy these folks have!

BlueSky MOD :: Low-Impact, High-Design Living.

Friday, November 18, 2005

Update Your NUnit Config Files!

If you’ve moved up to the live version of VS2005 and/or the .NET Framework, you’ll need to update your NUnit config files — you’ll notice this when you try and load your previously working NUnit test projects and you get the dreaded BadImageFormatException.

Add this line as the top-most in the <startup> section of your nunit-gui.exe.config and nunit-console.exe.config files:

      <supportedRuntime version="v2.0.50727" />

Voila!

Another Year Gone By

Last night my wife surprised me with a trip out to Yellow Springs for a dinner at the Winds Cafe, the best dining in the Dayton area as far as we’re concerned.  It wasn’t just any dinner, it was their 16th annual Garlic Dinner, a six course meal of terrific food with perfectly paired wines.  Loads of garlic, but all well-balanced and not overpowering.  The Garlic Dinner menu will vanish from their page soon, so I’ll paste it in just to torment you poor souls:

  • Garlic Tomato Soup with Garlic Goat Cheese Crouton
  • Hot Smoked Salmon with Garlic Vinaigrette
  • Stuffed Beef Tenderloin with Mushrooms, garlic confit and herbs
  • Fall Dark Green Salad with Creamy Garlic Dressing and Garlic Chips
  • Cheeses
  • Lemon Crepe with Lemon Curd and Jeni’s Lemon Ice Cream

Another great surprise was a box of See’s candy, all dark, which means my wife won’t be mooching any off me.  I’ll still have to fend off both kids who like dark chocolate as much as I do, curse them.

Best of all, this morning my daughter came out and gave me a card she’d made all on her own:

That makes for a pretty good day, despite being another year closer to True Crusty Old Fart status, instead of my current Aspiring Crusty Old Fart status.

Thursday, November 17, 2005

VS 2005 Crashes -- Fixed!

My earlier whines about VS 2005 crashing have now been completely resolved.  The culprits were old versions of DXCore and TestDriven.NET.  I updated both (use the 2.0.xx Beta version of TestDriven) and now things appear to be stable and shiny once more.

(And yes, I did e-mail Sara to let her know her great tips on bug filing weren’t necessary!)

Now Playing: Wes — Weslenga.  More cool Afropop, courtesy of Rhapsody.

Wednesday, November 16, 2005

Visual Studio Crashes: Update

Earlier today I whined about constant Visual Studio crashes.  Sara Ford, VS tester extraordinare and author of great VS tips, left a comment with some terrific info on how to write up a good bug report.  Check out her blog post on how to report issues to the Product Feedback Center.

I found the problem with the aspx pages causing crashes: DXCore.  I had an older version with “experimental” support for VS2005.  Their latest version killed off that problem and made aspx pages happy and shiny again.  I’m still having the crashes at every exit of VS, but I’ll work that one tomorrow.

The Joys of Crashing Software

Visual Studio 2005 Beta 2 was always tetchy on my system.  It was very grumpy with one particular solution I’m working on, less so with others.  I was very happy to get the real release from MSDN’s download section when VS went live.  I ran the B2 cleanup tool, installed the live release, and poof!  Now I get a crash every time I exit Visual Studio, regardless of the project I’m working on.

Every time.

That’s an annoying pain in the keester, but I could live with it.  Today I just found a showstopper: I can’t open an aspx file in a project James created.  VS crashes immediately no matter if I try opening the file in design or code view.  I deleted the file from the project, added it anew, and am still having the same problem.

This sucks.

There have been lots of rants at various spots around the Internet complaining about Microsoft shipping VS2005 too early.  I’ve been open minded to the situation, understanding that a company has to make tough choices about when to release huge, complex software systems.  Maybe I’m a little less open minded now.  Grumble.

Monday, November 14, 2005

Managing DSNs on Windows XP

I seem to have a complete mental block on being able to remember that you can manage database DSNs via the Administrative Tools snap in from the Control Panel.  It always takes me a bit of stumbling around in Google before I find it again.  Maybe I’ll remember now that I’ve blogged about it.

Right.

Now Playing: The La’s — The La’s.  Funky stuff and I like it.

BlogJet Plugin For Aggregators

I drank Hanselman’s Kool-Aid and bought BlogJet some time back.  I’ve been pretty happy with it so far, although I wish its music detection worked with Rhapsody.

Blogjet has a great plugin which lets you blog directly from RSS Bandit, NewsGator, SharpReader, and Omea Reader.  Find it on the BlogJet Wiki.  There are a couple other plugins there for IE, FeedDemon, and Firefox.  (Some guy James wrote that last one.)

Another Dayton-Cincinnati Code Camp Update

I’ve got a few potential sessions for the Code Camp listed on the site’s page: Dayton-Cincinnati Code Camp

Registration is filling up steadily.  Sign up for the camp at the registration site if you’re interested.

Contact me directly via the link on the right sidebar if you’re interested in speaking.  We’ll have formal (normal) lectures, plus we’re open for whiteboard sessions.  Send me the following information if you’re going to submit a session:

  • Topic Name
  • Abstract
  • Target Audience (Beginner, Intermediate, Advanced)

Hope to see you at the camp!

Now Playing: Silence.  My daughter is at school, my son is napping, and sometimes it’s just nice to hear nothing. Aaahhhh.

Recipe Blogging: Spaghetti with Tuna and Capers

Some hideous grunge I’ve been fighting has left me with a nasty cough that keeps me up most of the nights these last two weeks hacking my lungs out.  Yeesh, I thought hacking coughs were history when I kicked a two pack a day smoking habit years ago.  Bogus.

I’ve felt lousy and been tired enough that I haven’t done a lot of creative cooking, but things are gradually getting better, enough so that last night I returned to a great dish that’s wonderful in its simplicity: Spaghetti with Tuna and Capers. 

As with any simple dish, this is all about the quality of what you throw in the pot.  Starkist or Bumble Bee tuna are fine in their own rights (I have two small kids.  Tuna is a staple here.), but you need something fancier to really kick this dish up.  Look for Genova tuna at Trader Joe’s or a semi-fancier store.  If you can foot the tarrif, order some of the amazing stuff Zingerman’s carries.  It’s a small tin for something like $10 per, but it is absolutely stunning and perfect for something like this. 

The capers in this dish are just as important.  Look up salt-packed capers, not brined.  You can find them at a good Italian food store, fancier yuppie grocieries like Whole Foods or Dorothy Lane Market here in Dayton.

Without further ado,

Spaghetti con Tonno e Capperi (Serves 4 – 6)

spaghetti for 4 - 6 (That’s roughly one of my hands a bit less than full.  I never measure.  Sorry.)

~ 3 Tbs. best-quality extra virgin olive oil

1 can best-quality tuna

2 Tbs. salt-packed capers, rinsed and soaked in water

1 small clove garlic, finely minced

toasted bread crumbs (optional)

  • Cook the spaghetti  in a large pot of salted, boiling water.
  • While the spaghetti is cooking, prepare the tuna.  In a large serving bowl, pour in the olive oil, then add the tuna, breaking up it into small chunks.  Stir in the capers and garlic.
  • When the pasta’s done, drain it well and dump the piping hot pasta into the bowl.  Stir well to mix.  The heat from the pasta will cook the garlic just a tiny bit and spread its love throughout the oil and pasta.
  • Dust with a bit of toasted breadcrumbs if you like, but please avoid cheeses you might normally grate over pasta — they’re too strong and will dull the great flavors from the tuna and capers.  At least give it a try.  Trust me.

NOTES:  That’s all there is to it.  Simplicty rules here.  Use a very light hand with the garlic, and don’t use any salt to season the pasta — there’s plenty in the capers, even if you’ve rinsed and soaked them well.

Love That FlexWiki

I’ve been using FlexWiki on several projects over the last six or so months and have come to love it.  It’s a snap to install, and the Wiki way of life rocks once you get into the flow.  I’m able to brainstorm out and quickly link topics, rapidly move topics around, and just generally have a fairly productive time getting stuff done.  There are a ton of formatting options, too, so you can make everything look nice and shiny.

FlexWiki comes with RSS enabled out of the box, you can set up mail notifications (newsletters) without too much trouble, and there’s a modest security capability if you want it.

Now Playing: Antibalas Afrobeat Orchestra — Who Is This America?  I love Afropop or whatever the heck you want to call it.  Great brass, cool beats, lovely vocals.  (Plus my son digs dancing to it, even if his dancing is just clapping hands while stumbling around in a circle.)

Thursday, November 10, 2005

More Dayton-Cincy Code Camp Updates

Interested in presenting at our Code Camp in January?  Submission deadline is 12/21/05.  We’ll notify all submitters on 12/23/05 whether they’ve been selected or not.

Send me the following information via my contact link on the left sidebar:

  • Topic Name
  • Topic Abstract
  • Target Audience (Beginner/Intermediate/Advanced)

Interested in attending?  (You ought to be if you’re in the Dayton/Cincinnati/Columbus area!)  Sign up at the registration site.

Bad Naming

A couple definitions from the American Heratige Dictionary entries for “through”:

  • In one side and out the opposite or another side of: went through the tunnel.
  • Among or between; in the midst of: a walk through the flowers.
  • Past and without stopping for: drove through a red light.

So “through” can mean either passing by (last bullet) or traversing something (first two).

Visual Studio’s options for stepping when debugging code:

  • Step Into (F11)
  • Step Over (F10)

Why in the world would the .NET Framework folks name an attribute to bypass a method  System.Diagnostics.DebuggerStepThrough ?  It doesn’t match any of the two prepositions normally used with Visual Studio’s “Step” command.  Without context its intent is ambiguous by dictionary definition.

Do yourselves and your API’s consumers a favor.  Disambiguate your method and attribute names.  Don’t know what the heck “disambiguate” means?  I just proved my point by using a silly word where a clearer one would have served better.

Go read your McConnell again.

Now Playing: Bruce Springsteen — The Essential.  Not sure about this.  I hate the first three cuts: Blinded By The Light, For You, and Spirit In the Night.  The remaining cuts look better.  Hope so, otherwise I’ll be making more use of the fast forward button.

Rhapsody Rulz (Again)

Now Playing: Molly Hatchet — Molly Hatchet.  I am more and more impressed with Rhapsody.  I spent a lot of time listening to Molly Hatchet and Flirtin’ With Disaster when I was in school.  It’s killer to find this great stuff online via my Rhapsody subscription.  Great music made even better by my 15 month old son dancing around to it.  Dreams I’ll Never See is one of the best songs ever, right next to The Outlaws’ Green Grass and High Tides.

Several Great Finds

Several cool finds as I’m catching up with blogs I missed during my road trip to the Detroit Launch and my day off yesterday.

Eric Gunnerson points out that Visual Studio Express versions will be FREE for the next year.

Michelle Leroux Bustamante has great coverage of Click Once Deployement security issues.

Lutz Roeder has a new Reflector version out. (via Jason Haley)

Bill Wagner has a great two-part series on mutable/read-only properties.  This stuff’s a bit hard to understand, but it’s an important concept.  He has question and answer parts.

Now playing: Ladysmith Black Mambazo - Unomathemba  I don’t listen to LBM enough.  Great music for many reasons.  It’s relaxing when I’m trying to wind down for studying, it’s got incredible harmonies, and it’s fun to listen to.  I dig great harmony for many reasons, partially because it reminds me of my sisters singing as they do dishes after family gatherings.  I’m in there helping too, so stop the snide remarks.  I also dig harmony because I have a voice that sounds like wild goose farts on a muggy morning.  (Stolen from some forgotten old folk artist’s album cover.)

GhostDoc 1.9.0 (for Visual Studio 2005) Released

Whoopee!

GhostDoc 1.9.0 (for Visual Studio 2005) Released

Man, have I missed this terrific widget!  Thanks a bunch Roland!

(I’m excited about this, in case you haven’t figured it out.)

Agile Tools / Pair Programming

Same Gentile has a great post listing the tools he’s using on an Agile project.   I thought the label of his SCM tool was pretty amusing.  It’s also interesting to see that he’s using FIT for acceptance tests.  I read about FIT some time ago, loved the idea and never ran with it.  I took another look at it last night (even before reading Sam’s post!) and am looking to delve into it over the next few days.

He’s also got a terrific post on Pair Programming, and why he likes it so much.  I haven’t ever worked in a Pair Programming envrionment, but I’d love to.  I can certainly see Sam’s points about how exhausting it is, and why it can push the comfort zone of developers — and why that’s such an important aspect of pairing.

Now playing: Matisyahu - Chop 'em Down

When Are Iterations Harmful?

The team at Rally Software has started what looks to be a great blog on Agile practices.  Their post on nailing down the length of iterations is a gem, as is the sample calendar they’ve created.

I’m looking forward to reading this blog and seeing where it goes!

Now playing: Beck - Black Tambourine

(Cool, BlogJet’s autodetect feature works!  Too bad it doesn’t support Rhapsody’s Real player.)

via Roy Osherove’s ISerializable

Wednesday, November 09, 2005

Detroit VS/SQL Server Launch Event

I was in Detroit Monday afternoon and yesterday for the Visual Studio 2005 / SQL Server 2005 Launch Event.  2500 geeks invaded the Rennaisance Convention Center for the event.  I was there manning the INETA / Heartland User Group booth and ended up having such a good time chatting with various folks (scheming for world domination and all that) that I didn’t get to any of the sessions. 

I wasn’t all that concerned about the sessions, since my main reason for travelling to Detroit was networking and putting faces to names I’d been corresponding over the last six or eight months since starting our Dayton .NET Developers Group.  The folks I got to finally meet face to face included Greg Huber, Alex Lowe (both instrumental in getting our group started), Jason Follas, Joe Kunk, and Bill Wagner.

I met a few new folks including Paul Kimmel and Rodney Sloan (Microsoft’s .NET Development Manager for the Great Lakes Region), and connected up with lots of old friends including Josh Holmes, John Hopkins, Drew Robbins, and Brian Prince.

Am I just writing about these folks to be a name dropper?  No (OK, not completely), rather I’m trying to make the point that events like this are terrific networking opportunities.  I lined up new speakers for our group, got great ideas on publicizing the group, helped get nearly 200 folks signed up for various user groups, spent a lot of time gabbing on technical topics with industry leaders like Brian Prince and Bill Wagner, got involved with an effort to build a new speakers bureau for the Heartland/Great Lakes region, and got some very helpful career feedback from folks who were kind enough to spend a few minutes talking with me.

I also find such events terrifically motivating and energizing.  My “high” from SD West back in 2003 lasted a year — and that event was life-changing in that it really pushed me into redirecting my career into more interesting things.  I don’t get to go to such events very often at all, but hopefully that will change!

Now Playing: Interpol — Turn on The Bright Lights.  Cool indie rock/punk/whatever.  Maybe I blogged about them already, but so what.  Good stuff.

Friday, November 04, 2005

Update: Dayton-Cincy Code Camp

The Dayton - Cincinnati Code Camp is moving right along! We're getting a good list of speakers and seats are filling up at a good clip.

Make sure to check the Camp's home page if you're interested. The price is right (FREE!) and I think we're going to have some terrific speakers presenting. Contact me directly if you're interested in either sponsoring or speaking at the event.

Now Playing: Green Day -- Warning: I got hooked on American Idiot without knowing how much great stuff Green Day had already put out. I know, I'm a borderline old fart square dude. Gimme a break. Lots of good tunes on this albumn.

Thursday, November 03, 2005

Wednesday, November 02, 2005

A Cool Series Of Articles

I mentioned earlier that I’m writing weekly articles for James’s Visual Studio Hacks website.  I’m happy to announce the first article in what I hope will be a great series: Ask The Pros.

A number of leaders in our industry have been kind enough to participate in Q&A sessions on topics specific to how they get their work done in Visual Studio .NET.  I think it’s a killer opportunity to see what tools, tricks, and habits these folks use to knock out high quality work in a quick fashion.  I’m not sure exactly where the series will take me; I hope to post one article every three or four weeks and I’m still not sure what kinds of questions I’ll end up asking.

Where ever it goes, it will be a great journey!

Tuesday, November 01, 2005

Unicode and Odd Characters

Note to self: The next time Visual Studio asks you about saving an HTML page as something other than Unicode, and you spend far too long digging through a long couple paragraphs of text while trying to figure out what character is blowing up your HTML and CSS -- check those d@mned apostrophes! I lost a silly chunk of time last night trying to figure out what character was munging up an HTML page I was working on. VS complained every time I tried to save it, and the page blew up all my beautiful CSS styling. (That's sarcastic -- I am NOT a graphic designer!).

Neither Notepad2 nor Vim gave me any indication of what was screwed up, so I ended up copying and pasting in half the text at a time, narrowing things down until I found the offending character.  It turned out to be one of those goofy backwards apostrophes.  Grrrr.

Next time I’ll keep a closer eye out for that.

Now Playing:  Bauhaus — The Sky’s Gone Out.  Serious mope punk/alt.  I don’t care for it much at all, but not because of its genre.  I just don’t like it.  Worse than listening to Al Franken or Ann Coulter.  Might be worse even than lima beans, one of the few vegetables I refuse to eat.  I’ll be happy to shut it off when I head out the door in a few minutes. 

Sunday, October 30, 2005

Ohio User Group Speakers List

James and I (OK, mostly him!) have put together a neat concept: the Ohio Speakers List.  This is a Wiki meant to connect speakers in, or willing to travel to, Ohio, and folks who are organizing events here.

We’re not limiting the content to .NET; it’s a resource for whoever wants to make use of it.

Add yourself in if you’re interested!

Now Playing: Wire — Rhapsody Sampler.  Lean punk with some electro tones.  Good vocals, not some screaming gunk.  Pretty good stuff.

Saturday, October 29, 2005

NUnit TestFixture Errors

Ever run across a funky situation where all unit tests in a fixture pass, but you’ve got a red light on the fixture?  Additionally, there aren’t any errors shown on the “Errors and Failures” tab, nor is there any text displayed on the Console.Out tab.  What’s up with that?

You may have an exception occuring in methods you’ve marked as TestFixtureSetup or TestFixtureTeardown.  I ran across this while refactoring a fixture I’m using to check NHibernate actions.  I was using my TestFixtureTeardown method to delete member entities I’d stored in the setup method — and I goofed on how that was implemented.

I figured out right away what the problem, but was puzzled why there wasn’t any help from NUnit’s GUI.  Actually, you can find out info about the exception, it’s just not immediately clear how.  Right-click on the TestFixture in the “Tests” pane and select “Properties.”  A message box will appear.  Click the “Result” tab and you’ll see all the nifty error stuff.

(I had to hack up the graphic because I’d moved past the error before I thought it would be cool to blog about.  You get the idea.)

Now Playing: The Who — Who’s Next.  Great stuff.  Killer stuff.  I likes it.

NHibernate & Hibernate Dox

I’ve said it before: NHibernate’s documentation sucks.  It’s written in a confusing fashion and there are numerous sections still unwritten.

Make sure to check out the Hibernate documentation page here.  It’s very clearly written, has a consistent example carried through the sections (so far, at least), and most importantly, discusses all the schema elements and attributes.  There are also very good explanations of the various relationship types (one-to-one, one-to-many, many-to-many, etc.) and how to implement them.

Sure, the documentation is Java-centric, but the concepts are explained so clearly that it’s easy to mentally translate over to C#.

Now Playing: The Who — Face Dances. This is somewhat popish, especially when you compare it to their older work, but I love it for one reason: Townsend’s amazing guitar work, especially the simple, clear riffs on Don’t Let Go the Coat.  Another Tricky Day is full of more great stuff, too.  Something else has amazed me over The Who’s long career: the utterly crisp clarity of the recordings of theirs I’ve heard.  The coin dropping and footsteps in The Music Must Change (Who Are You) has stuck with me since I first heard that albumn when it was first released way back when.

NHibernate PropertyAccesException

Like many things in NHibernate, causes of the PropertyAccessException aren’t particularly well documented.  (Well, they may be documented somewhere, but dang if I can find much on it.)  My NUnit tests were throwing this error during relationship tests with the “amplifying” message that the properties I was using for ID values weren’t the correct type. 

Huh?  Single entity stores were working just ducky, but trying to work with many-to-many relationships was failing.  The many-to-many definitions in the hbm.xml map files were all fine — trust me, I double-checked them about eight million times last night between 11pm and 1am when I finally quit last night.

This morning I finally found a Google hit that pointed me in the right direction: incorrect storage of the referenced entity, causing a null value in a member of type “Int32”.  You have to be sure you correctly set your collection properties in both sides of a relationship you’re trying to store via NHibernate.  It turns out I was incorrectly setting a collection on one side of my relationship.

Here’s the working (but not optimized) code:

[Test]

public void CheckAddPersonWithOneType()

{

PersonEntity personToDB = tep.MakeDefaultPersonEntity();

//Add the Person to the PersonType object's collection

speakerType.Persons.Add(personToDB);

//Add the PersonType to the Person object's collection

personToDB.PersonTypes.Add(speakerType);

IDal<PersonEntity> pda = new PersonDA();

int storedID = (int)pda.AddEntity(personToDB);

PersonEntity fromDB = pda.GetEntity(storedID);

IList retTypes = new ArrayList(fromDB.PersonTypes);

foreach (PersonTypeEntity type in personToDB.PersonTypes)

{

Assert.IsTrue(retTypes.Contains(type));

}

//clean up list

speakerType.Persons.Remove(personToDB);

}

 The all important lines are here:

//Add the Person to the PersonType object's collection

speakerType.Persons.Add(personToDB);

//Add the PersonType to the Person object's collection

personToDB.PersonTypes.Add(speakerType);

speakerType is one end of the relationship, persontoDB is the other.  Persons and PersonTypes are the collections holding the other end of the relationship.

Remeber that this is a many-to-many relationship?  Remember that m-m relationships need a link table between the two entities?  What’s cool about NHibernate is that I don’t have to fool at all with storing stuff in that link table.  NHibernate handles all that for me when I store the entities with one statement:

int storedID = (int)pda.AddEntity(personToDB);

Way cool.

NHibernate’s learning curve (and #%*@!! documentation) is tough going, but I think I’m going to like things once I get up to the next plateau.  I’m also weary of trying to wade through examples which aren’t much help.  Hopefully I’ll be able to put up some clear examples once I get things working well and refactored for clarity.

Now Playing: Guster — Lost and Gone Forever.  I’ve been playing a lot of Guster and Coldplay lately.  Well, a lot of other stuff, too, plus Springsteen’s The Rising seems to be stuck in my audio stream for some reason.  In any case, I really dig the cool harmonies and melodies.  Plus the lyrics are pretty thoughtful.  (Unlike The Mavericks, who I love but seem to be of the Gene Autry school of  All My Songs Have Five Words.)

Thursday, October 27, 2005

Life Is Not Just Coding

Check out Eric Sink's blog on how folks at his company blow off a bit of tension and relax. His article works on a couple levels. First off, it's very important to occasionally take a break from coding and do something fun to recharge your brain cells. Secondly, his description of boiling a frog (read the article for that to make sense, please!) is really pretty apt. Lastly, there's some serious gold in his remarks about the end of an era and how important it is for folks to see each other and avoid writing code non-stop for eight hours each day. Now Playing: Sublime -- various (Rhapsody sampler). I know nothing about Ska, so I thought I'd try this sampler stream from Rhapsody. I like the melodies, and the singer's got a cool voice, but I don't care for the constant references to drugs and profanity. I'm far from a prude, I just don't care for non-stop crap in my music.

Wednesday, October 26, 2005

Dayton-Cincinnati Code Camp Update

I've finally got a Code Camp page up at the group's website for our big event on January 21st, 2006. I'll continue blogging about the Camp here, but be sure to stop by the DevGroup's website for The Official Word. Check James's blog occasionally for news too. Now Playing: Maroon 5 -- Songs About Jane. Wow, great vocals! The lead singer's voice reminds me a whole lot of the guy from Simply Red, and it's a very pleasant recollection. The music's sweet, too.

The End of an Era

Since June 13th, 1985, the Wine Forum on CompuServe has been a neat corner of cyberspace where folks could meet, hang out, and gab about good wine, beer, spirits, coffee, food, and anything that came to mind.  I stumbled across it not long after Pam and I were married in 1993, and eventually ended up as one of their Section Leaders managing the Food and Beverages section where folks gabbed about good cooking and pairing food with beer, wine, or whatever.  For a number of years wrote an online column called “Jim’s Kitchen” where I explored pairing good food and wine.

Sadly, Jim Kronman, the forum’s founder and leader for the last 20 years, was just notified that AOL/Netscape is closing the forum come 3 November.  AOL, a clueless bunch of feckless, stupid idiots, bought out CompuServe somewhere back in ‘96 and promptly set about running CompuServe into the ground.  Yet another reason why AOL is the premiere case study in How Not To Run Things.  It’s another sad milestone that most all CompuServe communities, some of the first anywhere in cyberspace, have all been shut down by now.

The Wine Forum was instrumental in kicking off my interest in good food and wine.  I made several close, life-long friends there, and met folks who were incredibly generous with their knowledge, time, and yes, wine.  I’ve been fortunate enough to have tasted some amazing juice that I never would have had access to on my own.  Elliot Apter had us to a party where I had several different vintages of d’Yquem, a 1935 Graham’s Port, and some amazing Bordeaux.  Michael Straus had Pam and I over for a number of dinners, sharing his amazing cooking and some amazing gems from his cellar.  His passion about food, wine, and good coffee reinvigorated me, and his attitude toward things gave me the boost in confidence to be able to speak up about my preferences for various things, regardless of the opinions of others. Dave Sit held wine for us during our nomadic stint, cooked us great food, served us staggering wines, and steered us to some amazing restaurants in the DC area.  The list could go on for some time, but maybe you get the idea.

It’s too bad that such a neat corner of cyberspace is gone, but I suppose that’s just part of evolution.  It’s a sad day and I’m bummed, but it’s also a neat time to reflect on the many fine relationships and experiences I had through the forum.

 

Monday, October 24, 2005

Dayton-Cincinnati Code Camp Registration Live!!

We've got a live registration link for the Dayton-Cincinnati Code Camp on January 21st, 2006! Check out my earlier posts on the Code Camp here and here, then go sign up if you're in the area and interested in attending! Are you a speaker interested in presenting? Please check out the submission guidelines on the first post and get your topics in! Now Playing: Santana -- The Essential Santana Two disks, 32 songs, loads of Santana goodness. Amazing that the guy's put out nearly 40 albumns!

Great Online Sci-Fi Resource

Baen books, home of books by incredible authors like Kieth Laumer, Larry Niven, Jerry Pournelle, David Drake, and 15 or 20 other wonderful scribes, has a passle of their classic books available online for FREE. 

Check out their library here, and be sure to read Eric Flint’s thoughts about online piracy and why Baen has put so many great titles up.  The draconian fools in the recording industry ought to pay attention to Flint’s thoughts that “ Any cure which relies on tighter regulation of the market — especially the kind of extreme measures being advocated by some people — is far worse than the disease.”  Maybe they’d stop prosecuting 12 year olds for downloading music and open up a better economic model.  And maybe monkeys will fly out … 

Nevermind.

In any case, check out the library.  They’ve also got downloads for various readers, which makes it even better!

I’d run across this some years ago, but had forgotten about it until I saw a reference on Instapundit today.

Thursday, October 20, 2005

Political Blogging: The Coburn Anti-Pork Amendment

Warning: incandescent, searing rant against my Republican party. Keep small children away from the screen. Both my Senators here in Ohio voted today against the Coburm amendment. The Coburn amendment would have moved some of the rediculous amounts of pork in the budget over to paying for hurricane Katrina reconstruction costs. (Some of the best commentary on the Coburn amendment is at Instapundit. Just keep scrolling through and checking the links.) Only 13 Senators had enough brass tacks to vote against pork in order to help pay for reconstruction in Lousiana. There's a complete list of how the votes fell here. I am absolutely disgusted that my Republican senatorial representatives care less about fiscal sanity than idiotic, bloated, asinine earmarks. In fighting the war on terror, my President has shown great courage and leadership in standing up to the most difficult, unpopular effort faced by a leader in a long time. I wish he would show some of that same courage and leadership in domestic matters, but he's abdicated everything to the irresponsible children on Capitol Hill. Tomorrow I'm calling the offices of both Senators DeWine and Voinovich to let them know they won't see one red cent of campaign contributions from me. I'm not a huge contributor, but I refuse to spend my money to re-elect either one of them. I will also most likely vote for whaterver Democrat is running against them when they next come up for reelection, and I'm going to make that clear to their offices. Neither Senator has shown an ounce of fiscal leadership. Right now I think the only way to fix this domestic insanity in Washington is a return to divided government where the Presidency and Congress are controlled by different parties. My Republican party, supposedly for small government and less spending, has shown itself completely incapable of having control over the reins. At least a divided government will somewhat limit this madness.

Now Playing: Dire Straits -- Alchemy

I'm hoping Mark Knopfler's amazing guitar can somewhat calm my rage.

More on NHibernate and Nullables

NHibernate has their v1.0 release out.  Incorporating that with James’s Nullables2 (for support of native .NET 2.0 C# Nullable types) is a snap.  Download the 1.0 release files, drop the DLLs from the project’s bin directory into NHibernate.Nullables2\NHibernate Files\ and rebuild the Nullables2 solution.  Move the NHibernate.Nullables2.dll and the regular NHibernate DLLs wherever you need them in your projects.

By the way, to get green lights in NUnit, you’ll need to reference Nullables2 in both the project where you’re doing your data access and the project holding your unit tests.  Otherwise you’ll end up with NHibernate.MappingException errors stating that “could not interpret type” with the specific NullableType called out.

Now Playing: Off Kilter — Celtic Armadillo.  Five guys in combat boots and kilts mix bagpipes, drums, bass, guitar and keyboards.  We saw these guys at Disney World’s Epcot center where they put on a terrific show.  They do plenty of traditional Irish music, but they’ve got some contemporary things too.  Alive is an absolutely killer track.  The only downer on this CD is that it seems like a pretty amaturish production — there are a couple tracks which run over each other.  That really pisses me off because I had to shell out $20 for the disk.  Bah!

Wednesday, October 19, 2005

NHibernate Associations

Looking for good documentation in NHibernate’s help files on associations (relationships between objects) ?  Here’s what you’ll find in the 1.0.0.0 NHibernate Documentation file, right after the text that says “Association mappings are often the most difficult thing to get right. In this section we'll go through the canonical cases one by one, starting with unidirectional mappings…”

Nice, huh?  Check out the Hibernate dox, even though Hibernate’s a Java project.  The concepts seem to be pretty clear and I’m hoping I’ll be able to translate things to NHibernate without too much trouble.

Now Playing: The Corrs — In Blue.  I was looking for Celtic pop.  This may be a little too dance music-ish for me, but the harmonies seem nice.

NHibernate Tricks: Locating the Mapping Files

The various examples I’ve seen of NHibernate all had the mapping files (*.hbm.xml) in the same location as the business entities (BEs) they map.

That kind of sucks for trying to abstract out your data access.  Storage-specific stuff shouldn’t be co-located with your BEs, it should be in a storage-specific project.  Like a Data Access Layer project.

No problem.  Create or move your map files in your DAL project.  Make sure the map files are embedded resources, not content.  (Check the “Build Action” field in the file’s properties.)  Ensure the DAL project references NHibernate.dll — but you figured that out already since you’d have had beaucoup problemos with your “using” statements, so why am I beating a dead horse?

Now mod the constructor of the class you’re using to do all your data access, adding in a statement to add the DAL assembly to NHibernate’s Configuration.  Here’s what I’ve got for my PersonTypeDA class:

public PersonTypeDA()

{

   Configuration cfg = new Configuration();

   cfg.AddAssembly("nUGSoft.DAL");

   factory = cfg.BuildSessionFactory();

}

You’re now telling NHibernate to look at the current assembly where you’ve embedded the mapping files for your BEs.  The single statement cfg.AddAssembly("nUGSoft.DAL");  loads all maps in the assembly, so you don’t need to worry about trying to keep straight which BEs are referencing which others are referencing which others are referencing which others… Nevermind.  You get the picture.

Poof!  Everything’s happy, and you’ve got your persistence-specific stuff separated out where it belongs.

Shiny.

Now Playing: Neutral Milk Hotel — In the Aeroplane Over The Sea Nifty stuff with lots of very different musical instruments (flugelhorns!), odd lyrics.  Lots of fun.  I told James it was kind of like goat meat.  Interesting once, but I’m not sure how often I’ll eat it.  Wait, that was either Rage Against The Machine or System of a Down.  Nevermind.  But it was a cool analogy all the same.

Tuesday, October 18, 2005

Rhapsody: Terrific Music Service!

I’ve been griping about all the money James has been costing me via his music recommendations.  Now he’s gone and made a recco which will not only save me significant bucks, but allows me to check out scads music I haven’t had the opportunity to before: Rhapsody online music.

Rhapsody’s “Unlimited” service costs $10 per month, but gives you unlimited browsing of their huge online library — something like over 1 million songs.  I think their UI is a bit sucky, and it’s a performance hog on my older, slower PC (1.3Ghz, 512MB RAM), but the service itself is incredible.

In the three days since I signed up I’ve been scattered all over the music dartboard: Springsteen’s Born to Run and The Rising, The Who’s Quadrophenia and The Kids Are Alright, Dengue Fever (Cambodian rock), The Clash’s Give ‘em Enough Rope, Knickelback, Sigur Ros, The Kinks, Drive By Truckers, Coldplay, and about 20 other interesting things I can’t remember.  (One of my gripes is the lack of a useful history indicator in Rhapsody’s UI.)

This really is great stuff, because for $10 per month I’m able to chase down all kinds of stuff I never would have looked at before.

The final drag is that they’ve got nada, zilch, zero Tubes in their library.

Philistines.

<disclaimer>I get no money or any comp from these folks.  They’ve no clue who I am. I just like the service!</disclaimer>

Wednesday, October 12, 2005

Manly Man Blogging: Burley New Mower

Being a stay at home Dad who takes care of the vast majority of cooking, kid transportation, diapers, and laundry, I fight for every instance where I can assert (defend) my Male Role Modelness.  Today is just such a glorious day.

I now have in my shed one of these beauties. It’s actually a used older model, but still basically the same masculinity-loaded piece of machinery.  9.5 horsepower motor.  Enough noise to require ear protectors.  (Which is a bummer, since I normally listen to my iPod while mowing.)  A real gearbox with four forward and one reverse speeds.

It will also cut much higher than my soon to be retired mower.  This is nice because I try to keep my lawn fairly long as part of my mostly-organic lawn program.

Best of all?  A 33” cutting path via two, count ‘em, two blades.  My lawn usually takes me 65 – 75 minutes to mow with the old mower, and I pushed that thing fast as a workout.  Using my new toy today it took me 30 minutes.  30 friggin minutes!  And that was with having to figure out how to efficiently get this monster around the flowerbeds and trees throughout the yard, plus the usual distractions of my daughter showing me how well she’s learning her cartwheels.  (A distraction, but what a good one!)

There are a couple downsides to this.  First, it’s a monster to get around corners and curves in the yard, but mowing the lawn’s one of the few regular exercise events I get, so that’s not a bad thing.  Secondly, because it’s such a monster, I won’t be able to shovel off mowing to my kids until they’re a few years older than I was planning on.  (Six isn’t too young for my daughter to use a mower, is it?)

Now Playing: Franz Ferdinand — Franz Ferdinand.  Another great recommendation from James. He’s really starting to annoy me with his recommendations for music.  I’m blowing much of my discretionary budget (fun money) on stuff he’s pointing me to, curse him.

NHibernate Update

Still slogging away at NHibernate, still learning many good lessons.

First off, start with a small data model.  Get that working, then add in other related chunks. This will save you many headaches while you get NHibernate’s complex mapping properly created.

The project I’m working on has a moderately complex data model:

12 tables, 11 of which have various relationships.  NHibernate requires that you have all dependent relationships mapped out before it will work properly.  This means you can’t just wire up a few of these entities, say Person, PersonType, and PersonTypeLink, and press on.  You need to get <bag> or <set> elements defined in your maps for all relationships, not just the ones you’re interested in.

I’m most of the way through getting all entities mapped; however, if I had to do it over again, I’d literally drop tables I wasn’t concerned with, get maps and tests running on a subset, then proceed with wiring in other related tables.  For example, following on the group I listed above (Person, PersonType, and PersonTypeLink), I’d drop everything else, get maps and tests working on those three.  Then I might add in Post and PostType, followed by Subscription, SubscriptionLink, and SubscriptionFormat.  Next would come Location, Event, and Attendance.  Then I’d have Newsletter as the last table — an easy one with no links as dessert.

In one sense, this is sort of what I’ve done.  I went so far as to create another database and built in tables one by one with the appropriate references (but none of the “fluff” fields), then I used ObjectMapper to generate classes and NHibernate’s mapping XML.  This let me check what I was getting from ObjectMapper when reverse-engineering my existing table and classes.  (ObjectMapper calls that “syncronization.”)

Two more semi-major modifications have to happen to my business entities:

1) I have to add members to store other business entities for tracking relationships (one-to-many, many-to-many).  NHibernate works with both a Parent and Child object at the same time, so it gets/sets them via a Property.  I really didn’t want to add this weight to my business entities, plus this ties the entities somewhat to NHibernate’s concept of operations.

2) I have to implement GetHashCode() for all my business entities, or at least any entity based on a link table with composite IDs.  NHibernate needs GetHashCode() for its various Dictionary and List functions.  Implementing GetHashCode() is fraught with peril, and I’ll have to carefully think how to get this done correctly.  (Read Wagner’s Effective C# for problems with GetHashCode().)  I’m not looking forward to this because it’s a difficult piece of work and it looks like it’s a showstopper until I get it done right.  Bother.

One of the most irritating things about NHibernate has been some less than clear error messages.  I beat my head on the table for a few hours trying to figure out why a completely sane map file was generating schema errors telling me that the <id> element wasn’t a valid child of the <class> element, and that a <discriminator> element was expected.  (Discriminator elements let NHibernate, well, discriminate between different types of an entity, such as when you’ve got a Person table which holds Professor and Student entities, but is keyed off of a PersonType field.  See Justin Gehtland’s article on the ServerSide for details.) My Person table didn’t store different types of Person entities, it just referenced a link table to store that information — and I’d already mapped that table.  Those schema errors finally cleared up when I got all inter-related tables mapped, so it wasn’t really a schema issue, it was one entity missing dependent relationships.  Arrggghhh.

I like NHibernate’s concept, and I like the clarity of its use once you’re past the initial stages.  Setup and knowledge building stinks, though.  I’m nearly done with this mapping (finally!), and I’m looking forward to pressing on with getting some actual implementation done on my system.

Now Playing: The Killers — Hot Fuss.  Nice stuff, funky sound, good beat.  No clue what they’re singing half the time, though.  Hopefully they’re not singing the praises of Howard Dean, Ann Coulter, or some similar idiot.  <shudder>

Subscribe (RSS)

The Leadership Journey