Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37845

Re: Calling deprecated methods

From Kiwi User <martin@mydomain.invalid> (Kiwi User)
Newsgroups comp.lang.java.programmer
Subject Re: Calling deprecated methods
Date 2017-12-12 22:41 +1200
Organization fsxNet Usenet Gateway | bbs.geek.nz/#fsxNet
Message-ID <3801429685@f38.n261.z1.binkp.net> (permalink)
References <2163157443@f38.n261.z1.binkp.net>

Show all headers | View raw


On Tue, 12 Dec 2017 13:33:06 -0800, Eric Douglas wrote:

> I currently work for a small business, so not a lot of time to waste
> writing tests that can guarantee every enhancement won't break any
> existing code much less comment blocks, when we have a dozen big
> enhancement requests and 2 developers.
>
If a class is largely getters and setters and its other methods for linear
things, then you're right.

However, if there are ANY edge cases and/or errors to be handled, then just
writing it and incorporating calls for in in the application code is likely to
bite your bum because (a) unit/system test of the combined code module may
never exercise all its edge cases due to inadequate test data and (c) once a
user starts trying something the system designer never thought of and generates
 the edge case, it may take a lot of time and effort merely to determine what
happened and which module crashed.

Using a test harness will probably save time and effort overall because: such
harnesses are typically very fast to write: once you've got a test harness
skeleton running, the code needed to interface it to a new class is almost a
script and the incremental code within that which tests a method is 2-4 lines
plus the actual method call. Last but not least, its dead easy to set up test
date that can deal with all normal and abnormal inputs AND contains (comments)
to show whether each method test in the script should succeed or fail and what
the expected results should be.

On top of that, once you have a set of tests set up, they tend to be fast and
easy to run, so its practical, and worthwhile to rerun them after and change is
 made to the class. I have sets of 30-50 regression tests that execute in under
 a second and will, if done properly, inadvertant mistakes made when you're in
a hurry.

Been there, done that, got the benefits.


--
Martin    | martin at
Gregorie  | gregorie
          | dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-12 16:31 +1200
  Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> (Eric Douglas) - 2017-12-12 10:24 +1200
    Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-12 20:05 +1200
      Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> (Eric Sosman) - 2017-12-12 15:41 +1200
        Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-12 21:04 +1200
          Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> (Eric Douglas) - 2017-12-12 13:33 +1200
            Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-12 22:41 +1200
              Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> (Eric Sosman) - 2017-12-12 17:57 +1200
                Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> (Eric Douglas) - 2017-12-13 04:51 +1200
                Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> (Eric Sosman) - 2017-12-13 08:21 +1200
                Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> (Eric Douglas) - 2017-12-13 05:40 +1200
                Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-13 15:19 +1200
                Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> (Eric Douglas) - 2017-12-13 07:57 +1200
                Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> (Kiwi User) - 2017-12-13 17:30 +1200
                Re: Calling deprecated methods Richard Damon <Richard@Damon-Family.org> - 2017-12-15 22:31 -0500
                Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-16 09:08 +0000

csiph-web