CakePHP at the command line: it’s cron-tastic!

I’m kind of surprised it’s taken this long. cms34 has been around for almost three years now, and this is the first time I’ve had a client need a cron job that relied on CakePHP functionality. (The system has a couple of backup and general-purpose cleanup tools that can be configured as cron jobs, but they’re just simple shell scripts.)

And so it was today that I found myself retrofitting my CakePHP-based web application to support running scripts from the command line. I found a great post in the Bakery that got me about 85% of the way there, but there were some issues, mostly due to the fact that the post was written in late 2006, and a lot has happened in CakePHP land over the last 4 1/2 years.

There are two big differences in app/webroot/index.php in CakePHP 1.3 compared to the version that existed at the time of that original post: first, the calls to the Dispatcher object are now wrapped in a conditional, so the instruction to replace everything below the require line should now be something closer to “replace everything within the else statement at the bottom of the file.”

The other big change is that this file defines some constants for directories within the application, and those paths are all wrong if you move the file into the app directory as instructed.

Below is my revised version of the code. Note that I also reworked it slightly so the command can accept more than two arguments as well. There’s a space before Dispatcher is called where you can insert any necessary logic for handling those arguments. (I also removed all of the comments that appear in the original version of the file.)

<?php
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
    define('ROOT', dirname(dirname(__FILE__)));
}
if (!defined('APP_DIR')) {
    define('APP_DIR', basename(dirname(__FILE__)));
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
if (!defined('WEBROOT_DIR')) {
    define('WEBROOT_DIR', APP_DIR . DS . 'webroot');
}
if (!defined('WWW_ROOT')) {
    define('WWW_ROOT', WEBROOT_DIR . DS);
}
if (!defined('CORE_PATH')) {
    if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
        define('APP_PATH', null);
        define('CORE_PATH', null);
    } else {
        define('APP_PATH', ROOT . DS . APP_DIR . DS);
        define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
    }
}
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
    trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
    return;
} else {
    // Dispatch the controller action given to it
    // eg php cron_dispatcher.php /controller/action
    define('CRON_DISPATCHER',true);
    if($argc >= 2) {

        // INSERT ANY LOGIC FOR ADDITIONAL ARGUMENT VALUES HERE

        $Dispatcher= new Dispatcher();
        $Dispatcher->dispatch($argv[1]);
    }
}

After implementing this version of cron_dispatcher.php, I was able to get CakePHP scripts to run at the command line without being fundamentally broken, but there were still a few further adjustments I needed to make (mostly in app_controller.php). Those were specific to my application. You’ll probably find yourself in the same boat.

A couple of other things worth noting: if your server is anything like mine, you’ll need to specify the full path of the PHP command line executable when running your scripts. In my case it was /usr/local/bin/php. And, the one sheepish confession I have to make: I know the goal with the way the file path constants are defined is to avoid any literal naming, but I couldn’t find a good way to get around that for WEBROOT_DIR, with the file no longer residing in webroot itself. I’ll leave fixing that as an exercise for the reader.

Good luck!

Download the Script

Download zip file... cron_dispatcher.php
cron_dispatcher.php.zip • 1.2 KB

SEO doesn’t matter

Note (April 22, 2011): I rarely second-guess myself after posting a blog entry, but this was one of those rare cases. I reconsidered the post due to the fact that shortly after writing it, I observed a case with a client where SEO did matter. But upon further, um, reconsideration, I decided the post did still have merit, because the type of SEO we were dealing with was not the type of SEO I’m talking about here. In fact, “the type of SEO we were dealing with” is something I’m reluctant to call SEO at all, even though that’s denotatively what it is: search engine optimization. But there’s a huge difference between semantic HTML, well formed title and meta tags, and carefully constructed sitemap.xml and robots.txt files, versus “gaming the system,” which is the negative connotation SEO typically carries, and what I’m focusing on in my criticism here. So… on we go. With a few edits for clarification.


There, I said it. Well, actually I’ve been saying it in various ways for years, so what I actually mean is: there, I made it the title of a blog post. And if SEO does matter at all, then people who don’t think SEO matters (and somehow feel inclined to express that sentiment in Google’s search box) will soon be viewing this post. (Huh?)

