I’ve previously done a guide on the right way of installing Tomcat 5.0 on the Mac but things are a little different on Linux so I figured I’d do another guide. This one is a little less advanced because it only covers running Tomcat as root and not as a non-root user. Depending on how busy I am in the next while I may or may not do a follow-up article on the additional steps needed to run Tomcat as a non-root user. I have tested this procedure on RHEL ES 4 with Tomcat 5.5.17 and the Sun JDK version 1.5.0_6 but it should be the same on all Linux distros and for all 5.X Tomcat versions, the only thing that is likely to change is the location of $JAVA_HOME. Correction, the startup script included is for Redhat based distros only (RHEL, Fedora, CentOS etc).

Read more

Tagged with:

When I first reviewed iLife 6 in my article about creating my first podcast I was a little hard on iWeb but gave it a generally OK review. Turns out I was a little hasty! After a few more weeks of use I’ve come to the conclusion that it sucks! Yes, the interface is very nice and yes you can easily make a podcast by dragging and dropping but it still sucks because everything goes most terribly pear-shaped the moment you go to publish your web page. To see what I mean have a look at the site for the IFAS podcast which I’ve been using as a test case for iWeb: www.minds.nuim.ie/~ifas/podcast.

You might say my sample page looks alright on the surface, because it does. But, now try to highlight some text. Oops, you can’t because it isn’t in fact text but an image. Everything is in fact an image. All text everywhere. WTF! That’s not web design, it’s desktop publishing! The result is not so much a web page as a poster or flyer for printing! So much for getting indexed by search engines …. oh well, it’s not as if you publish stuff on the web for people to find and read is it …. oh wait …. bugger!

Things go even more pear-shaped when publishing though. If you remember last time I told you that you could only publish directly to the web if you had a .Mac account (which I don’t because I don’t need one). This means that you have to publish to a folder on your local machine each time you want to update the site. You might not think that’s too bad. You’d think you just publish it and then use a good SFT client like Transmit 3 to sync with the server so you only upload changed files. Well you’d be in for a nasty shock. Each time you re-publish the site everything gets re-generated so your sync will result in ALL files being uploaded again. This is inconvenient when your podcast has two episodes, positively annoying when it has three (like mine now does) and simply impossible when it has 10, 20, 30 or more.

Conclusion

The simple truth is that iWeb is totally impractical and un-usable in the long term. Nice Try Apple but absolutely no cigar this time. Version 2 had better be a major major improvement!

Tagged with:

Having first read all the documentation on Foreign Keys and hence side-stepping the most common pit-falls by making sure all my tables were of type InnoDB, all the columns involved had indices and had exactly matching types I was most disappointed to get a bizarre and senseless error from MySQL:

Can't create table './epath/#sql-1a1_f9.frm' (errno: 150)

I’m using the latest stable release of MySQL (5.0.22) on OS X 10.4 Tiger.

The first thing I tried to solve this was a bit of googling which led me to loads of threads reminding people about the obvious stuff I was sure to avoid (table type, indices & matching data types). However, deep in the bowls of one of these discussions I did discover that, despite the documentation’s utter failure to mention this fact, foreign keys apparently only work when the columns involved are un-signed numbers.

The columns I was trying to link first were both of type varchar so I tried with a different pair of columns of type int (which I first set as being un-signed). This worked so I took the identical syntax and tried again with my varchar‘s, no joy, just the same uninformative error. It then occurred to me that the items in these columns will always be exactly two characters long so I changed their type to char(2) but again I got the same nonsensical error.

Some more googling seems to confirm my theory that MySQL will only be happy with foreign keys that are numeric un-signed types. This is a serious problem for the project I’m now working on. My data has a load of primary keys that are non-numeric that need to referenced as foreign keys all over the place. The two most obvious examples being 2 letter department codes and 3 letter alpha-numeric machine IDs. I could hack this by creating additional integer auto-increment fields in my departments and hosts tables and using these as primary keys instead of the logical fields but that is wasteful and pointlessly complex.

This is my first foray back in to serious MySQL development for a year having used PostgreSQL in the interim and I think I’ll be switching back to PostgreSQL before you can say ‘MySQL sucks’.

Tagged with:

