Tuesday 30 June 2009

Google App Engine play

I've gotten back around to trying out Google App Engine.

The main area that I have heard about it has been in my dealings with Grails, but I am sticking with the plain Java capabilities for my initial experimenting.

It seems fairly trivial to build and deploy some servlets using the Google plugin for Eclipse - even though that has meant switching back to a Ganymede version of Eclipse instead of the shiney new Galileo.

Being the curious sort, the first chunk of original-ish code that I deployed within my application was a servlet that iterates over the System properties of the server that is running the application and outputs them to the response.

After some sleep I think I will have a go at implementing a distributed game of noughts and crosses using AJAX and some servlets. This seems like it should be a simple enough game to implement, but will have the challenges of keeping track of players and game state.

Thursday 25 June 2009

Grails Bug Fixing Sprint

I was just perusing the Grails User mailing list and came across a post by Graeme Rocher asking for the community to let him know what bugs are "hurting" the most.

As part of the movement towards greater stability outlined as a key objective on the roadmap for Grails 1.2 "Bedivere", Graeme is heading up a bug fixing crusade targeting what is going to produce the greatest value to the active users - that means me, and maybe even you!

If you want to get your 2 cents in on the informal "vote", head over to the Grails Jira to see whether your issue has already been reported. If it hasn't then the best way to see to it that your issue gets attention is to add a Jira entry - make sure you give sufficient details about how to repeat the bug or unexpected behaviour, or risk seeing it drop down in the priority list.

On a slightly unrelated note, I wonder if someone will produce a plugin with a silly title, such as "holy hand grenade of Antioch"? The penny is just tropping for me as to the naming of releases and the Grails product itself.

Wednesday 24 June 2009

I love it when a plan comes together!

Today I had one of those interviews where everything seemed to just flow naturally from the start to the finish.

I was initially hesitant to agree to this face-to-face interview, as I am in the process of preparing for another interview which will involve me using an editing environment that I am not particularly familiar with. The agent's description of the interview process convinced me to go along, and I am quite glad that I did.

I started off with 20 minutes to come up with a design for a web-based application that closely resembled a game I had worked on as part of a university project.

Here's how it rolled off my pen:
- identified entities, their states and relationships to eachother as UML-like class diagram;
- highlighted an aspect of the "business rules" that was ambiguous, if not downright contradictory;
- thought a bit about the processes involved in initialising the game, general game play, where the responsibility for that processing might belong;

Then I went back to the description of the task to see what I was missing:
- jotted down some possible approaches for client-server interaction
- added some detail about how state changes could be communicated from the server back to the client
- considered approaches for dealing with scalability and preventing cheating

None of this had much to do with my university project, but having a slightly familiar concept helped my approach.

I really enjoyed this interview approach, as it demonstrated the way that I go about coming up with a full solution - if you think of the loosely described model as a series of inter-related problems.

The rest of the interview was more typical - a talk through some of the technologies on my CV: "what do you think about Spring?", "describe the JDBC connection pooling problem", "did you use tiles with struts?" etc., followed by a pair programming exercise that went smoothly, apart from the Eclipse upgrade issue preventing the keyboard from functioning :-)

I expect the interview will lead to the next stage, but even if it doesn't it was great practice for the next one which is in a couple of days time.

Monday 22 June 2009

Grails gotchas / showstoppers effecting uptake

I was somewhat relieved when I came across this blog post which highlights the fact that other developers have also faced a loss of productivity when working with Grails.

The "convention over configuration" approach speeds up development and keeps the learning curve fairly easy for most developers, but the list of open issues on the Jira suggests that there are still some aspects that need tuning - or detuning in some cases (e.g. domain objects not having GORM functionality due to something missing in lazy decoration/injection).

I've been wondering what sort of risks are involved when you use a software product that is essentially just providing a layer of abstraction over several loosely related other products.

For example, what can you do if you want to upgrade to a later version of one of the underlying technologies (for a fixed bug, or to use a new feature), when the layer above that hasn't been tested or made configurable for that new release? At present, I would expect that you would be stuck with whatever version is compatible with your version of Grails. This could change once OSGi becomes a bit more mainstream, allowing for the use of multiple versions of the same libraries within a single application. I wouldn't want to rely on that being the saviour of any application of mine though.