Today I was perusing my RSS feeds (a good way to find information that is relevant to your interests, often much more effective than just searching for random terms on Google), and I came across a blog post entitled Whitehat SEO Is a Joke. Intrigued, I read it, and it made some sense. The argument in a nutshell is that whitehat SEO is, really, just ineffective SEO. This spawned a satirical response, Blackhat SEO Is a Joke. It made some sense too. And that’s when the thought really coalesced in my mind: all SEO is a joke. Not because on one end of the spectrum it’s ineffectual and on the other it’s unethical. Because manipulating search engine rankings shouldn’t really matter to a sustainable business model.

To the Twittermobile!

Forget SEO. If your business model depends significantly on search engine rankings, you're doing something wrong.

After some thought (and a few minutes of research), I followed up with this:

To wit: Google "Minneapolis web development" and I don't come up until page 4 of the results. IT DOESN'T MATTER. I have plenty of work.

So, what do I really mean here? In this specific example of my own work, what I mean is I don’t depend on random people googling “Minneapolis web development” to get work. I get most of my work through the network of contacts I’ve developed over a decade and a half of professional experience, and through referrals from past clients. And even if I do want people to be able to find me on Google, which of course I do, I expect they would type Room 34, not Minneapolis web development. Go ahead and google “Room 34.” I’ll wait.

Welcome back. And guess what? I didn’t spend a cent on SEO consulting, and I didn’t spend much time of my own thinking about SEO either. I thought about well-formed semantic HTML and relevant content and that just happened. But it still doesn’t matter because I don’t depend on search engine rankings for business.

If you’re building a website as a means to promote your business, or if the website is your business, you’ll certainly want to appear in relevant search results, but ultimately your goal is quite simply to get people to your website, regardless of how they got there. Search engines are therefore a marketing tool — hopefully only one of many you’ll be employing — and if search engines don’t lead visitors to your site based on its own merits, then the problem is not the search engines and their confounded algorithms, it’s your site.

Don’t ask me what the other marketing tools are or should be. I’m a web developer, not a marketer. For myself, word-of-mouth and business cards have been the only marketing tools I’ve needed. Other businesses need other strategies, and the first thing any business needs to do when developing a marketing strategy is to figure out where its business is likely to come from and how best to reach that audience.

Regardless of whether you’re deeply immersed in the world of SEO or you hold it at arm’s length like I do, there are some interesting and relevant points in the two blog posts I linked to above, but I think the most salient is this, from the blackhat post:

If however you have a web property that has some value to it, then true blackhat strategies are not the way forward.

Black, white or gray, all SEO (apart from basic web design best practices, careful [and responsible] use of legitimate tools like sitemap.xml and robots.txt files, Google Webmaster Tools, and meaningful, relevant content) is essentially about gaming the system. Some techniques may achieve more immediate impact, and others may have more lasting value, but ultimately I see only two reasons to engage in any of them:

  1. Your content and/or its presentation doesn’t have enough value on its own.
  2. Your business model itself is based on gaming the system.

If the latter is true, there’s nothing I can say or do to help you or to persuade you to act otherwise. We’re simply in this world for different reasons and will never see eye to eye. If the former is true, however, there’s an alternative. It’s a lot more work, but in some ways that’s the point: make your content better. And that will often lead to an even broader, harder, and more important task: figure out what you’re really trying to do in the first place. Because if you need to be on the first page of a generic Google results page to stay in business, maybe you don’t really have much of a business at all.

Addendum, a few hours later: Like I said…
Google search for "SEO doesn't matter"

A childhood fantasy (almost) realized: 100 Atari games in my pocket

Owners of 1980s technology intellectual property are in an unenviable position. Their IP has very little value beyond historical significance or nostalgia. No one (well, I hope no one) is going to use an Apple IIe computer for serious productivity work these days, but that doesn’t diminish its importance in computing history, nor the strong positive memories its once loyal users may still hold onto.

There are few properties from the ’80s whose value is more purely historical and nostalgic than those bearing the brand of Atari. Sure, there’s still a company today named Atari, and it still makes modern video games for modern consoles, but this Atari shares only its name with the hallowed institution founded in Sunnyvale, California in 1972. The name and all of the properties that go with it have been sold and re-sold and re-re-sold so many times over the intervening years that any minute connection to the past, beyond the games themselves, has been lost.

So, what is a modern company that owns all of this (relatively speaking) useless IP to do? Trying to cash in on it is obvious, but doing it right is a huge challenge. The biggest hurdle is the very historical significance and nostalgia that give these games any lingering value in the first place. The only people who are really going to want to play Combat or Yars’ Revenge or — ah-hem — Math Gran Prix on an iPhone are people who either owned (and played the hell out of) these games as kids 30 years ago, or their kids, who harbor a morbid curiosity about this old crap their parents like for some reason. In order to satisfy these customers, the company that now calls itself Atari needs to achieve perfection in recreating the experience people remember. Not just the graphics and the sounds and the program mechanics of the games, but the feel… the essence of what it meant to play video games in the days when Ronald Reagan was president, pastels were popular in men’s fashion, and MTV still showed music videos.

Yesterday Atari released Atari’s Greatest Hits as a universal app for iOS devices. (To the non-nerd[s] in my audience: that means the same app works on iPhone/iPod touch and iPad.) The game comes free with arcade Pong, and 99 other classic (and not-so-classic, but… well… old) Atari games, both from the arcades and for the Atari 2600 VCS, available as in-app purchases. The games are sold in packs of four for 99 cents, or the entire set can be downloaded for $14.99. Let’s be serious: anyone who cares about this at all should just get it over with and download the works, immediately.

So did Atari live up to my unrealistic expectations? Read on after the screenshot gallery to find out.

First impressions

It’s clear from the moment you load Atari’s Greatest Hits on your iPhone or iPad that a great deal of attention and care went into putting this package together. And yet, it just doesn’t quite hit the mark. The graphic design of the menu interface bears plenty of superficial nods to the vintage Atari experience: plenty of use of Bauhaus font (the font Atari used with the original 7 cartridges released with the Atari VCS in 1977), lots of browns and oranges, and of course the carousel navigation that uses the original cabinet and/or game box art to help you select a game to play. But despite fonts and colors, this doesn’t look ’80s, and it certainly doesn’t sound ’80s. The entire time you’re on the menu, loud 21st century techno music booms from your speaker. To be fair, I like this kind of music, and the music they chose is decent. But it’s a distracting anachronism.

I compare this to the Williams Pinball Collection that came out a few years ago on the modern consoles. Its interface looks like an arcade, with the pinball tables lined up along the wall, and over the din of a dozen pinball machines blasts licensed ’80s popular music. (The song that stands out for me is the quite-possibly-perfect Loverboy hit “Workin’ for the Weekend.”) This is what I would have liked (if not downright expected) in a properly executed Atari collection.

Lamentations about “what could have been” aside, it is truly great to see the original game box art and arcade cabinets on the menu, and the menu itself is intuitive and fun to navigate. And it’s great that each game also includes a full high-resolution scan of the original instruction manual, which also explains why a collection of 100 games, most of which were only about 4 KB each on the original cartridges, could add up to a 68 MB download on iOS.

The sound and the fury

There was almost no question for me which game I would try first: Yars’ Revenge. I logged hundreds of hours (sometimes in a single game, it seemed) playing this game in the ’80s, long past the date when I should have moved on to the NES or PC games. Any true Atari retro experience needs to deliver a perfect rendition of Yars’ Revenge for me to consider it a success.

I started the game, picked my favorite game variation (Game 6), and then… WHAAAAA!!! Playing the game on my iPad, I was assaulted by hideous distorted grinding noises. I tried a few other games and confirmed that all of the 2600 games had horribly distorted sound. (It also didn’t help that Yars’ Revenge gets most of its intensity from a constant droning buzz, making this quite possibly the worst game I could begin this experience with.)