MySQL on the Mac has come a long way in the last few years. MySQL now release binaries for the Mac and those binaries are contained in a nice OS X package and even contain a preferences pane for the System Preferences App to allow you to easily control your MySQL server. I installed the latest version on my machine in work today and it is fair to call the installation process painless. You just click next a few times and enter your password once or twice. Because of this I have no problem saying that the server end of things with MySQL is now sorted on the Mac, but what about client GUIs? In this article I’ll be describing three free MysQL GUIs that I found and tested. All my tests were carried out with the latest stable binary release of the MySQL server for OS X (5.0.21) on a G5 PowerMac.

CocoaMySQL

The first GUI I came across was CocoaMySQL and I have to say I was far from impressed. Although the interface is nice in it’s simplicity the app simply does not play nice with the latest versions of MySQL server and hangs and does funny things so until the app starts to work correctly with modern servers the simplicity of it’s interface is irrelevant. After failing to create a table I un-installed this program.

MySQL Administrator

MySQL Administrator is released by the MySQL people so I considered this app to have great promise. The first thing I noticed is that it gives you an awful lot of
information about your MySQL server and also lets you control the server
and edit it’s config very well. However, when it came to creating tables I
was horribly disappointed.

I tried a simple test to create a table with two columns, an auto
incrementing integer called ‘id’ that is the primary key and then a
column called ‘name’ that is a varchar. The interface let me
prepare it all beautifully but the moment I clicked ‘Apply’ I got an
SQL error. I tried repeatedly but no matter what I did with the GUI I
could not get this simple table created. The GUI shows you the SQL it’s
about to execute and lets you edit it so I did eventually get the table created by manually editing the SQL being sent. I did experiment on a bit
and found that if you don’t use auto increments the interface does work
but since I use them a lot I just got fed up with this application. My
disappointment was magnified even more when I realised that there is no
way to enter data with this app either.

I had very high hopes
that this app would turn out to be my on-stop-shop for everything I
want to do with MySQL but it simply isn’t. The fact that it’s obviously
still buggy as hell and that you can’t use it to insert data means that
I really have no use for this app.

YourSQL

YourSQL is another nice simple front end for MySQL. I tested the latest stable version (1.7.2). This is very much a program for people who are familiar with MySQL and know the various datatypes etc.. This program will only make sense to people who know what they are doing but for those people it will save a lot of time. It uses a Finder style column-based interface for navigating servers, databases and tables which works really well if you have a lot of databases to manage. This is a good app for speeding up simple DBA tasks if you know what you are doing. The app is small and fast and hence I actually really like it.

I spent a few hours using this app today to build a fairly complex database and I have to say I found it a joy to use. It was easy to add a database, to add and edit tables and to view, search and insert data. To me that is what a MySQL GUI should do so this app gets 9 out of 10. Why not 10 out of 10? Well it didn’t do one thing, it didn’t give me an easy way to set up foreign keys. However, the interface makes it very easy to run SQL queries directly so if you want to add a foreign key to a table you can do so yourself quite easily in this way.

Below is a screen shot I took while I was experimenting today.

Conclusions

Although the actual MySQL server is now very easy to set up and control on the Mac there is still a shortage of good GUIs out there. ATM there is only one that I would recomend over the classic phpMyAdmin route and that is YourSQL.

Tagged with:

I’ve been watching Bush’s approval ratings slide over the past months and was happy today to see them, hit a new low of 29%. A figure that low means that he has not only annoyed the Democrats (which we all knew he would) but also the neutrals and even many conservatives. The only people I imagine he has left are religious extremists and capitalist extremists (or the Oil Lobby as most call them). As far as I can see the only reasons that people voted for him were his proclaimed ideologies but it seems that no amount of public Christianity can hide his total incompetence from the American people. For a long time after 911 it was considered un-patriotic to disagree with Bush on security restrictions and wars but that sheen has now gone. Almost 5 years after 911 he still does not have a single success story. Afghanistan is still a mess (but a mess that is out of the news now), Iraq is also a complete disaster area and worst of all he still hasn’t caught Osama or found his mythical WMDs! Add to that the American troops dying on a daily basis, the rubbish economy, the ineptitude of his response to Katrina and more recently that wonderful fiasco with that ports deal and you get a good measure of the man’s leadership abilities. Finally add to that his dilution of the boundaries between church and state and his flagrant homophobia and you have a man very few people can see as doing a good job. Well done Americans, what took you so long?!

When OSX came out there were three new features that Steve ranted on about. The first was Spotlight, which I use a lot and really like, the second was Dashboard, which a quick scan of the articles in the Mac section of my blog will clearly show I like a lot, and the final one was Automator, which I’ve really neglected. I never even bothered to play with it properly until today! But, better late than never and since I had a free hour and some backups I wanted to automate I figured I’d give the classic rsync shell script approach a miss this time and see what Automator could do for me.

Introduction

In case you’re not familiar with Automator the idea behind it is that you can write scripts to automate repetitive tasks or tasks that you do a lot but without typing or seeing a single line of code. For the full Apple hype have a look at the Automator page on the Apple Site.

So, the question is, does Automator live up to the hype? Well IMO it does. It did take me a few minutes to get into the swing of things and I have to say I’d probably never have figured it out without looking at the sample workflows but once I got into it it was dead easy. You just drag and drop in the actions you need in the position you need them and then tinker with the options on each action until you have what you need. Something I found really helpful was that you can create complex workflows by chaining together simple ones. I initially started by trying to write one killer workflow that would deal with all elements of my backup but I soon realise I would be much better off breaking the task up and then creating the killer workflow by adding together all my small workflows.

My Experimental Workflow

I wanted to back up to a SAMBA share that is not that big so I was only interested in backing up important stuff. To me important stuff meant:

  1. My email
  2. My FireFox bookmarks
  3. My Work Documents

So, I started by creating a simple workflow to archive my Thunderbird folder to my desktop, move it to a folder on the share and then re-name it with the current date. Then I used that as a base for creating similar flows for my FireFox settings and my documents. Finally I tied all this together with a flow that did the following:

  1. Connected to the samba share
  2. Ran the three backup flows
  3. Ejected the samba share

Within 30 minutes of starting to play with Automator for the first time I had the above done, tested and working. I can now very easily and very quickly backup my important stuff to my samba share.

Below are some screenshots of some of my workflows to give you an idea of what the interface is like.

Automator Workflow for backing up Email

(above) The workflow for backing up my email.
(below) The workflow that ties all my small workflows together

Automator Workflow for backing up all my important data

Not Perfect

However, there are a few things that annoyed me, firstly, Automator crashed once when it had just finished saving a workflow. I’m not accustomed to Apple programs crashing so that worried me a bit but it only happened once and since then I’ve been poking around with automator for hours with no more crashes. The other thing is that I can’t get the action for disconnecting from the share to work. I’m not sure if the problem is with Automator or with OS X’s samba. Mind you samba support on Tiger has been flaky to say the least so it doesn’t really surprise me that Automator has some issues with it. The important thing is that it can connect to the share which it does without problems.

Conclusions

Automator delivers on it’s promise of letting you do powerful things all within a simple drag and drop interface. The range of actions available is simply phenomenal ranging from simple sysadmin tasks like moving and copying files or running shell scripts to automatically burning backups to CD and automatically processing entire folders of images. Automator also integrates with just about every Apple program so you can automate more tasks than I could possibly describe here. To get some idea of how many actions there are have a look at the screenshot of the action browser pane below. Yes, it crashed on me once but I’m still very happy with it and will be using it a lot.

Some Automator Actions

Tagged with:

Following on from my recent post on Dashboard Widgets for Techies, this post previews some nice dashboard widgets for Web Developers.

Regular Expressions

We’ll start with what I consider to be the most powerful widget, the regular expression widget. Regardless of what web language you end up using and what you are doing the chances are that you will need to validate user-input and that you will need to use regular expressions to do it. There are a number of Widgets for testing regular expressions out there but of all the ones I’ve tried the RegexToolbox was by far the best. It allows you to set up a list of test cases and then match an RE off them and it tells you what it matches as well as all the matches within bracketed groups. It also allows you to test substitutions.

RegexToolbox Screen Shot

Technical References

It’s often handy to have the full spec for things at your fingertips and the Dashboard is about as ‘at your fingertips’ as things get so it makes sense to have some API specs in Widget form.

I know I hate PHP but I still have to use it quite a bit and I know a lot of other people do too so a PHP reference widget is still very useful. There are quite a few different ones but the one I found to be the best is this one: www.apple.com/downloads/dashboard/developer/phpfunctionreference.html.

Php Function Reference Widget Screen Shot

Another somewhat useful widget is the Tags – CSS widget. It sounds great and gives you a nice interface for searching for what CSS attributes there are but sadly if doesn’t give you the possible values for those attributes which is very annoying. A similarly disappointing widget is Tags – HTML.

Colour Tools

Easy access to the web-safe colour pallet is something that sounds very useful and hence you’d think there would be a very good widget for it but you’d be wrong. There are indeed many colour widgets but no very good ones. Color Safe is the best of a bad lot but it’s not perfect. I’m quite tempted to write my own Widget for this though.

ColorSafe Widget Screen Shot

Tagged with:

I unfortunately need to run one Windows application at work (Remedy for managing user-support calls) so I need some form of access to Windows from my Mac. Dual boot is just not an option, I need remedy running in one Window and everything else I need to actually solve the users’ problems in other windows all at the same time. There is a very old Windows machine in my office that is just used for Remedy so in theory I could move over to that machine each time I need Remedy but that’s just annoying so I’ve been using VNC and it worked OK but I couldn’t copy and paste and the lag was a bit annoying. Anyhow, today a colleague was looking for something else on the MS site and found a Mac version of the Windows Remote Desktop Client and me the link. I’ve just installed it and I have to say I’m well impressed. The app is small, efficient, fast and very user-friendly to configure. I have no problem with lag anymore and can copy and paste to/from the windows machine. It even has a cute icon! Basically everything I expect from Apple Apps but it’s a MicroSoft App! Here’s the link: www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=remotedesktopclient

Tagged with:

I recently did a post on Dashboard Widgets for techies and am working on another about Dashboard Widgets for developers. There was one important widget missing from my list of widgets for techies, one for converting Unix Time Stamps to human readable dates and vica-versa. The reason it was missing was because I couldn’t find one anywhere on the Apple site! I find this strange because I regularly need to deal with Unix Time Stamps in things like logfiles and raw data in Databases, hence I’d have expected others to need this too and hence for there to be a widget for it. Well, I decided to remedy this omission by writing my own Widget which I’ve now submitted to Apple for addition to their Widget Downloads Page. I’ve decided to release it as GPL so you can get it on the downloads page of my home page.

So, how easy was it to develop my first widget? Trivial! I went from deciding to write the widget to a fully working first implementation in about 2 hours including all reading and experimenting that I had to do to get started. IMO that’s not bad at all, in fact I can’t think of any other platform I’ve ever used where I was able to do something useful as quickly.

So, what’s involved in writing a Dashbaord Widget? TBH very little. If you are up to speed with client-side web technologies then you’ve pretty much got everything you need. Yes, there are some extensions to these technologies involved to allow you to interact with the OS and the command-line and also for 2D graphics with Quartz if you want to get fancy but they are very easy to get to grips with and there are some excellent guides on Apple’s Developer Site.

A Dashbaord Widget is basically a web page written in XHTML that is skinned with CSS and made interactive with JavaScript. There really is nothing more to it than that. If you want to give this a go yourself the links below are all you’ll need.

As I said I had a fully functional Widget in two hours, took me a little longer to get it to do cool stuff like flipping round to show the credits on the reverse side and getting it skinned in a way I was happy with but all in all that Widget was no more than 5 hours work including all the fiddly graphics and layout stuff. A screenshot of the finished product can be seen below.

Screen shot of Unix Time Stamp Converter Widget

Tagged with:

I finally made the time to watch the fourth Harry Potter film, Harry Potter and the Goblet of Fire tonight. Have to say the film didn’t come anywhere near to it’s potential. JK Rowling provided an excellent book which Mike Newell turned into a mediocre film. There are those who say it’s fabulous and so forth, I have to wonder what commission they are on or whether they saw a different movie to me. There are also those that say it is a travesty and worse, I can’t say I agree with those people either because the film had some excellent moments and aspects that should not be ignored.

Before I go any further I’ll have to put my hand up and say that I am a fan boy and that as far as I’m concerned the best possible Potter film would be one that sticks 100% to JKR’s plot, regardless of whether that results in a 4 hour film. However, we don’t live in an ideal world so I know that is not really on. Film is a very different medium to print so the director and screen play writers have to make changes to mold the book into a good film. They also have to go further than that and make it into a popular film because WB have spent an absolute fortune making it and want to get their money’s worth. Again, an unfortunate feature of reality. In aid of making the film easier to sell to the masses I can forgive things like the dragon scene as necessary sacrifices to the god of commerce. However, what I cannot forgive is blatantly missing the point of some of the key characters. But before I get into what’s wrong I think I need to give the creators fair credit for what they did well.

The Right Sound

The first and most obvious success in my view was the music, it was phenomenal and really set the right tone. I bought the sound track months ago and thought it was perfect before even seeing the film and now that I have seen the film I’m even more certain it worked (see my comments on the soundtrack). Yes, it was a new composer and yes the style is different in parts but it works and there are enough common elements in it to make it fit with what has gone before too. Mr Doyle, I take my hat off to you!