Tuesday 16 June 2009

Get rich quick scams advertising on Facebook

Since I tried tricking the context-sensitive advertising system into not showing me all the dating sites, I have noticed quite a few advertisements that looked to good to be true, in other words scams.

Out of curiousity I have clicked on some links and found that they show up as a fake site designed to give the appearance of an online newspaper with a journalist's report on their "product".

If you see a site asking you to pay a small fee to get a package explaining how you can make thousands of £s (or $s) by using Google from home - know to avoid it. It's just common sense, that when these people go out of their way to mislead the public they are up to no good.

I have read about some people being foolish enough to give their credit card details - and then seeing monthly charges that they had not approved, or had missed in some obscured "terms and conditions".

Be sure to report such misleading advertising if you come across it on Facebook etc.

Sunday 14 June 2009

Why some killer apps should be approached with caution

In my career so far as a software developer I have worked on a number of projects that were supposedly guaranteed to launch the investors into the bigtime.

Surprisingly enough - they didn't.

This post is intended to provide some general advise to others that may be considering investing money and manhours into a "killer app".

Be realistic when you determine your potential market, then knock that figure down some serious percentage points to determine your likely market. How many times do you hear people come out with figures about how many cellphones or mobile devices are in use, when compared to PCs? The fact of the matter is, unless you're catering for a fairly low level device, or a web-based application, you will never come up with software that is going to capture enough of the market.

From my observations, Nokia used to have a reasonable market share - so it would have made sense to develop applications for their devices. Then along came PocketPC phones with Windows Mobile and 3-G networks allowing for greater bandwidth.... Then came the iPhone, a device that looks pretty and has some nice applications built into it (e.g. Google Maps).

Providing a service that is based on a user interface to cater to the lowest common denominator of devices might get you a wider potential market, but it won't be "cool" or "sexy" enough to attract that wider market share.

Just because it's useful, doesn't mean that people will use it. I recently thought of producing an online lost and found site, where people could go to register missing / located items and tie that information to a specific location. While this sounded like a useful system, it has several flaws - how would people know about the site? why would they choose to bother using the site?

It's not the sort of site that would get a lot of repeat usage - let's face it if you lose something, you can prettymuch consider it gone for good after a few days.

Don't assume that someone bigger than you isn't already working on the same concept. There are a number of features that now come as standard on the iPhone and various other devices that companies around the world must have invested millions into trying to develop for their clients, or themselves.

Expect change. Prior to Windows Mobile 5 there was no way to get at the text messages directly from .Net compact framework. You had to build up a C++ DLL and hope like hell you never had to maintain that code.

Likewise, it doesn't seem like that long ago that having your phone know your location was something out of the movies. Now it's a common feature on any modern halfway decent device for use in applications with location-based services - whether it be for showing you a map so that you can find your way to the bar to meet your friends, or to include metadata with the photo you have just take with your phone.

Build for a real world client before attempting to cater for all possibilities. This could be re-phrased as "scope your project sensibly". Trying to produce a sports administration system from scratch, complete with all the bells and whistles, which can be used for every type of organisation known to man was overly ambitious.

Minimise your uncertainties. If you have a lot of experience with developing systems on a particular platform, then you shouldn't reach out of that comfort zone without a very good reason, and listening to the advise that you're given. Nobody likes to hear, "I told you so", when it comes to their money going to waste.

Look before you leap. Know your competitors. Once you think you have the market sussed out, look again. I was surprised that the market researchers for one project I worked on had not found out about a competitor that I knew of. They went on to identify that competitor as significant, but then changed their minds on the basis of a (probably out of date) article on a single website.

Once you have identified the competition. try to take an impartial look at their offering. If their product looks prettier than what you can imagine producing, and already has significant market share - what are you going to do to be better? How do you know that they are not already taking their product to that next level?

Don't re-invent the wheel, but check the terms and conditions
. If there's open source code out there, use it - provided of course that the associated copyright and licensing conditions are not going to force you to make your extremely valuable and top secret code available to everyone that asks for a copy.

Another limited use killer app

