A user-friendly Update Notifier and Downloader (C#, WPF)

For quite some time, my update notification mechanism for most of my projects consisted of a Web Client async request to download a version file, check it against the current version, and show a message that would lead the user to a download page. This is all simple and great, but if you’re like me and you release updates constantly, you’d be better off using a delta updater, that knows which files have been updated since the last release, downloads them and installs them. For NBA Stats Tracker, I’ve taken the middle road. I release new versions quite frequently, so getting the user to the download page, then using the download link, then going through all the steps of installing it could be a hassle, deterring them from downloading and thus using the latest version. I thought I’d make the update process just a few clicks and minimize the time it requires to update to a few seconds.

Here’s how it works.

Continue reading

How to get detailed error reports on unhandled (and forced) exceptions in WPF (Updated)

UPDATE: The post has been updated since first being published with some improvements to the code.
UPDATE #2 (May 15, 2013): The post has been updated again with much cleaner code and additional functionality.

To err is human. And so, many (well, hopefully, not that many) times your programs may crash. And most of the time, they won’t crash inside your development environment, hooked to a debugger that will give you all the information you need on why and where the error happened. They’ll crash on your client’s machine. So, what can you do if you’re developing a WPF application, and want your program to produce nice, detailed error reports that the users can send to you?

It’s quite easy, actually.

Continue reading

Leap of Faith

For quite some time now, actually it’s been since I first decided I wanted my thesis to be a full-blown basketball statistical analysis tool, I’d been wondering if, and how, I would ever be able to earn some money, even little, out of it. That’s the main reason that even after submitting it as my thesis, the project remained closed-source. I was thinking that I would keep it that way, find a way to put a decent protection on it, and sell it for a fee.

And then I came to my senses. In an era where every proprietary piece of software that’s locked down is cracked, what’s the point of keeping your source closed? All the rest of my work is open-source, why should this be any different? Sure, anyone could take the source now and compile it and have the tool for free, but even when it comes to open-source projects, there’s ways to earn something. Especially a tool like this gives you the chance to be hired to actually use it for a team, rather than have them learn how to use it, or you could “sell” “priority support”, as in get paid to work on features or to be stand-by for bug-fixes and support 24/7 (or, to put it better, to offer support to the client as soon as humanly possible).

Plus, going open-source gives you all the well-known advantages of having the whole open-source community help, and even contribute directly if they want to.

So, it is a leap of faith. Maybe it was the right move to make, or maybe I’m an optimist and a delusional and I should be instead gathering money to buy some good protection.

Well, the leap of faith was taken. So, open-source community, fellow developers, make me proud.

P.S. The GitHub repository is at https://github.com/leftos/nba-stats-tracker. I’ve also migrated most of my current projects to GitHub from BitBucket, and you can find them at (well… duh) https://github.com/leftos.