Stardate 60728.4, Trekkies leave Mom’s basement for the day

Captain’s log, Stardate 60728.4 (that’s September 23, 2006, at 10:00 AM in terrestrial time, you puny Earthling): A bunch of Trekkies descended on the Morris County Library to celebrate the 40th Anniversary of Star Trek, bringing their poor hygiene and ridiculous costumes with them.

William Shatner said it best: Get a life.

You know … move out of your mother’s basement. Stop wearing those goofy Lycra jumpsuits. Stop reaching out at your friends gasping “Khan …” The phrase “First Contact” should describe that epic moment when, some day, you might get laid–not the regular re-enactment of your friend wearing Latex pointy ears pretending to be a Vulcan as you “test warp technology.”

Thank you. This has been a public service announcement.

(Here’s an article in the Daily Record by Rob Seman about the event.)

Tags:
,

Super Halloween costumes at CostumeSuperCenter.com

September is almost over and October is just around the corner, which means it will be Halloween soon! This also means you probably want to get yourself a Halloween costume. Here’s a great site online that offers a nice variety of costumes for all ages, CostumeSuperCenter.com.

Costume SuperCenter has Over 250 Infant and Toddler Costumes
Free Shipping at Costume SuperCenter
Hot Pirates of the Caribbean Costumes at Costume SuperCenter

Go check them out. Apparently, Steven Mandell (founder of Party City) is involved in Costume SuperCenter to some degree, too. Their corporate headquarters are right here in Northern New Jersey, over in West Caldwell.

Tags:
,
,
,

Debian printing problem? “DMA write timed out”? Try this …

Last weekend, I had the pleasure of two power outages, one in the early morning and one very late at night. (Damn the wholly unreliable electric utility company in this town.) I woke up the next morning to find one of my boxes had suffered physical disk failure–that lovely grinding sound of a disk head skipping across the surface of the platter. Luckily, the last time something like this happened, I moved everything to a RAID-1 (mirrored) setup as well as performing daily snapshot backups. Everything, except of course, the root filesystem. That remained on a crappy little 1 GB drive and snapshot backups were taken of that daily, too. Of course, the drive that died? The root filesystem.

No problem, I thought. I’ll just yank the drive, replace it with a spare sitting on my desk, restore the backup using a bootable Linux rescue CD, and be back up and running in no time. Well, you guessed it: I restored the root filesystem, wrote the master boot record (MBR) with lilo using the restored lilo.conf … rebooted … and, it wouldn’t boot properly. When trying to boot the initrd, it crapped out with a kernel panic. I futzed with this for a good many hours, trying all sorts of stupidity to try and get it to boot. Finally, I gave up: I downloaded the latest Debian netinst CD image in the “testing” tree and did a fresh install of Debian “etch” beta 3 onto this new disk.

The install went smoothly even though it took a good long time (I only have a 384K SDSL) to install over the net. Once I got the minimal install booting, I started the tedious process of manually restoring files out of the root filesystem by hand. Eventually, I got enough restored and working so that DNS, mail and web services were back online. However, one place I ran into a snag was printing. I couldn’t get LPRng to spool anything to /dev/lp0. This used to work … so, what changed?

Previously, I ran kernels that I configured and compiled myself. This time, I decided to try out a Debian kernel package. The more packages I can run off-the-shelf, the easier it is for me to keep current. So, the symptom of my printing problems looked like this:

$ echo "test" >/dev/lp0

It would just hang there. Looking at /var/log/kern.log, I’d see:

DMA write timed out
parport0: BUSY timeout (1) in compat_write_block_pio

Well, this was annoying. After much Googling and searching various bug databases, it seemed that this is a frequently asked question with very few decent answers. Looking at Documentation/parport.txt in the Linux kernel source, it recommends disabling CONFIG_PARPORT_PC_FIFO (which it admits is not a module option but should be) as a step in troubleshooting problems. Looking at the kernel .config for my previous, hand-build kernel, I notice that I had this option disabled. Looking at the Debian kernel image’s .config, I notice they build the kernel with this option enabled.

After disabling CONFIG_PARPORT_PC_FIFO and recompiling my kernel modules, I installed the new parport_pc.ko module and loaded it. As you would have guessed, the printer started working with the newly compiled module. This is what the dmesg looked like with the Debian modules:

