methodology

Can cxxtest suite be dynamically extended at run-time?

好久不见. 提交于 2019-12-13 02:06:12
问题 I wish to dynamically extend my CxxTest Suite with additional test items, but am finding that all the testing scenerios must be available (hard-coded) at compile time. My scenario is that I've got a fairly bulky C++ class that has 20+ methods to be tested. This class needs to be tested for 40+ DIFFERENT data sets. These data sets are obtained via the class constructor, controlled via parameters. My primary objective is to avoid re-writing the same 20 test cases for the different data sets. I

Example of Dependency Injection with only base class

落爺英雄遲暮 提交于 2019-12-12 05:12:55
问题 Is it possible to do DI without any third party tools? I've read about people doing it with an abstract class and interface before they discovered some DI framework. How is ID done in that very basic form? 回答1: Just pass the dependencies to the constructor of the class when you instantiate it. No DI frameworks are needed when the project is small (below a couple of thousand lines of code) - you can write a factory and wire up all the dependencies manually. 回答2: Of course it's possible without

unit testing philosophy

假装没事ソ 提交于 2019-12-10 18:18:40
问题 I have a "recipe" method which i am trying to write using TDD. It basically calls out to different methods and occasionally makes decisions based on results of these methods: public void HandleNewData(Data data) { var existingDataStore = dataProvider.Find(data.ID); if (data == null) return; UpdateDataStore(existingDataStore, data, CurrentDateTime); NotifyReceivedData(data); if (!dataValidator.Validate(data)) return; //... more operations similar to above } My knee jerk reaction would be to

Django / MacOS revised efficient development workflow

谁说我不能喝 提交于 2019-12-10 11:32:20
问题 I've been now happily developing applications (Django in particular) on the Mac for a few years now. As part of this process I am always looking to gain efficiencies in my workflow and enjoy reading about other development expieriences. Now it's my turn to give back. This is a revision to my previous post with time and expierience under my belt. Tools of the trade A Mac Loaded up with XCode A good set of gnu tools (coreutils, findutils, diffutils...) A solid set of SCM's git, mercurial,

Apply CSS display:none or use if(false){content} to block content at clients?

▼魔方 西西 提交于 2019-12-08 01:57:19
问题 Approach 1 : Using CSS display:none means that the content is sent to the client but is hidden from view. In other words; the content does exist but without occupying any space. Approach 2 : Using if(false){content} prevents the content from being sent to the client at all. <html lang="en"> <head> <meta charset="utf-8" /> <title>Approaches</title> </head> <body> <div <?php if (true) {echo 'style="display:none;"';}?>> Approach 1 </div> <?php if (false): ?> <div> Approach 2 </div> <?php endif;

Apply CSS display:none or use if(false){content} to block content at clients?

落爺英雄遲暮 提交于 2019-12-06 09:54:18
Approach 1 : Using CSS display:none means that the content is sent to the client but is hidden from view. In other words; the content does exist but without occupying any space. Approach 2 : Using if(false){content} prevents the content from being sent to the client at all. <html lang="en"> <head> <meta charset="utf-8" /> <title>Approaches</title> </head> <body> <div <?php if (true) {echo 'style="display:none;"';}?>> Approach 1 </div> <?php if (false): ?> <div> Approach 2 </div> <?php endif; ?> </body> </html> Which is regarded better in terms of security practices ? If both are secure, then

Django / MacOS revised efficient development workflow

橙三吉。 提交于 2019-12-06 08:08:51
I've been now happily developing applications (Django in particular) on the Mac for a few years now. As part of this process I am always looking to gain efficiencies in my workflow and enjoy reading about other development expieriences. Now it's my turn to give back. This is a revision to my previous post with time and expierience under my belt. Tools of the trade A Mac Loaded up with XCode A good set of gnu tools ( coreutils , findutils , diffutils ...) A solid set of SCM's git , mercurial , perforce , svn (if needed..) iTerm2 - This simply is awesome. ActivePython - The free version → with

RUP (Rational Unified Process) [closed]

南楼画角 提交于 2019-12-06 01:57:52
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . I have chosen to use the development method RUP (Rational Unified Process) in my project. This is a method I've never used before. I've also included some elements from Scrum in the development process. The question is what the requirement specifications should contain in a RUP-model? Is it functional and non-functional requirements? And what should be included in a technical

Object Oriented CSS: Catchy Buzz-phrase or Legitimate Design Approach?

瘦欲@ 提交于 2019-12-05 11:04:44
问题 It seems there is a new catch-phrase emerging in the web development field: object-oriented CSS. On the face of it, this strikes me as simply being best-practice packaged up in a catchy slogan. I understand and fully respect the intentions behind the movement, but is there any more to it? Does anyone have any further insight that sets this approach apart as something more credible or should I just take it as a reminder to make sure I inherit and cascade my classes correctly? 回答1: I would say

ActionMailer best practices: Call method in the model or the controller?

痴心易碎 提交于 2019-12-05 09:34:18
问题 Sending an email is usually called after an action on a model, but the email itself is a view operation. I'm looking for how you think about what question(s) to ask yourself to determine where to put the action mailer method call. I've seen/used them: In a model method - bad coupling of related but seperate concerns? In a callback in the model (such as after_save) - best separation as far as I can tell with my current level of knowledge. In the controller action - just feels wrong, but are