Category: computers

  • The “wow” is… never!

    So, Windows 7.0 — I mean, Vista is out. Pardon me if I’m not excited, but it does seem like no one really cares. What is strange is how so many big software companies didn’t make their software compatible by the time it went gold. MS was giving away free betas for crying out loud, should I have sent my copy to Apple so they could fix iTunes in advance?

    Once I’d read about the crappy licensing terms and the DRM that was going to be crammed down users throats, I knew that this was the end of the line for my Windows drive. Our response to Vista? Well, Sandy just got a new shiny MacBook to replace her PC, and I’ll be rebuilding my PC to be a Kubuntu workstation. Suddenly UNIX-ike OSes don’t seem so dead after all.

  • Pepper Hacking bears some fruit…

    I’ve actually created some things with the Pepper SDK! A calculator and a minesweeper game. I didn’t actually write either of the games, but I packed them up as “native” Pepper Keeper apps with the SDK. Nifty.

  • Safari’s strictness

    Apple’s Safari browser is pretty strict when it comes to certain things in JavaScript. For starters the ECMAScript set of future reserved words are already reserved words in SafariScript. Things like “super” or “export” or “static” are no-go.

    Second, I just found this oddity. I’d written some code like this:

    var q = document.getElementById('foo').childNodes;
    for (var i in q)
    {
        var el = q[i];
        // do stuff with el
    }
    

    This code ran great in Firefox and IE, but on Safari el was never valid. The reason seems to be that Safari really expects a variable given in an array subscript to be a number, not a string (when you use for (foo in bar) foo will be a string).

  • Aaaand the DSL is good!

    Turns out it wasn’t a problem with my BSW (the wire from the brown pedestal to my house). It was with my F2 pair (the wire from the pedestal out to the big brown box on the side of the road).

  • Real mobile Wikipedia

    I’ve seen lots of talk recently about ‘mobile’ versions of Wikipedia. I’m a big fan of Wikipedia and I use it all the time. I’ve looked at all of the “solutions” for so-called mobile versions of Wikipedia and they all suck. First of all, many of them require full-on ‘net access or a cell phone, or they only let you load a subset of the data with limitations. Pffff. What’s the point then? I want everything, all the time, and I want it to be fast. Never mind that the english Wikipedia is huge – an XML dump of just the page contents is 7GB uncompressed.

    Hrm. I seem to have these two little handheld computers here, and they run Linux and have 20GB hard disks you say? Well geez, what are we waiting for! All we need to run MediaWiki – the free software that powers Wikipedia – is Linux (check), Apache (web server), MySQL (database), and PHP (web scripting language) – often called LAMP for short. Oh, and we need a dump of Wikipedia, of course – those are generated regularly. Off we go:

    B1B

    The Pad 3, with its Fedora Core underpinnings, makes getting LAMP install ridiculously easy. Open an xterm (Ctrl-Shift-1). Issue this command:

    yum install httpd php-mysql mysql-server
    

    Let it resolve all dependencies and install all that stuff. Great.

    B2B

    in contrast to its younger brother, the Pad 2 is based on MontaVista Linux CEE and Professional 3.1. This makes a LAMP stack harder to setup for two reasons:

    • the included apache-dev package is broken six ways from sunday
    • there are no MySQL or PHP packages included.

    I manually patched the busted files from apache-dev: in short, one of the config files in /usr/share/apache-2.0/build/ has to have all of its paths fixed, and the same for the apr-config script. I used the generic MySQL 4.1.21 source RPMs to build some halfway decent RPMs for the Pad 2: you still have to manually setup your my.cf and a startup script though. PHP I compiled and installed from a source tarball. Let it be known that MediaWiki and PHP should also work with thttpd, which is also provided by MontaVista and might not be so broken.

    For MySQL, you will have to set the max_allowed_packet setting to 4M in /etc/my.cnf otherwise your import process could fail.

    B3B

    Follow the MediaWiki setup insructions. In a nutshell: extract the tarball, rename the directory to something useful (like ‘wikipedia’), move the directory to your webroot (/var/www/html), and run the config page to generate LocalSettings.php. You probably want to disable all of the e-mail options, since you won’t be editing this wiki.

    Now, use mysql and delete all the records from the page, revision, and text tables.

    B4B

    Wikipedia provides database dumps as compressed XML files. However we need to import this into the MySQL database. A Java tool called mwdumper is the best way to go about this: it reads the compressed XML and outputs SQL statements, or will even directly connect to a MySQL server and insert them for you. But, this will take FOREVER (at least 24 hours) and if you have to interrupt it, you have to start from scratch. Provided you have another Linux box on which to do some preprocessing though, you can make things easier on yourself. Here’s what to do.

    1. Get a Wikipedia dump file – the one you want is called pages-articles.xml.bz2. Download it to your Linux box. It’ll be big.
    2. Get mwdumper as well.
    3. Get Sun Java 1.4 or 5.0. You can use mwdumper with GNU GCJ, but in my test it’s about 10x slower.
    4. Put both files in a directory and run java -jar mwdumper --format=sql:1.5 pages-articles.bz2 | sed -e 's/^INSERT/INSERT IGNORE/' | split - wikidump- and make sure you have about 7GB of free disk space.
    5. This process will chug along for a while and the result will be a bunch of files called wikidump-aa, wikidump-ab, etc. They contain the SQL statements that inject the data, but we’ve split it up into smaller chunks. That way we can interrupt things in the middle. We changed the INSERT command to INSERT IGNORE so that if we do interrupt things and start importing a file again, MySQL won’t complain about duplicate keys.
    6. Feed the data to the MySQL database on your Pepper: mysql -h pepper -u root -p'password' < wikidump-aa substituting your Pad’s IP, MySQL username and password (the ones you used in the MediaWiki setup, remember?) Or use a shell script to automate this, printing the filename before it starts loading so that you know where you are. We’re talking about 3.8 million wiki pages here. As of this very moment I’m somewhere in file ‘ah’ and I’ve done 784,000 pages.
  • I still hate iTunes.

    Unsurprisingly, I’m not alone in my hatred of iTunes. A handful of people have commented on my previous post back in June in a similar vein. Well the hatin’ just keeps on comin’.

    My wife just converted over to Anapod Explorer after grappling with iTunes. As soon as she said “I just want to drag and drop!” I knew what had to be done. After a frenetic license-purchasing and quick training session, she’s happy as a clam.

    But lo! Apple manages to piss me off even more! If you haven’t been living under a rock you’ll know that the next incremental updates to the iPod line are out, including firmware updates for older models. In the past, Apple has distributed the firmware updates as a separate application known as the iPod Updater. But not any more – now you have to install iTunes 7 to get the latest firmware (for my 5G, that’s version 1.2). The separate updater is gone. Not only that, but I looked and looked and disassembled and the firmware isn’t even included in the download itself. The software must download the firmware from Apple after the fact. ARGH.

    I will get this iPod updated without iTunes, somehow…

    Update Well I got it upgraded, but I had to install iTunes 7. But then I uninstalled it immediately. I torched my old iTunes library data files first, then installed iT7. It crashed the first two or three times I tried to start it (real /quality/ there, Apple) but once it came up I took a deep breath and plugged in my iPod. It detected BUT I guess it didn’t remember anything about my iPod, so it asked me if I wanted to sync it with iTunes (aka DELETE EVERYTHING OFF MY IPOD) so I said NO, then it told me there was a firmware update. Did the update no problem and as soon as my iPod started rebooting (with the little progress bar) I shutdown iTunes and uninstalled it. Then I used iPodWizard to dump the 5G v1.2 firmware off my iPod to a file.

  • nope, not dead, still here

    We went to Cedar Point, Ohio for the weekend of my birthday and had a fun getaway. I rode all the coasters at the park, especially on Sunday when it was shockingly not very busy at all. I walked onto most coasters with no wait, and boy, what a selection they have. Top Thrill Dragster was the most thrilling 20 seconds of my life I think. We had a good time together but some of the coasters were too extreme for Sandy, for good reason: they run much faster than your “standard” roller coaster and so you pull more G’s. But it was still nice to get away and go someplace different, even if it was just south of the border.

    We got a new printer at home after my Apple Personal LaserWriter NTR finally gave up the ghost with a misaligned scanning laser (I think). A moment of silence please.

    Well, we replaced it with (gasp!) an inkjet printer. I’ve always been the first one to point out the high cost of inkjet printing and have resisted spending a lot of money on one, but this time around I was convinced. We bought an HP OfficeJet Pro K550dtn, aka “HP Alphabet Soup” as I like to call it. It has some good things going for it:

    • Four separate ink cartridges, including the ability to use a high-capacity black cartridge – something I miss from the days of my Canon BJ-4000. They load easily in the front too.
    • Two separate print heads – yes, the heads are separate from the cartridges, so the ink is cheaper, and the heads should last quite a while. Stupidly the black head is combined with yellow, and cyan with magenta. Considering the black will likely wear out first…
    • It actually has a lower cost per page on black and colour than a colour laser.
    • I got it on a frickin’ deal at Best Buy: paid $315, and am getting $70 rebate from HP.

    It even comes in three flavours: basic with one tray and USB, the dtn with wired networking, duplexer, and second tray, and the dtwn with wired+802.11g, duplexer, second tray, and USB Host support. The built-in print server is obviously geared towards a corporate environment, as it automatically keeps track of users’ printing including # of pages, and even microlitres of ink used (in each colour, of course!)

    It’s not stellar for photo printing but it knocks the socks off my craptastic Lexmark Z33. And the paper trays are very fragile. I had to reseat a spring that sits in the bottom of the tray 2 area this morning and HP was of no help. Still, that spring will probably get dislodged again unless I remember to put the trays back very, very slowly. You can’t just slam them home like I used to on my Apple, or any of the HPs I’ve used before.

    Still, I hope it will stand the test of time as my NTR did.

  • The saga is over

    My new friend the Bell lineman came by yesterday and found the problem. After over a month of insisting that I had a problem with the Bell wires, guess what – the problem was with the Bell wires! He swapped my line over to a spare set – hearing that nice, clear, non-fuzzy tone on the line was music to my ears. Also had a good chat with him about future issues if they come up, and importantly what to say to get service. Hooray!

  • Still with the ongoing DSL saga…

    We’re still – still! – having DSL issues. But I hope that finally we’re going to get some relief. Let’s start at the beginning:

    Back in February we had a new “dry” DSL line (let’s call it line #2) setup alongside our existing dial tone/DSL line (line #1). Then we cancelled all service on line #1, and began relying on Vonage for VoIP service via line 2’s DSL. Sounds real easy, doesn’t it? Especially when you factor in that our subdivision is only 5 years old and is teeming with spare Bell wires all over the place.

    Well, once I got a bulletproof router setup, everything seemed fine. Then, out of the blue, we started having very weird intermittent line issues. One day the DSL would be bulletproof, excellent utilization and signal/noise numbers. The next I’d be unable to keep line sync for more than a few minutes and the line numbers would be terrible. Most times this happened, I’d call my ISP and report it, they’d check the line stats and notice the horribleness, and we’d troubleshoot. But between the NID (grey box where Bell’s wires and my wires meet) and my basement, there’s nothing to troubleshoot: the wires terminate with a single jack, with a 3′ RJ11 cord going to my DSL modem. A few times I even took my modem outside and plugged it directly into the line at the NID. No change.

    I went through every possible troubleshooting step possible, and everything pointed to some problem with the wires in the ground. The DSL on line #1 was always bulletproof, and I was using the same modem and the simplest inside wiring possible. It had to be the line #2. From talking to a friend’s friend who works as a Bell lineman, I learned a lot about how this stuff works, what everything is called and how to bitch loud enough to get it fixed – indispensible information to say the least.

    So finally, finally, after documenting it enough times my ISP (TekSavvy, who I cannot say enough good things about) finally got Bell to notice the issue. They opened a ticket with Bell and put all of these details and more into it. I just found out that they spent a good 30 minutes talking with Bell about my problems, and finally got Bell to realize that YES, it’s the ground wiring – and they’re finally going to send a tech to fix it!

    Apparently the deciding factor was when my ISP mentioned that my DSL utilization numbers (a measure of how much bandwidth the DSL layer is using on the wire) went from a very good 40-60% to a horrific 100% every time. As soon as Bell heard that they said “oh, yeah, there must be a short somewhere along the line.” Um, no shit!

    So I’m hoping to get a call from Bell soon to find out when they’ll come, and I’ll for sure stay home in order to catch and talk to the tech to make sure they do the work right.

  • PepperWiki Launch

    I’m launching my Wiki site for the Pepper Pad: PepperWiki!