I also have to say that although it deviated massively from the book the scene in the maze was very well done and the scene at the end when Harry returns with Cedric’s body is just perfect. Basically the nearer the end of the film the better the scenes are.

New Faces

There were also some new characters that I thought were very well done, Rita Skeeter topping the list. Miranda Richardson nailed the character perfectly. I was also impressed with Barty Crouch senior and Amos Diggory, we don’t see much of Diggory but what we see is really believable, you can really see himself and Arthur chatting about plugs over tea at the ministry! Having said that some of the new characters were a bit of a let down but none were terrible. Moody is a hard one to place, at times Brendan Gleeson hit the character perfectly yet at others he missed completely but over all he was certainly passable.

The Old Guard

The old reliables were also excellent as ever, Maggie Smith was perfect as ever when portraying Professor McGonagll, Alan Rickman was again excellent as Snape and Jason Isaacs again captured the evil Lucius Malfoy wonderfully. Robbie Coltrane also did a great Hagrid, in fact he did a much improved Hagrid compared to some of the earlier films, the first one in particular. I was also impressed with how much the trio have come on over the four films. They had some really rough spots in the first film but I didn’t notice any in this film at all. Having said that Hermione’s character is still being wrongly enhanced but that’s more down to the script than anything else. From the films you get the impression that Hermione is hip and popular which just doesn’t tally with the books at all. Mind you that’s far from new in this film, it was really bad in the second and third films but actually a bit better in this one.

There were also a few nice little touches thrown in for the die-hard fans but fewer that I’d have liked. The one that I was really surprised at was the subtle inclusion of the school song during the celebrations after Harry beat the dragon. I hadn’t expected that at all and it really impressed me.

And Then it all Goes so Wrong

So, what really lets the film down? The most obvious let down is the first few scenes which are horribly rushed and the dialog painfully wooden. It’s almost like watching 15 minute Hamlet at times, they are saying all the right lines but in such fast succession that the whole scene looks forced and wrong. The scene in the side room after the champions are picked is a perfect example, the dialog is almost straight out of the book yet the scene is almost cringe-worthy and totally unbelievable. The Quidich World Cup was also a complete disaster as was the scene with the dark mark. We didn’t see a single second of action at the world cup and they didn’t bother with any of the important plot since house elves were totally written out. You have to wonder why they bothered with the world cup at all! The simple fact is that about 20 extra minutes, a few seconds of world cup play and some house elves would have made all the difference in the world and turned this from a disappointing film into an OK film.

Apart from the half-hearted opening to the film and the rediculously rushed scences the really un-forgivable aspect of the film is the total mess made of two of the main characters, Professor Dumbledore and Lord Voldemort. Both are supposed to be the greatest wizards of their time and one is an emotionally unstable babbling wanna-be-Irishman and the other is a ballerina. I’ve never liked Gambon’s Dumbledore because he just doesn’t fit with the Dumbledore we get to know and love from the books at all but in this film the director and the script writers just didn’t give him a chance at all. He looses his temper, he shouts, he even goes to pieces and ends up sitting on the floor of his office looking like an emotional wreck. That’s not Dumbledore! This one really gals me because Dumbledore is by far my favorite character so seeing him so terribly portrayed is so so disappointing. However, regardless of the script Gambon just doesn’t do a convincing Dumbledore, he speaks too fast and his body-language is all wrong. He is supposed to radiate an aura of power and Gambon just doesn’t portray that at all. I’ve always said Ian McKellen should have followed on from the near perfect Richard Harris but sadly I don’t get to cast the films!

Then we come to the Dark Lord. What a let down. The most evil wizard in the entire magical world, a wizard feared almost universally and responsible for an 11 year reign of terror the likes of which had never been seen before and he prances around as if he wants to be in the ballet! What ever Mike Newell was aiming for it’s safe to say he missed. The only thing that was even passable was his appearance, makeup were doing their job but I don’t think anyone else was. The body-language was terrible, the voice, a disaster. He didn’t come across as frightening at all. Simply put, he just wasn’t believable. The grave yard looked great and I thought the scene had potential but Voldemort ruined it.

Conclusions

So, bottom line, what would I give it out of 10? I’ll give it a pass, nothing more nothing less. Here in Ireland that’s 40% so 4 out of 10. Great potential, let down by poorly portrayed characters, badly rushed scenes and pointless penny-pinching. Worst HP film of the 4 we have seen so far, which is really disappointing considering it is following on the heels of the best.

« more recent postsolder posts »