9 ms·
Bugs in your programs
- kintamanimatt 14y ago> As we learn to code, one of the most frustrating experiences we can have is finding bugs in our code. Bug hunting can be a really fun thing to do. It's a challenge to (often) see beyond your own blind spot and use logic and reasoning to find the error. TDD (and its kissing cousins) aren't a panacea, but I suspect OP's testing strategy is a little too thin or absent. Chances are if there is a test suite, it's not properly testing the entire code base.
- marquis 14y agoDepending on the bug and the stress level, it can certainly be a riveting experience to search for an error deep in your own code. I find it's also an important source of refactoring for me, I take notes about what v2 will not be doing. Unit testing is great but it doesn't teach me to innovate or come across solutions I hadn't thought of before like genuine dirty bugfixing can do.
- zht 14y agothis post explains... that there may be bugs in our code and third party libraries and that if you fix them you'll improve as a coder. I'm curious, who learned something from this post?
- endlessvoid94 14y agoit's intended for people who are learning how to code and may be unfamiliar. everybody starts somewhere.
- marquis 14y agoNew coders may not really know the value of bug hunting. In a mentoring situation I would stress the bug hunting/fixing should be considered a challenge, not a chore.
- leif 14y agoI learned to check the upvotes before clicking through. Again. Sigh.
- ericHosick 14y agoFor me I see coding as: A) R&D/Learning - Code/hack out new ideas and learn. B) Production - Use known methods + what was learned in A to write production code. For A, it seems that we can R&D/Learn all we like without TDD/BDD etc. Hack away. Get a proof of concept out. But please don't put that code into production. For B, use something like TDD to assure robustness. I would also argue using BDD to assure coverage of system behavior. I feel a majority of bugs in code is because developers stick stuff created in A into production.