Home

Quick Profile

Alex Ooi Profile Picture
Hometown: Melbourne, Australia
Specializations: Java, Ruby on Rails
University: Software Engineering & Economics, Melbourne University
High School: VCE, Melbourne High School
Links:
 

Popular Articles

Tuesday, January 31, 2012

Sounds like a pretty common thing to have to do, but suprisingly hard to find a good Java library to parse a WSDL file. I ended up settling on some CXF classes which seem to do the job, albeit still not very elegantly. The main reason why I'm posting here is because the use of CXFs WSDLManager and WSDLServiceBuilder does not seem particularly well documented, and thus might otherwise be lost over time.

0 comments Posted by Alex Ooi at 04:47 PM
Friday, September 02, 2011

I hate having to resize windows in ubuntu. For those who have tried Divvy then you'll probably agree it is a godsend when it comes to windows size and position management on Windows or OSX. However, there is a much easier way to resize easily in Ubuntu then installing some third party software, and until recently I didn't know about it...

1 comments Posted by Alex Ooi at 10:48 PM
Sunday, August 28, 2011

The other day I yet again found myself using the Chain of Responsibility pattern to refactor some code that I had written a little earlier. It is one of my favorite patterns, primarily because it allows us to break a large piece of work into much smaller pieces which are far more easily re-used and unit tested.

I'm not going to describe the pattern itself as there is probably quite a lot of literature out there already. After all, it is one of the GoF patterns! :) The wiki page that I've linked to gives quite a good and practical description of it. Instead, I'm just going to quickly describe the recent scenario that popped up where I found the pattern useful.

4 comments Posted by Alex Ooi at 09:07 AM
Wednesday, July 20, 2011

Re-Configuring log4j at runtime is something we don't have to do very often, however, it can on occasion be necessary. Recently, I needed to reconfigure the location of our applications log file at runtime. The actual location was configured in a custom properties file, so there was no way to easily inject this value into our log4j.xml...

2 comments Posted by Alex Ooi at 12:41 PM
Thursday, July 07, 2011

this one is mainly for my own reference because its not something I do often and there seems to be a stack of alternatives out there... this is what works for me when mounting a windows network drive

0 comments Posted by Alex Ooi at 01:14 AM
Monday, April 18, 2011
Today I start a new job after nearly 4 years at DiUS Computing. I'm on the train in and have an unfamiliar mix of excitement and apprehension. Apparrantly, according to Mien, the best part of this is that i now get to ride the same train into work and get off at the same exit of the same station as her :P
1 comments Posted by Alex Ooi at 08:20 AM
Friday, April 15, 2011

I've generally been using the jstl fmt tag to format dates. I haven't had any issues doing this until recently when I stumbled upon something quite bizarre? The date format string that I was specifying was being ignored under certain situations. Thus, instead of a nice date string like "Tues 1st June 2010", I'd end up with "Tue Jun 01 16:44:40 EST 2010".

0 comments Posted by Alex Ooi at 11:51 PM
Thursday, April 14, 2011

Recently I had to map a servlet as a "welcome-file" in my servlet 2.4 web.xml. This should be straightforward, however I couldn't get it to work for quite awhile. The cause of the problem turned out to be obvious, but rather annoying, in retrospect...

0 comments Posted by Alex Ooi at 02:40 PM
Tuesday, April 12, 2011

Last Weekend (Friday 1st April to Saturday 2nd April) we went for a walk ... a 100km walk.

The Walkmans at the start

Here is the story of our grand adventure...

0 comments Posted by Alex Ooi at 09:09 PM
Wednesday, April 06, 2011

Today I needed to do a small performance enhancement on an application using Hibernate annotations. The optimization was to ensure that a @Lob property on a Hibernate entity was lazy loaded. By default Hibernate will allow you to lazy load associations, but any lazy loading of an entities properties is not enabled by default. This is how I went about achieving the small optimization...

0 comments Posted by Alex Ooi at 06:23 PM
Wednesday, March 30, 2011

We've recently needed to manage some remote branches in GIT (create and delete them). Having stumbled around google for ages trying to figure out how to do this seemingly simple task, we came up with this list of 5 commands:

  1. git push origin listing_edit_steps_spike:refs/heads/listing_edit_steps_spike
  2. git fetch origin
  3. git config branch.listing_edit_steps_spike.remote origin
  4. git config branch.listing_edit_steps_spike.merge
  5. git checkout listing_edit_steps_spike

Apparently GIT is supposed to be our saviour. If thats the case, then I'd rather go on living in "hell"...

4 comments Posted by Alex Ooi at 12:48 PM
Monday, March 21, 2011

A thought struck me as I was reading a chapter out of Douglas Crockfords book "Javascript: The Good Parts". The chapter was titled "Awful Parts" in reference to the large number of less than desirable features in Javascript.

1 comments Posted by Alex Ooi at 01:57 PM
Friday, March 18, 2011

I'm in the middle of doing some string manipulation in Java. It just occurred to me, as I debugged an error in my code, that the String#replace takes a literal character sequence (i.e. another String) but the String#split takes a regex. This caused a small bug in the code I was writing as I had naively assumed that #replace was consistent with #split and took a regex. Thus I was passing in a regular expression rather than a string literal. The result was the string sequence I wanted to replace wasn't being replaced :(

0 comments Posted by Alex Ooi at 11:29 PM
Thursday, March 17, 2011

Its been awhile since I've seen something brainless and entertaining with lots of explosions, screaming and killing that ends with a typically cliched hollywood ending marketed to a quintessential yankie audience...

3 comments Posted by Alex Ooi at 11:52 AM
Wednesday, March 16, 2011

Here is an interesting little thing relating to dynamic CSS generation...

0 comments Posted by Alex Ooi at 03:47 PM
Wednesday, March 16, 2011

Recently I've integrated SASS, Blueprint and Compass into our RoR application. The question I had was how to achieve these same results in a non-RoR application.

0 comments Posted by Alex Ooi at 03:16 PM
Wednesday, March 16, 2011

Most of us have had experience working on projects where tight deadlines result in corners being cut and quality being sacrificed in the attempt to push an application into production. But I can't help but wonder what would a typical project in a Bizarro World look like?

5 comments Posted by Alex Ooi at 01:01 AM
Thursday, March 10, 2011

I've started playing with aspects of CSS3, since it seems to be mostly supported in every single browser except ANY fully released version of Internet Explorer. Can you spot the various CSS3 additions to my blog?

I'll be adding more CSS3 styles here over the next few weeks. The animation capabilities and support for web fonts in particular are very interesting....

0 comments Posted by Alex Ooi at 12:13 AM
Tuesday, February 22, 2011

Been re-visiting EJB-land after having done a fair bit of Spring/Hibernate lately. Especially focussing on EJB3 and JEE 5. A few things struck me as interesting ...

0 comments Posted by Alex Ooi at 10:42 PM
Tuesday, February 01, 2011

  • when you cannot hear what the person at the other end of the "standup" is saying ...
  • when your standup numbers 20+ people ...
  • when your standup takes 30 minutes to complete ...
  • when you're not sure whether you're in a standup, iteration-kickoff, or a meeting ...
  • when you can't see all the team members in your standup because the standup is soo big that they are literally standing around a corner...

These all describe the "standup" at my current project... It is lovely

3 comments Posted by Alex Ooi at 11:16 AM