Sunday, November 23, 2014

Fixed some bugs and found a small issue on Windows 8.1

I haven't been active much since my second kid arrived. While it's a lot of fun (and work) having two kids, it's also a little sad that I can't work on this project as much.

But I did find some time this week to fix a few bugs that were reported by users, causing crashes. Most were related to the thread handling in the background scanner but I also detected a bug in the Properties window which could cause the player to crash.

I actually tested this on Windows 8.1 (since the reports were coming in from users running Windows 8). Since I am still running Windows 7, I haven't been able to test Stoffi very much on Windows 8.

I did notice that YouTube playback doesn't work. I think it is related to the fact that Internet Explorer 11 ships with Adobe Flash built in, but the .NET framework still only gives me an outdated Internet Explorer for embedding in the application. So you can't install Flash (since it ships with Windows) but Stoffi can't use it because it's not allowed to access the newer versions of Internet Explorer. A bit of a problem!

I think the solution is to move away from using Internet Explorer and instead embed Chrome. I have been wanting to do this for a long time but last time I tried the embedded Chrome browser was a little buggy. Hopefully it's better now and I can use it instead. This would mean a lot for me since it has been really tough working with Internet Explorer 7 as the embedded browser. It's extremely outdated and it's a real shame that Microsoft doesn't give us a better browser for embedding into WPF applications.

Anyway, the new version of Stoffi is out now. Nothing fancy but less bugs and crashes is always nice.

Cheers!

Monday, July 7, 2014

We are on Github!

Stoffi has finally made the move from Subversion to Git for managing the code base. In the same move we have moved off of Google Code and onto Github for hosting.

Git and Github is becoming increasingly popular. I really like both due to how they really help improve workflow with pull requests. The increased speed of a distributed VCS as opposed to a centralized one (such as SVN) just makes life a lot easier.

But the old project page in Google Code will not go away anytime soon. There's still a lot of wiki pages left which might need to be moved over to the Github page. I also haven't migrated any of the bug reports or feature requests yet.

Oh, and I released a small bugfix yesterday.

Have a great summer!

Tuesday, May 6, 2014

Stoffi celebrates three years by introducing SoundCloud and cloud playlists

What time is it?
It's update time!

Today it has been exactly three years since the first version of Stoffi was released (not counting the early alphas and betas). Happy birthday! To celebrate this, and life in general, I have released a pretty substantial update to Stoffi.

How big is the update, you ask. It's big. In fact, I can't imagine a bigger update, to anything. Really. This update includes the actual application, you know the program you have installed on your computer, but also the website, the helper scripts, the development and release process, and the server infrastructure. Even the logo and icon is new!

And that's not even all. I will continue to do some huge changes after this release. Mainly moving away from SVN and on to Git. I will also move the code hosting from Google Code to Github in the process.

But before all that, let's start with the application, the Stoffi Music Player.

Stream music from SoundCloud

One of Stoffi's biggest strength right now, but even more so in the future, is the ability to tie together music from different places. It began when I noticed that I, and many of my friends, jump over to YouTube to play a music video which is either not available in the music player of their choice, or they want to show of the actual video. So I decided that a great music player must be able to play music from YouTube, preferably with the ability to watch the video.

Today I am continuing on that path with support for SoundCloud. As with YouTube you can search, play instantly, add tracks to playlists, queue them for later playing, or check out the hottest tracks right now.


Of course you can mix up your playlists or play queue with tracks from different sources (MP3 files, SoundCloud. YouTube, WAV files, Internet radio, etc.)

A more improved cloud

When you start to get settled into your music player, the most important thing is usually the playlists. Those great lists that you have spent hours curating and carefully shaping into audibly pleasure, catered for every mood you might find yourself in.

After spending all this time you'll hate to lose all that work if your computer crashes and needs to be replaced. You'd probably also hate having to do it all over again when you switch from your desktop to your laptop. You could save all your playlists into files and then import those files into your player whenever you want to add that playlist. But this means you'd have to export every playlist you want to move and you need to save them all over again whenever you change anything in them.

As a solution to this I have brought playlists into the new Stoffi cloud services that were introduced with the latest update. If you choose to connect Stoffi Music Player to your Stoffi account, all your playlists will be automatically synchronized between all your instances.


This will naturally add more benefits to how you can use playlists in Stoffi. For example, playlists can now be shared with others. You can share it on Facebook or any other social media, and when your friends add it they will automatically get any changes you make to the playlist.

The cloud services has been improved in other ways besides playlists. Facebook integration, for those of you who want to link your Stoffi account with your Facebook account, has seen improved support. You can now let Facebook see any playlists you create or modify, and any songs you listen to. Last.fm support has also arrived, giving you the ability to scrobble songs you listen to.

Of course, just as when I started work on the cloud services, I am still highly focused on privacy and the ability to choose where your data goes. This means you have fine grained control over what kind of information you want to send to which third party.

