Wednesday, 26 May 2010

Auscert 2010

So much for blogging once a week! Work has been totally hectic and unfortunately I've got a bunch of cool projects that have been bumped to the backburner. However I'm not complaining because I've just back from my first conference which was the security focused AusCert 2010. If I had to summarize in one word... awesome!!

But for those who want more details

So not having been to one of these before I wasn't sure what to expect. It was held on the beautiful Gold Coast at the lavish Royal Pines Resort. The basic idea was a number of speaking sessions to attend per day combined with vendors detailing their wares. Most sessions overlapped and you generally had a choice of about 4 different topics to attend each hour. The speakers spoke to varying subjects and I was determined to take a few notes to share things with colleagues. Interestingly I thought I'd rate my level of interest in speakers also and found that after each session I was writing "this was the best so far!".

For me the standouts were Roger Dingledine (Tor Project), Marcus Rannum (Tennable Network Security), Crispin Cowan (Microsoft) and Scott McIntyre (XS4ALL). These guys were passionate about their projects and terrific speakers. That's not to say that I agreed with everything they said but they really made me think. These guys were just a few of many great presentations. There were a couple of snoozers for me but to be fair these might have been more suitable to someone else.

The venue was beautiful, the conference was very well run with free wifi, food and coffee on tap, and I learned heaps. If I got the chance to go again I do it in heartbeat. Possibly next time I'd spend some more time networking with some of the other like minded people there. I was surprised to see so many 'booth babes' at a nerd fest like this. To paraphrase Marcus Rannum, its hard to imagine people being influenced to buy security hardware and software by scantily clad young women. Not that I'm complaining.

If you ever get the opportunity to get there, I couldn't recommend it more highly particularly if the speakers are as great as the ones I heard.

Saturday, 24 April 2010

Book Review: JavaFX in Action

To be honest I really only bought JavaFX in Action because I could get it cheap from Manning via their Twitter deal of the day. I'd tossed up a couple of Manning books and decided that UI app's would be an interesting diversion to the web app space that I usually play in. The book shipped quickly and the price was great ($AUD35 including postage) which included the paperback and the PDF version.
One small Manning criticism is the way they handle PDF's. I managed to delete the PDF twice as I skipped from OS to OS (I know I know I should be more careful). Manning make the pdf download link available for 5 days only which is ok until you lose the pdf. You can contact them to open up another 5 day link but I think some of the other publishing houses do it better with an online library that you can download whenever. I like the idea of being able to log in on the web and pull down my reading material regardless of the machine I'm on. Maybe they'll look at this in the future.
The pdf version comes with your name on each page to prevent piracy which is a good idea.

JavaFX

JavaFX is really the first graphical technology that I've started to play with other than say Swing. There seems to be a bunch of options.. Silverlight, AIR, Flex, Swing, and (yes Apple) Flash. Because I haven't done much with these its difficult for me to comment on how JavaFX compares but it seems to have a relatively easy learning curve if you're from a Java background and what you can build is very impressive.

JavaFX in Action the book

The book is an easy read and the author has a very relaxed style with good use of humour. It covers the basics of JavaFX before diving deeper. I wouldn't say its for programming beginners but those with some programming experience will pick it up quickly. I really liked the examples particularly later in the book where you get to build an Enigma code machine and a Flickr client. The examples are also very varied as you're exposed to the different areas that JavaFX could be applied to. The one criticism I would have of the examples is that it seemed to take quite a while before any more impressive than hello world was demo'd. There's only so much reading I can do before I want to be experimenting and I think I had to wait until Chapter 4 or 5 before I found something that excited me. Early examples and quick wins that demonstrated what can be done were one of the great things about Grails in Action which remains my favourite Manning title so far. Having said that when I finally got to them they were very impressive. Instead of the usual way of implementing new features to one project throughout the book, here you got to build different things in each of the advanced chapters. I guess this had to be done to demonstrate the power of JavaFX and the variety really kept me interested and keen to get onto the next chapter just to see what else could be achieved. There are plenty of "oh wow" moments as you build the examples.

Another issue for me was that the author tried to remain IDE agnostic throughout the book. Only at the end does he use an IDE for the examples. This is ok but really most of are using IDE's now and Netbeans is totally free, runs on all platforms so why not just encourage readers to download it to develop the examples. I notice on the author's forum there is mention of examples that won't run from an IDE but will from the command line due to package configuration. He replied that he was trying to keep the IDE complexity out but IMHO we're going to be developing our apps in an IDE so might as well broach it.

The verdict

The bottom line here is that I really liked this book. I think its easy reading style and good bang for coding buck examples encourage the reader to experiment with the technology. As mentioned the examples are varied and each one offers different tricks to learn. I'd certainly recommend this book to those interested in seeing what can be done with JavaFX.

Friday, 12 March 2010

Operating systems are like gyms...

After the rage around my last post I decided to give the Linux thing a go. While I found that it didn't have all the shiny 'it just works' of Apple I'm totally hooked. I'm not sure if its totally customizable environment or the massive amounts of free stuff that do everything I need but there just seems to be something totally cool about being able to do whatever you want however you want. This is something that is pretty new to me after living in the polished dictatorship that is Apple.

What I tried

First I thought I'd try a bunch of different flavours to see what the difference was. On my trusty old Macbook I installed:
  • Ubuntu
  • Kubuntu
  • OpenSuse
  • Mint
  • Fedora 12
None of this was very taxing, more a splash around than a deep dive. Along the way I managed to find solutions to some of the problems I'd experienced with Linux before (see previous post 'Enter the Koala'). The multiple monitor issue was solved by turning the visual effects off completely in Gnome. Things were definitely workable and all the things that I needed were available to me. I was particularly impressed with Banshee. I know its available on OS X but iTunes had always seemed to do the job so I'd never looked at other alternatives. The end result of the Macbook experiment was that there didn't seem to be anything that I could do on my Mac that I couldn't do on Linux. My Mac hardware is getting a little old now with my Macbook being my only Intel based machine so it was time to look at a new tower. Anyway so I've gone out and got myself a new desktop. Nothing too fancy but compared to my PowerPc based Macs and my Macbook much more band for my buck -- Quad 2.5 4GB RAM 512MB graphics card (for under half the cost of the cheapest Apple laptop). After the very quick testdrive of Linux flavours I've decided to go with Ubuntu (Gnome not KDE so far). Its taken a couple of days but I've got everything I think I'll need to tinker:
  • Groovy / Grails
  • Sun Java including JavaFX (also got the Open JDK)
  • Netbeans
  • Git
  • STS (Springsource's Eclipse which also includes Spring Roo which I'll blog about in the future)

Operating systems are like gyms

When I was younger I started going to the gym. At first I went to the hippest gym which had shiny weights and mirrors everywhere. Music pumped through the place while overtanned overmuscled instructors/sales people tried to convince to join up for another 12 months. Then after a time I got feed up with the high cost and overcrowding and went down to my local YMCA. The gym here was dusty and smelly. Equipment was old and worn.
But the Y had a vibe about it. It was about the sport.. about getting things done. There were no posers here it was all about the hard work. You left the place exhausted, people encouraged each other to lift more, push harder and you encouraged them to do the same. I worked much harder here, it was just the expectation that you spilled as much sweat as you could and became stronger for it.

Linux is that old gym. Sure it has more of a curve but once you begin to learn you become proud of the new skills you develop. The thousands of forums and blogs are testament to the community spirit that's out there. I know its only an operating system but after the locked in Apple approach it sure feels like I'm sticking it to the man now. I see why my previous post elicited such passionate responses. Now its my turn to live the Linux dream.

Sunday, 14 February 2010

RANT: Is the Linux dream a myth?

How many times have you heard the arguments about operating systems and why mine is better than yours etc? Now I admit to even starting a few of these talkfests myself.. things quiet at work or new guy starting.. asking what OS they use and watch the smackdown begin (its almost as good as UFC). There'll be your Mac people espousing how "everything just works" and your Windows types saying "the world uses Windaz" so its the best. And then there's the "you should use Linux because its free man" tech guru wannabe hippy types looking all smug and self righteous because the rest of the clowns paid for their OS and he's using his for free. Or is he? In my experience these people are all PC gamers therefore Windoze users.

I've met a few characters that are living the Linux dream or at least claiming to. But here's the rub... is there anyone who's exclusively using it? I don't mean "I've got Linux installed on my USB stick" or "I dual boot". Is there anyone who is actually using Linux as there sole operating system. Booting into everyday to check their email, write their documents, develop their code, surf the web and yes.. play their games. I fear there is not.

Maybe I'll concede and say having a Windaz virtual machine is still living the dream. Is there anybody doing that? I know of one bloke (who we'll call 8Ball to protect his privacy) who uses Ubuntu for work because "its got all the tools I need to get things done". But even he has to use a Windows VM to run iTunes to sync his iPhone.

Now before you fire up your email clients to deluge me with hate mail, I'm no Linux hater, far from it. Currently I'm using a Mac but my Mac fanboy-ism has really worn off since my first iMac and with the price of PC hardware so good, my next purchase will be a beige box. My next OS will be linux.. not sure what flavour yet.. and I'm going to see if I can live the dream. Can I do all the things that I currently do on my Mac? Will the temptation of slick PC gaming be too strong? My new hardware is probably going to be a few months away yet but I'll be sure to update you when it happens and we'll see if I can live the Linux dream.

Sunday, 24 January 2010

Relationships, testing and non project problems

Relationships

So far this week I've looked into issues with relationships between races and swimmers. In order to represent this correctly I've created a raceRecord which belongs to race and also to a swimmer. I struggled with how to do this but I found the answer in Grails In Action (page 87 in case you're curious). Simply:

static belongsTo = [Race, Swimmer]

When the controllers and views are generated all seems to be as it needs to be.

Testing

Ok so I want to believe in the whole Test Driven Development (TDD) ideal but Grails just seems to be so easy to whip stuff up and tests are just not sexy to write. However I've promised myself that I'm going to do things right. I spent some time writing a couple of basic tests for the constraints on the domain classes. It was here that I added a grails plug in (the code coverage plugin). This allows me to run test-app -coverage to see stats on the amount of test coverage I have which I find pretty motivating. Now time for a little rant...

I know that test coverage in and of itself is not a concrete guarantee of code perfection but its got to be better than not testing at all. Yes the quality of the tests is fundamentally important but its not enough to say that just because tests can be poorly written so why even bother having them. Surely this goes to your own integrity to make sure your code (and your tests) does what its supposed to do. If it sounds like I'm excited, let's just say that this has been a bone of contention in my day job recently. Anyway the swim project will not progress any further until all domain classes have tests for constraints to start with. I've updated to the new Grails Textmate bundle too so this should make my test writing quicker.

OS and other disasters

I'd previously partitioned my MacBook hard drive to allow me to install Windows 7. After a couple of days I ditched it for Ubuntu and had been happy with that but with no time for OS experimentation decided to reclaim the partition for OS X. However I couldn't simply re attach the rogue partition and had to wipe and reinstall everything. I do have an external hard drive but its partition as FAT32 and therefore cannot be used by OS X's Time Machine. Therefore I had to manually copy my files over and then copy them back. This was a significant time cost and I think with such cheap hard drives I think I'll get another for Time Machine to avoid this drama next time. The whole process was made easy with MacPorts though.

In better news, I've started following this great blog from a mate of mine about his quest to build a python driven robot. Its well worth the read.

Sunday, 17 January 2010

SwimClub: Steps 1 and 2

The swim project is to create a web app to host the swim club results. My weapons of choice are:
Framework - Grails (1.2)
Versioning - Git
Server - Tomcat
IDE - Netbeans although to date I've only needed Textmate

My first goal was to create a skeleton and then find something to host the site so that my mate (client) can check it out and provide feedback as we go. I've got an idea of where I'm going with the app but its really going to be quite fluid as I receive feedback. As mentioned in an earlier post we're trying to flesh out functionality here and will worry about the look and feel later.

Basic Structure

In order to think the structure through I've decided to create a bunch of basic domain classes. So far I've got a Meet which has many Races. These in turn have many RaceRecords. A RaceRecord has a Swimmer and a time. Eventually I'll refactor the Swimmer class so that it inherits from a User class as there will be other types of users not just the actual swimmers. Using scaffolding I've got basic CRUD operations for each of these domain classes. So far so good..

Hosting

Although this is just under development I still need to be able to host the app so that I can receive feedback as we go. I've decided to just host it locally and use DYNDNS to manage the dynamic IP. I followed the excellent instructions here to install Tomcat. No real issues so far. My only concern is stress on my old PowerPC iMac as its used by the family in addition to the hosting. It has only 1.5 GB Ram and I've created a completely new user for the test server to keep it all separate. Previously I've used Glassfish but that seems a little like overkill at this point, maybe later when I need something that's production worthy.

With all this done things are progressing nicely. Now I'm just waiting on some answers to questions for some fundamentals before progressing. BTW using Google Wave for this as it project work seems to be the only thing its good for. If you're keen let me know and I'll add you to the wave.

Wednesday, 13 January 2010

Rant: The 4 Programmers You Meet In Heaven

Recently I finished reading Mitch Albom's The Five People You Meet In Heaven, a wonderful thought provoking book. It got me thinking about the people that have influenced my own life and more specifically those that have influenced my programming career. Now rather than embarrass these people by naming names I decided to rant about the types of people you meet in your programming journey.

The Kung Fu Zealots


These people I first encountered at Uni but I've meet a few since. They're passionate about their craft to the point that their ideas and way is better than anyone else's. It reminds me of the old time kung fu movies where rival schools battle it out because their way is the only true way. Their programming skills are an essential part of their identity so a criticism of their language/framework/way is a slur on them.
The reason these people make it to programming heaven is that they are so enthusiastic about their language and so can learn heaps from them. If only they could open their minds to other ideas...

The Soldiers


I am lucky enough to work with a couple of these guys. They're the ones who don't make a fuss, don't see what the big deal is, they just get stuff done. Programming might just be their job and perhaps they really enjoy it but they've got more going on in their life. Unlikely to ever been seen in a meeting, they're just about getting the result.
The reason they'll make it to programming heaven is their no muss no fuss attitude. Its not about ego its just about results. Much can be learned from the soldiers.

The Rock Stars


Few people fit into this category but fortunately I've met one. Brimming with energy for the programming craft regardless of style, their enthusiasm is infectious. Sure they may have a specific speciality but they're open to new ideas and new thinking. They're keen to hear about what you're into, how you do stuff and don't judge, only encourage.
Pretty obvious why these people make it to programming nirvana.

The non programming programmers


Ok I know it sounds weird but these are the people that just inspire you to learn more. Practical, hands on, these people could be rock stars if they'd gone down the programming track. They could be from any industry but its not their occupation that's important but they're attitude to learning. They just can't get enough knowledge.
These people make it due to the fact that their eagerness to think something through and understand the how and why of anything also inspires.

So that's my take so far. I hate to violate the DRY principle but all of these types of people have been inspirational to me. No doubt others have had different experiences and I know people shouldn't be put in boxes. Hopefully you've got sources of inspiration in your life too.