Intellij svn history keeps “partial” commits

I found that after an update, I was still seeing some entries lying around. Thanks to this issue on the intellij community forum I was able to simply remove the contents svn cache and it works.

~/Library/Caches/IntelliJIdea90/vcsCache
  • Share/Bookmark

@ 10:06

ides

Permalink

Google reader “shared items” plugin for wordpress

I find google reader a useful way to aggregate information from many blogs. Particularly convenient is to be able to read these on my iPhone and then mark them as shared. That way I can build up a list of information I am interested in.

This is then conveniently exposed as an RSS feed by google. You can see my shared items at http://www.google.co.uk/reader/shared/jim.barritt for example.

I used to have a sidebar on this site which had a snippet directly from google reader, but it was determined to have its own style. I wanted a wordpress plugin that would do it for me and found “Recommended Reading Google Reader” by C. Murray Consulting

Its the nice “READING” section on my sidebar. Thanks guys! You just saved me from writing my own!

  • Share/Bookmark

@ 16:06

meta
thoughtblog
website

Permalink

Agile North Keynote: Guiding Teams On Mt Agile

I recently (Friday 14th May 2010) gave the closing Keynote at Agile North, a one day conference held up in Preston.

The talk was loosely based around a metaphor of mountain climbing and playing with the analogy of being a consultant on an agile project being like a mountain guide. The idea is that someone who is a mountain guide has many years of experience climbing and coaching people on the mountain.

The talk I think was well recieved and generated quite a bit of interest from people, I think because we were talking about real experiences on our current project.

I co-presented with Mark Crossfield who is the Tech Lead on the team I am Coaching at our current client, AutoTrader, and I felt it was an interesting balance between my “Guide” view and his experience leading a team into an Agile project for the first time.

We covered five short stories about our experiences on the project.

  • Safety First – going beyond CI to pipelines
  • The Walking Skeleton as a metaphor for iterative feature delivery
  • Evolution of the codebase
  • Collective Design
  • Telling the story of the code

The Slide deck is up on slideshare and the talk can be viewed here.

At some point they promise to put up the video of the event at which point I will update this post.

  • Share/Bookmark

@ 14:06

agile
thoughtblog

Permalink

Make Fireworks IntelliJ Plugin Ignore Integration Tests


http://www.wafermaneuver.com/nick/img/photo/fireworks2.jpg

The Fireworks Plugin for IntelliJ allows you to automatically run all your unit tests when you make a change to the code.

Its a well behaved plugin, it allows you to configure wether or not to do this so you can just turn it on or off.

Whilst using it I made a detour to Shave a couple of Yaks. So thought I’d document it here.

I found it was also running some integration tests which relied on the file system and so didn’t work because there doesn’t appear to be a way to specify the working directory (you can specify JVM args so I could use that instead. I submitted an issue.

In the mean time, actually I thought I would rather not run my integration tests. Fortunately Fireworks allows a regex pattern to decide which files are tests.

After some hunting, I found the following post on stack overflow which gave me the clues i needed to include Test but not IntegrationTest.

The solution takes advantage of “lookaround” features of regex. The syntax in question is:

(?!Integration)

The (?! regex ) syntax means negative look ahead. You can put any regex in there. In our case, just “Integration”. This says, something not followed by “Integration”.

The code on stack overflow had some unnescessary syntax at the beginning (^) and I changed the ordering around a bit to make it read more logically.

(.(?!Integration))*Test

The first “^” was unnescessary, and putting the “.” first made it read better i think. The parentheses are to provide some structure (regex groups) more than any functional reason.

So in words, the new expression reads “match any repeating character (.*) not followed by “Integration” (?!Integration)), then only match if “Test” is on the end.

Here is a test case for it (which along with some other regex stuff can be found on Github :

    @Test
    public void matchesUnitTestsButNotIntegrationTests() {
        String expression = “(.(?!Integration))*Test”;
        Pattern pattern = Pattern.compile(expression);
        assertThat(pattern.matcher(“SomeUnitTest”).matches(), is(true));
        assertThat(pattern.matcher(“SomeIntegrationTest”).matches(), is(false));
        assertThat(pattern.matcher(“SomeNonTestClass”).matches(), is(false));
    }

I found it hard to get this to work on the command line with grep. But I’ve got too much YAK HAIR on my floor now!

Now the Yaks are shaved I can go back to putting a system property in to allow my integration test to work.

  • Share/Bookmark

@ 10:05

code
regex
testing

Permalink

Link from log console output to a line of code in IntelliJ

Whilst playing around with some code analysis I thought it would be useful to be able to output a hyperlink back to a line of code in the IDE console. As it happens, you can “Trick” IntelliJ to do this with the following log statement:

    @Test
    public void canClickOnAFileInTheConsoleAndGoToTheLineOfCode() {
        log.info(String.format(“Check it at %s. (%s.java:%d)”,
            getClass().getName(), getClass().getSimpleName(), 15));
    }

The pattern it seems to match is something like at {classFullName}.{identifier}({classSimpleName}.java)

classFullName has to be a valid class name.
identifier is usually used for the method name, but it can be anything. The full stop is nescessary. So in the example above, I put a space in there and so it reads like a sentance.

Anyone know a another way to do this?

UPDATE:

Actually it seems that you can get something similar if you output a full path name, e.g.:

    File f = new File(“./src/test/resource/testfiles/level_01/level_01_01/file_01_01_A.txt”);
    log.info(f.getAbsolutePath() + “:” + 34);

This will create a link in the output window to the line of the file. Nice.

  • Share/Bookmark

@ 13:05

code
ides
java
thoughtblog

Permalink