Redesigned website

A new cloud service needs a new website. The old one was kinda ugly in my opinion and I am a lot more pleased with this one. There's still some parts which I want to improve and continue to work on, but it is a whole lot more nice to look at.

While the website has been redesigned, the layout will pretty much stay in place. Keeping the old functionality in the same place. There has, however, been a bunch of more functionality added. One such thing is a new user profile and an improved dashboard. Here you can see the mostly played songs and artists as well as the songs that where most recently played.


The account settings has also been improved. You can now select to use a name from any third party (like Facebook or Twitter) or set it to something custom. You can also use an avatar from any third party.

New and cheaper server

I hope that a new, more functional and prettier website will drive more traffic which in turn will drive more ad revenue so I can pay the bills. But ads on Stoffi is optional (yeah, you read that right) so I still need to carefully consider all my expenses. This is why I have decided to leave my current host provider and go to Amazon instead. It's much cheaper and a lot more flexible.

By setting up a whole new server from scratch I was able to reach a more clean state and also experiment with some new software. For example, I have now switched web server from Apache to Nginx. I have also run some heavy image compressors on all graphics on the website. This, along with a more recent version of Rails, will give you a slightly faster website with a lower response time, resulting in a much better experience.

Leaner development process

Even more on the backend than the server infrastructure, one new change to Stoffi is how I am developing it. It used to be that I start a new version, throw in some cool features, scream when I notice that I just created a ton of new bugs. I would then, hopefully with some help, hunt down those bugs and fix them, before I decided that the bugs are too exotic, deem the new features stable, and release the update to the world. I would then go on an repeat all those steps.

I broke this down into three stages: alpha (adding new stuff and breaking things), beta (fixing the stuff) and stable (a version I am not completely ashamed of). The difference now is that I have actually been creating a new alpha while I've also been fixing the beta. So in fact, I have already created the next update to Stoffi, it just needs to be tested.

By having the different updates lined up this way, I can go on and immediately start a new code freeze on the next update. I could not do this before because most features in the next update were always half done, merely started, by the time I made a released. But now I have been holding back this update so I could have a bunch of new stuff ready, just not tested enough.

While this is mostly behind-the-scenes-stuff, it should be noticeable for end users by allowing for more frequent updates. This will make the next three years even more promising.

Tuesday, January 28, 2014

Status update: rewritten core, automated tests, and build script

Hi, all!

As you may have noticed, it has been quiet from me for a while now. There are several reasons for this. First of all I've been busy finishing up my master's thesis and starting my new job. My daughter has also started kindergarten which means she gets sick a lot more often now.

But another reason why I've been quiet is because I've been busy restructuring the development cycle of Stoffi. Starting with the next release I will finally have a more streamlined process which means that Stoffi can be updated and improved at a quicker rate.

In the new release cycle I will have a completely finished beta version where all the new and shine features are done, all that's left is to test it and make sure it's stable. While the testing is being done, I will be working exclusively on the alpha version where new stuff gets released early and often. From time to time I will collect all bug reports from the alpha, fix them, and release the fixes on both beta and alpha. Finally, when the beta is really stable, I will push that into the stable channel, the alpha will go into the beta channel, and a new alpha will be started.

That's the plan. But before I can get there I need to move everything into sync. So now I have actually been working on two new versions at the same time, so to speak. The beta has some new features, which have mostly been tested and are very close to being deemed stable enough, while I have also worked on the alpha which has even more features, and is almost ready to be moved into beta when the beta is released into stable. Still following me?

So right now everything is aligned and almost ready. I have a few more tests to make before I am completely confident that the beta code is ready to be moved into the stable channel.

But this is not all. I have also been busy streamlining the release process around Stoffi. I have created a build script which automates a lot of the tasks that had to be done manually before whenever Stoffi was to be released. Such as updating the version number, compiling the two installers in Visual Studio, creating an upgrade package, and so on. My goal is to have a build server in the future and have this script run every night, pushing out all changes to alpha testers. But for this to work I need to both have a dedicated Windows machine with Visual Studio installed, and learn the script to build the tool for settings migration whenever the way settings are stored is changed. So there's some work left. But the current build script will at least save me from all the manual work involved in releasing Stoffi.

I have also started to write tests, both unit tests and integration tests, for Stoffi Core and the Stoffi website. This will help me keep Stoffi stable now when Stoffi is growing into becoming a full ecosystem with a cloud service, music player, and hopefully a smartphone app in the future.

So while you may not have heard much from me lately, I can guarantee you that you'll have a lot to look forward to. Two new versions of Stoffi (one almost fully tested and ready to be released soon), a faster bug hunt, and a more streamlined release process.

Also, now when I have finished school and started work, I have no labs or exams. When I get home, I'm free.

So that's it for now. I still have a few more tests to run before I can release a new version: playlist sync, file associations, and integration with Facebook, Twitter, and Last.fm. But when all that is tested and no bugs are found, I will officially start this new era of Stoffi.

