<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://purl.org/atom/ns#">
  <title>Jesper Louis Andersens Ramblings</title>
  <tagline mode="escaped" type="text/html">- a blog on scheme, python and life</tagline>
  <link href="http://j.mongers.org/" rel="alternate" title="Jesper Louis Andersens Ramblings" type="text/html"/>
  <modified>2006-006-04-21T18:58:32Z</modified>
  <info mode="xml" type="text/html">
    <div xmlns="http://www.w3.org/1999/xhtml">
		This is an Atom formatted XML site feed. It is
		intended to be viewed in a Newsreader or syndicated to
		another site.
	</div>
  </info>
  <title>Jesper Louis Andersens Ramblings</title>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-17T19:19:24Z</issued>
    <modified>2006-05-17T19:19:24Z</modified>
    <created>2006-05-17T19:19:24Z</created>
    <id>15</id>
    <title mode="escaped" type="text/html">FreeBSD, PS2.EXE and an IBM X40 Thinkpad</title>
    <content mode="escaped" text="text/html">
      <p>
	      FreeBSD is very strict about its ACPI code. Noteably,
	      FreeBSD doesn't work when the 2nd IDE channel is enabled
	      on the X40 IBM thinkpad. This is well known and
	      described in the archives of the FreeBSD mailing
	      lists. The problem is that whenever you generate some
	      ACPI event, your computer locks up. I did not check if
	      you could break to DDB, though. It might be an interrupt
	      hell you are going through when that happens.
	    </p>
      <p>
	      Fortunately, there is a solution. Just run the PS2.EXE
	      program downloadable as a <em>DOS utility package</em>
	      from the IBM/Lenovo website. However, that requires you
	      to have either a windows or a DOS. My X40 is stripped of
	      that crap.
	    </p>
      <p>
	      Ah, well, then you just burn an ISO, shove it into your
	      USB CD-ROM drive and boot from it. No USB CD-ROM in this
	      house. No Floppy either. But there is a dual-booting
	      Windows/FreeBSD server (conveniently named
	      <em>orc</em> - My boxes are named after monsters). Can
	      we do with that and an Internet connection without
	      breaking any copyrights?
	    </p>
      <p>
	      The astounding answer is yes: Get the utility
	      package. Unpack it in Windows. Copy the files to the
	      FreeBSD server. Get DR-DOS 7.02 on a floppy disk
	      installation. This is free. Pick PS2.EXE and its helper
	      files and stick it into the floppy image via some
	      <em>mdconfig(8)</em> magic and some <em>mount -t
	      msdos</em> hackery. Set up a PXE boot environment (this
	      is a DHCP server and a TFTP server). Download and
	      extract a syslinux package (Peter H. Anvins PXE boot
	      code for linux!). Arrange to boot <em>pxelinux.0</em>
	      and configure it to use a <em>memdisk</em>. Hand it the
	      DR-DOS image. Boot over the network. BOOM! PS2.EXE can
	      now be run.
	    </p>
      <p>
	      Yes, it took a while to figure out that this was a
	      solution. But it was fun.
	    </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-14T16:41:34Z</issued>
    <modified>2006-05-14T16:41:34Z</modified>
    <created>2006-05-14T16:41:34Z</created>
    <id>14</id>
    <title mode="escaped" type="text/html">
	    Installing FreeBSD on an X40
	  </title>
    <content mode="escaped" text="text/html">
      <p>
	      I installed FreeBSD 6.1 RELEASE on my X40 thinkpad
	      yesterday. This entry describes how to do that quickly.
	    </p>
      <p>
	      The first thing you should read is the PXE Jumpstart
	      Guide by Alfred Perlstein. This guide describes how to
	      set up a PXE boot environment on another host. In
	      particular, I downloaded the ISO, mounted it via
	      <em>mdconfig(8)</em> and extracted it to an NFS mount
	      point. Then I set up a DHCPd, a TFTPd and put a pxeboot
	      environment into the TFTP server. It then boots, fetches
	      a kernel and mfs_root via NFS and then proceeds to
	      execute the kernel with the mfs_root as the root
	      filesystem (To do this, consult Alfred's guide, its
	      <em>vfs.root.mountfrom</em> theres the special hint to
	      give the kernel).
	    </p>
      <p>
	      With a new FreeBSD, you download a complete ports tree
	      via <em>portsnap(8)</em> and extract it so you have an
	      environment to build from. Then you install
	      <em>portuprgade</em> to manage ports easily. Now, I have
	      a list of stuff I want, so I just supply this list to
	      the portupgrade tool named <em>portintall(8)</em>. The
	      system is now happily building the ports I need. 
	    </p>
      <p>
	      To track security errors in packages, we are using
	      <em>portuadit</em>. This gives a system which can check
	      your box for eventual security problems quickly, so you
	      can take measure of what to do. This is one of the first
	      thing I install.
	    </p>
      <p>
	      There is a number of utility-stuff I always
	      install. This list is zsh, screen, sudo and emacs. It
	      more or less gives you a system you can work with,
	      though there is no X environment at the moment.
	    </p>
      <p>
	      Next, I fire away a portinstall of the <em>gnome2</em>
	      port. This gives me a gnome environment. After that I
	      switch to using X for all of my work.
	    </p>
      <p>
	      From there on, I keep adding stuff ad-hoc when I need
	      it. Gnome2 installs most of the stuff with long
	      compile-times. Most other stuff I need can be done in a
	      matter of minutes. So this is usually done afterwards
	      when I need it.
	    </p>
      <p>
	      One thing I find to be very powerful in FreeBSD is the
	      ease of installation. If you use packages, Debian and
	      FreeBSD is about the same in installation speed. You you
	      don't get all the irritating linuxisms with it!
	    </p>
      <p>
	      Enough praise. My parents are not going to get a
	      cat. Both kittens were counted for when they saw them
	      today. I am sitting at my parents because my bike broke
	      down. There was a hole in one of my tires. I
	      <em>utterly</em> hate to mend holes. There is about no
	      fun in doing this, but it has to be done...
	    </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-12T21:02:57Z</issued>
    <modified>2006-05-12T21:02:57Z</modified>
    <created>2006-05-12T21:02:57Z</created>
    <id>13</id>
    <title mode="escaped" type="text/html"/>
    <content mode="escaped" text="text/html">
      <p>
	      My parents are contemplating getting a cat. They do not
	      know it yet, but they will eventually get one. That will
	      make them have 2 dogs and one cat again.
	    </p>
      <p>
	      Asking deeper, they had already thought about it. They
	      <em>will</em> get that cat. Your hear me! They will!
	    </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-06T21:38:55Z</issued>
    <modified>2006-05-06T21:38:55Z</modified>
    <created>2006-05-06T21:38:55Z</created>
    <id>12</id>
    <title mode="escaped" type="text/html">7 Things not to do in software projects</title>
    <content mode="escaped" text="text/html">
      <p>
	      I have not done many great projects that became
	      tremendous successes. Rather, most of what I have
	      started has slowed to a halt and never been put into
	      something which other people could use. Due to this
	      fact, I have built a knowledge around how not to do stuff.
	    </p>
      <p>
	      I have attempted to compile these things into a big list
	      and then post it for everyone to see. Maybe the
	      information can be useful to someone else than me. I
	      must sadly admit, that I see these things again and
	      again in software projects. It is a shame, because the
	      things should be fairly obvious and none of them should
	      be counterintuitive.
	    </p>
      <h5>Item #1: Embrace the 2nd effect</h5>
      <p>
	      The 2nd effect is when you have built a fairly robust
	      version 1.0 of your software program and are aiming for
	      a total rebuild. Then suddenly everything should be
	      crammed into your program. Your discussion and analysis
	      sessions brainstorm on <em>wicked</em> things to add to
	      the software. And everything must be ready for a 2.0
	      release.
	    </p>
      <p>
	      This even happens on new projects in the planning
	      phase. You see it all the time, where the software needs
	      to do a lot of stuff, has outrageously many
	      requirements, or where people are just keeping on adding
	      features while planning. Stuff to look out for:
	      <ul><li>We need a complete LISP interpreter as a
		configuration and extension language embedded into the
		behemoth.</li><li>It should have web 2.0 connectivity via XML-RPC or
		SOAP and have XML-schema defined for each kind of
		operation. This quickly grows out of hand, beware!</li><li>You can't find any spot in this code where we just
		need to apply the KISS (Keep it simple, stupid)
		principle.</li></ul></p>
      <h5>Item #2: Embrace the NIH syndrome</h5>
      <p>
	      The NIH (Not invented here) syndrome is when you have to
	      build everything yourself and never base your work upon
	      the shoulders of other giants. This is a fairly
	      irritating thing not to do. You end up reinventing the
	      wheel for a lot of the code. And your code has had less
	      testing than any kind of library out there.
	    </p>
      <p>
	      Further you waste your valuable time on a
	      <em>decoy operation:</em> Getting a library built. That
	      moves your focus from the real task at hand, namely
	      building a tool you need.
	    </p>
      <h5>Item #3: Embrace every library there is because</h5>
      <p>
	      Embracing a complete pre-configured framework stack for
	      instance, will tie you up in some axis. This is the main
	      reason for the numerous different frameworks for web
	      development. To name a few: RubyOnRails, Django,
	      Turbogears, Zope. Each of these has certain advantages
	      and disadvantages, so there exist more than one. There
	      is also the NIH syndrome at work.
	    </p>
      <p>
	      Importing a lot of libraries means dependence of your
	      software. It might put off some people. So loading a
	      library for doing just part of what the library does
	      might be overkill.
	    </p>
      <p>
	      The alert reader will have noticed the opposite
	      directions of Item #2 and #3. The lesson is that there
	      is a golden middle which you should hit. It is hard to
	      hit it right the first couple of times, but with
	      experience, you will be better and better at just
	      <em>knowing</em> when to steal code or when to build
	      yourself. The quality of existing libraries might be a
	      reason, but remember it is often far easier to submit
	      patches for bugs to a library than it is to reinvent it
	      yourself.
	    </p>
      <p>
	      If the API of the library pisses you off, then you
	      should probably be thinking of shielding the library
	      from the rest of your code so you can interchange it
	      later on. If you create a tight intercouple between your
	      program and the library you risk problems later
	      on. However, do not see these problems as
	      unsolvable. Even with tightly intercoupled libraries it
	      is often possible to change code so you get free of said
	      library.
	    </p>
      <h5>Item #4: Argue the small points</h5>
      <p>
	      If your project group always discusses smaller fine
	      points in the code and never discusses the big parts,
	      then your project is doomed. There are many ways to do
	      small things and it is seldomly so that one way have a
	      serious advantage over the other. It is rather hard
	      changing the big picture later on, however. Keep this in
	      mind when discussing things.
	    </p>
      <p>
	      Do not discuss a fine point for more than 5 minutes. If
	      it takes longer to convince the other party your case
	      might not be so good after all. I have been in one
	      particular project where most of the discussion took
	      place over the placement of a comma in the
	      documentation. Had the members of the project just spent
	      time on correcting bugs instead of arguing...
	    </p>
      <h5>Item #5: Dismiss refactoring</h5>
      <p>
	      Forget about refactoring. Always take your code and just
	      add to it what is needed. This will cripple your code
	      gradually until nothing can be added to the code
	      base. At that point, you will begin contemplate
	      rewriting the whole mess again in a new setting.
	    </p>
      <p>
	      Refactoring is about keeping your code <em>agile</em> in
	      the sense that it welcomes change. You need to have a
	      proper canvas to work on when adding things. It is often
	      the case that clever refactoring can do wonders to your
	      code base. You should, however, note that it is not
	      about <em>fixing</em> code, but rather about redesigning
	      and reimplementing the stuff that doesn't work totally.
	    </p>
      <h5>Item #6: Don't think about your development
	    environment</h5>
      <p>
	      Forget about development environments. Forget about a CM
	      system like CVS, SVN, Darcs, Mercury, Git etc. Forget
	      about having branches of production and development code
	      with tags along the way. Forget about having a baseline
	      and working branches. And most importantly, forget about
	      having a test environment and work directly on the
	      live production system.
	    </p>
      <h5>Item #7: Rambo your code: One-army is the way!</h5>
      <p>
	      Forget about collaboration. Code should be written in
	      one-man armies! Forget about the additional kick that
	      can be, when more people are working together on a
	      project. Rather, than focus on one project with 3
	      people, focus on 3 projects with one man on
	      each. One-man army projects tend to die a slow painful
	      death, but what the hell...
	    </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-04T21:12:50Z</issued>
    <modified>2006-05-04T21:12:50Z</modified>
    <created>2006-05-04T21:12:50Z</created>
    <id>11</id>
    <title mode="escaped" type="text/html">Back to Gnome</title>
    <content mode="escaped" text="text/html">
      <p>
	      Today I installed Gnome again. KDE left me in a sad state
	      of mind. Also, I forgot <em>Porcupine Tree</em> from the
	      listing in the last entry. 
	    </p>
      <p>
	      Today, I post the 11th entry. This means the blog system
	      should begin to rotate entries. I do not actually know if
	      it does so yet, but I'll check and fix it, if it does not
	      do it the right way.
	    </p>
      <p>
	      It is fun to see how much faster Gnome is compared to KDE
	      on this desktop. Much less code to run through it seems.
	    </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-02T23:47:13Z</issued>
    <modified>2006-05-02T23:47:13Z</modified>
    <created>2006-05-02T23:47:13Z</created>
    <id>10</id>
    <title mode="escaped" type="text/html">Musical preferences</title>
    <content mode="escaped" text="text/html">
      <p>
			Music needs to make the mind work. I love
			music where harmonics, rhytm and the groove is
			central. Polyrhyhtmic arrangements especially
			makes my mind a bliss. Here is a list of what
			I listen to at the moment:
			<ul><li>King Crimson</li><li>Tool</li><li>A Perfect Circle</li><li>The Mars Volta</li><li>Opeth</li><li>Massive Attack</li><li>Rage Against the Machine (Audioslave doesn't count)</li><li>Soundgarden</li><li>the Stone Temple Pilots</li><li>Nine Inch Nails</li></ul>
			I would be grateful, if you have something I
			need to hear. The reason is this: If coffee
			makes mathematicians create theorems, and
			coffee makes computer scientists create urine;
			then music make me create wonderous
			things. When I need to focus one hundred
			percent on something, I can usually
			concentrate better with (known) music in the
			background. So, getting something new down on
			the track is important.
		</p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-05-01T22:06:52Z</issued>
    <modified>2006-05-01T22:06:52Z</modified>
    <created>2006-05-01T22:06:52Z</created>
    <id>9</id>
    <title mode="escaped" type="text/html">So, what programming language are you using today, jlouis?</title>
    <content mode="escaped" text="text/html">
      <p>
			I initially begin my programming with C. I had
			the standard BASIC things before, but it was
			more about understanding how BASIC worked than
			how you create programs.  C was a good and
			fine language. I liked it a lot. There was a
			section in the book about C++, the new grand
			thing, and I did like many of the ideas they
			showed there, like operator overloading,
			function overloading, classes etc. However,
			the book emphasized C, and I was happy to code
			C for some time.
		</p>
      <p>
			None of the programs I wrote from that time
			have survived (you will thank me for that),
			but I do remember building a text adventure
			game, without structure, and I do remember it
			was a mess to maintain.
		</p>
      <p>
			At the age of 16, I began learning Standard
			ML. I think this is the reason I am so much
			for functional programming. My first real
			programs with style were written in Standard
			ML. I was happily oblivious to most of the
			problems programmers will face, since SML
			maintains a lot of the hassle for you. I
			learned about type systems and how it can help
			a programmer. I learned about what a higher
			order function was. I learned the module
			system and at last I understood the functor. I
			do believe this knowledge has changed me
			forever. C doesn't look nice to you anymore,
			after exposure to SML.
		</p>
      <p>
			The latter years, I have delved into a number
			of programming languages: Python, Ruby, OCaml,
			Haskell, Scheme and Perl probably being the
			most important. Java "came along" as it was
			one half of the standard courses at DIKU (The
			other half is in SML, heh). This day, I find
			myself most content with the languages of
			Ruby, Python and Scheme. These languages are
			the ones that let me do most stuff in a quick
			manner, and I think that my precious time is
			the one that should be valued the most.
		</p>
      <p>
			I <em>Do</em> like Haskell for its beauty, but
			I do not like it for most programming tasks,
			however. The Haskell problem is a couple of
			things:
			<ul><li>
					Lazy evaluation. This is a
					killer for your understanding
					of the run-time of your
					program. It is devastating to
					your understanding of
					space-consumption.  I
					generally find it more
					irritating than a help for
					what I usually work with.
				</li><li>
					Monad transformer
					stacks. These are beautiful
					beasts, but they are hard to
					maintain, when one of your
					inner functions suddenly have
					to throw an exception.  You
					will then have to rewrite
					large parts of your code such
					that the transformer stack is
					maintained. Grrr.
				</li></ul></p>
      <p>
			I <em>Do</em> like SML, and was involved in
			the porting of the <a href="http://mlton.org">MLTon</a> compiler to
			the NetBSD and OpenBSD platforms. But I still
			think we lack a nice "bare bones" compiler
			which looks a bit more like what Scheme48,
			Chicken or PLT Scheme is in the scheme world.
		</p>
      <p>
			If you may ask, it is all about the build
			environment. Standard GNU autotools might be
			made in the Abyss, but they do the job and
			makes it fairly easy to port a program to
			another architecture. This is not the case of
			most SML compilers out there. They have their
			own big build systems.
		</p>
      <p>
			Then there is the SML library effort which is
			lacking seriously. Without a big library of
			standard stuff and bindings, no-one is going
			to use your language this day. There is so
			much (admittedly crap) code out there, which
			you rather want to link with than compete
			against.  This is a driving factor for
			productivity today. "No XML processor by
			default?". Tough luck, then the language
			doesn't hold.
		</p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-04-29T18:39:22Z</issued>
    <modified>2006-04-29T18:39:22Z</modified>
    <created>2006-04-29T18:39:22Z</created>
    <id>8</id>
    <title mode="escaped" type="text/html">PLT Scheme, here we come</title>
    <content mode="escaped" text="text/html">
      <p>
			It has come to my attention that PLT scheme
			can do what I want. It has some nice design by
			contract features. I'll test it out later this
			evening and see if it is fitting with my
			purposes
		</p>
      <p>
			One sad thing with the scheme community is the
			divergence into different smaller
			communities. This way, it is next to
			impossible to make something
			general. Hopefully, we can come a good deal of
			way to kill that with R6RS.
		</p>
      <p>
			I am also very eager to try playing a bit with
			MrFlow. It seems to be a nice thing and using
			that for construction of systems seem rather
			interesting. I can hopefully catch bugs and
			no-brainers before the code is compiled.
		</p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-04-28T23:05:47Z</issued>
    <modified>2006-04-28T23:05:47Z</modified>
    <created>2006-04-28T23:05:47Z</created>
    <id>7</id>
    <title mode="escaped" type="text/html">7 Programming habits</title>
    <content mode="escaped" text="text/html">
      <p>
			At mongers.org, we have a guy named Michael
			Knudsen. He is a very comptetent guy with a
			homepage on which he links to an article
			written by Philip Chu. It is named <a href="http://www.technicat.com/writing/programming.html">7
			habits of Highly Effective Programmers</a>. In
			fact, there is much more than 7 rules in the
			thing.  There is maybe 30 or 40 rules, but all
			of them are deliciously nice.
		</p>
      <p>
			I intended to down something similiar, but it
			is much easier to link directly to a true
			master of his art, rather than <em>trying</em>
			to build something equal. I, personally, am
			very interested in software development
			methods; in particular about programming.
		</p>
      <p>
			I am currently thinking a little bit about a
			scheme macro which lets you define functions
			as Eiffel contracts. By using this, it would
			be possible to write software with an extreme
			amount of assurance. Also add unit-testing
			into it. This can of course easily be done
			with a scheme macro. Further direction would
			be to add some funnier stuff to it, like the
			QuickCheck framework of haskell.
		</p>
      <p>
        <em>Ah, the wicked imagination</em>
      </p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
  <entry>
    <author>
      <name>Jesper Louis Andersen</name>
    </author>
    <issued>2006-04-27T20:00:50Z</issued>
    <modified>2006-04-27T20:00:50Z</modified>
    <created>2006-04-27T20:00:50Z</created>
<!-- <link href="pagepagepage"> -->
    <id>6</id>
    <title mode="escaped" type="text/html">Separation is bliss</title>
    <content mode="escaped" text="text/html">
      <p>
				Modern website construction is much
				different from the old days. Yet, so
				few people seem to grasp what it is
				all about. I still see too much code
				written in HTML 4.01 with a
				traditional or loose class. There are
				fewer HTML 4.01 strict pages. Even
				fewer XHTML 1.1 pages again. But you
				only have half of the cool stuff if
				you think XHTML anyway.
			</p>
      <p>
				The cool thing about CSS was the
				separation between structure in the
				document and the layout of the
				document. Used correctly (see <a href="http://www.csszengarden">The CSS
				Zen Garden</a>), it is possible to
				generate enormously nice web pages
				with complete separation of layout and
				structure. You will be able to change
				your style in no time, just by
				altering the CSS. Furthermore, your
				graphic artist, multimedia designer or
				similiar does not have to dig around
				inside the code to change styles.
			</p>
      <p>
				I propose to teach people the next
				level. The separation between
				information and structure. The blog
				here is written in Atom (This is the
				information part), structured via XSLT
				into XHTML1.1 and then applied with a
				style sheet. And lo and behold, now
				RSS/Atom readers can read the blog
				without having to know about
				structure.
			</p>
      <p>
				When information and structure is
				separated, information becomes machine
				readable.  And with the amount of
				information today, we need machine
				readable websites.  The next logical
				step will be to use RDF on the
				site. This is on my TODO list, though
				it is not more than a imaginative
				design thing. I do not have a clear
				grasp of how to apply it.
			</p>
    </content>
    <draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
  </entry>
</feed>
