The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers

tpot (at) frungy . org

rss

2004
Months
Dec

Sun, 05 Dec 2004

Tridge on Threads

From samba-technical:

What is it about the word "thread" that people find so damn sexy?

Maybe it needs a name change "slow-as-hell-no-memory-protection-locks-dont-work" API might be suitable, but I suspect the standards committees wouldn't like that one.

The MMU was added to CPUs for a very good reason. Why is it so hard to understand that trying to avoid it is a bad idea?

posted at: 16:29 | path: /rants | permanent link to this entry

Fri, 19 Nov 2004

Unit Testing Patterns

Marc Clifton has a great article on Unit Test Patterns. It's Part V of a larger series on Advanced Unit Testing (Part I, Part II, Part III, Part IV) at The Code Project (advertised as "Your Visual Studio .NET Homepage" - bleargh). The articles are appropriate to pretty much any language or test framework though.

posted at: 16:44 | path: /computers/testing | permanent link to this entry

Fri, 12 Nov 2004

I wish GNU make could do this

proforma$ scons --debug=explain
scons: rebuilding `src/HP_CPU/libHPCPUProvider.so' because:
            `src/HP_SMBIOS/SMBIOS.os' changed
            `src/Common/Version.os' changed
            `src/EzBMC/libEzBMC.a' changed
posted at: 10:43 | path: /software/scons | permanent link to this entry

Wed, 03 Nov 2004

Googlewhacking

Pelmet fairy.

posted at: 10:34 | path: | permanent link to this entry

Sun, 31 Oct 2004

Interesting RAID setup

On the latest Ask Slashdot there is an article about Experiences w/ Software RAID 5 Under linux. (It's better than the usual Ask Slashdot posting whose answer can be found by using Google).

A poster comments:

FWIW, here's the system I've evolved for partitioning disks in such systems:
  • First partition: One cylinder (the innermost one): Ext FS containing a THIS_DISK file in which I record when and why I bought the drive and any interesting history it has had. In an emergency when you're suddenly shuffling eight hot drives plus a couple spares plus a dead and replacement motherboard &tc, you WILL lose track of which disk was doing what. This little partition will save you a lot of grief.

  • Second partition: Swap, in the outermost (lowest numbered) cylinders -- because these give the fastest transfer rates, up to about a 50% advantage. Putting swap on every disk lets the kernel stripe swaps across all available drives for additional parallellism and speed, and also ensures you've got adequate swap no matter how you configure in an emergency.

  • Third partition: RAID2, a complete bootable Linux system. With this mirrored on every drive in the system, you're guaranteed able to get up again fast no matter what goes wrong. Thus, FD partition type.

  • Fourth partition: RAID5, your serious filestore space, occupying the vast majority of the disk.

(He/she also mentions that the fourth partition can be RAID2 for workstation machines).

A system like this would make a nice NAS setup for a small business or small office server. The nicest property here is that every disk can contain the NAS software and thus have minimal downtime if the system disk dies.

This setup probably doesn't scale too well above a small handful of disks, kind of like the number of superblocks written by Linux 2.0 ext2fs. Having a complete copy of the system partition on every single disk may be overkill.

posted at: 14:51 | path: /computers | permanent link to this entry

Thu, 30 Sep 2004

Tivo for Radio

There seems to be stacks of people interested in time-shifting FM radio so I could listen to some music at my computer when I didn't feel like choosing something from my mp3 collection. I picked up a D-Link DSB-R100 USB FM radio on eBay for $30. After the usual Linux kernel/driver related dicking around and reading the Linux based Radio Timeshifting article in Linux Gazette, I can now do unattended recording of FM radio straight to MP3. Neat-o!

Unfortunately D-Link don't seem to be making USB radios anymore. They're not even mentioned on their website anymore. )-:

posted at: 17:07 | path: /computers | permanent link to this entry

Tue, 28 Sep 2004

Unit Testing

I ran into a friend on the way to work the other day who was told me he had drunk the kool-aid with regards to unit testing. It's always nice to hear someone get all excited about testing. I have been writing a lot of test suites recently and it has been quite rewarding both in terms of having something to run regularly to see if my code has bit-rotted, and also having more confidence in rewriting and refactoring.

Read the rest of mjd's Writing Automated Tests presentation. It's nice and tasty.

posted at: 16:54 | path: /computers/testing | permanent link to this entry

I'm here for an argument