A week or so ago I signed up with a Google App Engine account. The next step was trying to think up an application to develop and deploy onto this new-ish cloud computing environment. I thought about an auction system, as I have some experience of that from a project that I lead back in New Zealand, but I got side-tracked into preparing for some interviews.

Yesterday I was looking for someplace on Google maps, which made me somehow think of providing an online lost and found service. Users can register to post their lost/found item details:
  • using a Google Maps mashup (or whatever you like to call it) to specify the location
  • upload image(s) of the item
  • specify a means of being contacted
Sure enough when I did a quick search I found that someone else is already providing a similar service - but I'm still considering it as a toy application that could motivate me to try to produce a map-based system that can be configured to use different mapping services, as opposed to being tied to a particular provider. That was an issue that came up in one of those "what if" conversations at a pub after a technical user group.

Friday 12 June 2009

Declaring directives in Grails

I thought that I may have been missing some subtle aspect about programming in Groovy when I noticed some code that was trying to specify the transactional behaviour of a service.

According to the Grails documentation the way to specify this is by including a static variable named transactional and set it to true or false.

The default behaviour (without the existence of this static variable) is true.

In a number of cases, including the 2nd edition of The Definitive Guide to Grails I didn't see the static keyword preceding the transactional variable name (I've submitted errata for the offending code snippets).

In the world of Java development, I would hope that my IDE would pick up cases where it appeared as though I had made a simple error. Can anyone out there advise me of whether this sort of thing is being included in the development of the various plugins for IDEs at the moment?

Thursday 11 June 2009

Tube strike? What tube strike?

My local Underground line was mostly uneffected by the RMT strike, as it turns out that not all lines are operated by the same union. This was a great relief when it came to finding my way to a job interview on the other side of town, as I didn't have to use buses or boats or anything that I would normally avoid when wearing a suit on a rainy day.

Coming back home at around 5pm did seem a bit cramped though.

Monday 8 June 2009

Want to know your audience?

For a few years in my career I was responsible for setting up web log analysis software to generate reports for various clients so that they could see what sort of value for money they were getting from their websites - at least in terms of the number of visitors, their location (approximate), which pages they were going to, what search engine queries they had used to find the site, etc., etc.

Webtrends suited us for a number of years, but then had a change in pricing model as they targeted major websites, so I evaluated a few other products and came across Weblog Expert which had enough features to be practical as a replacement and was in the right price range for some of our external clients.

Now that I am posting some content on my own little blog that is hosted somewhere that (presumably) won't allow me access to raw log files, I have had to look into other options. Google Analytics seems to do a reasonable job of producing pretty graphs and lets me know that my audience level is about the same as might hear me thinking aloud, but not quite as large as might hear me singing in the shower - neither of which I do often.

Back into interview mode - during proposed Underground strike

Today I heard that I have my first job interview lined up already.

It's in central London, which is good. Hopefully the tube strike will either be called off or will not have as much effect as I expect. The evening news mentioned 100 extra busses can run if necessary, but I can imagine that causing more problems than it would solve.

I don't know all that much about UK politics, but if the mayor of London can be criticised for not having suitable contingency plans in place for an unusual run of snow days, then I expect Boris will be catching a considerable amount of flack if the underground is shut down for 48 hours.

I'm going to assume that the overground evening trails will not be effected, as I have a friend's birthday dinner to attend across town. Based on the reviews for the restaurant the food will either be great or rubbish.

In terms of interview preparation, so far I have mainly been looking into new technologies, so between now and Wednesday afternoon I will need to look back at projects that I have designed and developed and be prepared to have a whiteboard session explaining what fitted where, and why. Fun times.

Google Wave

When I'm not cutting code, I still seem to enjoy getting online and making use of what other organisations have come up with. Not surprisingly several of the more interesting sites are developed by, or now owned by Google.

Whether I'm posting footage on Youtube, seeing where places are on Google maps, or Blogging (here), Google seems to be onto a good thing when it comes to providing useful software services online.

There has been a lot of buzz going around since Google announced Google Wave. It could be the cynic in me, but I'll be interested to see how the nuisances in today's world of email, IM, and web-based rich content are kept out.

I don't think that I will be an early adopter of this particular technology until I see for myself how it all fits together.

Friday 5 June 2009

Lag time in layered software

