Tuesday, May 29, 2007

As Larry points out some people just aren't down with using visual editors.  I'll extend this to say that the entire notion of the IDE doesn't resonate with everyone.  Ever since James Gosling proclaimed that "Anything serious is still done in emacs" the luddites have felt more comfortable in proudly claiming that an IDE such as VS2005 offers nothing that's not available from Vi+Shell Scripts.  I'm glad I don't work in that world anymore, but I suppose once you have convinced yourself that nothing new has been brought to the world of code editing in 20 years no Refactoring demo is going to change your mind.

Personally, I'd probably have to have a reference in front of me for creating WSDL but other than that I could hand-code anything I work with.  Editors and IDEs make me more productive.

Tuesday, May 29, 2007 11:42:01 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Sunday, May 27, 2007

In less than two weeks now, Jen and I are getting married.  Five years, a wonderful daughter, building a house, and a whole buch of other stuff have gone by but I'm surprised to be saying that getting married is steal a big deal.  We are "very secular" as anyone who's met me or read this blog for very long can attest but despite the lack of moral pressure to get hitched it seemed to make more and more sense as time went on for reasons that should be obvious.  Also, Jen likes diamonds.  I am currently recovering from my bachelor party about which I will say nothing but that while I consider myself Young still I cannot shrug off an event such as this without at least two days of healthy food and a lot of I am never drinking agains.  I suppose that phrase is the Hail Mary of the repentant imbiber.  Despite his odd notions about "sins" and other strange ethical constructs my brother and best man did a good job of throwing me my last party as an unmarried man.  I am currently developing grass roots support for the notion that the bachelor party should be a yearly occurance similar to celebrating the wedding anniversery.  The debate and voting on this bill seems to predictably fall along party lines but bi-partisan support can surely be gained in the usual political ways: bribes and favor trading or pork legislation burried in a must pass budget bill.  More information on the Payne-Payne Bachelor Reform initiative as it develops.

It looks like all of my long lost friends and respected colleagues that I had room to invite have responded in the affirmative so none of the "You are dead to me!" cards I created will have to go out.  We've got to squeeze in some dancing practice and a lot of final details but at this point my main concern is just making it through the day without some idiotic disastor like dropping the cake or spilling coffee on The Dress or something.  There's also the final Packing to consider.  My folks have some sort of worldwide timeshare thing that led to us getting a week in St. Lucia immediately after the wedding reception.  By immediately I mean we might have time for a 1 hour cat nap before heading down to O'Hare.  This will be the longest vacation I've ever taken and my first time out of the country (Mexicali does not count) so I'm sure there are any number of things that could go wrong but I'm not going to let anything get to me.  As long as we're not demolished by an early hurricane and our daughter can handle a week without Mom and Dad I'll call it good.  The sure-to-be ridiculous spoiling that awaits her with my parents will probably have her forgetting boring old Mom and Dad in no time.

In all seriousness, Jen is fantastic, she's freaking awesome.  What higher praise could a woman want from a nerd such as myself?  I'm lucky to be with someone who is happy to do the laundry (folding clothes is the one domestic skill I never gained competancy in) in exchange for my often experimental cooking.  I brag to my friends that she's almost beaten Zelda on the Wii for the second time.  She does her best to tolerate my Capitalist rantings at 1am after I've just finished a new economics book.  She loves it that I slowly absorb medical terminology such that she can complain about sepsis or a sub-dural hemotoma without also having to serve as a dictionary (it really ruines the flow of a story).  Are these the most important things in a mate? Maybe or maybe not, but its hard to offer examples to outsiders when you just have a rythm that works.  Also, Jen is hot.  We've been through a lot together and the future looks pretty good.

Sunday, May 27, 2007 10:42:23 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback

A respectable fellow recently asked me where I was on the Unit Testing spectrum: Skeptic <----> Zealot, or in between.  Fair question.

I am right-leaning towards zealot though far from what I'd call a unit testing zealot.  For one thing, I'm not into Test-first development.  I've heard the arguments enough times but its not a mental barrier I care to break down.  After years of struggling with laziness and mulling over the value of different approaches, this is a summary of my Unit Testing habits today:

  1. I use NUnit, TestDriven.Net, and NCover.
  2. I don't like unit testing strictly GUI aspects: Web Forms or Windows Forms, UserControl, etc.  I know that there ARE ways to do this but it doesn't resonate with me right now.  I somewhat dogmaticaly use Model-View-Presenter in ASP.Net and the desktop to minimize what is in the code behinds anyway.  I use NUnit.Mocks to work with Mock instances of my View interfaces.
  3. I do a lot of up front design before I write anything non-trivial but I do not create models at the Implementation level.  Writing the code is the first validation of my design, writing the unit tests is the second validation of my design.  Sorry for bludgeoning the deceased equine but if I can't get at method to test it and it also doesn't make sense to test said method through some other calling method, then there's likely a smell in the design.  I will typically revisit my preferred tool (currently StarUML) to see where the smell is, reimpliment, and take another stab at creating the appropriate tests.
  4. Unit tests are the most appropriate artifact you can leave behind for a project.  It seems to me that I run across very few people who do what I would call Real modeling and fewer who make an effort to update models as a system evolves.  I don't update models as a system evolves, but I do update unit tests.  The tests are only valuable as an artifact if they pass and if they can be shown to actually exercise the system.  See #5 regarding this.
  5. Code Coverage is the piece that finally made Unit Testing really click for me.  Forming the habit of using NCover directly from Visual Studio via TestDriven is the single largest improvement to the quality of my code, ever.  I find that I have difficulty inciting the same excitement about Coverage in other people, maybe because it forces one to admit they need to write more unit tests.  So you've tested everything you thought of on the first iteration and NCover shows only 80% coverage of your business logic assembly.  Sometimes you'll see you only tested the "Main success" flow through the code and you need to test the alternates and exceptions.  Sometimes you will see NCover highlighting code that is absolutely never going to be called from your application.  Many times I have caught "premature abstracting" using Ncover, classes or methods I assumed I'd need but nevered ended up needing.  This may not be a defect but I'm of the opinion that if I ever need it I'll recover it from version control so I delete unused methods/properties/classes to make my assembly smaller and compile faster.  Code Coverage is also a good aspect of a Code Review, if you're into those.
  6. I shoot for > 95% code coverage.
  7. While we work on stabalizing a release, testers sometimes find bugs!   As I look at each bug, I think, could this have been caught before acceptance testing if there'd been a specific unit test?  If I can think of a unit test for the bug situation, I add one.
  8. This one should be very obvious: I feel much better making huge changes to important code if there is a unit test suite.

 

