The Poker Copilot Blog

Tracking the development of Poker Copilot, Mac OS X software for poker analysis and statistics.

Tuesday, 30 June 2009

Poker Copilot: One Year Old

Today is Poker Copilot's 1st birthday.

From a year ago:

It's 30th June, 8:43pm, it's the target launch date, and I've made it.

A few minutes ago I uploaded the live version of the Poker Copilot website. Now you can download the trial version. You can also buy Poker Copilot.

In 1995, I ran into some guys I knew from university days, including Peter Lewis. Over lunch, I heard that Peter was producing Mac software under the guise of Stairways Software, and doing very well at it. I was astounded. It never occurred to me that real people could start one-person companies to produce and sell software. Producing software? That I understood. Marketing and selling software? I thought that was for Other People. Big firms.

Now I knew it was possible, this seemed a dream career. The seed of an idea was planted. However I was doing something else at the time that had nothing to do with software. Something that was far more important to me at the time. So the seed didn't take root.

In early 2000, inspired by the crazy dot-com money then flooding the industry and this Jakob Nielsen article, I tried to found a software company to produce content management software for intranets. Somehow though, contrary to my plan, it became a consulting company, and not a software-development house. After some years, I sold my remaining stake in the company, then travelled around the world for a year or so. When I started working again, it was as a body-for-hire contractor.

Now, I seem to have fallen on my feet with Poker Copilot. One year after releasing Poker Copilot 1.0, it's my main source of income, and I've made good progress on version 2. Almost every day I'm learning something new about developing, marketing, selling, and supporting software, and I'm lovin' it!

Monday, 29 June 2009

Poker Copilot 2 Early Access Program Update

For the curious, the brave, and the desperate, Poker Copilot 2 early access version build 13 is available at http://pokercopilot.com/eap

What's changed:

  • the Bankroll chart has showdown winnings and non-showdown winnings
  • unresponsive HUD issues have been fixed (I hope!)
  • bug fixes based on crash reports
  • I've experimented on the bankroll chart with a refresh button. Instead of the chart automatically updating every few seconds - which is bad idea when there is mountains of data to crunch - it updates on request
Known problems:
  • charting by hands is still unavailable
You can run the EAP version without affecting Poker Copilot 1 at all.

Sunday, 28 June 2009

Poker Copilot 1.76 Released

Loyal Poker Copilot customer Andreas spotted an error in Poker Copilot's stats. In some cases, players were appearing slighter tighter than they actually were. Some other stats based on "flops seen" were also occasionally inaccurate.

Poker Copilot 1.76 fixes this and is available now for download.

This version also knows about PokerStars' step tournaments and calculates correct values for winning at any step.

A Lousy Poker Copilot Week - And a New Feature

Apple broke Java. Poker Copilot is written in Java.

Across the known world, Java-based apps on Mac OS X started behaving badly after Apple released the latest Java update. Apple have acknowledged that they broke things. They've stated that they take these problems very seriously and are working hard on solving them. But there's no promise on when a better Java update will be available. Sigh.