After hearing about the dismay of various users of IntelliJ IDEA when Grails upgraded from 1.0 to 1.1, I got to wondering what sort of cost is involved in developing with technologies that are dependent upon other software.

I see this as an area where open source technologies may have an advantage, as the beta and milestone pre-releases allow developers of related products to update their products in parallel.

I will be curious to see how the developers of Grails and the various plugins cope with the inevitable versioning issues that will arise once Spring 3 is officially released.

In theory it shouldn't be a big deal, but it's inevitable that there will be companies out there with the "If it ain't broke, don't fix it" approach to upgrading.

Ubiquity vs Standards

I noticed a post on SpringSource's blog site the other day that included some a chart of job postings based on some specified criteria. The blog post was about some recent Red Hat announcement, so one I assumed that the chart was intending to compare Spring against Red Hat.

I'll admit that I haven't done a lot of development using RedHat's technologies (unless you count Hibernate - which is practically everywhere - and RichFaces JSF), but I'm pretty sure that the charts weren't giving a fair comparison. Seam and RichFaces are not all that RedHat (JBoss) is about. I posted a comment, then noticed a day or so later that a blog post from somebody at Red Hat had used the same ad statistics system to show a quite different picture.

When companies advertise for a developer (shameless plug - I'm available at the moment), they're not always after somebody who has specific expertise with the particular application server that they are currently using - because that criterian could eliminate a lot of perfectly good candidates. These servers have to get certified as meeting certain standards before they can claim to be "Java Enterprise Edition" after all.

So, I feel that Rich's chart may be a little more reasonable than Rod's if you look at it in terms of what skills the industry has been seeking from new employees.

I'd rather be hearing about the technologies than the - possibly biased - perceived market trends.

(Spring Security 3.0.0.M1 looks like a great update).

Thursday 4 June 2009

Technologies I am currently looking into

Here's a list of tools / libraries / methodologies that I am hoping to reading about and have a play with while I some spare time on my hands.

TestNG - why use it instead of JUnit? How does its support for running tests in parallel work?

JSF 2 - what's changed since I last used RichFaces, Facelets etc.? Is it now possible to utilise the various open source widgets side-by-side?

Groovy - What cool features are there that I haven't already come across in using Grails?

easyb - will this give maximum value by allowing developers to write tests more rapidly (Groovy vs Java), and have the tests more human readable?

  • STS (Spring Tool Suite)
  • Spring 3.0
  • Spring Security 3 - initial overview makes me want to have a play with the @PreAuthorize and @PostFilter annotations, the codebase tidy up should make it easier to get setup up too.
  • Roo
  • tc Server
  • DM Server
  • OSGi support
Google Wave

Google App Engine - just got an account set up, installing exclipse plugin ...

Google Web Driver - an alternative to Selenium

Wednesday 3 June 2009

Brushing up on core Java, and reading for interest's sake

In preparation for the upcoming series of job interviews that I will no doubt have, I am trying to stay well disciplined in reminding myself about some gotchas in core Java that tend to come up as "technical tests".

I've just taken a look into Behaviour Driven Design and I can see why an old colleague has been name-dropping about it lately. My initial take on it it that it is still test-driven development, but the subtle change in naming conventions helps the developer to stay focussed on what the customer has specified. Keeping the business language in the code, allowing the tests to read more like specifications. Saying something "should" behave in a particular way instead of stating what you are testing.

Hopefully I will have a chance to try out JBehave soon.

Tuesday 2 June 2009

The perils of specialisation

I had an interesting meeting today. It involved the phrase, "we're letting you go".

I wasn't expecting to be made redundant, but evidently these things happen in Start-ups when a major release slips.

The last-in first-out decision was probably made easier for the company by the fact that I was the main Grails developer and they are considering Grails as a slightly immature and fragile environment "okay for prototyping but just too flakey on upgrades" etc. to be considered for deployment in the wild.

I've had a few job specs sent through from agencies already, so here's hoping the market is more buoyant than when I first arrived in London.

My CV now looks a bit more impressive, as I have been using Grails, Groovy, Apache Velocity, SpringMVC, subversion, c3p0 JDBC connection pooling, MySQL - including stored procedures and the event scheduler of version 5.1