pnp: Device 00:09 activated.
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
parport0: Printer, Canon BJC-8200
lp0: using parport0 (interrupt-driven).

Here is what it looks like after disabling CONFIG_PARPORT_PC_FIFO:

pnp: Device 00:09 activated.
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]
parport0: Printer, Canon BJC-8200
lp0: using parport0 (interrupt-driven).

The COMPAT, ECP and DMA are gone, but at least my printer can print again!

I’ve gone and submitted Bug #388309 in Debian BTS. Hopefully, this information will help others with their printing problems, or at least get someone to tell me how else I could fix mine.

Tags:
,
,
,
,
,

sparkle.gif, the <blink> tag of the modern web

So, I mentioned to some folks the other day about fun you can have with animated GIFs like sparkle.gif and CSS styling of elements. It’s an effect whose obnoxiousness is tantamount to the <blink> tag from the early days of the web. (Combine that with the <marquee> tag and you’ve got all the ingredients for “web n00b” goodness.)

Here’s an example of how to use the sparkle.gif to decorate text:

ZOMG, this is SO SHINY!!!@#!

You can stop convulsing now. I’m sure there’s a special place reserved in Hell for me, now.

Tags: , , , ,

It takes grant money to teach kids to cross the street? Are you kidding me?

Apparently, the Morris County DOT received a $150K grant from the NJ Transportation and Planning Authority to teach kids to walk to school in Wharton, NJ.

Twenty-three seventh-grade students from a pre-algebra class at MacKinnon Middle School took part in a “walkability” study in March to evaluate three routes to school that were designated safe by the borough police department.

Is this for real? I really want to see what the other routes that weren’t designated safe actually look like. What, are there potholes at the crosswalks or something?

This kind of modern parenting is making me sick to my stomach. If you can’t adequately teach your child to navigate reasonable risk: crossing streets, walking less than 3 miles to school, etc., then how do you ever expect to teach them to handle dangerous risks, like drugs and violence? I’m in favor of reducing unnecessary risks, but you also have a responsibility to teach kids respect for danger and risk by exposing them to it in safe and controlled ways. If you make generally safe activities too safe, you reduce the opportunities for your children to develop the emotional and intellectual tools required to handle danger in situations where it really matters.

I am ashamed of being a parent today, watching what is ridiculous stupidity become “normal.” When it takes $150K to teach a school full of kids to walk less than 3 miles to school safely, we have failed them as parents and educators.

Tags:
,
,

del.icio.us/dossy links since September 11, 2006 at 11:16 AM

del.icio.us/dossy (RSS) links since September 11, 2006 at 11:16 AM:

Joe asks, “Why go to college?”

Joe Manna asks, “Why or why not go to college?” There’s plenty of answers to this question, but I think most of the common ones miss the mark.

Joe, when I first started college, I felt similarly to what you expressed. I was frustrated by a very uninspiring required core curriculum. However, as I continued (and nearly dropped out), I eventually figured out what I had been missing.

College is just another concentration of people, so immediate access to a wide variety of minds was readily accessible. There were a large number of average folks–no surprise–but, there was also a good number of very bright people. A college concentrates these people into a particular area, so it increases your odds of meeting them, as opposed to meeting them randomly on the job, or out in the rest of the world. There are people who I met at college who I still periodically keep in touch with today and my life has been made better for it. I don’t know if I’d have met those same people, otherwise.

Another benefit of having access to these people is, when you know what you want to learn, you can hunt down the right people who really know their stuff. I learned more in a 30 minute conversation with the right person than what I probably would have learned spending a week reading a book, or spending 3 months on the job, “doing it.” Of course, there are some skills where you only improve at through practice and there’s no substitute for hands-on experience, but there’s also a whole realm of knowledge that is very time-consuming to deduce experimentally, but being able to ask the right questions can help you understand it very quickly.

Of course, this doesn’t mean you can’t be successful if you don’t go to college. But, if you take full advantage of it, I definitely think it can give you an “edge” over your competition–those who don’t. Naturally, the opposite is true, too: just because you go to college doesn’t mean you’ll gain any real benefit from it. Your education is an active experience, not a passive one. You don’t benefit from just going and being there. It’s what you do when you’re there that makes the difference.

I’m sure everyone has their own reasons for or against going to college. I’d like to hear about them … share them with me in the comments section below. Thanks!

Tags:
,

Share your books with Bookmooch

Bookmooch: New life for Old books

I’m always happy to see successful projects that use AOLserver. I know John Buckman has been working hard on his latest creation, Bookmooch, a community for exchanging used books.

Tonight, a co-worker pointed out that this week’s TWiT Inside the Net episode 33 podcast is about Bookmooch! You can download the MP3 (18.4 MB) and listen for yourself. It’s a good show, but I’d like to just highlight a portion toward the end of the show.

At 30:53 (30m 53s) into the show, Leo Laporte asks John, “What did you write Bookmooch in, John?”

John responds, “Tcl,” which unsurprisingly resulted in a response of shock and disbelief from Leo and Megan Morrone. Then, John goes on to mention AOLserver at 31:30 and gives it a quick plug (thanks, John!).

Leo asks at 31:54, “You’re kind of swimming upstream, you’re not doing PHP, MySQL, all the traditional LAMP stuff?”

John responds at 32:00, “Magnatune is all PHP and MySQL and when we got Slashdotted I realized that it was not a very scalable platform. I’ve written some articles, one for Sysadmin Magazine, another one for Linux Journal, about surviving Slashdot, and it takes a lot of hardware if you want to scale, a lot of machines. The only way I could do Bookmooch and not charge is to do it on one or very few machines.”

He goes on to say at 32:39 that Bookmooch is powered by a single 1.2 GHz PC with a 120 GB drive supporting 280K hits a day. While this is a respectable amount of traffic, I’m betting that AOLserver isn’t even breaking a sweat, yet. It’ll be interesting to see how far John can push it before he needs to split traffic across two servers.

I’m really happy that John was able to get on TWiT and talk about Bookmooch, but I especially appreciate the fact that he gave AOLserver almost a full minute of his interview talking about it. I’m not sure how large TWiT’s Inside the Net podcast’s reach is, but I’m sure a lot more people have heard about AOLserver now that John’s mentioned it. Thanks again, John.

Update: Here’s John’s interview in Red Hat Magazine about Magnatune.

Tags:
,
,
,
,
,

Client-side query term highlighting demo using jQuery

Yesterday, the subject of “static vs. dynamic websites” came up and an example of “something that requires dynamic page assembly” was search query term highlighting. In other words, using the HTTP Referer header (yes, it’s misspelled but that’s how it is in the spec) header and parsing it and if it’s a click-through from a search engine results page (SERP), using the search terms to highlight occurrences of them in the page.

I argued that while you could do this server-side, that this wasn’t necessary; it could be done client-side, too. In modern browsers, the “referer” (sic) information is available through JavaScript in the document.referrer (spelled correctly) variable. (NB: If you’re looking for document.referer, you’ll get frustrated. It’s actually spelled correctly in JS.)

As my suggestion to use JS and DHTML on the client-side wasn’t getting across, I decided to implement a quick proof-of-concept demo using jQuery, a fantastic JavaScript library that’s light on bytes but heavy on the features. Here’s a link to the demo:

Client-side query term highlighting demo using jQuery

Here’s the few lines of CSS and JS that makes it work:

</p> <style type="text/css"> .qterm { color: #444; background-color: #ee9; font-weight: bold; } a span.qterm { color: #00f; text-decoration: underline; } a:hover span.qterm { color: #666; } </style> <p><script language="JavaScript"> $(document).ready(function() { if (!document.referrer) return; var matches = document.referrer.match(/[?&]q=([^&]*)/); if (!matches) return; var terms = unescape(matches[1].replace(/\+/g, ' ')); var re = new RegExp().compile('(' + terms + ')', 'i'); $("body *").each(function() { if ($(this).children().size() > 0) return; if ($(this).is("xmp, pre")) return; var html = $(this).html(); var newhtml = html.replace(re, '<span class="qterm">$1</span>'); $(this).html(newhtml); }); }); </script></p> <p>

It is really that simple. Now you see why I love jQuery.

Tags:
,
,
,
,
,

del.icio.us/dossy links since September 4, 2006 at 09:25 AM

del.icio.us/dossy (RSS) links since September 4, 2006 at 09:25 AM: