Wednesday 31 December 2008

Comp 0.1

I've finally got enough of the comp project completed to make a dodgy initial release. I feel I've made enormous progress over the holiday period and the following functionality is in place:
  • users can add an entry to a competition
  • admin can create a competition
  • admin can generate random winners
  • winners are generated for each prize that the competition has
There are still many things to do but this version contains all the basic functions. So far the learning experience has been huge. I've read heaps of articles and a couple of grails books but it wasn't until I actually applied the knowledge that I really started to learn.

In addition to grails/groovy, the other big win for me out of the project so far has been Git. I can't speak highly enough of it and the cool way branches can be created for very little storage cost. I have been creating new branches willy nilly to experiment with different strategies. If things don't work out, I have been able to easily revert to any other version. The low cost comes because Git creates a hash of each file and then references those hashes instead of duplicating files in each new branch. Brilliant really!

Also in other news, I've just been using a plain old text editor (well the quite awesome Textmate) instead of Netbeans so far. Don't get me wrong I like Netbeans but Grails is so simple that I don't really need the Netbeans power at this stage. There is only a beta git plug in for Netbeans too, so in reality even if using Netbeans I would still have been 'gitting' from the command line.

Have a happy and safe New Year everyone, more dev news next year.

Monday 22 December 2008

Competition Progress

After the always pleasing initial progress you make with a Grails project, I thought I'd try branching and setting up my tests. This process was simple using Git however I seem to have made a few mistakes and resorted to my old habits of deleting everything and starting again. This is a n00b's action for sure. After going over old ground I realised that I hadn't needed to start again from scratch. 
Git to the rescue... and now I'm back with my previously half completed project. I think now I will be more judicious with branching and less inclined for scorched earth. 

As far as the project itself, the domain classes have been created and I basically have a site that will let you create a competition, create an entry, generate a winner. My next step is to CRUD prizes. More to follow... we'll after Christmas anyway... Merry Christmas (especially to you Pablo my only confirmed reader)

Saturday 13 December 2008

Git

I have been tinkering with a grails app for fun and was just going to run it on my local box. I decided to show it to a mate and had to cart it into work for a show and tell. It was suggested that I upload the code to GitHub, an online code repo. At first I thought this would be yet another time consuming exercise but it was really simple. To get going all I had to do was create an account, download git (there is an easy OS X installer) and that was pretty much it.
I didn't bother reading the full instructions but it was all really intuitive. Safe to say its all now online and very happy. If you got collaborative code check out GitHub, its awesome. Also if you want a quick and dirty (that's figurative) screencast check Jeff Brown's also excellent screencast.

Finally if you want to have a play on my grails app, feel free to check it out.

Btw the grails app is a competition registration app. Basically its to allow people to sign up to an online competition to win stuff. There's no other activity except registering to win. It has been a good exercise and I was inspired to develop this after listening to those crazy dudes at Grails Podcast who are running this type of competition. I choose to develop in Grails over Java as I want to push my development in that area. (I considered Django but I really like the cross compatibility between Grails and Java [no flame wars I know Groovy is Java]. Besides it would seem wrong to develop a Python web app for the Grails Podcast!).
The app is open source so can be played with by anyone and I welcome any thoughts.

Thursday 27 November 2008

Perfect code

This morning I wrote perfect code. It was elegant, extensible and dependency injected. I was so proud. How happy was I? It was time for a happy dance and a celebratory caramel latte.

However it didn't do what the client wanted. I can't describe my disappointment when I discovered that my 'perfect' solution was not the answer. Instead a one line code changed was used to get the job done.

I smiled on the outside but inside there were tears.

As Bruce Lee said "it's like a finger pointing at the moon, don't focus on the finger or you'll miss all that heavenly glory". A valuable less on indeed.

Tuesday 18 November 2008

Victory!

After the ongoing grief with Eclipse and Subversion I have finally been able to update the goodtimes project. I used a very cool Subversion GUI called Versions and it worked beautifully. I guess I'm not hardcore as I didn't use command line.

Anyway the news now is that if anyone is interested you can check out the source build it, play with it, add to it and most importantly leave me feeback.

Monday 17 November 2008

What a day...

I have begun refactoring GoodTimes and so far its working well with MigLayout. The biggest problem has been that subversion seems to be drastically out of sync so I am still yet to get the new code into the repo. I'm sure that I'll get past it soon (even if I have to do something drastic).

Its side issues like this that gets frustrating initially but ultimately will be satisfying once its fixed.

Sunday 16 November 2008

Patience...

After the course on Wednesday night I attended the local Java Users Group meeting and saw some great presentations on Eclipse Rich Client Platforms and Spring's Rich Web Applications. Both of these shows were great and after each one I found myself saying "wow I've got to try that".
However time is an issue and I really need to set priorities otherwise I'll never finish anything. So with this is in mind I've decided to head back to an open source project I was working on. Its nothing special just a children's times tables testing game that I started some time ago. Its available here if you're interested.
Originally I used it to experiment with JFreeChart and NetBean's Matisse GUI Builder however I am now using it to test MigLayout as I really haven't found an easy to use GUI framework for swing. There seems to be too much choice and none of it (until MigLayout) seemed to be simple when coding by hand.
I haven't committed my latest tinkerings yet but will endeavour to during the week sometime.

