Hackday 2011 – London Borough Smackdown

Back on March 26th I was invited to a government hackday by Meg and her uni mates. The aim of the day was to get into groups and make use of government data to produce some application, ranging from useful tools, visualisations of data or making fun things with government data. We had 6 hours! I love a challenge :)

We decided to create to a Top Trumps game based on crime statistics in London Boroughs and so “London Borough Smackdown” was born:


http://www.mattgoldspink.co.uk/hackday2011/

And what’s more it won “Most Aesthetically Pleasing” award of the day! It’s designed for Android and Iphones, but will work on ipads and webkit browsers (chrome & webkit)

Big thanks to Meg Morigami, Andrea Jezovit and Maria Font who worked on this with me. I have no design skills what so ever, so this is more their award than anything to do with me.

Posted in Random | Leave a comment

My 2010 recap

Since I’ve not posted in a while I thought I would do a 2010 recap since it was quite a different year for me in a lot of ways. So here’s a run down of some of my highlights:

10. Getting DJ lessons a the Ministry of Sound and being told I have natural talent by Karl Brown! If only I did something with it… My that’s my first 2011 new years resolution.
9. Learning rock climbing with Megu. A fantastic sport and I have a whole new appreciation for how much of an art scaling cliff faces is now.
8. Trying my hand at stand up comedy. On a bit of a whim I thought I’d give it a go and had an amazing time with it, meeting lots of new people and also learning how scary things can get. If you ever want an adrenaline high, then stand up comedy is an amazing way to get it. (if you put my name in to YouTube you may find a clip of my first show)
7. Joining a new team at work. After 3 years of what can online described as hardcore java development I moved into a team to now do what can only be described as hardcore JavaScript development, but I love it and my new team mates are awesome. We have such a great time and I’ve been lucky to work on some amazing projects.
6. Learning White water kayaking (again). I joined the regents canoe club and went on the intro to White water course which again was just an awesome experience and I meta lot of fantastic people. My first kayaking related resolution for 2011 is to learn to roll which I’ll be starting in about a weeks time!
5. Learning Kung Fu at the Shaolin Temple in London. Megu finally persuaded me to try it out and I was bowled over with how hard it was, but how good I felt afterwards and also how much my fitness improved! My 2011 resolution is to go at least twice week and get at least one belt.
4. Getting an iPad for 1/2 price! On which I’m writing this now. I love a good bargain. Megu is glad I’ve finally jumped on the apple and bandwagon and I have to admit I’ve been amazed by how great it is, especially for someone who travels a lot.
3. Releasing my first open source project and getting a lot if great feedback on it. I love subsonic music player, but I’m not too happy with the UI and usability so I figured I would tackle it myself. However I’m not much of a designer and so my uber intelligent girlfriend suggested I just make it look like iTunes. I’m sure there’s issues with this legally, but I won’t make any money from it and personally I see it as an homage to Apple’s great products and also a demo of what a real web app can do.
2. Street dance lessons. Sometimes Megu can get me to do some weird, but cool stuff that I i never thought I would do. I’m glad she persuaded me to try this. I can now Krump and Wack like the best of them.
1. Horse trekking in Wales. I think this was one of the biggest highlights for me as it was such a beautiful experience, even if I did end up with really bad saddle rash! Menu and I had a fantastic time and we can’t wait to go again. She also cleverly signed us up to volunteer to create a website for a local horse riding charity for disabled people which I’m really proud of her for. It should be making an appearance in the new year.

The above were in no particular order. I hope that I can keep up with all these new hobbies in 2011 and without sounding too mushy I’d like to thank my wonderful girlfriend for making so many of the experiences last year happen and for just being so fantastic.

Posted in Random | Leave a comment

A bit more progress on the itunes themed UI

Got the grid loading using WebWorkers to improve performance and interactivity (note the loading status in the bottom left of the grid). Also add playlists to nav tree on the left and began to style the grid a lot more like itunes.
A bit more progress

Posted in Random | Tagged | 2 Comments

New Subsonic Web UI!

So a quick post about a new Subsonic web UI I’ve been working on based on Itunes. Here’s a sneak peak at it:
home
gridview
folderview
coverflow

Posted in Random | Tagged , , | 1 Comment

Can’t boot into Windows XP after installing Ubuntu 10.4 (Lucid Lynx)

I upgraded to Lucid a few months ago but have not been able to use my windows partition since. Everytime I select it from Grub2 it just goes to a grub style prompt and I can’t do much. I finally found a solution here: http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector which worked beautifully first time and I’m now back into XP!

Posted in Random | Tagged , | Leave a comment

JSON, JSR-303, Spring MVC and Ext.js

So I thought I’d post this in case others hit it. If you want to Spring MVC and POST JSON from an Ext JsonWriter to the server and have it populate your bean model and also get validated by JSR-303 validator then you’ll need to do a little work because it doesn’t work out of the box.

In the end I had to do some ugly classpath overriding to get it to work in the way I expected by writing my own modified version of Spring’s HandlerMethodInvoker. If you hit similar issues I suggest following this JIRA: http://jira.springframework.org/browse/SPR-7114 and feel free to use the attached code on the JIRA. It’s been working great for me now.

Posted in Random | Tagged , , , , | Leave a comment

Re-visiting Spring, Ivy and Maven – copy and paste configs

So its been a while since I did any Java development at home and having done enough at work I figured I would get a basic ivy setup with all the regular dependencies that I use for 90% of the projects I do at the firm and am likely to do at home so I can just copy and paste in the future. So feel free to… copy and paste!