Fortunately, later in the evening I loaded the game onto my iPhone 3GS, and found absolutely no sound issues with the 2600 games, even Yars’ Revenge. So I’m not sure if this is a general issue with the game on the iPad, or if it was an isolated problem that could have been resolved with a reboot. I’ll follow up on that when I know more.

Playing the game

With my worries about sound allayed, I was able to focus my attention on the quality of the game experience. All of the games are presented in a relatively small area of the screen, with ample space above and below devoted to on-screen controls. There have been some complaints in App Store reviews about the games not using the full display, but I think those complaints are misguided. These Atari games in their original form were so low-res that even when shrunk down to a little less than half the size of an iPhone screen, they’re still easily viewable. Plus, displaying the games in full-screen mode would mean you’d need to obscure part of the display with your fingers in order to control the game. Unacceptable.

The developers and designers who worked on this collection put considerable thought into translating the original game controls to on-screen counterparts that do not necessarily mimic the original feel, but that usually (but not always) contribute to a satisfying game experience.

A good pair of games to consider in reviewing the merits of these control systems are the arcade versions of Asteroids and Tempest. Both games translate quite well to the iOS experience. They look fantastic (all of the vector games, in particular, come through well here), and are just as fun to play as ever. With Tempest, the original control mechanism was a flywheel-like spinner. That is replaced with a thumbwheel that reminds me of the volume controls on old transistor radios. It’s way different from the original control, but it feels surprisingly natural and it’s very easy to adapt to this type of play.

Asteroids, on the other hand, does not benefit from this new alternate control mechanism, at least for the way I like to play the game. (I should probably note that I own an actual Asteroids cocktail table, so I’m very accustomed to the arcade controls.) The default control mechanism is a combination rotate/thrust “disc,” not unlike the disc controller on an old Intellivision. (Intellivision controls on an Atari game? Blasphemy!) Some people may prefer this, but I found it absolutely unusable, mainly because of my preferred Asteroids playing style: I don’t thrust all over the screen. I stay in one spot and just rotate, and I move around only when absolutely necessary. The disc control makes it nearly impossible, for me at least, to rotate without thrusting. Luckily, Asteroids (and apparently most of the arcade games, though I haven’t tried them all yet) offers multiple control schemes, including the original arcade-style five-button configuration. This worked well for me on the iPad, but I didn’t try it yet on the iPhone, and I imagine size could be an issue there, not to mention just holding the iPhone while fiddling with five on-screen buttons at the bottom of the display.

A few other miscellaneous game notes:

No licensed games. This was a no-brainer for me, but apparently (based on reviews on the App Store) it’s confusing to some users. This collection only consists of games Atari owns the rights to. That means games that were licensed for the original Atari 2600 won’t show up here, not even if Atari developed those games. You won’t find arcade classics like Pac-Man, Space Invaders, Defender or Berzerk, and you won’t find licensed movie properties like Superman, Raiders of the Lost Ark or E.T. And you definitely won’t find games that were originally released by other game companies like Activision, Imagic or Parker Brothers. Although… one wonders. Atari licensed Pitfall! and River Raid from Activision for inclusion on the plug-and-play Atari Flashback 2 console a few years back. Maybe a similar license could be in the works. It wouldn’t be difficult for Atari to offer additional in-app purchases of more games in the future.

I think the funniest instance of licensing issues popping up here though is the matter of Pong Sports. Back in the ’80s Atari manufactured the 2600 and a number of its games under special branding for sale at Sears stores, and there were three Sears exclusive titles (Steeplechase, Submarine Commander and Stellar Track), all of which are included here. And then there’s Pong Sports. Atari released this game as Video Olympics, and sold it as Pong Sports in Sears stores. But here it’s called Pong Sports, presumably because they couldn’t get the rights to use the word “Olympics” this time around.

Unreleased and homebrew games. If you’re not a hardcore Atari fanatic, you probably don’t realize that in recent years a number of unreleased prototype games have come to light as downloadable ROMs to play in computer-based Atari 2600 emulation software. And a rabid homebrew community has developed as well, creating brand new games for the system. This collection includes a few of these prototype and homebrew games, such as the Atari 2600 version of Tempest and an unreleased game called Save Mary. I find it funny that Atari had to, of course, come up with box art for these games for the menu interface, and they went with some really low-quality homemade art for most of them. But Save Mary is the weirdest… it uses the cover art that originally went with the Atari 2600 BASIC Programming cartridge.

