Laptop woes

I probably own about four or five laptops – all in states of serious disrepair.  I have broken down laptops like some people have cars on blocks on their lawn or tires in piles in their backyard.  Here’s what I’ve got right now, with a description of what it would take to fix it:

  • Dell Somethingorother.  Purchased used, old, heavy, running Windows 98, one bad pixel1 , terrible battery life, and about 1/2 the keys on the keyboard do not register unless you literally hurt your fingers pressing/hitting it.  With an external keyboard it’s not that bad, really.  I’ve got a PCMII WiFi card for it.
    • This laptop just isn’t for most people.  If you want to surf the web and word processing, it would be fine with an external keyboard.  That said, it’s pretty slow.
  • Dell XPS.  This is one of the few computers I’ve owned since it was brand new.  Big hard drive, DVD burner, speedy.  However, it’s running Vista (boo!!!), the battery lasts about half an hour, and the monitor is extremely dim no matter what I do.  I leave this one plugged into my Cupcake.
    • Vista is a pain, but an endurable one.  The monitor is dim enough that it is noticeable.  There’s no specific thing keeping me from using this laptop except that it is heavier than what I would like to carry around.  It’s on it’s second battery, an after market special, that holds about an hour or so of charge.
  • Everex Stepnote.  A computer I fixed twice,2 the previous owner drained the battery and let it sit for six months, threw it around, broke off both hinge covers, and scratched it all up to hell.  The DVD drive is completely shot and the battery lasts about 5 minutes.  It’s only got 1 GB of RAM, so it gets bogged down with medium tasks.  Last, but not least, the “+/=” button does not work.  At all.  The lack of those two keys makes programming a bear. 3
    • I’ve been using this laptop almost exclusively for the last year or so.  But, having the +/= button go bad means I am disincentivized to program – which is a bad thing.  I’ve taken this laptop apart, but there’s no way I can see to fix that button short of replacing the keyboard.  At $35+, the replacement keyboard costs on eBay not cost-effective.  The cost to upgrade this computer is not appetizing – $50 for 2GB RAM, $35 for a keyboard, $30 for a new battery?  That’s $115 for an underpowered laptop that is weighed down by a non-functional optical drive.
  • Dell Mini10.  Another twice fixed computer, zero battery (it holds absolutely no charge), tight keyboard, and small screen with a pretty poor resolution.
    • Nothing can be done about the screen, its resolution, or battery.  I could get a new battery, but my concern is there’s some flaw on the motherboard causing it to systematically kill the battery.  When traveling I take this laptop with me and use it to connect into my home network via a VPN.  It would be better with a battery, but with the screen as bad as it is, I’m not looking to spend much time using this computer.  This is the laptop I booted with Ubuntu and wasn’t able to connect to my WiFi network. 4

I’m somewhat undecided on what to do.  Should I get a new computer or try to get one of these running better?

  • Anything over 2-3 hours is great.  Bonus points for more.
  • Minus points for an optical drive – I have an external and don’t need the extra weight.
  • Keyboard and monitor size can be small, as long as it has good resolution.
  • Any current processor is fine, I offload all big tasks (video transcoding, etc) to brainier machines on the home VPN, but 2GB RAM is pretty key
  • Lower price is better, obv.

Anyone have any suggestions?  Either for repairing or what you’d recommend for a laptop?

  1. Stuck on red, if you must know []
  2. Seriously, Tom – who the hell deletes an operating system… TWICE??? []
  3. Amusing note:  in order to circumvent this problem, there is a “+=” contained on every page of this blog – in white text on the white background.  When I need either symbol, I just pull up this site, copy the character I need, paste, and rock on. []
  4. I suspect there was some problem with Ubuntu not recognizing my WiFi card []

Sweet PHP script, tragically terrible name

I’ve probably mentioned before how much of a PHP/MySQL/WordPress nerd I am.  If I haven’t so far, I’ve said so now.

One of the sites I operate requires numerous tables with about five million rows all together.  Automated backups are easy with any number of WordPress plugins.   But, what to do when you’ve got a HUGE SQL file and really small upload limits in phpMyAdmin and short server timeouts preventing a single script from reviving said huge file?

The brilliant scheme I came up with (I’m being sarcastic here) was to take those large files and split them up into smaller files of about 3MB each.  This approach was problematic for a number of reasons.  It required me to download a huge file and slice it up into small files between MySQL inserts.  Copying and pasting 25,000 rows at a time was giving my poor laptop fits.  It also meant I had to manipulate the full plaintext MySQL file, rather than a GZipped version.  On top of all of that, I was paranoid that I would accidentally omit a single row and have to start all over again.  In order to overcome the problem of server timeouts, I wrote a script that would load one small file, finish, then call itself again incrementing to the next file to be loaded, LRR.

There’s nothing good about this extremely time and labor intensive approach that was greatly error prone.

I wrote the above original serial-file-upload schema about a year and a half ago.  My PHP/MySQL kung fu is now much stronger.  Back then I never used scripts written by others – foolishly thinking that it would take me longer to understand how to integrate their scripts than it would be to build a serviceable script from scratch.  I went so far as to write my own AJAX library.  It was functional, but no where near the quality and reliability of jQuery.

Much humility and less hubris later, I’m more confident in my ability to read, understand, and interface with scripts written by others.  This now allows me to focus on only writing those things that are truly unique and critical to my projects, without having to re-invent the wheel.

What’s the name of this magnificent script I’m using for bulk uploads of really large MySQL databases?  Well, this is where the “tragically terrible name” bit from the subject line of this post.  The script is called <wince cringe>, “BigDump.”</wince cringe>  This script just automated a HUGE chunk of work for me.  Instead of struggling with more than 4 million lines of MySQL, I uploaded a SQL file, changed some variables in the BigDump script, and ran the script.

The total upload time is probably about the same as the script I was using.  The benefit is in not having to handle a ton of code before getting around to running the script

SF WordCamp?

I really like WordPress and was kinda hoping I’d make it to SF WordCamp this year.  Unfortunately, it is not to be.  If you’re going, I’ve got a silly frivolous request –

If you spot one of those WordPress “W” stickers, would you snag one for me?

I’m getting a new laptop (actually, I’m getting an old relatively unused laptop from someone else) and I’d like to slap an official WordPress, MakerBot, PHP, and MySQL sticker on it.

New cell phone!

So, I finally got over my fear of commitment and bought a new cell phone.  I had my prior cell for about 4 years, my cell before that for 3 years, and my cell before that for 3 years.  I keep them well beyond the point where people make fun of my old beat up cell.

I just picked up the Motorola Droid and I’m pretty happy with it so far.  A site that I use regularly that’s almost totally powered by Javascript and AJAX works beautifully with this phone where Windows IE on cells freaks out, Opera Mini does a reasonable job, and the iPhone does a fairly good job.  Web browsing is fast, rendered quickly, connects to e-mail, and all sorts of good stuff.

The thing I’m perhaps the most pleased about is that I can tether the phone to my laptop to use it as 16G extra storage OR as a broadband modem – for no extra fee. 1 2  I wouldn’t often use my laptop away from WiFi, but when I do a little Droid powered broadband love is going to be sweet.

Now back to your regularly scheduled nonsense.

  1. Full disclosure:  You have to download and install a free app called PDANet to be able to connect through the phone.  Not a big deal for me. []
  2. I’m already paying for broadband to the phone, why should I pay for it again in the form of a broadband card for my laptop? []