Roll your own news aggregator in PHP

M.Kelley: I’m also wondering how hard would it be to pull a PHP/MySQL (or .Net like BH uses) tool to scrape the syndicated feeds off of websites and put together a dynamic, constantly updated website.
It’s almost trivial. So simple that I hesitate to even call it “programming.” And there’s no need for MySQL at all–it can be done with a tiny bit of PHP. Since it’s so simple, and potentially so useful, it’s a great first project in PHP.

It’s also terribly addictive–I quickly found myself assembling my favorite news sources and creating my own online newspaper. To a former newspaper editor (hey, they were student papers, but one of them was at Mizzou, and in my book, if you can be sued for libel and anyone will care, it counts), it’s great fun.

All you need is a little web space and a writable directory. If you administer your own Linux webserver, you’re golden. If you have a shell account on a Unix system somewhere, you’re golden.

First, grab ShowRDF.php by Ian Monroe, a simple GPL-licensed PHP script that does all the work of grabbing and decoding an RDF or RSS file. There are tons of tutorials online that tell you how to code your own solution to do this, but I like this one because you can pass options to it to limit the number of entries, and the length of time to cache the feed. Many RDF decoders fetch the file every time you call them, and some feeds impose a once-an-hour limit and yell at you (or just flat ban you) if you go over. Using existing code is a good way to get started; you can write your own decoder that works the way you want at some later date.

ShowRDF includes a PHP function called InsertRDF that uses the following syntax:
InsertRDF("feed URL", "name of file to cache to", TRUE, number of entries to show, number of seconds to cache feed);

Given that, here’s a simple PHP page that grabs my newsfeed:


<html><body>

<?php include("showrdf.php"); ?>

<?php

// Gimme 5 entries and update once an hour (3600 seconds)

InsertRDF("https://dfarq.homeip.net/b2rss.xml", "~/farquhar.cache", TRUE, 5, 3600);

?>

</body></html>

And that’s literally all there is to it. That’ll give you a very simple HTML page with a bulleted list of my five most recent entries. Unfortunately it gives you the entries in their entirety, but that’s b2’s fault, and my fault for not modifying it. I’ll be doing that soon.

You can see the script in action by copying and pasting it into your Web server. It’s not very impressive, but it also wasn’t any effort either.

You can pretty it up by making yourself a nice table, or you can grab a nice CSS layout from glish.com.

I can actually code tables without stealing even more code, so here’s an example of a fluid three-column layout using tables that’ll make a CSS advocate’s skin crawl. But this’ll get you started, even if that’s the only useful purpose it serves.


<html><body>

<?php include("showrdf.php"); ?>

<table width="99%" border="0" cellpadding="6">

<tr>

<td colspan="3" align="left">
<h1>My personal newspaper</h1>
</td>

</tr>

<tr>

<td width="25%">

<!--- This is the leftmost column's contents -->

<!--- Hey, how about a navigation bar? -->

<?php include("navigationbar.html"); ?>

</td>

<!--- Middle column -->

<td width="50%">

<p><h1>Dave Farquhar</h1></p>

<?php

// Gimme 5 entries and update once an hour (3600 seconds)

InsertRDF("https://dfarq.homeip.net/b2rss.xml", "~/farquhar.cache", TRUE, 5, 3600);

?>

</td>

<!--- Right sidebar column -->

<td width="25%">

<p><h2>Freshmeat</h2></p>

<?php

InsertRDF("http://www.freshmeat.net/backend/fm-releases-software.rdf", "~/fm.cache", TRUE, 10, 3600);

?>

<p><h2>Slashdot</h2></p>

<?php

InsertRDF("http://slashdot.org/developers.rdf", "~/slash.cache", TRUE, 10, 3600);

?>

</td>

</tr>

</table>

</body></html>

Pretty it up to suit your tastes by adding color elements to the <td> tags and using font tags. Better yet, use the knowledge you just gained to sprinkle PHP statements into a pleasing CSS layout you find somewhere.