The problems include:

  • disappearing menu bars.
  • menu items not working.
  • strange, random crashes that show messages like: Non-Java exception raised, not handled! (Original problem: Can't cache image)
The first two items are not critical for Poker Copilot, because you can use Poker Copilot without using the menu bar. The strange, random crashes disturb me, though. Fortunately they don't happen often.

This affects big, well-known products too, and I think they have more leverage with Apple than I do, so I'm counting on them getting heavy with Apple. Like, "we know where your children go to school..." heavy. Like, "we have photos of you in compromising situations..." heavy.


Even worse than Apple breaking Java, I had a nasty dentist appointment. It involved metal implements I had not seen before. Foul-smelling ointments. Extended periods of pain. Maniacal grins of sadistic pleasure from my dentist. As a result I was laid low on Friday, unable to work or to respond to support e-mails, thereby failing in my endeavour to meaningfully answer all support e-mails within 24 hours. Instead I watched Michael Jackson tributes on television.

But enough self-pity. I did manage to add a highly-requested feature: showdown winnings vs non-showdown winnings.
This will be in the next EAP release, which should be available later today. Oh, and those numbers you see in the chart? That's strictly test data gathered from a number of sources - I am not down $3,000!

Finally, although I've implemented this feature, I'm not sure how to use it. Does anyone care to explain how I can use the showdown vs non-showdown winnings chart to improve my game?

Saturday, 27 June 2009

Stuff from Aidan + Posterous = Instant New Blog

My friend Aidan sends me links. Daily. Multiple times. Links that reveal our shared interests: zombies, travelling, computer games, and living abroad, amongst others.

Posterous lets you set up a new blog in seconds. You e-mail a post to Posterous, and it appears on your blog. If you don't yet have a blog with Posterous one is created for you.

In 20 minutes on a rainy Saturday afternoon, I combined the last 50 or so of Aidan's e-mails and Posterous to create the Stuff from Aidan blog.

Monday, 22 June 2009

Food, Inc

I'm looking forward to see Food, Inc. I hope (unrealistically) it gets an undubbed release here in Germany.

The origin of the food we eat is a topic I'm keenly interested in. On the one hand, modern intensive agricultural practices strike me as indefensibly depraved, as I'm sure Food, Inc will demonstrate. On the other hand, I recognise the role food industrialisation plays in banishing malnutrition, starvation, and famine to a not-so-distant past [1] (from an industrialised nation perspective). Not to mention, making many societies rich beyond belief, historically speaking. Ensuring, therefore, that people have enough money to buy Macs, play online poker, and - best of all - to buy Poker Copilot!

[1] Not-so-distant past? That's right. The last famine in Western Europe was within living memory.

Poker Copilot HUD always on?

Loyal Poker Copilot user Keith gave some great feedback on Poker Copilot 2. One suggestion really stands out: the Head-up Display (HUD) should always be on. At the very least, it should start automatically. Great idea, and I've been toying around with ways to do this.

I think users still need a way to turn off the HUD - for most users it is the single most important feature in Poker Copilot, but having it always running might irritate some people. Perhaps a "Stop Head-up Display" menu item is enough.

I'm now wondering why this obvious idea didn't occur to me earlier. Perhaps it is one of those "it took Isaac Newton to invent the cat door" ideas: seemingly obvious once invented, but it took the right kind of thinker to suggest it.

Sunday, 21 June 2009

Sub-Millisecond Query Optimisation

Here's a summary of the queries needed to add 28,000 poker hands to Poker Copilot 2.


The average query time is 0.24 thousandths of a second. Which seems okay, except that 660,000 queries in total were performed. A very small number multipled by a very large number can result in too large a number.

I've never had to optimise queries before that were already running in less than a millisecond. Typically, a few milliseconds per query is satisfactory. This is just one of many technical challenges behind Poker Copilot. I enjoy technical challenges.

An advantage of such fast queries is it allows good concurrency.

Now I have two possibilities for future optimisation. Make the queries faster still. Or execute less queries, possibly through more aggressive caching.

Poker Copilot 2 Early Access Program Update

For the curious, Poker Copilot 2 early access version build 10 is available at http://pokercopilot.com/eap

What's changed:

  • the HUD now works on multiple tables at once
  • other stuff (bug fixes, HUD attempts to auto-start when you start Poker Copilot)
  • did I mention that the HUD now works on mutiple tables at once?
Known problems:
  • charting by hands is still unavailable
You can run the EAP version without affecting Poker Copilot 1 at all.

Saturday, 20 June 2009

Multi-table HUD demo

I had some fun putting together this demo this afternoon, showing the new multi-table HUD coming in Poker Copilot 2.

What's Poker Copilot Missing that Hold'em Manager has got?

People often say, "Poker Copilot is not Hold'em Manager, but it's the best we've got on the Mac." Which makes me curious: which feature would you most like to see in Poker Copilot?

Please post your responses here.

Friday, 19 June 2009

Finding Memory Leaks in Cocoa + Objective-C

I found and fixed a memory leak in Poker Copilot's HUD this afternoon. That's the satisfying way I like Fridays to end.

A small component of Poker Copilot is written in Objective-C and Cocoa, the standard tools for Mac OS X programs. (The rest of Poker Copilot is written in Java). In Java, all the memory is cleaned up automatically using Java's absolutely amazing and astounding garbage collector. For the first few years of Java, its garbage collector was primitive and caused long-running Java programs to freeze for some seconds from time to time. These days, however, the Java garbage collector is a programming work of art, working seamlessly, efficiently, and - most important of all - invisibly.

I've got used to that world. So moving into Objective-C, where I have to manually make sure memory is released seems like a jump back a decade or two in time. There is a garbage collector in Objective-C, but it produces code for Mac OS X 10.5+. When I tried to move Poker Copilot away from OS X 10.4 (Tiger) I had the virtual equivalent of an angry mob outside the front door, demanding justice for all. Well, for all the members of the angry mob!


And so, the Poker Copilot HUD had a memory leak. With the help of Xcode, Instruments, and this excellent blog post, I was able to find the leak and banish it forever. And hold of the angry mob.

Now back to the nice world of Java.

FastSpring and Credit Card Fraud

A few weeks ago, someone tried to buy Poker Copilot with a credit card. FastSpring, my payment processor, declined the transaction. A couple of minutes later, someone else tried to buy Poker Copilot with a credit card, and FastSpring also declined that transaction.

What did these two attempted purchases have in common, apart from both being declined? The same IP address. In non-tech talk, that means both attempted purchases came from the same computer (or, perhaps, the same computer network).

Over the next 15 minutes or so there were several more attempts from the same IP address to purchase Poker Copilot with a range of different credit cards and names. It was suspicious, FastSpring detected this, and stopped the seemingly fraudulent sales from going through.

This illustrates an important reason to use a solid payment processor for online sales. Rolling good fraud protection yourself is simply too hard. And yet when you do all your business online you need good fraud protection.

Thursday, 18 June 2009

Does Poker Copilot have Ongame Network Support?

In the last week or so, I'm getting this question every day. Ongame Network has released a Mac client and now people want to know: Will we be adding Ongame support to Poker Copilot?

So, here's the official answer: We're considering Ongame support but have no firm plans yet. After Poker Copilot 2.0 is released, we'll investigate whether it's possible.

Saturday, 13 June 2009

Poker Copilot 2 Early Access Program Update

For the curious, Poker Copilot 2 early access version build 7 is available at http://pokercopilot.com/eap

What's changed:

  • you can filter by game type (limit, no limit, pot limit, cap limit)
  • the HUD is more robust
  • small tweaks based on your feedback
  • plenty of bug fixes based on crash reports (keep them comin'!)
  • Tools -> Turbo Load builds your database faster by suspending all other features
Known problems:
  • when switching between tables, the HUD shows data from the wrong table for a few seconds
  • charting by hands is unavailable
You can run the EAP version without affecting Poker Copilot 1 at all.

Poker Copilot Tutorial in French

James, a loyal Poker Copilot user, kindly wrote a Poker Copilot tutorial in French.

Friday, 12 June 2009

Mac-ify your Full Tilt Poker

Jon from MacPokerTools.com sent me this tasty screenshot. It shows the still-under-development Poker Copilot 2 with his custom Full Tilt Poker artwork:

Why does Poker Copilot talk to the Internet?

An anonymous (but hopefully loyal) Poker Copilot user asks:

Little Snitch shows some Internet sites that Poker Copilot connects to. Could you explain this in some detail?
Sure thing, anonymous.
  • Once a week Poker Copilot checks for an updated version at http://pokercopilot.com/. You can turn this off in the Poker Copilot preferences.
  • If you agreed to Usage Tracking when you installed Poker Copilot, then Poker Copilot efficiently and quietly sends the name of each feature you use to our feature tracking server. It also sends a session id with each feature, so that we can tell, for example, how long people tend to use Poker Copilot. No identifying information is sent. The server is called hotfeatures.barbarysoftware.com and is owned and operated by me. You can turn this off in the Poker Copilot preferences.
  • Poker Copilot accesses a time server when the HUD is started. In order for the HUD to work reliably, Poker Copilot ensures your computer date, time, and timezone are set accurately. Poker Copilot 1 accesses the US naval observatory site (http://tycho.usno.navy.mil/cgi-bin/timer.pl) to determine the accurate time using HTTP. Poker Copilot 2 will access an NTP server using the Network Time Protocol at start-up, and automatically offset dates/times by any observed inaccuracy. I haven't yet decided what time server to use in production, but in development it's time.apple.com
The world of always-on broadband Internet gives software developers great opportunities for creative solutions to problems. I may add some more background features that use the Internet in the future. But always for good, not evil!

Thursday, 11 June 2009

Poker Copilot's Crash Reporter

Let's say that double-clicking on Poker Copilot's "Position Summary" screen crashes Poker Copilot one time in 100. To find this bug, I'd have to use the screen a lot. Many times to cause the bug, and many times more to reproduce the bug. But if 100 people used the Position Summary screen in one day, chances are that the bug would rear its head at least once most days.

To help track down some obscure issues like this, I added a Crash Reporter to Poker Copilot 2 a couple of weeks ago. If Poker Copilot crashes, the Crash Reporter springs to life, notifying the user, and offering them a chance to send the crash report to Poker Copilot international headquarters. Location: my home office.

The crash report sends the error message plus a snapshot of the state of Poker Copilot. (For the techies: a stack trace and thread dump, plus assorted system properties.)

I'm now getting several crash reports a day, and lordy me, are they ever helpful. That hypothetical once-in-a-100-times bug I described above? It wasn't hypothetical at all. It was very real, and with the help of crash reports I mercilessly murdered it.

Sentence of the Day

From Joel Spolsky's latest article in Inc. Magazine.:

I feel like I finally understand what Jeff Bezos meant in 1999 when he described Amazon as facing "insurmountable opportunity."
I sometimes get the feeling myself that there are too many possible directions, ideas, and opportunities. It's a nice feeling!

Wednesday, 10 June 2009

What I've Been Reading

Norwegian Wood by Haruki Murakami. I visited Japan a couple of years ago. At the time I thought it was the most 'foreign' country I had visited. Yet this translated novel about a 19-year-old university student who lives in Tokyo describes a life surprisingly like my university life. Except the protagonist has girlfriends, a concept sadly absent from my student years. Highly readable, but slightly on the depressing side as no less than four characters commit suicide.

Bright Lights, Big City by Jay McInerney. Apparently this was an enormous book in the 80s. I was too young to be aware of it, although I suspect this was the book my English teacher described when trying to explain writing in the second person. ("You did this. You said that"). The whole book is in the second person, slightly disconcertingly. If you like your books full of stories of cocaine and spousal abandonment, this is for you.

Into the Wild by Jon Krakauer. The book that led to last year's movie. A bright, successful American student graduates and then wanders through the American wild. He ends up in Alaska where he meets his dismise. I liked this book a lot - because of Jon Krakauer's highly readable style and because of the story of a young man who refused to follow society's norms.

The Gargoyle by Andrew Davidson, which seems to be unreleased in the states, although I've got a UK-edition paperback. It's an unusual novel, hard to categorise. It's sort of a love story, but that's selling it short. Badly-burnt burns patient encounters nutcase who believes she was already alive in medieval Germany. Lots of stories-within-stories. Unique.

The Communist Manifesto by Karl Marx and Friedrich Engels. Very disappointing. I thought I should read some pivotal texts first-hand and started with this. This is the manifesto that led to revolution in several countries - most notably Russia and China - while others such as Italy and France narrowly avoided it? It seemed to me a polemic rant with little rationalised argument. Perhaps that's because I'm not living in 19th-century Europe's highly explotiative economy.

Obscure Sentence of the Day

Comments along the lines of "This story reads like it was written by a drunken monkey" are discouraged.
That's from my friend (and budding science fiction writer) Aidan's article about attending Clarion South, a six-week writer's workshop in Australia.

Monday, 8 June 2009

Cha-ching!

In the first months of Poker Copilot, every sale was a cause for celebration. To ensure I celebrated as soon as the sale happened, I set up "You have a sale" e-mails to trigger an SMS to my mobile phone. It was pretty cool to get an SMS whenever I got a sale. At first.

As sales increased these SMS messages deprived me of a good night's sleep. The majority of my sales occur in the US evening, while people living in Europe (such as myself) are sleeping. Multiple SMS messages throughout the night stops being fun really quickly. So I disabled this system long ago.

Today I set up a more humane, non-sleep-depriving alternative. When my computer is on and Mac Mail is running, any "You have a sale" e-mail now triggers a thoroughly satisfying cha-ching noise.
I didn't think at first that Mac Mail could do this sort of thing, but indeed it can. In Mail's Preferences, there's a "Rules" panel which allows for all sorts of event-driven interaction:
Here's how simple it was to set up my cha-ching! rule:


It's rewarding, when deep in thought trying to track down a bug, to hear the sound of money arriving into the virtual cash register.

Sunday, 7 June 2009

Statistic of the Day

"The energy you save by switching off your phone charger for a whole day is used up in one second driving a car."
That's from a review in the latest issue of Intelligent Life of Cambridge physicist David MacKay's book "Sustainable Energy - Without the Hot Air".

Hero Stats for Current Table Only

"Hero Stats for Current Table Only" is the most requested feature for Poker Copilot. I've now added this to Poker Copilot 2.

A new early access version of Poker Copilot 2 is available here. This screenshot shows most of the changes:
What's changed:

  • The HUD is working again, and now with more options
  • You can now display up to 12 stats in the HUD
  • Several bug fixes. I found the bugs through crash reports, so thank you for sending these.

Saturday, 6 June 2009

Poker Copilot 1.74 Released

I've released Poker Copilot 1.74, which you download here.

This fixes a subtle bug where some people would find their HUD would stop displaying info for certain seats. If you are already affected by this bug, you should do the following:
1. Go to the new screen Tools -> HUD Config Viewer
2. On that screen, find the combination of poker room, theme, and table size where your HUD is missing for certain seats.
3. Click on "Reset to Default".

Technical Note: This was caused by class that was once thread-safe class but ceased to be so when I added a new method, forgetting to add synchronisation. Which led to my post-Java manifesto post.

C is to Java as Java is to what?

11 years ago I first encountered Java. Before then I mostly used C. I immediately loved how Java kept familiar C constructs but protected me from the most common, most difficult, and most time-consuming bugs. No more string buffer overflows? Awesome! Out-of-bounds array indices caught at runtime? Awesome! No need to allocate and (forget to) release memory? Awesome! No more core dumps? More than awesome! This is what I imagined programmer heaven to be like.

Even expert C programmers often wrote code that had buffer overflows and memory leaks. Making sure code didn't have such problems took a lot of hard-to-test mental reasoning. Introducing such problems in maintenance code was a continual danger.

I doubted that Java could offer these features while giving reasonable performance. And in fact, in early versions it couldn't. But over the years all sorts of optimisations have made Java performance adequate for most computing tasks.

Jump forward to today. My most troublesome bugs in Poker Copilot lie in a different area: concurrency mostly in the form of thread-safety. It's possible to have two or more pieces of code running more-or-less in parallel, accessing the same resources, sharing information, and needing to co-ordinate their activities.

Even expert Java programmers have trouble writing thread-safe code. Making sure multi-threaded code doesn't have synchronisation problems takes a lot of hard-to-test mental reasoning. Introducing such problems in maintenance code is a continual danger.

I use the Java concurrency API. It's good. It helps me a lot. I've read, re-read, and tried to grok Java Concurrency in Practice. It's also good and helps me a lot. But these are not enough.

What I long for is a language that's similar to Java but designed at every level to help write multi-threaded code. Something that offers me familiar constructs and concepts. Yet something that offers me better help for writing thread-safe code. Perhaps a language where objects are immutable by default, unless I specifically mark them as not immutable (Immutable objects make concurrency easier). Perhaps a language where I can mark a class as synchronized, which automatically makes all methods in the class synchronized (therefore ensuring that only one method in the class can run at once). Perhaps a language where parameters are passed as deep copies by default, or as copy-on-write objects, unless I mark them otherwise.

Many Java projects are riddled with obscure concurrency bugs. It's hard to get even the most basic code right, as I demonstrate with code to format a date as a String.

Tuesday, 2 June 2009

Competitors for Google?

Google delivers 97% of my search engine traffic. Yahoo, Live, and the smaller search engines share the remaining 3%. This situation unsettles me somewhat. Google's double-top-secret page ranking algorithm is regularly tweaked, and if one of those tweaks were to push Poker Copilot into oblivion, my sales would drop dramatically. It seems that one large company has too much influence on small IT companies like mine that sell solely through the web.

Therefore I wish the best of luck to Google challengers new and old. I'd feel more comfortable if there were a number of viable and competitive search engines, rather than one enormous publicly-listed organisation having a global near-monopoly.

Poker Copilot goes Cyrillic?

I occasionally sell copies of Poker Copilot to Russian customers. They've been registering using Latin letters and English place names. So the city is Moscow, for example, instead of Москва. In the last week or so, however, I've started getting purchases from Russia in Cyrillic. I'm not sure why this is now happening, but I like it.

This cry for help appeared today on the Poker Copilot Get Satisfaction forums:

ПОМОГИТЕ!! КАК РАБОТАТЬ В COPILOT?

ЛЮДИ,ПОМОГИТЕ СКАЧАЛА ПРОГРАММУ,А КАК ПОЛЬЗОВАТЬСЯ НЕ ЗНАЮ.сУЩЕСТВУЕТ ЛИ КАКАЯ ИНСТРУКЦИЯ ПО РАБОТЕ В НЕЙ?ЕСЛИ ДА ТО ГДЕ МОЖНО ЕЁ НАЙТИ?ЗАРАНЕЕ ОГРОМНОЕ СПАСИБО!!!!!:)))

My Russian never got much beyond this: Я хочу пива. Спасибо. But with the help of Google, I worked out that it's someone asking for assistance in how to use Poker Copilot. Any Russian speakers who would like to answer this person?


 

Poker Copilot

Free 30 Day Trial

Only $59.95

Order risk free with our 30-day money back guarantee.

  • Poker software for Mac OS X
  • Supports Full Tilt Poker and PokerStars
  • Analyses your opponents while you play
  • On-table HUD for Mac
  • Easy to use, easy to understand

Watch a demo of the major features of Poker Copilot