Apparently the last time I was on Codeplex I didn’t even realize it, but as of February 28th, I’ve been a member of Codeplex for two great years. Since then I’ve posted enough projects to be in the top 20 of the entire site! I’ve had a few talks with Codeplex folks and really respect what they’re doing. Being able to host code and make it available to the world is an amazing thing. I used Sourceforge a few years ago, but I never felt that it was a good enough fit for Windows projects. I switched over to Codeplex and never looked back. I’d love to see a few new features and a few enhancements, but overall it does a great job and lets me focus on writing code without thinking about it too much.
If you write code, consider making it available to others this way. Offering zip files on your site is nice, but being able to host discussions, issues, recommended downloads, and documentation in one place makes this a pretty easy sell. If whatever you wrote was useful to you, it will probably be useful to others as well. Get your code out there and start contributing!
I’ve just posted an article about writing better error messages. I ended up writing over 2,000 words so I split it into three parts. It’s got some insights and ideas for managing errors in an application better. I hope you like it!
Link: http://aeshen.com/wordpress/2010/03/better-error-messages-part-1/
In researching a career-related project, I visited HotJobs. Since I was already signed into my Yahoo! account and at some point had submitted a resume (“Sr Java Developer” – that’s how long it’s been!), it had some great recommendations for me:
Apparently I am completely barking up the wrong tree with this computer stuff!
After a number of recent problems lately with the ASP.NET form designer locking up in Visual Studio 2008, I finally decided to look into it. As it turns out, it’s due to problems with the Office 2010 releases messing up the Visual Web Developer components. Since I’ve been using VS2010 for the past few months I didn’t notice this until now.
The solution was simple for me. Just run the setup for the Web components again and choose the Repair action. No reboot and I was good to go!
C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup Controller\Setup.exe
If you are running 32-bit Windows, remove the “ (x86)” part of the part.
Source: http://geekswithblogs.net/hinshelm/archive/2009/07/19/office-2010-gotcha-2-visual-studio-2008-locks.aspx
My most recent Coding 4 Fun article has just gone live. I wrote a screensaver where people can leave you messages. If you leave your office/cubicle at work and people stop by, they can leave you a message without resorting to little paper notes that get lost!
Link: http://blogs.msdn.com/coding4fun/archive/2010/02/28/9970627.aspx
I’ve been really excited about the Windows 7 sensors and location platform since the get-go, but I’ve been pretty disappointed by the lack of actual products to take advantage of it. Finally someone has built a software –based tool that uses IP and WiFi location services (from Google) to find your location. It’s not as accurate as GPS, of course, but it’s good enough to get city which works well for weather and general proximity applications.
It’s free and available for either 32-bit or 64-bit. Get it now!
http://www.geosenseforwindows.com/
On the Aeshen blog, I just posted an article about multithreading and parallel coding. There’s lots of discussion about new frameworks to make work easier, but there are many things you can do without terrible effort with today’s languages and tools.
Link: http://aeshen.com/wordpress/2010/02/multithreading-for-the-future/
I’ve just finished up my largest ASP.NET effort to date. It’s nothing huge, but I tried to use standard ASP.NET patterns and practices throughout. I learned a number of lessons!
We turned off ViewState in order to save bandwidth. This introduced some problems that I didn’t expect. For one thing, the IsPostback property can’t be used for deciding whether or not to databind – always databind! Since the web is stateless, the values involved in a bind are usually stored in ViewState so you only need to bind once. Clearly you need to do that manually without it.
That made sense, but what I didn’t expect was the lack of many of the events. A simple button Click event still works, but change events and certain other control events simply don’t fire since the runtime doesn’t know anything but the current state. Unfortunately, there is no hint to this in Visual Studio so you’ll just have blocks of code that never get hit and you won’t know why!
Another lesson I learned was about validators. I like using RequiredFieldValidator to make sure that text fields are filled in. For some stupid reason, the ListView has no built-in support for this. I’d love to be able to just click a “required” checkbox for a field and have it add it. What I learned though, is that even if I add the validator manually, there are two huge gotcha’s:
First, if the user clicks the Cancel button for an edit, the validators still fire! The fix is quite simple – just set CausesValidation to false on the button and you’re ok. Why wouldn’t those buttons be auto-configured for this behavior when auto-generated though? It doesn’t have a downside if you set the property and don’t have validators.
My second problem was harder to solve. In addition to creating validators on the EditItemTemplate, I also added them to the InsertItemTemplate. Obviously the fields are required on both update and creation. What I learned though, was that when the user attempts to edit an item, there are now two sets of fields on display at once: new item and edit item. This is bad when the user tries to save the edited record though, as the new item validators complain about empty fields.
The solution is to hide the insert row on edit. When the control fires the ItemEditing event, you change the InsertItemPosition to None, then on the Canceling or ItemUpdated events change it back to LastItem. This looks cool and prevents two sets of controls from being on-screen at once. Again though, this isn’t that uncommon of a scenario so it should be handled easier.
It seems like so many of the ASP.NET features work great in demos, but once you get into the real-world scenarios you need to do more work than expected to really bring things together.