Finding newsfeeds is easy. You can find everything you ever wanted and then some at Newsisfree.com.

Using something like this, you can create multiple pages, just like a newspaper, and put links to each of your files in a file called navigationbar.html. Every time you create a new page containing a set of feeds, link to it in navigationbar.html, and all of your other pages will reflect the change. This shows another nice, novel use of PHP’s niceties–managing things like navigation bars is one of the worst things about static HTML pages. PHP makes it very convenient.

A b2 user looks longingly at Movable Type

This web site is in crisis mode.
I’ve been talking the past few days with a lot of people about blogging systems. I’ve worked with a lot of them. Since 1999, I’ve gone from static pages to Manilla to Greymatter to b2, and now, I’m thinking about another move, this time to Movable Type.

At the time I made each move, each of the solutions I chose made sense.

I really liked Manilla’s calendar and I really liked having something take care of the content management for me. I moved to Greymatter from Manilla after editthispage.com had one too many service outages. (I didn’t like its slow speed either. But for what I was paying for it, I couldn’t exactly complain.) Greymatter did everything Manilla would do for me, and it usually did it faster and better.

Greymatter was abandoned right around the time I started using it. But at the time it was the market leader, as far as blogs you ran on your own servers went. I kept on using it for a good while because it was certainly good enough for what I wanted to do, and because it was super-easy to set up. I was too chicken at the time to try anything that would require PHP and MySQL, because at the time, setting up Apache, PHP and MySQL wasn’t exactly child’s play. (It’s still not quite child’s play but it’s a whole lot easier now than it used to be.)

Greymatter remained good enough until one of my posts here got a hundred or so responses. Posting comments to that post became unbearably slow.

So I switched to b2. Fundamentally, b2 was pretty good. Since it wasn’t serving up static pages it wasn’t as fast as Greymatter, but when it came to handling comments, it processed the 219th comment just as quickly as it processed the first. And having a database backend opened up all sorts of new possibilities, like the Top 10 lists on the sidebar (courtesy of Steve DeLassus). And b2 had all the basics right (and still does).

When I switched to b2, a handful of people were using a new package called Movable Type. But b2 had the ability to import a Greymatter site. And Movable Type was written in Perl, like Greymatter, and didn’t appear to use a database backend, so it didn’t appear to be a solution to my problem.

Today, Movable Type does use a MySQL backend. And Movable Type can do all sorts of cool stuff, like pingbacks, and referrer autolinks. Those are cool. If someone writes about something I write and they link to it, as soon as someone follows the link, the link appears at the bottom of my entry. Sure, comments accomplish much the same thing, but this builds community and it gives prolific blogs lots of Googlejuice.

And there’s a six-part series that tells how to use Movable Type to implement absolutely every good idea I’ve ever had about a Weblog but usually couldn’t figure out how to do. There are also some ideas there I never conceived of.

In some cases, b2 just doesn’t have the functionality. In some cases (like the linkbacks), it’s so easy to add to b2 even I can do it. In other cases, like assigning multiple categories to a post, it’s difficult. I don’t doubt b2 will eventually get most of this functionality. But when someone else has the momentum, what to do? Do I want to forever be playing catch-up?

And that’s my struggle. Changing tools is always at least a little bit painful, because links and bookmarks go dead. So I do it only when it’s overwhelmingly worthwhile.

Movable Type will allow you to put links to related entries automatically. Movable Type will help you build meaningful metatags so search engines know what to do with you (MSN had no idea what to do with me for the longest time–I re-coded my page design a couple of weeks ago just to accomodate them). MT will allow you to tell it how much to put into your RSS feed (which I’m sure will draw cheers from the poor folks who are currently pulling down the entire story all the time).

MT doesn’t have karma voting, like Greymatter did (and I had Steve add to b2). I like it but I can live without it. I can probably get the same functionality from page reads. Or I can just code up a “best of” page by hand, using page reads, feedback, and gut feeling as my criteria.

The skinny: I’m torn on whether I should migrate. I stand to gain an awful lot. The main reason I have to stay with what I have is Steve’s custom code, which he worked awfully hard to produce, and some of it gives functionality that MT doesn’t currently have. Then again, for all I know it might not be all that hard to adapt his code to work with MT.

I know Charlie thought long and hard about switching. He’s one of the people I’ve been talking with. And I suspected he would be the first to switch. The biggest surprise to me when he did was that it took him until past 3 p.m. today to do it.

And I can tell you this. If I were starting from scratch, I’d use Movable Type. I doubt I’d even look at anything else.

Straight talk on cheap laptops

I’ve been getting lots of traffic ever since we started talking about the Sotec 3120x laptop here last week. It looks like an era of inexpensive laptops is about to arrive, because the Sotec isn’t your only choice.
Sam’s Club sells a variant of the 3120x for about the same price as Wal-Mart, but it comes with a 30GB drive in place of the 20.

Steve DeLassus tells me a number of places have been hawking Toshiba Satellite 1115-S103 laptops in the sub-$1000 price range after coupons and rebates and other marketing gyrations. Suggested retail price on it is $1099. Street price should be $1049 or lower, as that’s Toshiba’s price if you buy direct. Toshiba’s offering a $200 mail-in rebate. So at the very worst, you can get a Satellite 1115-S103 for $849 if you buy it direct from Toshiba.

And then I did some checking on a hunch. Dell’s offering its Inspiron 2650C for $899 ($849 through 12/11). HP is offering its Compaq Presario 905us notebook with an Athlon XP 1400, 256 MB RAM, DVD, 14.1″ LCD for $999 with a $100 rebate. The HP Pavilion ze4101 has a faster processor but less memory, for the same price. There are some variants on the HPs and Compaqs out there–you might not find in stores exactly what HP’s selling direct, but you’ll find something awfully close.

The Toshiba and Dell offer a bigger screen (14.1 inches), DVD drives, 256 MB RAM (the Dell has 128), and the other expected gizmos like modem and networking, along with a seemingly faster 1.5 GHz Celeron processor.

Which brings up a point.

The 1.5 GHz Celeron is based on the P4 architecture. Remember, at 1.5 GHz, the P4 is a dog. The Celeron is a castrated P4. The P4-based Celeron doesn’t start to give decent speeds until it hits 2 GHz. Even though the Celeron 1.5 has a 300 MHz advantage over the older P3-based Celeron 1.2, the “slower” Celeron will actually be faster. And less expensive.

The HP/Compaq models offer truly faster AMD Athlon XP CPUs and ATI Radeon mobility video chipsets.

I know people are going to ask me which one to buy. So let’s agonize together.

Durability: Toshiba, Dell, HP and Compaq all had decent service records in the past and there are lots of places that will work on them. Sotec is more of an unknown in the United States at this point.

Dell has traditionally had the best reputation, but their laptops didn’t fare well this year in PC World’s service and reliability roundup. HP and Toshiba were the best of this bunch. Now that HP and Compaq are the same company, the Compaq should fare well too.

Frankly, I’d buy an extended warranty with any of them, and count on it breaking at least once. That’s par for the course with a laptop, especially if you use it for what it’s intended, which is carrying it around a lot.

Performance: The 1.5 GHz Celeron in the Toshiba and Dell models is a notoriously bad performer. The 1.2 GHz Celeron in the Sotec is a good performer but the integrated video will hurt. The HPQ models use AMD Athlon XP CPUs and ATI Radeon Mobility video chipsets. Performance on the latest 3D games will disappoint (but LCD screens in general are bad for 3D gaming). But for light gaming and everything else someone might want to do, the HP and Compaq models will be great.

Input: The Sotec offers a slightly reduced keyboard with an at-times quirky layout. The others offer full-sized keyboards. All use touchpads; they’ll be decent but you’ll probably want to pick up a USB mouse with any of them to use at least part of the time. Touch-typists will prefer anyone but Sotec. Hunt-and-peck types probably won’t care much one way or the other.

Portability: The Sotec weighs 4.4 pounds. The others weigh in at 6.5 or 6.9 pounds. None are hogs, but some people will really like the svelte Sotec. The Sotec has a longer battery life. Advantage: Sotec.

Expandability/extras: The Toshiba, HP and Compaq models offer TV-out, which isn’t something everybody needs, but when you want it, you want it. It allows you to use a big-screen TV for presentations in a pinch. You can connect up a TV to the laptop and do digital slideshows for a bigger audience than can crowd around a laptop screen, which is nice if you’re into that kind of thing. And when hooked up to a TV, it can serve as an emergency DVD player.

The Toshiba offers two PCMCIA slots. Everyone else offers one. HP and Compaq memory maxes out at 1024 MB, while memory on the Toshiba and Dell max out at 512 MB to the Sotec’s 384 MB. HP, Compaq, and Sotec are all using shared video memory, so they’ll steal a little system memory to give to the video chip. Toshiba and Dell aren’t doing this. All have built-in USB 1.1 and networking; none offer built-in Firewire.

HP offers the fastest CPU of the bunch, and CPU upgrades in laptops are always questionable.

Advantage: HP.

Serviceability: The Sotec’s DVD/CD-RW drive and hard drive are bolted in, rather than being plug-in modules. It’ll be a lot harder to fix yourself if need be. On most other companys’ models (I don’t know about any of these for certain), the drives slide out easily for replacement. Replacement CD/DVD drives are a pain to track down after the fact for any laptop more than a year or two old, but the big name brands will almost certainly be easier. If you buy an extended warranty, fixing it is someone else’s problem, at least for a couple of years. Advantage: Everyone but Sotec.

Overall winner: Hard to say. The Sotec is designed to be a subnotebook; the others are entry-level full notebooks. If portability and versatility are important to you, get the Sotec. It’s the only one of the bunch that’ll burn CDs for you at this price point. Keep in mind that the Sotec’s combo DVD/CD-RW drive will wear out quickly if you use it to watch a lot of movies, and that replacing it won’t be terribly easy, as it’s not a slide-in module like costlier notebooks use. If you intend to watch a lot of movies on the Sotec, make sure you buy an extended warranty on it.

The Sotec has a couple of question marks, but it also has an awful lot going for it.

The HP and Compaq models have the best combination of serviceability, expandability, speed, and reliability. I don’t think I’d mess with the Toshiba or Dell unless their prices dropped considerably. Between Compaq and HP, HP gives you the faster CPU, while Compaq gives you the bigger hard drive and more memory. It’s easier to add memory and replace the hard drive than it is to upgrade a laptop CPU; I’d get the HP and add memory to it pretty quickly and plan on replacing its hard drive with a large 5400 RPM model in a couple of years. With its best-of-class CPU and video and upgraded someday with a faster hard drive, the HP ought to be a good performer for many years. If the Sotec’s question marks scare you, the HP offers a compelling alternative.

Future outlook: When a system reaches a magical price point (notables were the $899 all-in-one Compaq Presarios in 1996, the $399 eMachine in 1998, the $199 Microtel Linux PCs from Wal-Mart this year, and this year’s sub-$900 laptops) it’s extremely tempting to run out and buy one. Especially the Sotec, which offers not only a great price, but almost every possible extra.

But remember what happened in the past. Compaq invaded Packard Bell’s territory in 1996 and released an underpowered but reliable and capable PC for $899, complete. Almost immediately, everybody was selling PCs for under $1,000. Then along came eMachines, deciding that even $499 wasn’t cheap enough and offering a unit, again underpowered, for $399. Few matched eMachines’ price point, but most companies were soon offering something for $499.

Laptops aren’t going to bottom out at $849. There’s no point in putting a smaller screen or hard drive in that Sotec. But if Wal-Mart decides it wants a bottom-feeder laptop, it could have Sotec substitute a VIA C3 chip for the Celeron (the Celeron’s being phased out anyway, and Wal-Mart already sells C3-based machines and their sales have proven you don’t have to have Intel Inside in order for people to buy them), and replace the combo DVD/CD-RW drive for a straight DVD drive or even a straight CD-ROM drive. A Sotec 3120x variant with an 800 MHz C3 and a plain old CD-ROM drive could probably sell for $749 or even $699. If Wal-Mart decides to thumb its nose at Microsoft and offer a Linux-based variant, it could chop another $100 off the price. (The big question there is whether it’s possible to support the Sotec’s modem under Linux.)

