Archiv für

November, 2009

...

Fundstück: Das Nerd-Handbuch

kein kommentar

Manchmal ist es schon unheimlich, wieviel man über sich selbst in Artikeln von anderen wiederfinden kann. Mir geht es immer so, wenn ich Beschreibungen von Nerds lese… Zugegeben, ich bin vielleicht etwas spät, aber gerade habe ich das Nerd-Handbuch gefunden. Da liest man so schöne Dinge wie

A nerd needs a project because a nerd builds stuff. All the time. Those lulls in the conversation over dinner? That’s the nerd working on his project in his head.

Nerds are fucking funny. Your nerd spent a lot of his younger life being an outcast because of his strange affinity with the computer. This created a basic bitterness in his psyche that is the foundation for his humor.

Die meisten Eigenschaften bringe ich wohl auch mit: Monospace Fonts? Klar. Computerverliebt? ‘türlich. Informationshunger? Mehr Details bitte!

Sehr schön – und passend zur Relevanzdebatte – ist auch dieser Abschnitt:

Your nerd’s insatiable quest for information and The High has tweaked his brain in an interesting way. For any given piece of incoming information, your nerd is making a lightning fast assessment: relevant or not relevant? Relevance means that the incoming information fits into the system of things your nerd currently cares about.

So scheint das bei mir auch zu funktionieren. Geburtstage werden quasi schon vor dem Zuhören rausgefiltert, während die Länge einer Seemeile direkt in das Langzeitgedächtnis übergeht.

Und danach gleich dieser treffende Satz:

Your nerd might come off as not liking people. Small talk. Those first awkward five minutes when two people are forced to interact. Small talk is the bane of the nerd’s existence because small talk is a combination of aspects of the world that your nerd hates.

100% zutreffend. Ich sag lieber gar nichts, statt irgendwelchen Small Talk von mir zu geben. Und da bin ich konsequent, also sollte niemand mehr als “Ja” oder “Nein” von mir erwarten, wenn Small Talk betrieben wird. Allerdings hab ich kein Problem mit Vorträgen, die quasi als Anti-Nerd-Waffe überhaupt gelten. Gut, Aufregung zeigt sich auch bei mir, aber in vertretbaren Ausmassen. Und wenn’s dann noch ein Thema ist, das mir gefällt und mit dem ich mich wirklich beschäftige, läuft der Vortrag quasi von selbst.

Es gibt dann noch ein paar Worte zu Körperertüchtigung. Mit Hinweis auf Graphen zu Gewichtsverlauf, Trainingsplan usw… ;-)

Alles in allem ein sehr treffender Artikel. Unbedingt lesen, wenn ihr ein Nerd seid – oder gerade versucht, einen Nerd zu verstehen.

Single Leg Squats, oder: Einbeinige Kniebeugen

2 kommentare

Weil ich heute nachmittag auf Dienstreise gehe und heute wieder sehr früh wach war, bin ich direkt ins Fitnessstudio gefahren und hab mein Beintraining erledigt. Auf diese Weise muss nichts ausfallen. Das Training am Freitag verschiebe ich kurzerhand auf Samstag morgen. Leider ist mir aber durch meine kurze Erkältung der Trainingplan verrutscht, d.h. ich hatte diese Woche Kreuzheben und Kniebeugen mit nur 1 Tag Erholung dazwischen… das hab ich bei den Single Leg Squats auch zu spüren bekommen, mein Rücken war einfach noch etwas erschöpft.

Trotzdem hab ich mich steigern können, und die Single Leg Squats werden immer mehr zu meiner Lieblingsübung und werden wohl auch auf längere Zeit die normalen Kniebeugen ersetzen. Der Kniff dabei ist die bessere Form für meinen Rücken, da ich anscheinend extrem kurze hintere Beinsehnen habe. Jedenfalls kippe ich sehr schnell hinten über, wenn ich in die Hocke gehe und dementsprechend weit muss ich mich auch bei Kniebeugen nach vorne lehnen. Mit SL Squats kann ich meinen Rücken fast senkrecht halten, das hintere Bein lasse ich dabei (noch) auf dem Boden und benutze es als Stütze und Gleichgewichtshilfe.

Das Gewicht hat sich bezogen auf die normalen Kniebeugen deutlich halbiert, was aber auch zu erwarten war. ;-) Trotzdem ist das Erschöpfungsgefühl besser und während der Übung merke ich die Belastung eindeutig auf den Oberschenkeln und dem Gluteus Maximus.

Ach so, und das Fitnessstudio war leer. LEER. Ohne irgendwelche Deppen. Vielleicht sollte ich doch wieder auf ein frühes Training wechseln…

Ist Google Chrome OS der Desktopkiller?

kein kommentar

Nico schreibt treffend über die zukünftige Rolle von Googles Chrome OS und ich kann nichts anderes tun, als mich anzuschliessen: Chrome OS ist der Anfang vom Niedergang des Desktops.

Geräte mit Chrome OS werden in Zukunft für den Durchschnittsnutzer den vollen Rechner ersetzen, so wie Laptops den Desktoprechner ersetzt haben. Natürlich gibt es noch Desktoprechner, aber das sind doch a) Gaming-Maschinen oder b) Spezielrechner für leistungshungrige Software. Nico bringt auch das Beispiel von Salesforce.com und nicht nur diese Firma ist ein Beispiel, was alles in der Cloud laufen kann und wird.

Der Durchschnittsnutzer ist auch gar nicht daran interessiert, wo seine Daten liegen – und ich stimme Nico zu: Der Durchschnittsnutzer hat noch nie ganz verstanden, was ein Desktop ist und wo welche Daten liegen. Es gibt Einzelfälle, die ihre Daten selbst unter Kontrolle haben möchten, aber hört euch doch einfach mal in eurem Bekanntenkreis um: Wer hat da wirklich Interesse dran? Und wer will einfach ein Gerät, das man einschalten und sofort nutzen kann?

Ich denke, dass solche always on-Geräte den normalen Rechnern ordentliche Konkurrenz machen werden. Der Boom auf dem Smartphonemarkt zeigt auch in diese Richtung und es wird weiter gehen. Windows wird nicht unbedingt aussterben, aber es wird weitere Konkurrenz geben.

Testing the coverage metric of JMockIt

4 kommentare

After yesterdays article about Code Coverage terminology I thought more about the code coverage metric JMockIt uses. I created a simple class to get more insights:

CoverMeSimple.java

package de.kopis.katas;

public class CoverMeSimple {
    public int simple(int x, int y) {
        int z = x;

        if(y > x)
            z = y;
        z *= 2;

        return z;
    }
}

This is as simple as it gets. The example is taken from the Wikipedia page on Kontrollflussorientierte Testverfahren again. For 100% statement coverage you only need one test case, in which y > x. Then all statements are executed and you have 100% statement coverage. So I wrote this little unit test:

CoverMeSimpleTest.java

package de.kopis.katas;

import static org.junit.Assert.assertEquals;

import mockit.integration.junit4.JMockit;

import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(JMockit.class)
public class CoverMeSimpleTest {
    @Test
    public void testSimple() {
        CoverMeSimple cm = new CoverMeSimple();
        int result = cm.simple(1, 2);
        assertEquals(4, result);
    }
}

And here is the resulting JMockit coverage report:

JMockit Coverage Report of CoverMeSimple

JMockit Coverage Report of CoverMeSimple

JMockit detailed Coverage Report on CoverMeSimple

JMockit detailed Coverage Report on CoverMeSimple

As you can see, JMockit tells us that every single statement is executed, exactly 1 time, with this test case. And that’s exactly what I understand as statement coverage and it is in full compliance to the ISTQB terminology.

Now, to make my point really clear, let me change the class as follows:

package de.kopis.katas;

public class CoverMeSimple {
	public int simple(int x, int y) {
		int z = x;

		if(y > x) {
			z = y;
		} else {

		}

		z *= 2;

		return z;
	}
}

I added the empty ELSE statement that I omitted first. And I run JMockit again to get a new coverage report:

JMockit Coverage report for modified CoverMeSimple

JMockit Coverage report for modified CoverMeSimple


JMockit detailed Coverage report for modified CoverMeSimple

JMockit detailed Coverage report for modified CoverMeSimple

This is not 100% branch coverage, ISTQB certified or not. ;-) My point on this is, if you want to use a tool to verify your testing requirements, make sure that you know what the tool is measuring.

And make sure you read the discussion thread in the JMockit users group.

*Update* I created a Cobertura coverage report for CoverMeSimple now:

CoverMeSimple Cobertura coverage report

CoverMeSimple Cobertura coverage report

Code Coverage – what are we talking about?

1 kommentar

Today an interesting discussion about the definition of code coverage took place in the JMockit Users group. I hope my english was good enough to follow the details and maybe contribute something useful. ;-)

There was a bit of a confusion about the kind of coverage analysis JMockIt does for its coverage reports. For me, as an ISTQB certified tester, the german terms Anweisungsüberdeckung, Zweigüberdeckung and Pfadüberdeckung have a clear meaning. It’s based on the ISTQB definitions. The german Wikipedia article Kontrollflussorientierte Testverfahren has a good explanation of all the different coverage analysis. (Including the Bedingungsüberdeckung, which you can have the most fun with. And with fun I mean sleepless nights of whitebox testing… ;-) )

Unfortunatly most of the tools doing some kind of code coverage analysis try to explain their metrics without the use of control flow graphs or any other kind of graphical representation. I think this adds to the confusion.

Using real world terms like branch and path don’t help to clear things up either. That 100% branch coverage means empty branches too isn’t very clear for the beginner who thinks of a branch as a real world thing.

After all this discussion shows once again, that you really have to know the metrics you use or chance is good you’re measuring the wrong things.