This post is HOPEFULLY premature and will be HOPEFULLY be updated at a later date.
I attended the Microsoft Pre-Launch event for Visual Studio 2008 and as with every other person that attended, I was given a wealth of free swag. The swag included 2 books, both of them focused on using Visual Studio Team Systems and the Agile methodology. I won't get into the Agile methodology in this post, that's for a later post (but believe me, it's one thats been a long time coming). Don't get me wrong, I'm not knocking the free swag...free swag is like free food...it has no calories! (Ok, I guess am technically knocking one of the books, but its not the authors persay, its more the principle of the matter)
What I am going to knock, is the lack of anything REMOTELY resembling a useful example, which I will dive into in a moment.
Just to give you some background, I was skimming through one of the books this weekend and the authors wrote about a mock company that goes the route of adopting the Agile Methodology and in turn, Unit Testing. Good for the mock company! Unit testing is a great idea, one that I frankly wish that I was more motived/forced to implement (honestly no sarcasm implied here). I really buy into the whole idea of unit testing and see how in subsequent iterations, those unit tests give you the piece of mind to walk away at 5PM on a friday and know that the code you changed at 4:59 didn't break anything.
Okay, now that I've let you know that I do indeed believe in Unit testing, here's my beef. 99% of every book/article I've read in the past 2 years on the subject of XP/Agile/Unit testing has given me PISS POOR examples of a unit test and how to implement one. Such as the free book I recieved with the mock company that adopted the Agile methodology. Their examples of "unit testing" comprised of "unit testing" a fake class that calculates area. Don't take this personally, but if you don't know how to calculate area, get yourself back to high school....no....GRADE school. Honestly, who DOESN'T know how to calculate area?!?!?! With that being said, area is probably a good example to use to illustrate "unit testing" since everyone knows how to calculate it and how it SHOULD be calcuated. What it DOESN'T illustrate is anything remotely resembling a "unit test" that I would do in my day to day job dealing with data driven applications!!!!!!!!!!!!!!!!!!!! It would be NICE for once to see a unit test testing how many rows are in the returned datatable, or how many "widgets" were ordered by company X in June 2006 from the AdventureWorks database (isn't that the point of the AdventureWorks database? A common database that everyone Microsoft oriented is familiar with?).
Can anyone tell me the last time they actually wrote a function to calcuate area? Probably not since Comp Sci 101 for christ sake!
What I would like to see from books and articles is examples that I can actually apply to my day to day work, not examples that I can apply to shit I probably wrote back in my high school programming class! Now, I am a person that can openly criticize myself (in fact I PLEAD with you to disagree with me and debate issues!) and I can say that in some of my past postings, and especially presentations, I've presented BASIC examples that most likely anyone could have figured out themselves. THAT is why I am making it publicly known that I am issuing myself a cease and descest order to simple examples that have no relavence in anyones day to day work.
From here on out, any postings/presentations that I create, I will NOT allow myself to provide people with examples that don't help them in their day to day lives. I will most likely open with 1 MAYBE 2 easy examples to get the fundamentals out of the way, but after that, it's nothing but examples that you show you "advanced"/"day to day" concepts that you can go and apply moments later. I myself want to read/hear about examples that I can put to good use, NOT how to do something I've known how to do since grade school!
All the above being said I am planning to "practice what I preach" and in my 2 upcoming presentations give the audience useful examples. I've noticed in past presentations based on questions and feedback, that I am not presenting information that 75% of the audience doesn't already know. The 75% of the people in the audience are there to hopefully gain a deeper understanding of the material, which in the past I don't feel that I've fully lived up to. So come this tuesday (Feb 12th Office Geeks keynote), I plan to present some USEFUL examples to my audience.
All the above being said, here are some GOOD examples of articles written that actually give you USEFUL information:
Here are what I find to be some of the WORST examples of articles written that really don't tell you shit about how to use something: