Avatar
😀

Organizations

  • Here’s a handy string for i18n testing:

    用户汉语

    It can be handy to have a string in a non-english charater set that can be pushed end-to-end.

    This should be a sad sad joke similar to the writing on the bottom of a leprechaun I saw in a gift shop in Ennis:

    Déanta i dtír eile

    I should point out that it was probably

    Déanta sa tSín

    Still

    Mura féidir leat tuiscint a fháil ar an ansin is féidir leat léamh na Gaeilge.

    Created Thu, 10 Feb 2011 00:00:00 +0000
  • An interesting blog on QA and development: The Clean Coder: QA or When do you flip a pancake?

    Created Tue, 24 Aug 2010 00:00:00 +0000
  • I had my first oportunity to see the new 3D TV’s this weekend. They looked OK to me. There was a 3D effect. All around me were people who were going “wow! this is great! this is absolutely fantastic!”.

    But then I tilted my head, and low and behold, because the system uses horizontal separation to deliver 3D, it requires that your eyes be horizontally separated in order to deliver the 3D effect… when your eyes are vertical, however, it looks just as shit as when you have not got the glasses on.

    Created Mon, 26 Jul 2010 00:00:00 +0000
  • Works on *nix

    find ~/.m2/repository -type d -name \*-SNAPSHOT -exec rm -rvf {} \;
    

    By searching for the directories we should catch the -YYYYMMDD.HHMMSS format of snapshots also

    Maven Shell Created Mon, 19 Jul 2010 00:00:00 +0000
  • We recently lost our hudson server due to a multiple disk failure in the RAID array storing our hudson configuration. [5 of the 15 disks died]

    So I’ve been looking into a backup script that will allow us to keep a backup of the configuration. We use Maven for most of our builds, so the released artifacts are in our Maven Repository (which is hosted on two servers each with RAID arrays and using DRBD to mirror between the pair, with an rsync to a NAS in another cabinet and we are trying to get an rsych to an off-site storage going as well).

    Jenkins Created Thu, 08 Jul 2010 00:00:00 +0000
  • Cool post I just found:http://coldattic.info/shvedsky/pro/blogs/a-foo-walks-into-a-bar/posts/7

    Shell Created Fri, 14 May 2010 00:00:00 +0000
  • When you are keeping build/version number in strings, you really need to left pad with 0’s in order for string sorting to work…

    e.g. 1.0-alpha-2 > 1.0-alpha-1 > 1.0-alpha-10

    So as long as we start off with a leading zero, we are fine, e.g. 1.0-alpha-01

    Of course the next question is how much padding…

    Eventually you will reach a point where the amount of padding is too much… enter crazy counting…

    Created Sat, 03 Apr 2010 00:00:00 +0000
  • I am starting a series of things you should not do:

    Seam has this handy annotation: @Synchronized which ensures that only a single thread may access the methods/fields of the component at the same time.

    Often times it is easy to forget that SESSION scoped Seam components are automatically @Synchronized

    Java has this (formerly) handy modifier synchronized which when applied to a method, ensures that the object’s implicit lock is held whenever the method is invoked.

    Created Wed, 24 Mar 2010 00:00:00 +0000
  • I’ve been meaning to blog about getting transaction management working with OpenEjb and Jetty using jetty:run… it’s still an on-going story… but the following might get you going…

    First off, in your pom.xml you need to add the configuration for maven-jetty-plugin… we need to dance around the various activemq/activeio versions and ensure that we get the correct version of ant…

    <?xml version="1.0"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" 
    	    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    	    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.apache.openejb.examples</groupId>
      <artifactId>jetty-openejb</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>jetty-openejb Maven Webapp</name>
      <url>http://maven.apache.org</url>
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
          <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.22</version>
            <dependencies>
              <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-core</artifactId>
                <version>4.1.1</version>
                <exclusions>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging-api</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activeio-core</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-ra</artifactId>
                <version>4.1.1</version>
                <exclusions>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging-api</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activeio-core</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activeio-core</artifactId>
                <version>3.1.2</version>
                <exclusions>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging-api</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <dependency>
                <groupId>org.apache.openejb</groupId>
                <artifactId>openejb-core</artifactId>
                <version>3.1.2</version>
                <exclusions>
                  <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-core</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-ra</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activeio-core</artifactId>
                  </exclusion>
                  <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <!-- in order to use the latest version of openejb, we need to exclude
                   the dependencies provided in jsp-2.1-jetty -->
              <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jsp-2.1-jetty</artifactId>
                <version>6.1.22</version>
                <exclusions>
                  <exclusion>
                    <groupId>ant</groupId>
                    <artifactId>ant</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
            </dependencies>
            <configuration>
              <jettyConfig>${basedir}/src/main/jetty/jetty.xml</jettyConfig>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </project>
    

    Next we need to configure a src/main/jetty/jetty.xml to bind the UserTransaction instance into jetty…

    Java Maven JavaEE Created Wed, 10 Mar 2010 00:00:00 +0000
  • Review Board is quite nice… it has a handy program for posting reviews (postreview)… and you can integrate this into your subversion hook scripts quite nicely…

    But what if you want to automate submitting reviews on only parts of your code base…

    What I want is to be able to set a property on a folder and then any time a file is changed in that folder or it’s children, then a review will automatically be scheduled…

    Created Wed, 17 Feb 2010 00:00:00 +0000