Thursday, July 26, 2007

Working With The WebBrowser Control in WinForms

The WebBrowser control is a handy widget because you can use it to display complex content rendered in HTML in your Windows Forms applications.  The WebBrowser control, like a number of other things in .NET, is simply a wrapper around a COM control.  Additional features can be pulled from that underlying COM control by writing your own feature wrappers; however, I was able to get my required functionality straight from the .NET wrapper.

Documentation’s not all that clear on the WebBrowser, and a lot of examples actually are written for the simplistic navigation model where you’re merely programatically pointing at existing web-based URLs or files on a filesystem.  Things get a little trickier when you need to work with streamed content of any form, which is of course what I’ve been doing…

The WebBrowser holds content to render in an System.Windows.Forms.HtmlDocument object.  If you’re navigating to web or file-based content then the control manages the lifecycle of that object for you.  Life is easy.  If you’re working with some sort of stream or text data that you want to load directly into the HtmlDocument, then you’ll need to first have the control load up an empty HtmlDocument for you.  You’ll then make use of the HtmlDocument’s Text, InnerXml, or OuterXml properties to load that content.  The code below walks through this sort of case.

NOTE:  The following snippets are transmorgified from my exisiting solution and aren’t necessarily complete or compilable.  For clarity’s sake the snippets are also fuglyware, meaning there’s no error checking or good design principles.  Do the right thing and make your own code smell-free.

First, create the control:

WebBrowser browser = new WebBrowser();

Now navigate off to the “about:blank” URL which will cause a new, empty HtmlDocument to get loaded in the browser:

browser.Navigate("about:blank");

Document loading in the WebBrowser is asynchronous.  You’ll need to wait around for that document to complete its loading before you proceed on.  There are a couple different ways you can handle that.  The WebBrowser.StatusText will give you clues about the Document’s status; however, the preferred way is to handle the DocumentComplete handler.  I use a simple boolean flag and wait on it being toggled by the handler:

private bool canProceedWithNextDocLoad = false;

 

private void contentPane_DocumentCompleted(object sender,

                                           WebBrowserDocumentCompletedEventArgs e)

{

    canProceedWithNextDocLoad = true;

}

A helper method is used to wait for the document to load:

private void WaitOnDocumentLoad()

{

    //canProceedWithNextDocLoad is set true in DocumentCompleted

    while (! canProceedWithNextDocLoad)

    {

        Application.DoEvents();

    }

    canProceedWithNextDocLoad = false;

}

Actual navigation flows like this: get some content from your data source, load the content into the Text/InnerXml/OuterXml property, and immediately wait for the document to finish loading.  Those steps together looks something akin to this:

