Hacker News new | ask | show | jobs
by JorgeGT 3742 days ago
In the context of acoustics, "ts" almost always means time-step (inverse of frequency). But I don't have the faintest idea of how it would collide with the username string :|
2 comments

In the context of video streaming, ts probably stands for "Transport Stream" [1] and nothrabannosir's idea of the bug is probably very close to correct. What's both hilarious and sad is that someone on HN without access to the source code, debugging environment and internal QA tools probably root caused the bug, whereas the cable company's developers let it get all the way into production.

1: https://en.wikipedia.org/wiki/MPEG_transport_stream

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);