Tuesday, 29 November 2011

Are programming reference books a thing of the past?

Something that struck me while working today was the C# reference book which currently acts as a monitor stand on my desk. Pro C# 2008 and the .NET 3.5 Platform (Windows.Net) by Troelsen is no doubt a very good book, but it has served no use other than to help my posture! In saying that, this book is at least more useful than the ones gathering dust on my bookshelves at home.

So it does beg the question - are these types of book a thing of the past? Do we really need them? My response would be no - I have not needed one in 2 years so the likelihood of needing one is very low. Whenever I need to know something it is far quicker for me to use Google which will list examples of its use which can even be copied and pasted than it is to open up a book, check its index or contents. The same can be applied to finding out information outside of programming.

What are the implications of this? Does it lead to a poorer understanding of the material, and ultimately poorer code? Probably. When using classes or controls or components it is easy to dive in and use it, rather than to look at how it should be used, what the consequences are, what the better options are. Perhaps if you had to take more time to find out the information, you would make a more informed choice.

A good example of this can actually be found in my post yesterday about the MediaElement control (WPF MediaPlayer with Last.fm interaction). When using it I did a quick Google, found some examples and was able to create something in a matter of hours. However, my final product kinda defeated my original goal which was to replace Media Player with a lightweight alternative, as it transpired that the MediaElement actually uses Media Player behind the scenes.

Does this mean I have learned my lesson? No! Personally I don't have the patience to search through books when the information is at my fingertips, and I can run through examples within a couple of seconds. For me, this type of reference book has become a thing of the past.

Monday, 28 November 2011

WPF Media Player with Last.fm interaction

To work around the fact my laptop is getting old and can't seem to handle multiple programs open at once i.e. Visual Studio or other dev environment and a media player I thought I would have to write my own lightweight version of one of them. The obvious thing to go was the media player which had so many features packed into it which I never used so I set about creating my own media player.

Having recently installed Visual Studio 2010 I was keen to try out Windows Presentation Foundation (WPF) so I had a play about with it and within a few hours I was able to knock up something quite cool thanks to some good tutorials on the net.

Aesthetically it is pretty shocking but it does the job nicely and even has some integration with Last.fm in order to get an image of the artist and to suggest to me some related artists. Additionally clicking on any of the artists, albums or tracks brings up the relevant page in Last.fm if you fancy finding out more about them.

As mentioned, the effort involved in setting this up was incredibly small - the ability to play the tracks is all handled by the MediaElement class, which I believe also handles playing video so I'll maybe enhance it to do this. The only downside to this is that it is using Windows Media Player behind the scenes so there is a requirement for this to be installed.

The Last.fm interaction is through simple web service calls - the list of calls that can be made can be found published on the site http://www.last.fm/api.

I'll maybe post more specifics of how the player operates or share out the source code if there is any interest, but my first impression of WPF is that it's pretty cool and powerful; however I doubt in the long term it will replace Windows Forms Applications.

Sunday, 27 November 2011

Paintable - Multi-touch table

As I have only recently become a project manager I have been thinking back over previous projects I have worked on and my only experience before of being a project manager was in my masters year at the University of Strathclyde. With a team of 7 people, a load of Java code, a budget of £2000 and 12-weeks to do it (along side our dissertations and other classes) we managed to pull together something quite remarkable - a multi-touch table.

Using the reacTIVision software toolkit (http://reactivision.sourceforge.net/), a Mac mini,a projector, a piece of perspex and a table from Ikea we produced an extensible framework from which the university could add new applications.

The following Youtube links show the table being used as a paint application , and also a simple checkers game.

Paintable - Multitouch interaction:

Paintable - Checkers game:

Not perfect but the concept is there! Oh and before anyone comments about it I do know that my .NET blog's first proper post contains Java and no .NET at all!

Where to start...

Hi and welcome to my blog! I'm going to use this space as a place to bounce any new ideas I have, share any tips and tricks I have picked up around coding and project management, and also maybe write about things I have done in the past.

Android Studio - How to change app icon (ic_launcher)

Changing your applications icon (ic_launcher) is a common occurrence when developing your android application. Here's quick steps on how...