Re: [TDD] Statics and caches and mocks oh my!
It is, though you could easily replace that with any cache implementation.
Most web server caches are global/static by design, though. The main
point is the separation of concerns and use of
By
Steven Smith
·
#35360
·
|
Re: [TDD] Statics and caches and mocks oh my!
Hi Steve. Thanks for the links. I had a look at the blog and unless I am
mistaken it is still just using a static cache internally -
HttpRuntime.Cache.
Am I missing something?
By
David Burstin
·
#35359
·
|
Re: [TDD] Statics and caches and mocks oh my!
I used this approach at a company-that-shall-not-be-named, years ago.
I started with 2 unit tests for my group's part of the system. A week later I was up to 10, and my co-workers started seeing that
By
Russell Gold
·
#35358
·
|
Re: [TDD] Statics and caches and mocks oh my!
Wow. I knew a programmer who was dinged by her manager because she wasn't creating enough bugs. They expected a certain number of bugs per some number of lines of code to be found in code-review and
By
Keith Ray <keith.ray@...>
·
#35357
·
|
Re: [TDD] Statics and caches and mocks oh my!
I would avoid the statics, replace the references to the repositories with
interfaces, and also split the responsibility to cache or access data into
two pieces, so that each can be tested (and
By
Steven Smith
·
#35355
·
|
Re: [TDD] Good Test Driven Development links
Hello Harvis
I have quite a few articles on my blog and website about applying TDD to embedded systems software development. There's my book too :-)
More specifically, I have a series of three
By
James Grenning
·
#35354
·
|
Re: [TDD] Re: Good Test Driven Development links
Hi David,
I assume you meant me and the discussion in the other thread.
To me the biggest negative side-effect is the difficulty in testing. I
believe this is a real issue. It is not just that there
By
David Burstin
·
#35353
·
|
Re: [TDD] Statics and caches and mocks oh my!
I just want to add that you might need to convince your coworkers to keep unit tests passing.
If they are further convinced of the usefulness of writing tests, then you can show them up how helpful
By
Keith Ray <keith.ray@...>
·
#35352
·
|
Re: [TDD] Statics and caches and mocks oh my!
Thanks Russ. That is exactly the way I am going to start.
Amazingly I even met some resistance to that approach - "it will be
inconsistent with the rest of the application", "someone new coming
By
David Burstin
·
#35356
·
|
Re: Good Test Driven Development links
David,
I'm interested to read this discussion, but what I'm missing is an explanation of what kinds of problems are being caused by the current architecture. Presumably the remainder of the team
By
Parsons, David
·
#35351
·
|
Re: [TDD] Statics and caches and mocks oh my!
How much code control does the organization exert? Do you have regular code reviews?
My experience is that the best way is to start small. Make one class testable at a time without touching the
By
Russell Gold
·
#35350
·
|
Re: [TDD] Statics and caches and mocks oh my!
As far as code smells go, some people just seem to have blocked noses!
Anyway, thanks everyone for your answers. I'm glad to see that I am on the
right track - now I just have to convince everyone
By
David Burstin
·
#35349
·
|
Re: [TDD] Statics and caches and mocks oh my!
Or there might not be any convincing enough smells, yet!
If not, bide your time, watch for smells as the code scales, and when
convincing smells appear, then make the case for refactoring it
By
Steve Gordon
·
#35348
·
|
Re: [TDD] Statics and caches and mocks oh my!
David Burstin wrote:
This is a "pattern" from the book "working with legacy code" - it's good
because it's (relatively) non-invasive and allows you to put your legacy
code under test for further
By
Michal Svoboda
·
#35347
·
|
Re: [TDD] Statics and caches and mocks oh my!
Not having seen the code my gut tells me that this is probably what I would
do. Just create a wrapper API that lets you use the cache in a more OO way
and then write a concrete implementation that
By
Adam Sroka
·
#35346
·
|
Re: [TDD] Good Test Driven Development links
http://pragprog.com/book/jgade/test-driven-development-for-embedded-c
http://pragprog.com/book/lotdd/modern-c-programming-with-test-driven-development
By
Adam Sroka
·
#35345
·
|
Statics and caches and mocks oh my!
Hi folks,
I've got a question around design for a legacy project that I am working on
in c#.
This project uses some repository classes that internally act as caches,
retrieving data from internal
By
David Burstin
·
#35344
·
|
Re: [TDD] Good Test Driven Development links
ÔÚ Tue, 04 Jun 2013 00:10:26 +0800£¬Esko Luontola
<esko.luontola@...> дµÀ:
Any good example of TDD used in embedded system developing especially with
RTOS.
I'm a new guy with TDD, now what
By
Harvis Wang
·
#35343
·
|
Re: [TDD] Good Test Driven Development links
Kathy Van Stone wrote on 3.6.2013 18:55:
Here is my recommendation for people wanting to learn it: https://github.com/orfjackal/tdd-tetris-tutorial
--
Esko Luontola
www.orfjackal.net
By
Esko Luontola
·
#35342
·
|
Good Test Driven Development links
I gave a lightning talk on Test Driven Development. Obviously I could not
go into details, but I was wondering if there is a (current) good link to
send people for more information? I've been a bit
By
KathyVS
·
#35341
·
|