Sea of Noise


Mon, 23 Jul 2007

Ode to a Faithful Linux Server

Once upon a time there was a server...

She started out life in the summer of 1997 as a generic Pentium 166 server with 128 MB of RAM and a little IDE drive, but she was quickly named "nancy" (after the character in the Firesign Theatre's Nick Danger sketch).

Soon, nancy sported an installation of Slackware Linux with the spiffy 2.0.30 kernel and, by fall, she was up and running on the 'net, where she handled DNS, RADIUS, SMTP, and POP3 for my ISP. (Of course, nancy was hardly alone. Over the years her "friends" included danger, catherwood, and bradshaw, as well as her alter-egos bettyjo, melanie, and audrey.)

By 1998, nancy was busy handling thousands of email accounts, as well as serving as the primary RADIUS server for over a thousand dial-up customers. That might seem like a lot for a machine in her hardware class, but in fact nancy rarely broke a sweat in those days. For one thing, she ran Linux, with a custom-compiled kernel and no windowing system to slow her down. For another, those were still the halcyon days of the 'net, with spammers only just beginning to make their slimy presence felt.

nancy's name would show up in error messages, of course, with the result that more than one of our customers at first mistook her for a very diligent employee. Even after they learned the truth--that nancy was just a faithful little server, naked and half-exposed in the server room after I was too lazy to replace the side panel of her case one day--customers would occasionally ask after her when we spoke on the phone. Clearly, I wasn't her only admirer. nancy returned our affection, happily staying up and operational for a year or two between being moved to new locations.

Eventually, the burden of continual abuse by spammers and the growing size of email messages meant that nancy could no longer serve so many customers. Yet, she continued to serve in some capacity on our network through three companies, in three offices, over ten years--long after her hardware had been depreciated on the books. Toward the end of her days, nancy was semi-retired, serving as an email, DNS, and shell server on our office LAN, but devoting most of her CPU cycles to cracking RC5.

Which brings us to now. As of today, nancy will be retired. She's still just as reliable as ever (yes, amazingly, she's still running on her original hardware, hard drive included!), but we're working on making our business as "green" as possible, and sadly she no longer does enough work to justify her carbon footprint.

So, farewell nancy, my faithful server! May you dream of penguins as you slumber. And, who knows? Maybe one of your new, fancy brethren will have a bad day and you'll get called out of retirement one day... If so, I know you'll be as ready as ever.

[/it/linux] permanent link

Tue, 05 Sep 2006

Mathematics for Computer Science

I'm here to report that printing all the materials for the Spring 2005 version of MIT's 6.042J, Mathematics for Computer Science (known elsewhere as Discrete Math or Discrete Structures) will consume almost an entire ream of paper.

It's a very nice set of materials, though, covering Logic, Sets, Proofs, Induction, Number Theory, Graph Theory, Summations, Approximations, Asymptotics, Recurrences, Counting, Generating Functions, Probability, Conditional Probability, Independence, Random Variables & Distributions, Expectation, and Random Walks.

See also the Fall 2005 version of the same course. The notes aren't as nice, but the coverage varies slightly.

[/it] permanent link

Sun, 16 Jul 2006

Generating Random Data With jot

Today's entry in the "do one thing and do it well" sweepstakes is a nifty little utility I found just lying around on my FreeBSD system with an apropos random. I need some psuedorandom data to stick in large file and I figured I ought to be able to get it from the shell. Sure enough, jot was just what I wanted!

Need to think of a number between 1 and 10?

jot -r 1 1 10

Need an 80-character line of random printable characters?

jot -r -s "" -c 80 ! ~

You can do the same thing using ASCII codes to reference the range of characters:

jot -r -s "" -c 80 33 126

I suspect you can see how the above would be nice for testing scripts or generating Lorem Ipsum style filler. Of course, you can use a wider range of characters if you're not going to look at them on-screen, and that's very nice for filling up a file:

jot -r -s "" -c 1024 0 255 > foo

Voila! A nice, not-very-compressable 1k file!

Don't delay! Try a man jot at a shell prompt near you today!

[/it] permanent link

Thu, 13 Jul 2006

or vs. || in Perl

I don't want to tell you how long I banged my head on this until I remembered that the precedence of "or" and "||" differs in Perl... Here's my attempt to save someone similar frustration...

I was trying to use Text::PraseWords and my function wasn't working. Finally, I reduced it to this test program, very similar to the example in the documentation:


#!/usr/bin/perl -w
use Text::ParseWords;
@fields = &parse_line(',', 0, q{foo,bar,baz}) || die "siteindex is corrupt!\n";
$i = 0;
  foreach (@fields) {
      print "$i: <$_>\n";
      $i++;
  }

Instead of printing "0: foo", "1: bar", etc. as expected, I got just "0: 3". I quickly figured out that this was the size of the array, and proved it by changing my test string, but why was this happening? After ruling out the delimiter, I knew it had to have something to do with the die statement...

Of course, I immediately thunked myself in the forehead, realizing that my habit of using || instead of or had just gotten me into trouble. Because || has a high precedence, @fields was getting assigned the result of the logical comparison, rather than the array returned by parse_line.

This variant works perfectly:


#!/usr/bin/perl -w
use Text::ParseWords;
@fields = &parse_line(',', 0, q{foo,bar,baz}) or die "siteindex is corrupt!\n";
$i = 0;
  foreach (@fields) {
      print "$i: <$_>\n";
      $i++;
  }

It's those little things we "know" but forget that come back to bite us, isn't it? Having whipped off some cool scripts recently, I was confident that I wasn't doing anything dumb, until I was forced to prove otherwise. Pride goeth before destruction, I guess.

[/it] permanent link

Mon, 10 Jul 2006

Perl's print() Returns 1 On Success

Holy face of Jesus in a pot roast, Batman! Why does print() return 1 on success?

Huh.

Who woulda thunk it?

Not me, that's for sure.

Explains a lot, though.

Obviously there's some kind of Deep Magic afoot about which I am blissfully ignorant..

I guess it's so you can write stuff like this:

print "foo" || die "Couldn't write our stuff\n";

We now return to our regularly-scheduled programming.

[/it] permanent link

Tue, 16 May 2006

COMEFROM Considered Harmless

We all know that GO TO is considered harmful. Does that mean COMEFROM should be considered harmless?

[/it] permanent link

Mon, 12 Dec 2005

Google Toolbar for Firefox

Apparently Google got around to releasing a version of their toolbar for Firefox when I wasn't looking. Seeing the PageRank for each page as I surfed was the one thing I missed about MSIE. Now, not only can I see it in Firefox, it's a tiny little display in the bottom right corner of the window even when the rest of the toolbar isn't being displayed. Very cool.

[/it] permanent link

Sun, 11 Dec 2005

Firefox 1.5 Is a Real Product; MSIE 7 Is Vaporware

An obvious point, but someone had to make it, so Asa Dotzler did: Firefox 1.5 should be compared against the competition, not against something that may or may not be released sometime in the future.

[/it] permanent link

Wed, 30 Nov 2005

Yet Another MSIE Security Hole

TrojanDownloader:Win32/Delf.DH exploits an unpatched vulnerability in Microsoft Internet Explorer to download a trojan horse to Windows computers. The vulnerability was reported all the way back in May, but Microsoft has yet to patch it.

Everyone who's shocked, please raise your hand.

[via ZDNet]

[/it] permanent link

Thu, 07 Jul 2005

Firefox: The One That Blocks All the Schmutz!

Blake Ross, by way of his grandfather, has found a wonderful new slogan for marketing Firefox: "The one that blocks all the schmutz"!

[/it] permanent link

Mon, 18 Apr 2005

Software to Change the World

Your thought for today:

If you want to do something that's going to change the world, build software that people want to use instead of software that managers want to buy. - Jamie Zawinski

[/it] permanent link

Tue, 03 Aug 2004

Excel Considered Harmful For DNA Research

Look out! Excel's pesky autocorrect "feature" can ruin your DNA data. [via boingboing]

[/it] permanent link

Sat, 24 Jul 2004

The Sakai Project

The Sakai Project produces open source Collaboration and Learning Environment software. The project went to Release Candidate 1 last week. It's exciting to see universities, where the Free Software concept was born, starting to get up to steam with Open Source and Open Content. (MIT, a founder of the Sakai Project, is also an Open Content leader with its OpenCourseWare.) See also the article at The Chronicle of Higher Education. [via metafilter]

[/it] permanent link

Sat, 17 Jul 2004

Why's Poignant Guide to Ruby

A programming guide that might be fun to read even if you never plan to use Ruby: Why's Poignant Guide to Ruby.

This is just a small Ruby book. It won't crush you. It's light as a feather (because I haven't finished it yet--hehe). And there's a reason this book will stay light: because Ruby is simple to learn.

[via metafilter]

[/it] permanent link

Fri, 16 Jul 2004

Frame Injection Vulnerability

Secunia has reported another potential vulnerability in multiple browsers. (Mozilla 1.7, which I'm currently running, isn't affected; but older versions are.)

I'm not sure "vulnerability" is quite the right word. It's more of a design flaw: a malicious site could load content into a frame of another page (say, your bank's site) and mislead you into thinking it was safe. Of course, there are those of us who say that frames are, in general, pretty much a design flaw...

[via Laporte]

[/it] permanent link

Wed, 14 Jul 2004

What the Font?

Here's a nifty tool that will identify the font in a scanned image. [via metafilter]

[/it] permanent link

Fri, 09 Jul 2004

Security Patch for Mozilla 1.7

If you're using Mozilla under MS Windows, there's a security update you should read.

[/it] permanent link

Sun, 27 Jun 2004

Gnomedex

Comdex may be dead, but Gnomedex 4 begins September 30, 2004 in Lake Tahoe.

[/it] permanent link

Sat, 26 Jun 2004

Researchers Warn of Infectious Web Sites

Here's another good reason to stop using MS Internet Explorer and install Mozilla or Opera instead. (Or, of course, Lynx. But, then, if you already know about Lynx, I probably don't need to tell you that MSIE sucks...)

[/it] permanent link

Thu, 03 Jun 2004

Open Source Applications Foundation

The Open Source Applications Foundation exists to "create and gain wide adoption of Open Source application software of uncompromising quality". Their first project is Chandler, an Open Source personal information manager. That seems like a good place to start, and the team includes several well-known, reputable players. Worth keeping an eye on, even if you're not ready to roll up your sleeves and try out the development release.

[/it] permanent link


Syndicate Me via RSS!
(Instructions)

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Powered by Blosxom!