blog.reis.se

It's all about looks

Soundbridge + Spotify

For some time I have bee using Spotify as a music service. And it have worked out very well. With one account as a premium account and then some extra free accounts its easy to play around and create some playlists and the connect and play from the premium account.

The other thing I use a lot at home for music is my Soundbridge, when I bought it, roku labs was making it. Then it was sold through Pinnacle, unfortunately I think its discontinued now. Anyway, when Windows 7 came I could also just look up a what music I like to play, and just send the along to play to my Soundbridg. Compared to other locked in standards, that is just brilliant.

The problem

But now that I have one device and one service that I really like, I would want them to play nice together, I want the full catalog of Spotify accessible from my Soundbridge. What I really would like is to have Spotify as a uPNP server implementation, then you could easily search the full database and have the playlists ready directly. But that’s maybe for the future,

The second best thing, however, would at least to be able to stream what you got from your server to the Soundbridge, or any other streaming device for that matter. After reading several hacks and looking at a lot of solutions I found two that works for me.

Two streaming solutions 

The first is for my work computer, where I alternate from OS X and windows 7 and when I’m on OS X, I can use a commercial app called Nicecast from rogue amoeba (the also make airfoil). It’s very easy to set up but you need to start Spotify from Nicecast and you can't just execute it as usual. What more is that it doesn't code the current song name and artist to the stream. Aöpart from that it works well, it even supports streaming to the world so it means more than one receiver. But for my setup I have Windows machine as a server, so why spend $40 to only stream from my work computer?

So I go with the second and even simpler solution, a little DirectSound wrapper called dsbridge. What this does it taking the output, encode it using lame ENC and then streaming it out. It even shows the current playing song and artist together with the source (Spotify). It’s quite intelligent to, if a receiver connects to the port it silences the local output and if you stop the streaming it just restores the normal output (can be configured). It's an early hack - single stream only but sound quality is ok, and there is something to its simplicity I really like. Very nifty. 

Hope you will be helped with this if you are looking for a similar solution.

// Håkan Reis

PS: Is there anyone with a solution on how to remote control Spotify from an iPhone? :)

Update:  Spotify Remotless is an iPhone app that works together with a helper and remote controls Spotify ($4). Doing a decent job, but the effect is a bit delayed due to the re-coding dsbridge needs to do before it streams it out. It even enables you to tweet the current song, nice twist.


Microsoft just released it’s ASP.NET MVC 1.0 framework source code the other day, and it’s under Microsoft public license, an open source approved license. Just for fun I went to the Open Source Initiatives license pages and read it. And to my surprise it was short, to the point, no nonsense information on what you could and could not do with the software. For once I didn’t feel I had to go through five years of law school just to understand the basics. So ho short is it? It’s 408 word in plain understandable English.

But how well does this compare to other licenses? Well a comparison between some other popular licenses gave some interesting facts:

The only popular license that is simpler is the New and Simplified BSD licenses that lands on 443 words but actually the license part is only 222 words in plain English.

And for a fun comparison: the legal designers at Apple came up with a 3155 words, hard-to-read license called Apple Public Source License.

Beside MS-PL and Simplified BSD there are only one more readable license I found and that’s the Simple Public License 2.0 with 447 words.

So, do people really understand what the license they are using are telling them or are they using GPL or Apache licenses just because everyone else are using it?

// Håkan Reis


Apples new addiction

apple This is a rant. As much as apple has had its focus mainly on the user they are now heading in a new direction. The new iTunes addiction is sales, the new incarnation of iTunes is only about how to get the next fix, closing the next deal.

The sad thing is that as with many other companies that has reach world domination - it cripples innovation. There hasn’t been much innovation in the user interface since it was introduced years ago. The few is focused on one thing, selling stuff.

To start with, what is iTunes?

Well this is one problem, it has become a beast, to the user it is foremost a media player, or at least tries to be. It’s not among the better media players but it gets the job done. As a media player there has been added a few extra features like burning CDs, music sync to iPod and oh, it let’s you buy new music.

But later on they have added more and more bloat; iPhone calendar and contact sync, application sales, pushing media and stuff you already own, podcast, video downloads. Oh, and the updater doubles as a portal for pushing safari as well.

The iTunes beast of today

iPhone sync - Why on earth do I want my iPhone to start up a (now) bloated media player just to sync contacts, calendar details and some music? Why not a blazing fast slimmed down sync application that use the database from iTunes to get the playlists, media track and application that are stored there?

The pusher – For a long time now iTunes ha added a little arrow to each and every track in the library, clicking it took me to iTunes music store, so that I could easily - buy the track I already own. Not a big problem as you could just remove it with a little setting. But not anymore, you can solve it with a hack but how many user are able to do that? We are going to sell more whether you like it or not! And it gets worse.

iTunesThe genius - Masquerading as smart playlist manager genius gives Apple a way to display even more buttons with the word BUY in them. Now they have taken up 10% more of my screen real-estate with lists of music to buy. The playlists are not that bad, but I guess using genres, artists and some randomness would create about the same result. 

Grid view – The latest “innovation” is the ability to show albums in a grid…wow. And the cover flow before that, that turns out to be, not that useful. I love Eye candy and think it can serves a purpose but adding a black blob with a reflection in the middle of the database grid that represent all your tracks doesn’t help much.

What they could have added

Folder watching – I tend to move my music around, as there are not enough space on my laptop to have all my music and there are no easy way to have a central place for all tracks I have a subset on my machine, about 10GiB of music. So why not just add some smart folder watching? Thankfully there are people out there that get it.

Re-sync of statistics – If I play my music on my iPhone it would be so easy to count and then sync that back, as well as what tunes I skip etc. that would be excellent statistics for that genius playlists…

Native OS support – I’m a windows vista user, I actually like vista, and applications should behave. This is not a new problem with iTunes. But when are you going to address it? Not in one single place have they added right click support. You know, we use it a lot in windows. Or even looked at the Visa UX guidelines. But then again, why would they add functionality to us windows user that would be missing for the Mac OS crowd?

There; now I can get back to syncing photos, buying ringtones clips of music I already own and let iTunes steal GDI and memory resources from my system.

// Haqwin


I have said it before and I will continue to push my theory that the next big problem area will be in configurations. The environment variables are an old habit, used extensively by the java framework but it also makes ripples in the Microsoft build environment.

donkeyI just spent some time introducing TeamCity continuous integration and build system to a company. It’s an excellent product from JetBrains that I can truly recommend. Comparing Cruise Control with TeamCity is like comparing notepad with Visual Studio. All can be done but not without inflicting pain.

Normally, setting up a new project build and test is a child’s play in TeamCity, but not this time. Apart from a few hurdles regarding subversion access and some cumbersome handling of references in the solutions there was a more evil and nasty problem.

At each build we were getting a MSB4126: “Release|BWS” configuration invalid. I searched sifted through tons of config files, project and solutions with no luck. Finally I fond the problem, it was in the environment variable Platform. For some reason this variable was set to BWS. I still have no explanation on to what BWS means (other than Beer Whine and Spirituous) and why it was set. I removed it and the system runs without a problem. After that little fix the builds executed like a charm.

The root of this problem is actually that MSBuild tries to be smart, looking at the Platform environment variable and adding what’s in it to the build. But why should it try this, what other configuration sources should I be aware of that can inflict strange behavior on my set-up? And in the name of flexibility and choice we add to this mess of configuration, every part of the system should be configurable, its always in one of the constricts of every project to day. Never hard code, always provide flexibility.

The problem is that leads paralysis as in Paradox of choice, and the way out of this is to step back, look around and start setting up some boundaries for choice. That we offer flexibility with a great sense of responsibility, and stick to a well established default behavior.


My friend posted an article regarding chrome and UX last night. He sent me a note as it has a lot to do with my interest area, and probably expected me to have a ton to say about user experience and Chrome. However in this article there was a notion that caught my interest:

Also the installation is simple. But what about the installation directory? Why are we way down in local settings? C:\Users\Magnus\AppData\Local\Google\Chrome\Application Is there something wrong with following standards when it comes to using the Program Files directory? This is not an oversight so what's the rationale?

I noticed that the issue here is even bigger. This means that any application running has full access to modify the application. This circumvent the security that Microsoft has built around application and user data. This is why you should follow the guidelines that Microsoft has in place.

