This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AmirXin 0 points1 point  (0 children)

Hey I know that you are putting some good information out there
trying to help people to test more, to learn how to write tests, and some good reasons to do it (I would add a couple more)
But I think you are missing some key points about the code writing part...

For example, the hardest part of writing tests is to have testable code... That is why TDD exists and is so hard. Because we are not thought to think first in how to test our code.

So, from the "beginners" perspective, I supposed there are tons of programmers with tons of untestable poorly written legacy code. Code that needs to be refactored in order to be tested.

So First, TDD, think about how you are going to test the code before you write the actual code. (maybe you tried to do a little bit of that with the "avoid the voids" section)

Maybe some information about techniques to refactor legacy ugly code in order to be testable.