Sunday, May 27, 2007 10:04:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Friday, May 25, 2007

Priceless:

Friday, May 25, 2007 9:50:22 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, May 23, 2007

I have seen several tutorials online on creating non-rectilinear windows in WPF using transparent images and no Background Brush.  Oddly enough this leaves you with the issue of not being able to grab the title bar (since it does not exist) and drag your curvey new window around.  I initially found no workable solution for this and even asked around to those who are wiser than I; no answer.  By rephrasing my request to google I found the following:

  1. Using Expression Blend, highlight your Window class.  Add an event handler for MouseLeftButtonDown
  2. In Visual Studio, add the following code to said event handler:

private void ExifViewer_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
   DragMove();
}

Fantastic.  The plumbing was already there, easy, and obvious, but because this is a new platform I could not find it.

.NET | WPF
Wednesday, May 23, 2007 3:00:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, May 20, 2007

So, Starcraft 2 is happening.  That's pretty sweet, though maybe not as geek lusty to some as a Diablo III announcement might have been.  I'm glad they did not try to turn this into a MMORPG.  Despite the game appearing to be fairly far along I can't fathom us seeing this before late 2008.  That will give me time to upgrade the desktop.

Sunday, May 20, 2007 11:39:24 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, May 18, 2007

If you haven't looked at WPF and Expression Blend yet it's important that you do so immediately.  The fact that I can do those cool effects from managed code is fantastic.  For example, I had a tool written for our support teams that would allow them to right-click on a JPG in Windows and choose "View Exif" from the menu.  We have customers (if you're a customer and you're reading this, I don't mean you, I mean someone else) who call us saying that their images didn't get associated with a vehicle and this way they can see the image metadata and if the scanner was used right.  I thought it would be cool if this could be in the shape of my company logo instead of a rectangular window, with some partial transparency.  Ignore my pan roasted broccoli with ginger and chilli sauce partially visible through the form.

My first few hours of experimentation with Expression Blend and WPF are very promising.  Besides creating this non-rectilinear window you can scale and rotate about anything and give the appearance of things being detached from your main window.  Behold my incredibly confusing rotated ListBox and detached close button.  The rotated ListBox shows the danger in this tool: remember things like the <blink> and <marquee> tags?  Bad ideas that looked cool for about five seconds and later made the bad-design hall of fame will be oh-so-easy for developers to unleash on unsuspecting users now.  Mitigating that risk is the fact that it appears seperation of the Designer's World from the Programmer's World is cleaner and more appropriate than many past attempts at supporting this separation of labor.  This aspect is most exciting to me: I would love to be able to tell our marketing partner who does our graphics to just go crazy with the user interface and email me the XAML so that I can work on putting functionality behind a top-notch design and not worry too much about us unintentionally trampling each other's work.  This is very, very cool.

.NET | Rant | WPF
Friday, May 18, 2007 3:03:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

I registered DamonPayne.net and pointed it to this site, in case you'd rather think of .net when you go to read about .net, or home theater, or politics, or see pictures of food, or something.

 

.NET | Rant
Friday, May 18, 2007 8:52:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

I've had some issues with Service Unavailable messages the past several days.  This appears to be related to me creating an Application below the main Application at my site root in order to test something.  This should be supported behavior so I am working on this with my hosting provider.

Friday, May 18, 2007 8:50:51 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, May 14, 2007

Oh, have I been busy.  This was the last weekend Jen has off before our wedding on June 9th so we were wisely utilizing it to goof off.  I cooked pancakes, Grilled shrimp skewers (sooo good), and homade chocolate mousse with strawberries.  Still, I have several articles in various stages of completion that I should be able to publish in the coming weeks:

  • A further discussion of ProjectEuler problems along with a Big Integer implementation
  • The next stage of the Designer Host discussion (Designer[1]) for .Net 2
  • Thoughts on the moral principles involved with advocating, using, and creating Open Source Software
Monday, May 14, 2007 10:06:58 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, May 07, 2007

http://arstechnica.com/news.ars/post/20070506-science-may-be-the-new-political-litmus-test-for-rationality.html

The potential GOP presidential nominees debate their stance on evolution.  What is the role Rational Thought should play in our lives?  I find it entertaining (and sad) that several candidates had to re-issue statements clarifying their positions.  It seems one ought to know what one's convictions are.

Monday, May 07, 2007 10:56:20 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

SOTO: Stay On Top Of.

Usage "I've got to SOTO the version 2.0 rollout to be sure its going well."

 

Monday, May 07, 2007 10:37:51 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback