A game of multiples and divisors
I saw an interesting number-based game at the 2015 Young Scientist show. This post derives, using brute force, a winning strategy for the game and implements it as a ‘human vs computer’ setting.
Continue readingCovering various topics, usually of a vaguely nerdy nature.
I saw an interesting number-based game at the 2015 Young Scientist show. This post derives, using brute force, a winning strategy for the game and implements it as a ‘human vs computer’ setting.
Continue readingA couple of recent posts here — An oscillator from a jam-jar lid The value of a second opinion — required some post-specific Javascript and CSS styling. It took me a little while to figure out how to achieve this, given my limited exposure to PHP in general and WordPress programming in particular. This is how I went about it; there may well be better ways. Start writing post At this point your draft is assigned a post-ID. This is the value at the end of the post’s URL. For example, this post has URL https://redfrontdoor.org/blog/?p=970 and its post-ID is 970. Write post-specific Javascript Make a self-contained Javascript file, wrapping the logic in jQuery(document).ready(function($) { // [… code goes here
Continue readingYou feel ill and go to a doctor. She does a test and says ‘you have a 70% chance of having the Lurgy’. You go to a different doctor, who does a different test, but also says ‘you have a 70% chance of having the Lurgy’. Given these two test results, what are your chances of having the Lurgy?
Continue readingA one-character documentation fix for ‘git’.
Continue readingUpdate 2022-07-12: I recently received an email from Pablo Vidal (@this_may_be_it), who had success getting with a similar project, using a MiniDisc player — see the end of this post for details. The idea for this project came from a few different places: Curiosity about how cable modems actually transmit ones and zeros along the coax cable. This led to some reading about the various modulation methods used. Code I’d written to read the data on cassette tapes containing files from the Dragon 32 computer of my youth. (Including this one.) The modulation here is fairly simple, being one cycle of a certain tone for a ‘0’ and one cycle of a different tone for a ‘1’. Some fairly superficial reading
Continue readingMy 7-year-old daughter and I built a robot which plays the memory game ‘Simon’. Servos use string to pull ‘fingers’ made out of Lego, pressing the game’s buttons. Phototransistors sense which lights are flashing, with an Arduino controlling everything. It successfully plays a complete game of Simon!
Continue readingRTE recently carried a news piece announcing the release of a large volume of historical digital images by the National Library of Ireland. One detail in the piece caught my eye: it quoted the library’s Digitisation Programme Manager Sara Smyth as saying Since 2010, we have overhauled our digitisation workflows and put in place key technical infrastructures. We achieved this with limited full time technical resources and a very restricted budget by collaborating on international open source projects. (emphasis added). This sounded like a great thing. I wondered what projects these were, so emailed Ms Smyth. She and a colleague wrote back, kindly supplying plenty of detail, which this post reports. Engagement with open source projects generally Perhaps unsurprisingly, Systems
Continue reading© Trustees of the British Museum[source page] On a recent visit to the British Museum in London, I was interested to see a very curious escapement mechanism in one of the clocks, a creation of Thomas Tompion in the 1670s. I am certainly no expert on clocks, but I had never seen an escapement where the pendulum swings across the plane of the gear wheels. Frustratingly, the actual mechanism was very small, and in the middle of quite a large glass case, so I could not see it well enough to work out what it was doing. I spent a bit of time thinking about it, and came up with an idea for what might be happening, but now the
Continue readingFiddling with a jam-jar lid suggested its tamper-evident pop-up button exhibited hysteresis, and so I did some experiments on a blackcurrant jam lid to test this. Adding weight 50g at a time, the lid flexes very slightly, but stays popped up with 800g on top. It pops down when you add 50g to make 850g. Removing weight 50g at a time, the lid does not pop back up straight away. It stays down as you decrease the weight to 650g, but when you remove 50g to leave 600g, it pops back up. This confirms the suspected hysteresis. I read a long time ago that if you take a system with hysteresis, and introduce negative feedback from the response to the
Continue readingJude was given an electronics set for her birthday, called Hot Wires. You connect components together with poppers to make circuits, and it’s generally very good. One of the experiments is called ‘traffic lights’, and is supposed to be a circuit where you choose whether a green light or a red light shines, by pressing a button. Simplifying slightly, its circuit is The LED modules actually have series resistors inside them, so it’s safe to connect them across the battery voltage like that. With the button switch (bottom left) not pressed, only the red LED is supposed to light. If you press the button switch, the red LED is supposed to go out and the green LED light instead. But
Continue reading