Try, Then Add
Try it bit by bit in isolation and see for yourself that it works. Don’t assume anything. Test everything. THEN incorporate it into your code.
A big program will have so many moving parts. If it is also doing mysterious things, there will definitely be lots of flying monkeys and clowns on crack. If you try to make sense of such a freak show, you will experience a pain that could have easily been avoided.
If you have already clumped together all the square pegs, round holes and chewing gum, the best bet would be to take your code apart, try (copy-paste) it piece by piece and put it together into a new program.
Personally, though I’ve inherited some hairballs at my day job, I’ve had the good fortune of at least being able (=time,budget) to rewrite them altogether.
Good programming languages make ‘trial & error’ approach painless. I love playing in Python and Lisp primarily because they make this experimentation easier and natural. However, “Try, Then Add” is a good habit while programming in any language - even if it is in COBOL. Doing it in COBOL will be a pain in the neck, of course - but I double dare you to not do it.
Imagine my joy in finding something that makes “Try, Then Add” easier for JavaScript! [Learning JS from the Command Line]
Further Reading: What is REPL? Programming Bottom Up
dei long time da. can you mail me your number ..i need to talk to u machi ...
This best describes trying to figure out what a woman is thinking when on paper everything should technically work which isn't the case.