<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>KainX.Org - Articles</title>
        <description><![CDATA[KainX.Org - RSS Feed]]></description>
        <link>http://www.kainx.org/articles/</link>
        <lastBuildDate>Fri, 10 Sep 2010 08:30:27 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <language>en-us</language>
        <managingEditor>editor@kainx.org</managingEditor>
        <webMaster>webmaster@kainx.org</webMaster>
        <item>
            <title>Merging Traffic</title>
            <link>http://beta.kainx.org/articles/4</link>
            <description>Merging multiple lanes into a single lane is a challenge that seems overwhelming to many drivers on the road.  There are simple, straightforward rules one can follow to maintain maximum efficiency and help alleviate slowdown and delays while causing minimal road rage and inconvenience to other drivers.  It would seem that the average driver on the road today is unaware of these rules, so allow me to spell them out for you for the benefit of myself and the rest of the driving public.&lt;br/&gt;&lt;br/&gt;&lt;h1&gt;Freeway On-Ramps&lt;/h1&gt;Sloped downhill whenever possible, the acceleration ramps are for exactly that &amp;mdash; acceleration.  The most dangerous person on an on-ramp is the moron who puts their turn signal on and slows down, apparently waiting for someone already on the highway to slow down and let them in.  If the people already on the highway were supposed to slow down, they'd put up stoplights and make it an intersection.  The whole point is for you to get up to proper highway speed &lt;i&gt;on the ramp&lt;/i&gt; so that by the time you need to merge, nobody has to slow down for you.&lt;br/&gt;&lt;br/&gt;If the ramp is short, and you have to floor it to get up to speed, do it.  You are far more likely to cause an accident by merging too slowly than by speeding up quickly.  If there's an asshole who won't move over and won't let you in, don't be afraid to use a little bit of the shoulder if needed to get ahead.  Only slow down when absolutely necessary.&lt;br/&gt;&lt;br/&gt;If the on-ramp happens to be part of a clover-leaf (meaning that the acceleration lane for you turns into a deceleration lane for people exiting, and then subsequently the exit ramp), and if you encounter exiting traffic, the situation must be handled carefully.  Try to position your vehicle in between two exiting vehicles so that you can zipper (i.e., alternate).  If the exiting vehicle is even with you or behind you, speed up; if they're in front of you, slow down, but speed up if they slow down.  In general, you need to be speeding up and moving over, and they need to be slowing down and moving over.&lt;br/&gt;&lt;br/&gt;&lt;h1&gt;Freeway Off-Ramps&lt;/h1&gt;&lt;br/&gt;&lt;h1&gt;Accidents and Construction Zones&lt;/h1&gt;&lt;br/&gt;</description>
            <author>KainX</author>
            <pubDate>Sun, 23 May 2010 17:06:00 +0100</pubDate>
        </item>
        <item>
            <title>Speed</title>
            <link>http://beta.kainx.org/articles/7</link>
            <description>Apart from some limited access highways, speed limits have been relatively unchanged for over 30 years now.  The current speed limits were assigned before things like anti-lock brakes and traction control had even been heard of.  Roads are safer and cars are safer, but our speed limits haven't kept up.  Why is that?&lt;br/&gt;&lt;br/&gt;Doggedly adhering to an obsolete set of laws is really no different from obeying those &quot;weird/little-known&quot; laws every state has:  it just doesn't make sense.  I guarantee you there aren't too many Texans abiding by the &quot;take no more than three sips of beer at a time while standing&quot; law, or people in Alabama consciously abstaining from games of Dominoes on Sundays.  Silly, obsolete laws should be neither adhered to nor enforced.  Unfortunately, the law enforcement community hasn't figured this simple fact out yet.&lt;br/&gt;&lt;br/&gt;So how fast &lt;i&gt;should&lt;/i&gt; you drive?  That depends on the location and conditions.  Rule #1 is to keep pace with traffic when you're driving in traffic.  If you're doing 55 in a 55 zone while everyone else is doing 80, you're far more likely to cause an accident than if you were doing 80 too.  If there's no traffic around, 10-15mph over the posted speed limit is pretty reasonable, up to a limit of 85 (unless you're on a really long, really straight, really level section of highway).  Most street vehicles start becoming unstable around 85mph in the presence of wind, turns, etc.&lt;br/&gt;&lt;br/&gt;In residential areas, 35-40 is safe for wider streets while 25 is good for the narrower ones.  On curves that have yellow speed advisory signs, doing more than 5-10mph above that number requires a car with very good cornering and good tires.  If it's raining, stick to the speed limit or slightly below in curves and only slightly above on other roads; if some other driver does something stupid (which they often do), you'll need the extra room to stop.&lt;br/&gt;&lt;br/&gt;In the case of snow, all bets are off.  Regular powder snow isn't any worse for traction than rain (sometimes better, even), but if the snow is on top of ice, you're going to wind up in a world of hurt if you speed too much.  One really good way to get used to driving in the snow and ice is to find an abandoned parking lot, or a lot at night or after store hours, and practice stops, starts, and turns.  A little experience goes a long way on slippery pavement.&lt;br/&gt;&lt;br/&gt;&lt;h1&gt;Tailgating&lt;/h1&gt;&lt;br/&gt;</description>
            <author>KainX</author>
            <pubDate>Sun, 18 Apr 2010 16:10:00 +0100</pubDate>
        </item>
        <item>
            <title>Package Maintenance with Mezzanine</title>
            <link>http://beta.kainx.org/articles/6</link>
            <description>Mezzanine is a set of software tools created to make building and maintaining software packages as simple and efficient as possible.   It is currently used for maintaining numerous projects from small, self-contained packages to entire distributions.  Mezzanine forms the backbone of the package management and build system for &lt;a class=&quot;external&quot; href='http://www.caoslinux.org/'&gt;cAos Linux&lt;/a&gt;, and while this article will focus primarily on using Mezzanine with cAos, its information can be extended to numerous other uses.&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;maketoc&quot;&gt;&lt;h3&gt;Page Contents&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#TheSourcePackageModuleFormat&quot;&gt;The Source Package Module Format&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#BuildingPackages&quot;&gt;Building Packages&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#LocalMode&quot;&gt;Local Mode&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#UsingSCM&quot;&gt;Using SCM&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#ChrootedBuilds&quot;&gt;Chrooted Builds&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#HintsAndBuildReqs&quot;&gt;Hints And BuildReqs&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#ParallelBuildsandBuildSystems&quot;&gt;Parallel Builds and Build Systems&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#UpdatingSPMswithNewSources&quot;&gt;Updating SPMs with New Sources&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#CreatingSRPMsFromTarArchives&quot;&gt;Creating SRPMs From Tar Archives&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#ThePDRFormat&quot;&gt;The PDR Format&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#ProblemsAndTroubleshooting&quot;&gt;Problems And Troubleshooting&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#MezzanineCommands&quot;&gt;Mezzanine Commands&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;a name=&quot;TheSourcePackageModuleFormat&quot;&gt;&lt;/a&gt;&lt;h1&gt;The Source Package Module Format&lt;/h1&gt;&lt;br/&gt;Mezzanine uses a simple storage format called SPM. SPM stands for Source Package Module, and the reason for this simple yet useful format is to group (yet keep distinct) three separate items: the pristine source code, the patches applied to that source code, and instructions for building the package (in the case of RPM packages, the spec file).&lt;br/&gt;&lt;br/&gt;The top-level directory, called the &lt;b&gt;module&lt;/b&gt;, generally has the same name as the package (e.g., &lt;tt&gt;perl&lt;/tt&gt;).  The module contains up to 3 subdirectories:  The &lt;b&gt;source&lt;/b&gt; is stored in a directory called &lt;tt&gt;S&lt;/tt&gt;, the &lt;b&gt;patches&lt;/b&gt; are stored in a directory called &lt;tt&gt;P&lt;/tt&gt;, and the &lt;b&gt;spec file&lt;/b&gt; is stored in a directory called &lt;tt&gt;F&lt;/tt&gt; (for spec &lt;b&gt;f&lt;/b&gt;ile, as the 's' in &quot;spec&quot; was already taken for &lt;b&gt;s&lt;/b&gt;ources).&lt;br/&gt;&lt;br/&gt;Note that not all directories need to exist.  Packages without patches, for example, do not require a &lt;tt&gt;P&lt;/tt&gt; subdirectory.  In particular, if you check out the SPM from CVS, only directories that have files in them will be created.&lt;br/&gt;&lt;br/&gt;Once stored in a format Mezzanine can recognize, such as SPM, most common tasks such as building and patching are accomplished quickly and efficiently thanks to Mezzanine's toolset.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a name=&quot;BuildingPackages&quot;&gt;&lt;/a&gt;&lt;h1&gt;Building Packages&lt;/h1&gt;&lt;br/&gt;&lt;a name=&quot;LocalMode&quot;&gt;&lt;/a&gt;&lt;h2&gt;Local Mode&lt;/h2&gt;&lt;br/&gt;If you do not have access to a CVS repository, or don't want one, you may use Mezzanine in local mode. This means that you will take a source RPM package and &lt;tt&gt;import&lt;/tt&gt; it to the current working directory. This example will use the Mezzanine SRPM:&lt;br/&gt;&lt;br/&gt;&lt;div class='codelisting'&gt;&lt;pre&gt;  $ mzimport -L mezzanine-1.7-0.14.src.rpm
  Importing /home/taj/RPM_BUILD/SRPMS/mezzanine-1.7-0.14.src.rpm into mezzanine tree....
  You requested local mode.  You will need to import the new tree by hand (mzimport mezzanine).
  $ ls
  mezzanine&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;The &lt;tt&gt;mzimport&lt;/tt&gt; command has converted the Source RPM into an SPM tree:&lt;br/&gt;&lt;br/&gt;&lt;div class='codelisting'&gt;&lt;pre&gt;  $ cd mezzanine
  $ find .
  .
  ./S
  ./S/mezzanine.tar.gz
  ./P
  ./F
  ./F/mezzanine.spec&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;The source and the spec file are there, and if any patches were included in the SRPM, they would be in the &lt;tt&gt;P&lt;/tt&gt; directory. There are none, so it is empty. I will fix that soon. :-)&lt;br/&gt;&lt;br/&gt;Inside the module directory (i.e. ...</description>
            <author>KainX</author>
            <pubDate>Tue, 28 Nov 2006 21:00:00 +0100</pubDate>
        </item>
        <item>
            <title>Packaging from Scratch with Specgen</title>
            <link>http://beta.kainx.org/articles/3</link>
            <description>One of the most time-consuming activities involved in distribution software packaging is taking a software author's bare tarball and turning it into a clean package.  It's also one of the most repetitive; most released open source software builds in a similar manner, meaning that there's a lot of duplication between spec files.  Specgen, one of the &lt;a title=&quot;Project home page for Mezzanine&quot; href=&quot;/wiki/view/Mezzanine&quot;&gt;Mezzanine&lt;/a&gt; tools, automates much of the repetitive nature of creating spec files and packages for new tarballs.&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;maketoc&quot;&gt;&lt;h3&gt;Page Contents&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#From0toRPMin22Seconds&quot;&gt;From 0 to RPM in 2.2 Seconds...&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#ASimpleExample&quot;&gt;A Simple Example&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#InCaseofEmergencyPullLever&quot;&gt;In Case of Emergency, Pull Lever&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#TotalMeltdown&quot;&gt;Total Meltdown&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#TemplatesandTypes&quot;&gt;Templates and Types&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#WrappingUp&quot;&gt;Wrapping Up&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;a name=&quot;From0toRPMin22Seconds&quot;&gt;&lt;/a&gt;&lt;h1&gt;From 0 to RPM in 2.2 Seconds...&lt;/h1&gt;&lt;br/&gt;Creating a new package from a downloaded tarball involves a series of basic steps that goes something like this:&lt;br/&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt; Download tarball.&lt;/li&gt;&lt;li&gt; Unarchive tarball.&lt;/li&gt;&lt;li&gt; Scan package for clues as to how it builds (i.e., &lt;tt&gt;configure&lt;/tt&gt; script, &lt;tt&gt;Makefile&lt;/tt&gt;, &lt;tt&gt;Imakefile&lt;/tt&gt;, etc.).&lt;/li&gt;&lt;li&gt; Look for documentation files which will need to be specially flagged.&lt;/li&gt;&lt;li&gt; Create the spec file, populating the header fields and build instructions based on previous inspections.&lt;/li&gt;&lt;li&gt; Perform a test build to verify the spec file's functionality.&lt;/li&gt;&lt;li&gt; Correct any errors found in the previous step.  Lather, rinse, repeat.&lt;/li&gt;&lt;/ol&gt;&lt;br/&gt;Sometimes the last step is completely unnecessary, and sometimes it can be a real doozy.  Unfortunately, there's not much I can do about that.  But the other steps are exactly why &lt;tt&gt;specgen&lt;/tt&gt; exists:  it gets you as far down the road as possible so that you can focus your attention solely on the parts that actually require skill and thought.&lt;br/&gt;&lt;br/&gt;&lt;a name=&quot;ASimpleExample&quot;&gt;&lt;/a&gt;&lt;h1&gt;A Simple Example&lt;/h1&gt;&lt;br/&gt;&lt;a class=&quot;external&quot; href='http://www.arpalert.org/'&gt;ARPAlert&lt;/a&gt; is an ARP table monitoring utility which can notify/alert you when an unauthorized connection is detected on your network.  It just so happens that it uses GNU autotools and builds properly, so &lt;tt&gt;specgen&lt;/tt&gt; has no problem with it:&lt;br/&gt;&lt;br/&gt;&lt;div class='codelisting'&gt;&lt;pre&gt;$ specgen http://www.arpalert.org/src/arpalert-1.1.3.tar.gz
Downloading http://www.arpalert.org/src/arpalert-1.1.3.tar.gz................................................................................done.
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.18294
sh-trace: umask 022
sh-trace: cd /var/tmp/mezzanine.temp.build.15458.477c/arpalert/BUILD
sh-trace: cd /var/tmp/mezzanine.temp.build.15458.477c/arpalert/BUILD
sh-trace: rm -rf arpalert-1.1.3
sh-trace: /bin/gzip -dc /var/tmp/mezzanine.temp.build.15458.477c/arpalert/SOURCES/arpalert-1.1.3.tar.gz
...
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/mezzanine.temp.build.15458.477c/arpalert/buildroot
Wrote: /var/tmp/mezzanine.temp.build.15458.477c/arpalert/SRPMS/arpalert-1.1.3-1.caos.src.rpm
Wrote: /var/tmp/mezzanine.temp.build.15458.477c/arpalert/RPMS/i386/arpalert-1.1.3-1.caos.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.61585
sh-trace: umask 022
sh-trace: cd /var/tmp/mezzanine.temp.build.15458.477c/arpalert/BUILD
sh-trace: cd arpalert-1.1.3
sh-trace: test x/var/tmp/mezzanine.temp.build.15458.477c/arpalert/buildroot '!=' x/
sh-trace: rm -rf /var/tmp/mezzanine.temp.build.15458.477c/arpalert/buildroot
sh-trace: exit 0
$&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;As we can see from the output of the test build, the build worked.  This means that &lt;tt&gt;specgen&lt;/tt&gt; has successfully created a package directory for us (in PDR format) using the automatically-detected package name (&lt;tt&gt;arpalert&lt;/tt&gt; in this case).  All that's left is to tweak the 3 bits of data in the spec file that &lt;tt&gt;specgen&lt;/tt&gt; can't automatically populate:  &quot;Summary,&quot; &quot;Description,&quot; and &quot;Group.&quot;&lt;br/&gt;&lt;br/&gt;&lt;div class='codelisting'&gt;&lt;pre&gt;$ cd arpalert
$ ls -Fla
total 116
drwxr-xr-x   2 mej mej   4096 Oct 17 12:02 . ...</description>
            <author>KainX</author>
            <pubDate>Sun, 22 Oct 2006 15:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Bad Example</title>
            <link>http://beta.kainx.org/articles/1</link>
            <description>&lt;h1&gt;&quot;If I Get Paid Lots of Money To Write Articles Online, Why Am I So Dense?&quot;&lt;/h1&gt;&lt;br/&gt;Andrew Brown of the Guardian wrote an &lt;a class=&quot;external&quot; href='http://technology.guardian.co.uk/weekly/story/0,16376,1660763,00.html'&gt;article&lt;/a&gt; in which he uses &lt;a class=&quot;external&quot; href='http://www.openoffice.org/'&gt;OpenOffice&lt;/a&gt; to prove that open source is a failure as a software development method.  Without wasting too much time on the obvious logical fallacy of drawing conclusions based on a single, non-representative sample, I will also point out several additional (and less obvious) flaws in his logic and provide counter-examples to help illustrate that Mr. Brown is either woefully misguided or under the influence of a Microsoft payoff.&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;bitbox&quot;&gt;Of all the myths that have grown up around open source software, perhaps the most pervasive is Eric Raymond's aphorism that &quot;Many eyes make bugs shallow&quot;, suggesting that if lots of people can view a program's source code, they will find and fix its errors more quickly than commercial products whose code is jealously guarded. The only problem with this is that it's not true&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;...Except that it &lt;b&gt;is&lt;/b&gt; true.  Anyone who has spent any time at all developing software can attest to the fact that it's a lot easier to track down bugs when there are as many sets of eyes as possible looking at the code.  In fact, I can't even count the number of times I've stumbled on the most elusive of programming blunders simply by trying to explain to someone else why my code couldn't &lt;i&gt;possibly&lt;/i&gt; be doing what it was doing.  :-)  While I certainly won't claim that it's a sure thing, given the choice between bug-hunting solo or being one member of a  team of debuggers, I'll take choice #2 every single time.&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;bitbox&quot;&gt;The myth of open source rests on two improbable assumptions. The first is that a significant proportion of users can fix bugs. That is true at the Massachusetts Institute of Technology, where the concept of open source was first formalised in the 1980s by Richard Stallman and others, and it is true in some of the geekier corners of the internet.&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;Okay, first off, RMS did not formalize open source.  He'd be the first to tell you that he's about &quot;free software,&quot; which is the computing equivalent of a hippie commune, and not &quot;open source,&quot; which is about explaining the strengths of a less shrouded method of developing, testing, and deploying software products to the decision makers in business who don't understand or care about the idealistic politics associated with RMS and the FSF.  Using the term &quot;open source&quot; while referring to RMS is like citing the famous &quot;I Have a Dream&quot; speech of David Duke.&lt;br/&gt;&lt;br/&gt;Secondly, I don't know a single open source developer (of which I most certainly am one) who actually believes that the majority of users know enough about programming and software engineering to locate and correct erroneous code.  I will say vociferously, however, that &lt;b&gt;no one&lt;/b&gt; is better at triggering bugs than users who can't code!  &lt;img alt=&quot;wink&quot; class=&quot;icon&quot; src=&quot;/smileys/icons/wink.gif&quot; /&gt;&lt;br/&gt;&lt;br/&gt;But what's missing here is one undeniable fact:  open source does not make bugs any &lt;i&gt;harder&lt;/i&gt; to find!  Let's take his example of OpenOffice.  As the article states, Sun employs about 100 full-time developers for OpenOffice.  Those 100 people have access to the code and are able to find and fix bugs regardless of whether OO is open or closed source.   So at best, the project is no worse off open than closed.  The power of open source comes from the fact that more people &lt;i&gt;can&lt;/i&gt; access the code.  And even if there's only 1 additional person on the entire planet who can help the Sun-employed team find/fix issues, open source is advantageous.&lt;br/&gt;&lt;br/&gt;No, it's not always the end-all and be-all solution, but it sure doesn't hurt.&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;bitbox&quot;&gt;This is important because of the second crucial false assumption: that even if not all users can fix a bug, they can help find them. They can't. Most users just think: &quot;The computer isn't doing what I want.&quot;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;Same problem as before.  Even if 1 additional user can find/fix a bug, the team is better off.  There will be users who don't understand problems with software regardless of the development methodology you employ.  Mr. Brown implies that making the source available somehow makes users less able to find bugs.  Those users who can't, can't, regardless of whether or not the code is accessible. ...</description>
            <author>KainX</author>
            <pubDate>Fri, 16 Dec 2005 14:37:00 +0100</pubDate>
        </item>
    </channel>
</rss>
