28 Sep, 2006
Right now, all I have is hate for the TabControl in .net 1.1. A TabControl consists of several TabPages, on each TabPage you can have an assortment of controls. Suppose you want to disable one of the tabs on your TabControl, you would think to do it like this: TabControl.TabPages(1).Enabled = False.
This “works” I suppose, but all it does is disable every control inside of that TabPage, NOT the tab itself on the control. There aren’t even any good methods to override to create this behavior yourself, they fixed that issue in .net 2.0 with the addition of several events, namely the Selecting event which takes a CancelEventArgs so you can stop the UI action from taking place.
In order to make this work in .net 1.1 you have to subclass the TabControl and the TabPage. You need to draw the freaking TabPage yourself, so that you can make the text gray, like a disabled control is supposed to look. I did just that this afternoon, I’ll post a zip file later for others to use so they hopefully don’t have to go through the pain that I did.
UPDATE: See new post with link to zip file
27 Sep, 2006
It’s been a few days since I last worked with Rails, but this one issue that came up has been bugging me. The ActiveRecord support in Rails is pretty cool, and I like that they have different db provider (even Sql Server!). But, I recently inserted the following code into one of my models:
before_create : on_before_create
def on_before_create
self.CreatedDate = DateTime.now
self.LastModified = DateTime.now
end
For those of you coming from .net, this is analogous to adding an event handler (on_before_create) to an event (before_create) in my model. Then I go on to define the on_before_create method where I set the created date and last modified date of my model to the current date/time. I thought I was being clever by being able to remove these two fields from my view, because users shouldn’t have to modify these fields anyways, so I figured I could remove some of the hassle. But, when I go to insert this item into the database, the INSERT statement has a syntax error in the date value, because the dates come out like this:
2006-09-27T19:55:22-0500
which MySql doesn’t like. After doing some searching on DateTime’s in Ruby, I gave up until just now.
As I was writing this post I planned to lament the poor DateTime support in Ruby, but literally as I wrote the last paragraph I had one more idea about how to make it work, so I tried it out and it worked perfectly, heres the difference:
before_create : on_before_create
def on_before_create
self.CreatedDate = DateTime.now.to_s
self.LastModified = DateTime.now.to_s
end
All I did was convert the DateTime objects into their string representation and it worked, no problem! So I guess my bitch-fest will have to wait for another obstacle 
22 Sep, 2006
I mentioned awhile ago that I was going to give Rails another shot. I installed ruby, Rails, and RIDE-ME shortly thereafter and it was very easy, just as promised 
I installed everything based on this tutorial I found. The installation was even easier than expected since I already had MySql installed and thats the meat of the installation instructions.
So I got everything going soon after that last post. Everything worked so I was happy, but I still hadn’t done any Rails stuff, and I didn’t have any time to mess around with it until tonight. I gotta say that after seeing first hand how a rails application works, I’m really impressed. I love that it generates lists and detail forms for you, then leaves it up to you to do any customization, having a simple list and form to start from really speeds the development along nicely. I also really like the built-in server that RIDE-ME has, its nice to be able to hit the ‘play’ button and have my web site show up, without worrying about IIS, etc.
Developing for Rails definitely takes a change in mindset from an asp.net web site. I was trying to maintain some state and pass around variables in the query string when I had the realization that I didn’t need to pass any variables around if I simply setup new actions in my controller. Since the action is used for a specific purpose, my state and intentions can be inferred from the action I’m currently on.
I’m excited to become more familiar with Rails so that I can move on to doing some Ajax stuff with it. I’d like to get a good handle on Rails before I tackle that however, but this is the most fun that I’ve had learning a new language/technology in a long time, and I think it’s because the barrier to entry is so small.
22 Sep, 2006
I installed Vista RC1 last night on my second hard drive since I got Windows XP working again. :) This actually works out really nice, cause I don’t have to worry about hosing up my XP install, I can try Vista relatively risk free.
The install was really easy, I did it while watching Grey’s Anatomy. Ironically the step ‘Copying Windows files’ took around 30 minutes, ‘Expanding Windows Files’ took about 15 minutes, and then the rest of the install took about 10 minutes. I find it amusing that copying the files from a DVD to the hard drive is what took the longest by far.
The shitty part is that my wireless card (D-Link AirPlus DWL 520+) isn’t supported yet, there aren’t any Vista drivers on the D-Link site, so I might have to go pick up a new one, if TrendNet cards work on Vista. I hate it when network cards don’t work, it’s the only thing where if it doesn’t work, you can’t go online to search for it, ugh.
21 Sep, 2006
I’ve been looking forward to tonight for awhile now, it’s the season premiere of The Office, Grey’s Anatomy, and Six Degrees. The Office is hilarious, I got addicted to Grey’s Anatomy last season (and I’m pissed that it’s on Thursdays now), and Erin says Six Degrees is a good show, she got to see the pilot at work I think.
I was also excited to see the new show from Aaron Sorkin “Studio 60 on the Sunset Strip” and it didn’t disappoint. It’s funny to see so many people from The West Wing on the show, and it just doesn’t seem right to have “Josh” (Bradley Whitford) running the show without Sam Seaborn around, oh well 
I wanted to get a DVR from Comcast so that I could record the shows if I wasn’t around to watch them, but they wanted me to upgrade to a bigger cable package in order to get a DVR (we just have basic cable so that we can get the local HD channels). Whatever, less business for them.
18 Sep, 2006
I’ve read about Secret Server before and I thought it would be a good idea to start using it to keep track of passwords that I’ve got. You don’t realize how many passwords you have until you write them all down, theres a bunch!
So, I installed Secret Server on my home server, but before I did that, I wanted to make sure that all my security was in order. Putting all my logins and passwords on a web site just doesn’t feel right, so one thing that I really wanted to do was to enable SSL for the site, this seems like an obvious one.
I didn’t want to buy a certificate from VeriSign just to enable SSL on my personal site that nobody else would ever use, so I did some research about issuing your own certificate. A coworker pointed me to this link that shows how to use MakeCert.exe, that comes in the .Net framework SDK, to generate your own certificate. This worked great, I assigned the certificate to my site and it was all set!
I’m still nervous about having all my passwords in one location, its kind of scary, but I feel like its got the proper security around it. One thing that surprised me about Secret Server is that they display your password in clear text when you view it. I would have thought they would generate an image on the fly with the text of your password, like a CAPTCHA image, just so its not being sent over the internet in clear text. Enabling SSL solved this problem for me.
One of the benefits of storing your passwords is that it allows you to not reuse passwords, as I’m sure most people do. Now you can have a unique password for each site and not have to worry about remembering several weird passwords.
16 Sep, 2006
Over the past couple days I’ve noticed that when I log into my machine at home, svchost will peg the cpu at 100% nonstop. The weird thing was, I noticed this right after I installed Max. I uninstalled it but the problem persisted, interestingly it only happened after I would stop the “sqlbrowser” windows service, wtf?
So, I did some googling, ran a virus check, nothing really came up, so I’m now doing the best alternative. I’m buying a new hard drive and installing windows. It’s gotten to the point where it’s not worth it to try and diagnose and fix problems when you can buy an 80 gig hard drive for $60 bucks. Since my current install isn’t totally hosed (the problem doesn’t happen all the time), I can install my new hard drive and get windows loaded and setup just right before I blow away my current drive.
I like starting fresh anyways, and this time, I’m going to setup our user accounts to not be administrators, I figure it can’t hurt, except for the growing pains of not being able to take certain actions anymore.
As I do some research on installing windows on a second drive, I came across this “tutorial” of sorts, and laughed my ass off 
8 Sep, 2006
The most recent series that Joel has going on about hiring and whatnot has got me thinking about offices vs. cubes vs. open spaces for your teams.
He is of the opinion that private offices are the way to go as far as developer productivity, and I agree, I would love to have a private office so that I can listen to my music without headphones (we have cubes here at Magenic).
Adam has talked about the new office spaces that some teams are going to be experimenting with at Microsoft. If teams are so inclined, they can have an open, communal area for development. The thinking is that open spaces fosters better communication between team members. The downside is then you are interrupted by everything that happens in the area, someone else having a phone conversation, for instance.
It seems that the best work area for each developer is based on personal preferences, not some study that shows ‘x’ percent of developers work better in open spaces vs offices or vice versa. Even IF one or the other is statistically better, that still means there is a percentage of developers who stray from the mean and are more productive in the ‘worse’ environment.
The problem is then, when you have a team of developers, how do you decide which environment is best? If 8 out of 10 people want an open space, but 2 people want private offices, what do you do? If you put those 2 people in an open space with everyone else and their productivity is hurt, thats not good. But if you force everyone into their own office, the other 8 might lose their productivity as well. And you certainly can’t split the group and have 8 people in the open area and 2 people in offices.
Basically, forcing people into an environment that hinders their productivity sucks. I’m not sure of the best way to mitigate this either, it almost seems like you have to pick an environment and then hire people that work best there. I’m not saying you can’t adapt, the cube walls at Magenic are shorter than my previous company and I didn’t like them at first, but I don’t mind them as much anymore, so it’s possible to get used to an environment. But the bigger the change, the harder and longer that adaptation will take.
8 Sep, 2006
I went to the Twin Cities .Net User group meeting last night where Jake was presenting about WPF. It was really interesting, I haven’t had the motivation to take a look at WPF yet, it always seemed like such a commitment and I think they just recently included Visual Studio designer support, so before you had to hack the xaml in notepad or something.
After the presentation I went and had a beer with Jake and his friend Andy. While we were out, they convinced me that using Ruby on Rails on a windows machine isn’t tough if you’re not trying to use FastCGI, so I’ll give it another shot soon. I also want to try out RIDE-ME to see if it’s really makes the Rails experience easier, we’ll see how it goes.
2 Sep, 2006
As a follow up to my post about the city of Minneapolis selecting a citywide wifi provider, they have approved the contract from US Internet.
“A citywide wireless network was approved Friday by the Minneapolis City Council, setting the stage for portable and affordable high-speed Internet service anywhere in the city by late next year.”
This result was never really in doubt, the contract was approved by a 12-1 margin, but it’s cool to know that everything is in motion to have it up and running by the end of the year.
It’s also nice to know that a company is doing the work rather than a new government agency, I think US Internet will provide better service than a government group would be able to, knowing that their profit depends on them executing.