Michaelzanussi.com header image

Random Mac

Mac has been running great since I had the hard drive replaced a few months ago. No more lengthy pinwheel spinning and not a single flashing question mark folder in all those days.

However, Mac did perform a random reboot tonight, which when it happens is a bit startling. Thinking back, I believe it’s done it one other time since I’ve owned the machine. In other words, quite rare.  I can’t recall what triggered it last time, nor am I really sure what happened this time, but I’m leaning towards pointing the finger at Parallels, since I was poking around with Office 2007 and its PDF/XPS plug-in when the reboot occurred.

Parallels will blow every so often, courtesy of Windows I gather, so I shouldn’t be the least bit shocked. But I only ask Windows Parallels to contain its Windows blue screen of death to the virtual machine only, and not infect Mac.

Pretty please?

GoDaddy + 500 Internal Server Error

A GoDaddy hosted website of mine had the annoying habit until recently of displaying a HTTP 500 Internal Server Error page whenever an invalid, nonexistent URL was specified, rather than the expected HTTP 404 Not Found error. Annoying because I had a custom 404 error page defined and setup for the site, but for whatever reason GoDaddy was ignoring and showing a 500 error instead.

I let the problem slide for a while, but revisited it tonight, for whatever reason. The culprit, it turns out, was an old WordPress installation, which ultimately led me to the .htaccess file living in the root directory. Being not that familiar with Apache, I pretty much ignored the file in the past. Curiosity got to me, however, and sure enough I found WordPress was the only application referenced in it. I went ahead and removed the .htaccess file, and now I no longer get the 500 error but rather my custom 404 page.

Problem solved.

Riven: The Sequel To Myst

I ran across a Riven 5-CD disk set while I was cleaning out a desk today. Myst was such a cool and revolutionary game when it first came out, but I think Riven was even better. It’s hard to describe the genre Myst and Riven reside in, kind of a cross between adventure, fantasy, and interactive fiction (even though it’s all graphics).

It had been a good 10 years since I last played it, I really wanted to relive the experience. Although the requirements were for a Windows 95 box, it installed smoothly on XP and required only a bit of tweaking. Plus, I was able to get it to run strictly off HD; no CD swapping necessary.

Riven: The Sequel To Myst, in all its glory.

Riven: The Sequel To Myst, in all its glory. Running on XP under Parallels.

If you’ve never played Myst or Riven, I’d highly recommend you get a copy somewhere and play it. Well worth your time.

Not So Cuil

Cuil (pronounced “cool”) debuted today, a new search engine brought to you by a few former Google employees. It’s pretty slick, presenting the user’s search results in a columnar, newspaper fashion, configurable to either 2 or 3 columns wide. It’s a nice, simple format. I really like it.

Unfortunately, it appears the engine itself might still be in its infancy. I did a query on “Lisa and Michael” to see if lisaandmichael.net would show up in its results. It does, in the #1 spot, but alas, something is not quite right:

Search results from Cuil\'s first day.

Cuil has associated a wrong image with our site. I’m not sure who those two people, but it’s definitely not me or Lisa.

Probably a slight glitch, but Cuil looks promising, and I’ll be sure to check back from time to time. Good luck guys going head-to-head with the behemoth.

Beyond the IVR

The New Yorker has a good article on automatic speech recognition and its use in tools far beyond interactive voice response systems; aggression-detection systems, for example.

Milliways

Someone found a complete backup of Infocom’s (of Zork legend) shared network drive from 1989. Apparently, it includes a complete copy of the sequel to the Hitchhiker’s Guide to the Galaxy, called Milliways. It even includes links to the prototype Z-code files. Check it out, if you’re nostalgic or an IF fan. Wowser!

Commodore Nostalgia

I ran across scanned copies of the Commodore 64 User’s Guide and Programmer’s Reference Guide, in handy PDF format. Not surprising, really, that someone took the time to scan them in.

I sometimes wish I still had my 64.

Oh, and be sure to download Firefox 3. Very nice.

A History of Copy Protection

This nice article brought back memories of old-school copy protection, such as “enter last word of second to last sentence on page 72 of game manual” or intentional bad sectors on commercial 5.25 inch floppies in an attempt to thwart copying on the 1541.

Leafpile Update 2

I’m about 50% complete with the Java implementation of Leafpile but have decided to put development on the back-burner while I focus on learning to write Mac applications. In fact, why not simply port what I have now over to a Cocoa application. Mac is back in service again, and I’ve really been itching to look at Objective-C and the Cocoa API for some time. Why not a Z-Machine interpreter as a first native Mac OS X application?

Sad Mac

Arrg. My upgrade to Leopard didn’t go well last night.

I commented back in January about my Mac issues, and they reared their ugly head again. I’ve continued to have problems restarting my Mac, half of the time it can’t find the hard drive and I get the Question Mark folder. I know I’m in the clear when the Apple logo appears, but that appears less and less these days.

The upgrade to Leopard started fine. When the Mac rebooted, it had no problems locating the startup drive, and allowed me to select it to install the upgrade on. After the brutally long process of verifying the DVD, the upgrade started. Within a few seconds, though, the Mac flashed a large yellow yield sign telling me to contact Apple.

I decided to retry the upgrade. On restart, my drive was no longer selectable. It was an invalid upgrade drive; the installer informed me I’d have to wipe out the drive and start over with a fresh install. Something was hosed (fortunately for me, I performed a full backup prior to all this), so I restarted again. This time, Mac couldn’t find any hard drives to upgrade or install fresh. Nothing. Nada. Subsequent reboots didn’t fix this.

Frustrated, I ejected the Leopard update DVD and attempted a restart again. Lucky me, there is the Apple logo! However, that was short lived, since a few moments after the logo appeared, Mac shut itself down. Subsequent restarts displayed the same behavior. Mac is totally hosed.

Tomorrow will be my first exposure to Apple’s so-called ‘Genius Bar.’ Updates to follow…

Sad Michael.

Update 05/21/08: Genius Bar is pretty cool, they seem to have knowledgeable people working at it. Within a few seconds of relaying my story, they agreed the 500GB drive is/was going kaput, and will replace it. It’ll take 4-6 days, so I’m going through a bit of World of Warcraft withdrawal. Not that I play it much, but I’m kind of in the mood.

Mac In The Office

Does the future lie in application development for the Mac?

The current issue of BusinessWeek has an article on the growing demand of Macs in the office. Sales are up an astonishing 51% over last year and more and more employees are requesting them.

With the growing popularity of the iPod, iPhone, web apps and VM software (which if you really wanted to could run Windows on the Mac), the call gets louder. But there are some big roadblocks, including IT’s reluctance to support multiple platforms and the lack of native Mac support for the most popular applications from the likes of SAP.

Roadblocks that will indeed impede the adoption of the Mac in the workplace. But if demand gets big enough, and I think it will, I see lots of future opportunities for software engineers to write business-level applications for the Mac and port existing PC applications to the Mac.

Maybe it is time to start picking up those skills necessary to take advantage.

Interlude

Spotted in the wild. And yes, this version of Spam isn’t good for you either.

The Spam slot machine
The Spam slot machine!

Leafpile Update

Progress has been glacial, but as of today, about 25% of the opcodes are coded and tested. I completed a “simple” console UI using Swing and the Java 2D API because I was at a point where I needed some kind of user interface to do any kind of useful testing. I don’t work much with UIs, especially console-type applications, so the Leafpile front-end took some time for me to code. I was trying to capture the feeling of a C64, and I think I’ve achieved that quite nicely:

Leafpile UI

(My plans are to also emulate a green-screen, MS-DOS 3.2-running, IBM clone someday, but that will have to wait). Input and output are handled fully for the most part, but as you can see there are a few minor issues I need to deal with (note the serial number and the lack of a cursor).

With a UI out of the way, I can concentrate on finishing the remaining opcodes. Testing is a bear, and I should note that so far in the entire process I’ve been working with a V3 story file only. I can’t imagine the bugs I’ll need to squish when I start playing around with newer story files.

I trudge along, hoping to release some code soon…

The Good List

I added a page listing my all-time recommended list of programming books, guides, and references. It’s called Good Reads, and you’ll find a link on the right.

iMac Issues

I love my Mac, but I do have issues with it from time to time.

A few times a week, it’ll hang on the spinning pinwheel for minutes at a time. Could be a caching problem or having a hard time accessing the hard drive? It’ll recover, but it sure is annoying.

On other occasions, if I shut down the system or do a reboot, on startup I’ll get the flashing question mark folder (is that the iMac’s version of the Sad Mac?) and it’ll take a number of hard resets to get things back to normal.

The flashing question mark folder
Uh, what happened to my operating system?

I’ve noticed this occurs more often after the iMac updates some part of its operating system, but, it’s kind of random.

In any case, I’m hesitant to call up technical support, I’d rather not have to go down the checklist with them just to have them tell me to re-install Mac OS X. However, if it keeps getting worse, I may have no choice.

Mind you, these problems are minimal, and when the iMac is running as expected, it’s the greatest thing since sliced bread. I’m certainly a Mac convert, and I doubt I’ll ever buy a PC again.

Mass Agent Logout

