Using Delicious Tags to Describe Your Site

By analyzing the tags people use to categorize your website on Delicious, you can get a pretty good idea of how you should describe it to new visitors.

Here, for example, are the top tags used to describe Preceden:

Using the top five tags above, Preceden could be described as a free web 2.0 timeline visualization tool. Pretty good, I’d say.

One thing you have to keep in mind is the crowd that uses Delicious may differ significantly from your target audience, in which case the tags might not do you as much good. Consider what would happen if I polled the Mechanical Turk audience or my family. They’d probably say “timeline” and “tool” but how many would include “web 2.0”? How many would even know what that means? Probably not as many.

Lesson learned: choose your words carefully.

Charts, an LLC, and LifeHacker Coverage

Today was an incredible day. Here’s why:

1) For the last ten days or so I’ve been working adding charting capabilities to Preceden. Since the timelines were not designed with this in mind, I had to do quite a bit of refactoring to ensure that both normal layers and chart layers would play nicely together on the same timeline.  Saturday alone I spent a solid 10 hours or so writing the final unit tests and making last minute adjustments in preparation for last night’s release. Today was the first day users got to play around with it, and that’s always an incredible rush.

2) Big news: I formed an LLC today. This has been in the works for a little while now, but today its official: I am now the proud founder of Preceden Solutions LLC (I couldn’t use Preceden LLC because it’s too similar to Precedent, which a lot of businesses apparently use).

This is a big step for me and its simultaneously exhilarating and terrifying.

3) To top it off, a short while ago, I checked Preceden’s daily stats to see if anything interesting was going on and was blown away to discover that Preceden was featured on Life Hacker today, the blog in the personal productivity arena. Their coverage of Preceden is the largest to date and I’m happy to say it was extremely positive:

Timelines are excellent for visualizing change over time, but most timeline generators limit you to a single timeline. Web application Preceden features parallel timelines and accompanying charts.

At Preceden you can create multiple unique timelines by adding layers to your intitial timeline. In the example image above a company’s growth is charted by the stages of the project they are designing, when employees joined the company, and the monthly visitors to the company website with all information displayed in parallel so you can easily see the connections between different segments of the data.

You can share charts for public browsing or keep them private for internal use. Timelines can be generated using spans of time ranging from years down to seconds. Preceden is a free service that requires a sign up—no email confirmation—to use.

One funny note is that the screenshot they used in the article reads “Montly Visitors” instead of “Monthy Visitors”–I was in such a rush yesterday to add an example that I neglected to proof read everything and go figure, it gets featured today in their article :) Guess I can’t complain too much…

Ancient Greek Timeline

Check this amazing timeline out:

Here’s a quote from the author’s blog:

… I’ve found a cool new tool for studying history: Preceden.com allows you to build timelines which can then be embedded in other web pages. If this works, I’m going to be putting this on my class wiki, and talking it up with my students, and… and… It’s just COOL. I’m totally thrilled with the tool.

How to Calculate Your Equity vs Every Other Hole Card Combination

This is post #15 in an ongoing series of articles about my work as a poker bot developer.

One of the most useful command line tools I developed in the course of building the poker bot was a small program called eqall.

Eqall, short for Equity All, calculates your equity against every other hole card combination given the current board.

As a simple example, imagine you have Ks Qs and the board is Ad As Th 3h. Pretend your opponent has Js 9s. You’re in good shape vs this opponent–any jack will give you a straight and anything other than one of the three remaining nines gives you the win.

Your equity in this simple situation is 1 – the number of cards that will give your opponent the win over the number of cards left in the deck or 1 – 3/(52 – 4 – 2 – 2) or 1 – 3/44 or 0.931818.

What eqall does is it calculates your equity vs every possible hand your opponent can have. So it calculates your equity vs Js 9s, like in our example, plus Js Ts, Js 8s, Js 7s, and so on until it has calculated all of them.

You can download eqall.zip here (7KB).

Example:

>> eqall Ks Qs - Ad As Th 3h

Ks Qs - Js Ts = 0.204545
Ks Qs - Js 9s = 0.931818
Ks Qs - Js 8s = 0.931818
Ks Qs - Js 7s = 0.931818
Ks Qs - Js 6s = 0.931818
Ks Qs - Js 5s = 0.931818
Ks Qs - Js 4s = 0.931818
Ks Qs - Js 3s = 0.272727
Ks Qs - Js 2s = 0.931818
Ks Qs - Js Ac = 0.000000
Ks Qs - Js Kc = 0.921053
Ks Qs - Js Qc = 0.931818
...

The output is relatively simple: Ks Qs are your hole cards, the second column are the hole cards your opponent could have, and the last column is your equity, or your chance to win, against those hole cards.

Six Months of HackerNews Front Page Data

Back in September 2009 I launched a small web app called HNTrends.com, a tool for visualizing the movement of stories on HackerNews’s front page over time.

I haven’t worked on the site much since then, but the script that logs the data has been diligently recording the front page submissions every 15 minutes since it started.

It occurred to me that a detailed analysis of the data might yield some interesting results such as how the site has grown since then, when is the best time to post a new submission, user participation rates, or some insight that changes the way we see the site. I offer it to you today so that you may analyze it to your heart’s content.