string htmlContent = ContentAgent.GetContent("someTargetToGetContentFor"");

browser.DocumentText = htmlContent;

WaitOnDocumentLoad();

The ContentAgent.GetContent call is simply how we’re handling our data access.  The real working parts are actually more complicated because I’m getting XML content from the database and running it through an XML Transform using DocBook stylesheets.  I’ve blogged elsewhere about that, so I just simplified some stuff here for clarity’s sake.

I’m working straight with the DocumentText string property.  You can also make use of the InnerXml or OuterXml and alter parts of the HtmlDocument’s Document Object Model directly.  It was easier for me to just deal directly with the entire contents.

There’s a lot of other complexity to be considered here, and there are a number of other features you can tack on.  Navigation in this manner loses the history list, so you’ll need to implement something yourself if you want to track history.  I use a simple queue to handle that.  Another thing is that all the regular navigation buttons such as forward, backward, stop, refresh, and home aren’t available, so you’ll need to work out the details on those bits of functionality — but it’s not difficult once you’ve got the basic navigation moves down.

So there you have it.  Jim’s version of Cliff Notes on the WebBrowser control.

Wednesday, July 25, 2007

Telerik's Controls on MOSS

Telerik has a great whitepaper laying out how to use their r.a.d. controls in SharePoint 2007.  It’s one of the better whitepapers I’ve seen and covers everything from where various files go to creating manifest.xml files and wrapping up deployment packages via WSP file creation in build scripts.  (I wish they would have taken the next step and showed using build targets to actually deploy onto the server with stsadm, but this is minor quibbling.)

I used Telerik’s radTreeView in a project earlier this year and loved its quick flexibility.  Third party contols sometimes bloat pagesize, but I think that project saw an increase of 125K or so, which for our implementation was just fine.

Check out the whitepaper even if you’re not looking to use Telerik’s controls.  There’s a lot of good info therein on general SharePoint development.

MOSS Contact Details Web Part Image Issues

Problem: Updating a SharePoint page’s contact information for a page hosting the Contact Details web part causes an error when saving the page’s settings.  The error page details are simply “An unexpected error has occurred.”

Cause: You can include a photo of the contact in the details.  The Contact Details web part creates a thumbnail of the image that’s 140x140.  The web part barfs all over itself if the target image is smaller than 140x140 and isn’t smart enough to just use the original image.

Fix:  Use an image that’s at least 140x140.

Rant: I become more and more amazed at the awful error reporting in SharePoint.  I’ve been working around various corners of SharePoint for six or eight months now and I am continually blocked by the incredibly crappy error messages.  It’s completely beyond pathetic, to the point of me wanting to deliver a couple truckloads of fresh manure to the SharePoint team’s building.  The only way to find out the cause of this particular error is to troll the MOSS logs — which site and content owners will probably not have access to. 

Do yourself and your users a favor: send out appropriate information about errors.

Rant off.

Another Handy SharePoint Blog

I just ran across Mark Arend’s blog on MSDN today.  The content there seems to be just at the right level of detail and covers a broad range of topics from development to administration to tools.

Good one to add to your reader if you’re working in the MOSS space.

Friday, July 20, 2007

Brevity Rocks

So I can get as long-winded as the next guy, but generally I’ve great appreciation for concise, focused communication, particularly in e-mail.

With that in mind, how about this great idea?  Five sentance e-mails.  It’s the right thing to do.

(Via Ben Carey’s always insightful blog.)

Thursday, July 19, 2007

Should MS Buy Up Security Exploits?

Slashdot is 99% crap, but on occasion there’s an interesting post.  This article from today points out the black market where exploits are auctioned off and posits that Microsoft ought to buy up those exploits.

I think that’s an interesting premise, and the poster brings up some of the interesting complexities surrounding the idea. 

Regardless of where Microsoft is now with security, the idea is an intriguing one and might at least help patch up Microsoft’s perception as a company that doesn’t care about security.  (A perception I vehemently disagree with, BTW.)

Wednesday, July 18, 2007

Recipe Blogging: Two Zucchini Recipes

It's been a very, very long time since I've posted up any recipes here -- perhaps even before I started working on the book.  I'm finally back to enjoying cooking after the long haul of the book and starting a couple new jobs, so I'm in the mood to plop up a few recipes from time to time.  Fear not, I’ll keep the majority of the posts here technical.

The following two recipes are centered around some of the great bounty we get from the Communtiy Supported Agriculture program we subscribe to.  Local farmers sell fresh produce directly to consumers, which means we can get some great fruits and vegetables from farmers in the region.  It works out quite nicely, and we've been really pleased with the selection we've been getting.

Without further ado, two recipes for making tasty zucchini.

Zucchini and Kohlrabi with Parmesan and Sage

This recipe's all about simplicity, so make sure to focus on the freshness of the ingredients.  Also, look up some real Italian parmesan and avoid the faux-Parmesan stuff made in Wisconsin.  If you're using that stuff in a green can then do yourself a favor and go find some real Parmesan.  You'll throw out that green can in a hurry.  Good quality sea salt also helps bring out the best in the dish.

* 2 - 4 cups extra virgin olive oil
* 1 medium-sized zucchini
* 1 medium kohlrabi
* 6 - 8 large sage leaves
Parmesan cheese
sea salt

Place a heavy, tall sauce pan or frier over a burner.  Fill it to a depth of two or three inches with olive oil.  To avoid the oil bubbling over when frying, the pan/pot shouldn't be any fuller than 1/3 of its height.  Turn the burner on medium high.  Continue with preparation while the oil's heating up.

Slice the zuke into quarters lengthwise -- think pickle spears.  Cut the spears into 1/4" wedges.  Shoot for consistency in thickness to help the pieces cook evenly.

Peel the kohlrabi and slice in half vertically.  Tip each half on the flat side, then slice into 1/4" thick pieces.  Cut those pieces into 1/4" wide spears, then cut those spears into 1/4" pieces, leaving you a metric passle of 1/4" cubes.

Check the temperature of the oil if you've a deep frying or candy thermometer.  350F - 390F is about right.  If you don't have a thermometer then carefully drop in a piece of zuke or kohlrabi.  THe oil should bubble around quite nicely.

Deep fry the zucchini in small batches, carefully lowering the pieces into the oil with a slotted spoon or frying spider.  Stir them around a bit and cook for three to five minutes until the pieces are, as the TV chefs would say, "GBD", or "Golden, Brown, and Delicious."  Transfer to a bowl lined with paper towels and season each batch lightly with sea salt.  Add a layer of paper towels after a few batches to help drain off excess oil.

Fry the kohlrabi pieces in the same fashion, transferring to paper towels and seasoning each batch.

Finally, carefully plop the sage leaves in the oil and fry them for a moment or two until they're crisp.  They'll lose a bit of their color and will slightly shrivel up.

For final assembly, pull out a pretty bowl and carefully pour in the fried kohlrabi and zucchini pieces.  Dust with freshly grated Parmesan cheese, then place the sage leaves over the top.

Enjoy!

Zucchini with Honey

As with the previous recipe, this is all about simplicity and the quality of the ingredients.  Get some good-quality honey from a local producer or the gourmet section of a store.  Zingermans has a fantastic selection of honey from around the world if you're looking for something exotic.

* 1 large or 2 medium zucchini, quartered and sliced into 1/4" wedges
* 2 tsp. wild honey

Heat a bit of olive oil in a sautee pan over medium-high heat.  Toss in the zuke wedges and season with sea salt and freshly ground pepper.  Sautee for 2 - 3 minutes until they start to caramelize just a bit.  Swirl in the honey and continue to cook for another minute or two.  By this time, depending on the heat of your pan, the zuke should be slightly browned, just tender in texture, and nicely coated with the honey. 

Pour into a serving bowl.  Deglaze the pan with a tablespoon or two of water and pour those drippings over the zuke in the bowl.  Serve immediately.

Tuesday, July 17, 2007

Useful (or Not So) Error Messages

Error messages always take a bit of thought to get right.  You need to have the right amount of detail in them, and that level of detail’s different depending on where the message is going. 

Depending on the verbosity level you’re wanting, error messages to logs should have timestamp info, call stack traces, etc., and of course information specific about the error condition itself such as actual vice expected states or data.  You’ll need that level of detail when you’re trying to troubleshoot the condition.

Error message to users shouldn’t include any of that information because it will overwhelm the user and possibly expose too much info about your system, thereby creating a security risk.  That said, you do need to tell the user some useful information — unlike the error message I’m staring at from GMail’s signup screen where I’m trying to enter my initial information.  I’ve put in a couple different passwords and am rewarded with a red bit of text which merely says “The password you gave is incorrect.”

OK, so I’m not a rocket scientist, but this is not particularly helpful.  The password doesn’t meet their minimum standards and they aren’t nice enough to tell me what those standards are.  Is the password too short?  Does it contain illegal characters?  Does it not contain required characters?  What are the required types of characters, and how many do I need?

Do yourself and your users a favor.  Don’t leave them hanging with vague error messages.  Put a little thought into the messages you’re creating when something’s gone south.

Saturday, July 07, 2007

Why PDB Files' Version Matters

Jim Gries, absent too long from his blog at Gooey Bugs, puts up a nice post with some insight as to why you need the PDB files from the exact build you created your binaries with in order to use the debugger.

You ought to think hard about building PDBs even for your release versions and archiving those with the released binaries.

Check out Jim’s past posts, including his series on Debugger Tips, Tricks, and Tools.  It’s been a long time since I read through those, and I’m finding a lot of useful stuff there.

Friday, July 06, 2007

Book Review: The Art & Science of CSS

The Art & Science of CSS, Cameron Adams, et. al.  Published by sitepoint, ISBN 0–9758419–7–1

This is really another amazing book from sitepoint which has been putting out a great line of web design/standards/crafting books.  I loved The Principles of Beautiful Web Design (review here) and James has spoken very highly of HTML Utopia: Designing Without Tables Using CSS.  This book seems to follow right along the same bent: concise, well-written content at exactly the right level of detail to convey the point the authors are working on at the moment.

Art & Science won’t teach you the fundamentals of flow, divs, spans, or even CSS basics like classes and IDs; however, the progress through the book is so well-paced and clear that you’ll be able to fill in any gaps in your knowledge as you read along.

The book has seven chapters, each on a specific aspect of CSS such as Headings, Images, or Navigation.  The chapters lay out basic premises of the topic, such as how you want to think about your headings as part of a page/site’s branding and impact, then move on to details of creating and implementing a beautiful design.  Each chapter makes its points in small, incremental steps such as starting off with basic vertical navigation, progressing to more advanced horizontal such as navigation with hover/current location changes, then finishes up with advanced concepts like matrixing menu images so you can show complex combinations simply by dealing with positioning.

All of this is accomplished in a style and depth of content that’s applicable to folks with rudimentary design/CSS skills (i.e. yours truely) as well as accomplished web designers.  What really amazes me is that the authors hit such a broad audience (and did it well!), covered a broad range of topics in detail, and pulled it all off in just over 200 pages.  (And those pages, by the way, are glorious full color.)

This is a great book for learning how to deal with CSS in an elegant, well-architected fashion.  It’s simply a terrific book if you’re doing anything at all with CSS.

Now Playing: Mike Farris — Salvation in Lights.  Holy smokes, this is some amazing stuff.  Farris used to front for Double Trouble for a bit and this album’s right along that style, except that it’s Americana/Gospel.  Farris has an amazing, HUGE voice and the band behind him tosses out great tunes to back him up.

Wednesday, July 04, 2007

Blogroll Slightly Updated

I’ve done a bit of pruning on my blogroll (right sidebar, if you please), and I’ve also added in links to all my colleagues at Quick Solutions who have blogs that I know of.  I figure I’ve just gone over a couple months at QSI and they’ve not thrown me out of the door (yet), so it’s safe for me to link to some of the Really Smart folks I work with.

By the way, Quick is always looking for good folks in a wide range of disciplines.  Please drop me a line (contact link on sidebar) if you’re looking for work in the DBA, .NET, Java, business analyst, or program manager fields.  We’ve got plenty of positions for people who are interested in finding a terrific place to work.  Are you interested but worried your skills might not fall right in one of those slots?  Drop me a line all the same — we’re open to helping good folks grow their skills.  It’s a long-term thing <gasp!>.

Book Review: Pro .NET 2.0 XML

Pro .NET 2.0 XML by Bipin Joshi. Published by Apress, ISBN 1-59059-835-3

This book has a number of flaws, but it's still a useful book for learning about using XML in the .NET world.

First off, the flaws: it’s rather shallow and leaves out details or concerns on a number of topics.  Examples include skimming over a DataSet’s ability to infer a schema when reading data in.  Are there any drawbacks?  When would you use this?  When might you want to avoid it?  Secondly, the voice is a litttle clunky at times and there are some annoying typos/grammar issues; some better editing would have helped the author out a lot.  Additionally, I found it frustrating that a lot of the text is little more than a walk through of the code examples, lending little insight about the concepts.  I found myself thinking to the tenet behind good code documentation: tell me the why, not the what. 

Lastly, and this is an annoyance I’ve noticed in a number of books: default names are blithely accepted for controls, leaving the book littered with code examples like


private void button2_CLick(object sender, EventArgs e)

{

comboBox1.Text = ...

textBox1.Text = ...

textBox2.Text = ...

}

I find this incredibly annoying since there’s no connection whatsoever to the example graphic.  It’s bad in code, and it’s bad in a book.

So with the bad news out of the way, let me focus on the positives, because they’re definitely there.  There’s a lot of content on a broad range of topics.  There’s a very solid introduction to XML which is soundly and concisely written.  The discussion of SAX and DOM is nicely done, and there are a large number of fundamentals which are well-written. 

You’ll be able to learn the basics on things like XML’s use of DTDs, how schemas roll into things, the basics of validation, and a number of other topics.  The chapter on XML in ADO.NET has some good coverage on XML support in DataSets, and there are solid chapters on Web Services, SQL Server support, and a chapter which combines remoting, XML in ASP.NET, and configuration files.  Joshi also wraps in a chapter on XML’s role in WCF.

I think the book’s a solid introduction to XML in the .NET world, but I wish it hit a bit more detail and discussed possible tradeoffs or impacts of choices.

Book Review: Release It!

Release It! by Michael T. Nygard.  Pragmatic Press, ISBN 0–9787392–1–3

The subtitle of this book might as well be Architecture and Design for the Paranoiac. The book lays out some critical aspects to creating and rolling out stable software systems.  It’s directed to those working in the enterprise arena and need the utmost from stability, capacity, and overall design.  Nygard’s definition of “enterprise” is somewhat broad in that he considers “enterprise” to be any system providing mission-critical support to a business.  Regardless of how you define your particular software, I’m sure you’ll find something useful in this book.

Nygard presents the book from an anti-pattern/pattern approach: he uses case studies to illustrate how critical errors in design or implementation (anti-patterns) have caused disasterous outages.  He then moves on to show how application of solid design patterns could have avoided the problems.  He also spends some time going in to detail on how some of the outages have happened, including brief discussions on network packet captures and decompiling third party drivers.

There are a lot of solid fundamentals in the book: dealing with exceptions at system integration points, thread synchronization, avoid rolling your own primative feature libraries such as connection pools, and make sure to test third-party libraries which play critical roles.  The general approach of discussing anti-patterns followed by patterns is also a nice way of putting forth the material.

There are a lot of more complex bits covered as well, such as thinking ahead on how you’ll deal with bots and crawlers, avoiding AJAX overkill, designing ahead for and using session.  I also liked that Nygard talks about the importance of involving the customer in decisions on thresholds and other critical boundaries.

Despite the great content, there is a blistering flaw, IMO: A complete lack of solid implementation specifics.  Nygard doesn’t provide much detail at all on actual implementation of the critical patterns he espouses, nor does he point you in the direction of other sources of information.  For example, the Timeout pattern is held up as a vital aspect in many parts of the book; however, there’s no practical detail on actual code to implement a Timeout, and there’s only one reference to a practical implementation.  The Circuit Breaker pattern, central to many of Nygard’s architecture assertions, doesn’t have any code or a single reference to other material where you can find implementation details.

While I find that a major gap in the book, otherwise I think it’s a solid addition to one’s bookshelf.  The writing style’s very nice, his writing voice is light and concise, and the summary bullets in each section (“Remember This”) are of great value.  Additionally, there are plenty of references to other useful works.  (Just not for the patterns I complained about above.)

Saturday, June 30, 2007

On Getting Over the Hump (Or How I'm Finally Getting Features Done)

My first couple months at my new job with Quick Solutions have been wonderful.  I work with a bunch of great folks, I’m doing Agile development in a great environment, and I am heads down on project work somewhere between 65% to 80% of my time which is just fantastic.  Time formerly spent on the phone trying to swing deals with unlikely prospects has vanished, and the only SOWs I’m involved with writing now are those which have a solid chance of being signed by the customer.  I’m still commuting a long time (2.5 to three hours per day), but I’m ridesharing with a great co-worker who’s here on an H1B visa from India — so I get a lot of cool discussion time on wide-ranging topics.  (Plus he likes Dot Net Rocks so we’re spending lots of time listening to good podcasts.)

In short, life is good.

That said, I had a hugely ironic deja vu moment when I first started on my current project: it’s amazingly similar to the a technical manual viewer which I worked on years ago.  That project cratered due to all the classsic symptoms of a failed IT project: poor development practices (I left a company because of them), weak project managment, and little involvement with the true end users.  I was far too emotionally involved with that project because it was targeted to helping active duty Air Force folks work with the scads of tech manuals required in their daily work.  I’d been one of those guys for 11 years, and I wanted that viewer to get deployed come hell or high water because I knew how badly the paper tech manuals sucked.  Both hell and high water came and the system got put on the shelf without ever being fielded.  That sucked.

Obviously it’s something I’m still a little obsessed about, but I’m working on that.

Fast forward six or so years.  I start with QSI, spend a couple days sitting in on a terrific SharePoint 2007 Architectural Design Session with a smart guy from Microsoft, then head back to QSI’s dev center to find out what I’ll be working on.  I sit down with Jeff, the project engineer, to find out details on the project.  Deja vu: it’s another technical data viewer.  Since I had previous experience with a system displaying technical manual content, I took a feature for displaying HTML content in a WinForms WebBrowser.

To make a long story short, my feature turned in to a long slog through the poorly documented and very twitchy WebBrowser control, the powerful but somewhat mystical XslCompiledTransform class, and a crapload of work centered around getting poorly authored HTML documents converted into DocBook 5.x format.  The work was very frustrating for me because there wasn’t a whole lot of coding involved, just days and weeks spent slogging through standards, documentation, and blog posts.  Furthermore, when I could get some coding done it was usually centered around trying to nail down the WebBrowser’s flat-assed WEIRD eventing behavior, particularly when loading content into its Document properties or trying to deal with the infamous “about:blank” URI.  Test driven development?  Not particularly workable in that context.  Ergo, no green lights on the test runner, which is always frustrating for me.

Last week was finally a huge turning point for me.  Everything began to fall into place and I’ve made some great progress.  I’m getting tests written (first, even!), I’ve got content migrated into DocBook and am storing it in a database and transforming it enroute from the DB out to the browser control.  I got a history list working for backward/forward navigation (not available in the WebBrowser control when you’re streaming in content), and I even fired up the Enterprise Library’s Crypto classes to use some DPAPI encryption/decryption to protect the content in the database.

It’s nice to see some dots going on my short list of features on the project wall.  Folks on my team have been great about not giving me any serious guff on my lack of progress because they’ve realized how sticky a wicket the feature was.  (There’s been some good-natured ribbing on my lack of feature sign-off, but it’s usually been started by me poking fun at myself.)

One tangental note: the feature was badly underestimated and missed the boat with its initial planned complexity, but we were also able to do a serious Agile redirection enroute and make a significant change in the entire feature design to support a huge change in the customer’s needs.  Iniitally one of the customer team members had mandated the need to keep content in HTML.  We spent a couple weeks going down that road but pushing them to look hard at moving to XML and DocBook.  The customer finally agreed and we were able to get them in a much better place both for their current needs as well as getting them in a hugely better place for any future content work they’ll do.  Yay for Agile work where everyone’s friendly to requirements change!

I’ll post up some details on the hard knocks I’ve gone through with the WebBrowser, and perhaps write up a bit on how friggin’ easy it is to use EntLib for DPAPI work.  You’ve already seen some on my XslCompiledTransform work and I’ll have some more content in that area soon too.

All in all, I’m very, very happy with where I’m at now, particularly since I’m getting some features on the wall with dots on them.  (The original feature is still undotted, but it’s getting close to sign off!)

More on Vista's Security and UAC

Aaron Margosis, creator of the killer utilities PrivBar and MakeMeAdmin, has two great posts on Vista's security: one on the role of RunAs and how it replaces MakeMeAdmin, and another on why you can’t bypass the UAC.  The gist of his first post seems to be that Vista’s security model for regular users is much easier to deal with in a secure fashion than before. The second post has some good general information on privilege escalation, and why doing things in a *nix-like fashion with setuid or sudo would be a Bad Thing.  (Actually, ISTR from my *nix development time years ago that they’re a bad thing in the *nix world, so it’s not really a great example for him to use, IMO.)

Both posts are fine for non-developer folks using Vista.  Those types shouldn’t have been running with admin privileges on previous OSes, and I’m glad to see the issue’s somewhat easier for them under Vista.

Unfortunately, as a developer I’ve found the UAC issues in Vista to be too much friction and outright blockage for my work, so like some of my other friends doing development on Vista I've had to disable it.  I personally think this sucks because I’m adamant about developing with non-admin privileges.  I rant about it in my Security Fundamentals talks, and I’ve chided other developers I’ve run into who’ve admitted to developing as admins.

I’m not sure where the future will take me with UAC on Vista.  Having to give admin credentials for escalation numerous times during the day doesn’t bug me so much, but having to deal with file permission stupidity (like Jason talks about in his post linked above) is just insane. 

I want UAC to work for me as a developer because I absolutely believe in the principles behind it.  Unfortunately, its implementation is just too big a pile of steaming, maggot-infested dung for me. 

Thursday, June 28, 2007

Sam Gentile's Reading List

I’m posting this because I keep losing the link to Sam’s great reading list on Amazon.

There are some things I’d add to Sam’s list (Programming Pearls, Code Complete, Writing Secure Code, The Practice of Programming, Effective C#, and about 50 others), but Sam’s list is a great place to start.

Tuesday, June 26, 2007

More Regarding Offline Work With TFS

Dave Donaldson read my whiny post about the friction I’ve got with TFS and working offline.  Dave details his solution to the issue on his blog, and as always with Dave, it’s a smart way to get work done.

One additional step you should take to make working offline smoother, particularly if you’re a fan of working in small iterations: Set up an offline repository so you can keep your small changes checked in and maintain a working system as you go. 

I used TortoiseSVN to create a local Subversion repository, so now I’ve got TFS for the online stuff and Subversion for my offline safety net.  If that’s not ironic then I’m not sure what is…

(Note that with TortoiseSVN you don’t need the full Subversion installation to get a working repository going.  Just use TortoiseSVN’s “Create Repository Here” context menu option to set up a repository in an empty folder.)

Monday, June 25, 2007

Team Foundation Server and Working Offline

I’m running into all kinds of pain working offline with TFS.  Loads of pain.  Absolut vodka and Camel cigarette kinds of pain.  The Team Foundation Foundation Server Power Toy is quite a help, but still not a complete salve.  Working offline is a LOT harder than it needs to be. 

Good resources on dealing with working offline include Buck Hodges’ blog on the PowerToy, the Team System blog (the post’s light on depth), and John Robbins’ method which uses MSBuild to snarf out all binding info from the solution.

I realize it’s v1.0 of TFS, but working offline should not be such a complete PITA.  Offline use is not some weird edge case; it’s a regular occurance by a large percentage of the developer community.  I hope there will be some non-kludgy fixes quickly released.

Saturday, June 23, 2007

Recent Non-Technical Reading

I’ve been reading some odds and ends over the last six months which haven’t been techno-geek books.  A partial list includes:

  • A few sci-fi classics I’ve re-read for the umpteenth time:
    • None But Man by Gordon R. Dickenson. Just a solid, entertaining read with great characters.
    • Gateway and Beyond the Blue Event Horizon by Frederick Pohl.  Wonderful stories, the both.  Great twists, great work with the plots, style, and voices.
    • Ender’s Shadow by Orson Scott Card.  Beatiful parallel storyline to Ender’s Game.  This one follows Bean around and it’s full of clever second viewpoints to events in Ender’s Game.
    • Northworld, With The Lightnings, and Paying the Piper by David Drake.  One of my mostest favoritest authors.  Grimy, hard stories about warriors making tough choices in harsh circumstances.  Sci-fi war at its best, but in no small part because of the strength of the characters.
    • Kesrith, the Faded Sun by C.J. Cherryh.  Amazing story of a race which is unbending in their rules — but whose love for life and exploration is the hidden core of their beliefs.
  • To Kill A Mockingbird by Harper Lee.  Wow, it’s been decades since I read this. (Literally.  I’m an aspiring old fart.)  Amazing stuff when an adult can writeso well from the eyes and voice of a young child.  And yeah, the story’s pretty dang powerful, too.
  • The Trusted Advisor by David H. Maister, Robert Galford, and Charles Green.  Absolutely critical reading if you do any form of consulting — or any form of mentoring or advocacy.
  • The Rage and the Pride by Oriana Fallaci.  Powerful, passionate, brilliant.  A scathing rant against the fanatics behind 9/11 and the religion which has let itself be hijacked and turned away from a religion full of science, art, and peace and morphed into a boiling mass of insanity.
  • On The Weath of Nations by P.J. O’Rourke.  OK, so Adam Smith’s Wealth of Nations is something I should read some year when I’ve got nothing else to do and after I’ve finished a doctorate in economics.  Right.  O’Rourke’s work is a riff on Cliff’s Notes, but with O’Rourke’s usual blistering commentary and wicked humor.  Highly entertaining, extremely educational, and certainly in line with O’Rourke’s other great writings.
  • Band of Brothers by Stephen Ambrose.  I re-read one of Ambrose’s various works on WWII at least once a year to remind myself that I live free and happy in the greatest nation on Earth due to heroic sacrifices by people of my father’s generation.
  • All the Hellboy graphic novels by Mike Mignolia.  I bought the seven or eight piecemeal as I was writing parts of my book — they’re wonderful, amazing, beautiful works and it was fun to work through them again.
  • The Holy Bible.  Because the technical side of my life isn’t the only part which I need to improve.

Scott Berkun on Development Methodologies

Scott Berkun’s Myths of Innovation is a terrific book that I reviewed a little bit ago.  Berkun’s also got a great blog, where one of his posts is a list of real-world development methodologies.

The post is a hoot to read, and painfully accurate.  Make sure to read the comment thread, because there’s lots of gold in there, too.

Monday, June 18, 2007

MS Test and Test Support Files

I’m not overly fond of the MS Test framework for unit testing, but it’s what we’re stuck with I mean using so I’m pressing on with it.  The test manager makes it difficult to organize and run tests, and I greatly dislike how slow it is.

Today I’ve found some other friction in MS Test that’s even more of a PITA: External items aren’t copied to the test output directory unless you jump through several other hoops.

My current test environment uses a number of XML and HTML files as input and reference data.  I keep those files in a folder separate from my test classes since they’re used by a number of different test projects.  I use Add -> Existing Items  and add those items as links to the various projects — and then set “Copy to Output Directory” to “Copy if newer” to ensure things get dragged over as appropriate.

This works just fine using TestDriven.NET to run tests; however, MS Test adds some additional complexity in order to get such items over to the test folder.  Instead of relying on the “Copy to Output Directory” property, you’ll need to specifically call out the items via one of two methods: the DeploymentItem attribute or by specifically adding those items in to your test run configuration.

The DeploymentItem attribute looks like this:

[DeploymentItem(@"C:\vsprojects\MyProject\Tests\Test Support\XmlContentFileOne.xml")]

Unfortunately it didn’t work when added to a ClassInitialize setup method, so I turned to the test run configuration’s Deployment tab where you can add files or directories to carry over to the test run output folder.

Irritating, overly complex, and an additional layer of brittleness should I need to change anything.  -1 (again) for MS Test.

Friday, June 15, 2007

Book Review List

I post all my book reviews on Amazon.com.  They’re generally shorter than the versions I post here, but you can at least find the entire list at one spot at Amazon.

Some day I’ll get around to setting up Google’s custom search bits to troll this site.  That would give folks the ability to easily search FrazzledDad for the longer book reviews, but for right now the list’s on Amazon.

I’ve stuck a link to the list on the sidebar as well.

Thursday, June 14, 2007

XSL Transforms and Included/Imported Sheets with DTDs

Problem: Loading an XSL sheet with DTDs defined in it barfs because by default DTDs aren’t allowed in XSL for security reasons.

Solution: Load the XSL sheet with an XmlReader which has its ProhibitDtd property set to false:

XmlReaderSettings readerSettings = new XmlReaderSettings();

readerSettings.ProhibitDtd = false;

XmlReader xslReader = XmlReader.Create(XSLSHEET, readerSettings);

XslCompiledTransform xform = new XslCompiledTransform();

xform.Load(xslReader);

That's fine and ducky if you're working with an XSL sheet which doesn’t import or include any other sheets.  Unfortunately, I’m working with DocBook’s html sheets which do indeed import a metric crapload of other sheets.  Those downstream sheets get resolved and loaded with default XmlReaders which don’t carry along the ProhibitDtd property.

Ugh.

More Better Solution: Write a custom XmlResolver which returns an XmlReader with the ProhibitDtd property set false:

public class XmlReaderResolver : XmlResolver

{

    private System.Net.ICredentials credentials;

    private XmlReaderSettings settings;

 

    public XmlReaderSettings Settings

    {

        get { return settings; }

        set { settings = value; }

    }

 

    public XmlReaderResolver()

    {

        settings = new XmlReaderSettings();

        settings.ProhibitDtd = false;

        settings.ConformanceLevel = ConformanceLevel.Fragment;

 

        credentials = CredentialCache.DefaultCredentials;

    }

 

    public override System.Net.ICredentials Credentials

    {

        set { credentials = value; }

    }

 

    public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)

    {

        XmlReader reader = XmlReader.Create(absoluteUri.ToString(), settings);

        return reader;

    }

}

Now that custom resolver as you’re loading the XSL (partial snipped along the same lines as above):

MyXmlResolver resolver = new MyXmlResolver();

 

XsltSettings xsltSettings = new XsltSettings();

xsltSettings.EnableDocumentFunction = true;

 

xform.Load(xslReader, xsltSettings, resolver);

So far this seems to be working well, although I've got other issues with how the various XmlReaders and XmlWriters aren't playing overly nicely with the XML content I'm holding in memory. More on that later.

Wednesday, June 13, 2007

Announcing CodeMash v2.0.0.8!

We’re off and running with planning the next CodeMash conference which will be held 9–11 January, 2008.  Mark your calendars!

I’ll be making various announcements here at my blog, but your best chance for breaking news will be to monitor the Google group we set up for CodeMash.  We’ll also be making various announcements at the conference’s homepage.

The first conference was a great success and generated buzz across the nation.  Seriously.

Round two of CodeMash will be even way more betterer, so make sure you’re able to attend!

Tuesday, June 12, 2007

Book Review: The Myths of Innovation

The Myths of Innovation, Scott Berkun, published by O'Reilly, ISBN 0596527055

This book is a great break from all the tech books I’ve been working through over the last months.  Berkun’s book is small, concise, and a very good read on what innovation really is — not the myths and stories we’ve come to associate with major breakthroughs.

Newton’s discoveries about gravity, legends to the contrary, didn’t come from inspration after he got hit on the head by an apple; instead his breakthroughs came about after years and years of work in the field.  All of Newton’s prior experiences combined to give him the ability to meld everything together and come up with some unique ideas.

Berkun repeats this idea throughout this short, highly enjoyable book: Innovation is very, very rarely some epiphany moment where an idea is spawned completely out of the blue.  Instead, innovation, inspiration, and epiphanies are the product of having laid the groundwork in many different ways. 

Berkun talks about this groundwork in several different fashions.  He talks about how good managers set up an environment which fosters creativity and innovation (think old Microsoft, current Google, SemTech in Brazil), how innovators are able to build off their prior experiences, and a number of other critical factors.

The book’s well-written, and it’s a physical pleasure to read.  The book’s small size, pleasant paper, and great photographs all combine for a, uh, innovative experience.

This book, coupled with things like Semmler’s Maverick or Demarco and Lister’s Peopleware, is a great addition to my bookshelf!

Sunday, June 10, 2007

Updates to WinDevPowerTools.com

It’s been far too long, but I’ve finally gotten all the tools from our book loaded in to the companion site.

One of the coolest things about the site is the “My Toolbox” badge.  James came up with this idea and it’s da bomb.  Log on to the site and you’ll be able to create a toolbox where you can load up a list of the tools you regularly use.

You can also cast votes for tools you love:

You can get a badge link to your toolbox to post wherever you’d like.  I’ve just added one to this blog’s sidebar:

Forgive the number of arrows, but I think this is a great idea!

The site’s undergoing some iterative development.  We hope to have articles on new tools posted up soon, and we’ll be opening up the site for other folks to add tools at some point.

Give it a shot and let us know what you think!

Thursday, June 07, 2007

Playing With The New Diskeeper

<disclosure mode=”full”>I get some software free because of my MVP status.  Diskeeper’s one of those freebies.  I’m under no obligation to blog about it or say overly fawning things when I do write about it, but you ought to know when I’m talking about stuff I got gratis.  So there you have it.</disclosure>

I desperately needed a break from beating my head against the wall of getting DocBook XSL to work using the MSXML and/or EXSLT engines, so I thought I’d take a minute to finish up a post I started a few days ago.

I’ve been using the latest release of Diskeeper (v2007 or v11, depending on where you look) and I’m pretty happy with it so far.  I’ve been running it on my personal laptop (WinXP Tablet) and my work laptop (Vista) for several weeks.

There are a lot of little features that show some nice forethought during Diskeeper’s design and development.  I like seeing small things like a performance warning when you’re trying to use Diskeeper on battery power.

The UI’s completely reworked from the older versions I’ve seen.  I can’t say I’m overly enamored with the style of the icons on the toolbar, but they’re not completely horrid.  (And you should see the sucky graphics I do, so who am I to throw stones…)

That graphical nit aside, I like the extremely flexible options Diskeeper gives me for scheduling defrags.  The automatic defrag timeline lets me block out chunks where I don’t want Diskeeper even breathing.   Being able to set different options for different days is very sweet.  (I do this despite Diskeeper’s protestations in their documentation that their “InvisiTasking” utilization system will ensure my system won’t be impacted.  That may be fine for non-developer geeks, but I’m somewhat anal about trying to keep services on my system to a minimum.)

Diskeeper’s got a fancy mode called I-FAAST (around since Diskeeper 10) that supposedly analyzes your system’s file usage and can reorganize files to help boost performance.  It sounds nice in theory, but I haven’t noticed any big gain in speed — however, I’ve not been closely monitoring this.

Some files can’t be defragged or moved while the system’s in operation, so you need to have your utility run in a special mode during a reboot.  This can be awfully inconvienent since these special defrags can take a long time and I always forget to set them up at a convenient time.  Diskeeper helps deal with that by another thoughtful option: schedule reboots with a defrag.  You can set up a specific time where the system will reboot and run a boot-time defrag.  Cool.

 All of the various odds and ends feature configurations are available on a by-volume basis, which is nice.  I can set things up so my external drive with my virtual machines and bigger files gets handled differently than my system drive.  That’s a bit of sweet flexibility.

Of course there are screens with lots of shiny colors showing you how desperately you need defragmentation. 

I’m not one to blythely trust any tool’s metrics on how much it’s improving system performance, but there’s certainly a long-term noticable difference with Diskeeper, particularly when I’m using my various virtual machines.  I’m sure someone’s done some hard analysis for defragmentation metrics, but at some point I just toss my hands up and say “Yeah, I need it and I know it does good, I just don’t know how much.”

Back to the glowing positives: One final thing that I’m impressed with is the help file.  There’s good documentation about how things are done and how you can best use Diskeeper.

Overall I’m very happy with Diskeeper so far. 

Tuesday, June 05, 2007

A Laundry List of Failed IT Projects

The Times Online has an article detailing several IT projects which have cratered in the UK over the last ten or so years.  Some of the systems were pretty critical, like a system to track screenings of teachers — its failure left child molesters unchecked in public school systems.

It’s always discouraging to read about these train wrecks because it appears we as an industry aren’t getting a lot better about solving complex problems.

Ugh.

Saturday, June 02, 2007

Licensing 101, or How Not To Handle Disputes

I’ve been back and forth on the ongoing train wreck between Jamie Cansdale and Microsoft over TestDriven.Net’s support for Express editions of Visual Studio.  I’ve finally come to the opinion that Jamie’s in the wrong, and I think his arguments are a bit specious and hollow.

At the end of the day it comes down to the fact that Microsoft’s been clear that Express isn’t intended to support add-ins.  All of the other thousands of companies developing VS add-ins understand this.  What’s up with Jamie?  What’s not clear about this? 

Spending his time arguing over whether TestDriven.Net’s support uses public APIs is futile, IMO.  The bottom line is that folks at MS fought hard to get Express versions released out for hobbyist use, and there were some mandates put in place to enable that — like Express not supporting any add-ins or plugins.

Jamie runs a business and makes money off TestDriven.Net.  I’d think he’d understand the need to control certain revenue streams — after all, Jamie himself took TestDriven.Net from a freely available tool to one you have to pay for.  I don’t think he’s open to folks trying to pore through his EULA trying to find loopholes for using the hobbyist version in a commercial role.

So, with all this said, I’d like to vent my spleen on Microsoft’s handling of the matter.  Frankly, you guys suck.  Not renewing Jamie’s MVP over the flap is understandable, but not being up front and plainly saying “You’re out of luck specifically because of your position on TestDriven.Net” is foolish.  I also have a very low opinion of the style of communication coming from the initial contact person at MS.  Read through the e-mails linked on Jamie’s post and see what you think.  (Interestingly, that same Microsoftie was a roadblock to James’s efforts with Visual Studio Hacks.  Note to MS: Maybe you should consider having someone else handle interfacing tasks…)

At the end of the day I’m irritated by both sides.  MS’s handling of the matter is completely stupid, but seems to be right on line with the 1000Lb gorilla approach they’re using for the patent issues so prominent in the news.  On the other side, Jamie’s taken a stance that’s fundamentally wrong.  I can’t imagine he’d appreciate the same sort of behavior with folks using his commercial product.

Maybe this train wreck will clear up in a nice fashion, but I doubt it.

(By the way, I’m a huge fan of TestDriven.Net.  I used it when it was free, got really pissed when he started charging for it, then plunked down the $$ to continue using it.  I also showcase it during my talk on Open Source Test Tools, even though it’s not open source.)

Thursday, May 31, 2007

Another Great PowerShell Book

Hristo Deshev, one of the many smart folks at telerik, blogs that he’s writing a book on PowerShell. Hristo wrote a couple articles for Windows Developer Power Tools and his writing was clear, concise, and spot on.

Hristo’s PowerShell book is being published by Apress and should be out around January, 2008. I can’t wait to read it!

MSI Error #2869

Getting errors when trying to install an MSI package on your system?  If you’re receiving errors like "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869" then try these two tricks:

1) Ensure no other instances of devenv.exe are running.  That means use the Task Manager and kill any procs which might be running in hidden corners.  Make sure to tick the box “Show processes from all users.”

2) Try running msiexec /i <YourMsiPackage> from a command line prompt as the admin.