How soon will it happen? Hard to say. But think about it. Wal-Mart undercut everybody. Everybody reacted quickly. Dell wants to own the laptop market, because it’s part of the PC market. Wal-Mart wants to own every market. They’ll both strike back. HP and Toshiba won’t throw in the towel right away either, because they’re both big in retail laptops.

Right now the Sotecs are selling like crazy. Wal-Mart and Office Depot can’t keep them in stock. They won’t lower prices any further unless Dell and HPQ and Toshiba react again and seriously cut into sales. That’ll depend on whether they’re satisfied with their current sales figures. With 14 shopping days until Christmas (and realistically, the clock running out on shipping something to arrive before Christmas), I don’t expect pricing or inventory conditions to change much in the next two weeks.

But remember, this is Christmas boom time. People always cut prices after Christmas to spur sales. Chipmakers cut their prices too, meaning these laptops will be cheaper to make a month from now.

So if you’ve been wanting a laptop for a while and the sudden appearance of $849 laptops got you thinking but you’re willing to wait a while longer, this is a good time to wait.

The Compaq DL320 and Ghost

We got another Compaq Proliant DL320 in at work. This one’s a Windows 2000 print server (grumble grumble–we’ve been playing with HP’s Linux-based print appliances and so far I really like them).

But anyway, since rebuilding a Windows server is a much bigger deal than rebuilding a Linux server (all our other DL320s run Debian Linux), we tried building a recovery image with Ghost.

Only one problem: Ghost 7.5 doesn’t see the DL320’s IDE drives. DOS sees them just fine. But Ghost 7.5 doesn’t see them, and neither did MBRWork, a freeware partition-recovery tool that’s saved my bacon a few times. There’s something odd going on here.

In desperation, I dug out an old copy of Ghost 5.1c I found on our network. It’s from mid-1999. Oddly enough, 5.1c sees the Proliant’s CMD 649-based UDMA controller just fine. The only problem is, Ghost 5.1c doesn’t handle the changes Windows 2000 made to NTFS. It’ll make the image just fine, but when I went to try to restore it, Ghost crashed.

So I pulled out an unused copy of PowerQuest Drive Image. Drive Image worked fine. Mostly. It made the image at least. One thing I noticed was that Drive Image’s compression was a whole lot less effective than Ghost’s. The other thing I noticed was that Drive Image’s partition resizing didn’t work right. I’d re-size the partitions so they’d fit on another drive I had (I wanted to test the backup to make sure it worked, but not on the live, production drive) but no matter what I did, it reported there wasn’t enough room on the drive.

“Ghost would be so much better in every way, if it worked,” I said in frustration.

“Isn’t that true of everything?” Charlie asked. I guess he didn’t think that was the most brilliant observation I ever made. Not that I did either.

We’ve got support with both Symantec and HP, so we really ought to call them and see if they have a resolution. HP talks out of both sides of its mouth; on the one hand, I found statements on its Web site that Ghost is unsupported on Proliant hardware, and on the other I found some tools that claim to help with system deployment using Ghost.

But since this DL320 is being used to drive a printer that costs about as much as any of us make in a year, and it’s being set up by a guy who’s being flown in early this week at $2,000 a day, I’m not positive that we’re going to get a good resolution to this. I suspect we’ll just end up using Drive Image and keeping an identical drive on hand in case Windows 2000 gets suicidal on us. The price of an IDE drive is pocket change on top of all this.

But when you’re running Linux and GNU tar is a legitimate option as a backup and recovery tool, I love the DL320. It’s small, fast, and cheap. It’s funny when tools allegedly written by college students as a hobby work better and more consistently than commercial tools you have to pay for.

Well, I guess I should say it’s funny when that happens and it’s someone else who has to deal with it.

This case feels like a contender

I’m building computers again.
This one’s going into a Foxconn 3400ATX, which is available for 35 smackers from Newegg.com.

So how is it, you ask? Oh, you didn’t ask? Well, I’ll tell you anyway.

You can find a lot worse cases for the money. Its looks are along the lines of a current Compaq or HP case without the translucent smoke-colored accents. Picture a plain-beige box that looks like a Compaq at your favorite retailer, and you’ll have a nice picture of the 3400. I like its looks a little better than most Antec or Inwin cases, actually. And no funky-colored buttons or obnoxious colored trim, like a lot of cases in this price range.

It has three detachable panels like most good cases and unlike most $35 specials. The panels aren’t as heavy as a premium brand but they’re not flimsy. And the panels come off and go back on easily, which is nice. It’s always disconcerting to have to manhandle a case with expensive components and your precious data inside whenever you need to get it open.

The case feet push into the bottom of the case and are secured with plastic pins, rather than being the stick-on kind that tend to fall off and run away.

Now the bad. You don’t get nice, screw-out slot covers like you would with a premium case. You get cutouts that you bust out with a pair of pliers. The inside of the case is light-gauge steel with that cheap Far East look. Those of you who’ve worked inside a lot of inexpensive cases know what I’m talking about. Working inside it isn’t going to be as nice as working inside an Inwin or an Antec. The motherboard tray is pop-riveted and not detachable.

The power supply is nothing to get excited about. It’s rated at 300 watts, it’s AMD approved, but it looks and feels cheap. It ought to be fine for a Duron or a low-end Athlon XP. Don’t try to build a 3-GHz computer around this. (If you’ve got the money for a 3-GHz machine, you need to be looking at something other than a $35 case.)

Now, the upside. While the interior finish is very pedestrian at best, the fit is fine. Stuff lines up, which doesn’t always happen at this price point. There’s a case fan mounted in the back. There’s a place for a second one up front. You get three external 5.25″ bays, two external 3.5″ bays, and one more 3.5″ bay. Fill all those up and you’ll be taxing the limits of this power supply.

The verdict? Newegg sells Codegen cases that will get to you a little bit cheaper because they’re lighter. I’ve heard mixed reviews about Codegens. I can tell you this Foxconn is worth what you pay for it (most $35 cases aren’t), and it comes in white or solid black. If you’re building a fairly low-end system, this Foxconn will serve you well.

But if you’re building something that you expect to work on a lot (adding drives and memory and changing out the motherboard fairly frequently), pony up the extra $20-$25 to get an Inwin or Antec case.

Well, that was unproductive

I didn’t do much yesterday but lay around and read ancient Dave Barry columns.
Well, I fixed a longstanding problem with Debby’s site (debugging PHP code is such a pain when the curly braces don’t all line up) and I returned a batch of car fuses I bought a couple of weeks ago that it turned out I didn’t need. Six bucks is six bucks, you know. That’s lunch for two days if I’m careful.

Other than that, I took a nap. Actually I might have dozed off twice. I don’t remember. It was a tough week. On Monday I got paged at 11:30 at night with a tape backup problem and ended up having to go in to work to fix it. Tuesday was quiet. Wednesday and Thursday I got paged late. How late, I don’t remember. But late enough that I’d gone to sleep. Wednesday’s problem I fixed remotely. Thursday’s problem might or might not have been fixable remotely, but the operator kept talking about blinking lights on the tape drive (it’s an internal drive, and I’m convinced he was referring to the blinking lights on the hard drives) and multiple blinking lights on a tape drive usually indicates big trouble, I ended up going in. I stumbled through the problem and finally went home. It wasn’t a hardware problem.

On Friday one of my coworkers took a digital picture of a tape drive for me so I can ask pointed questions about the blinky lights if when the problem comes up again. Looking at the picture, now I remember: blinky lights on the left is big trouble. Blinky lights on the right is highly unlikely, so I guess that’s even bigger trouble.

On my way home from Promise Keepers on Friday, I told my buddies I fully expected to get paged that night about a tape backup problem. They all thought that was pretty awful. I got home, plugged my work laptop in and booted it up, intending to be pre-emptive. I didn’t want to get paged at 1 in the morning and get told a 9:00 backup job failed–not when I needed to be at church at 7 in the morning with an 11-hour day (minimum) ahead of me. As I was firing up pcAnywhere, my phone rang. It was one of the operators, and a backup job had failed. I went in and fixed it.

But, seeing as I didn’t sleep more than six hours uninterrupted any night this week and operated two nights on four (I know, when parenthood comes I’m in trouble, but I really work best on 7 hours during the week and 8 on weekends), I slept in yesterday. I was late for church. The 10:45 service. Pathetic, I know. Then there was a post-service meeting I’d forgotten about. Oops. So I was there for two hours. They mercifully cut it off at two hours. I was out of fuel and was getting irate at the weird questions some people were starting to ask.

Then I came home, got irritated that my SWBell e-mail still isn’t working (six days and counting–makes me wonder if they’ve ditched their Sun equipment for Windows NT), tried to remember how to set up my own mail server again, decided it was too much thinking, and took a nap instead. That set the pace for the day.

I’m hoping this week isn’t a repeat performance of last week.

Upgrading an eMachine

One of the most common search engine hits on this site involves the words “emachine” and “upgrade” or “upgrades.”
There are a number of things to keep in mind. Some of this advice also holds for low-end units from Compaq and Gateway and the like as well.

First things first: eMachines don’t have the best reputation. The majority of their problems are due to the power supply though. Aftermarket replacements are readily available, and I recommend them. Don’t buy a factory replacement; it’ll just fail again like the original. A quality replacement from Sparkle or PC Power & Cooling will run you less than $50. I’ve seen 180-watt Sparkles go for $35. The stock 145-watt unit isn’t very adequate and isn’t of the utmost quality. If I bought an eMachine, I’d buy an aftermarket power supply and install it as soon as I could. I wouldn’t wait for the factory unit to fail.

If I had an eMachine I wanted to upgrade, I’d track down a PCI video card. The problem with integrated video on a lot of motherboards is that the CPU and video chip have to share memory bandwidth. What’s that mean? Part of the time, your nice 64-bit memory bus is reduced to 32 bits, that’s what. Steve DeLassus told me a couple of years ago about putting a cheap PCI ATI video card in his wife’s Compaq, which had integrated video, and everything about the system sped up, dramatically. I made fun of him. But it wasn’t his imagination. I was wrong, and the explanation is simple: After he disabled the onboard video, he finally got the computing power they paid for.

Besides that, any add-on card is going to be faster than the integrated video in anything but an nVidia chipset anyway. Last I checked, eMachines weren’t using nVidia nForce chipsets for anything. If you’re into 3D gaming, you shouldn’t have bought an eMachine in the first place, but look for a PCI card with an nVidia chipset. If you’re just into word processing and e-mail, something like an ATI Xpert98 will do nicely. Yeah, it’s an old card, but it’s still more than adequate for 2D applications, and it’s cheap.

If you’re wondering if your system’s integrated video is holding you back, the best tell-tale sign to look for is called “shared memory.” Enter your PC’s setup program and look for an adjustable amount of shared memory. If you find that setting, you’ll almost certainly benefit from disabling it and plugging in a video card.

The next thing I’d look to do is replace the hard drive. Hard drive speed is significant, and sub-$500 PCs don’t come with blazing drives. Pick up a 7200-rpm drive of adequate capacity. They’re not expensive–you can be in business for under a hundred bucks. The performance difference is dramatic. Most retail-boxed drives even come with all the software you need to move all your data to the new drive. CompUSA frequently has something on sale. I prefer Maxtor drives over Western Digital because they’re faster and more reliable; CompUSA’s house-brand drives are just repackaged Maxtors, so those are fine as long as you can find a 7200-rpm model.

