Skip to content

Build something fun for Xmas 2024

IMG_4063
Christmas is a time for relaxing, reading and spending time with family, but for me it is also a time to come up with ideas.

Weirdly I find the most relaxation in doodling with a bit of paper and creating something new. It is also a time to do something fun and a bit random just for the hell of it.

So my here is my contribution for 2024 … the infinite clock.

What's the big idea?

Imagine a clock that ticks not towards midnight, but towards infinity. That's the basic idea behind this project. It's a website that displays a number that keeps growing, one tick every 100 milliseconds.

But it's more than just a counting machine. The infinite clock is designed to be a calming and meditative experience. As the number grows, it forces you to confront the immense scale of time, the universe, and existence itself.

A Multi-Sensory Experience

To enhance the meditative experience, the infinite clock also features:

  • A gentle heartbeat: Focus on the steady rhythm of the beat to clear your mind and find inner peace.
  • Inspiring quotes: Every 10 seconds, a new inspirational quote will appear, chosen by Google's AI tool, Gemini.
How does it work?

The project is split into three parts:

  1.  Code written in node and running on a raspberry pi to keep the current count and to share it when requested.
  2. Frontend Javascript to read the current count and keep counting on the users web browser while you view the page (in an effort to minimise the volume of requests hitting a small device and the potentially disastrous prospect of tying down the family wi-fi at xmas the backend is only called once).
  3. HTML & CSS to make it look "pretty". 

All the code is available here:

https://codepen.io/jamesd-23

How do I access it & how long will it last?

The frontend I hosted on Cloudflare and is accessible here: https://infinite.jamesdare.co.uk I intend to keep this running as long as I can. The infinite clock adds one to the count every 100 milliseconds. In Java the max length of a number is around 300 digits long, at this rate it would take approximately 3.17 x 10^290 years for the program to reach this maximum, so we should be ok for a while.

What should I do?

Why not create something of your own, have some fun and enjoy the process. And let me know what you create so I can have a play with it.