Wednesday, May 14, 2014

Default settings for OS X Mavericks Tackpad

I never found a way to revert the Trackpad settings back to their initial values in OS X. So here are the defaults.
The Point & Click Tab
The Scroll & Zoom Tab
The More Gestures Tab

Thursday, September 12, 2013

fixing slow hibernate app leaves me sad

I picked up a Struts2 + hibernate app with sucky performance and profiling shows that it’s almost all lazy loading pooh. Fully loading the object graph seems ridicules solution just to have the count of the related collection loaded.

It’s basically a bunch of reports so creating specific named queries that pull exactly what the view needs really sounds like the right solution. But all the little supporting changes rippling through the application is making me sick to my stomach.

Sunday, December 11, 2011

The Grails ConfigurationHolder is smarter than you might think.


The following seemed like a perfectly reasonable approach for dealing with getting configuration properties using a ConfigurationHolder. I wanted to get the configured accessKey without having to worry about pesky null pointer exceptions.

String accessKey = ConfigurationHolder.config?.aws?.accessKey

I was not positive if the deployment config groovy file was getting updated and wanted to make sure that the app didn’t blow up during bootstrapping itself. I assumed that dotting into closures that did not exist in the config would fail. Wrong, wrong, wrong. It conveniently returns empty closures. My craftiness ended up resolving to a string containing ‘{}’.

I am thinking that the moral of the story is that “Your problems are not beautiful an unique snowflakes”…  You should always assume (at least with Grails) that someone has dealt with the same issue your are facing and you just need to look at the problem differently… don’t get crafty!

Update...

Not so fast… the convenient default maps for non-existent closures in the configuration holder are present in integration tests but NOT in plain old unit tests.

Wednesday, June 29, 2011

What does system-config-network-tui do?

What does system-config-network-tui do? To find this out, run it and set the hostname to something weird like "booger". Then run a find across all files in the etc folder to look for files that matched. There are much better ways to do this....
sudo find /etc/. | xargs grep 'booger' -sl
As an alternative, run a series of find commands to see what was "touched".
#file accessed within a period of minutes
sudo find /etc -amin -2
#file status changed within a period of minutes
sudo find /etc -cmin -2
#file modified within a period of minutes
sudo find /etc -mmin -2

The bottom line is that system-config-network-tui is doing way more that simply touching a couple of lines in /etc/hosts and /etc/sysconfig/network.

Wednesday, January 12, 2011

Words of wisdom from Evi Nemeth

Our response to issues affects your perceived value far more than does any actual technical skill you might possess. You can either howl at the injustice of it all, or you can delight in the fact that a single well-handled trouble ticket scores as many brownie points as five hours of midnight debugging. You pick!

Saturday, September 25, 2010

If you wanna know the version of SmartClient included in the version of SmartGWT you are using, just open the smartgwt.jar and look at the header of any of the js files in the com/smartclient.debug/public/sc/ directory.

Friday, September 10, 2010

packages in grails

Convention over configuration rewards you for sticking to the typical convention. I don't feel rewarded for package-ify-ing artefacts when using the grails command line. Maybe deeply nested packages based on domain names, products, tiers, technology... blah blah blah is a foolish consistency held over from pure java development. If you are not developing infrastructure or a code base for sharing outside of the application does it really matter?