Educating the world

Our blog has over 10,000 readers a month

Hessian expected end of call (z) at M

February 22nd, 2017

Just thought I'd post this to help anyone else coping with this error message.

expected end of call ('z') at 'M'. Check method arguments and ensure method overloading is enabled if necessary



package uk.co.bigsoft.app.hessian.clients;

import java.net.MalformedURLException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.caucho.hessian.client.HessianProxyFactory;

public class HessianInterfaceFactory {

    private static final Logger L = LoggerFactory.getLogger(HessianInterfaceFactory.class);

    private HessianProxyFactory factory = new HessianProxyFactory();

    public HessianInterfaceFactory() {
        factory = new HessianProxyFactory();
        factory.setOverloadEnabled(true);
    }

    public  T createHessianInterface(Class type, String url) {

        try {
            return type.cast(factory.create(type, url));
        } catch (MalformedURLException e) {
            L.error("Creating proxy for \"" + type.toString() + "\" on \"" + url + "\"", e);
            return null;
        }
    }

}

-->

SVN Cheat Sheet

February 22nd, 2017

I always think that using SVN is like using a really broken version of git. The fact that SVN allows you to checkout part of a tree and thus have any folder as the root of your source controller encourages developers to hack solutions which is probably why they had to invent the idea of keeping track of and committing individual revisions rather than encouraging developers to bring a branch up to date. A lot of people say they don't like Clearcase because you can make a config spec that gives you a view where it shows folders from different parts of your history or from different branches. The difference is that Clearcase gives you loads of great tools to help manage it all where as SVN gives you practically nothing - the easiest way to manage SVN merging is still finding all the revision numbers and writing them down on a piece of paper and merging them individually, on a big project this can take weeks.

As a result I try not to waste my brain space on things that aren't worth remembering so this is the place for all those SVN related commands that I need from time to time.

Find the revision the branch was taken from

svn log --stop-on-copy

SVN ignore doesn't work as expected because the root can change

http://superchlorine.com/2013/08/getting-svn-to-ignore-files-and-directories/

Educating Yorkshire: One year on

February 22nd, 2017

Just finished watching "Educating Yorkshire: One year on". Still feel great empathy for Musharaf.

People often ask me what it's like being dyslexic and it's like being Musharaf. All your will is constantly being exhausted trying to convert the pattern of a word into sounds. Once you have the disjointed sound you kind of have to remember which word that sounds most like before you can say it properly. It doesn't make any difference if I'm reading allowed or silently to myself. It's very frustrating. Over the years I've learnt what most of the words I use sound like but even now when I come across unfamiliar ones I'm right back where I started.

I use a screen reader now to help with this problem. Over the years my word vocabulary has increased and so too has the speed of my screen reader. "Normal" people talk about coping mechanisms and mine has enhanced itself to the point that I can be listening to the computer reading one piece of text really quickly while my eyes are reading another piece of text (less quickly but it still goes in). This means I can trawl the internet looking for solutions much quicker than everyone else. When I couple this technique with opening multiple tabs then it can make finding something ridiculously quick.

Practical example of FileSuka

January 18th, 2017

I wrote FileSuka about 4 years ago. Unfortunately, it was never picked up as much as I would have liked but it has been consistently downloaded between 1-10 times every month since then. I think there were 2 main problems with it. For me Suka was short for Sucker: FileSuka sucks down files. I didn't realise it at the time of naming the project that Suka is Russian for slut. As this is a rude word in some jurisdictions the project never really got as much traffic. Secondly, I think it takes a little bit of effort to visualise a situation where using FileSuka would help.

There's not much I can do about the name (at the moment) but I can provide a real world example of how to use the application.

Let's imagine you want to download the font awesome fonts and save them all locally. Part of the problem is that the base file name is the same for files of different colours or sizes. FileSuka can help with this with one of its expressions.

The font awesome files may be downloaded using the following url but there are hundreds of combinations. I could write a shell script to generate the url spec and for ages that's what I did, but I needed a solution that was more reusable.

Generate icons:
http://fa2png.io/generate?name={l,3,chevron-down,chevron-left,chevron-right,chevron-up,home}&size={n,2,8,18,1}&color=HASH{l,1,000000,ffffff}

Download icons:
http://fa2png.io/static/images/{l,3,chevron-down,chevron-left,chevron-right,chevron-up,home}_{l,1,000000,ffffff}_{n,2,8,18,1}.png

In the example above I use 3 looper sequencers: a list of names, a list of colours and a list of file names. Each list has a place holder number that is populated and made available. These place holders can be used to make a local path or file spec.

For example setting the save folder to c:\tmp\filesuka\{1}\{3} gives the following. The actual file name is the same as the remote name but you can a build up the directory path and file name with place holder values.

c:\tmp\filesuka\000000\chevron-down\chevron-down_000000_8.png
c:\tmp\filesuka\000000\chevron-down\chevron-down_000000_9.png
c:\tmp\filesuka\000000\chevron-up\chevron-up_000000_8.png

You can place the {looper_id} labels anywhere and FileSuka will download the requested files and save it to the generated local file spec creating intermediate folders along the way.

Pivotal Tomcat server configuration is missing in Eclipse

September 21st, 2016

I use Spring Tool Suite (STS) when I'm working on Java projects that heavily use the Spring Framework. One gotcha that keeps getting me is the following message.

The Tomcat server configuration at \Servers\Pivotal tc Server Developer Edition v3.1-config is missing. Check the server for errors.

The message pops up when I try to drag a web project on to the icon for Pivotal tc Server Developer Edition v3.1 in the Servers tab. Eclipse can not read the configuration file because it lives in a project that is closed. In spite of saying open related projects Eclipse does not notice that the web server configuration project is related to my web application project and so I must open it explicitly. Opening the Servers project fixes it.