We want to generate some random numbers. For simplicity, we'll assume we want a random number between 1 and 100. We want our random-number generator to be:
Public (everyone knows the same random numbers, at roughly the same time)
Fair (every number has the same odds of coming up)
Trustable (everyone knows it's fair--it should be above doubt)
Fast (we want to generate as many numbers as possible, as often as possible)
Unpredictable (you shouldn't be able to guess the result before it's revealed)
Some security experts suggest that a trustable system should also be:
Decentralized (no single person, organization, or computer picking the numbers). This is because a central trusted group requires faith in that group and its security.
One for this in the real world was the "Numbers Game", a popular illegal lottery in the 1800s, in the USA. The winning numbers were selected at random each day, like most lotteries--by the mob. After complaints about rigged lotteries, the winning numbers started to be picked more transparently. For example, it might be the closing price of the New York Stock Exchange--just the cents value. For a hundred dollar lottery, you would be crazy to worry about someone messing with the New York Stock Exchange. (But if it became a billion- or trillion-dollar lottery, you should worry again.)
The biggest problem with using a stock exchange that it's slow. You only get one set of numbers a day.
Can you come up with a better random-number generator?
Using electrical tape, I split a whiteboard into sections. Voila, whiteboard calendar.
A teacher friend of mine already knew exactly how to do this--apparently it's common knowledge among teachers.
I did look if there were either large, disposable calendars (no) or existing whiteboard calendars (they're laminated posters that don't actually erase). A 3ft x 2ft (1m x 0.6m) whiteboard costs $30, and you can get electrical tape for $1.
The stickers look bad--I half-assed them. I need tons of big stickers or none at all. This was way too tentative. I do want some kind of decoration, though.
In 2022, 2023, and 2024, I did "Hack-a-Day", a challenge to myself to do one project a day for all of November. It's vaguely modelled off NaNoWriMo, a challenge to write a book in November.
This year, I completed 21 projects in 30 days. On average, I worked 7.5 hours per project. My expenses for the month were $130, divided over only three projects--ingredients for Project L.E.M.B.A.S. ($85), aluminium to mill for soma cubes ($28), and missing parts for my TODO whiteboard ($19).
To see a list of all projects from this year and previous ones, check out my hack-a-day website.
Today I made a minecraft mod, using Fabric. Modding sure has changed a lot since I last tried it in Forge, maybe ten years ago! Java's changed a little too, even.
My mod adds a dirt slab, that's it. I didn't really have time to get past the basics, but I think the occasional hack that's just a learning experience is okay.
Fabric is well-documented and friendly. The main downside is that there's no "abstraction later" between Minecraft and the mod. This means your mod will work with exactly one minecraft version on release. Additionally, when a new version of minecraft is released, you need to update and re-release your mod (and there are usually actual changes to be made).
Games are taken from OGS, and played real-time. Provided are a selection of 1000 random games from OGS, a popular Go server. Games play in real time, the same as when they were originally played.
Today I hacked together a simple but servicable Go game. It uses chinese scoring, and you have to manually mark dead stones at the end of the game. You can play a demo here. Source code is on github.
Right now you have to sit down with someone else to play. I plan to spend a day adding multiplayer to a few games, if I have time.
Today's project was to make a healthy, shelf-stable food that I could eat every day, and take care of meals for the rest of the month. In the process, I realized my initial goals didn't quite make sense, and I also (again!) ran out of time. But I made a little progress.
First, I spent a couple hours researching foods like what I wanted to make. I started with "survival" foods -- hard tack, military rations, disaster food, pemmican and wasna. Commons themes I saw were:
The foods lasted a long time
They were cheap to make (then, not now)
They were dense (physically compact) and could stand being thrown around
They were high-calorie.
They didn't need cooking, and often you could get by with no heat or utensils if needed.
They were something people would eat (and often, the bare minimum standard)
They contained some reasonable macronutrient balance, although usually not an ideal one
They were often meat-heavy
Then I branched out a little to other calorie-dense foods:
Trail mix
Fudge
Energy bars, meal squares, and granola bars
Biscotti
I started realizing my goals didn't quite align with what I was seeing. I didn't really need my food to last years -- one month outside a fridge would be fine. I cared a lot more about taste. And eating calorie dense food was not really a great idea, as someone mostly sitting in a chair rather than than hauling gear cross-country all day.
I did a circuit of local stores -- a grocery store, a restaurant supply store, an indian grocer's. I also picked up enough frozen food at Trader Joe's to last me most of the month, rather defeating the point. Oops!
I came home with a lot of flours and flour-adjacent things. Very carb-heavy. I had several flours: corn, chickpea, and wheat. I ground up a few more.
At this point, I had a wide variety of cheap ingredients. I went to the USDA food database and wrote some notes about macronutrient balance, and did the math on how much things cost.
Then, I started experimenting. I had previously made hard tack, which I found kept forever and I liked pretty well. So I started by experimenting with hard tack, using non-wheat flour recipes. I was worried (rightly so) that non-wheat flours would not hold together as well.
I tried ratios of quinoa and wheat flour, and also tried adding a few ingredients. I found that 1 part in 3 of wheat flour was plenty to hold things together--it just wouldn't be puffy any more. That seemed fine. I also discovered that it was really important to aim for a consistent thickness, because some of the pieces ended up soft and some hard or burnt. Luckily, non-wheat flours are a lot springier, so this was easier in the second batch.
In the second batch, I kept the same 1:2 ratio, but tried a wide variety of flours, as well as the rest of the additives.
My findings, and my ending point for the night:
A 1:2 ratio of wheat flour to another flour seems to consistently hold together well. The amount of water needed varies just a little. The squares cook with 20 minutes per side.
Quinoa, green pea, oat, and chickpea flours are neutral to good. Corn and wheat flours are excellent. Lentil flour smells too strongly. I forgot to test pigeon pea or make rice flour.
Coconut (un-powdered) is also excellent. I like the smell and a little fat. Shortening was not as good, and I didn't test other fats.
Adding extra salt didn't change the flavor.
Adding fat (via coconut or shortening) makes the wafers a little messier.
Sugar is great. Whether a dusting on top, a little added, or chocolate chips, it's a definite winner. Sugar mixed in should improve shelf life.
I was originally trying to invent a single food I could eat every day, which if you know me was a very stupid mistake. Instead, I'm going to have the final version be something more like my experiments--a wide variety to pick from.
If I continue another day (and I likely will), I'm going to further optimize taste. The most compelling result of all is that I didn't eat the leftovers--I went for frozen food instead.
I like a meal substitute called Meal Squares. The company recently switched from version 1.0 to version 2.0. They're basically different products in terms of taste and texture, although they're both trying to be complete, whole-food squares.
1.0 are bready, don't keep as well, and aren't as appetizing. 2.0 has more of a snacky, fruit-leather feel more typical of meal replacement bars. Personally, I prefer the 1.0 version (snackable is a negative for me).
The CEO, Romeo Stevens mentioned during the new product launch:
We'll be open sourcing the 1.0 recipe for those who want to bake them at home.
After emailing him a reminder that it wasn't posted anywhere, he kindly emailed me the recipe back. I'm posting it online for anyone else that wants it in the meantime. Thanks, Romeo!
2g Baking soda or 8g Baking powder (warning! Baking sodas vary quite a bit by brand and whether it includes aluminum, we used the less potent aluminum free baking soda for mealsquares, experimentation needed for small batches.)
Optional:
15g Potassium citrate (can be omitted for small hit to potassium content)
D3+K2 drops (varies by brand, add enough for ~500% your DRI since this is about 5 days of Mealsquares)
Liquid calcium folinate (same as above)
Niacinamide (same as above)
Lactase (added to condensed milk if lactose intolerant)
Over low heat, combine date syrup ingredients. Stir until homogenous.
Mix liquid ingredients, including date syrup.
Mix dry ingredients.
Combine wet and dry ingredients. Consistency should be like peanut butter or slightly thicker. Add (small amounts) liquid water if too thick.
Bake at 350, time varies wildly by oven design, and edges may overcook while centers undercook. You will likely need to pull them out of the oven at the 2/3 baking point and flip the molds around to avoid this and get even results.
Packaging: remove as much air as possible to avoid them going stale in the fridge.
Notes:
This recipe could likely be optimized with the substitutions of some milk protein powder for condensed milk and some tapioca syrup for vegetable glycerin. These optimizations were only discovered as we were moving towards production of Mealsquares 2.0 so were never implemented in 1.0. Would require experimentation for water content and baking times etc.