Doug Jones Doug Jones

White House Eggnog

The story is that this is the eggnog prepared for President and Mrs. Clinton while they were in the White House.

I'm drinking some now and it is too good not to share.

  • 5 egg yolks
  • 5 egg whites
  • 1 1/4 cup sugar
  • 3/4 cup bourbon
  • 3/4 cup cognac/brandy
  • 3/4 cup dark rum
  • 1 quart milk (up to 1 1/2 quart -- to taste)
  • 1/4 teaspoon salt
  • 1 pint heavy cream
  • 2 dashes nutmeg
  • 2 teaspoons of vanilla extract

Combine yolks and sugar in bowl and beat to ribbon stage.

Add bourbon, congnac and rum to yolk mixture -- Set aside

Whip egg whites and salt to stiff peak

Whip cream to medium peaks

Fold whipped egg whites and cream together

Combine egg whites/cream mixture with yolk-liquor mixture

Add milk and stir well

Add nutmeg and vanilla

Store and serve very cold - blend well before serving.

Merry Christmas and enjoy!

Read More
Doug Jones Doug Jones

Garbage Collection in Java

There's also a lot of hearsay and folklore out there about garbage collection and so understanding the algorithms in a bit more detail really helps avoid falling into common pitfalls and traps. Besides - for anyone interested in how computer science principles are applied and used, JVM internals are a great thing to look at.

Click through on the title for the article. Also, don't miss the other parts:

 

Read More
Doug Jones Doug Jones

Timelines at Scale

Click through for a talk about how Twitter scales out timelines. I found a couple of points really interesting

  • most timeline writes fanout to all a users followers, except for the biggest users (many millions of followers)
  • all timelines are kept in memory in a Redis cluster

Checkout High Scalability for more notes.  

Read More
Doug Jones Doug Jones

Reservoir Sampling

Say you have a stream of items of large and unknown length that we can only iterate over once. Create an algorithm that randomly chooses an item from this stream such that each item is equally likely to be selected.

Click through for the algorithm. I imagine this is a common problem. Recently I wanted to do something similar, but I didn't know this technique and it wasn't important that my sample was statistically significant, so I just fudged it.

Read More