28 June 2008

A nice firefox addon for using mouse gestures

I've updated my firefox addon list following moving to Firefox 3. I've started using FireGestures for mouse gestures, you hold down the right mouse button and move the mouse up, down, left or right to execute various actions. The default configuration has far too many options to figure out, I've simplified mine to just a few:

Previous TabL
Next TabR
Close TabRL
BackUL
ForwardUR
Open Link in BackgroundD
Open Link in ForegroundU
ReloadUD
Reload Skip CacheUDU
Popup Recently Closed TabsLR

Visualising jgrapht graphs using yEd

If you need to visualise graphs, such as directed acyclic graphs, then yEd is a nice open-source tools to use. Save the graph to gml as show below. Then open up yEd, you can open it directly from yWorks website using webstart. For DAGs, I've found "hierarchical - interactive" view with "hierarchical - topmost" layout the best way to layout the graph.

import org.jgrapht.DirectedGraph;
import org.jgrapht.ext.GmlExporter;
import org.jgrapht.graph.DefaultDirectedGraph;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;
...
DirectedGraph graph = new DefaultDirectedGraph(...);
...
GmlExporter gmlExporter = new GmlExporter();
gmlExporter.setPrintLabels(GmlExporter.PRINT_VERTEX_LABELS);
File file = ...
Writer fileWriter = new BufferedWriter(new FileWriter(file));
gmlExporter.export(fileWriter, graph);

Apply svn auto-properties retrospectively

A useful script that applies all auto-properties (from $HOME/.subversion/config) to your current workspace files.

24 June 2008

Never been a fan of BDUF - Big Design Upfront

Top 10 SOA Pitfalls: #5 - Big Design Up Front | Javalobby

Never been a fan of BDUF - Big Design Upfront... ever since (early on in my career) I was "required" to create endless class and sequence diagrams before being able to write a line of code... consultancies used to get paid by how much documentation they created rather than working software.

ZeroTurnaround's JavaRebel - class reloading

ZeroTurnaround.com JavaRebel

If you're developing an application that has long reload times and Hotspot's Hotswap is not cutting the mustard, then this product maybe what you need. As well as supporting modifications to methods it also supports adding/removing methods/fields/clases/annotations and changing interfaces.

Checkout the screencast.

Jolt Awards

Jolt Awards

I always used to keep an eye on the Jolt Awards, back in the day when Software Development Magazine (now merged with Dr Dobbs Journal) used to cover it. Sometimes useful to see what products are getting awards... wouldn't base any decisions on it though.

Kid's swimming centre in Wimbledon

Centos 5.2 went smoothly

[CentOS-announce] Release for CentOS-5.2 i386 and x86_64

The upgrade went through without a problem.

1) execute "yum upgrade"
2) execute "find /etc -name *.rpm?*" to discover any .rpmnew and .rpmsave config files that need merging into existing config files, then merge, preferable using a visual merge tool such as Meld
3) reboot

Job done

Centos repositories - adding RPMforge

18 June 2008

Enforcing package dependencies

For sometime I've wanted a tool that would let me enforce package dependencies (directed acyclic graphs). Currently I can only do this in IntelliJ IDEA, or Maven, by splitting my packages out into separate modules. However this leads to too many modules. Googling has brought up two possibilities.

Structure101 looks awesome but costs a lot, still it looks like a valuable tool for a commercial development team. Its a server-based tool that comes with IDE plugins.

Japan and Macker seem like cheap and cheerful open-source tools that are simple to use, as they rely on a configuration file that can be placed into source control alongside the actual source code to which it relates. I think I'll give Japan a go, as its simple enough for my needs. Andy@Gigantiq discusses them in detail at:

Enforcing Package Dependencies (Part 4)
Enforcing Package Dependencies (Part 3)
Enforcing Package Dependencies (Part 2)
Enforcing Package Dependencies (Part 1)

13 June 2008

Segregating unit and integration tests in Maven

Unit tests are not integration tests - John Ferguson Smart's Blog

Shoal - a useful library for implenting clustering functionality

Shoal – A Dynamic Clustering Framework

Shoal is a java based scalable dynamic clustering framework that provides infrastructure to build fault tolerance, reliability and availability.

The framework can be plugged into any product needing clustering and related distributed systems capabilities without tightly binding to a specific communications infrastructure.

A good discussion of exceptions

Exceptions in Java by Dr. Heinz M. Kabutz

10 June 2008

IEEE1588 – Precision Time Protocol

Measurement and automation applications (and latency-sensitive electronic trading systems) often must precisely synchronize events over a widely distributed system. For example, an industrial automation system may need to synchronize distributed motion controllers, or a test and measurement system may need to measure strain gages distributed over the wing span of an airplane (or an algorithmic trading system may need to decide whether its market data is too old and monitor latency on an ongoing basis). The IEEE 1588 precision time protocol (PTP) provides a standard method to synchronize devices on a network with submicrosecond precision. The protocol synchronizes slave clocks to a master clock ensuring that events and timestamps in all devices use the same time base. IEEE 1588 is optimized for user-administered, distributed systems; minimal use of network bandwidth; and low processing overhead.

Read more

Get your gmail as an rss feed

Get your gmail as an rss feed so you can see it in your news reader.

Why it's better to be lazy, by Jeremy Meyer

Why it's better to be lazy, by Jeremy Meyer

Everyone can be loosely classified into 4 groups, which are permutations of either activeness or laziness and , intelligence or stupidity.

Intelligent Lazy people, as my father would explain, are everyone's favourite. They do things in a smart way in order to expend the least effort. They don't rush into things, taking that little bit of extra time to think and find the shortest, best path. They tend to make what they do repeatable so they don't have to go through it all again. These people usually make good leaders, and they are good to have on teams.

Intelligent Active people are useful, because they are smart, after all, but their intelligence can be slightly diluted or tempered by their activity. Where they don't have a perfect solution, they might act anyway, rather than sitting on their laurels, so useful people but not great leaders, and on a team, they can often put noses out of joint by acting too early and too fast.

Stupid Lazy people have their place too, they are easy to manage, they generally don't act on their own initiative too much and, given tasks that are not beyond them, they will perform in a predictable, consistent manner. Usually they won't cause any harm on teams. Wellington, liked these people as foot soldiers.

Stupid Active people are the dangerous ones. Their default behaviour is to act, and in the absence of skill or thought they can cause all types of trouble.

07 June 2008

Figuring out what subversion checkins you've done

"svn log" will give you a changelog for everything that's happened on a subversion repository between particular versions, but what if you want to filter this out for checkins done by a particular author, such as yourself? Run:

svn log -r {2008-01-01}:{2008-06-08} --xml --username your_repo_name --password your_repo_password http://svn.domain.net/repos/xxx > changelog_for_all_authors.xml

Now you need to run a little filtering on changelog_for_all_authors.xml, some form of xpath might help. I came across a script at http://dev.agoraproduction.com/svnLogParser.php that does the job. Download the script to svn-log-parser.php and run.:

php ./svn-log-parser.php changelog_for_all_authors.xml your_repo_name change_log_for_your_repo_name.xml

Searching for RHEL and CentOS information

06 June 2008

Date logic in Bash

You can generate strings that include relative date values using a script like:

#!/bin/sh
for n in 20 19 18 17 16 15 14 13 12 11;
do
d=`date +'%Y.%m.%d' -d "-${n} day"`
echo "Deleting ${d}"
rm -rf ./${d}
done