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

> The test is right because it tests for the fact that lower case letters have a smaller representation as an ASCII character position.

It's the other way around, though.



See why having tests is great to define how a system is supposed to work? Much better than memory.


If the test is actually the specification then, sure I guess, but in most cases it isn't.

Notice that the "failed" example exhibits stability which you claimed was desirable, while neither exhibits sorting by case, this is after all a case-insensitive sort, the "successful" example is just swapping some of the list items for whatever reason, maybe it was how their chosen algorithm worked, maybe it's a bug, they wrote the test so they get to fill out a "correct" answer that matches their behaviour.

Now, striving to pass such tests gets you bug-for-bug compatibility which is what you want if you're an emulator, but the GNU project started out deliberately not doing bug-for-bug because it means people accuse you of copying, and so I don't see why this project should be different.




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

Search: