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

That's a weird line of code to begin with. Not only the naming was wrong, but the type was wrong too (Boolean instead of Object).

Could you check all the references where that b variable was used prior to changing the code?

There likely to be just one or two such places.



Sure I could have found all of the references easily. That's one of the reasons I still prefer Java over a dynamic language- my IDE can tell me instantly (option key + F7) where a particular object is used in the entire codebase. I just wasn't careful enough, because hey, what could possibly go wrong- it's a stupid boolean, right?


When I see unusual error in code - not only I check related code, but I may run svn blame. There are multiple benefits for it:

1) I can learn something new and what I thought was an error would turn out to be an interesting new coding trick.

2) If it was an error - not only we would fix it, but would also learn not to make such error in the future.

In particular, that person who made that error would learn to avoid it in the future.




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

Search: