Today I decided to start up a special interest group for Groovy and Grails developers in Sydney. If you are interested in Groovy or would like to be a presenter then please join up at Groovy Sydney. You can register your Groovy talk on the Presentation Topics page, and I will organise for you to present at the next meeting. The Groovy Sydney group will meet on a monthly basis at the ThoughtWorks office, followed by drinks at a nearby pub.
Groovy is a dynamic language that I have been ignoring until now for no particular reason. I first heard about it when I was doing consulting work in Brisbane last year. One of the client developers of a large bankasurance company gave a pretty good presentation on Groovy. But back then I was ignorant and caught up in the Ruby on Rails hype.
The thing about Groovy that won me over was that you can start off by writing your code in Java, and then refactor to make your code groovier. It reduces the learning curve required to be productive in a new programming language, which I believe to be quite novel.
Groovy makes sense in the enterprise as it allows you to leverage your existing Java based systems. You can deploy a Groovy application in your expensive J2EE application servers, therefore maximising your return on investment in infrastructure costs. For example, Grails — a Rails-esque web application framework for Groovy — can be deployed as part of a Spring application. Essentially you can implement a lot of your integration business logic in Java, and use Grails to quickly create frontend CRUD functionality, which is tedious to do in Spring alone. Groovy is a tool worth having for any Java developer looking for productivity gains.

If Waterfall software development were a car then it would be a Yugo.
If Lean software development were a car then it would be a Toyota.
If Agile software development were a car then it would be a BMW Gina.
My previous attempt at building a simple IR pen did not work as expected. The power source was too weak for the IR LED, and consequently the Wiimote had difficulty detecting the IR light.
For my second attempt I purchased an IR LED, some wire, a momentary switch, a 10 Ohm resistor, and a battery holder for two AA batteries. I also had a whiteboard marker lying around, which I used to create the casing for the IR pen.
I wired up the circuit so that the IR LED was in serial with the switch, resistor and battery holder. I then cut off the nozzle from the whiteboard marker casing. I needed space to fit the switch, so I cut the cylinder shaped casing in half, and drilled a hole to push the switch through. I then popped the LED through the nozzle, and wrapped the casing around the circuit. Everything was then held in place using electrical tape. It was a prototype, so I didn’t bother with aesthetics, which the rubber band holding the pen and battery holder together clearly shows.
I am glad to report that this particular IR pen works perfectly with my laptop screen and the Wiimote. However, I will need to test it out on a projected image from a data projector before officially giving the thumbs up.
My previous foray into using a Wiimote with my laptop led me down the path of building a USB sensor bar so that I can use the Wiimote to control the pointer movements. This approach worked better than expected, but it doesn’t work so well if you want finer control of your mouse pointer. For example, when I was demonstrating the Wiimote integration with my laptop I was quite nervous about the demo not working, and this was made apparent by the shaky lines that I was drawing with the Mouse Gestures. As a result some of the Mouse Gestures did not register.
A better approach would be to do what Johnny Lee did with the Wiimote to create the Wiimote Whiteboard. Johnny Lee used the Wiimote as an IR camera pointed at a projector screen, and created a pen with an LED which the Wiimote can track. This approach provides for more accuracy and smoother movements of the pointer.
The barrier of entry to the Wiimote Whiteboard is creating the IR pen. Johnny Lee suggests wiring up a circuit containing an IR LED, momentary switch, resistor, and power supply, then shoving it into a pen. If you google “IR pen” you will also come up with some complicated solutions. One guy even tried to cram the circuit into a highlighter casing.
My solution is really quite straightforward. In fact you only need to go to your local electronics store and pick up two items: an LED keyring torch; and an IR LED. When purchasing an LED keyring torch, make sure that you can easily replace the LED. I used this LED keyring torch from Jaycar Electronics. I then pulled the torch apart, pulled out the LED, and replaced it with an IR LED. This solution meant I didn’t have to do any soldering or fiddling around. It all fit together into a nice compact form factor that cost me less than $10, and took no longer than 10 minutes to switch the LED.
Bah, just found out that the iBurst driver 1.3.2 doesn’t compile in Ubuntu Hardy Heron. Turns out a macro in the kernel called SET_MODULE_OWNER was deprecated in 2.6.23, and removed in 2.6.24. The iBurst driver currently depends on that macro, so I will have to look at patching it so that it can work for Hardy Heron, which uses the 2.6.24 kernel.
Update
The fix is quite simple. Just remove SET_MODULE_OWNER from ib-net.c, recompile and install.
Sweet, the latest release of Ubuntu dubbed Hardy Heron is out!
There are a lot of new changes under the hood. Most notable are:
I am currently in the process of migrating /home to its own partition so that I can go ahead and upgrade to Hardy Heron as soon as possible.
I found this great post on Python Decorators. Decorators were introduced into the python language since 2.4. The post shows the benefits of using a python decorator to improve the efficiency of a function’s runtime using memoization.
Python decorators are also extensively used in Django for authentication. For example, you can use them to decorate a view function so that only logged in users can view certain parts of your site.
from django.contrib.auth.decorators import login_required
@login_required
def my_view(request):
# ...
The example code above shows that you only need to add the @login_required decorator above your view function to determine whether or not the current user needs to be authenticated before the view can be displayed.
Lean Principle 1: Eliminate Waste
Chinese Proverb: If the roots are not removed during weeding, the weeds will grow again when the winds of Spring blows.
Interpretation: In other words, to solve any problems the source of the problem must also be dealt with. Therefore it is essential to finish a task thoroughly or the effort would be wasted.
Lean Principle 2: Create Knowledge
Chinese Proverb: I hear and I forget; I see and I remember; I do and I understand.
Interpretation: When you create knowledge share it, but share it effectively through experiential learning and involving people collaboratively.
Lean Principle 3: Build Quality In
Chinese Proverb: Better a diamond with a flaw than a pebble without.
Interpretation: Use Test Driven Development and automated testing to ensure quality. Tests help to quickly identify any side effects or defects when you change the code base, which gives you more confidence in the ongoing quality of the product.
Lean Principle 4: Defer Commitment
Chinese Proverb: A journey of a thousand miles begins with a single step.
Interpretation: Abolish the idea that it is a good idea to start development with a complete specification. Like a journey of a thousand miles you gain more confidence in the direction you are heading with each step that you take.
Lean Principle 5: Deliver Fast
Chinese Proverb: One who rides a tiger must continue to go fast.
Interpretation: Companies that focus on speed of delivery and superior quality have a competitive advantage.
Lean Principle 6: Respect People
Chinese Proverb: Like the Eight Immortals crossing the sea, each one displaying his/her special feats.
Interpretation: A diverse team of talented people that can work together can achieve any goal that they are mutually committed to.
Lean Principle 7: Improve the System
Chinese Proverb: A spark can start a fire that burns the entire prairie.
Interpretation: Understand the entire value stream, and don’t ignore seemingly minor problems as they can spread.