Emergency situations sometimes arise when the call center needs all agents to log out of the system immediately (a fire drill, for instance). Managers and supervisors usually have to log some agents out manually, though, and typically it is the Desktop Toolkit StarterApp that they use. It’s not the best tool to use, but it’s the only one at their disposal unless they want to run to each agent’s workstation or, I suppose, contact someone from telecom to dump them at the switch. Not desirable, in any case.

A while back, our group was tasked with creating a tool to make their lives easier, if possible. Below are development screenshots of a tool I developed to do just that. It’s a Java Swing application that allows the manager to press a single button to log everyone out. If an agent is in a ready, not ready, or after-call-work state, they are logged out immediately; but anyone on an inbound call is left logged in until their call is completed, at which point a subsequent press of the same button logs them out.

The agent table showing active DNs, plus three StarterApp instances used for dev testing. Logout DNs button pressed, but agent table shows one DN on a call. Note StarterApp instances. A final click of the Logout button after call is ended, all agents logged out.

The logout procedure is quite simple when using the Genji API: instantiate TeleServerContext, PhoneTeleLine and PhoneTeleAddress objects, call the open() method on the PhoneTeleLine object, set and register the DN to logout, then call logout() on the PhoneTeleAddress object. You’ll have to wait for various events to occur before performing some steps, but it’s a fairly straightforward process, and it is outlined in the Java Interface for Desktop Toolkit 7.0 Developer’s Guide.

The most challenging aspect of the project turned out to be the generation of a list of active DNs to feed to the logout procedure. The Genji API as far as I can tell provides no way to query DNs for their current status. To get at this information required queries against the Elix Presto table, which contains real-time statistics on the call center. To further complicate matters, the call center required the ability to filter out DNs based on their function (for example, if the DN belonged to a dispatcher, don’t log her out). That information is contained in a variety of Configuration Manager tables, but like Presto is easy enough to get at. A few queries later and some data manipulation, and you have a list of DNs to logout.

All that is left now is the testing, a lot of testing, then the application can be turned over to the call center.

Leafpile

I setup a new project at SourceForge called Leafpile. The plan is to do a Java implementation of the Z-machine virtual machine used for running interactive fiction story files, (think: Infocom). There’s a very concise standard out there for how to do this, called the Z-Machine Standards Document.

Z-machine Standards Document
Lots of Post-It notes and scribbles already.

There are tons of interpreters out there for various operating systems and devices, have been for a long time, and of those there are a number of Java implementations. So it’s not like I’m doing anything new. But I love text adventures and since I’m such a geek, well, I just had to write my own.

Infocom

I was cleaning up an old hard drive yesterday and ran across a pile of Infocom data files from their popular text adventures. They probably came from an old compilation I picked up years ago called The Lost Treasures of Infocom. I absolutely loved playing these games on my Commodore 64.

Infocom’s games ran on a virtual machine called the Z-machine, and nowadays, there are a variety of emulators available.

On the Mac I use Zoom. Here’s Zork I loaded up:

Zoom

For the PC there is Winfrotz. Zork 3 is running:

Winfrotz

Who needs graphics!

Missing Yahoo Toolbar Buttons In Firefox

I’ve been running into a major annoyance with Yahoo Toolbar in recent weeks. Seems in Firefox, for whatever reason, the toolbar buttons just disappear. It’s happened on my Mac and my PCs, both at the home and the office. About all that remains is the search text box and button, and the alert. Gone is everything else:

Missing buttons

I figured I could just manually add the buttons, but whatever you select, whether it be Bookmarks or Mail, the settings refuse to stick. The far right divider shown in the picture above will momentarily scoot out as if it were expanding to add the buttons, but then it bounces back to its original position, with no new buttons inserted.

Uninstalling and reinstalling the toolbar doesn’t help. On my PCs, I even tried deleting the extension settings located in the folder {635abd67-4fe9-1b23-4f01-e679fa7484c1} under C:\Documents and Settings\[user name]\Application Data\Mozilla\Firefox\Profiles\[profile name]\extensions. No change.

There’s probably a trick to fix this, but I haven’t found it yet. Hopefully someone else out there has figured it out. Meanwhile, deleting the profile and adding a new one resolved my problem. What a pain.

Removing Old Workspaces From Eclipse Workspace Launcher

Eclipse has a pretty nice way to manage multiple workspaces called the Workspace Launcher. Unless you’ve told the IDE otherwise, the launcher will appear every time Eclipse is started:

workspace launcher

However, Eclipse provides no way to remove old, non-existent workspaces from the launcher. I figured Eclipse stored the list in some configuration file somewhere, but Windows search never turned up a thing.

