I increasingly meet young programmers whose primary concern is “how do I test it”. When I state that one’s primary concern should perhaps be writing a good solution to a problem or a set of functional requirements, one that also meets measurable non-functional requirements, I tend to get a response like “of course that’s the case”, while I suspect they wonder what non-functional requirements are.
When I push about how they would go about that, I rarely get a coherent answer that doesn’t really boil down to writing procedural code using subroutines, and control/data structures [*1]. The answer I often get as to what determines what one should code is “the tests”. It would sadly seem that tests for many are everything.
[*1] I use filter and map from a library, so am I not a functional programmer?
Writing testable code is the essence of software development. How do you know the code works? By writing tests.
I found this to be a rather bewildering remark. Isn’t solving practical problems “the essence of software development”? And if you only know your software works because of tests then that sounds a bit scary to me.
I increasingly meet young programmers whose primary concern is “how do I test it”. When I state that one’s primary concern should perhaps be writing a good solution to a problem or a set of functional requirements, one that also meets measurable non-functional requirements, I tend to get a response like “of course that’s the case”, while I suspect they wonder what non-functional requirements are.
When I push about how they would go about that, I rarely get a coherent answer that doesn’t really boil down to writing procedural code using subroutines, and control/data structures [*1]. The answer I often get as to what determines what one should code is “the tests”. It would sadly seem that tests for many are everything.
[*1] I use filter and map from a library, so am I not a functional programmer?
Indoctrination is powerful. Just as it was with OOP. Educational institutions have been pushing testing & tdd for years now..
That said, “how do I (write an automatic) test (for) it” is a good question and one I wish I could answer more often than not. I can’t.
The comment that prompted me to write this was:
I found this to be a rather bewildering remark. Isn’t solving practical problems “the essence of software development”? And if you only know your software works because of tests then that sounds a bit scary to me.