Openshift for Developers – Graham Dumpleton, Grant Shipley – O’Reilly

December 10, 2017

A quick, hand-holding introduction to a complex platform, useful to get an idea of what it has to offer without getting lost in the wealth of documentation and blog posts available on the web.
However, after a year and a half, it could do with a new edition: the all-in-one VM image has been replaced by the Minishift tool, some application pages have changed and at least one exercise doesn’t work any more. Still worth reading, nonetheless.


Configure JBoss EAP 6.x as Service on RHEL 7 and derivatives

February 10, 2015

Starting with release 7 Red Hat switched to systemd as service manager. Old init based services are still handled correctly, so I expected to be able to follow Red Hat’s instructions in order to configure my JBoss EAP 6.x installation as a system service. However when I tried to run my service with

service start

I got an error message stating that the unit could not be started. After a little googling and a little trial and error I discovered that systemctl – the systemd replacement for the service command – didn’t like my service’s name. I moved the file to jboss, rerun chkconfig, and everything is now working.

Nxpy 0.3.0 released

November 30, 2014

I’m happy to announce the availability of release 0.3.0 of my Nxpy library, which is available from PyPI and from SourceForge. Updated documentation may be found here.

The main purpose of this release is Python 3 compatibility: all tests now pass with 3.4, 3.3 and 3.2, as well as 2.7 and 2.6. Parts of the library still work with 2.5. With the exception of the ccase package all tests were run with all Python versions on Windows 7 and Fedora 20, and with all but 2.5 on OS X 10.10. The ccase non-destructive tests were run only on Windows 7 with Python 3.4 and 2.7; the destructive tests weren’t run at all, as I don’t have a test ClearCase installation available anymore.

Given the focus on Python 3 there are almost no new features; a few methods received an additional encoding argument to better support the differences in string handling between 2 and 3.

The only thing that is completely new is the CurrentDirectory class in the path module. This is a context manager that lets you change directory temporarily, a little like the pushd/popd commands.

How to reduce the size of Eclipse Juno and Kepler tab fonts on Linux

March 30, 2014

As my home PC has Windows 7 installed I run Linux on a VirtualBox virtual machine. With modern 16:9  monitors vertical pixels are a scarce resource and I don’t like wasting them. The Windows taskbar uses some, others are used by VirtualBox, a little more by MATE‘s own taskbar and by its window top bar. Luckily it is very easy to set change font sizes in MATE and I’m currently using 8 size fonts for everything… except that the font in the tabs of Eclipse Juno, the IDE I’m currently using, stubbornly refuses to obey my settings.

However it’s not that hard to tame it: as explained in this StackOverflow answer you just have to edit the e4_default_gtk.css file in the plugins/org.eclipse.platform_4.2.*/css directory of your Eclipse installation (the middle name depends on the exact Eclipse version), find the .MPartStack element and comment out the font-size definition:

.MPartStack {
/* font-size: 11; */
swt-simple: false;
swt-mru-visible: false;

This problem is also present in Eclipse Kepler and is solved in the same way.

How to view man pages with Yelp on Fedora 18 with the MATE desktop

February 15, 2014

At work CentOS 6 is the standard Linux distribution and I’ve become accustomed to using the default desktop’s help system to view man pages. This is actually Yelp, the GNOME help viewer, which in CentOS 6’s GNOME 2 based desktop is available by default in one of the menus.

At home however I’m currently using Fedora 18 with the Mate desktop, which doesn’t provide a similar setup, even though Yelp is used by several applications. A bigger problem, however, is the fact that once you do start Yelp there’s no evident way to get it to display man pages, even though it works from the command line, as in

yelp man:cat

This would not be very useful when Yelp is configured to run from one of the MATE menus. After some googling I found out from this forum thread that this is a known bug and that an undocumented workaround is to type Control-L in the navigation bar. After that man pages can be found with the same syntax as the one displayed above, i.e.


How I became a Python programmer

August 22, 2013

Read all about it on the Josetteorama blog.

A little thing I didn’t know about Java enums

June 21, 2013

I like being amazed by programming languages, especially when it’s a case of the obvious just working. One could argue that that’s how it should always be and that there should be nothing amazing about it, but that’s another story.

I happened to have an enum like this:

public enum Dbms { DB2_WIN, DB2_AS, DB2_LINUX, ORACLE; }

and I wanted to provide a way to check if an instance was one of the different DB2 variants. I decided that the simplest, most convenient approach would have been to add a boolean method such as:

public boolean isDB2() {
  // Check if this is one of the DB2 constants

However I had never needed to give an enum a non static method before and I realized that I didn’t know how to refer to the current instance’s value from such a method. While googleing for inspiration a thought dawned on me: an enum instance doesn’t have a value, it is a value. So I wrote my method as follows:

public boolean isDB2() {
  switch(this) {
  case DB2_AS:
  case DB2_WIN:
  case DB2_LINUX:
    return true;
    return false;

and it just worked. As simple as that.

How to get freeSSHd public key authentication to work

March 28, 2011

I was looking for a Windows SSH server implementation to use in conjunction with Mercurial when I stumbled upon freeSSHd. Setting it up was a matter of minutes… except that I could not get public key authentication to work. After countless attempts and many a Google search I eventually solved my problem, thanks to this step by step IBM tutorial.

Unfortunately when used in non-interactive mode freeSSHd doesn’t spawn cmd.exe, which makes it unsuitable for applications that expect their remote counterparts to be on the path.

Quote of the day #3

January 5, 2009

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots.

So far, the Universe is winning.”

Richard Cook

From an email signature.

Does anybody here remember… Live Wire?

November 22, 2008

Live Wire were a British band from the late seventies. As far as I know they released three albums: Pick it Up, No Fright and Changes Made. Theirs was an original style which combined a rather nocturnal, essential approach to rock music with a decidedly jazz rock oriented bass. The atmosphere was different in each album, possibly a little convoluted and wordy in the first two, more easy going in the last one.

Here in Italy they were likened to Dire Straits, but the two bands had little in common except for the fact of being non Punk/New Wave bands in the height of the Punk/New Wave era. Live Wire were less immediate and pleasant than Dire Straits, but certainly not less interesting.

They toured Italy at least twice and I managed to attend the second tour’s first and last gigs. I have a pleasant memory of the band’s involvement with the audience: they appeared to enjoy playing for us and they seemed to be truly moved by our response. Their “In my Child’s Eye” is still one of my favourite songs.

Italy appears to have played a role in their career, both before and after they split. As a band they worked with some local artist; after the break-up guitar player Simon Boswell went on to write film scores for, among others, master of suspense Dario Argento, while bass player Jeremy Meek played with Pino Daniele on different occasions. A friend of mine happened to attend a gig where lead singer Mike Green was among a performer a few years later in Milan.

All in all a band that deserved better fortune than they got; all the more so considering that it’s highly unlikely that their records will ever be reissued in digital form.