Monday 10 November 2008

Course

Today fate smiled upon me and presented me with a last minute opportunity to attend a Websphere Application Server course. Now its not really part of principle role at work but its amazing how useful this info is going to be to me. All ready (after one day) I am starting to see why we do things certain ways and its cementing my knowledge.

Prior to this I had primarily looked at extending my learning to actual programming topics rather than environmental issues. Seeing things from other points of via helps me to be less inclined to apportion blame and more likely to find solutions.

Awesome!

Sunday 9 November 2008

IDE's

I know this is an age old question - which IDE is best? My experiences so far are these:
  • NetBeans - I like the language support (Groovy/Grails) and the Matisse GUI editor. However it looks terrible on my Mac. The Swing components seem to take up too much space and take the focus off the code.
  • IntelliJ Idea - Many people rave about this one. Whilst I haven't used it extensively (only for the 30 day evaluation period) I prefer its interface over NetBeans. However the deal breaker with this one is COST. Its not free like NetBeans and I can't justify paying AUD$200 for a tool that does the same thing as a free tool.
  • Eclipse - This workhorse remains my preferred option. Whilst it lacks the groovy/grails integration that NetBeans has, it is quick and unobtrusive. I may be biased as it is also what we use at work and I find it much easier to remember one set of shortcuts. Again as a free offering its hard to look past.
As an aside I did outlay my hard earned to buy TextMate which is more a text editor than an IDE. While it is very nice and easy to use, I find myself not using it in favour of MacVIM which gives me the power of vim and doesn't lock me into a particular platform. (I will rant someday soon about operating systems).
It certainly seems to me that there are plenty of very competitive free options for someone working on their code projects. If anyone reads these posts, let me know what you think.

Saturday 8 November 2008

Agile? development

Ok so now I'm going to rage about Agile development and I know that this is probably just my inexperience showing but...

Isn't Agile Development just another phrase for building before planning? If you're working to a deadline don't constantly changing requirements mean that code has to be consistently rewritten? It seems that 'agile' means don't worry about thinking through the design as the coders will build it and then you can tell them what you don't like and get them to change it.

Surely a case of fire, ready, aim...

What are your experiences?

Tuesday 4 November 2008

Monday 3 November 2008

The Road Onward...

I haven't been coding anything since the last post, instead I've been concentrating on a new book Bruce Eckel's 'Thinking In Java'. I've been looking forward to getting into this one as in addition to being a good general Java refresher it will fill me in on some of the Java 5 features such as enums and annotations that I've missed. My Uni course was completed in a time when 1.4 ruled. I intend to do each of the exercises as well to cement the learning.
At in excess of 1500 pages it will take me a while to get through!

Wednesday 22 October 2008

Book Review: Better Faster Lighter Java

This book is more of a philosophy book than a how to. The first half deals with these main principles:
  • Keep it simple
  • Do one thing and do it well
  • Strive for transparency
  • You are what you eat
  • Allow for extension
The remainder of the book deals with Hibernate and Spring and provides a practical example of how to apply the above principles. At times the author vents about current J2EE practices but on the whole I found it to be a very worthwhile read. In particular I like the way that the main principles are reinforced during each example.
If you liked The Pragmatic Programmer you should like Better Faster Lighter Java.

Monday 20 October 2008

Where to start?

With so many cool technologies where do you start to get the best learning experience? Spring, Hibernate, Maven, Griffon, Grails where's the best bang for my time? As I work in J2EE I want to try and understand things that will be job relevant but the projects I'm looking at aren't enterprise in nature.

I guess that the way that I learn best is to do. I have a heap of ideas for projects which will allow me to try bits and pieces of particular languages and frameworks. I really want to avoid yak shaving where possible but I suppose even this adds to the learning process.

Stay tuned and I'll make a decision about which project to start on first.

Sunday 19 October 2008

Welcome

I recently read an article where somebody wondered where they could get the experience that would enable their programming career to take off. They were widely panned in the forum by other users but I thought it was a perfectly reasonable question. I remember thinking the same thing when in the final stages of Uni, "everybody wants people with experience but nobody is willing to give you a chance to get experience".

Inspite of this, I have been lucky and landed on my feet in the perfect job where I get paid to do what I love and work with some awesome people. I relayed my thoughts to a colleague (who I shall refer to as Grandmaster G) who said that when hiring its easier look at people have 1) contributed to open source software and 2) have a blog that he could read to learn more about them.

While I'm not looking to work anywhere else I thought it would be good to share some of my experiences as I learn more about the art of programming. I intend to keep it up to date with my development experiences and hopefully others will find it interesting as well.