Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32241
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: API vc MVC |
| Date | 2015-08-01 22:49 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mpjidf$1ad$1@dont-email.me> (permalink) |
| References | (8 earlier) <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> |
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
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