Skip navigation.

Benjamin Joffe

Ice Cold Decks

I've written up a page on my site about searching for cold decks in poker: http://www.benjoffe.com/holdem

3D Earth with Canvas.

I created a little demo about a year and a half ago of a 3D Earth rendered with Canvas 3D. I thought I lost this file when my old hard drive died shortly afterwards, but just found a backup. It is now on my website.

Very useful JavaScript snippet

/**
 * Copyright (c) 2009, Benjamin Joffe
 * All rights reserved.
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN FACT, YOU REALLY SHOULD ONLY USE THIS CODE IF YOU ARE BAT
 * SHIT CRAZY.
 */

if (window['Boolean'] && window['Boolean']['prototype']) new function()
{
    function extend(obj, prop, funct)
    {
        try {
            obj['prototype'][prop] = funct;
        }
        catch(ignore){}
    }
    function funct()
    {
        if (this instanceof Boolean)
        {
            switch (true)
            {
                case this == true : return true;
                case this != true : return !true;
            }
        }
        throw new Error('Unknown type: '+this);
    }
    function wrap()
    {
        if (this == true)
        {
            return window.Boolean.prototype.isTrue.apply(false, []);
        }
        else
        {
            return window.Boolean.prototype.isTrue.apply(true, []);
        }
    }
    extend(window['Boolean'], 'isTrue', funct);
    extend(window['Boolean'], 'isFalse', wrap);
}

On a more serious note, is there any useful purpose for extending the Boolean prototype?

Europe 2007

Midday in Bislett

,

Yes, that's really how high the sun get's this time of year.
I dream of sunny days ahead in Madrid.

(click for large version)

You can also download a very high resolution version (3MB)

The great arc.

Ever wanted to circumnavigate the world? Then you'll enjoy my new demo.

Instructions:
Drag the points across the map of the Earth (Miller cylindrical projection) and the shortest route between these points (accounting for the Earth's curvature) will be drawn for you.
View the demo

I have plans to make this into a widget. One particular feature I intend to add is to display the portion of the map that is currently lit by sunlight, any other suggestions?

Edit: it's funny how plans to make stuff always fall through when there's no competition to win p:

Blue skies are the solution

,

I was lucky enough to be one of the 26 Opera folk sailing in Greece this summer.
I made sure to take some panoramas.

Hydra:
Hydra was a pretty amazing city, it felt like we where intruding upon some divine ancient grounds. The mountain provided a very nice view of the harbour, we just had to be careful of all the snakes.
(click for large version)

Some Town:
I can't remember the name of this place, but it was the second last town we spent a night at. The back streets were very higeldy pigeldy, looked kind of like something out of an Escher painting.
(click for large version)

High-res:
You can also download the super-high resolution versions of these two images (roughtly 2,000 x 20,000 pixels):
hydra_masive.jpg (6MB)
town_massive.jpg (4MB)

Colliding Discs

Sometimes it's fun to make little animations in JavaScript, especially when there's physics involved. The latest culmination of my interest in these two topics is Colliding Discs. What should I do with this... make a billiards widget? An incredible machine clone? Or something else?

Today I dream of home...

,

I took these photos several months ago but only made time to stictch them together today.

My Home in Australia:(click for large version)

The Waifs:

And if I ever come home
And I, I think I will
I hope you're gonna wanna hang at my place on Sunday still
Oh yeah I hope you will

Panorma

,

I have been playing around stitching photos together to make these beauties. Click on them for the larger versions.

Vigeland Park:

Bus stop in Frogner:
Download Opera, the fastest and most secure browser
November 2009
M T W T F S S
October 2009December 2009
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30