Wednesday, May 30, 2007

Great New VSTS Book

I just got a copy of Visual Studio Team System: Better Sofware Development for Agile Teams in the mail and I have to say it’s got me almost as excited as when my copies of Hellboy showed up. 

A quick browse through the table of contents, foreword, and initial chapters gives me the impression that this book’s done right.  The topics in the TOC hit all the usual suspects (pairing, embrace change, automatic builds and continuous integration), plus a wide range of important issues off the regular “Here’s how you do XP” beaten path: setting up spike folders in your project, working well with source control, and a passle of other goodies.

I’m also VERY happy to see FIT covered in a book (other than Cunningham’s book on FIT, that is.)

I’ll report in more detail on this very soon, but right now it’s looking like a great book.

Looking for A Cool Working Place? Come to the Quick Solutions Open House!

Quick Solutions, Inc., the cool place I work at, is having an open house on June 13th from 5pm to 8pm. We’re opening our doors to potential candidates who are interested in chatting with Quick about opportunities. You’ll get fed and have the chance to talk with consultants and recruiters in order to find out more about Quick, our benefits, the business model, and the environment. We’re looking for .NET developers/architects/engineers, Java geeks, Program Management and Quality Assurance folks. Interested? Drop me a note via the contact link on the sidebar.

Sunday, May 27, 2007

Serious Geeksville Keyboard

Carl Franklin and Jean-Paul Boodhoo are both talking about the very cool-looking Data Hand keyboard system.

This keyboard seems to be a huge jump forward in the ability to drive your computer aound while being able to minimize the risk of repetative stress injury.  I like the lap adapter for it — I’m having problems at work where I’m using an ergonomic keyboard that’s resting too high on a table top.

I’d love to jump in and give one a try; however, the tarrif’s pretty steep: $675.

As a psuedo-side note, a good keyboard is only part of an ergonomically sound workplace.  You need a good chair (I dropped the big $$ for Aeron chairs), good monitors (note the plural), and a keyboard tray which lets you get your keyboard at the perfect height.  I’ve got one from Humanscale at home and it’s a joy: rock solid and extremely adjustable.

Friday, May 25, 2007

Why Didn't Phil Haack Tell Me Steve McConnell Has a Blog!?

Oh, he did.  And oh, he does.

If you haven’t read McConnell’s Code Complete then do yourself a favor and go get a copy right friggin’ now!  The book is life-altering, and I’m not kidding.  CC, 2nd ed. was a watershed book that (combined with my experiences at SD West and hooking up with a few key people) got me to change the path of my career and life.

Orcas/LINQ Dev Care Materials

The materials from my presentation today at the DevCare event in Columbus are located here on my site.