I’m using Eclipse 3.5 with the IvyDE plugin. With those installed I created a new Java Project and then set about creating my ivy.xml. My projects pretty much all have the same basic dependencies

  • Spring (3.0.3.RELEASE since that’s the latest)
  • Hibernate (3.5.3.Final)
  • Hibernate-search (Makes indexing my model nice and easy)
  • Jodatime (Awesome for date manipulation)
  • Jodatime-hibernate
  • H2 database (I always start of with a mock in-memory at start of dev and then use some JPA magic to dump out a schema to DB2 or Sybase, or whatever else DB is in use)
  • SLF4J (My logging api of choice)
  • Jackson (For any restful services I might write)

Here’s my ivy.xml

< ?xml version="1.0" encoding="UTF-8"?>
<ivy -module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
	version="2.0">

	<info organisation="mattgoldspink" module="gtdtd" revision="1.0.0" status="integration">
		<license name="Apache 2.0" url="http://www.apache.org/licenses/LICENSE-2.0"/>
	</info>

	<configurations>
		<conf name="compile" visibility="public" description="Maven compile dependencies"/>
		<conf name="runtime" visibility="public" extends="compile" description="Runtime dependencies"/>
		<conf name="test" visibility="private" description="Test dependencies"/>
	</configurations>

	<dependencies>
		<dependency org="org.springframework" name="org.springframework.spring-library" rev="3.0.3.RELEASE" conf="runtime->runtime" />
		</dependency><dependency org="org.hibernate" name="hibernate-core" rev="3.5.3-Final" conf="runtime->*" />
		</dependency><dependency org="com.h2database" name="h2" rev="1.2.137" conf="runtime->*" />
		</dependency><dependency org="org.hibernate" name="hibernate-validator" rev="4.0.2.GA" conf="runtime->*" >
			<exclude org="org.slf4j" name="slf4j-log4j12" />
		</dependency>
		<dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.5.3-Final" conf="runtime->*" />
		</dependency><dependency org="org.hibernate" name="hibernate-search" rev="3.2.0.Final" conf="runtime->*">
			<exclude org="javax.jms" name="jms" />
		</dependency>
		<dependency org="joda-time" name="joda-time" rev="1.6" conf="runtime->*" />
		</dependency><dependency org="org.hibernate.javax.persistence" name="hibernate-jpa-2.0-api" rev="1.0.0.Final" conf="runtime->*" />
		</dependency><dependency org="joda-time" name="joda-time-hibernate" rev="1.2" conf="runtime->*">
			<exclude org="org.hibernate" name="hibernate" />
		</dependency>
		<dependency org="org.slf4j" name="slf4j-api" rev="1.5.6" conf="runtime" force="true"/>
		<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.6" conf="runtime" force="true"/>
		<dependency org="org.codehaus.jackson" name="jackson-core-lgpl" rev="1.5.3" conf="runtime" />
		<dependency org="org.codehaus.jackson" name="jackson-mapper-lgpl" rev="1.5.3" conf="runtime->*" />
</dependency></dependencies>

</ivy>

I’m going to get my spring dependencies from Springsource’s ivy/maven repository, but everything else will come from a mix of JBoss and Maven2 repo’s. Here’s the ivy-settings.xml

< ?xml version="1.0" encoding="ISO-8859-1"?>
<ivysettings>

	<caches artifactPattern="[organisation]/[module]/[revision]/[artifact].[ext]" />
	<settings defaultResolver="ibiblio.jboss.java-net.springsource" checkUpToDate="true" />

	<resolvers>
		<chain name="ibiblio.jboss.java-net.springsource">
			<ibiblio name="ibiblio" m2compatible="true" />
			<ibiblio name="jboss" m2compatible="true"
				root="https://repository.jboss.org/nexus/content/groups/public-jboss" />
			<ibiblio name="java.net" m2compatible="true"
				root="https://repository.jboss.org/nexus/content/repositories/java.net-m2/" />
			<ibiblio name="java.net" m2compatible="true"
				root="http://repository.codehaus.org/" />
			<url name="com.springsource.repository.libraries.release">
				<ivy pattern="http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>

			<url name="com.springsource.repository.libraries.external">
				<ivy pattern="http://repository.springsource.com/ivy/libraries/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/libraries/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>
			<url name="com.springsource.repository.bundles.release">
				<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>

			<url name="com.springsource.repository.bundles.external">
				<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>
		</chain>

	</resolvers>
</ivysettings>

After plugging the above into Eclipse and setting up my IvyDE classpath container to use the new ivy-settings.xml file there was one more thing to do which was to tell IvyDE what type the source jars were. Go to “Window” -> “Preferences”, find “Ivy” -> “Classpath” in the tree and on that page under the option for “Source types” enter “source,src,srcs”. Save and you should get source code attachment to the jars too. Note that you can tell your Eclipse project to use the ivy-settings within it by going right clicking on your Ivy classpath container and under “Ivy Settings Path” enter project:///ivy-settings.xml

Posted in Java | Tagged , , , , , , , , , , | 3 Comments

Sencha touch, YQL and BBC essential mix

So following on from earlier post this week about writing an Ext app which uses YQL to show the BBC radio1 essential mix tracklisting I decided to re-implement the same thing but using the new sencha touch library.

Here it is: BBC Essential Mix Trackisting for Android, Ipad and Iphone

I’ll post later this week details about how it works. For now take a look at the source code and enjoy.

Posted in Featured | 1 Comment