<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Manuel Klimek &#187; Uncategorized</title>
	<atom:link href="http://klimek.box4.net/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://klimek.box4.net/blog</link>
	<description>Dedicated to Software Development</description>
	<lastBuildDate>Wed, 01 Jul 2009 20:23:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Review: Rapid Development</title>
		<link>http://klimek.box4.net/blog/2009/07/01/review-rapid-development/</link>
		<comments>http://klimek.box4.net/blog/2009/07/01/review-rapid-development/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:23:35 +0000</pubDate>
		<dc:creator>klimek</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://klimek.box4.net/blog/?p=108</guid>
		<description><![CDATA[I just finished reading Steve McConnell&#8217;s Rapid Development: Taming Wild Software Schedules. Well, many times it was not exactly &#8220;reading&#8221;, more like &#8220;page-skipping&#8221;. Obvious. Obvious. Obvious. But every time I thought I knew what was coming there was something unexpected hidden inside this big recapitulation of Fred Brook&#8217;s findings. With big hard data pictures on [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float:left" src="http://ecx.images-amazon.com/images/I/41+sSYBlD9L._SL160_.jpg" alt="Rapid Development Cover" />I just finished reading Steve McConnell&#8217;s <a href="http://klimek.box4.net/blog/index.php?now_reading_author=steve-mcconnell&#038;now_reading_title=rapid-development-taming-wild-software-schedules">Rapid Development: Taming Wild Software Schedules</a>. Well, many times it was not exactly &#8220;reading&#8221;, more like &#8220;page-skipping&#8221;. Obvious. Obvious. Obvious. But every time I thought I knew what was coming there was something unexpected hidden inside this big recapitulation of Fred Brook&#8217;s findings. With big hard data pictures on the border. And then I&#8217;m horrified that I can relate to most of what is written, and that nothing&#8217;s really new to me any more. Even if I didn&#8217;t expect to read it from McConnell.</p>
<p>So the excitement of the days when I wrote stuff like <a href="http://klimek.box4.net/blog/2007/02/19/do-you-understand-xp/">Do You Understand XP?</a> is gone. Rapid Development is a good book that reviews every practice it preaches with a critical eye, but I&#8217;m not overly excited. Yes, I learned, again, that many so-called Agile practices are known for a long time. But hey, I knew that after reading the Mythical Man Month. Excitement is hard to find in books these days. If I only could find one of those thought-provoking books, that rips your universe apart.</p>
]]></content:encoded>
			<wfw:commentRss>http://klimek.box4.net/blog/2009/07/01/review-rapid-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Program Is Born: QCMake&#8217;s First Functional Test</title>
		<link>http://klimek.box4.net/blog/2007/11/02/a-program-is-born-qcmakes-first-functional-test/</link>
		<comments>http://klimek.box4.net/blog/2007/11/02/a-program-is-born-qcmakes-first-functional-test/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 22:17:36 +0000</pubDate>
		<dc:creator>klimek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://klimek.box4.net/blog/2007/11/02/a-program-is-born-qcmakes-first-functional-test/</guid>
		<description><![CDATA[When you write a GUI that is just a thin layer for an existing business layer and you don&#8217;t see how to integrate test fixtures into this business layer, you&#8217;ll be down in the dirty functional testing work very quickly. This happened to me today when I tried to write my first test for a [...]]]></description>
			<content:encoded><![CDATA[<p>When you write a GUI that is just a thin layer for an existing business layer and you don&#8217;t see how to integrate test fixtures into this business layer, you&#8217;ll be down in the dirty functional testing work very quickly. This happened to me today when I tried to write my first test for a small Qt facade object for cmake.</p>
<p>I started the test very enthusiastically: To test cmake I create a directory, cd into that directory, create a CMakeLists.txt and let cmake create a CMakeCache.txt. In the end I know that cmake ran when CMakeCache.txt exists.</p>
<pre class="code">
void QCMakeControlTest::shouldExecuteCMakeInTheCurrentDirectory()
{
  QDir currentDirectory;
  QDir testDirectory(currentDirectory.path() + "/ExecuteInCurrentDirectory");
  QVERIFY(currentDirectory.mkdir(testDirectory.dirName()));
  QVERIFY(QDir::setCurrent(testDirectory.path()));
}
</pre>
<p>I hit F5 and everything runs just fine. Once. The second time the directory ExecuteInCurrentDirectory already exists. Of course to have a nice and clean starting point the test must remove the test directory if it already exists. So I added:</p>
<pre class="code">
void QCMakeControlTest::shouldExecuteCMakeInTheCurrentDirectory()
{
  QDir currentDirectory;
  QDir testDirectory(currentDirectory.path() + "/ExecuteInCurrentDirectory");
  if(currentDirectory.exists(testDirectory.dirName()))
  {
    QVERIFY(currentDirectory.rmdir(testDirectory.dirName()));
  }
  QVERIFY(currentDirectory.mkdir(testDirectory.dirName()));
  QVERIFY(QDir::setCurrent(testDirectory.path()));
}
</pre>
<p>Green. Perfect. Now let&#8217;s create a CMakeLists.txt.</p>
<pre class="code">
void QCMakeControlTest::shouldExecuteCMakeInTheCurrentDirectory()
{
  QDir currentDirectory;
  QDir testDirectory(currentDirectory.path() + "/ExecuteInCurrentDirectory");
  if(currentDirectory.exists(testDirectory.dirName()))
  {
    QVERIFY(currentDirectory.rmdir(testDirectory.dirName()));
  }
  QVERIFY(QDir::setCurrent(testDirectory.path()));

  QFile cmakeLists("CMakeLists.txt");
  QVERIFY(cmakeLists.open(QIODevice::ReadWrite));
}
</pre>
<p>Green again. Once. The test fails the second time it&#8217;s executed:</p>
<pre class="code">
********* Start testing of QCMakeControlTest *********
Config: Using QTest library 4.3.2, Qt 4.3.2
PASS   : QCMakeControlTest::initTestCase()
FAIL!  : QCMakeControlTest::shouldExecuteCMakeInTheCurrentDirectory()
  'currentDirectory.rmdir(testDirectory.dirName())' returned FALSE. ()
..\..\..\..\..\Source\CMake\Source\QTDialog\qcmaketest\QCMakeControlTest.cpp(30) :
  failure location
PASS   : QCMakeControlTest::cleanupTestCase()
Totals: 2 passed, 1 failed, 0 skipped
</pre>
<p>Yep, no problem, all I need to do is to rmdir recursively. Just a quick glance into the Qt docs. But I found nothing. Well, it&#8217;s not too hard to implement a recursive rm -rf, but still&#8230; I was so sure that this function would be hidden somewhere that I spent more time googling and doc-reading than implementing it when I finally realized that I was on my own. So in the end the test looked a little bloated:</p>
<pre class="code">
#include "qcmaketest/QCMakeControlTest.h"

#include "qcmakeui/QCMakeControl.h"

bool removeRecursiveForced(QDir&#038; directory, const QFileInfo&#038; entry)
{
  if(!entry.isDir())
  {
    return directory.remove(entry.fileName());
  }
  QDir directoryEntry(entry.filePath());
  QList<QFileInfo> entries(directoryEntry.entryInfoList
    (QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot));
  for(int entryIndex = 0; entryIndex < entries.count(); ++entryIndex)
  {
    if(!removeRecursiveForced(directoryEntry, entries.at(entryIndex)))
    {
      return false;
    }
  }
  return directory.rmdir(entry.fileName());
}

void QCMakeControlTest::shouldExecuteCMakeInTheCurrentDirectory()
{
  QDir currentDirectory;
  QDir testDirectory(currentDirectory.path() + "/ExecuteInCurrentDirectory");
  if(currentDirectory.exists(testDirectory.dirName()))
  {
    QVERIFY(removeRecursiveForced(currentDirectory,
      QFileInfo(currentDirectory, testDirectory.dirName())));
  }
  QVERIFY(currentDirectory.mkdir(testDirectory.dirName()));
  QVERIFY(QDir::setCurrent(testDirectory.path()));

  QFile cmakeLists("CMakeLists.txt");
  QVERIFY(cmakeLists.open(QIODevice::ReadWrite));

  QCMakeControl qCMakeControl;
  qCMakeControl.configure();

  QFile cmakeCache("CMakeCache.txt");
  QVERIFY(cmakeCache.exists());
}

#include "QCMakeControlTest.moc"
</pre>
<p>At least I have an idea where this could lead me - a nice class to generate a clean cmake directory. But let's see whether I'll be right, perhaps YAGNI will finally get back at me. And if you know an easier way to delete a directory recursively with Qt, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://klimek.box4.net/blog/2007/11/02/a-program-is-born-qcmakes-first-functional-test/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Day The Mouse Broke</title>
		<link>http://klimek.box4.net/blog/2006/12/23/the-day-the-mouse-broke/</link>
		<comments>http://klimek.box4.net/blog/2006/12/23/the-day-the-mouse-broke/#comments</comments>
		<pubDate>Sat, 23 Dec 2006 15:19:09 +0000</pubDate>
		<dc:creator>klimek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://klimek.box4.net/blog/2006/12/23/the-day-the-mouse-broke/</guid>
		<description><![CDATA[My wife and I are visiting our families at Christmas. This morning I sat down at my mother-in-law&#8217;s computer in order to check my daily spam when the mouse broke. OK, it didn&#8217;t really break in the sense of the word &#8211; I just had to explain my mother-in-law that you have to charge rechargeable [...]]]></description>
			<content:encoded><![CDATA[<p>My wife and I are visiting our families at Christmas. This morning I sat down at my mother-in-law&#8217;s computer in order to check my daily spam when the mouse broke. OK, it didn&#8217;t really <i>break</i> in the sense of the word &#8211; I just had to explain my mother-in-law that you have to charge rechargeable batteries before using them in your wireless mouse.</p>
<p>So I put the batteries into the recharger and realized that while the batteries were powering up I had no mouse. Since not using the computer for a full day (my god) was no option, I had to figure out how to use Windows with nothing but a keyboard. The principle was not new to me, as I already controlled my Unix flavored operating systems (like emacs) with keyboard FSAs and never really missed anything. But on a Windows XP box this turned out to be a whole new experience.</p>
<p>First I remembered the &#8220;Windows Key&#8221;. I just realize that I don&#8217;t know what to do if you don&#8217;t have a Windows and a context key (first one left of the right control key) on your keyboard. Fortunately my keyboard got them. Anyway, the Windows key helped me to get Thunderbird and Firefox up and running. Thunderbird is really nice to control via keyboard. It&#8217;s intuitive, and while it&#8217;s not quite as comfortable as using your mouse, the basic task of classifying the spam mails into the spam folder was no problem.</p>
<p>Then I tried to use Firefox. At first this was rather awkward. Since the only keyboard control key I knew was the tab key, I tabbed endlessly through the user interface before I was able to extract the basic key combinations from various sources on the web:</p>
<ol>
<li><b>F6:</b> Change frame</li>
<li><b>Ctrl-L:</b> Address box</li>
<li><b>Ctrl-K:</b> Search box</li>
<li><b>Ctrl-W:</b> Close current tab</li>
<li><b>Ctrl-PageUp/PageDown</b> Previous/Next frame</li>
</ol>
<p>Equipped with my new knowledge I entered my Wordpress administration page and tried to start a blog entry. Don&#8217;t try this. It simply doesn&#8217;t work. I nearly tabbed my brain out of my head. So I needed a Firefox plug-in to save my day.</p>
<p>Searching for &#8220;keyboard&#8221; on the Firefox plug-in page revealed the NumberFox extension, which I couldn&#8217;t get to work, and the <a href="http://hah.mozdev.org/">Hit-A-Hint</a> extension. Hit-A-Hint worked great for me and I was able to do some serious browsing now. After a few minutes I stumbled across <a href="http://www.rudolf-noe.de/MouselessBrowsing.htm">Mouseless Browsing</a>. I couldn&#8217;t find this one at first, because you usually search for &#8220;keyboard&#8221; and not &#8220;mouse&#8221; if you actually lack a mouse.</p>
<p>All of the solutions above share the same common principle. For every link, button and edit field on a web page a number is shown. If you enter this number in a special finite automaton mode you can directly browse there without tabbing to death.</p>
<p>For full blown keyboard control Mouseless Browsing is better suited. You can use it from within edit fields and it has a consistent interface for switching between tabs. It even supports to select a link instead of following it, which makes Firefox show the link target in it&#8217;s status bar. But it feels a log more sluggish than Hit-A-Hint. </p>
<p>Hit-A-Hint is a quick and small solution, but you have to reenable it on every web page and the default configuration features the &#8220;h&#8221; as start key for your finite automaton, which is quite inconvenient if you want to enter &#8220;hello&#8221; into a text field.</p>
<p>While searching for firefox extensions that make my mousless life easier, I found the English and German dictionaries to get inline spell checking support in Firefox. I hope my blog entries will gain some quality with regards to spelling&#8230;</p>
<p>Hey, I wrote quite a lot today. This shows that with the right combinations of tools it&#8217;s easy to blog, search the web and use dictionaries all at once without a mouse. Praise the inventor of finite automaton theory!</p>
]]></content:encoded>
			<wfw:commentRss>http://klimek.box4.net/blog/2006/12/23/the-day-the-mouse-broke/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>e-Petition against election machines</title>
		<link>http://klimek.box4.net/blog/2006/11/14/e-petition-against-election-machines/</link>
		<comments>http://klimek.box4.net/blog/2006/11/14/e-petition-against-election-machines/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 20:00:25 +0000</pubDate>
		<dc:creator>klimek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://klimek.box4.net/blog/2006/11/14/e-petition-against-election-machines/</guid>
		<description><![CDATA[In their last elections, the USA managed to show the world that a missionary is not necessarily a role model. Germany is not the showpiece of political leadership, but at least we&#8217;ve got a working democracy &#8211; until recently, when they started to think about introducing &#8216;election machines&#8217;.
The problem with election machines is, that you [...]]]></description>
			<content:encoded><![CDATA[<p>In their last elections, the USA managed to show the world that a missionary is not necessarily a role model. Germany is not the showpiece of political leadership, but at least we&#8217;ve got a working democracy &#8211; until recently, when they started to think about introducing &#8216;election machines&#8217;.</p>
<p>The problem with election machines is, that you can always simply &#8217;switch&#8217; an election machine for a different machine that <b>looks exactly the same</b>. This way nobody (not even a highly paid technical expert) can say for sure that the vote is taken into account without messing with the hardware.</p>
<p>Of course such high level attacks can be detected afterwards by inspecting all machines. After all we can just redo the election, that would save us some big money, and would motivate many more people to vote.</p>
<p>And than there&#8217;s the &#8216;insider attack&#8217;. An underpaid software developer working for the election machine company who needs the money to pay an expensive medical operation for her terminally ill son. She has all the cryptographic keys and expert knowledge of the operational tests done during and after the election to modify the program &#8216;just a little&#8217; so that Mr. Money becomes chancellor.</p>
<p>And even if all those attacks could be eliminated &#8211; only a cryptographic expert would be able to understand and check those machines. The average German is not a mathematical genious. This will certainly boost voter participation.</p>
<p>Some Germans obviously remembered that democracy is all about participation of the people and filed an <a href="http://itc.napier.ac.uk/e-Petition/bundestag/view_petition.asp?PetitionID=294">e-Petition against election machines</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://klimek.box4.net/blog/2006/11/14/e-petition-against-election-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google codesearch &#8211; a new way to track copyright violations?</title>
		<link>http://klimek.box4.net/blog/2006/11/03/google-codesearch-a-new-way-to-track-copyright-violations/</link>
		<comments>http://klimek.box4.net/blog/2006/11/03/google-codesearch-a-new-way-to-track-copyright-violations/#comments</comments>
		<pubDate>Fri, 03 Nov 2006 19:38:24 +0000</pubDate>
		<dc:creator>klimek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://klimek.box4.net/blog/2006/11/03/google-codesearch-a-new-way-to-track-copyright-violations/</guid>
		<description><![CDATA[When I first tried google codesearch I was impressed. But then I tried to enter &#8220;&#160;sco&#160;&#8221; ibm. Follow the link and look at the first entry found &#8211; the file regexpI.h and read the comment at the top.
Ok, this is just a small header and I couldn&#8217;t find more information on SCO and IBM. But, [...]]]></description>
			<content:encoded><![CDATA[<p>When I first tried google codesearch I was impressed. But then I tried to enter <a href="http://www.google.com/codesearch?q=%22+sco+%22+ibm&#038;btnG=Search+Code">&#8220;&nbsp;sco&nbsp;&#8221; ibm</a>. Follow the link and look at the first entry found &#8211; the file regexpI.h and read the comment at the top.</p>
<p>Ok, this is just a small header and I couldn&#8217;t find more information on SCO and IBM. But, you can still search for <a href="http://www.google.com/codesearch?hl=en&#038;lr=&#038;q=disclosure+agreement&#038;btnG=Search">disclosure agreement</a>&#8230;</p>
<p>Is this a new way to track copyright violations?</p>
]]></content:encoded>
			<wfw:commentRss>http://klimek.box4.net/blog/2006/11/03/google-codesearch-a-new-way-to-track-copyright-violations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