The zip’s got a text file with the links I mentioned in the presentation, but I’ll post ‘em here

DNRTV -- Barry Gervin on LINQ
http://shrinkster.com/p8z

Dustin Campbell blog w/Lambdas, other techie stuff
http://www.diditwith.net/
http://shrinkster.com/pad

Bill Wagner (minor diety of all things C#)
http://shrinkster.com/p90

Additionally, here’s a link to the Orcas Demo session from MIX07.

Everything You Wanted to Know About & nbsp ; Entities

There’s actually a FAQ on working with the “& nbsp ;” entity and why it can be a PITA to deal with.  The first item goes into seriously gory, deep details.  Useful and interesting

Update: Duh.  My trickery to try and get the nbsp through didn’t work.  Fixed.

Wednesday, May 23, 2007

Cygwin, Vista, and UAC

Cygwin rocks.  Cygwin under Vista with UAC enabled?  Less so.

It’s back to admin accounts in Vista not really being admins, but there’s a hack workaround for it.  Read about it here.

You may have concerns about enabling the Administrator account (which is disabled after Vista’s set up), but it’s a tradeoff, IMO.  Having access to this Administrator account means I can do basic stuff like chown operations, so that’s a plus for me.  Besides, I only switch to that account when I really need it.

HTML Tidy Goodness

I’ve used HTML Tidy for a looooong time and have always loved its power. 

Need to clean out the crap older versions of MS Word tosses in when you save a document as HTML?  Tidy to the rescue.  Need to check HTML syntax, correctness, or proper authoring practices?  Tidy’s your tool.  Want to just get a human-readable, nicely indented file from SGML/HTML/XML input?  Tidy’s just the thing.

Tidy’s long had the ability to convert HTML, even files which aren’t well-formed, into XML.  That’s a pretty sweet feature, and newer versions of Tidy will even spit out lovely XHTML.

Tidy’s got billions of handy config options, like getting all those stinky elements properly indented or wrapping text automatically at a specific column.

I just grabbed the latest Win32 version this morning as part of some work I’m doing converting badly structured HTML into XML as part of a migration to DocBook format. 

In a very, very weird karmic wheel of life experience I’m once again working on a technical manual viewer — awfully similar to the Air Force Common Viewer I worked on nearly a decade ago. But I digress.  (Which is a frequent occurance around here, but I digress further yet.)

To the point: Grab Tidy if you’re ever in need of checking or manipulating XML or HTML files.  It’s a sweet little tool.  It’s awfully simple to use, but I see there are even GUI front ends for it if you feel the need.

Tuesday, May 22, 2007

Upcoming Speaking Gigs

I’ve got a couple short-notice talks I’ll be delivering this week.

Thursday, 24 May, I’ll be presenting my Open Source Test Tools talk at the Central Ohio .NET Developers Group starting at 6pm.

Friday, 25 May I’ll be talking on Visual Studio Orcas and LINQ at the Columbus DevCares event.  This one will be fun: I’m just jumping into both Orcas and LINQ right now and am loving what I’m seeing so far.  (Thanks to great folks like Bill Wagner and Dustin Campbell who’ve been putting up terrific articles on LINQ!)

Nice Utility to Clean and Zip Source Folders

Jeff Atwood ran with a neat utility that Scott Hanselman pointed out that someone else wrote that was inspired by someone other than that someone else. 

Confused?  Then forget that first sentance and go grab Atwood’s Clean and Zip Source utility.  Install it and you’ll get a nice, new item on the context menu which will troll through a subdirectory structure, remove all the bin and obj dirs as well as source control files and binding info.

Very handy, very shiny.  My only complaint is that I can’t configure it to ignore the files ReSharper tosses in my project tree, but that’s a minor nit.

Monday, May 21, 2007

Book Review: Principles of Beatiful Web Design

The Principles of Beautiful Web Design, by Jason Beaird. Published by SitePoint. ISBN 0-9758419-6-3. 170 pages (full color).

This is perhaps one of the best books I’ve read in a long time, mostly because it’s targeted specifically to folks like myself: those who are technically sound but graphically impaired.  My solid skills behind a camera translate not at all to good site design and layout, so I was really excited to look through this book when I first heard about it.

Beaird has written a very concise, gloriously illustrated work that does a tremendous job of covering everything from layout/composition to textures and color.   Throughout the book Beaird uses real-world examples of sites that illustrate the particular point he’s working on.  Sitepoint’s willingness to spring for full-color printing helps nail down Beaird’s content.

The book clearly discusses layout fundamentals like balance, grid theory, and symetry/asymetry.  The chapter on color hits color psychology (“Feeling a bit blue today?”), palatte selection, and the value of using color wheels to pick complementary and contrasting colors.

The rest of the book is every bit as golden, hitting texture, typography, and imagery.  There are a number of terrific resources for fonts, colors, and images with a mix between free and commercial resources.

This isn’t a book to find out the details of how blocks flow and clear in CSS, nor is it a book to learn about the latest and greatest in AJAX/Javascript.  What this book does cover, and covers well, are the higher-level, vital concepts you need to grok before you start wiring up AJAX controls and laying out <div> elements.

The Principles of Beautiful Web Design isn’t just for lame design folks like myself.  I imagine even accomplished web designers could learn a thing or two from it.  It’s that good.

Sunday, May 20, 2007

Contact Link Fixed

The XDI contact link on my right sidebar (“=JimHolmes”) was busted.  Now it’s fixed.  Feel free to drop me a note if you’re looking for questions/answers, info on the .NET community in Ohio/Michigan, rose gardening, or some of the recipes I occasionally post here.

(Ask work-at-home parent questions at your own risk…)

Back from West Michigan DODN

Chris Woodruff did a helluva great job organizing the West Michigan Day of .NET.

There were a lot of great sessions, including a terrific one on Rhino.Mocks by Chris Brandsma.  I breeze through Rhino in my Open Source Test Tools gig, but Chris really got into the depths of Rhino and showed some tricky stuff like mocking events.  I’m going to steal a few bits of his concepts to refactor my own coverage of Rhino in future gigs.

I gave my OS Test Tools talk and also Real World SharePoint where I talk a bit about some of the hard knocks I’ve been through with a couple MOSS projects.  (Actually, it’s hard knocks learned from a bit of my work and lot of Rus’s work when I used to be at NuSoft…)

Materials from the event will be posted up shortly at its site.

Friday, May 11, 2007

Fixing the Dual Monitor Bouncing Monitor Thing in Vista

I’ve been pretty satisfied with my Vista experience so far, but running dual monitors on a laptop is a complete hassle.  Vista helpfully turns off the external monitor feed every time you disconnect your laptop from a docking station, pull the external cable off, or change displays using a KVM switch.  The last one is particularly egregious for me since I have a four-way KVM at my home office.

Thankfully Arnulfo found the trick: Disable the Transient Multimon Manager task.

Go read his post on how to fix the problem.

Two things to keep in mind: 1) the configuration will stay live when you disconnect, so you may have to move apps around.  Alt-Space -> M -> Arrows will do that trick.  B) TMM was in the MobilePC task folder on my laptop, not the Windows one.

Now Playing:  Guster — Lost and Gone Forever.

Thursday, May 10, 2007

New SharePoint Users Group in Cincinnati

If you’re interested in MOSS/WSS and you’re in the Cincinnati region then you ought to show up for the first meeting of the Cincinnati SharePoint Users Group.

MAX Training is hosting the event which is on 14 May at 6pm.

MOSS is a huge, tough product.  Groups like this will be a vital part of being a successful MOSSer.

Wednesday, May 02, 2007

Contact Info

It looks like XDI.org is having some issues, which sucks because it's a great service to help cut spam. Ergo, please go ahead and contact me directly if you're interested in my post on job opportunities at Quick Solutions. You can reach me at Jim AT IterativeRose THEDOTTHINGY com. I hope XDI isn't going the way of the dodo. I've certainly been happy with their service!

Monday, April 30, 2007

Looking for Work? Consider Coming Onboard with Quick!

Quick Solutions, the company I work for, is looking for sharp, passionate folks in a number of areas.  We’ve got openings for .NET, Java, and BizTalk developers, and we’re also looking for good project managers, business analysts, and quality assurance/tester folks.

Quick has two sides of the company: a terrific staffing side and the solutions group which I’m part of. 

Quick’s staffing model is a lot different than other staffing companies I’ve been around: Quick is dead serious about their folks keeping their skills honed, and they back that up with dedicated mentors and ongoing training.  Quick is very serious about keeping folks productively employed and off the bench, and they’ve got a great process to ensure that’s the norm.

The solutions group does amazing work in a number of cool areas and is involved with technologies including SharePoint 2007, Windows Communication Foundation, SliverLight, ASP.NET, and a passle of other cutting-edge cool things.  Yes, we still do our share of older legacy development, but we’re serious about putting new things to use where they make business sense.

Quick’s full of amazingly smart folks (James, Arnulfo, Monish, Alexi, of course Brian, and a passle of others too)  who are great at what they do, and Quick is an amazing supporter of the development community in the region.  They’re deeply connected with the .NET crowd and have done amazing things in the Java and Ruby communities as well.

I jumped at the opportunity to move to Quick when the chance came up earlier this month.  I’ve been fortunate to have a lot of doors open to me over the last year or so, but Quick was the one I’ve long wanted to go through.  Everything I’ve seen in the last three weeks has backed that up: carefully chosen folks who are great at teamwork and who are very passionate about what they do.

It’s a great place to work!  Drop me a line via the link on my sidebar if you’re interested.  We’d love to talk with you!

Sunday, April 29, 2007

Vista Screen Rotation on Laptop

My new Dell D820 laptop freaked out the other day when I hooked up an external monitor to it: the display on both monitors went in to portrait mode.  Portrait mode’s awfully nice on my tablet PC when I am writing notes and the such, but it’s quite a hassle on my laptop because I have to tilt my head 90 degrees to the left and the dual monitor display is a little odd since it’s to the left and not under the laptop.

It took me a bit of poking around, but I finally found the solution.  Vista, even on a non-tablet PC, has a Tablet PC section under control panel.  Head there and you’ll find screen rotation settings where you’re able to pop the display back to landscape. 

In my case the second monitor remained in portrait, so I had to head over to the Mobility Center and have the Display section re-detect the external display.

After a couple annoying flickers everything was back to normal, and it’s remained so for a couple days.

What a relief!

Friday, April 27, 2007

Book Review: Windows Forms 2.0 Programming

Windows Forms 2.0 Programming, by Chrfis Sells and Michael Weinhardt.  Addison Wesley.  ISBN 0-321-26796-6

Windows Presentation Foundation has been released and we will all immediately stop doing WinForms development and move to the latest and greatest technology.  Right.  WPF may take over the world — but not right now.  Plenty of folks will still be doing Windows Forms development for some time.  Ergo, this book is a great resource to have on the shelf.

The writing style’s clean, clear, and concise, and the examples all show the right level of detail.  Graphics throughout the book are good, and there’s even a full-color section in the middle of the book to show off how nice various WinForms displays can look.  (Although I should note some of the figures there aren’t particularly interesting.)  A very handy “New” marker in the margins highlights features and functionality new to the .NET 2.0 framework — a great benefit for folks experienced in 1.1 development who are looking for quick exposure to what’s new in 2.0.

The book’s content is terrific and extremely useful.  There’s a solid introduction which hits all the important fundamentals of WinForms development and also hits the right features you’ll need in Visual Studio.  There’s awfully good coverage on basics such as form lifecycle, MDI basics, data validation, and why/how properties are important in WinForms development.

The authors do a very solid job laying out other important concepts like data binding and validation.  There’s also a great amount of background on localization through the entire book, and I found the chapter on resources particularly informative.  The bits on components and custom controls were also a very good read.

Overall it’s a solid book and very useful for folks still working in WinForms development.  (That would include me…)

Tuesday, April 24, 2007

Because You Should Never Break The Build

Automated builds are great.  Automated builds with status indicators like CruiseControl.NET’s dashboard are better yet since you get a quick visual indication that something’s gone seriously wrong.

Best of all?  A bunny which complains with remarks like “The build is still broken.  Get your act together, people!” or complains “This sucks” when there’s an exception.

I wonder if I can tie this in with the Team Systems server we’re running on now…

(Via Ben Carey)

Thursday, April 19, 2007

Managing WF-related Permissions in MOSS

Sahil Malik’s got a great blog post on the steps you’ll need to think about taking when configuring security for a MOSS site and list for workflows.

Wednesday, April 18, 2007

IE Search Provider for .NET Geeks

I heard Dan Appleman on DotNetRocks talk about a great thing: Google custom search.  Dan’s an amazing brain and he’s worked out a killer resource for .NET geeks: SearchDotNet.com.

This site uses Google’s custom search functionality to limit search crawls to a specified list of sites.  In this case, SearchDotNet.com’s search list is a bunch of sites specifically chosen by Appleman because of their high-quality content.  It’s awfully cool to get a search source hand-picked by someone like Appleman.

Along those lines, one of Internet Explorer 7’s coolest features, IMO, is the ability to chose and load different search providers.  You can even create new providers — like using SearchDotNet.com.

Here are the main steps on how to do this.  First, start IE 7, then pull down the menu by the search field.

You’ll land at the search provider creation page.  Note the area for creating your own provider. (Boxed in the fancy curved-corner box.  Ooooohhh.)

Open up a new tab in IE, navigate to SearchDotNet.com and enter ‘TEST’ in the search box.

Click the Search button, then nab the URL from the search results page and paste that back in the box on the Add Search Providers page.

Name the provider, click Install and you’ll be asked if you really want to add the provider. (Because, like, clicking “Install” wasn’t definitive enough…)

You’re now rewarded with IE displaying your shiny new provider as the default one.

Now you’re defaulting to searching .NET-related content from the best brains around.  How sweet is this? 

Flickr Uploader

The Flicker Uploader is a great tool for getting stuff up to Flicker.  Unfortunately, I always forget where the heck it is when I repave a system, and Google never seems to find it.

Ergo, I’m blogging the location of the Flickr Uploader for posterity (and ease of me finding it again…)

Saturday, April 14, 2007

Book Review: Information Dashboard Design

Information Dashboard Design by Stephen Few.  Publisher: O’Reilly.

I’ve been poking through this book for the last several months as I’ve been starting to get my head around KPI and dashboard capabilities in SharePoint Server 2007.  The book’s a great bit on figuring out the best ways to concisely display critical summary information on a single screen for an at-a-glance overview.

The book’s broken out into solid chapters covering dashboard history/background, uses, design mistakes, and the value of simplicity in dashboard content.  The style of the book is clear, and it’s concise and well-written.  There’s also great use of color which is terrific because so much of dashboards is about helping give quick visual impacts via smart use of colors.

The intro chapter gives a lot of examples of dashboards, but I found it disappointing in that it doesn’t really lay out clear opinions on whether the author liked or disliked the boards.  That weakness is limited to the first chapter, though, because the rest of the book does a great job of laying out problematic dashboards and talking about the fundamental issues behind those problems.  Few hits a lot of common things like making dashboards which require scrolling to hit all the parts of a dashboard, or fragmenting dashboard content into multiple screens accessed through tabs.

Few’s writing style is very clear, and he’s got great insight into many details about what makes a good dashboard — small details like prefering bar charts over pie charts in all but a few cases, or ensuring that you’re setting the proper context for visual information.

I’m definitely not a great visual design guy, so this book’s been a great help to me in thinking about how to best represent critical data.  Frankly, I think the book’s a great aid in helping figure out not just dashboards, but how to best represent any critical information in a clear fashion.

Catching Up On Old Book Reviews

I’ve missed reviewing several books I’ve gotten a lot of good use out of over the last year.  Here are bits and pieces on four good ones.  I haven’t completely read through all of them; however, I’ve gotten enough out of them to feel comfortable with scratching out a few remarks on each.


Deploying .NET Applications: Learning MSBuild and Click Once by Sayed Y. Hashimi and Sayed Ibrahim Hashimi.  Publisher: Apress.

I picked this one up as I was working on the MSBuild article for Windows Developer Power Tools.  The book’s concise and hits a number of good points on MSBuild, Team Foundation Server/Team Build, and ClickOnce.  I really didn’t spend a lot of time in the TFS or ClickOnce pottions — I was busy using the MSBuild parts to try and get my head around that particular technology.

The coverage of MSBuild includes some comparisions to NAnt and a number of the make variants. (barf)  There’s a good example walk-through of MSBuild and a nice bit on writing custom tasks for MSBuild.  While the MSBuild parts are well-written, the explanations really didn’t click for me, but that’s probably due to my serious bias in favor of NAnt and my background with Ant.  I had a tough time getting past those biases and grokking any advantage of MSBuild over NAnt.

Overall I think the book would be useful, it just didn’t quite click with me.  That said, I’m looking forward to revisiting this book as I dive in to TFS and Team Build starting next week.  I’ll also be using this book for the SmartClient bits.


Microsoft Windows Communication Foundation Hands On! (Beta Edition) by Craig McMurtry, Marc Mercuri, and Nigel Waitling. Publisher: Sams.

This book was out well before the RTM of WCF and I’m amazed at how great a job the authors did being so far in the lead of the wave of WCF books.  The entire book is really a set of explanatory articles walking readers through introductory topics, general knowledge, and deep dives into specific areas of WCF.

The writing style is clear and to the point, and the exercises are great for demonstrating the specific bits they’re talking about.  The authors managed to keep all the code examples up to date via constant update releases on a companion website.

There’s also a bonus chapter covering InfoCard, its background, and how it ties in with WCF and some nice example code.

(This is also one of the very few useful books I’ve found from Sams.  I generally dislike their offerings, but this one’s a winner.)


Programming ASP.NET, 3rd ed. by Jesse Liberty and Dan Hurwitz.  Publisher: O’Reilly.

This is a massive work covering a broad range of topics for ASP.NET.  I found Fritz Onion’s book on ASP.NET a better work for the basics of ASP.NET such as page lifecycle and state; however, this book walks though a great number of detailed discussion on basic and advanced controls.

There’s also solid chapters on tracing/debugging/error handling, and validation, plus other chapters on user controls, web services, and a number of other topics.

I’ve used this book mostly for occasional reference — I do very little ASP.NET development, so it’s been a boon when I’ve needed a good example to point me in the right direction.


C# Cookbook, 2nd ed., by Jay Hilyard & Stephen Teilbet.  Publisher: O’Reilly.

Another book that’s great as the occasional reference.  This is another huge tome and it’s chock full of topics from generics to security to XML.

Each topic is a recipe in a Problem/Solution/Discussion/See Also format.  The solution is a snippet or set of snippets to solve the specific problem and the discussion is s walkthrough of the ins and outs of both the problem and how the solution fits the bill.  Occasionally there’s a good discussion of the pros and cons of solutions.

This isn’t a book for reading cover to cover, but there’s a lot to be learned browsing through the recipes, and you’re sure to get answers on a wide range of topics including solid use of generics, exception handling, I/O, web bits, and networking.  The chapters on security and reflection are particularly useful because they offer up good insights on approaching secure coding correctly and good techniques for dealing with reflection.

Thursday, April 12, 2007

Bragging on My Brother's Photos

My brother’s about sixty years older than me and has treated me horribly my whole life.  The stories I could tell you would turn your knees to jelly and your hair white.  He got me any my sisters stuck in the neighbor’s potato field decades ago, bounced me around the back of his Bronco durng four-wheeling sessions, and I won’t even go in to the chocolate covered ants he fed me when I was a mere three or so years old.

Actually, he wasn’t completely rotten.  He made me learn how engines worked as part of earning rides on his motorcycle.  He and my Dad were great examples in Scouts as I was growing up, and he taught me no-nonsense safety rules when handling firearms.  Throw in a few other things like being a pillar of honesty and amazing example of hard work’s rewards and you might see that I’ve almost come to forgive him the ant thing after 40 years.  Almost.

One of the things my brother passed on to me was a great interest in photography.  Dan’s been an amazing photographer for a long, long time, and I was always amazed by the magic he made with a camera.  His love of photography was a direct cause of my involvement with yearbook and newspaper photography during junior high and high school, and an ongoing interest in photography in the decades since.

I’ve had a link to my brother’s photos on my sidebar for some time.  My stuff is worthless dreck compared to my brother’s work.  He’s progressed from serious amatuer to semi-pro, and is in the process of cutting back hours from his “real” job to head off and work full-time at something he’s loved for decades. 

Dan’s gotten quite a bit of recognition through a few awards and shows in his hometown of Ventura.  Now he’s gone and gotten himself quite a spread in a wonderful magazine.  You can check out the online version of the magazine in a very, very cool display here.

Amazing stuff, Bro, and I’m proud of you!

(But I’m stll not completely over the ants.)

Friday, April 06, 2007

CodeMash v2.0 Timeframe Feedback

We’re looking for your feedback on when the next CodeMash should be held. CodeMash v1.0 was in January, but that’s sort of risky weather-wise. Moving around to different dates can drastically impact the room prices — the $88 per night rate was pretty fantastic and was a big draw for the venue. We’ve gathered up room rates for a range of dates from early November through March, and we’re looking for feedback from attendees, speakers, and sponsors on when the best timeframe would be. Check out the “Timeframe for Next CodeMash” thread in the CodeMash group on Google. Let us know your $0.02!

Thursday, April 05, 2007

Book Review: SharePoint (Building Office 2007 Solutions in C#)

Microsoft SharePoint: Building Office 2007 Solutions in C# 2005

Scot Hillier

ISBN: 1590598091

This book’s a critical resource if you’re doing development on the SharePoint 2007 platform.  The book hits a solid overview of the many features of Microsoft Office SharePoint Server (MOSS) and also gives you good dives into many of those same features.  The book also deals with Windows SharePoint Services (WSS) and lays out differences between WSS and MOSS.

Hillier does a great job of covering the gory details of MOSS and hits the pros and cons of each feature.  One example would be the hideous XML you have to hand-generate for working with the Business Data Catalog.  He also does a great job discussing one of my recent pain points: workflow.  Hillier lays out the strengths of the feature (workflow’s power of process automation), then talks about the warts of the feature (design difficulties, numerous issues surrounding SharePoint Designer, etc.).  Hillier is also honest about where MOSS features fall short, such as the note laying Hillier’s preference for the K2 workflow engine over that of native Windows Workflow Foundation on MOSS.

The book is structured in a concise, highly usable fashion.  Hillier discusses topics, then uses clearly written examples to walk you through the topic.  All the examples are implemented in an environment that Hillier focuses an entire chapter on setting up.  That chapter (#2) is one of the book’s gems since it shows you how to get an entire development infrastructure set up and configured using Virtual Server to host three separate machines.

If you’ve already had exposure to MOSS then the book may not have a lot of extras for you.  The dives into each feature aren’t necessarily extremely deep dives, but they are good enough to get you well-versed with the concepts.

Hillier’s book is an absolute must-have if you’re looking to move in to any sort of work on the MOSS platform.

 

Serenity Voted #1 Sci-Fi Film

SFX magazine polled 3,000 fans on their favorite science fiction movie and found that Serenity beat out Star Wars.

Even if you’re not a sci-fi fan you may enjoy the depth and complexity of Serenity, so it’s well-worth checking out from the library.  You should also take a look at Battlestar Galatica (the “reimagined” version from the SciFi channel), another sci-fi show which has broad appeal due to its great storylines and complex characters.

(Via one of the few useful articles on Slashdot these days.)

Subscribe (RSS)

The Leadership Journey