Forgot your password?
typodupeerror

Comment Re:Don't test manually (Score 0) 396

That's right. You have to run your program to see if it does what you coded (nobody's perfect). To run certain parts you must even write helping code, little programs that you can leave along with the main source code. Those are tests. You should run every critical verification using an external code that you (or everyone else) can run again to see if it keep working when the code changes.

Comment Re:Most of what you say is wrong (Score 0) 580

Further, code that has been corrected, modified or had bugs fixed MUST have comments to identify that fact. These comments are at least as valuable as the actual code. Again, experience will teach you this.

Imagine that you change a code many times for different reasons. Would you explain every possible change you did? For frequently modified code, nowadays you have an alternative for this kind of comments (and others): Putting them in the Versioning Control System. It will store not only the comment, but who changed the code and why, what other changes were made at the same time, when it was done and even all the rest of the program at that point. And code will remain clean and coming with only general explanations about it.

NEVER include a URL in a comment. They change over time and cannot be relied upon to still exist in 3 months, let alone the lifetime of a software product. A similar warning should exist for book / magazine references, too.

After including one of them, you should always include a copy of the book or the webpage along with your code, and everything will be OK. Space is cheap, isn't it?

Slashdot Top Deals

Life would be so much easier if we could just look at the source code. -- Dave Olson

Working...