Cheating at gangetabel.dk for fun and glory
My son is doing multiplication in school – they're training for speed now, which is actually a great way to just get the basic multiplication down pat without resorting to counting positions in the times tables in your head. You need to know the 1-9x1-9 by rote.
The tool they're using is a web application called gangetabel.dk that simply goes through all the 81 permutations of 1-9x1-9 in random order and times each “run”. The goal is to get everyone in the class under 5 minutes, but a decent time is 3 minutes and change – and there's ice cream for everyone in the class each time a student gets under 2 minutes for the first time.
I got a 1:54 on my first try, which I suppose is to be expected from such a esteemed member of the programmer's guild as myself, math wiz, computer science degree you know, nudge nudge ... but one of my son's friends is just ABNORMALLY fast – I mean 1:36! Honestly! Obviously, this cannot stand! Which means I am now locked in a duel of honour with an 11-year old child I barely know. Rest assured, this is perfectly normal behaviour for me. Obviously I can't beat him at his own game, he plays Fortnite and has reflexes that are not of this world, no no, that would be madness. So I did what any ex-D&D wizard worth his salt would do – I cheated. Brain over brawn and deviousness over brain – warlock-style.
Adept at prying open all things of the interwebs, I quickly came up with a hack. It's all very basic – and only possible because the important variables and functions in the training game are available in the global JavaScript scope, which also made this hack a candidate for yet another of my Javascript bookmarklets. I haven't been a complete ass about it though, so I've made the title of the page blink the word “SNYD” after solving, which is Danish for “CHEATING”.
Most importantly, my son was very impressed with my magical hacker abilities, which I consider the definitive victory.
To “install” the dirty rotten cheating bookmarklet, just drag the button below to your bookmarks toolbar (dont click it, it won't do anything, you just drag the whole thing to your bookmarks toolbar).
Once the button is in your bookmarks bar, load up gangetabel.dk, pick the 9 x 9 training board and click the button – it should solve the board almost instantly.
List of Projects
- Frøken KlokkenI mere end 80 år har nationalklenodiet frøken Klokken trofast forsynet danskerne med præcise klokkeslæt. Men mobiltelefoner, internettet og radiostyrede ure har gjort tjenesten så godt som overflødig. Sådan har det ikke altid været. Der var engang hvor Frøken Klokken var en teknisk revolution som tusindvis af mennesker dagligt tog kontakt til.
- Sophie Løhde GeneratorSophie Løhde is a Danish politician on the economic liberalist side. She recently posted a picture on Twitter calling out a rival politician. She did so in a much too meme-friendly way for me to resist.
- js-countriesA fairly comprehensive nugget of a JavaScript module that contains all the stuff you need when dealing with countries.
- Solver for gangetabel.dkA bookmarklet that will solve the 9 x 9 board of multiplication in no time at all. A hack I came up with to beat my 11 year old son. Yes ... I stoop that low.
- Bookmarklet that strips JS and CSSA bookmarklet that gives you the ability to turn off JavaScript and CSS on any site with the click of a button. It was made as an aid to help make better decisions about the actual structure of your markup - you could also just use it to reminisce about the 1990s.
- Frames/second Readout as a BookmarkletA bookmarklet that adds a very simple FPS readout meant to be used as a quick way to get a feel for a real time runtime performance gauge for a given website. It timestamps every animation frame and averages over the last 60 frames.