It’s also funny… and probably an intentional joke… that for these games, the manual scans that are displayed are not for the games (since they don’t have instruction manuals) but for the Atari 2600 console itself. Somewhat of an Easter egg, I think.

God (or is it the devil?) is in the details

Atari got a lot of things right with this collection, but there is definitely room for improvement. Here are a few things that come to mind, some of which I’ve already mentioned.

License some great ’80s music for the menu. The aforementioned Loverboy hit would certainly be great, but really just about any music that was in heavy rotation on MTV circa 1983 would work. Personally I’d love to hear plenty of Duran Duran and Men at Work.

Alternate control schemes for the 2600 titles. Here’s the one thing that I think would make the biggest difference in creating an authentic Atari 2600 experience: position the on-screen controls to better mimic the feeling of holding an old CX-40 joystick. The space is already there; they’d just need to rearrange the controls. Move the fire button to the upper left where the pause button is; move the d-pad to the lower right where the fire button is; and move the pause button to the lower right where the d-pad is. Holding a square-ish device in the left hand and pressing a button with one’s left thumb while using one’s right hand to control movement is the natural way of the Atari 2600 experience. Ideally the d-pad would be tweaked a bit as well… it’s a little too restrictive feeling. A lot of iOS games with a virtual d-pad allow you to place your thumb anywhere in a general region of the screen and that instantly becomes the “zero” position of the d-pad. I suspect (or at least hope) that, given the nature of iOS apps, Atari will continue to refine the controls in future updates.

Better “cabinet art.” I have to be honest… I can live with the graphic design of the main menus, but the graphics framing the game itself while in play are downright ugly. Better to have it look like an actual vintage TV set like VH1’s (yes, VH1’s) Intellivision collection for iOS. And I’d prefer that the on-screen buttons look exactly like the real buttons on the arcade cabinets and console controllers, without the unnecessary added visual junk. It also seems like they phoned in the design of the on-screen slider for the paddle-based games. (Why doesn’t it at least look like the control they developed for Tempest?)

Final thoughts

I could nitpick details only an OCD Atari junkie will notice, much less care about, but in the end there’s only one thing I can say about this collection. Back in the early days of the App Store, Atari released a few of its classic arcade games as standalone apps, each consisting of both the original and a new version with modernized graphics and sound: Centipede, Super Breakout, Missile Command. Then they disappeared, and were gone for ages. A month or two ago, they reappeared, but with only the modernized portions. For ages I’ve been speculating that Atari had a massive collection app in the works, and finally yesterday it arrived. I was absolutely giddy. And while it will probably never fully live up to my expectations, it’s damn close. I’ve dreamed ever since I first got my Atari 2600 console in 1982, when I was 8 years old, that one day I’d be able to carry the experience around in my pocket. And now I can… almost. It’s not perfect, and it couldn’t be. But I’ll take it anyway.

What would you have needed to carry with you in 1986 to match the utility of an iPhone today?

I’ve always been into electronic gadgets. I’ve also always been into carrying a bunch of crap that I “need” (or perceive that I need) around with me. My dream since I was a kid was always to be able to carry “everything” with me at once, in a convenient way.

It’s hard to get more convenient than a thin piece of glass, metal and plastic that fits easily into a jeans pocket. That’s the iPhone, and that’s today. My iPhone is almost unquestionably my most prized possession. Probably not just now, but of all time. It seems like it can do almost everything, which got me thinking.

25 years ago, I was a 12-year-old burgeoning tech nerd. I loved the Atari 2600 (yes, still) and was just a year away from getting my first computer. I had hundreds of cassette tapes and was already on my third or fourth Walkman. If you’d given me something like an iPhone back then, I probably would have died of ecstasy on the spot. But what 1980s stuff would I have had to lug around in my satchel back then to (roughly) approximate the functional capabilities I now (almost) take for granted in this one little device? I decided to compile a list.