Also read what Magnus has to say about the fact that Google Chrome plays outside of Vista Security Zones. But for me this would trigger an uninstall of Chrome.

/Haqwin


TeamCity and .NET

TC-LogoFor a while know I have been using CruiseControl.NET for my Continuous Integration setup. It works OK on most occasions, but it seems to get old, no new version for since June last year. I want and expect better interaction and setup experience from a modern tool today.

So along comes TeamCity from JetBrains as a promising new tool, free for three build agents, 20 users and 20 different builds. And for a couple of weeks I have been test driving it. The system itself is built as two parts, the Continuous Integration server and the Build Agents. These need not to be on the same system and you can mix and match Windows and Linux with .NET and Java. It all depends on the build agents. For the test setup I used a server with TeamCity and a build agent on the same machine. The setup is really straightforward, just run the installer and answer a few simple questions. Next up is setting up your project and builds.

There are a few different scenarios I have been working with and to start with the most simple:

Scenario one - build and test:

  • Subversion
  • Visual studio 2008 solution
  • NUnit 2.4.6 unit testing

scaffold[1] Well, it couldn't get much easier than this when installing. There are seven steps for each build setup, but not all has to be used. For the basic setup you just point to your subversion repository and select a project folder to checkout into.

Then you select the solution files, set the unit test to the correct version and specify the test assemblies for example **/*.test.dll. Don't forget to unselect the tests in the */obj/ folders, there is a special setting for this as well **/obj/*.test.dll would do the trick.

Last thing was to set the build triggers, I just went along with 60s delayed check in build, then you can also trigger time scheduled builds (good for integration testing and deployment).

Actually it is that simple, no bloated config files to go through. Just make sure the correct version of .NET framework is in place. I had an early beta of 3.5 in place and it took me a while to figure that out.

So for the client then? Is there a tray icon and stuff? Sure is, on the server, set up the users that should access TeamCity, and the access level. When you login you have your settings, and there you will find plugins for Eclipse and Visual Studio (will link to the code from the site and show the tests and your modifications) as well as a tray icon.

What's next?

The second scenario, build, test, and coverage was trickier, when adding the coverage part. Being on .NET there aren't that many free coverage tools. The only viable one is the old NCover 1.5.8 version. This is sad, $149 is a bit steep but it's ok in the right project. But I certainly don't want to pony up $299.00 just to get 64bit support. Supposedly the pro version don't support 64bit. There is a coverage tool called PartCover but it seems to be dead since August 2007, and there is too little information about it.

The third scenario was one that I didn't quite get around to. This was to use the build in Visual Studio Team System Developer support with Microsoft test and coverage. These are good when you run it in your environment and it would be great to have it running in TeamCity.

I will get to the second and third scenarios in upcoming blog posts.


A few weeks back I blogged about Unit testing event handlers using InternalsVisibleTo. Today I run across a, to put it mild, annoying problem that took far to long to solve. The project I'm working on has come to a point where the user interface has to go through a metamorphoses. I'm redoing the application in full WPF (for speed and convenience I will keep a hosted property grid, but that's another story).

When added a user control to the application I started to get intermittent errors. I mix the development with Blend and Visual Studio 2005. It would always build in both environments but from time to time I kept getting these pesky exceptions. This went on for quite some time. As it started when I introduced the custom controls I began my quest there. I recreated the controls and it worked for a while an the it returned. This was driving me crazy. The exception looks like this:

Could not load file or assembly '...., Version=...., Culture=neutral, PublicKeyToken=......' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  Error in markup file '....;component/Window.xaml' Line 2 Position 5.

It usually worked when I removed all for a full rebuild but not always and sometimes a restart seemed to do the trick. But not always, and there is no way to work like that. I was ready to give up when I remembered a similar hard to track down problem. There is some kind of snag or bug a bug when you sign the assembly and at the same time leave the assembly version in the assembly info to automatic increment. For example, the value:

[assembly: AssemblyVersion("1.0.0.*")]

will give you a terrible headache. So make sure you set this to a constant value when you sign your assemblies. Something like this should work:

[assembly: AssemblyVersion("1.0.0.0")]

I hope I at least saved someone a few hours of frustration.