Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For some of these early lessons at least, could they not have 'curated' error tests?

ie. for this one, since missing the quote is an obvious error, why not match the string entered with a regex (or your parsing tool of choice) and look for the presence of exactly 2 quotes, with at least one character in between. If it's not there, print "That didn't work. Did you miss out a quote?"

In fact, if they log all the things people type in, they could analyse it for all the most common errors and then start attacking each of those.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: