How to implement auto-updates in C# – Part 1

Let’s face it. If you want to embrace the “Continuous Delivery” movement in software development while building your desktop application you have to put in place some sort of auto-updating mechanism.

You may have already put all the effort to setup a source control system, your build server, the necessary wix files, an automated versioning process, and all are configured so that you can deploy a new msi with the press of a button. So now how do your users get that new version? You don’t expect them to periodically search your website or the shared folder where you deployed that msi, download it and install it, do you? Do you!?

Unlike web applications which get that extra step for free, deployment is not the same as delivery in this case. Desktop developers have to consider at some point how they are going to implement that functionality in their software. Unfortunately, most of the times they don’t, until the moment they need to ship the first version. Or even worse, the first patch.

No wonder desktop users have been exposed to a plethora of last minute implementations of auto-updates that gave a bad name to that feature. It has become a necessary evil for most of us.

 

Some times auto-updates hurt

What you need to consider for your auto-update mechanism

There is no universal way to implement auto-updates because every application has different requirements. However there are a number of common considerations a developer has to take into account when faced with this problem. Here are a few of them:

Push or pull version notifications?

Most applications use a pull mechanism to get information for the latest available version. They either check a website or a shared network folder when they startup or periodically in predefined intervals. However if your application is always connected to a server you might want to push version notifications from the server to the running application instead.

How much control has the end user on the update process?

Do you let your user decide when to apply the update? Whether to apply it or not? Do you provide information about what the update is about, what changes and what new features are introduced? Can your user skip an update? How do you interact with your user in general during the update? Does he even need to know about it?

How do you deal with user access rights?

Do all the users of your application have sufficient rights to install and update your application? Maybe they should be able to authorise an update even if they don’t have elevated rights? How do you install an update for non super-users/administrators?

Do you support rollback?

What happens if your update doesn’t work/breaks something? Can you roll back to a previous version? Do you do that automatically or the user has to trigger the rollback process?

How do you treat user data?

Do you need to update configuration files? Databases? Application files? For example consider how visual studio updates the old solution and project files from earlier versions. Do you want to do that during the update or on demand?

It’s not a trivial thing

As you can see already auto-updates is not something you can add quickly just before you ship your application. You need to think about it carefully from the very beginning.

But don’t despair just yet! There are a few well established techniques that cover 90% of the applications out there and chances are that your case falls within those. We will talk about them at the next post, so stay tuned.

Part 2 >

Posted in How to implement auto-updates in C# | Tagged , | Comments Off on How to implement auto-updates in C# – Part 1

Tears of steel

Blender is one of those rare success stories in open source history, right over there, next to Linux and Apache, that justifies the very existence of the open source movement.

http://download.blender.org/institute/logos/blenderlogo.png

It’s story started in an unorthodox way. The creator of Blender, Ton Roosendaal, initially developed the software as an internal tool for the animation studio that he co-founded.

In 1998, Ton founded a new company called Not a Number (NaN), to further market and develop Blender. NaN’s business model involved providing commercial products and services  around Blender. In 2000 the company secured growth financing by several investment companies. Target was to create a free creation tool for interactive 3D (on-line) content, and commercial versions of the software for distribution and publishing.

Unfortunately the commercial version of Blender didn’t work out financially and the company was forced to close down by it’s investors. Normally that would be the end of it all, if it wasn’t for Ton Roosendaal who, with the support from the user community, started the non-profit Blender Foundation:

The Blender Foundation’s first goal was to find a way to continue developing and promoting Blender as a community based open source project. In July 2002, Ton managed to get the NaN investors to agree on a unique Blender Foundation plan to attempt to open source Blender. The “Free Blender” campaign sought to raise 100,000 EUR, as a one-time fee so that the NaN investors would agree on open sourcing Blender. To everyone’s shock and surprise the campaign reached the 100,000 EUR goal in only seven short weeks. On Sunday Oct 13, 2002, Blender was released to the world under the terms of the GNU General Public License.

Ten years later and a few days ago, Blender shines once again with a bright example of what is possible from one man with vision and determination backed with a dedicated and active communityBlender Foundation released its forth Open Movie “Tears of steel

And what is even more incredible?

Just like project Orange, and Peach and Durian, the end result itself and all of the production files are being published under the Creative Commons, free to be reused and for everyone to learn from.

Now this is going to be a massive download but fortunately there is a way to get everything nicely packed in 4 DVDs with some extras from the production process and support this amazing effort at the same time. And don’t forget to spread the word. That is, I think,  the least all of us can do. Kudos to the Blender guys!

Posted in Uncategorized | Tagged , | Comments Off on Tears of steel

Finance as a driving force for AI

The last decade has seen the world of finance getting dominated by institutions that make heavy use of high-end technology to gain a competitive advantage on the trading floor. The terms High Frequency and Algorithmic trading are almost interchangeable these days when exchanges allow speed of transactions that go below the millisecond barrier. Clearly this is not a world for human traders anymore.

Human traders on the trading floor

Since these machines are making multi-million dollar decisions within a split of a second people would like to believe that they actually know what they are doing. It is not surprising that there is a substantial investment from financial institutions in Artificial Intelligence alongside the constant strive to improve performance and robustness of these money making machines.

As a result there are those that see the financial industry as the most prominent sector from which we might see the emergence of a highly intelligent machine.  Dr. Alexander Wissner-Gross calls this a planetary scale intelligence” in his speech at last year’s singularity summit:

Global markets certainly provide a very competitive environment for algorithms to “evolve” and the financial incentive in this particular industry is extremely high.

So is this where a strong AI might emerge?

Personally, I am a bit skeptic about that. I absolutely agree with the argument that there has to be some strong financial incentive behind the development of any Artificial Intelligence. But how much financial institutions contribute to that end?

Finance certainly is adopting occasionally some techniques of machine learning and pattern matching but there haven’t been any significant advancements in AI coming from financial institutions. And if there had been they are kept secret for obvious reasons. Apart from the infrastructure investments in bandwidth, finance is not really contributing to the field of AI in any way other than this: It makes it clear that machines can outperform humans in a field where success and failure are measured with real money. Even people that would otherwise consider AI as science fiction and the playground for computer scientists, can not argue that there might be some value in there after all.

Maybe that is the biggest contribution of finance in the field of AI. Unfortunately it tends to ruin it so often.

Posted in Uncategorized | Tagged , | Comments Off on Finance as a driving force for AI