Slashdot Mirror


User: MrSleepyHead

MrSleepyHead's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. use unit testing, and 50 hours per week max. on Can People Really Program 80+ Hours a Week? · · Score: 1

    First of all, people who say "I generate buggy code and debugging it only makes it buggier." are not unit testing. If you are not using cppunit (for c++) or junit (for java), then put down all your technical books and study unit testing. Make it a part of your development process. This will indirectly do many nice things for your code. Some examples are:
    * if code that already works ever stops working you will know exactly what broke.
    * you will end up with loose coupling. (go look it up of you dont know what im talking about.)
    * unit tests provide examples for people learning your code. Documentation sometimes does not get updated, but the unit tests will always be correct.
    * unit tests help improve your interfaces. (When you realize the hello world test of your interface was hard to write.)
    * It's much easier to debug small tests, than to use the entire application for testing.
    * you dont have to concentrate as much because unit testing causes you to divide problems into small managable peices.
    * unit testing make porting much easier (for c++) because once you finish one platform, the goal is simply to make the tests work for the other platforms.
    * you never have to wonder why the application works on one computer and not another. Just run the test suite on the failing computer.
    * when a new guy gets hired to maitain your code, you dont have to worry about him #%&!ng it up, because you can just periodically run the test suite to check for breakage.
    * you never have to stay late because of a mysterious bug that nobody can find.
    * unit tests can help make your code reusable for other projects. If you can test a piece on its own, perhaps (depending on your skill) it can be reused. When the application itself is used for testing code, typically that code gets bound to the application and is not reusable.
    * unit testing is a cure for code arthritis. When make a code change creates more pain than relief, the code is arthritic. Anyone that has ever worked on a fully arthritic project, knows real pain.

    I can go on all day about unit testing. Try it, you may like it.