Filed under: Uncategorized
At work we have a small, but perfectly formed set of Java applications that help run our business, and we have a well practised methodology for developing, testing and deploying all our modules.
The perfectly formed claim above is a lie. The various modules are a rats nest of inter-dependencies and there’s an incestuous level of circular dependency between some of these modules. And while our methodology for testing and deployment might be well practiced, it’s certainly not straight forward and could easily be streamlined and improved with better tools.
On our old build box, which released it’s magic smoke some months ago, a build cycle would take over half an hour because it had to start with the application with the most dependants and work it’s way down the stack from there. That’s hardly good for instant feedback when your check in breaks the build.
In order to be able to implement Continuous Integration for our Java stack, there were several problems we needed to solve:
- Monolithic build
- Dependency Nightmare
- Visibility of build statistics.
There are others, but these were the main ones for me. The old build platform was based on ant and Cruise Control, using ant wasn’t bad, but for new developers there was quite a bit of work involved in getting a module built. This wasn’t all down to ant, but it didn’t make it easy to manage a projects dependencies.
Some of the 3rd party dependencies we have are ancient, and it’s hard to find the right jar file for most of them. There are reasons for this, but I’m not going to go into them here.
This is where Maven comes in, it’s ability to manage any dependencies a module might have was the biggest draw, tell it which library you want, and what version and let it worry about where it comes from. So I picked the module that had no dependencies on any of our other applications and started to convert that.
The biggest lesson I learned from that is do not try and munge the Maven pom to fit your file structure, change your file structure to match what Maven expects, once you’ve done a couple, it really doesn’t take that long. As well as making the conversion smoother, in the long run you get the benefit of every project looking the same, so new developers know where the source is, they know where the tests are and they know where the extra resources like jboss config files are. It’s a good example of convention over configuration.
The next problem you’ll come across is working out which of the many Maven repositories you’ll need to use, many of the libraries are duplicated across more than one repo, and in some instances the same class is available in multiple artifacts. I didn’t find a quick solution to this, it was instinct & trial and error. Some of them are obvious though.
Once we had the first module converted over, we started to look at the next one. We quickly noticed that many of our apps share dependencies, so I created a parent pom file that they can all share to get the same dependencies. This also made it easy to plug in the code quality checks later as well.
So I’m nearly at the end of this post, and I haven’t mentioned Hudson yet. Why did I choose Hudson over the incumbent Cruise Control? Well the build scripts that built the apps on the build box were different to the ones that developers used to build the same app on their dev box, and I wanted to unify that, also when I looked at the 2, Hudson was up and building something from scratch in about 30 minutes, and cruise control wasn’t even anywhere close. Initially I had some problems with stability, the Hudson process would become unresponsive over night, moving from the default Winstone app server to Tomcat seems to have sorted this out though. Watch out for file permissions in the Hudson directory though if you do the same, it made a plugin I use vanish, which made all my builds that depend on it disappear for a time too!
Using maven also solves the monolithic build problem because each module just becomes a dependency the same way log4j or junit are. It doesn’t help the circular dependencies either, you have to fix them yourself. Using a repository manager like Nexus is a really good idea too.
Creating a project in Hudson is easy, point it at your code repository and away you go. Simplicity is crucial if you want to get everyone in the department on board and it doesn’t get much simpler than that.
I’d like to say a massive thanks to the members of the Sheffield Java User Group who helped me get over some of the initial problems I had using Maven.
Next I’m going to cover the various Hudson & Maven plugins that we use.
Filed under: Uncategorized
While trying to work out how the excellent tab completion works for git, I found /etc/bash_completion.d/git which mentions the __git_ps1 command, you can use this to put the current branch in your bash prompt
\u@\h\[\ 033\[00m\]:\[\ 033\[01;33m\]\w\[\ 033\[1;32m\]
$(__git_ps1 " (%s)")\[\ 033\[00m\]$ '
(Remove the space from \ 033, WordPress wouldn’t escape it properly)
The magic bit being
$(__git_ps1 " (%s)")
There are a couple of options you can set too to get it to show you the status of the repo too, see the file above for more info.
Filed under: Uncategorized
I’m coming to the conclusion that (at least) one of my side projects is dead, http://www.whos-playing.com is a site I wrote to help people manage 5 a side football teams, it lets you pick teams and rate your team mates to help keep the teams fair.
The idea was to have the site free while people beta tested it, then charge people to use it once I was happy that it worked Ok, but no-one wants to use it when it’s free, so I doubt people would want to pay for it.
It’s been live for about 6 months and has gained less than 100 users users, none of them active. I’ve received 2 emails regarding problems on the site, both of which were fixed in quick order, after that, neither user carried on using the site.
I tried engaging the team organisers whenever I fixed major bugs, or improved the interface in such a way that might make it usable for them, but I rarely got even a log in from them.
I’ve tried gaining users by joining various 5-a-side groups on Facebook, but it’s hard not to look spammy when you’re the most active user on there. Some people signed up, but never got any further.
One of the users works for one of the major 5-a-side football pitch providers in the UK, but his experience of the site didn’t get any further than trying to invite a few players to join his team. I’ve even emailed the FA, but heard nothing back.
So now it’s beginning to look like the site is a dud, no active users even when the site is free, even when some of the users who signed up are your friends, it doesn’t appeal to people who hang out on groups aimed at the subject it covers.
So it looks like whos-playing.com is in injury time, all the substitutes have been played, the referee has checked his watch and unless something happens soon I might have to blow the final whistle.
Filed under: Uncategorized
I’ve had a bit to say about the state of travel information online, and regular readers will know what I think the solution is. So when I heard that a company in the North West had been awarded a contract to overhaul SYPTE’s online information website I was quite excited, maybe now we’d get a decent service that worked on a wider range of devices, with better maps and, dare I say it, an API we can use.
That excitement started to fade as soon as I clicked on a link to Rippleffect’s website, it’s flash. If, like me, you work in an environment where you have no rights to install software on your windows machine you’re immediatly stuck. Flash has it’s place, but it’s not front and center, it’s not the first thing your customers should see (or not, in my case)
Because I have other reasons to be here, I made the effort to find the link to the non-flash version and looked to see if there was any more info on the project. There wasn’t any specific info on the SYPTE project, but they have done work for Merseyrail. I’ve had a look at the hourney planner and I immediatly saw the URL http://www.merseyrail.org/noflash.php?mode=not_installed, but it seems to work Ok on a non-flash enabled browser (Chrome in my case, see above). However when I look at the site with a Flash enabled browser … I can’t see what it uses Flash for, certainly not the journey planner, so the user experience is needlessly downgraded before I even start.
I had high hopes when I saw that a smaller, local agency rather than a large behemoth had won the work, but now I’m not so hopeful that what we’ll end up with will be any better than what’s there at the moment, but prove me wrong Rippleffect, please prove me wrong!!
Over 12 months ago I wrote a bit of a rant about how I thought the tech sector in the north was being overlooked.
So 18 months later are things still the same, or has there been any progress, or is the UK tech scene still firmly rooted in the south?
You can see from the comments on the original post that Ryan Carson’s FOWA bus did come to Manchester, which was a good start.
The list of conferences and unconferences in the north grows too, there have been Barcamps in Sheffield, Manchester, Liverpool, Leeds & Barcamp NorthEast was held in Newcastle. Geekup has expanded from Manchester & Leeds and now has meetings in Chester, Liverpool, Preston and Sheffield.
A new conference aimed at the stuff that can easily be missed when creating an app or website, ThinkVisibility, was announced last week, looking at revenue streams, SEO, accessibility and usability, and that’s happening in Leeds.
Sheffield, Leeds & Manchester all have large universities with well respected computer science degrees.
We have communities based around PHP (phpnw), Ruby and Python amongst others, and they all hold regular meet ups around the north.
So yeah, I think it’s fair to say that 18 months later there is more to the UK IT sector than London & Brighton, even more than when i made that post …
Have I missed something? Add a comment and tell me which of your favorite Northern companies & conferences I missed
Filed under: Uncategorized
www.whos-playing.com is my latest web app, and here is the announcement I made over the weekend about it’s soft launch.
Who’s Playing is a new service for people who organise after work, social 5-a-side football games. It aims to take the slog out of emailing a whole bunch of people, collating the responses and finally,
picking two sides that are equal, perhaps the hardest part of making the game enjoyable for everyone.
Organisers invite their players to join the site and as part of the short sign up process, players must give themselves a rating, which is used to pick balanced sides. After each game the other players get to
vote on how well they think the other players performed, and this is used to keep the rating accurate and up to date.
To organize a game, the team owner simply chooses a date, time and location and his players are sent an email with all the details and a link to click if they want to play.
Once the game has enough people signed up to play, an organiser can
let Who’s Playing select 2 evenly balanced sides. Once he’s happy with the sides he can mail them to everyone who’s playing.
Who’s Playing is currently undergoing open beta testing, and match organisers are encouraged to sign up for an account so their feedback can incorporated into the site before development is completed.
While use of Who’s Playing is free at the moment, once completed the cost will be just £10 a month (or just 25p a week extra per player if you have 5 players per side, less if you play larger games), new sign
ups that help test the site will be given 3 months free when the site is officially launched.
Read more on the Who’s Playing blog
I keep tripping myself up with this one, IE is unable to set the name attribute for any dynamically created DOM nodes. It doesn’t matter if you clone an existing node, or create a new one, IE won’t set the name attribute.
Have a look at this example:
var newCheckbox = document.createElement('input');
Will result in a new input element with no name attribute. The only way I’ve found to counter this, that works in both IE & Firefox is to use innerHTML.
var newCheckbox = document.createElement("span");
newCheckbox.innerHTML ="[input name='" + x[i].name + "' type='checkbox' value='0' checked='checked']";
Is there a better way? I’d be interested to hear about any other solutions that might work.
Filed under: Uncategorized
I’m starting to think that Nintendo wants it’s Wii console to fail, even before it was launched they took a massive gamble not to significantly upgrade the hardware of the machine from their previous platform, the Gamecube, and invest instead in a novel controller. This gamble however paid off and the Wii now has a massive install base. The challenge Nintendo now has is to keep those people interested in their platform, keep them feeding the quarters as they used to say.
The modern day equivelent to feeding an arcade machine 10p’s all day is downloadable content, be it in the form of Rock Band’s downloadable songs, XBos Live’s Live Arcade or extra missions for games like Grand Theft Auto. So far the Wii has been really dissapointing as far as online gaming is concerned. Wikipedia has a list of all the games that support WiiConnect24, but I don’t count sharing scores as online play, and many of them are not available outside of Japan.
The latest game to shun dlc & online play is Rock Band, but here in the UK at least it seems they’re going to try and recoup that lost income by massivly over charging for the game itself in the first place. Even at Game’s discounted prices, it’s still twice the price American gamers pay.
Apart from the cost of the game, I’m not being too harsh on Harmonix/EA here because I feel the problem is the platform’s, with it’s feeble amount of storage and complete mess of a friend system that requires each player to know 2 – 12 digit numbers for every other player in the game in order to be able to play against each other.
Filed under: Uncategorized | Tags: carol vorderman, channel4, countdown, porn
I was off ill yesterday, watching channel4′s Countdown, I nearly fell off my chair when I saw this.
A few people have said it’s fake, but I took the photo myself with my phone, no photoshop or other manipulation …