Have a great day!

Thursday, November 7, 2013

Moving to SQLite for storing application settings

So it's been a while since the latest updates. The biggest reason is because I have been busy with a lot of other stuff lately but it is also due to what it is that I've been working on regarding Stoffi.

If you've followed Stoffi on Facebook or Twitter you'll know that I've been working on a new version for OS X. While doing this new version I started to get myself stuck in some serious crashes. After a lot of investigation I found out that the reason behind the crashes was how I was storing application settings in Stoffi.

Since the start of Stoffi, settings have been stored in XML format using the ApplicationSettings which is built into .NET. This has some downsides which have been discussed in various bug reports. The biggest issue is that reading and writing is extremely slow. Somewhat related is that whenever the settings are updated the whole application will freeze for a second, which is why I decided to save the settings only when Stoffi is closed. The result is that Stoffi needs to spend a lot of time reading and writing settings at startup and shutdown.

So for a while there has been some discussions about moving to another backend for storing settings. Both SQLite and some form of NoSQL database has been suggested. However, this move would mean a lot of work and could break a lot of stuff.

When I got stuck in crashes while working on the OS X version however, I was more or less forced to fix this long standing issue. So for the last months I have been slowly working on rewriting the whole part of Stoffi which saves every setting of Stoffi. At the same time I have been juggling 133% study pace and helping out with Haylie.

But today I can finally say that the new system is working and is pretty stable. I have verified that it works on both OS X and on Windows. There's some spit and polish left but most of it is there.

So what are the benefits? Well they are there but you probably won't notice them too much. Stoffi will now have a slightly faster startup and shutdown which is nice. Settings are also now saved as soon as you change something. So if your computer crashes or Stoffi is for some other reason not properly shutdown, you will get right back to where you were the next time you start it. This is pretty sweet for those of us who are in the habit of abusing Stoffi pretty heavily by crashing it and shutting it down in the most merciless ways.

A downside is that you can't just open the settings file and edit it in notepad anymore. Now you need to download the SQLite client and have some knowledge of SQL if you want to mess around with the settings. But if I know my users well this won't be much of an issue for most of them.

So, with this large rewrite finally done I can go back to some other cool work. I plan on implementing playlist management in the OS X version before I move on to releasing the pending upgrade to the Windows version. If you want to help speed up the process head over and download the beta version of Stoffi and report any issues you find.

Wednesday, June 19, 2013

Beta update: DI.fm playlist import, faster shutdown, improved UTF support

In a few hours I will fly to Hong Kong. So I'll be gone for a few weeks, but before I leave I want to give you a new and fresh beta to tear apart.

This update improves the playlist importer. You can now import playlist URLs from Digitally Imported (di.fm) without Stoffi crashing. There's also tons of updates regarding the playlist synchronization and listen statistics. Stoffi can now handle songs, artists and playlists containing special characters. This required a bit of work on both the server and client but hopefully it's working alright now. Let me know if you run into any problems.

The shutdown is now also faster, or at least it should feel like it, as the "Saving settings..." dialog is now gone. Stoffi will still save the settings and .NET's built in settings engine is still really slow, but now all that is done after the window disappears. This should make it appear as if Stoffi is shutting down in less than a second.

I also managed to find and fix a bug that caused Stoffi to crash while searching on YouTube. This crash didn't happen every time so it was a bit hard to pin it down but it's gone now.

Take the beta for a spin and report any bugs you may find. As far as I know all bugs are now fixed so unless anyone finds anything more I will release this to all users.

Take care!

Monday, June 17, 2013

Alpha update: more views, Jamendo, YouTube playlists

Time for another update to the alpha version of Stoffi.

The biggest of the new features in this update is the additional view mode. You can now select to view your songs as icons, content tiles, a simple list, or the old detailed list. It works just like in Windows Explorer except we don't support arbitrary icon sizes (yet). Hopefully this will make it a bit easier to browse your music.

Speaking of music, I've added more. This time the source is Jamendo. I haven't had time to really dig into Jamendo myself yet but it seems to be a bit different than what's available on SoundCloud. Also, the meta data seems to be much better at Jamendo.

The last big new feature is the ability to import YouTube playlists. Right now you can do this by selecting to add a playlist from YouTube in the context menu and then pasting the URL into the text box. Later I will do some magical connection between your YouTube account and Stoffi so your playlists can be automatically imported into Stoffi and synchronized back to YouTube.

As usual, there's also all the latest bug fixes coming in from the beta version of Stoffi as well. But you still shouldn't expect any stability in the alpha. Most of these new features are really untested and may crash a lot. But if you want to see the direction I'm taking Stoffi in for the next upcoming releases you can download the alpha and try it out. If you want to help out testing new stuff and send bug reports you should focus on the beta, though.

Have a great day!