Hello, I noticed an interesting Java project called CRAP4J (www.crap4j.org), to detect code that smells. While this seems really neat, there's no C++ support...
Hi Srdjan, Have a look at this stackoverflow topic: http://stackoverflow.com/questions/1433632/is-there-a-findbugs-and-or-pmd-equivalent-for-c-c Kind regards, ...
Avi - as usual, good clear advice. In my case, my entities all have interfaces, so I can create fake/mock/stub versions of them as needed. Pretty much the same...
... I think the other smart answer it not allow hundred DIRECT dependence. Only allow four or five direct dependence, so it is easier to manage and mock, if...
@John, If the dependencies are driving you crazy, try changing the granularity of your queries. Instead of pulling a "well-endowed" 'Person'. Pull just...
Hi, ... I have just looked at -Weffc++ and it does throw up a lot of warnings, many of which are from the standard libs. The gcc documentation does suggest...
Hi guys, I'm having an issue and I would like to know if some of you have some advice, comments, or whatever that can help me. Because I feel that I'm doing...
Erlis Vidal
Erlis.Vidal@...
Nov 3, 2009 9:24 pm
31981
Carfield, You are right of course. In modeling this we would like to avoid lots of dependencies. But if there are real-life dependencies, how can we avoid them...
Gutzofter, You are right. But in the case where I need all the dependencies, how do I test without injecting them all? See my reply to Carfield for one way...
class TestEasyHouse : House { constructor() : House(new TestEasyCat(), new TestEasyOwner(), new TestEasyCar()) { } } How about the above? Alan Baljeu ...
I hope you will be interested to propose a session on TDD for XP2010 in Trondheim, Norway - anything from a workshop to a lightning talk would be interesting. ...
2009/11/3 Erlis Vidal <Erlis.Vidal@...> ... The single responsibility principle states that each unit should have a single purpose/responsibility. ...
Olof Bjarnason
olof.bjarnason@...
Nov 4, 2009 7:12 am
31987
Hi Olof, Thanks for your response. I like your point of view, and I'm really trying to follow that idea, that's why I'm confused. I created a method, with the...
Erlis Vidal
Erlis.Vidal@...
Nov 4, 2009 2:44 pm
31988
@Erlis, I use a rule of thumb when using extract class: Extract behavior not state. What it looks like is you are extracted state to a new class. So now, not...
Erlis, I'm a bit confused. Here's the basic position: duplicated code is bad - remove it. It seems as though you have something duplicated, so I'm wondering...
Alan, I don't think this addresses the difficulty. Your suggestion is a good example of how to construct a complex object using fakes. But it doesn't treat the...
2009/11/4 Donaldson, John (GEO) <john.m.donaldson@...> ... There could be several solutions to your problem. One way to get a different perspective is to...
Hi John, You are right when referred to remove the old X tests, that is what I usually do. But in this case what seems to happen is that all X appear to be...
Erlis Vidal
Erlis.Vidal@...
Nov 4, 2009 9:35 pm
31993
Hi gutzofter, Thanks for your answer. I have to admit that I didn't understand well what is the difference between behaviour vs state. Can you send me some...
Erlis Vidal
Erlis.Vidal@...
Nov 4, 2009 9:35 pm
31994
Erlis, You have separated the InPause logic, and you can test that separately. This seems to be the right direction. I don't see that you need to test again...
... It's really simple state is just data. When I say 'behavior', I mean the algorithm for transforming data. ... FindRunningRealeases is now just an iterator....
Hi guys, Thanks for all your responses. Putting together John, gutzofter and Franz ideas I could do a better solution. When I was reading all your responses,...
Erlis Vidal
Erlis.Vidal@...
Nov 5, 2009 3:53 pm
31998
Take a look at http://cppdepend.com. They have a command line version if you're not using VS. It includes most of the same metrics as crap4j and is probably...
On Mon, Nov 2, 2009 at 7:35 AM, Srdjan Todorovic ... You might want to look at QA C++ from Programming Research as a good source code analysis tool for...
... If I'm understanding you correctly, no, you don't really have two places. You have a method that filters on whether something is paused or not - but it...