Well, it turns out my initial hunch was correct.

Under the %ECLIPSE_HOME%\configuration\.settings directory is a file aptly named org.eclipse.ui.ide.prefs that contains a series of key-value pairs, in particular RECENT_WORKSPACES:

RECENT_WORKSPACES=P\:\\WorkTwo,C\:\\Java\\Projects,C\:\\Java\\Projects5

Remove the offending entries from the comma-separated list and voila, they’re gone from the drop-down list next time you start Eclipse. Apparently, Windows search ignores folders starting with a dot (”.”). How ridiculous is that? Anyhow, my long-time companion UltraEdit and its Find In Files command found what I was looking for.

Firebug

If you’re doing any kind of Ajax development, I’d highly recommend getting the Firebug plug-in for Firefox. It’s been a godsend for debugging Ajax apps.

Overlooking The Obvious

Back in February I was discussing post-call surveys and how to implement them in Genesys. After a pile of work, tons of headaches, and five months later, we finally pushed the application into production at the end of July (we dumped our dreams of using voice callback and used outbound instead, works like a charm).

It didn’t take long, however, before things went haywire and the application started spitting out SQL exceptions (unique constraint violations) every 100 surveys or so. They were strange and random errors, and I spent the better part of the week scratching my head, pouring over code, wondering why the hell my data was getting corrupted and causing the constraint exceptions.

My moment of enlightenment came while riding the bus home tonight when I finally figured out what was going on. This picture sums it up:

Courtesy _Java Servlet Programming_

As it turns out, the servlet I’m using to store off the survey results to our database is using a few non-local variables (none of the code is synchronized) which are getting stomped on by multiple servlet threads. Obviously, in our test environment this is easily missed since it’s typically only a single thread accessing the servlet at any given time, and even in production the surveys are spaced out enough where this pops up maybe 1-2% of the time.

I’m 99% sure this will turn out to be the root cause, and I’ll be able to verify my suspicions come Monday morning. I really should be more careful in the future… I’ll feel a bit stupid that this one got by me, if it turns out to be the problem.

Update: Yep, that was the problem. Simply switching to local vars in the servlet resolved this. There was a second servlet also affected, one that updated rows in a table, and changing that method to synchronized fixed that issue. Quite honestly, it was a simple fix to a stupid bug, one that better testing would have uncovered. I’ve since revised my test plans to properly pick-up these types of errors. The updated code is now running perfectly in production. 24 August 2007.

Error 1064

I’m doing some text classification stuff related to spam and needed to install MySQL (5.0.41) on my iMac running Tiger (10.4.9). However, when attempting to create a table with MySQL Administrator I get the following error:

Error 1064
An example showing MySQL error 1064

For the life of me, I have no idea why it’s giving me this error, Google hasn’t been a huge help, but I believe it’s related to MySQL Administrator because I have no problems creating the same table using phpMyAdmin. Nice tool, BTW.

XMLHttpRequest

I found an excellent series of articles on Ajax over at IBM’s developerWorks. They’re from the author of Head Rush Ajax, Brett McLaughlin. Well worth the time to read if you’re like me and just getting a toe in the water with Ajax.

Microsoft Is Dead

What killed them? Google, Ajax, broadband, and OS X, in Paul Graham’s eyes at least.

And, I totally agree with him. Looking at his list, I’m already quite entrenched with 3 of the 4 items, and if it weren’t for my PC at the office, I’d have dumped Microsoft long ago, since everything I do now (web design, programming, budgeting and finance, hell, even WoW), I can do on a Mac. I just can’t pull the trigger on buying a MacBook Pro because I’m too damn cheap for my own good.

Maybe it’s time to think about a big brother for my iPod. Poor thing.

Update 21:46 MST: I did it, I bought a Mac tonight! The trip to the Apple Store did it. I decided, though, on a 24″ iMac rather than the 15″ MacBook Pro. I don’t need two laptops right now, and thought the desktop would be a good start to get my feet wet in the Mac world. When my trusty Dell Inspiron dies, then I’ll pick up a MBP.

Update 04/10/2007 08:25 MST: Not surprisingly, Microsoft apologists (ok, MS themselves) miss the point in Paul’s essay.

Under the comments, I also found this amusing quote from a reader:

But anecdotally, looking around I barely ever see a MacBook outside of a concert hall. Obviously I don’t know anyone that really counts!

Apparently, this person has never visited the engineering and CS departments of most university campuses. When I was back in school in 2003, I was shocked, SHOCKED!, at how many students used Apple computers. Of course, it took only a few hours on a friend’s Mac to understand why they are so widely used by geeks now. Time to remove head from sand, Microsoft apologist.