4 ms·
It is a problem to me if the time between making a coding change and being able to verify via gui or unit test is too long.
by bbcbasic 11y ago
It is a problem to me if the time between making a coding change and being able to verify via gui or unit test is too long.
- ktRolster 11y agoIf that's a problem, then maybe your code is too monolithic. Unable to test it in pieces.
- bbcbasic 11y agoMonolithic code is certainly one possible cause. Another is having to manually recompile, flip windows or whatever then open the app, get to the point where your code change has made an effect then test it. That's a lot of context switching out of the mindset of changing that code.
- justin_vanw 11y agoThen you need to do a better job of running the code in your head and understanding what it does. Code that is 'written by debugger' is easily recognizable in that it is crappy in pretty specific ways. If you often have to run your code so that you can verify that it is doing what you thought it would do, you don't have any idea what is going on and it's going to be a disaster. Of course you need to run it to catch mistakes that anybody will make, but not to check that the code does what you think it will do. For example, in some language you have my_list.sort() method. What does this do to the list? Does it sort it in place? Does this lock the list from other changes? Will concurrent changes to the list corrupt it? What is the expected runtime of this? If the list contains strings, how are they sorted? By unicode code point? By binary utf-8 encoded value? Randomly? You should just know all those answers in whatever environment you are working in. If you don't you should study up on it. Trying to get a project finished by repeated guess and check is going to take an eternity and you are going to do a poor job.