top | item 7201405

Show HN: Speedsums

64 points| refrigerator | 12 years ago |speedsums.com | reply

62 comments

order
[+] callum85|12 years ago|reply
The 'motivational' comments were hilarious and refreshing. I strongly disagree with the other advice you've been given here.

Don't 'turn it up to 11' to remove all the subtlety and ram the joke down people's throats. And don't turn it into "Oops, try harder next time!" like every other insipid thing in the world. Please. You made something that made me laugh. As much as I love HN, it's a strange, unrepresentative community and you should be very careful trying to appease the crowd here, which always bristles at anything that breaks character. People here are sometimes too focused on how to churn out templated startups, and not enough on art.

[+] iandanforth|12 years ago|reply
I think this kind of practice is great. However I don't think insulting learners is ever a good idea.

"If you got below like 30 on your first attempt, you should probably practice a little before embarrassing yourself again."

[+] refrigerator|12 years ago|reply
I thought it would motivate people to try harder, but I guess it's backfiring... sorry! I'll change it
[+] henryaj|12 years ago|reply
Agreed - I was quite taken aback by this. Not exactly beginner-friendly...
[+] 3pt14159|12 years ago|reply
lol, 20 in 30 seconds is pretty good if you don't have a number pad.
[+] poopicus|12 years ago|reply
This is incredibly user hostile with lines like "you should probably practice a little before embarrassing yourself again" and "It should not take 4.18s to solve that next time."

Is that part of discouraging procrastination or what? As it stands, I couldn't show my sisters this without them getting upset with me.

[+] Houshalter|12 years ago|reply
I wonder if teaching people analog math would be better. This is more practical if you don't need exact quantities, and more in line with how your brain actually works. Symbolic math isn't "natural" and you learn it not by generalizing but by memorizing a large number of facts and heuristics. But your brain is really good at approximating continuous functions. Imagine how much complex math goes on in your brain when you see a ball in the air, predict where it's going, and coordinate hundreds of muscles to catch it.

I imagine it would work by seeing two bars or boxes and then drawing a third bar/box with the correct area/length and getting rewarded based on how good you do. Another exercise would train you to convert numbers to or from boxes with the same length and at the appropriate scale.

[+] lucb1e|12 years ago|reply
I've always been extremely bad at things like this. Working quickly is one thing I cannot seem to do. Which makes this extremely good practice of course!

