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

Guessing they're scanning for parameters in a JSON object by doing something like

    ts = parseInt(jsonstr.indexOf("ts")+2);
I wish I didn't come to this guess by seeing it in real code so many times…

T_T




One of the reasons I've always been leery of regex. Especially since everyone I've seen using them tends to blindly copy an example from elsewhere and then bats at it until the test case passes.


I just realized that our codebase is probably relatively ok...


If only they had just looked for the whole key:

    ts = parseInt(jsonstr.indexOf("\"ts\":")+5);




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: