Friday, September 25, 2009

Griffon framework is great for quick utilities

Update, moved to Just Thinking: Code

I've been very successful this week in throwing together a quick application to read a Excel file and update a Web Service. Typically I would have done this in Groovy as a command line app. But I really wanted to put some of the information in a text field and have buttons to initiate different functions. Griffon allowed me to very quickly build a swing app.

I've not used Griffon for anything in the past. I have put together a couple of apps with Grails, but it's really not the same (close, but not the same). I've been waiting for Gorm to be ported to Griffon to use it for anything, but this project did not need any database access.

BTW, I used Poi for reading the Excel file and GroovyWS for accessing the Web Services. GroovyWS needs more work (especially in error handling), but it was sufficient for what I need to do. I covered another problem with GroovyWS here, and I dearly wish that one was fixed in the library itself.

Griffon is a Groovy-based framework for developing standalone Java applications similar to Grails.

Grails is a Groovy-based framework for creating Web Applications.

Groovy is a great programming language.

Saturday, September 12, 2009

To remember

From a conversation on the grails list, but I keep forgetting about this ability in groovy, so I'll paste it here so I remember it and research it.

Date.metaClass.getAge = { new Date().year - delegate.year }
println new Date(79, 11, 17).age

Friday, September 11, 2009

iTunes 9 lost smart playlist on my iPod, who are they?

I updated to iTunes 9 last night.

When I got to work this morning, I found that the smart playlist I have all the podcasts and other audio/video files I want to listen to during the day, in the order I want to listen to them, was empty. They were in the playlist in iTunes when I sync and disconnected this morning, but for some reason, the list was empty on my iPod.

All of the files seem to be there, I just have to go find them on the iPod and play them individually.

With Apple fighting with Palm about who can sync to iTunes, and then breaking something that I've used for years, I can't help but feel that Apple is becoming more and more like Microsoft. Argggh.

Thursday, September 3, 2009

OS Update

Found out why OpenSolaris 117 and greater will not run on my laptop. There has been a bug reported where certain motherboards cause the same problem. I will have to wait until they get around to fixing that bug to upgrade to that version of OpenSolaris.

Because of this, and because I've picked up a contract that requires me to work in Windows, I have to come up with another plan. Windows becomes a problem because I'm running Vista under VBox on OpenSolaris. For various reasons I won't go into now, I will not run Vista next to the metal. But since I only have 2G of onboard memory in the laptop, if I give a VBox session more than 1/2G OpenSolaris begins swapping like crazy. With 1/2G, Vista really can't do more than one or two things at the same time. Fine for what I was using Vista for, but Java development requires a bit more.

My plan, which will probably start after a couple of the checks from that contract come in, is to start purchasing parts each month to build a new computer, i.e. purchase a case next month, a motherboard the next, and so on.

It looks like I can put together a pretty fast system, with about 8G of memory which is important, for about $700, but paid for over a 6 to 7 month period. Running OpenSolaris next to the metal, I can put Win7 in a virtual box and give it 2G, and even run Linux with 1/2G and keep them both running most of the time.

Then I can reformat the laptop to FreeBSD or Linux (I'll try FreeBSD, but if I can't get the wifi to work, try Ubuntu). Using X, I can log into the big machine from the laptop or our (really old) iMac when I need the power. Then the kids can use any for their homework or web-surfing and we are not tying up one of the systems.