1986 device: Sony Walkman portable cassette radio

In the mid-’80s, the Sony Walkman was the symbol of portable technology. As CDs overtook the popularity of cassettes in the ’90s, and Sony finally figured out how to make a portable CD player that didn’t skip if you so much as breathed on it, the Walkman was gradually replaced by the Discman.

And then along came the iPod, which itself has, ten years later, essentially become an iPhone minus the phone.

2011 app: iPod


1986 device: Microcassette recorder

As cool as the Walkman was, you couldn’t actually record with it (at least with most models). You could always lug a full-sized cassette recorder around, but if you were going for the latest and greatest in portability, that would be a microcassette recorder. Microcassettes never could match the audio fidelity of their full-sized siblings though, and were eventually replaced by digital devices that stored audio on a small hard disk and later on flash ROM. But why bother with one of those today?

2011 app: Voice Memo


1986 device: Nintendo Game & Watch LCD handheld

When I went into writing this post, I really hoped to at least give 1986 the original Game Boy, but my research says it wasn’t actually released until 1989. I never had one, so I didn’t remember. Yes, it’s true… if you wanted a handheld video game device in 1986, the best you could do was one of Nintendo’s single-game “Game & Watch” devices. As rudimentary as they seem today, their design was a clear inspiration for Nintendo’s current line of DS portable game devices.

I’ve owned two Game Boy Advance systems and three DSes over the past decade, but these days my DSi gathers dust in a cabinet while I carry over 50 video games in my pocket everywhere I go… thanks to my iPhone. iPhone gaming is still young, and in many ways the control schemes have yet to be perfected, but considering the significant price difference ($10 or less for almost all iOS games, vs. $30 or so for most DS games), the lack of a need for physical media, and the iPhone’s superior technical specs, it’s hard to see much of a future for the DS. (We’ll see what impact the soon-to-be-released 3DS has.)

2011 app: Angry Birds… or any of the 100,000 or so other iOS games


1986 device: Casio calculator watch

Calculator watches were so cool (at least, if you weren’t) in the ’80s, it’s hard to believe they would ever fade into laughable irrelevance. They were pretty impressive technology for the time though, and were irresistibly futuristic. It’s no wonder Marty McFly conspicuously sported one on his journey back to 1955… it bolstered his “future boy” cred in a way no nylon vest ever could.

2011 apps: Clock and Calculator


1986 device: Portable alarm clock

If you were too cool for a nerdy calculator watch back in the ’80s, your only option when traveling was to purchase a dedicated travel alarm clock. Some of these were pretty well-designed, but such a single-purpose device is anathema today. Besides, I’m sure the sight of one of these in a carry-on would raise a TSA eyebrow or two.

2011 app: Alarm Clock


1986 device: Pocket calendar/datebook

Pocket calendars have come in countless variations for almost as long as printing has existed, some more useful than others. Wallet card calendars like the one shown here are about as useless as they get, but that didn’t stop me from having at least one of them in my wallet at all times as a 12-year-old… especially since I didn’t have any money to put in it.

Now, not only does the iPhone’s calendar provide all of the capabilities of even the most overstuffed datebook, it can update automatically and even beep to remind you that you’re running late for that important business meeting.

2011 apps: Calendar and Contacts


1986 device: Pocket compass

I admit, I’ve never really had much use for a compass. I don’t spend a lot of time out in the wilderness, and I think a compass would only confuse my natural sense of direction in the city. But I recognize the importance of these devices, and thanks to the iPhone’s various internal sensors, all of the capabilities of a real magnetic compass can now live in software.

2011 app: Compass


1986 device: Mead memo book

Ah, the trusty Mead memo book. My dad wrote a thousand grocery lists in these while I was growing up, and the little bits of paper that tore off the spiral binding over repeated openings and closings were everywhere. These days there are more sophisticated alternatives if you still like to put pen to paper and then stuff it all in your pocket, but I prefer not to have to try to decipher my own handwriting.

2011 app: Notes


1986 device: Minolta Talker point-and-shoot 35mm camera

