Above and Beyond from Sun and Apple

I had a problem with Sun’s JVisualVM tool, when trying to profile Poker Copilot. It seems that one of the libraries I use stops JVisualVM was working fully on Mac OS X. I asked on Apple’s java-dev mailing list if anyone else had encountered and had a work-around.

I got a personal reply from Tomas Hurka, the Sun employee who created JVisualVM. We interchanged several e-mails over two days until we had a small test case that reproduced the problem.

I now expected the problem to go into the ether, maybe to be solved in a year or two. How cynical of me.

Over the next two weeks I received continual updates from the Sun employee on the progress of this issue. He worked together with an Apple engineer to determine that the problem lay in Apple’s Java virtual machine (JVM), in an obscure but essential aspect of the JVM called class verification.

The Apple engineer found a work-around and shared it with the Sun employee. He then forwarded it to me. Problem identified and solved. Total time elapsed: 15 days.

This is not the level of attention I’ve come to expect from large organisations. :-)

For the record: the library that causes the problem is Spring. The work-around is adding -Xverify:none to the JVM command line arguments.

A Poker Copilot update

You can download Poker Copilot 2.17 here: http://pokercopilot.com/downloads/pokercopilot2.17.dmg. Your hand history database will be reset the first time you use this update.

Did you ever read The Cat in the Hat Comes Back? Do you remember how, when he cleaned up a mess, he created a new problem? Sometimes when fixing Poker Copilot problems I feel like I’m the Cat in the Hat. Which is why, even though I’ve tested this release on Tiger, Leopard, and Snow Leopard, in lots of scenarios, I am not making this an official release yet.

This is purely a bug-fix release. Here’s what changed:

  • Start-up is quick, even if you have a million hands in your Poker Copilot database
  • Poker Copilot now fits once more into 1024×768 displays.
  • Tournament results for Full Tilt guarantee cash-out tournaments are now correctly loaded.
  • Tournament results for Full Tilt satellites are now correctly loaded.
  • PokerStars freeroll tournaments are now handled better.
  • A slight discrepancy in “Went to Showdown %” stat in Full Tilt is fixed.
  • “Went to showdown” and related statistics now work properly with Ongame Network poker rooms.
  • Errors in Ongame Network take calculation for split pots are fixed
  • Errors in Ongame Network take calculation for all-in pots are fixed
  • If you put your Mac to sleep while Poker Copilot is running, the HUD would stop working until you restarted Poker Copilot. This is now fixed.
  • The custom charts now includes all available statistics.

Update Instructions:

  1. Download version 2.17 here.
  2. Open the downloaded file.
  3. Drag the Poker Copilot icon to the Applications icon.
  4. If prompted to replace an existing version, confirm that you do want to replace.

Now you’re done and ready to hit the tables.

Build or Buy? Redux

Last week I wrote:

Now that my one-person software company is well-established, some decisions that used to be hard to make have become no-brainers. For example, should I code a Java component myself, or should I buy a quality third-party component that does the same thing? Unless it is outrageously expensive, the answer is easy: buy, buy, buy.

An insightful anonymous commenter wrote:

A problem is that the more 3rd party APIs you add, the more bugs you get that are close to impossible to fix.

If you have a bug or a performance problem in your own API, you know it, it can be fixed.

When it’s in a closed 3rd party component, you have to cross your fingers they’ll respond (and be able to reproduce the bugs), etc.

I thought this comment was right on the money.

So what happened when I tried JXFileWatcher and found it didn’t work in Mac OS X 10.4 (Tiger)? I reported this to them. A few days later they e-mailed me to say that it was fixed. They also included a link directly to the new download.

JXFileWatcher is a product from TeamDev, a small Ukrainian company.

There’s a third part to this story, which I’ll share soon…

Idea of the Day: DropBox and Poker Copilot

Loyal Poker Copilot customer Keith X shared an elegant and simple way to keep your Poker hand history folders in sync if you play on more than one computer. Say, one at home and one on the road. Keith writes:

Sharing hand histories between two computers is very simple with Dropbox. (Use this link to join up with DropBox and Keith gets an extra 250MB of free storage. Steve.)

Install Dropbox on both systems, it’s stable and much faster than Apple’s iDisk. Make a Poker subfolder inside your Dropbox folder, then do an option-click drag on your history files to copy them into the shared folder. To make things simple, put aliases on your desktops to the hand history folder on each system. At the end of each session copy files to the sharepoint, and whenever you switch systems do a quick copy into your local history folder. It’s super simple to keep in sync, Dropbox does all the heavy lifting.

Sounds great. I wonder if you could even tell the Full Till or PokerStars software to use DropBox directly.

I love DropBox, and I often use it to transfer files between two computers on the same wifi network. Why? Because I don’t need to have both computers on at the same time.

Must… Not… Rant…

I try not to rant in this blog. So I’ll present this clearly and objectively.

Until recently Full Tilt Poker indicated in the tournament summary file that you won a tournament entry as such:

1: Phil_Ivey, Entry to Tournament #70051699

But recently this has changed to

1: Phil_Hellmuth, entry to tournament 113552656

A human can recognise the difference without a moment’s thought. The eye skips over the change of upper case letters into lower case letters. Likewise with the disappearing #. But computer are not humans. Artificial intelligence never did get the hang of understanding arbitrary minor changes.

And so, the Poker Copilot parser breaks again.

I’m curious as to why Full Tilt makes such changes from time to time. A new developer who prefers lower-case to upper-case? who doesn’t like # signs? Is it in order to deal with internal Full Tilt bugs? Is it intentional to keep us developers of poker tracking software on our toes?

Fixing the problem is trivial. Identifying the problem is a bit harder. Predicting the problem in advance is fiendishly difficult.

This problem will be fixed in the next Poker Copilot update.

Usability Testing: The Results

Rico and Valou read yesterday’s post about my first usability testing session for Poker Copilot. They asked for my findings. Here’s what I jotted down while conducting the testing:

  • When stuck, users scan the menus. So every feature should be accessible via the menu bar.
  • Consistency is golden. A couple of drop-downs in Poker Copilot behave differently to other identical-looking drop-downs (they don’t trigger a chart refresh). This is confusing.
  • If something is double-clickable, there should be some indication. For example, make it look like a hyperlink, or change the appearance on mouse over, or have a little indicator next to it. It is not immediately obvious that double-clicking on item in a Poker Copilot table will do something.
  • The user’s mental model is not always the same as the developer’s mental model. In the case of Poker Copilot, the user may want to go from viewing a statistic to charting it, rather than the other way around.
  • In general, copy what Apple does (or MS for Windows developers). They probably do a lot of usability testing in their design. They set the standard on what users expect.

All of this is based on a sample size of 2. So please do your own testing before accepting my findings.

My First Usability Test

I’ve long read about usability tests. I’ve long intended to use usability tests in developing software. But you know, it was just a little too complicated to arrange.

A few days ago I finally performed a usability test on Poker Copilot. An online poker-playing who lives nearby was kind enough to accept my offer of a free copy of Poker Copilot in return for his participation. The basic gist of the test was to give the participant some tasks to perform, such as “Find the Poker Copilot website”, “Download and install Poker Copilot” or “Find out player XYZ’s ‘Went to showdown %'”. While he did this, I sat back and silently watch, taking notes on any difficulties I notice.

It was revealing. And surprising. I use Poker Copilot without any problems, because I designed it and coded it. Someone without that background (that is, the whole population of the earth minus me) may find it somewhat harder.

As a result, I’ll be tweaking some aspects of the UI in the weeks ahead.

If you also create software, I recommend giving usability testing a try.

Build or Buy?

Now that my one-person software company is well-established, some decisions that used to be hard to make have become no-brainers. For example, should I code a Java component myself, or should I buy a quality third-party component that does the same thing? Unless it is outrageously expensive, the answer is easy: buy, buy, buy.

The back story

I’m in an ongoing battle to make Poker Copilot less resource-hungry. It is a battle on multiple fronts. One front is detecting updated hand history files.

Poker Copilot scans every few seconds for new or updated hand history files. The scanning is inefficient, especially if you have thousands of hand history file. If you are a hard-core techie who finds it fun to watch Activity Monitor, you’ll notice that every few seconds Poker Copilot’s CPU usage spikes. This is due to the scanning for changed files.

The scanning is necessary, because Java doesn’t provide a way to be automatically informed of file updates. The upcoming Java 7 promises to have this feature, but Java 7 is not yet released. Java 7 seems to be one of those products that is promised and promised and promised for years but is never delivered.

On Mac OS X you can be notified of file system changes in Objective C, using the File System Events API. So I could code a small component in Objective C that sends a notification to Poker Copilot’s Java code. But this is messy and I’m an amateur at Objective C. And frankly, I don’t like Objective C, with its multiple personalities. When I mess around in Objective C, I feel like I need to have a shower to cleanse myself.

Enter JxFileWatcher. This is a commercial Java component that hooks into Mac OS X’s native file notifications. It’s not cheap, but if makes Poker Copilot better, and saves me as little as a couple of day’s work, it is easily worth it.

I’ve been running some tests on JxFileWatcher using the brilliant JVisualVM to make sure it doesn’t eat memory or CPU. So far, so good.

Novel Poker Board

There’s a brand spanking new Poker Q&A board called Outflopped that works on reputation and upvoting. It uses the same engine used by StackOverflow, the excellent programmer’s Q&A board.

Out of curiosity, I posed a question about overbetting, to see how good the answers are.