Morendil comments on That letter after B is not rendering on Less Wrong? - Less Wrong Discussion
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (27)
I suspect a regular expression gone wild. (ETA: This commit looks like a likely culprit, but I'm not sure what's going on that might cause that particular behavior.)
ETA2: Heh. Thought so.
ETA3: um, unit tests. Use them. Do yourself a favor. Pushing a bug to production that takes under a minute to locate from static inspection of the code? Embarrassing.
ETA4: ...though, in fairness, I can see how someone test-driving this code could easily have written a test that didn't catch this particular mistake.
We agree completely. We inherited this code from Reddit, and we've spent multiple days trying to strap a workable unit testing framework onto it. As is often the case when you write the code first, strapping unit testing on later is hard.
We've basically given up on unit tests in this code base, but we'd love to be shown to be idiots on this one. Please take this opportunity to show us up by writing some example unit tests around any of our recent commits.
We have strapped Selenium tests on.
Code contributions are very very welcome.
As long as you're fixing regressions, how 'bout the whole "comments no longer showing up in IE7" that Silasbarta made a post on a few weeks ago?
edit: Seems to be fixed, thanks!
The regular expression is wrong: It has the term "\0xc" in it, when it should have had the term "\x0c"
So, instead of excluding the control character corresponding to ascii "0c", it excluded the letters "x" and "c".
This post is brought to you by letter