Sure, there were plenty of pocketable point-and-shoot cameras back in the ’80s, and of course the venerable Polaroid instant camera was still going strong. But no camera — truly, no device of any kind — epitomizes pointless ’80s novelty technology better than the Minolta Talker. I wasn’t able to verify that the Talker existed in 1986 — I think more likely it dates to 1987 or 1988 — but we had one, and I’ll never forget such helpful photographic advice as “Load film” or the classic “Too dark… use flash.”

Even at that credulous age, I wondered, if it can tell you need the flash, why can’t it just turn the flash on automatically?

2011 apps: Camera, Hipstamatic, Instagram, etc.


1986 device: JVC camcorder

Ah yes, the JVC VideoMovie. That distinctive red and black camcorder, immortalized by my hero Marty McFly. We owned one of these. It was the stuff of legend. It also, despite its considerable size, used the bizarre VHS-C format tapes. These were about 1/3 the physical size of a regular VHS cassette, but the tape itself was the same width and was compatible with regular VHS VCRs… with the help of a VHS tape-sized adapter that the VHS-C tapes would snap into. Unfortunately, since the cassettes were so small, they only had enough room to hold 20 minutes’ worth of tape. I hope Doc packed a couple of cases of blanks along with his plutonium.

(And, yes, übergeeks, I know Doc forgot to pack the plutonium. What, you think you’re the only ones who’ve watched the movie 500 times?)

2011 app: Camera


1986 device: Motorola DynaTAC mobile phone

When you look at early cell phones, it’s a wonder the devices ever caught on. Of course, they didn’t really catch on when they were the size of a small refrigerator and emitted enough radiation to make your head glow in the dark. But the fact is, you could own a cell phone back in 1986 and, well, that’s saying a lot right there, isn’t it?

OK… I really can’t come up with anything to justify the existence of this monstrosity. Incidentally, the guy in the picture is Martin Cooper, inventor of the modern cell phone. Depending on your definition of “modern.” Note his seeming reluctance to get it too close to his head.

2011 app: Phone


1986 device: Rand McNally pocket road atlas

I recently watched the classic 1964 James Bond movie Goldfinger, and was amused by the GPS-like device Bond had in his car. (GPS was just becoming available to civilians in the ’80s, and it looked like this.) As far as I know, not even Her Majesty’s Secret Service had anything approaching this kind of technology in the ’60s. In many ways it seemed as futuristic (or more so) as some of the stuff that would appear on Star Trek a couple years later. And yet, it’s now something that is not only common in a lot of ordinary cars, but we even carry it in our pockets.

Back in the ’80s, though, the only way to carry road maps in your pocket was with a little book like this, which was only useful if you were willing to limit yourself to freeways and a lot of guessing.

2011 app: Maps


1986 device: Newspapers, magazines, books

No industry is reeling from the iPhone (and the iPad) the way publishing is. Newspapers, magazines, books… publishers of all kinds are trying to discover viable business models in the world of paperless publishing. (And here I thought we’d already worked all of this stuff out with the web over the past 15 years.)

One thing is certain, though: however you like to get your news, information and entertainment, with an iPhone it’s already in your pocket.

2011 apps: Reeder, Instapaper, newspaper/magazine apps, iBooks, Kindle, etc.


1986 device: Citizen portable LCD TV with 2-inch B&W screen

Yes… a portable LCD TV in the mid-’80s. Don’t believe it? I had one of these, exactly as shown. It had a 2-inch black-and-white screen. And, strangely, the screen was in the top of that flip-up lid. The bottom part had a mirror, which was what you looked at to view your program. Why? Well… backlight technology was feeble and battery-sucking. The lid was translucent, and if you were in a bright enough environment, the ambient light would shine through, illuminating the screen. There was also a bulky snap-on backlight attachment for use in dimmer surroundings, but if this was in one of your pockets, the rest of them better be filled with AAA batteries or you wouldn’t be watching much.

True, TV tuner technology doesn’t exist in the iPhone. But what the iPhone has is better… with iTunes, Netflix, PBS and more, you’ve got on demand TV… in full color, backlit, no snap-ons or AAA batteries required.

