Tuesday, July 22, 2008

Diet, Exercise, and Motorcycles

So, I have this longstanding agreement with my wife. If I "get buff", I can buy a motorcycle. Seems simple enough, and also seems like it should be adequate motivation. However, I have just never been able to stick with it long enough to really make a difference. As such, I have never been able to cash in on the wager. The enticement of the motorcycle, it seems, has not been sufficient.

More recently, I have been unhappy with my overall fitness level. Maybe it's because the years of office jobs are catching up with me. Maybe it's because I'm in some sort of pre-pre-mid-life crisis. I don't know. I do know, however, that I simply cannot stick to an exercise program if I have to figure it out on my own.

A month or so ago, my wife stumbled onto a book entitled "Buff Dad" by Mike Levinson. The title is corny enough, but the summary on the jacket got my curiosity up. His program is all about balanced nutrition with an emphasis on foods that assist the body's natural mechanisms for testosterone production, which is necessary for effective muscle building. The workout routine is designed to achieve results quickly without having to spend hours in the gym. I know I sound like a commercial here, but bear with me...

Yesterday marked exactly one week on the Buff Dad program, and I have to say that I feel so much better than I have in as long as I can remember. It sounds like a cliche, but I honestly feel different. I have more energy and I just plain feel better. The nutritional side of the program is designed such that I don't really feel deprived in any way, and the fact that I feel good makes it easier to make healthy choices.

As for the workouts... Wow, when I read through the book, I truly thought it looked like it wouldn't be that hard. I was wrong. The first day kicked my ass, and I didn't even finish the whole thing. If I hadn't already been motivated to change things, that would have been the final straw. Clearly I was even more out of shape than I was ready to admit. The good news is that a week later when it was time to go back to the 'day 1' workout, I was able to finish it and I could tell that the preceding week had made a difference.

So, back to the motorcycle. The past has shown that the lure of the open road has not been enough to keep me working out. But, this time, all the right pieces are in place and I am confident that I am making changes that will not only fulfill my end of the motorcycle agreement, but will change my life for the better.

Friday, July 18, 2008

Change TableAdapter Connection Programmatically

I ran into an issue on a project today. I was using DataSets created in the Visual Studio 2008 DataSet designer to facilitate data access in a handheld application I am working on. The problem arose when I realized that I wanted to be able to programmatically specify the connection string to be used at run-time. I realized that as I was creating TableAdapters in the DataSet designer, it was hard-coding the connection string into the generated source code. It didn't occur to me at the time that this would be a problem, as I was really just experimenting and testing anyway. Well, when I was ready to set the connection strings in code, I couldn't find any visible properties or methods to allow it! AAH!

Well, after some Google searching, I stumbled onto what is one of those "so simple, I'm kicking myself" answers. In the dataset designers, if you click on a TableAdapter and look in the properties pane, one of the properties of the TableAdapter is ConnectionModifier. By default, mine were set to Internal, making the connection object and it's associated connection string invisible to the rest of my application code. By changing the ConnectionModifier property to Public, I now have access to the connection object of my TableAdapters, and I can set/change them programmatically at run-time.

Saturday, July 5, 2008

SourceSafe Issue - Files were moved

So, I sat down an my dining room table this morning with my laptop, all set to get some work done. I connected to the VPN and opened up Visual SourceSafe because I needed to see about some changes that someone else was working on with one of our projects. To my shock and disbelief, there was nothing there. And by nothing, I mean nothing. VSS showed no projects at all.

I connected into the server via Remote Desktop to see if I could figure out what happened. I looked at the folders where the VSS database is stored, and it seemed to be in order. So, I ran analyze.exe to see if there were any corrupted files or whatever. This is where it started to get interesting... Analyze.exe wouldn't consistently run without crashing with nothing more than a very not-helpful Visual C++ Runtime error. GAH!

I rebooted the server and ran analyze.exe again. Same crashing! I ran it again, and noticed that it was indicating a whole bunch of files that it couldn't find, all of which were in the same folder. That folder on disk was indeed empty.

After nearly 3 hours or trial and error, rebooting, Google searches, and IM sessions, it occurred to me that if the folder in question had been moved for whatever reason, it might be causing the symptoms I was seeing. So, I started looking through the rest of the folders in the VSS 'data' directory, and sure enough, the 'A' folder had been moved to inside the 'E' folder (you have to have seen how VSS stores it's files for that to make sense). So, I copied the contents of this misplaced 'A' folder back to the correct 'A' folder (data\A), and ran analyze.exe again. This time it ran properly, and was able to correct a few other minor issues! Woot!

So, I opened Visual SourceSafe back up, and sure enough, everything was back to normal. Too bad it took me 3 hours on a Saturday morning to figure it out...

Tuesday, July 1, 2008

I spend a lot of time here...

This is my workspace for the first 40 hours of the week.

I'm really not a techno-elitist... Well, sorta.

I read an editorial recently by Ted Pin over at SQLServerCentral.com, and I have to agree with him 100%. His beef is with the term "IT guy". That is, even though many of us work in IT, we don't necessarily like to be referred to as "IT guys"... Why? Well, because of the common perception of what "IT guy" means. If you've ever seen the "Nick Burns" Saturday Night Live skits, you know exactly what I'm talking about. The general population equates "IT guy" with the rude helpdesk guy that they are forced to call when Excel crashes, or worse yet, with the Beetle-driving Geek Squad from Best Buy... To put it bluntly, I don't fall into this group and I don't want to be categorized as though I do.

What I have beef with is the broad categorization of any person who works "with computers" for a living all into the same group of "IT guys". And my beef breaks down into two parts.

First, there is the "guy" part of the title. By tacking on "guy" at the end, it cheapens the whole thing. To quote from Mr. Pin, "When we refer to other professionals, we definitely don't say "the plumber guy," or "the doctor guy," or "the lawyer guy." If you say those out loud, the inclusion of "guy" somehow changes the connotation, and not in a good way. (Try it.)".

Second, is the grouping of all technology professionals into this one group of "IT guys". I think many professional software developers (or data warehousing experts or enterprise architects, or many others) would agree that being grouped together with pre-entry-level helpdesk techs is irritating. I imagine that most neurosurgeons wouldn't want to be categorized together with CMAs (certified medical assistant) and be called "medical guys". I mean, let's be honest here...

Before I offend anyone else, let me clarify something. I am in no way saying that there is anything wrong working the helpdesk (or any other job, for that matter). I know where I came from, and I have held a wide range of IT jobs from helpdesk to network administrator to webmaster to developer to consultant. I have been an "IT guy", and there is nothing wrong with it. I'm really not trying to be elitist.

Having said that, I still don't want to be called an "IT guy", because I feel that my experience and skills separate me from that title. Does that make me an elitist? I guess it kinda does. Oh well.