<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
		<title>Peanut Butter Logic</title>
		<id>urn:uuid:cc149f90-9d99-45ab-8816-79c9893b7ca1</id>
		<updated>2010-07-08T22:02:47+10:00</updated>
		<link rel="self" href="http://www.muftor.com/blog/atom.xml"/>
  <entry>
    <id>urn:sha1:9ab90438560df39f8e1f44cbe0904777dd4e204a</id>
    <updated>2010-07-02T00:00:00+10:00</updated>
    <title type="text">The 4096 bytes per sector transition</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/the_4096_bytes_per_sector_transition.html" title="The 4096 bytes per sector transition"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>I bought a 1.5Tbyte My Book Essential external USB drive from Western
Digital. The box does not say what drive is inside and the USB
interface does not reveal it either. Creating the ext3 file system
took surprisingly long. I remember reading about the performance hit
of the new WD Caviar drives, but I didn't expect to be affected by
this because I thought the USB interface would be the bottleneck
anyway, which is an incorrect assumption.</p>

<p>Hard disk drive manufacturers are in transition from 512 bytes per
sector to 4096 bytes per sector. The larger sector size is referred to
as <a href="http://www.wdc.com/en/products/advancedformat/">Advanced Format</a> or <a href="http://www.bigsector.org/">Bigsector</a>. Big words to create
awareness for the transition.</p>

<p>I tried aligning the partition as described in <a href="http://www.osnews.com/story/22872/Linux_Not_Fully_Prepared_for_4096-Byte_Sector_Hard_Drives">this</a> excellent
article. I did some tests, with and without alignment. The results are
below.</p>

<h2>Difference for large files:</h2>

<h3>Without alignment:</h3>

<pre><code>epronk@godiva:~$ time cp largefilemedia/disk/

real  10m44.546s
user    0m0.332s
sys    0m32.430s
</code></pre>

<h3>With alignment:</h3>

<pre><code>epronk@godiva:~$ time cp largefile /media/disk/

real   8m49.902s
user    0m0.412s
sys    0m36.746s
</code></pre>

<h2>Difference for raw writes:</h2>

<p>These are raw write operations on an empty disk, but with taking the
file system (ext3) into consideration. The difference with copying a
large file is there is no reading of a source file part of the
operation.</p>

<h3>Without alignment:</h3>

<pre><code>epronk@godiva:~$ time dd if=/dev/zero of=/media/disk/test bs=1024 count=$[1024*1024]

1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 39.225 s, 27.4 MB/s
</code></pre>

<h3>With alignment:</h3>

<pre><code>epronk@godiva:~$ time dd if=/dev/zero of=/media/disk/test bs=1024 count=$[1024*1024]

1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 32.5642 s, 33.0 MB/s
</code></pre>

<h2>3.4Gbyte of small/medium sized files:</h2>

<p>This is a collection of small files (source files / object files /
libraries etc.) which I think is more typical usage of the disk.</p>

<h3>Without alignment:</h3>

<pre><code>epronk@godiva:~$ time cp -a src /media/disk/

real   48m16.739s
user     0m2.996s
sys     0m48.459s
</code></pre>

<h3>With alignment:</h3>

<pre><code>epronk@godiva:~$ time cp -a src /media/disk

real    7m59.009s
user     0m3.300s
sys     0m54.071s
</code></pre>

<h2>The partition table:</h2>

<p>This is what my partition table for the drive looks like. The
important part is the first partition needs to start at sector 64 (this has
to be a multiple of 4098/512 = 8) instead of sector 63 which is the default.</p>

<pre><code>Expert command (m for help): p

Disk /dev/sdb: 255 heads, 63 sectors, 182315 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 00   1   1    0 254  63 1023         64 2928890411 83
 2 00   0   0    0   0   0    0          0          0 00
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00
</code></pre>

<h2>Conclusion:</h2>

<p>If you decide to re-partition and format the drive you need to be aware of this. The difference for raw writes or large files is significant, but for copying a large set of files the difference is huge. A <em>factor 6</em> faster was a surprising result.</p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:5a3ac8d63fa6c035b268e2932f34c2136d78c8f0</id>
    <updated>2010-06-18T00:00:00+10:00</updated>
    <title type="text">Self-rolled blog generator using Mako</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/self-rolled_blog_generator_using_mako.html" title="Self-rolled blog generator using Mako"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>Over the last few days I've moved my blog from wordpress to a