2011 apps: iPod, Netflix, PBS, etc.


1986 device: Flashlight

OK, OK. This flashlight is from the 1960s. But my grandparents had one exactly like this when I was a kid in the ’80s. The big black thing on the side had magnets in it, allowing it to stick to the side of the refrigerator, which is where they always kept it.

If you don’t have an iPhone 4 (which I don’t, but which has an LED flash for the camera), the only source of light is the screen itself. Pretty dim for a flashlight, but it works in a pinch. There are flashlight apps out there, but unless it’s one that powers on the camera LED, I think just turning the thing on so the screen lights up is as good as any of the dedicated apps.

2011 app: Any one of the countless flashlight apps


1986 device: TRS-80 Model 100 portable computer

It’s a bit of a stretch to call the iPhone a portable computer, at least when compared to modern portable computers. But considering the capabilities (and perhaps I’m using that term ironically) of the portable computers that existed in 1986, the iPhone is like having a Cray supercomputer in your pocket. A 3.5-inch touchscreen is never going to replace a full-fledged computer for serious work, but still, if you really have to, you can get some work done. I’ve managed to do some emergency sysadmin work from my iPhone sitting in a gas station parking lot while traveling.

2011 apps: Documents To Go, AirSharing, iSSH, etc.


All of this just barely scratches the surface, of course. But I think it demonstrates the huge impact the iPhone has had on me as a manifestation of all of my childhood fantasies about futuristic technology. You can keep your flying cars. Just let me keep my iPhone.

Image sources:
Marty McFly with JVC VideoMovie camcorder and calculator watch
Sony Walkman portable cassette player
Aiwa microcassette recorder
Nintendo Game & Watch handheld LCD video game
Casio calculator watch
Braun travel alarm clock
Coca-Cola pocket calendar
Pocket compass
Mead memo book
Minolta Talker camera
JVC VideoMovie camcorder
Cell phone inventor Martin Cooper with a Motorola DynaTAC
Rand McNally Pocket Road Atlas
Time magazine cover featuring Space Shuttle Challenger explosion
Citizen portable LCD TV
Rayovac 1960s flashlight
TRS-80 Model 100 portable computer
1980s GPS equipment

Addendum, April 2, 2011: If you’re hoping to truly recreate that 1986 experience on your iPhone, check out this Game and Watch-inspired iOS game, Monkey Labour!

A follow-up on Apache not starting on my web server

About 6 weeks ago, I wrote about a problem I was having with Apache not starting with SSLEngine on. I ended the post somewhat ominously with the following:

I’m a little concerned that Apache is going to require manual input of these pass phrases again whenever it restarts (e.g. if the server reboots). I hope not, but for now I am at least able to move forward knowing it works at all.

This morning, a little before 6 AM, that happened. I was awakened by notifications (with their attendant beeps and nightstand vibrations) on my iPhone that my web server was down. Great. Half-awake, I fired up my hosting provider’s handy iPhone app, tapped the “Hard Reboot” button, and tried to go back to sleep. Except, the notifications kept coming. Eventually I was awake enough to realize that the server was coming back up, but Apache wasn’t. Time to get up and deal with this problem from a real computer.

SSHed in, I tried manually starting Apache, and got this:

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

What the crap? After spending a half hour visually scanning log and configuration files, to no avail, I decided I needed to try to find out what was running on port 80. This page was helpful in that regard. I ran the command lsof +M -i4 and found that, whaddayknow, Apache was running. Apparently. But I couldn’t shut it down, and I couldn’t restart it. There were no signs of any compromise of the system’s security, so I just chalked this up to some minor problem deeply buried somewhere in a configuration file that I have yet to track down (but which is probably my fault). At any rate, lsof gave me what I really wanted: the process ID that was listening on port 80. Time for the dreaded kill -9 command.

After that, I tried starting Apache again, and it worked… and, as I suspected, it did ask for the pass phrases again. But now, all is well. (Except for the nagging feeling of not knowing what caused this to happen in the first place. Stay tuned…)