You can download it here (CSV, 13.4 MB zipped, 169 MB unzipped).

In total, the database contains 514,478 records spanning from August 31, 2009 to March 7, 2010.

A single line looks like this:

"1","http://paulgraham.com/kate.html","What Kate saw in Silicon Valley","129","albertcardona","2009-08-31 20:15:15","63","1","2009-08-31 23:15:15","796573","HackerNews","c18577"

Removing the quotes and splitting by comma, here is what each item represents:

  • 1 – Primary key
  • http://paulgraham.com/kate.html – Destination URL
  • What Kate saw in Silicon Valley – Title
  • 129 – Points
  • albertcardona – Submitter
  • 2009-08-31 20:15:15 – Approximate UTC submission time, calculated based on the time minus the age of the submission
  • 63 – Comments
  • 1 – Rank
  • 2009-08-31 23:15:15 – UTC time record was created
  • 796573 – HackerNews ID
  • HackerNews – Always “HackerNews”
  • c18577 – Color for display purposes

One final note: this database covers roughly 99% of the time period since it started. For a while the script broke whenever an article didn’t contain comment link, and every so often it goes down for miscellaneous reasons.

Poker Bot Command Line Tool – AllHandsDesc

This is post #14 in an ongoing series of articles about my work as a poker bot developer.

Over the next several posts, I’m going to publish several command line tools that I developed in the course of building my poker bot.

None of these tools will enable anyone who can’t already build a poker bot to build one so I don’t think there’s much harm in posting them.

All of these were build on top of Poker Eval, an open source C library for doing poker calculations.

Tool #1: AllHandsDescC

Click here to download the ZIP file (6 KB)

Purpose: This tool will iterate over every possible hole card combination a player can have and spit out its rank when combined specified board cards.

Example:

>> allhandsdesc Td Ts 8h

As Ks - NoPair (A K 2 2 2) - OnePair (T 8 2 2) - OnePair (T A K 8) @ 280
As Qs - NoPair (A Q 2 2 2) - OnePair (T 8 2 2) - OnePair (T A Q 8) @ 292
As Js - NoPair (A J 2 2 2) - OnePair (T 8 2 2) - OnePair (T A J 8) @ 304
As Ts - NoPair (A T 2 2 2) - OnePair (T 8 2 2) - TwoPair (T 2 A) @ 282
As 9s - NoPair (A 9 2 2 2) - OnePair (T 8 2 2) - OnePair (T A 9 8) @ 316
As 8s - NoPair (A 8 2 2 2) - OnePair (T 8 2 2) - TwoPair (T 8 A) @ 119
As 7s - NoPair (A 7 2 2 2) - OnePair (T 8 2 2) - OnePair (T A 8 7) @ 328
As 6s - NoPair (A 6 2 2 2) - OnePair (T 8 2 2) - OnePair (T A 8 6) @ 340
As 5s - NoPair (A 5 2 2 2) - OnePair (T 8 2 2) - OnePair (T A 8 5) @ 352
As 4s - NoPair (A 4 2 2 2) - OnePair (T 8 2 2) - OnePair (T A 8 4) @ 364
...

Output Format:

There are five pieces of information per output line. Using the first line above as our example:

As Ks - NoPair (A K 2 2 2) - OnePair (T 8 2 2) - OnePair (T A K 8) @ 280

As Ks – Hole cards we’re checking

NoPair (A K 2 2 2) – This is the rank of the hole cards by themselves. It will either be NoPair or OnePair, in the case of a pocket pair. A K 2 2 2 is a way of representing the strength of the NoPair: Ace high, followed by king, and since we only gave it two hole cards, it defaults to twos for the rest of the five-card hand: 2 2 2.

OnePair (T 8 2 2) – This is the rank of the board cads by themselves. Td Ts 8h makes one pair: Two tens, followed by an eight, followed by two default 2’s. Note that the out shows “T 8 2 2 2” not “T T 8 2 2” because two tens are implied by its rank of “OnePair”.

OnePair (T A K 8) – This is the rank of the hole cards plus the board cards. As Ks Td Ts 8h makes one pair: two tens, followed by an ace, a king, and an eight.

@ 280 – This shows the number of hole card combinations that can beat these hole cards on this board. Consider a few example from this hand:

Tc 8d - NoPair (T 8 2 2 2) - OnePair (T 8 2 2) - FlHouse (T 8) @ 0

Since you hold a ten, it’s not possible for someone else to have quads, so you have the nuts–no hands can beat you.

Tc Th - OnePair (T 2 2 2) - OnePair (T 8 2 2) - Quads (T 8) @ 0

If you hold the two tens, you have quads, and there are no hands that can beat you.

Ks Tc - NoPair (K T 2 2 2) - OnePair (T 8 2 2) - Trips (T K 8) @ 10

If you hold Ks Tc, there are ten hands that can beat you: Six from full houses: Th 8c, Th 8d, Th 8s, 8d 8h, 8d 8s and four from higher trips: Th Ac, Th Ad, Th As, Th Ah.

If you have any questions, don’t hesitate to leave a comment below.