Last week I cleaned up a lot my room and went through stuff from primary school. Speedruns, where we had a sheet of sums that we had to solve as quickly as possible, always showed I was within the bottom half of the class (I don't remember the exact number), while mostly other tests' scores were in the top 85% or something. "Slowly but steadily," I guess?

Oddly my typing speed is faster than everyone else I know, including in a class full of coders. I'm not slowest in everything at least.

[+] orbitur|12 years ago|reply
I'm 30 now, and a little better at it, but I'm still relatively shitty with timed thinking exercises, and being graded in general. Reminds me of university where I did poorly on exams. I'd have graduated with a much better GPA if it weren't for my anxiety over them. The worst classes were the ones with finals worth 50% of the total grade.

I'd waste 2 hours pulling my hair out imagining what it would be like if I failed, instead of working. Looking back I probably should've seen a doctor about my anxiety issues.

[+] kaahne|12 years ago|reply
Cool little Game ! As a lot of people here, I threw together some JS to try and 'hack' the challenge. As mentioned by OP, this is "staggeringly" easy to do. Yet, I was wondering : How would you go around to preventing such a behavior ?

I would try obfuscating the problem a little bit :

* Display an image instead of a text (using canvas for quick drawing ? You'd have to create the images server side to really be sure)

* If you really want to display text, use a custom made font (Reverse-engineering the characters match would take a little time)

* Changing the elements id (#answer and #question) every question.

Any ideas ?

[+] refrigerator|12 years ago|reply
since it's client side, it's physically impossible to completely prevent cheating :( using images instead of text and changing element id's and things would certainly make it harder to hack though!
[+] webbedhands|12 years ago|reply
Sometimes it's hard to differentiate between the addition and the division sign. That's rather annoying.
[+] refrigerator|12 years ago|reply
yeah a lot of people have said this, it used to be a '/' instead of the division sign but then everyone complained about that haha
[+] beepp|12 years ago|reply
I went all the way, simulated keydowns and all. (Thanks, http://stackoverflow.com/questions/4158847/is-there-a-way-to...)

var element = document.getElementById('answer');var y = document.getElementById('question');var dispatchKeyboardEvent = function(target, initKeyboradEvent_args) {var e = document.createEvent("KeyboardEvents");e.initKeyboardEvent.apply(e, Array.prototype.slice.call(arguments, 1));target.dispatchEvent(e);};var dispatchTextEvent = function(target, initTextEvent_args) {var e = document.createEvent("TextEvent");e.initTextEvent.apply(e, Array.prototype.slice.call(arguments, 1));target.dispatchEvent(e);};var dispatchSimpleEvent = function(target, type, canBubble, cancelable) {var e = document.createEvent("Event");e.initEvent.apply(e, Array.prototype.slice.call(arguments, 1));target.dispatchEvent(e);};var send_key = function (key) {var canceled = !dispatchKeyboardEvent(element,'keydown', true, true, null, key, 0, '');dispatchKeyboardEvent(element, 'keypress', true, true, null, key, 0, '');if (!canceled) {if (dispatchTextEvent(element, 'textInput', true, true, null, key, 0)) {element.value += key;dispatchSimpleEvent(element, 'input', false, false);dispatchSimpleEvent(element, 'change', false, false);}}dispatchKeyboardEvent(element, 'keyup', true, true, null, key, 0, '');}; y.addEventListener('DOMNodeInserted', function(e){var z = eval(y.innerHTML.replace(/[=\s]/g,'').replace(/x/ig, '*').replace(/÷/g, '/')).toString(); for(var i in z){send_key(z[i]); element.value+=z[i];}});

[+] wreegab|12 years ago|reply
You beat by a few minutes. I wrote a Chromium extension for it:

cs.js:

    (function(){var b;var a=function(){if(b!==undefined){var e=document.querySelector("input#answer");
    e.value=b;e.dispatchEvent(new Event("keyup"))}};var c=function(e){var h=e.length;
    var f;while(h--){f=e[h];if(!f.addedNodes||!f.addedNodes.length)
    {continue}if(f.addedNodes[0].nodeType!==3){continue
    }var j=f.addedNodes[0].textContent.match(/^\s*(\d+)\s*(\S)\s*(\d+)/);if(!j){continue
    }var k=parseInt(j[1],10);var l=j[2];var g=parseInt(j[3],10);switch(l){case"+":b=k+g;
    break;case"-":b=k-g;break;case"x":b=k*g;break;case"÷":b=k/g;break}setTimeout(a,500);
    return}};var d=function(){var e=new
     MutationObserver(c);e.observe(document.querySelector("div#question"),
    {attributes:false,childList:true,characterData:false,subtree:false})
    };window.addEventListener("load",d)})();
manifest.json

    {
    "manifest_version": 2,
    "name": "Speedsums Helper",
    "version": "0.1",
    "description": "Help be good at SpeedSums",
    "author": "wreegab",
    "content_scripts": [{
        "matches": ["http://www.speedsums.com/*"],
        "js": ["cs.js"],
        "run_at": "document_start"
    }]
    }
Caveats: Need to answer the first question. Need a time out to prevent exhausting the list of questions (it stops at 119)

It's Hacker News after all...

[+] zjonsson|12 years ago|reply
This works as well (using jquery): var a=0,t;setInterval(function(){t=$("#question").text().replace('x','*').replace('÷','/');t=t.slice(0,t.length-2);if(t!=a)$("#answer").val(eval(t)).keyup();a=t;},0);
[+] refrigerator|12 years ago|reply
It's staggeringly easy to hack because it's a fully client-side app but that's not really the point :)
[+] agumonkey|12 years ago|reply
Easy questions. This tests if you read/understand/type fast rather than think. Funny anyway.
[+] bbx|12 years ago|reply
This reminds me of Case Interview Math: https://www.caseinterview.com/math/home.php

Try with "Estimation Math", "Random", and "Hard".

A friend of mine told me about this website. He used it to practice for interviews. I took it as a game. It's less about precision and more about "close enough" but quick calculations. After a while, you learn to focus on the most critical part of each question, which depends upon the operator and the number of digits, and dismiss what's irrelevant.

[+] 3825|12 years ago|reply
>> For future reference, 8 x 9 = 72. It should not take 3.04s to solve that next time.

I really disliked learning the multiplication tables. When faced with 8 * 9, my mind thinks 8 * 8 = 64 and adds 8 to it to get 72. :-/

[+] mrkickling|12 years ago|reply
I use to think of it like 10 and then subtract with the other factor. For example if you have 9x7, think 10x7 and then subtract 7. 70-7 = 63.

And if you have 9x9 just think 90-9=81.

9x10 = 100-10 = 90

9x15 = 150-15 = 135 and so on..

[+] lukaszg|12 years ago|reply
// run in firebug and click & enter input... $('#answer').click(function(e){ var value = eval($('#question').text().replace('=', '').replace('÷', '/').replace('x', '*').replace(/\s/g, '')); console.log($('#question').text() + value); this.value = value; })
[+] peter_l_downs|12 years ago|reply
This a great way to improve your touch-typing skills. I'm extremely accurate on letters and the couple of symbols that I tend to use in programming, but straight numbers are the class of character that I type the least. Pretty cool!
[+] CoryG89|12 years ago|reply
This is cool. I would like to make it multiplayer with websockets. Similar to an old multiplayer math game I made in school. http://get24.jit.su
[+] tbirdz|12 years ago|reply
How do you play? I tried to click on the "Help" button, but it didn't work, so I have no idea what to do.
[+] idiot900|12 years ago|reply
FWIW I thought the insults were pretty funny. They put into context the uselessness of learning to multiply and divide marginally more quickly.
[+] fudgekludge|12 years ago|reply
Just wanted to say that you should sanitize the leader board. Some of those usernames completely turn me off from the concept.
[+] refrigerator|12 years ago|reply
yeah I agree, I've been trying to figure out a way to do it but people will always be able to get past it
[+] runekaagaard|12 years ago|reply
And here's a cheat: http://pastebin.com/483UcMLx
[+] The_Double|12 years ago|reply
shorter: document.getElementById('answer').onkeypress = function(){document.getElementById('answer').value = eval(document.getElementById("question").textContent.slice(0,document.getElementById("question").textContent.length-2).replace('÷','/').replace('x','*'));}

Just mash enter.