What is boilerplate code?

A coworker had never heard of this, and I couldn’t provide a real definition. For me, it’s always been an instance of ‘I-know-it-when-I-see-it’. Bonus question, who originated the term? 15 Answers 15 “boilerplate code” is any seemingly repetitive code that shows up again and again in order to get some result that seems like it … Read more

What is the difference between currying and partial application?

I quite often see on the Internet various complaints that other peoples examples of currying are not currying, but are actually just partial application. I’ve not found a decent explanation of what partial application is, or how it differs from currying. There seems to be a general confusion, with equivalent examples being described as currying … Read more

What is ‘Currying’?

I’ve seen references to curried functions in several articles and blogs but I can’t find a good explanation (or at least one that makes sense!) 22 s 22 Currying is when you break down a function that takes multiple arguments into a series of functions that each take only one argument. Here’s an example in … Read more

What are unit tests, integration tests, smoke tests, and regression tests? [closed]

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 12 months ago. Improve this question What are unit tests, integration tests, smoke tests, and regression tests? What are the differences … Read more

What’s the difference between unit, functional, acceptance, and integration tests? [closed]

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 6 years ago. Improve this question What is the difference between unit, functional, acceptance, and integration testing (and any other types … Read more

What’s the difference between faking, mocking, and stubbing?

I know how I use these terms, but I’m wondering if there are accepted definitions for faking, mocking, and stubbing for unit tests? How do you define these for your tests? Describe situations where you might use each. Here is how I use them: Fake: a class that implements an interface but contains fixed data … Read more

What is the difference between a definition and a declaration?

The meaning of both eludes me. 25 s 25 A declaration introduces an identifier and describes its type, be it a type, object, or function. A declaration is what the compiler needs to accept references to that identifier. These are declarations: extern int bar; extern int g(int, int); double f(int, double); // extern can be … Read more