Ben Joffe
benjoffe.com · Personal blog · on HN since 2009
Ben Joffe is a programmer who writes about fast date algorithms and publishes HTML5 canvas experiments and games.
What HN saysHN commenters link his canvas demos and Tetris on a Torus, and refer to his date algorithm series for its history of the calendar design.
18HN people shared it
7linked it in comments
22stories submitted
999story points
3 months agolast shared
2009people per year2026
Most-shared posts
- 1Texas Hold'em Experiment5 people · 303 points · first shared 2010 · 34 comments on HN
- 2Canvascape - "3D Walker"3 people · 21 points · first shared 2009 · 8 comments on HN
- 3A faster way to calculate the day of the week3 people · 4 points · first shared 2026 · discussion on HN
- 4Very cool uses of HTML5 Canvas. Love Torus "Cylindrical Tetris"2 people · 139 points · first shared 2010 · 20 comments on HN
- 5HTML 5 Canvas game2 people · 117 points · first shared 2009 · 34 comments on HN
- 6Show HN: Weekle – a web app to learn how to calculate the day of the week2 people · 5 points · first shared 2023 · discussion on HN
- 7Textures2 people · first shared 2010
- 8A Fast 64-Bit Date Algorithm (30–40% faster by counting dates backwards)1 people · 398 points · first shared 2025 · 94 comments on HN
- 9A New Faster Algorithm for Gregorian Date Conversion1 people · 7 points · first shared 2025 · 2 comments on HN
- 10PocketOdds.com Launched1 people · 2 points · first shared 2010 · discussion on HN
- 11The Smoital System – A method of timekeeping on Mars based on UTC1 people · 2 points · first shared 2025 · 1 comments on HN
- 12Canvas Fonts1 people · 1 points · first shared 2011 · discussion on HN
- 13Fast leap year1 people · first shared 2025
- 14Functions3d1 people · first shared 2009
- 15Heuristic1 people · first shared 2010
What HN people wrote when they linked it
sparrish · 2025-12-04
My favorite torus game is Tetris on a Torus
https://www.benjoffe.com/code/games/torus/
benjoffe · 2025-11-27
The first article in this blog post series has a little section talking briefly about this history, and there's a representation of this that I think sheds a lot of light on the original design. See the heading "Side-Note on Month / Day Determination" in the below link [1].
Displaying the months like the following helps see the regularity at a glance. Columns 1, 3 and 5 are the long months, others being shorter:
+-----+-----+-----+-----+-----+ | 31 | 30 | 31 | 30 | 31 | | I | II | III | IV | V | | MAR | APR | MAY | JUN | JUL | |-----+-----+-----+-----+-----+ | 31 | 30 | 31 | 30 | 31 | | VI |VII |VIII | IX | X | | AUG | SEP | OCT | NOV | DEC | +-----+-----+-----+-----+-----+ | 31 |28/29| | XI |XII | | Jan | FEB | +-----+-----+ > To a person who natively thinks in Roman numerals, remembering that the short months are: II, VII, XII, along with IV & IX would be much easier than the way us modern folks have to memorise it.
[1] https://www.benjoffe.com/fast-date
DanielRibeiro · 2011-10-04
There are also these old html5 2d canvas experiments: http://www.benjoffe.com/code/
Very similar to this one specifically: http://www.benjoffe.com/code/demos/canvascape/textures
drKarl · 2010-05-05
jonp · 2010-02-18
The page http://www.benjoffe.com/holdem_files/heuristic.html is running the two-player case. It seems to be using a Javascript hill-climbing algorithm: pick a scoring function which measures how good the solution is, then start from a random deck and try small changes, keeping them only if the score improves.
lhorie · 2009-03-13
The opera widget has been around for quite a while.
His other demos seem to run pretty well too (using Flock):
http://www.benjoffe.com/code/tools/functions3d/
http://www.benjoffe.com/code/demos/canvascape/
http://www.benjoffe.com/code/toys/spirograph/
shhsshs · 2024-05-24