Closures and Bindings in Groovy

30. December, 2011

Mark Menard blogged about a hidden gem in Groovy which might be useful when you use closures a lot: Binding properties to a closure after the closure was created.

Remember, it’s simple to bind properties to a closure when those properties exist before the closure is created: Just define them. But how could you create a library of closures for user to consume?

def c = {
	println a // a isn't know here

def a = "Hello"

def binding = new Binding ()
binding.setVariable ("a", a)

c.setBinding (binding)

As you can see, the property a isn’t known at the time the closure is defined. The binding allows to “inject” it later.


New Years Resolution: Stop being so agreeable!

30. December, 2011

How quick are you to say “sure, we can do that”?

Here are a couple of reasons to reconsider your attitude: Stop being so agreeable! by Erick Erickson.

Building BIRT with Tycho

27. December, 2011

If you want to see BIRT built with Tycho, vote for this bug: [Build] Migrate build to Tycho

So Help me Jobs…

26. December, 2011

One day, Apple might go one step further and start to shape their customers to their liking. They know best, right? Watch this.

“I have nothing to hide.” “Then why do you have curtains?

Open Data ala Google

21. December, 2011

Some concepts are easier to understand when you see a graph. With HTML5, a lot of data and a bit of time, you can build a system that can visualize things like “live span over number of children” or the sources of energy over time. Interesting that nuclear power, renewable energy and energy from crude oil is about the same  level today.

This view seems to indicate that the GDP of a country starts to kick off as soon as each family has two or fewer children. But maybe it just shows that after financial constructs like derivatives and bonds allow to accumulate enormous wealth in a short time. “Correlation does not imply causation

64K on

12. December, 2011
Image representing Stack Overflow as depicted ...

Q&A for professional and enthusiast programmers

Time for a little celebration: My reputation on no longer fits into 16 bits. Yay ^_^

If you’ve been living under a rock: SO is the Q&A site for software developers. If you write software but don’t have an account there is like being a rock star who refuses to perform before an audience 😉

Stackexchange has now 74 sites for many topics: Photography, playing games or writing them, role playing, Unix/Linux, Ubuntu, writing, physics, astronomy, mathematics, English/German/Japanese/French/Spanish language, (La-)TeX, cooking, home improvement, SciFi and Fantasy, parenting, economics, and many more plus more than 450 proposed sites on Area 51.

Making openSUSE 11.4 Work on HP ProBook 5320m

11. December, 2011

If you have an ugly flickering screen when booting openSUSE 11.4 on a HP ProBook 5320m, then do this:

  1. You’ll need at least the package “xorg-x11-proto-devel” to build the driver (zypper install xorg-x11-proto-devel)
  2.  Download a working Intel graphics driver: xf86-video-intel-2.15.0.tar.bz2 (yes, there are other versions there as well and no, they don’t work)
  3. Unpack the archive
  4. cd xf86-video-intel-2.15.0
  5. Configure it: ./configure --prefix=/usr --libdir=/usr/lib64
  6. make
  7. as root: make install
  8. as root: Edit “/boot/grub/menu.lst” Add “nomodeset” to ever line which starts with “kernel”  and which doesn’t already have it
  9. Reboot.

Note: Do this remotely from a second PC – your eyes will be thankful. ssh and wget are your friends.