SCO vs Linux: Game Over

31. August, 2011

Finally: 10th Circuit Affirms in All Respects – Novell, Not SCO, Owns the Copyrights, etc., by pj

Of course, this is SCO … I might be a little surprised if they didn’t try to appeal to the US Supreme Court 😉

SCO or how to waste millions of dollars for naught.


Testing Requirements

30. August, 2011

When developing software, you’re constantly faced with two issues:

  1. Get all the requirements
  2. Make sure the requirements are correct

When writing code, we use tests to make sure we meet all the goals (completeness and correctness) but how do you test requirements?

By writing unit tests against a model of your requirements. There are two approaches to model requirements in a way useful for both the business and the development: Requirements Modeling Framework (RMF) and AlphaSimple.

See rafael.chaves’s blog post “Modeling requirements the pragmatic way (or When xUML meets xUnit)” for a more detailed introduction to the idea.


New Release of MT4E

24. August, 2011

Note: This post is now obsolete since there is a newer release.

I just finished a new release of Maven Tools 4 Eclipse. It’s not written in Groovy and supports all the features of the old Python version plus a few new ones.

You can find instructions how to use it on the wiki page.

For now, you need to build the tool from source (which needs 1.4-SNAPSHOT from DecentXML) using Maven. I’m in discussion with the people at Eclipse to get a download link for the binary.

Update: The project page now has a download link.


KDE4: Running ssh-agent at Login

21. August, 2011

Here is the recipe if you need to run ssh-agent when you log in. First, create a start-up script $HOME/.kde4/env/start-ssh-agent.sh

#!/bin/sh
eval `/usr/bin/ssh-agent`

To make sure the agent is killed when you log out, you need a script $HOME/.kde4/shutdown/kill-ssh-agent.sh

#!/bin/sh
/usr/bin/ssh-agent -k

Tested with KDE 4.7 on openSUSE 11.4.


Suffering From Nepomuk, too?

20. August, 2011

Nepomuk is probably a suitable name for the tool suite. The name is related to the  “Pumuckl” which was a gremlin that causes all kinds of grief and havoc. I think the name is suitable since that’s what the Nepomuk framework and all related tools always did for me: Cause grief.

Either they locked up my computer, crashed my KDE session or hogged some resource (CPU, RAM, hard disk). Just now I installed this sh…software on a new laptop where it effectively prevented me to log in.

Trying to be proactive, I created a bug. Vote for it if you hate Nepomuk, too.

Rationale: We have this stuff several years to grow up. Apparently, it’s not happening.


Dilbert: Making Room on Your Hard Drive…

19. August, 2011

Some messages you don’t want to hear from a software installer:

“Found credit card number … placing orders for other products you need … making room on your hard drive …”

From this old Dilbert strip.


HTML5 Boilerplate

18. August, 2011

There is a lot which you can do wrong when starting a new web site from scratch. The HTML5 Boilerplate project tries to help you there.

It contains a sane project layout, many useful JavaScript libraries, a default CSS that will make your page look the same on (almost) any device and smart CSS selectors that allow you to work around problems with browsers and devices which don’t behave well (small screen, IE6 bugs, no JavaScript enabled, you name it).


JavaScript Inheritance

17. August, 2011

Here is a comprehensive list of ways to support inheritance in JavaScript.


Useful JUnit Helper Method: ignoreUntil()

16. August, 2011

We all know the pattern: A test fails but you can’t fix it right away. What do you do? Let it stay red? @Ignore it?

All those approaches have drawbacks. Red tests make me nervous. But when I add an @Ignore, I sometimes forget to remove it in a timely fashion. Enter stage ignoreUntil():

/**
 * Ignore a test until a certain date.
 *
 * <p>This method will make the test silently fail
 * (as if it had been ignored) until a certain
 * date.
 *
 * <p>For documentation purposes, you can give a
 * message that explains why it's ignored.
 */
public static void ignoreUntil(
    String date_YYYY_MM_DD,
    String message
) {
    Date date;
    SimpleDateFormat format
        = new SimpleDateFormat( "yyyy-MM-dd" );
    try {
        date = format.parse( date_YYYY_MM_DD );
    } catch( ParseException e ) {
        throw new RuntimeException(
            "Can't parse date [" 
            + date_YYYY_MM_DD
            + "] using format "
            + format.toPattern()
        );
    }
    Assume.assumeTrue( new Date().after( date ) );
}

Usage:

@Test
public void someTest() throws Exception {
    ignoreUntil( "2011-09-15", "See issue #78" );
}

Happy testing!


Java Tools For Healthy Code

12. August, 2011

While any good developer makes sure that his code is healthy all the time *cough*, tools can be a lot of help.

Venkatt Guhesan has compiled a list of 11 tools that you should know about.