Backup script made available

I have been using a backup script for my linux server for a longer time now. This script creates backups based on snapshot volumes using linux Logical Volume Management. This has been quite a useful script as I can create reasonably consistent backups that are even bootable.

I am making this script available now. More information is at wamblee.org.

Posted in Devops/Linux, Software | 2 Comments

Productivity and Workplace Design

If you are working at a company where cost savings are really really important, then chances are that after reducing cost factor number 1 (wages, i.e. headcount and hourly rate), cost factor number 2 is up. And that is office space.

However, there is a lot of evidence that a correct office workplace is one of the most important factors in productivity, as DeMarco and Lister put it in “Peopleware: Productive Projects and Teams”:

Police-mentality planners design workplaces the way
they would design prisons: optimized for containment
at minimal cost. We have unthinkingly yielded to
them on the subject of workplace design, yet for most
organizations with productivity problems, there is no
more fruitful area for improvement than the work-
place.

As long as workers are crowded into noisy, sterile, dis-
ruptive space, it’s not worth improving anything but
the workplace.

A factor of 2-3 can be reached compared to an open office or cubicle workspace by following one basic principle of somehow putting the team together in one location and limiting outside interference. Ed Yourdon mentions a few methods for achieving this in his “Death March” book:

  • Frontal attack: Convince a project owner such as a high-level manager to put the team into an effective work environment.
  • Skunk works mystique: Isolate the team in a separate location isolated from the rest.
  • Squatter’s rights: Commandeer existing empty office space.
  • Telecommute: Tell everyone to work from home an meet regularly at a location outside of the office.  “As an additional diversion, you can put scarecrow-style dummies at the desks normally occupied by the project team; management will have a hard time distinguishing them from the other zombies in the office.”
  • Graveyard shift: Shift working times to the night shift.
  • Barricades and buffers: In an open office space locate the team together and put up barricades such as cupboards.
Posted in Misc, Process/WoW | Leave a comment

Quality == Culture

From “Toyota Culture: The heart and soul of the Toyota way”.

“If a Toyota leader was asked why they allowed the line to stop, she might make the point that the value the organisation places on quality is higher than hitting production numbers.”, p. 7

Posted in Process/WoW | Leave a comment

Planning experiences…

After all these years, one thing keeps on coming back: If a project is very well plannable then it is probably not an interesting project.

Posted in Process/WoW | Leave a comment

Using CDI to Inject Dependencies into Unmanaged Objects

Contexts and Dependency Injection (JSR-299) is a great standard which is part of Java EE 6 and really simplifies Java EE programming, at least if you stay completely within the confines of Java EE.

However, applications that use CDI also need to be unit tested outside of the application server and in such cases it is useful to also perform CDI dependency injection outside of the container. Fortunately, Weld also support dependency injection in a Java SE environment.

When unit testing, the first idea would be to use CDI as much as possible to wire together the object graphs under test. But when doing this, several problems occur. First, certain managed objects such as EJBs and JPA entity manager and entitymanager factories are not recognized in a Java SE environment. Also, for unit test it should be possible to replace certain objects by test specific mocks. The latter is not supported by CDI as it supports only static configuration using “alternatives” in the beans.xml, whereas mock objects are usually dynamically generated so that the class name is not even known beforehand. Also, the APIs to use for programmatic dependency injection of CDI are a bit cumbersome.

As a result of all these points it is useful to create a simple wrapper library for performing programmatic dependency injection. The mini-framework is found in the wamblee.org support/inject utilities library. The two main concepts are an Injector used for injecting into an object and an InjectorBuilder for creating an injector. Using this concept, injection into a given object becomes easy, for example:

   MyPojo pojo = new MyPojo();
   InjectorBuilder.getInjector().inject(pojo);

The mini framework uses the standard java.util.ServiceLoader mechanism to find an implementation of the injection technology to use. Therefore, using this mechanism, it is also possible to integrate other dependency injection technologies such as Guice and Spring.

For a working example, checkout the code at subversion.

The usefulness of this approach will become more clear if we take a look at mock testing, integration into 3rd party web frameworks such as Wicket, and some more advanced unit/integration tests in later posts.

Posted in Java | 1 Comment

Java EE 6 as the method of choice for application development

In the past I have worked with J2EE 1.4 and admittedly, it was terrible. A lot of plumbing code was required to make applications. Luckily, Spring and Hibernate came to the rescue: Spring for the general infrastructure parts (roughly session EJB replacement) and Hibernate for the persistence part (entity EJB replacement).

Meanwhile, Java EE 5 has been release which has solved a large number of problems and that came a long way in addressing developer productivity. Now, however with the new Java EE 6 standard (released 10th December 2009), things have improved even more.

In a series of blogs I intend to show why Java EE 6 with Contexts and Dependency Injection and JPA as important features should become the preferred tools for development. CDI is a dependency injection standard that is quite similar to Google Guice (although some might disagree) and is largely based on the experiences gained in the last years with dependency injection frameworks. Interestingly, CDI provides an API that allows integration of Java EE dependency injection (e.g. @PersistenceContext, @EJB, @Resource) into arbitrary POJOs, thus facillitating integration of Java EE into third party application frameworks.

I will demonstrate Java EE 6 based development using code examples with some support from the wamblee.org utilities library using a Wicket application  At a later stage I will also look at how to cleanly integrate OSGI services into applications.

Posted in Java | Leave a comment

Improved logo for wamblee.org

Several improvements to the logo:

  • more abstract connectors removing any association with plungers
  • smoothed shapes so it also looks good in large size
  • better colors, nice primary colors just like Duke
  • more unobscured Duke image (connector is moved to the side)
  • lengthed the shape of the component so it suggests  movement a bit more
  • more logical lighting position (coming from behind the camera)
Posted in Devops/Linux, Java, Misc | Leave a comment

New logo for wamblee.org

Here it is, the new logo for wamblee.org. It is Duke is flying like an eagle (wamblee) on a component (a Java component of course).  The component has one provided interface and two required interfaces. If you listen carefully, you can hear Duky say “Top of the world!”.

The image is a little derived from a component diagram in UML. These are just initial steps as far as the logo is concerned. I found out that I will need to add a skeleton/rig to Duke myself to make it take different postures and do animations but that will come later.

One of the first steps will be to improve the image. The current version contains non-smoothed elements that will show when enlarged. Also, someone compared the required interfaces to plungers. To avoid any such confusion I am going to change the end shapes to more abstract geometrical shapes and also work a little on colors and lighting.

Posted in Devops/Linux, Fun, Java, Misc | Leave a comment

Successfully rendered Duke logo using blender

After quite a lot of trying, and learning to use Blender, a great open source 3D rendering package, I finally managed to create a Duke image based on a DXF file from the open source Duke project.The rendered image is on the left.

This means I can use it for other logos and movies that I create with Blender. Soon I will use it on the wamblee.org website which recently also got a style update. The good thing about it is that in this way I can use the Duke image inside any 3D model I want. In particular, it also contains a rig but haven’t tried that yet. With some luck I should also be able to create Duke animations from that.

Posted in Devops/Linux, Fun, Java, Misc | Leave a comment

James Gosling – quote

I apparently missed the news item that James Gosling left Oracle in April. One interesting quote though:

“Just about anything I could say that would be accurate and honest would do more harm than good.”

Really subtle.

And a brilliant picture from his blog:

Posted in Java | Leave a comment