self-rolled blog software written in Python. The reason for moving
away from <a href="http://wordpress.org/">WordPress</a> is that I want to be able to edit a local
copy of my content using an editor instead of doing it inside a
browser. I also want to be able to use version control and tools like
grep.</p>

<p>Before doing this I've looked at some existing systems and I started
to wonder more and more how hard it would be to roll my own blog
system, of course making use of existing components that do the work.</p>

<p>The first alternative I looked at was <a href="http://ikiwiki.info/" title="wiki compiler">ikiwiki</a>, a wiki
compiler. Ikiwiki generates static content from text files using
markdown. You can set it up as a blog system and has a module for
leaving comments. I want to use a comment module but had a bad
experience with wiki and blog spam. More over, my provider uses
mod_perl which is not yet supported by ikiwiki.</p>

<p>Then, I came across <a href="http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/" title="blogging with git emacs and jekyll">this</a> post about blogging with Git, Emacs, and
<a href="http://jekyllrb.com/" title="Jekyll is a blog-aware, static site generator in Ruby.">Jekyll</a>. Jekyll is written in Ruby and uses the Liquid template
system. The Python port of Jekyll is named <a href="http://github.com/blog/342-hyde-the-python-static-site-generator">Hyde</a> and uses Django
templates. Anyway, this combination of tools seems powerful, but I got
overwhelmed with the amount of technology I'm not familiar with. Yet,
in the back of my mind I was still convinced I could make it simpler
than that. So I though to myself, why not start from scratch and use a
template system I am familiar with. And that's how <a href="http://www.makotemplates.org/">Mako</a> enters
the picture. I started playing with Mako and with 50 lines of Python
and a few simple templates I now have a blog with the most basic
features.</p>

<p>Features:</p>

<ul>
<li>Posts are stored as individual <a href="http://daringfireball.net/projects/markdown/">Markdown</a> files.</li>
<li>A home page with the first n posts.</li>
<li>Integrates with <a href="http://disqus.com/">Disqus</a> comment system.</li>
<li>W3C compliant. Checked as XHTML 1.0 Strict.</li>
</ul>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:6afa26850bbefff9c9336a095a1a6db49de89a1e</id>
    <updated>2009-05-09T00:00:00+10:00</updated>
    <title type="text">Windows Vista refund or credit?</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/windows_vista_refund_or_credit?.html" title="Windows Vista refund or credit?"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>I live in Australia and decided to reject my Vista license. My old notebook was a dual boot system with Linux and Windows XP. I rarely used Windows XP. The only Windows application I used was Skype. After Skype made my webcam work with their Linux version I never booted Windows again. For my new laptop I didn&#8217;t want to pay the <a href="http://tuxmobil.org/ms_tax.html">Windows tax</a> again.</p>

<p>My email to Lenovo:</p>

<blockquote><p>Hello,</p>
<p>On 17 October 2008 I purchased a Lenovo Thinkpad T400.<br />

I am very satisfied with the Lenovo hardware product.</p>
<p>The first time I started the computer it asked me to agree to the<br />
license terms for Vista.</p>
<p>The license terms for Vista states the following:<br />
&#8220;By using the software, you accept these terms. If you do not accept<br />
them, do not use the software. Instead, contact the manufacturer or<br />
installer to determine their return policy for a refund or credit.&#8221;</p>
<p>The Lenovo part of the terms states the following:<br />
&#8220;IF YOU AQUIRED THE PROGRAM(S) PRELOADED ON A LENOVO PRODUCT, YOU<br />

MAY CONTINUE TO USE THE PRODUCT, BUT NOT ANY OF THE PROGRAM(S)<br />
COVERED UNDER THIS LICENSE AGREEMENT&#8221;</p>
<p>I did not accept these terms and took a picture of the screen for reference.<br />
I have not accepted the terms because I do not use Windows Vista, but Linux.<br />
I have not used it and removed Vista from the system by overwriting the<br />
partition table and installed Linux on my system.<br />
I have taken pictures from all steps to prove that I have in fact<br />
removed it.</p>
<p>I want to ask Lenovo to give me a refund or credit for the Windows Vista<br />

License. In a recent case Lenovo has offered a customer 130 USD for a<br />
refund. In another case HP payed 200 USD for a refund.</p>
<p>I am willing to accept a credit which I can use to order accessories<br />
from www.lenovo.com/essentials.</p>
<p>details:</p>
<p>I have purchased my Lenovo from Phil&#8217;s Computer Supplies in Melbourne<br />
and registered my product online.</p>
<p>Lenovo Thinkpad T400<br />

Product ID : 27652KM<br />
S/N ** ***** **/**</p>
<p>Windows Vista Business OEMAct<br />
Lenovo Singapore<br />
product key *****-*****-*****-*****-*****</p>
<p>Please take a look at this article:<br />
<a href="http://www.ynetnews.com/articles/0,7340,L-3632861,00.html">http://www.ynetnews.com/articles/0,7340,L-3632861,00.html</a></p>
<p>I hope to hear from you soon.</p>
<p>Regards,<br />

Eddy Pronk</p></blockquote>

<p>The reply from Lenovo CARE</p>

<blockquote><p>Hi Eddy,</p>
<p>In regards to this issue with the Microsoft Operating System Software that is pre installed in your system.</p>
<p>I&#8217;ve consulted my management on this and have been informed that we are unable to provide you a refund on the software mentioned above.</p>
<p>I would like to refer you to the policy in accordance to the corresponding issue which states that should the customer refuse to accept the Microsoft license, we will not refund the cost of the Microsoft license, and we generally do not provide refunds to items that are components/part of a package.<br />
This is due to the license itself is an OEM version and it is not able to be installed in other machine if we were to do so.</p>
<p>I hope the explaination would be acceptable due to our Policy.</p></blockquote>

<blockquote><p>Hi &lt;name here&gt;,</p>
<p>Regarding issue *******.<br />
I am not happy with the outcome. I am looking at my options for legal<br />
action. Please provide me with the contact details of your management and<br />
the contact details of the department handling legal matters in Australia.</p>
<p>Please refer to this court case which resulted in a settlement.<br />
http://www.ynetnews.com/articles/0,7340,L-3632861,00.html</p>
<p>Regards,<br />

Eddy Pronk</p></blockquote>

<p>After forwarding my initial email to their legal counsil I received the following:</p>

<blockquote><p>Thanks for your mail Eddy.  As I am sure you are aware our policy is not to give refunds for MS licences.  In my view this policy is justified and supported at law.<br />
I will find out if we are prepared to give you a credit, as opposed to a refund, for other Lenovo products and will get back to you asap.  Did you have any particular accessories in mind?</p></blockquote>

<p>Later I received this from Lenovo CARE:</p>

<blockquote><p>Hi Eddy</p>
<p>I was engaged by &lt;name here&gt; (legal counsel from Lenovo) to offer you a credit of AUD$200.<br />
Hope to reach out to you again today.</p>

<p>Stay in touch.</p></blockquote>

<p>I could spend this credit on Lenovo products. I have read about people receiving a refund, but to be fair it does say &#8220;refund OR credit&#8221;.</p>

<p>Read more about the Windows-Tax Refund at <a href="http://tuxmobil.org/ms_tax.html">TuxMobil</a> and <a href="http://wiki.fsfe.org/Windows-Tax_Refund">fsfe</a>.</p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:2395cbe79d73e78a6450ca554e1e678ca247272f</id>
    <updated>2008-07-07T00:00:00+10:00</updated>
    <title type="text">FreeTDS driver in libdbi</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/freetds_driver_in_libdbi.html" title="FreeTDS driver in libdbi"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>A few years ago I&#8217;ve used libdbi in a C++ application to talk to MySQL and SQLite. At the time there was not much development being done in libdbi. In my current job we use Sybase on Solaris and I wanted to do development on one of their applications on Linux. I tried libdbi with the freetds driver.</p>

<p>There was a problem with conversion of VARCHAR to C string. If a field contained exactly the maximum number of characters specified by VARCHAR, the conversion would fail because there was not enough allocated to store the trailing 0 character.<br />
I&#8217;ve submitted patches to both libdbi-drivers and freetds. The patch in freetds was not accepted but did result in some changes in the code doing the conversion. A second patch in libdbi-drivers fixed the problem.</p>

<p><a href="http://article.gmane.org/gmane.comp.db.libdbi.drivers/221">patch 1</a><br />

<a href="http://article.gmane.org/gmane.comp.db.libdbi.drivers/225">patch 2</a><br />
<a href="http://lists.ibiblio.org/pipermail/freetds/2008q3/date.html">discussion on freetds list</a></p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:6f323fde9f4d8ce082cf9021809d247bfed6d088</id>
    <updated>2008-07-05T00:00:00+10:00</updated>
    <title type="text">Scuttle Firefox 3 Extension for social bookmarking</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/scuttle_firefox_3_extension_for_social_bookmarking.html" title="Scuttle Firefox 3 Extension for social bookmarking"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>Scuttle is a Free Software alternative for services like del.icio.us. It has a plug-in for Firefox which is now available for Firefox 3.</p>

<p><a href="http://moneybaron.org/2008/05/21/scuttle-firefox-3-extension/">Scuttle Firefox 3 Extension</a><br />
<a href="http://www.linux.com/articles/53231">Social bookmarking with Scuttle</a><br />
<a href="http://www.muftor.com/scuttle/">My Scuttle</a></p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:317b85d3e2563fb47920f5b6ab7f869310e83378</id>
    <updated>2008-07-05T00:00:00+10:00</updated>
    <title type="text">CITCON Asia-Pacific 2008 Melbourne Australia</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/citcon_asia-pacific_2008_melbourne_australia.html" title="CITCON Asia-Pacific 2008 Melbourne Australia"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>Last weekend I went to CITCON (Continuous Integration and Testing Conference) which was held in Jasper Hotel, Melbourne.<br />
Some thoughts about what we can do with the things I heard at this conference:</p>

<p>Get testers and product managers involved in writing acceptation tests for stories:</p>

<ul>
<li>By using something like Fit and Fitnesse.</li>
<li>Write test cases for stories in a human readable format and execute them automatically.</li>
<li>Make the automated integration tests more accessible by improving reporting so it is easier to read what the tests are really doing.</li>
<li>Separate tests &#8220;what&#8221; and fixtures &#8220;how&#8221;.</li>

</ul>

<p>About unit tests I heard some interesting statements:</p>

<ul>
<li>Fast running tests are unit tests. Slow running tests are integration tests.</li>
<li>If you can&#8217;t run 100 test per second you&#8217;re doing it wrong.</li>
<li>Unit test don&#8217;t touch the filesystem and have stuff like databases mocked out.</li>
</ul>

<p>A lot of projects suffer from problems with performance testing.</p>

<ul>

<li>not doing any</li>
<li>deploy systems a production environment where load is 50 to 500 times higher then tested.</li>
</ul>

<p>Measure test coverage to find out:</p>

<ul>
<li>How confident we should really feel about having automated tests.</li>
<li>How we can reduce duplication of work between automated tests and QA testing.</li>
<li>Measure complexity as part of the automated build to find out where refactoring would help to increase test coverage.</li>
</ul>

<p>Record and playback on protocol level is a common practice for performance testing and reproducing production problems. I&#8217;ve been doing this kind of stuff recently</p>

<p>I can recommend going there next year. This conference is free.</p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:52271e7dc959ea655389208a6cc4b2a8268fd189</id>
    <updated>2008-05-03T00:00:00+10:00</updated>
    <title type="text">My new keyboard</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/my_new_keyboard.html" title="My new keyboard"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>This week I received my ergonomic  <a href="http://www.maltron.com/">Maltron</a> keyboard. I bought it as a preventative measure for RSI. If your hands or wrists are giving you warning signals, consider one of these. I&#8217;m currently doing the online training course and hope to switch over within a week.</p>

<p><img src="images/maltron.jpg" alt="black maltron keyboard"/></p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>
  <entry>
    <id>urn:sha1:047ed9bd0a9e01c4f3607b2d8b4c98d90f5d7d3d</id>
    <updated>2008-04-24T00:00:00+10:00</updated>
    <title type="text">Switched from Ubuntu to Debian Testing</title>
    <link rel="alternate" type="text/html" href="http://www.muftor.com/blog/switched_from_ubuntu_to_debian_testing.html" title="Switched from Ubuntu to Debian Testing"/>

    <content type="xhtml"><div xmlns='http://www.w3.org/1999/xhtml'><p>This week I installed Debian on my notebook just to find out how this would be different. My first attempt to use Debian was in 2000 with the release of &#8216;potato&#8217;. I installed &#8216;Etch&#8217; using &#8216;expertgui&#8217;. My HP Pavillion dv1159ea has &#8220;Intel PRO/Wireless 2200BG&#8221; which was not installed.</p>

<p>sudo apt-get install ipw2200-modules-2.6.18-6-686</p>

<p>the dmesg output said something like:</p>

<p>ipw2200: ipw2200-bss.fw request_firmware failed: Reason -2</p>

<p>This means the driver tries to send the firmware file to the device, which is not being distributed by Debian.</p>

<p>http://ipw2200.sourceforge.net/README.ipw2200 explains how to obtain a working firmware. After rebooting, the wireless worked.</p>

<p>I did a dist-upgrade to lenny (testing) which should be stable enough for my usage.</p>
</div></content>
        <author>
      <name>Eddy Pronk</name>
    </author>
  </entry>

</feed>