The modems that came in eMachines are worthless. If you don’t have broadband yet, replace it with a USRobotics 2977 modem immediately. That factory modem is costing you 35% of your CPU power. The USR will give that back, give you better throughput on top of it, and costs $40 at newegg.com. Good deal. But don’t settle for anything less than that–any modem that costs less than $40 is going to have the same problems as the factory modem.

Most eMachines can take more memory, but a lot of eMachines already shipped with adequate memory. There’s rarely any reason to put more than 256 MB in a PC. If your machine doesn’t have 256 megs, you can pick up a 256-meg stick pretty cheaply.

Most eMachines can take a faster processor, but I rarely bother. Unless you can increase your clock speed by 50%, you’re not likely to really notice the difference. Doubling is better. You’ll get better results from adding a video card and a faster hard drive.

Likewise, a high-end sound card from the likes of Creative or Turtle Beach can reduce the amount of work your CPU has to do and give you much better-sounding audio than what your eMachine has on the motherboard, but is it worth putting a $100 sound card in a computer you paid $399 for?

It’s easy to see you can very quickly spend $300 on upgrades for a computer that originally cost $399. That makes it hard to justify, when you could just get a new $399 computer. So should you do it? It depends. Don’t spend more than half the price of a new computer to upgrade an old one. But also keep in mind that a new computer won’t come with first-rate components, and the aftermarket parts you’re buying are first rate, or very close to it. If that PC you’re looking to upgrade has a 600 MHz processor or faster, it’s likely that when it’s upgraded, it’ll hold its own with a new computer. In that case, you should think about it.

But if you’ve got a four-year-old eMachine with a 300 MHz processor in it, you’re better off buying something new. When you can buy a 900-MHz PC without an operating system from walmart.com for $299, it’s just not worth wasting your time. Load your eMachine’s copy of Windows on the new computer and stick the eMachine in a closet somewhere as a spare. Or pony up a couple hundred bucks more to pick up a brand-name PC with Windows and a monitor, then get a couple of network cards and network your computers together. Your family will appreciate being able to share a printer and an Internet connection. If you pay a little extra to get wireless cards, the computers don’t even have to be close to each other.

One last thing: A lot of people sniff at eMachines. Yes, they are cheaply made. But they’re not all that bad of a machine, aside from the skimpy power supply. Replace it, and you’ve got a lot of computer for the money. Packard Bell did a lot to ruin the reputation of cheap computers in the 1990s, but the problems they had were mostly due to skimpy power supplies that were odd sizes so there weren’t many aftermarket replacements, and due to junky integrated modems and/or combo modem/sound cards that did both jobs poorly, killing system performance and causing software incompatibilities. Today’s highly integrated motherboards have eliminated that combo sound/modem problem. I know I malign the company all the time, but in all honesty, once you put real modems and sound cards into Packard Bells, they did OK as long as the power supply held up. I’ve got an old Packard Bell P120 with Debian Linux loaded on it. I ripped out the sound card/modem combo. I left the power supply alone because it looked decent. The machine’s run several years for me without any problems. Of course I covered up the Packard Bell logos on it.

Today, the same holds true of an eMachine–it’s just the power supply and video card you have to worry about now.

Building a budget PC

As I procrastinated by bouncing between projects, I put together a low-budget PC for a friend of a friend. It’s very much a retro PC, but I think it’s useful, especially considering the budget I had to work with. Read more

Dude! I’m getting a… Packard Bell!

Oh wait. No, I’m thinking of Steve. Although he and I did just get identical Dell Optiplex GX1 P2-450 workstations to use as Web servers. We learned a little bit about them too.
Read more

So you think Linux is unproven?

I’ve had arguments at work with one of the managers as to whether Linux is up to the task of running an enterprise-class Web server. When I mention my record with Linux running this site, the manager dismisses it, never mind that this site gets more traffic than a lot of the sites we run at work. So I went looking this afternoon for some sites that run on Linux, Apache, and PHP, like this one does.
I found a bunch of small-timers. Read more