svn-shortlog — Compact & Beautiful Subversion Changelog

At work we periodically have short developer meetings to discuss what has happened in the last month. To do this, we go through the bugs in our issue tracking system, and the subversion commits in our repository. Unfortunately, getting an overview of the subversion commits was rather cumbersome, and we could not find any efficient tool to do this. Hence, svn-shortlog was born.

This is an attempt to format the subversion log of a one-month period in the following way:

  • Beautiful HTML output.
  • Compact representation of lots of information
  • Usable with a not-so color rich beamer.
  • Fully automatic.

Usage

  1. Install Ruby (both 1.8 or 1.9 should work).
  2. Download svn-shortlog.rb.
  3. Open svn-shortlog.rb with your favourite text editor, and configure the config section according to your needs.
  4. Doubleclick svn-shortlog.rb
  5. Open the generated changelog_....html file with your favourite browser.

Sample Output

Here is a sample output of one month of boost commits into trunk, taken from the public repository. The output is quite information dense, a quick description is in the screenshot:

All commits are structured by user, then by date. Each commit is on one line. You can click each line to see the full information related to a commit.

Issues

Ideas, suggestions, problems? Please post them as a comment here, at the bug tracker.

Credits

This tool is based on the idea from my colleague Christoph Heindl and inspired by Linus’ Kernel shortlog and Gmail.

iRob Feeder in Action (Video)

Finally! PROFACTOR (the company I work for) has decided to get a youtube account and upload some videos. Best of all, this gives me a chance to show off a bit of my (our) work ;)

iRob Feeder is a solution for equipping of industry facilities. We can recognize the 3D position of different pices, grasp it, put it wherever you want them, and all of this quickly. Actually, the whole thing is a bit more than that, since it is possible to reuse components from it. We have a nice demonstrator for very fast object recognition moving along on a conveyer belt.

Here you can see it in action:

I am mostly involved in the algorithm development on the object recognition side. We have put quite some effort into making it fast: depending on the kind of object, we can have a reliable recognition in as low as 0.1 second on a standard desktop PC.

Hopefully Profactor will post some more videos about this in the near future.

PS: The article here are my personal opinions and do not necessarily reflect the position of my employee.

Online Password Encrypter for Apache

Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password.

Thats why I have created The Online Password Encrypter. Here users can enter their desired username and password, and the encrypted key is automatically generated online, without transmitting anything to any server.

Here is an iframe of the file. Click here for full screen.

The Online Password Encrypter is just one single HTML page, it does not depend on any other files. So it is easy to download it, modify and send it around. Feel free do whatever you want with it.

Have fun,
Martin

Scientific Approach to Green Tea Preparation

A few months ago I seem to have become a green tea advocat, since I have realized that it is probably the most healthy beverage ever invented (including water).

The enormous study “Green Tea Consumption and Mortality Due to Cardiovascular Disease, Cancer, and All Causes in Japan” took 11 years with over 40.000 participants, and got the following result:

Green Tea Benefits in Woman

  • 23% lower risk of dying from any cause
  • 31% lower risk of dying from CVD
  • 62% lower risk of dying from stroke

Green Tea Benefits in Men

  • 12% lower risk of dying from any cause
  • 22% lower risk of dying from CVD
  • 42% lower risk of dying from stroke

On my quest for the perfect cup of tea, I have looked for scientific analysis and have found the enlightening paper “Factors Affecting the Caffeine and Polyphenol Contents of Black and Green Tea Infusions“. Here are the most important findings of it:

How to get the most out of a tea bag. The more extracted solids / catechins, the better.

Brewing

  • doubling the bags doubles the extracted solids (which is good!)
  • Increasing brewing time from 1 minute to 2 minutes doubles the catechins. 5 minutes tripple the catechins.

Teabags vs. loose leafes

  • Loose leafes are better than teabags.
  • When teabags are left floating, the flow resistance of the material blocks almost everything! this is very bad.
  • Continuously dunk a tea bag and the extraction is 4 times better!
  • Loose leafes are still about 20% better than dunked teabags, and after about 2 minutes the water is saturated (no need to wait any further)

Leafe size / packing

  • loose leafes? extraction is faster with smaller leafes. No need for dunking.
  • teabag with small leafes / tightly packed? Continuously dunk it
  • teabag with large leafes / loosely packed? Leafe it static (the flows are driven by convection)

CONCLUSION

  • loose leafes are the best. Brew for 2 minutes and you have everything they got.
  • If you have to use teabags, dunking the bag gets you 4 times the catechins!

Java Challenge – The Mysterious Method Wrapper

Here is the challenge. Create some Java code so that this JUnit test works:

public class EachMethodTest {

    /**
     * Simple test object.
     */
    public static class Fu {
        @Callable
        public int fu() {
            return 1;
        }

        @Callable
        public int bar() {
            return 2;
        }
    }

    /**
     * Call all methods that have the @Callable annotation.
     * The MethodsToProc works for ANY type of object, not just Fu.
     */
    @Test
    public void eachMethodTest() {
        final Fu fu = new Fu();

        int sum = 0;
        for (final Proc<Integer> c : new MethodsToProc<Integer>(fu)) {
            sum += c.call();
        }

        Assert.assertEquals(3, sum);
    }
}

Basically what I want to do is be able to automatically create wrappers for some object, so that each method with the @Callable can be called with a single common wrapper interface call(). It should be possible to specify the return type via Generics, and the ctor of MethodsToProc should be able to take any type of object.

See if you can do a general solution without cheating! The simpler, the better. You can post code snippets e.g. at snipit or gist. Have fun!

Next Page →