3 ms·
Some form of test driven development. Helps programmers get a better grasp of what they want to solve while creating some meaningful tests. I sadly only really
by andrew_gardener 13y ago
Some form of test driven development. Helps programmers get a better grasp of what they want to solve while creating some meaningful tests. I sadly only really got into it well after I finished school. Not a good idea to try this out while learning a new language though (makes learning both 3 times harder since your changing code so often)
- catnaroek 13y agoOr learning how to write code you can trust without testing it.
- andrew_gardener 13y agothat's not feasible in the long run. Try that on a large or enterprise level project and watch your product fall apart. The effort you save by not testing will be wasted fixing bugs many times over. Test driven development isn't necessarily the best/right way to test all the time but you have to have some form of testing unless you just don't care about working on the software for over a month
- catnaroek 13y agoYou know what is not feasible in the long run? Finding out what obscure corner case in which component was not properly covered, using tests only. Components interact with each other in non-trivial ways, which more often than not cannot be captured in tests. When an error is found in a sufficiently large program, the poor programmer typically ends up applying a patch where the error manifests itself, rather than actually tracking and fixing the source of error. I know this from experience. On the other hand, if the program (or any of is constituent subunits) is designed right from the beginning keeping in mind that it is fundamentally a transformation from a precondition to a postcondition, from a logical predicate to another, then not only does locating errors become much easier, also testing becomes superfluous. But it takes education to accept this point of view.
- andrew_gardener 13y agowell... looks like you're a little full of yourself Hope whoever gets stuck debugging whatever code you spit out agrees with you viewpoint after spending hours tracing :/