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


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

Re: API vc MVC

Path csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: API vc MVC
Date Sat, 1 Aug 2015 22:49:19 +0000 (UTC)
Organization A noiseless patient Spider
Lines 83
Message-ID <mpjidf$1ad$1@dont-email.me> (permalink)
References <6a96955c-6b2a-416e-9be1-8c5bcc12ff3e@googlegroups.com> <mp6q2l$33v$1@speranza.aioe.org> <mp6uf4$b49$1@speranza.aioe.org> <mp91a2$6b7$1@speranza.aioe.org> <mp91oo$71q$1@speranza.aioe.org> <7ff2e384-40c8-48d3-bb27-4f4ec2e6e147@googlegroups.com> <mparf2$jvp$1@dont-email.me> <55bae330$0$297$14726298@news.sunsite.dk> <55bb73ad$0$2873$e4fe514c@news.xs4all.nl> <55bc0612$0$293$14726298@news.sunsite.dk> <mphiea$k8s$1@dont-email.me> <mpi64r$6do$3@dont-email.me> <mpjbjh$ele$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Sat, 1 Aug 2015 22:49:19 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="1357"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1974IVsWyIsgvCzL1/HGCXSgWYDT5Qcqew="
User-Agent Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
Cancel-Lock sha1:UDOm52J6z4usRc/C3klUdjI7Uio=
Xref csiph.com comp.lang.java.programmer:32241

Show key headers only | View raw


On Sat, 01 Aug 2015 21:54:48 +0100, Eternal Hope wrote:

>> Yep. I see no need for JUnit either: having used it, I wasn't impressed
>> with the appearance or content of the test results.
> 
> I got into the whole "write your test, then write your code to pass the
> test" thing for a while but, I don't know, maybe I was missing something
> but it seemed to take the fun out of it and certainly interrupted my
> flow.
>
That's exactly what you mustn't do. Ideally the test is written from the 
functional specs - which I can get close to because I tend to write the 
description, which corresponds to the module/class level comment and the 
associated function/method descriptions and prototypes/method signatures 
along with any externally visible constants, IOW a module spec before any 
code. However, I do write these as a set of comments with skeletal code 
interspersed so they should compile correctly. I find this helps me get 
the interfaces right and assists with splitting the code up into sensible 
functions/methods. 

Once this has been done, its the right time & place to write the test 
scripts so they end up being written to the the spec rather than to the 
code. Its also a good time to set up the interface code module for the 
test harness. Since this is just an if..then..else totem pole containing 
essentially no other logic, this is as good a time as any to write it. 
All the tests, testing logic and corner cases can be set up and tested in 
the test scripts. These are entirely linear: conditions aren't needed 
because any possible set of inputs and call sequences can be expressed in 
a linear script.
 
>> I use the same approach for C development.
> 
> emacs, gcc, make and gdb does it for me.
> 
> gdb has gotta be the killer app for c devs :-)
>
I find using a debugger is a lot slower that using diagnostic tracing but 
obviously we differ there. Besides, I like leaving the diagnostics in the 
finished code and always under the control of a debug option because this 
the overheads are minimal and troubleshooting problems, often the result 
of the code being used in ways that nobody thought of, that can occur 
later is much easier. 

> I'm currenty working on a memory manager, just for fun I'm a bit slow on
> the uptake so I'm sticking with 32 bit AT&T x86 assembler at the moment,
> I might move up to 64 bit if I can find the time. I doubt I could do it
> without gdb. It's been a while since I looked at it ... never enough
> time is there?
> 
Likewise, I'm in the midst of a configurable 8/16 bit emulator for 68xx, 
63xx and 65xx series chips. This is a C program because the lack of 
unsigned numeric variables made hardware register emulation very nasty i 
Java, bit I digress. Currently there are between 50 and 60 test scripts 
used to exercise its various modules. A complete regression test, which 
uses the complete set of test scripts, currently runs in 1.3 seconds,   

> Ah now there's a thing, dependencies. All these frameworks come with
> their own dependencies, do they all work together nicely? or do they
> conflict, still, there's always Maven :-)
>
Quite. I use make for C and ant for Java, CVS gets used for both  and, 
errm, not a lot more apart from my C and Java test harness. However I 
have used Flex+bison (lex+yacc if you prefer) and curses with C and Coco/
R with Java. I now have one toe in the git water and may well move 
entirely to it. Similarly, I'd now use Coco/R for C rather than flex
+bison. 
 
> I don't suffer from dependency hell, mainly because my code doesn't have
> any apart from an old mysql JDBC driver.
>
Same here, though in my case its the PostgreSQL JDBC driver.

> Oh yes, and I use some email
> validator that comes in a jar file and hasn't been changed for ... years
> really.
>
Javamail and mstor here.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

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


Thread

API vc MVC Leonan Luppi <leonan.luppi@gmail.com> - 2015-05-11 19:04 -0700
  Re: API vc MVC Joerg Meier <joergmmeier@arcor.de> - 2015-05-12 08:09 +0200
    Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-27 22:36 -0400
  Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-27 22:40 -0400
    Re: API vc MVC Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-07-28 11:55 +0800
      Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-28 18:56 -0400
        Re: API vc MVC Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-07-29 07:03 +0800
          Re: API vc MVC Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-07-29 08:10 +0800
            Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 22:43 -0400
          Re: API vc MVC e.d.programmer@gmail.com - 2015-07-29 05:14 -0700
            Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-07-29 16:30 +0100
              Re: API vc MVC Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-07-30 05:46 +0800
                Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 22:56 -0400
              Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 22:53 -0400
                Re: API vc MVC Silvio <silvio@internet.com> - 2015-07-31 15:10 +0200
                Re: API vc MVC Silvio <silvio@internet.com> - 2015-07-31 15:12 +0200
                Re: API vc MVC Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-08-01 09:04 +0800
                Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-31 19:34 -0400
                Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-08-01 05:39 +0100
                Re: API vc MVC Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-01 10:13 +0000
                Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-08-01 21:54 +0100
                Re: API vc MVC Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-01 22:49 +0000
                Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-08-02 07:57 +0100
                Re: API vc MVC Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-02 07:49 +0000
                Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-08-02 09:28 +0100
            Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 22:45 -0400
              Re: API vc MVC e.d.programmer@gmail.com - 2015-07-31 05:31 -0700
          Re: API vc MVC Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 22:41 -0400
        Re: API vc MVC Eternal Hope <laughingspam99@gmail.com> - 2015-07-29 16:24 +0100

csiph-web