Wednesday, August 16, 2006

After becoming frustrated at "Visual Studio 2005 command prompt" yet again I become a powershell user today.  I'm not doing any scripting right now but its good to see MSFT recognize that a good command line can be very handy.

Wednesday, August 16, 2006 9:49:11 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, August 13, 2006

I am done with my stint in the Land of Beer, and with being a consultant. 

Long story short, I am going to start building the .Net development department at a product-oriented technology company in Milwaukee.  Having been a consultant for my entire career this is a new direction for me to go in.  I have no complaints about SafeNet at all, and I'd still highly recommend talking to them if you want to do consulting in SE Wisconsin.

The details of my new gig will leak out over the coming weeks as titles are finalized and things take more form.  In the meantime, I need to start writing about technology again.

Sunday, August 13, 2006 7:50:58 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, August 01, 2006

private const string DOLLAR_SIGN = "$";
private const string COMMA = ",";

Hmm...

.NET | Rant
Tuesday, August 01, 2006 1:11:20 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback

Which bit of code do you think is more maintainable by someone other than the original developer:

if(_speakerTypeCode == 543678){

//do something

}

or

enum SpeakerTypes {

HornLoaded = 543678,

Electrostatic = 12334
}

if(_speakerTypeCode.Equals( SpeakerTypes.HornLoaded)){

//do something

}

I'm still amazed at some of the things I find in code, sometimes even my own code.  The above monstrosity is not mine, although I do occasionally find something abhorrent in my own code.  I read a blog recently, I believe it was the Shade Tree Developer, who said that this is a great way to gage personal growth.  Go back and look at code you wrote and see if you find things that you'd never do today.

.NET | Rant
Tuesday, August 01, 2006 11:52:54 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [52]  |  Trackback
 Sunday, July 30, 2006

I upgraded to the latest version of DasBlog.  Everything appears to be working great.  Hooray.

Sunday, July 30, 2006 12:14:06 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, July 28, 2006

I really don't like the C# "as" operator.  I have to admit that I made it a point not to use this solely because it made me have a brief moment of "VB.NET flashback".  I personally have a strong dislike for VB.NET syntax but that's just my preference.  Because of my VB.NET bias I did not look at the C# language spec to see if "as" functioned differently from

string foo = (string)myType;

As it turns out I tracked down a difficult bug in our system that was due to the fact that using "as" returns a null reference rather than throwing a class cast exception like c-style casting does.  Granted part of the problem was people swallowing exceptions in code, but I'm wondering: under what circumstances would one want the behavior that "as" provides?

.NET | Rant
Friday, July 28, 2006 9:35:19 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Tuesday, July 25, 2006

I am doing a new gig at the Land of Beer, Miller brewing.  Sean McCormack got me involved in an agile project here on a short time frame so I've not had a ton of time to blog lately.  There's a lot to talk about as this project slows down though.

I cannot say that I am a test driven development expert by any means.  However, upon arriving on this project and trying to retro-implement unit tests for a bunch of code that had no tests before I have come to a new understanding of the value of unit tests for regression testing, and for a specific aspect of the TDD paradigm.  Upon arriving and going over the projet I'd seen that the team lead was printing out class diagrams, going through the unit test packages, and checking off Method names that had a test.  I had kept meaning to look at code coverage tools in the past and the sheer amount of tests odewe needed made me look a little more seriously.  As it turns out they were already using TestDriven as part of the developer setup.  TestDriven is by itself a great tool and will have a place in my toolbox henceforth.  TestDriven installs an interesting right-click menu in VS2005 that gives you various options for running tests at the class/method/project/solution level.   More interesting to me at the time was the "Test With --> Coverage" option.  If you don't have Team System it tells you to go install NCover which I had not used before.  NCover is actually a very solid code coverage tool.  You can probably see where this is going and certainly TDD experts will file this under the "duh" department.  TestDriven + NCover + NUnit = tells you how much of your code is covered by unit tests.  NCover is smart enough to show you if, for example, you covered all the various "if()" branches inside a method and such.  This is Very handy and not just for unit tests.

We found, in general, that the application had "thong-level coverage" from unit tests; as any good christian will tell you the thong leaves too much uncovered!  We strove to get it to "Burqa-level" coverage and made a lot of progress before the timeline demanded we start on new development.

Upcoming rants:

"About Casting"

"Funny Stuff I've heard at work recently"

"Indirect paths to success"

Looks like I have some invalid HTML in here somewhere, the visual styles on the links are hozed.

Tuesday, July 25, 2006 9:32:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Thursday, June 29, 2006

I just completed an "alpha"  version of a for-fun website related to my audio hobby: http://www.klipschcorner.com/

I have not had to do much in the way of web design for a while but I set out to make this design work using only CSS and DIV tags, tables are the way of the past or so I read.  I had a fairly frustrating time at this.  The last time I had to do any kind of real layout was a couple of years ago.  It seemed that you could pretty easily support a good layout with Firefox and IE without creating conditional code by using some basic CSS stuff and tables for layout.  With the current CSS implementations of IE, Firefox, Safari it seems that I'm back in 1998 with even some very basic things looking radically different in each browser.

 

Thursday, June 29, 2006 12:19:28 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, June 19, 2006

For various reasons I've had to get back into unmanaged code in C++.  This turned out to be a lot worse than I thought it would be.  My college courses were in C++ and I did a little OpenGL programming using visual C++5 or 6, and my first job was doing a lot of cool C++ stuff.  However, that was most on the Solaris platform using stuff like Vi, the sun workshop compiler, and the RogueWave libraries for things like Time, Strings, and Money.  I never got into MFC or programming C++ on Win32.  Obviously things like LPSTR and "DEF" files and such are completely new to me, if it wasn't for Chad Albrecht I would have lost my mind already.  When I take a look at the things that are coming up on my plate, though, I can see that this isn't necessarily going to just go away, SO...

If anyone can recommend some good literature for getting into MFC and Win32 programming using eVC4 and/or VS2005 I'd appreciate it.

.NET | Rant
Monday, June 19, 2006 12:05:11 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Trackback