lefedt logo
14 Feb 2015 / posted by Nikku

There is probably around one thousand three hundred thirty seven static site generators out there. So why build a new one? Because it could be a 300 lines of code only, all-in-one, swiss army knife, hackable one. Kind of.

Continue reading ...


08 Dec 2013 / posted by Nikku

Recently I was looking at a project and wanted to capture a number of code metrics to see how the project developed over time. It turns out some interesting metrics can easily be extracted with basic shell scripting.

Continue reading ...


30 Oct 2013 / posted by Nikku

In a recent dive into spring framework proxies I was searching for a way to access real objects behind a proxy. That was required to fix field injection in jerseys jersey-spring3 extension.

It turns out that this is easily possible through the Advised interface that gets added to spring bean proxies as a management interface.

The interface provides the method getTargetSource() that allows you to access the current proxy target source.

if (bean instanceof Advised) {
  Object realTarget = ((Advised) bean).getTargetSource().getTarget();

  inject(realTarget);
}

The above code does work for static proxy targets, only. It breaks if hot swapping or pooling is used because the target obtained may be different on each access.

Your application code should not use those internal interfaces, anyway. Your libraries may.


21 Oct 2013 / posted by Nikku

Working on an internationalized web application I realized that Glassfish 4.0 is still using ISO 8859-1 encoding to serve web resources. Too bad, as UTF-8 is the de facto standard for encoding on the web.

This short post shows my recipe to make glassfish ready for non latin1 languages.

Continue reading ...


26 Jul 2013 / posted by Nikku

Developing web applications using AngularJS is fun. Modularizing your application using RequireJS/AMD modules is nice, too unless you enjoy it to shuffle around <script /> tags everytime you include another javascript file into the application.

This post introduces ngDefine, a tiny library I have created that makes both technologies get to know each other.

Continue reading ...