Tim Hibbard

Software Architect for EnGraph software


News





Add to Google



My Stats

  • Posts - 593
  • Comments - 337
  • Trackbacks - 507

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll


February 2007 Entries

Update to C# code to build constants from the database


I updated my article of the class to extract constants from a database for clean code freaks like me that want every field name to be defined by a constant.

The original post is here.

The code is here.

 

Technorati tags: , , ,

posted @ Tuesday, February 27, 2007 9:57 AM | Feedback (0) | Filed Under [ .NET ]


Spatial North


Ken Hoetmer - who has his own Where's Tim - has started a new company called Spatial North.  He talks more about it on his blog.  Good luck Ken!

 

posted @ Wednesday, February 21, 2007 1:23 PM | Feedback (0) | Filed Under [ GPS Mapping Where's Tim ]


My TFS architecture problem


Update - Found a solution here

I've had a problem ever since installing TFS, and I've not blogged about it yet because I wanted to figure out a good solution first.  I haven't found the solution, so I'm hoping for some good advice from the brilliant GWB readers.

We have quite a few dll's and controls that we reference from our applications.  For example, we have our SQL Connection String control that lives in the EnGraph Controls team project.  If I want to use the SQL Connection String control, I add a reference to the control on the shared folder on the TFS server that does the team build.  This works really well because when the control is updated, all of the applications that reference it are automatically updated.  I also don't have to worry about different file locations when I work on different computers, the latest version is always on the server.

However, this decision is causing some problems. 

First of all, executing a team build is painful.  The team build wants to clean out the build folder and if I have another instance of visual studio open that references that control, it will bomb.  I generally have to clean the solution that references the control and keep trying to execute the build.  Eventually it will go through, it usually just a matter of trying.  I really don't want to have to play the guessing game with team build though.  I want to be able to execute a team build and it just works.

The second problem has to do with visual studio build time.  We work remotely a lot of the time, and we connect to our network over VPN (using our handy dandy VPN Manager).  When we have two or three megabytes worth of references, it takes a while to bring all those references down from the server before it can even start the build.

So basically, my problem is this.  I want everybody on our team to be able to always have the latest version of our common dll's and controls, but I don't want to pay the network cost every time we build from VS, and I don't want to execute a team build four times before it goes through.

 

posted @ Friday, February 16, 2007 4:23 PM | Feedback (3) | Filed Under [ EnGraph .NET VPN TFS ]


Siriusly, the best present ever


sirius

My girlfriend got me a Sirius radio for Valentine's day.  More specifically, a sportster 4 with pause, rewind and fast forward.  I can set my favorite teams and it alerts me when they are playing.  I can set favorite bands or songs and it will alert me when a station is playing it.  It even has a built in FM modulator so I don't have to hard-wire it to my stereo.  Plug and play, it just works!

My Saturn is officially geeked out now.  It already had the GeeksWithBlogs sticker, my TomTom and Where's Tim.  Now I have this to play with too!  And I've already talked about how I'm a bad driver!

 

posted @ Friday, February 16, 2007 7:27 AM | Feedback (1) | Filed Under [ Sports Where's Tim ]


C# Code to build constants from the database


When I build data access layers, I like to define a const for each column in the query like this:

const int CLIENTID = 0; const int STATUS = 1; const int FIRSTNAME = 2;

That way, I can pull data like this:

newClient.Name.FirstName = reader.GetString(FIRSTNAME);

And if something changes in the database, I know I only have to change the field that FIRSTNAME references.

However, sometimes, tables can be quite large and it becomes a pain in the wrist.  So I wrote a class that uses the EnterpriseLibrary and builds the code that defines the const for each column.  Then I can copy and paste it into my code:

This class can be consumed like this:

ExtractFieldNames x = new ExtractFieldNames("myConnectionString"); textBoxResults.Text = x.ExtractConstantsFromTable("myTableName);

The article with the class is here. 

 

Technorati tags: , , ,

posted @ Wednesday, February 14, 2007 12:54 PM | Feedback (0) | Filed Under [ .NET ]


As bad as turf toe


I've been having a lot of pain in my hands the last couple of weeks, so I went to the doctor and they told me it is tendonitis.  That's good news considering she originally thought it was carpal tunnel.  They gave me some pills and showed me some exercises to help with the pain.  I still feel like a wuss though, talk about the ultimate geek injury :)

I've paid a lot of attention to ergonomics.  I have a natural keyboard, good chair, good mouse, multiple monitors. I guess I'm not doing enough.  I found this guide and one of the things he suggested was to switch to using your left hand for the mouse.  This way you avoid repetitive strain with your right hand, and most keyboards are wide, so you have to reach past the 10-key pad to get to your mouse and extending your arm like that causes strain.  It hard to get used to using your left hand, but it's starting to get easier.

 

Technorati tags:

posted @ Wednesday, February 14, 2007 7:48 AM | Feedback (5) |


Microsoft .NET ClickOnce Launch Utility has stopped working


Has anyone ever seen this error message before?

launch_utility

I can't find any information about it.  I think it has something to do with this error that I was getting earlier:

<assembly> must be strong signed in order to be marked as a prerequisite

I solved the above error by rebuilding all my references, but now I'm stuck on this error.  It's not tied to my computer, and it doesn't have anything to do with dfsvc.exe, because my other ClickOnce apps are working as expected.

Great way to end a week.

Update:  I fixed this error by creating a new .pfx key to sign the ClickOnce application.

Technorati tags:

posted @ Friday, February 09, 2007 1:18 PM | Feedback (0) | Filed Under [ .NET ClickOnce ]


.NET code to get version string and version date of current application


Because I always forget the syntax for this, here is my personal bookmark for the code to get version information of the current application:

DateTime fileDate = new System.IO.FileInfo(Application.ExecutablePath).LastWriteTime; string fileVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(Application.ExecutablePath).FileVersion;

 

Technorati tags: , ,

posted @ Thursday, February 08, 2007 10:30 AM | Feedback (1) | Filed Under [ .NET ]


.NET MonthCalendar control on Vista


The MonthCalendar control is wider on Vista for some reason.  The control is 227 pixels wide instead of 182 pixels on XP.  If you have a form that only hosts this control, use this code to make it look better in Vista:

private void FormDateSelector_Load(object sender, EventArgs e) { if (Environment.OSVersion.Version.Major == 6) { this.Width = 227; } }

month_calendar

 

Technorati tags: , ,

posted @ Thursday, February 08, 2007 7:30 AM | Feedback (3) | Filed Under [ .NET Vista ]


I just can't please you NUnit!


This morning I was working on some unit tests, when NUnit threw this error message at me:

TestBed.Trip.Construction :
expected: <System.Collections.Generic.List`1[Medicaid.Entities.Leg]>
  but was: <System.Collections.Generic.List`1[Medicaid.Entities.Leg]>

My girlfriend tells me that it not what I say, but HOW I say it.  Maybe NUnit could sense my sarcasm.

 

Technorati tags:

posted @ Wednesday, February 07, 2007 8:01 AM | Feedback (4) | Filed Under [ .NET ]


Welcoming Jonathan to EnGraph


Yesterday, Jonathan Umscheid started full time with EnGraph.  He's been working on a contract basis for us for a bit now and it's great to have him on board full time!  Jonathan and David are doing some really cool things with our AutoCAD project and they really need to start blogging about it!

We are still looking to fill a position for a .NET developer that will help Kyle and I on our transportation and GPS software (you might even get your own Where's Tim).

 

posted @ Tuesday, February 06, 2007 7:51 AM | Feedback (3) | Filed Under [ EnGraph .NET GPS Where's Tim ]


Disappointment, classless Aggies and drinking with the college gameday crew


We went to the KU game on Saturday.  It sucked to watch us lose an 11 point lead in five minutes.  I still don't know what happened.  It's not like we were making critical mistakes, a couple missed free throws, but that's about it.  It's not like Texas A&M was making easy shots, we played solid defense the whole game.  It just slipped away from us.

After the final buzzer, in an act that portrays the entire A&M program as a classless crew that doesn't know how to win, they jumped up and down in celebration on the Jayhawk in the center of the court.  Their leading scorer apologized after the game, but it was still disrespectful.

We headed over the the Yacht Club after the game to get a few drinks.  Somehow, we got a table and five minutes after we sat down I saw Jay Bilas sit down at the table next to us.  Then Digger came in and one by one the whole ESPN college gameday crew and staff were sitting at the table right next to us.  All the televisions in the bar were on ESPN and I was starstruck being 10 feet from the guys that define my college basketball opinions every Saturday.  Everyone in the bar was bringing them drinks and at one point, the whole bar was chanting "Chug, chug" to Digger as he drank his beer while wearing, of course, a Notre Dame hat.  It would have been a much better atmosphere had we won the game, but we still managed to pull out the Lawrence welcome mat even in defeat.  Because we're classy like that!

DSC00415

Gameday crew before the game

DSC00420

Tipoff

posted @ Monday, February 05, 2007 7:28 AM | Feedback (0) | Filed Under [ Sports ]


Introducing Callie


We got Joey a new friend last weekend.  She's a 7 week-old Beagle-Pug mix (Puggle).  It took them a little bit to get used to each other, but they are playing together really well now.

DSC00375

 

Technorati tags:

posted @ Saturday, February 03, 2007 12:05 PM | Feedback (6) |


Google Maps for Windows Mobile


PhoneNews reports that a version of Google Maps has been released for Windows Mobile.  I downloaded and played with it last night on my PPC-6700.  It works really well and it integrates with your contacts list.  It is interesting to note that is uses the old version of the street maps and older satellite images.

Also, the final version of Window Mobile Device Center is now released.

 

Technorati tags: ,

posted @ Friday, February 02, 2007 7:32 AM | Feedback (2) | Filed Under [ Mapping Mobile ]


Installing Adobe Reader on Vista


Kyle blogs about his issues (and resolution) with installing Adobe Reader 8 on his Vista machine.  For more of his thoughts on Vista and how Access 2007 sucks, see this post.

 

Technorati tags: , ,

posted @ Thursday, February 01, 2007 7:12 PM | Feedback (0) | Filed Under [ EnGraph Vista ]