tpot@proforma:~$ python
Python 2.3.4 (#2, Jul  5 2004, 09:15:05)
[GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> NotImplemented
NotImplemented

>>> help(NotImplemented)

Help on NotImplementedType:

NotImplemented

>>> print NotImplemented
NotImplemented

posted at: 16:37 | path: /software | permanent link to this entry

Tue, 07 Sep 2004

Phil's Problem

From Dive Into Mark:

If you absolutely must use an aggregator, I recommend BlogLines, which, I am told, has redesigned itself and is now even better than it used to be, if such a thing is possible. But really, you should ask yourself if you need to keep up with 100 or 200 or 1400 different "sources" of "content" on an hourly basis. Shouldn't you be spending more time with your family or something? Or, if you don't have a family, shouldn't you be spending time building one? RSS won't get you laid.
posted at: 15:52 | path: /humour | permanent link to this entry

Mon, 06 Sep 2004

Funky new stuff in GDB

From gdb.info:

The GDB Text User Interface, TUI in short, is a terminal interface which uses the `curses' library to show the source file, the assembly output, the program registers and GDB commands in separate text windows.

...

The TUI installs several key bindings in the readline keymaps. They allow to leave or enter in the TUI mode or they operate directly on the TUI layout and windows. The TUI also provides a _SingleKey_ keymap which binds several keys directly to GDB commands.
Hit C-x a or C-x 1 to enter TUI mode. Basically it's emacs' Grand Unified Debugger in a window. Very cool.

Update: Apparently this has been in gdb since 1999. (-:

posted at: 14:22 | path: /software | permanent link to this entry

Wed, 25 Aug 2004

More than you ever wanted to know about

General Decimal Arithmetic.

posted at: 13:57 | path: /computers | permanent link to this entry

Sat, 21 Aug 2004

Linux Extended Attributes

Weird - enabling extended attributes under Linux is now a mount option:

# mount -o remount,user_xattr /
Also, according to google the acl mount option needs to be specified to enable POSIX ACLs. posted at: 22:58 | path: | permanent link to this entry

Sat, 14 Aug 2004

Linux hotplug tips

WLUG-Wiki Hot Plug Notes

posted at: 00:00 | path: /computers | permanent link to this entry

Thu, 12 Aug 2004

Online Talks

Mark-Jason Dominus has a few of his talks on line. My favourite is Presentation Judo (which does bear an uncanny resemblance to Damian Conway's Presentation Aikido he gave at OSCON this year).

My favourite quote:

If you are making the point that C++ is nasty, and you want people to be disgusted by it, one of the most effective things you can do is to put some turds on the page. People will feel real disgust, not in the front part of their brains, but way at the back, in the microcode. (I don't need to list all the ways this plan could backfire, do I?)

I'm not sure whether the pattern of making your talks very entertaining is an entirely good idea. It works in the sense that I still remember more about the entertaining talks than the boring as batshit ones, but perhaps some people might think it doesn't have as much educational value (whatever that means) if the presenter is jumping about like a leprechaun.

My other thought is that the Python community needs a couple of exciting, passionate and entertaining speakers on the conference circuit. As a sweeping generalisation, the Python speakers at OSCON were all thoughtful but reserved, and the Perl speakers were passionate and animated. Perhaps it says something about the two languages.

posted at: 09:30 | path: | permanent link to this entry

Wed, 11 Aug 2004

Startup sounds

What's the story with startup sounds? Do the owners of laptops with startup sounds enabled think that it's cool to have a computer? So cool that you have to tell everyone in the room that "hey look, I have a computer and hey, I've just turned it on!". At an IT conference pretty much everyone has a computer so it's not really that cool. posted at: 00:00 | path: /conferences | permanent link to this entry

Tue, 10 Aug 2004

At OSCON

I can't believe the number of people with Mac laptops at OSCON. It really is quite scary. Most of them are even running OS X. posted at: 00:00 | path: /conferences | permanent link to this entry

Mon, 09 Aug 2004

Cool emacs Hack

(defun indent-or-complete ()
  "Complete if point is at end of a word, otherwise indent line."
  (interactive)
  (if (looking-at "\\>")
      (dabbrev-expand nil)
    (indent-for-tab-command)
    ))
 
(add-hook 'c-mode-common-hook
          (function (lambda ()
                      (local-set-key (kbd "") 'indent-or-complete)
                      )))
I think I'll try it out for a week or so and see how funky it is. posted at: 12:33 | path: /software/emacs | permanent link to this entry

Thu, 05 Aug 2004

LDAP Attribute Name du Jour

mSexchange posted at: 15:39 | path: /humour | permanent link to this entry

Fri, 16 Jul 2004

Marketing and the Techies

In and interview Bruce Eckel, of Thinking in C++ fame, makes some interesting remarks about Python:

The Python venture is basically controlled by the techies. We make decisions based on what's going to make the life of the programmer easier. Even with C++, which was a standards committee, I remember early decisions being based on worries about the existence of a body of code which was a drop in the bucket relative to what we have now. But they were saying, "We can't make this change in the language because we would break all that existing code," which was basically trivial. We should have made those changes at the time. That was sort of a marketing decision because many of the people on the committee were representing companies who had vested interests in C++ in some way or another.

You can actually say the same about Perl. (-: The difference is between the two languages is remarkable but both are controlled by "the techies". As for Python, I have never had any backward compatibility problems.

posted at: 09:52 | path: /software | permanent link to this entry

Microsoft Point-to-Point Encryption

This week must be the time for getting funky stuff working on my laptop. After my success with the W200 wireless LAN card I thought I would try my luck with MPPE. I used James Cameron's PPTP Client. Unfortunately I got it working within an hour due to the high quality of the documentation and diagnosis section. This is unfortunate because I miss out on that satisfying feeling of working for hours on something and then have it finally work. I guess that's OK though.

This is also the second kernel patch I have applied that wasn't for the exact same kernel version I was running. Both of them applied without any conflicts which has never happened before!

posted at: 09:52 | path: /computers | permanent link to this entry

Wed, 14 Jul 2004

W200 Wireless LAN Card

Finally, I've managed to get the wireless lan card that comes with my Compaq Evo N620c working with (Debian) Linux. Who says Linux isn't ready for the mainstream? It was so easy.

Here's what I had to do:

  1. Download the latest 2.6.6 source code and configure to your liking. Make sure you do compile in module support and don't compile in Hermes chipset 802.11b support (Orinoco/Prism2/Symbol).

  2. For some reason I had only selected EHCI HCD (USB 2.0) support but not UHCI HCD so most of my USB devices couldn't be detected via lsusb. I have no idea why selecting an option labelled USB 2.0 doesn't compile in support for USB 1.0 devices.

  3. Download the latest version of the Linux Orinoco Driver from CVS, build and install it.

  4. Also required are the Linux Hotplug tools which, when restarted, should automatically pick up the fact that the orinoco_usb module is required and install it.

  5. The very last step is to hit Fn-F2 to activate the W200. You can then go nuts and configure the interface using iwconfig.

There are heaps of good tips for the N620c at agriffis' page although they are Gentoo specific, not that there is anything wrong with that.

posted at: 21:41 | path: /computers | permanent link to this entry

Fri, 25 Jun 2004

BEEP

I still like to troll mbp about using BEEP as a transport for rsync 3 but the (good) comeback was that there were no applications that used it.

Enter Xgrid:

[University of Toronto researcher Dr. Daniel Côté says] that "If you use other computers, controlling who will do what task and with what parameter and monitoring the status is extremely annoying, painful, complicated, and error prone. You often have to set it all up yourself, and it is hard. On Mac OS X, Xgrid bypasses all of that. Apple was smart enough to build Xgrid on top of open source protocols such as BEEP. This should be easy to implement on other machines."

Presumably Apple's angle here to what basically looks like a batch-job submission system, is the integration of their Rendesvous zero-configuration networking protocols and some (presumably) usable GUI management tools. There is a screenshot of a tachometer which sums the total clock speed in GHz of the cluster which really isn't such a good measure of it's overall computing power, but is nice eyecandy.

Slashdot reports a implementation of Xgrid for Linux in which a bit more is explained about the protocol:

"The XGrid protocol is actually quite simple to understand, since there are only three types of messages that can be passed: a request (to which one replies) or a notification (to which there is no need to reply). Each message is identified with a CorrelationID, a name, a type (request/reply/notification) and a payload (which contains something specific to current message (identified by name))." [...] "Each XGrid message is sent as a BEEP MSG, and must be acknowledged when received completely by an empty RPY. MSG's can be sent in smaller chunks (frames). The implementation of BEEP that is used in this xgridagent is Roadrunner, but there is also beepcore-c (which is not as flexible)." "It is convenient but not necessary that both XGrid and BEEP rely on XML. Some BEEP information (in the initiation of the connection for instance) is encoded in XML. XGrid uses XML extensively, which makes it trivial to analyze."

At the moment BEEP is one of those solutions looking for a problem so maybe it will starting gaining more visibility and acceptance as a result of Xgrid.

posted at: 09:18 | path: /software | permanent link to this entry

Thu, 24 Jun 2004

PyGTK 2.0 Reference Manual

Finally, a PyGTK 2.0 reference manual is available on the web. The combination of Python, Glade 2 and PyGTK is going to be very good for writing little throwaway GUIs.

Now, to figure out how to use the new GTK TreeStore and TreeView interface...

posted at: 11:56 | path: /software | permanent link to this entry

Sat, 05 Jun 2004

Another good blog

Marginal Revolution. posted at: 23:51 | path: /blogs | permanent link to this entry

Fri, 04 Jun 2004

NFS (still) sucks

I can't believe that NFS still doesn't work between two random (modern) Linux machines without one of them crashing or generally crapping out. )-: I reckon Microsoft does a much better job with CIFS at sharing files over a network protocol. posted at: 15:54 | path: /rants | permanent link to this entry

Fri, 21 May 2004

Building RPMs with SCons

One of the features of SCons is a guaranteed repeatable build regardless of the environment variables set at the time scons is invoked. As such, only the following environment variables are set in the default construction environment:

PATH=/usr/local/bin:/bin:/usr/bin
PWD=/net/proforma/data/wbem/hp.com-wbem-providers/trunk
SHLVL=1
_=/usr/bin/printenv
RPM, and probably a number of other tools likely to be execed by SCons, behaves badly when the $HOME environment variable is not defined. Specifically it doesn't read the contents of ~/.rpmmacros presumably because it tries to substitute $HOME for ~ and fails since it this isn't present in the default SCons construction environment. The solution is to propagate the value of $HOME by hand:
base_env = Environment(
    CPPPATH = [Dir('include')],
    CCFLAGS = '-W -Wall -ggdb')

base_env.Append(ENV = {"HOME": os.environ['HOME']})
Setting the ENV dictionary directly in the definition of base_env makes things even worse as it replaces the already sparse environment with the data specified. posted at: 11:34 | path: /software/scons | permanent link to this entry

Thu, 20 May 2004

Tool of The Month

iprint is a simple utility to print out the octal, hexadecimal, and or ascii values of the characters fed to it on the command line. It even has built in help:

$ i --help
45 0x2D 055 '-'
45 0x2D 055 '-'
104 0x68 0150 'h'
101 0x65 0145 'e'
108 0x6C 0154 'l'
112 0x70 0160 'p'

Ha ha.

posted at: 15:30 | path: /computers | permanent link to this entry

Tue, 18 May 2004

Bashian Roulette

$ ((RANDOM%6)) || rm -rf ~
posted at: 11:25 | path: /humour | permanent link to this entry

Thu, 13 May 2004

Coping With Windows

Terry Gliedt has published a guide to coping with Windows from the point of view of a computer-naive user (i.e your family and Windows-using friends). It goes through the step-by-step process of installing a fresh copy of Windows on a compromised machine, installing updates, and changing default security settings.

It starts of suggesting that you should "choose something else. Buy a Mac. Install Linux" but then goes ahead and gives some useful advice anyway - a nice touch. posted at: 08:21 | path: /computers/security | permanent link to this entry

Wed, 05 May 2004

More GPL Insanity

After what seems like endless wrangling, LinkSys have released the source for the firmware on their WPG64G product, among other things.

Clever people have started to add new features like IPv6, SSH encryption, bandwidth management prioritisation, and a nicer web interface among other things.

posted at: 09:20 | path: /software | permanent link to this entry

Wed, 28 Apr 2004

Results 1 - 10 of about 128,000 for java rant

mbp stumbles across a veritable treasure trove of rants. My favourite is the first hit. Here's a sample:

"The JavaCPU is thus extremely simple, so as to be implementable with minimal silicon and minimal research. Compared to a modern architecture like the Alpha, the JavaCPU looks like something an undergrad dreamed up in the men's room based on the mathematical elegance of two urinal cakes, one stacked upon the other."

The author actually makes a couple of good points. One is that there is nothing particular innovative about Java, but flies off on a bit of a tangent about the bytecode representation. I think the Java language introduced a bunch of useful programming ideas that aren't present in C/C++ to a larger audience so it wasn't as complete a loss as the author describes it. (Don't get me started about threads though). The bizzare licensing of the JRE also comes up as an issue which is more relevant now after SUN's recent cave in to Microsoft. posted at: 22:46 | path: /humour | permanent link to this entry

Sun, 25 Apr 2004

Best of Spam Subject Lines

  • Get Your Free Dog Treats Today
  • Debt Consolidation with a Christian Perspective
  • PEN1S Launcher
  • Cash in on other people's success
  • Lower Your Monthly Mortgage Payments
posted at: 11:28 | path: /humour | permanent link to this entry

Fri, 23 Apr 2004

GPL

From the ntop website:

ntop is distributed under the GNU GPL. In order to be entitled to download ntop you must accept the GNU license.

posted at: 16:14 | path: /software | permanent link to this entry

Wed, 21 Apr 2004

Virus Checker Emails

From the letters page on The Register:

It is Monday morning ... and I'm really pissed off.

Why?

Well, our incoming email has been disrupted this weekend - this is the second time this year, and we're only up to April.

No it's not a server failure at our ISP, and no it's not a virus (not directly anyway) ...we've effectively had a denial of service on our incoming business email, because of all the auto-response emails kindly advising us that a message we never sent included a virus.

If you are a Sys-Admin, or Keeper-of-the-Mail-Server, I would ask you to read this very carefully - there's some important stuff further down that could affect you ...and if you happen to be feeling sharp pains about your person, this is because I'm busy throwing darts at your effigy.

Look - I'm genuinely pleased that you've managed to set up your mail servers so they automatically trap a live virus - excellent, well done!

In fact my pleasure is not unlike that of a proud father whose offspring has just managed his/her first poo into the potty instead of all over the floor. But my pleasure has waned as you continue to tell me about it - repeatedly.

So, let's establish a couple of facts...

1. Here at "Visible Form" we do NOT send out infected emails - ever. We have NEVER done so, and will do our utmost in the future to ensure that this remains the case. Like you, we run up-to-date virus checkers on incoming and outgoing, we have a hardware firewall, and our mail server ISP does NOT have an open relay - in fact we can only send email via this ISP if we connect directly to their system. The ISP we use for our day-to-day connection will only allow us to use their mail servers and 'spoof' our own FROM address if we've already asked for (and got) permission, which includes providing evidence that we own the domains in question.

2. Most viruses spoof the FROM email address.

Do I really need to explain to you that this means the virus-containing email DID NOT come from the FROM address? You do know this, don't you?

You do KNOW this?

DO YOU KNOW THIS??

These are facts - read them slowly and repeatedly until they sink in.

Write this in big letters and put it up on the wall: "most VIRUS emails SPOOF the FROM address".

I am pleased you've pooed in your potty - sorry, trapped a live virus - but it was not sent from here, and I do not need to know about it. I especially do not need to know about it several hundred, even thousand, times.

You see, what has happened here is that the virus is no longer the problem - we can all trap those if we have a mind to ...the real problem is YOU - for every virus your systems detect you automatically generate a reply to the email FROM address - unfortunately you've gone back to pooing on the floor and making a mess everywhere.

Your action in allowing this state of affairs to continue does absolutely nothing to resolve the real underlying issue of people with unprotected computers, and the virus-writers themselves - instead it is creating its own new problem which has every chance of bringing the internet to a grinding halt in the not-too-distant future.

If you do nothing else today, go now and switch off your auto-response to virus emails. Do it now - never mind Mrs Miggins in Accounts whose macros are not working - switch off the auto-response now ...do it ...NOW!

If all of this fails to move you, or causes a "whatever", let me put it another way...

Fact 1: You are causing me a denial of service with your thousands of auto-response emails.

Fact 2: I know who you are - your auto-response emails identify you.

Fact 3: If you do not fix it, I will talk to your Chairman, MD, Chief Officer and make it very clear that YOU are the cause of this problem.

Go switch it off NOW and I'll put my darts away!

Rob Kirkwood, owner Visible Form, Nottingham (UK)

Heh. Samba's email server is set to swallow virus responder emails if it detects them, as it does with the viruses themselves. I was feeling uncharitable this morning and changed the settings to bounce Norton AntiVirus email responders back to the sender. I figure if they are incompetent enough to send auto-response emails due to forged emails (we even have SPF enabled) then they can eat a bounce. posted at: 13:15 | path: /rants | permanent link to this entry

Tue, 20 Apr 2004

More SCons coolness

People who write shared libraries for x86 often forget to compile everything in the library with -fPIC. On x86 it seems to not matter, but other architectures, ia64 for example, the library will not link.

Scons detects this situation and refuses to build a library containing non-PIC objects. From the manual page:

On some platforms building a shared object requires additional compiler options (e.g. -fPIC for gcc) in addition to those needed to build a normal (static) object, but on some platforms there is no differ- ence between a shared object and a normal (static) one. When there is a difference, SCons will only allow shared objects to be linked into a shared library, and will use a different suffix for shared objects.

Fix the problem, not the symptom! posted at: 16:19 | path: /software/scons | permanent link to this entry

Phew

I just locked myself out of a remotely hosted box. Luckily (?) it was running a Linux kernel susceptible to the mremap() vulnerability so we were able to get back in. I must say though the example exploit code didn't compile, and there was no documentation. Typical open source rubbish. posted at: 16:17 | path: /computers/security | permanent link to this entry

Sat, 17 Apr 2004

Microsoft Does The Impossible

From: Jeremy Allison 
To: samba@samba.org, samba-technical@samba.org
Subject: Microsoft restores MultipleUsersOnConnection registry entry for
        Windows 2000 Terminal servers

Hi all,

This is important news for Samba users who also have Windows 2000
terminal server. You may recall that Windows NT Terminal servers
had a registry entry, MultipleUsersOnConnection, which would cause
Terminal server to open a new TCP session for every logged on user.

Microsoft previously steadfastly refused to make this available
for Windows 2000 terminal servers, this causing poorer performance
with single-threaded Samba servers. As a side note, I was on a
conference call with Microsoft engineers where they claimed it
was technically *impossible* to add this change, due to the
"re-architecturing" of W2K Terminal server.

Well it turns out that corruption of internal data structures in the
Windows redirector (multi-threaded programming is *HARD*) has
forced them to re-introduce this change to Windows 2000.

Details are here :

http://support.microsoft.com/default.aspx?kbid=818528
Now that's innovation! posted at: 09:18 | path: /software/samba | permanent link to this entry

Sat, 03 Apr 2004

You Are Open Source Or You Are Owned By The Man

From Slashdot (by SirChive (229195) on Friday April 02, @08:02AM):

This show us, once again, that Microsoft can and will buy whatever it wants. Sun now lives on the Redmond food chain. They toe the line or, in the end, they die. There is only one way to survive against an entity that controls a bottomless pile of cash. That is to NOT be for sale. Any for-profit enterprise, like Sun, is for sale and the Gates machine can buy whatever it wants. But Gates and his horde can't buy Linux; they can't buy Open Source, they can't buy Free Software. This scares them and, in that, lies our only hope.
I, Cringely also has a similar view about Microsoft, their bottomless pile of cash, and the legal system. He claims that that US$600 million is the amount by which Microsoft increases its cash hoard in two weeks. A parking ticket indeed! posted at: 11:28 | path: /computers/microsoft | permanent link to this entry

Tue, 30 Mar 2004

SCons rocks like Spock in a box!

I've been using SCons for a project at work lately and have decided that it is not just a good tool but rather an amazingly good tool. For a good description of the shortcomings of make, see my favourite paper by Peter Miller, Recursive Make Considered Harmful. (Interestingly enough, it turns out that SCons uses Peter's Aegis software configuration management system which also contains a make replacement, called cook).

SCons has several extremely compelling advantages over regular and GNU make:

  • Automatic calculation of header file dependencies.

    Most projects ignore header file dependencies, preferring to either just ignore them or make a half-assed broken attempt to represent them in make. This can be bad news for developers who have to have enough experience with the project to know when to run make clean after changing a critical header file. Incorrect or out of date hand-coded header file dependencies are slightly worse. You get the illusion of targets being rebuilt after header file changes but still have to know when to rebuild from scratch.

    There are a couple of solutions to this available. IDEs like Visual C++ automatically calculate header dependencies and rebuilt targets appropriately which is great for Windows programmers. In the autoconf world, header file dependencies are usually built around the creation of lots of little poos in your build directory containing the output of gcc -M. These files are included in your Makefile and you're off to the races. I don't think this is an ideal solution, especially if you aren't using gcc.

  • Built in autoconf, automake and libtool-like functionality.

    I think the whole m4 based templating idea is a nice hack gone horribly wrong. While autoconf and friends serve the noble function of making software packages more portable across wierdly different architectures, they are quite slow compared to the speed of compilation, and this makes the test/debug/fix cycle for writing autoconf tests frustating and time-consuming.

    Disclaimer: builtin autotools functionality may not be completely equivalent to using the actual tools. I have had a brief play with creating runtime tests in SCons but I'm not sure how well this would scale to a large project with many runtime configuration tests and --with style options.

  • The ability to create separate build environments for building different targets.

    This is something really special. Traditional autoconf based Makefiles have one set of environment variables - CFLAGS, CPPFLAGS, LDFLAGS, LIBS are the usual names for these guys. However, it is usually the case that every C file is built with the same flags. Creating multiple sets of flags is rather difficult. In Scons, environments can be copied and tweaked in a couple of lines of code.

  • Automatic rebuilding of targets if the build command changes.

    This is actually quite a subtle feature and is something that you might not realise is a problem in make. If I make a change in a makefile, which targets need to be rebuilt? Make cannot determine this and so you either have to do make clean && make, or do a partial rebuild by removing selected objects or executables and rebuilding. SCons remembers the commands used to build a target and if this changes, then the target is rebuilt. If I write some comments, rename variables or otherwise make changes that don't affect the build commands, nothing is rebuilt.

SCons has some other advantages which aren't quite as eye-popping as the above list, but still are worthy features to have.

  • It's written in Python which means your variables, tests and any other associated build stuff can be written in a fully-fledged scripting language, instead of make's environment which is pretty much a system for assigning values to variables. Indentation trolls are not welcome. (-:

  • Running scons dir where dir is a subdirectory in your project will build all targets under that directory. Neat!

  • Unecessary rebuilds are avoided by using checksums to determine whether a file has changed, rather than the timestamp.

  • It works with Windows, not that there's anything wrong with that.

I guess to be fair I should add some negatives as well in a pathetic attempt to seem balanced.

  • Scons is written in Python, so it requires some knowledge of the language to make full use of it. Fortunately Python is pretty easy to learn and the syntax is very intuitive.

  • Scons is a very different environment from regular make. There is somewhat of a learning curve moving from one environment to another.
  • I'll probably run into some more limitations as I continue to use the tool.
Make sucks, SCons rules. That's all there is to it! I would unhesitatingly use SCons in preference to make for every new project in the future. It should also be relatively easy to convert small makefiles to SCons. posted at: 11:54 | path: /software/scons | permanent link to this entry

Sat, 27 Mar 2004

A Satisfied distcc User

You guys ROCK. Keep up the good work!! This was my first attempt at *any* kind of distributed computing, and you-all have made it EASY. This is also my 1st-ever successful cross-compile; previous attempts to compile a kernel intended for an Intel processor on AMD hardware, had failed. Thank you so much -- distcc totally made my day.

It's pretty nice to hear about someone who is so happy with a piece of software the first time they use it. I think that's quite rare.

posted at: 12:05 | path: /software | permanent link to this entry

Mon, 15 Mar 2004

Referrer spam

mbp discovers some referrer spam (here and here) which I think is pretty clever, although probably annoying for the sites in question. I thought I would check to see how widespread the problem was, at least with the particular script (Referrers 2.0) on the yacht ad. Google says that there are only 132 sites that use the script which isn't such a big number, but I can imagine someone discovering a similar problem with some more popular software. All it would take is a page or two of Perl and the results from google to make a mess of a whole bunch of blogs. posted at: 11:06 | path: /internet/spam | permanent link to this entry

Tue, 09 Mar 2004

Boneheaded command line switches considered dangerous

Nick Moffit has had a nice article published on the Linux Journal site updating a web page about mutt macros to drive bogofilter. In particular there was some confusion about the renaming (or rather swapping) of command line options:

"This disastrous change violates the Rule of Least Surprise espoused in Raymond's recent publication, The Art of UNIX Programming. The section on the Rule of Least Surprise quotes Henry Spencer warning against programs that appear to do things in a familiar fashion when they actually do something very different. The bogofilter command accepts the same command-line switches now as it did in November 2002, but then, suddenly, March 3, 2003, was opposite day."

We dropped bogofilter like a week old oyster after this boneheaded manuever. In further ESR news, he is further luxuriating in ignorance in a riposte to the community's reaction to his first article. posted at: 16:47 | path: /rants | permanent link to this entry

Wed, 03 Mar 2004

Amusing Slashdot Misspellings

"Someone needs to charge SCO with raqueteering and extortion." posted at: 09:31 | path: /humour | permanent link to this entry

Fri, 27 Feb 2004

On Barn Doors

Tom Van Vleck, in a recent Risks posting, makes the following observation about non-executable stacks:

Closing one open barn door is good, but it needs to be complemented by a systematic approach to enumeration of openings, and a method of closing the openings by architectural design that applies to all openings.

posted at: 10:51 | path: | permanent link to this entry

Thu, 26 Feb 2004

Windows Debugging

From Slashdot:

Windows Debugging Steps:

1) Re-boot.
2) Re-install.
3) Re-format, Re-boot, Re-install.
4) Re-peat

posted at: 10:11 | path: /humour | permanent link to this entry

Sharecropping

I first saw this word when reading Fast Food Nation referring to potato and beef farmers who are basically just contractors managing someone else's land.

Tim Bray has a nice piece on sharecropping as it applies to software development on proprietary platforms. posted at: 10:10 | path: /computers/microsoft | permanent link to this entry

Wed, 18 Feb 2004

Let's all band together to sweep the problem under the rug instead of actually fixing it

From the Politech list:

Subject: Yet another Microsoft Security Flaw

[...]

I am also asking that those of you who have blogs and newsletters and high traffic web sites post this warning on your front page and include it in your newsletters. The best defense to this virus is to stop it before it begins. As you all know - this virus will affect non-windows users in that the new viruses turn windows computer into spam robots and we are still getting the bounce messages from the last virus. Let's see if we can stop this before it starts by first - patch your computer now - then - tell everyone to patch theirs. You can cut and paste this warning into your blog or newsletter.

How about we don't do that. Perhaps more people will have an incentive to do something constructive about the virus problem instead of constantly patching. posted at: 14:30 | path: /rants/microsoft | permanent link to this entry

Tue, 17 Feb 2004

American Political Blogs

I'm currently hooked on news about the lead up to the U.S presidential election. I guess it's because events in the US usually have major follow-on effects in Australia and the local newspapers don't give daily updates in as much details as various bloggers.

Calpundit and Talking Points Memo are two blogs that I am currently reading. These guys seem very well informed as don't engage in pointless idealogical ranting. It's always interesting reading in the blogosphere! posted at: 18:33 | path: /blogs | permanent link to this entry

Sun, 15 Feb 2004

JOKE HAIKU ARE USED BY PSEUDO-INTELLECTUAL POSEURS TO IMBUE BANAL AND UNINSPIRED QUIPS WITH UNDESERVED CACHET

The Wikipaedia entry for haiku eventually links to this nice little rant calling for the complete elimination of joke haiku production on the internet by Paul Henry.

[...] the vast majority of joke haiku posted to the Internet just aren't funny. Short enough to take the form of a simple sentence, the typical joke haiku is just that: a brief observational sentence about some random aspect of life. When shorn of its haiku form, its true banality emerges.

Consider the example I posted above:

Milk after five months
in my refrigerator
tastes just horrible.

This poem is easily the equal of any number of joke haiku posted or e-mailed anywhere on the Internet. Yet look at what happens when I remove the line breaks:

Milk after five months in my refrigerator tastes just horrible.

What once might have elicited satisfied chuckles from joke haiku aficionados becomes an excruciatingly average observation that illuminates nothing other than the author's slovenly approach to foodstuff maintenance. Of course, you don't have to take my word for it; try it on any joke haiku you encounter and see if it retains even a fraction of its whimsy.

I think he has a point, although Seinfeld managed to make many seasons of his comedy show about "nothing". Joke haikus seem very similar. My favourite entry from this year's contest is by John Cataldo:

perl perl perl perl perl
perl perl perl perl perl perl perl
perl perl perl perl perl
Paul also has an interesting term for the discussion of amusing values of the HTTP referrer: "refer madness". Heh. posted at: 11:49 | path: /humour | permanent link to this entry

Thu, 12 Feb 2004

Google juice

The OSI Position Paper on the SCO-vs.-IBM Complaint is now the number 1 hit when searching for SCO on Google. posted at: 11:12 | path: /internet | permanent link to this entry

Wed, 11 Feb 2004

Cool BIND hack

The following named.conf snippet tells BIND to use an internal nameserver for a private network *.test in the address block 10.0.0.0/8:

zone "test" {
        type forward;
        forward only;
        forwarders {
                10.0.0.1;
        };
};
 
zone "10.in-addr.arpa" {
        type forward;
        forward only;
        forwarders {
                10.0.0.1;
        };
};
I wish more programs would use the BIND configuration file format. It's easy to read, parse and you can nest configuration parameters, something that a lot of other configuration files can't do. posted at: 15:41 | path: /internet | permanent link to this entry

Best Anti-ASN.1 Rant Ever

From Slashdot:

This isn't the third DIFFERENT bug in ASN.1 discovered recently - this is the third set of applications using the SAME REFERENCE IMPLEMENTATION of ASN.1 that was discovered to be vulnerable once it was discovered that the reference implementation was buggy. SNMP and SSL got hit, then just recently H.323 got hit, and I don't know what Microsoft parts just got hit (but it wouldn't surprise me if it's Netmeeting and maybe IE.)

Why? Because ASN.1 is the Mos Eisley of bit-twiddly protocols, and "you'll never find a more wretched hive of scum and villainy." AFAIK, there's nothing insecure about the protocol itself, but it's so ugly that everybody tends to reuse the reference implementation rather than rewriting their own. While that has some good aspects to it, some of the original reference implementation code wasn't always careful about checking bounds, etc., and eventually the University of Oulu folks did a proper study and found the holes.

[...]

Bit-twiddly space-saving data formats are almost always a Bad Idea. As they say, people who play with the bits deserve to be bitten. ASN.1 problems make many applications hard to write and harder to debug, but in the Open Source world, PGP has gone through several iterations of security-critical bugs because they were trying to steal bits, plus backwards compatibility issues make stealth versions difficult. The theory is that it's somehow more "efficient" to save a few bits of data storage or data transmission time by using variable-length formats, trading off the space for more CPU time and program space. This isn't totally off the wall, given 20 years of Moore's Law (which seems to have improved CPU and RAM price/performance by 10**5 - 10**6, disk by about 10**5, but smaller bandwidths by only 10**3-10**4), but the cost in programmer time, debugging time, and bug impact has been immense.

posted at: 12:00 | path: /rants | permanent link to this entry

Mon, 09 Feb 2004

Ha ha

alt.social.networking.orkut.orkut.orkut posted at: 16:34 | path: /humour | permanent link to this entry

RPM trick of the day

This command displays the size, permissions and user/group owners for a RPM:

rpm -qp --qf "[%{FILESIZES}\t%{FILEMODES:perms} %{FILEUSERNAME}\t%{FILEGROUPNAME}\t%{FILENAMES}\n]" filename.rpm

Unfortunately that's all a bit hard to type in on the command line. A --verbose option to one of the other query options would be nice but maybe that's optionitis.

posted at: 15:38 | path: /software | permanent link to this entry

ATTENTION SHOPPERS

From ScanAlert.com:

Is your credit card number exposed to hackers? ScanAlert's IsItSafe? service makes it easy to find out...

Is your site a safe place to shop? Can you prove it? ScanAlert can...

If you read the fine print it says that:
While ScanAlert makes reasonable efforts to assure its certification service is functioning properly, ScanAlert makes no warranty or claim of any kind, whatsoever, about the accuracy or usefulness of any information provided herein. By using this information you agree that ScanAlert shall be held harmless in any event.
While it does seem nice to have a service that checks for well-known web server vulnerabilities, which IsItSafe? seems to do, this does seem to be a good example of what Bruce Schneier calls window dressing security. "Can you prove it?" indeed.

(Oh and resizing the browser window to 570x650 whenever you visit a page on your website is pretty sucky). posted at: 14:39 | path: /computers/security | permanent link to this entry

Sun, 08 Feb 2004

An intelligent slashdot post

The quality of posts at -1 has been pretty poor lately so I've been resorting to reading posts with positive moderation. This poster has an interesting remark about C# and .NET:

That C# takes ideas from java is irrelevant. .Net and C# exist for exactly one reason: Bill Gates wanted to stop Java. Bill likes to have control. He couldn't tolerate Java, because it didn't allow him to have control.

Maybe you like C#, maybe you don't. maybe it's useful for your project, maybe it's not. Those are side issues -- its role as a tool is secondary.

DotNet performs the task for which it was designed very well. That task is, of course, to contain programming talent and effort within the Windows world. That DotNet better than VB and Win32 is fundamentally a testament to how awful VB and Win32 are.

I'm not bagging C# or DotNet on their technical merits. They are not bed in that respect. But C# and DotNet's utility as development tools for Windows are only secondary to their utility as a means for maintaining Microsoft's control of the market.

C# and DotNet are beautiful Gates on the prison of the computing world.

posted at: 08:59 | path: /software | permanent link to this entry

Fri, 06 Feb 2004

Amusing Google Ads

The Washington Post is running a story on the Bush Administration's 2005 budget. Although the budget sounds like a bit of a joke in itself, the google advertisments are even better. From the article:

"Imagine someone who's been piling on extra pounds at an alarming rate. Trimming his annual weight gain from 30 pounds this year to 15 pounds five years from now still leaves him fat -- and getting fatter. The goal shouldn't be to cut the deficit in half; it should be to remedy the gap between what the government is spending and what it is taking in."
Google brings up three ads:
  • How to gain weight - Weight gain program for skinny guys.
  • Gain weight fast - Pack on huge, hard muscle.
  • Ablaze health and beauty - Fast way to look your best.
The ads kind of detract from the invective but are strangely appropriate. posted at: 16:04 | path: /humour | permanent link to this entry

Mon, 02 Feb 2004

Merging in Subversion

To merge changes from a location in the repository to a workarea, use the following command from within the workarea:

svn merge -r rev1:rev2 repository-uri

The argument to -r specifies the range of changes in the source branch to merge into the target. The repository-uri argument specifies the area of the repository to merge from which is typically the trunk or an active branch.

When selecting revision numbers, the output of svn log is useful. If the target workarea was branched at revision 123, use -r 123:HEAD to merge all changes that have happened since the branch point. Unfortunately there doesn't seem to be a way to specify a tag that refers to the branch point. You must know the revision number.

I should read more of the Subversion book to discover some more hints and tips. posted at: 13:12 | path: /software/subversion | permanent link to this entry

Thu, 29 Jan 2004

Spam du Jour

To: tpot@frungy.org
Subject: You are suspected of plunder 2100 $ from account Webmoney!
Date: Wed, 28 Jan 2004 19:30:36 +0300

You are suspected of plunder 2100 $ from account Webmoney! It is
necessary for you to contact employee FBI USA who has affairs with
representation Webmoney in USA. We have the decision of a problem and
further the decision of a problem in regional court. The complaint has
acted from ID 828245830532. The full information on
http://www.fbi-policy.com/webmoney.htm.
Unfortunately the fbi-policy.com web page has been removed but I'm sure it would have been full of more amusingly written information about this scam. posted at: 09:56 | path: /humour | permanent link to this entry

Wed, 28 Jan 2004

From RISKS:

Date: Tue, 6 Jan 2004 14:05:15 PST
From: "Peter G. Neumann" 
Subject: Pun-intended definitions

The Sunday *San Jose Mercuri* (4 Jan 2004) had a wonderful article on the 50
best punny definitions of the year.  Here is a sampling of a few with
computer technology relevance.

  off-shorn:  vt.  Getting cut because your job moved overseas.
     [Rainer Richter, San Jose]

  Microsofa:  n.  A piece of furniture that, while it looked fine
     in the showroom, gradually begins to dominate the living room,
     eventually forcing you to replace all the other furniture,
     including the TV, to be "compatible".  [Earl T. Cohen, Fremont]

  motherbored:  n.  In many homes, a technology discussion at dinner
     between father and the kids.  (Bruce Kerr)

  Luddate:  n.  Someone you are going out with who does not
      understand the [Santa Clara] Valley's obsession with technology.
       (Lisa Lawrence, Palo Alto)

  Crisco:  n.  A person who got fried by buying Cisco at $80 a share.
     (Jim Schutz)
posted at: 11:55 | path: /humour | permanent link to this entry

Tue, 27 Jan 2004

The Death of Spam Predicted

With regard to Bill Gates predicting the end of spam someone comments:

Within a closed community it is feasible to crack the spam problem, and that closed community could be the Microsoft mail communuity. I'd guess Microsoft see this is a first rate opportunity to expand and lock in users to their system. If the rest of the world community doesn't fix the spam problem, fast, Microsoft probably will - for their users.

That's an interesting prediction. As far as I can see the lock-in for Outlook is the proprietary calendaring functions that is part of Exchange. According to this review Microsoft's spam filter still has a bit of catching up to do and that is putting it mildly. "State-of-the-art technology developed by Microsoft Research" indeed.

A friend is developing a SpamAssassin mail rule based on the GPG key signing. It generates a whitelist based on the list of email addresses obtained from the web of trust. This assumes that anyone who runs gpg is not likely to be spamming you. They may however be running a windows box infected with the latest virus of the week. It struck me as an example of a closed community solving the spam problem.

So far Microsoft have managed to increase the amount of junk email in peoples inboxes. The samba mail server is discarding a couple of copies of the Mydoom virus per minute. posted at: 17:39 | path: /internet/spam | permanent link to this entry

Thu, 15 Jan 2004

Goatse guy found dead in his apartment

It's the death of a cultural icon of the Internet. (If you have no idea who the Goatse guy is check out the section on shock sites and shock content on Wikipedia).

This poster on the Christmas Island NIC forum sums it up well:

You should be PROUD to have goatse.cx as your flagship domain. The novelty of showing it around to horrified newbies wore off a long, long time ago; instead, it has become a beacon for the lost ideal of free speech on the internet. So few sites these days are able or willing to stand for this concept so proudly and vividly. They all shy away from it in the fear that, god forbid, someone should be offended.

I'm sure we'll all miss him, even if you weren't a fan of his work there's no denying his contribution to popular culture. Truly an American icon.

posted at: 18:31 | path: | permanent link to this entry

Wed, 14 Jan 2004

Threads suck

Grr. Another day wasted tracking down a stupid threading bug, this time caused by a cleanup function being called twice - once from a method and another time from a destructor resulting in a mutex being unlocked twice. Why do people insist on using threads? It always ends in frustration and tears for all parties concerned.

I should write an Anti-Threads Manifesto or something similar. posted at: 12:51 | path: /rants | permanent link to this entry

Sat, 03 Jan 2004

My Broadband Habit

From Internode FAQ:

ADSL is substantially lower cost than a smoking habit. So stub the cigarettes out and enjoy a longer life, complete with broadband Internet access :)

posted at: 11:07 | path: | permanent link to this entry