78

UPDATE: I've revised this answer. A number of good points were raised in the comments that deserved calling out. If my class implements an interface then can I say that I'm following inheritance? It is not entirely clear what you mean by "following inheritance". Let's ask a slightly different question? What is inheritance? When members of one type X ...


58

You're basically correct about P and NP, but not about NP-hard and NP-complete. For starters, here are the super-concise definitions of the four complexity classes in question: P is the class of decision problems which can be solved in polynomial time by a deterministic Turing machine. NP is the class of decision problems which can be solved in polynomial ...


34

Both describe the consistency of an application's behavior, but "robustness" describes an application's response to its input, while "fault-tolerance" describes an application's response to its environment. An app is robust when it can work consistently with inconsistent data. For example: a maps application is robust when it can parse addresses in various ...


27

Inheritance means writing a new subclass for a superclass. Writing a new class against an interface is implementing that interface. (And writing a new interface based on an old one is extending that interface.) The only correct term that applies to all three possibilities is subtyping. Not every subtype is a subclass.


24

In the context of testing tools you mentioned, such as PHPUnit and Fitnesse, this term definitely refers to the notion of test fixture: something used to consistently test some item, device, or piece of software... Software Test fixture refers to the fixed state used as a baseline for running tests in software testing. The purpose of a test ...


22

A rule R is left-recursive if, in order to find out whether R matches, you first have to find out whether R matches. This happens when R appears, directly or indirectly, as the first term in some production of itself. Imagine a toy version of the grammar for mathematical expressions, with only addition and multiplication to avoid distraction: Expression ::=...


18

For me, a string literal is a language construct, an hardcoded string is a string whose value is fixed in a program (you may discuss if it needs to be fixed at compile time or could be somewhat determined by some runtime consideration). An hardcoded string is often a string literal but could come from other sources (say concatenation of character literals ...


18

When a function is defined as part of the class definition, it is implicitly inline (regardless of whether you use that keyword). This has a number of consequences. The function may be inlined by the compiler, potentially but not necessarily resulting in a faster program. Thus, different compilation units can get different copies of this function. The One ...


17

When you're writing C++, don't write it as if it were Python or D or Java. Those are fundamentally different languages with different idioms. When we are talking about inline functions in C++, we have to distinguish two related but distinct concepts: inline functions in a header. Function definitions within a class declaration are implicitly inline. ...


15

Because agile isn’t a framework. It’s a mindset. Individuals and interactions over processes and tools - don’t tell your devs to follow some script. People should talk to each other, not be cogs in some machine. Working software over comprehensive documentation - software matters, not the promise of software. Demos and examples work better than user guides ...


13

Firstly, antibugging isn't a commonly used term, a few people use it, but it won't be generally recognized. For those people that do use it, they mean practices to avoid writing bugs in the first place rather than removing bugs after they are found.


11

Comma is a separator between parameters in the parameter list. Comma is part of the parameter lists. Optional parameters are usually specified inside square brackets in documentation like so: [, int $case = CASE_LOWER]. Comma is added to specify that if you were to use the second optional parameter, you must have a comma separator as well. The fact that ...


11

Integer factorization gets quoted as an example of NP, but I don't understand why it's not P, personally, since trial factorization takes O(sqrt(n)) time. For the purposes of complexity classes, the n is the length of the input. So if you want to factor integer k, n is not k but log k, the number of bits (or whatever) it takes to write down the number. ...


10

Triage has a very specific meaning, but only within the field of medicine. When it comes to issue tracking, the term was borrowed from medicine and used in a similar way: a simple initial assessment of the priority of the bug: do now, do sometime and never do; close. However, as with all such terms, they slip into the realms of "management speak" all too ...


10

The explanations you quoted make sense from a semantical English point of view, but they are horribly ambiguous because it uses words that have very specific meaning in software development terms, but he's relying on the common English definition of these words. This book was released 31 years ago and I suspect that it was ahead of what is now considered ...


9

The term for this type of behaviour is Thread Synchronization. Also sometimes called serialization because the threads must get in line and go through that piece of code serially. Lock Contention is a dimension that can be used to measure and predict the performance of a piece of code that requires thread synchronization. If 8 threads are contending for a ...


9

The first thing to understand is that P and NP classify languages, not problems. To understand what this means, we need some other definitions first. An alphabet is a non-empty finite set of symbols. {0, 1} is an alphabet as is the ASCII character set. {} is not an alphabet because it is empty. N (the integers) is not an alphabet because it is not finite....


9

I will try to give you less informal definition for the same. P problems : problems that can be solved in polynomial time. Contains problems which can be efficiently solvable. NP problem : problems that can be verified in polynomial time. For example:Travelling salesman, circuit designing. NP problems are kind of like puzzles (like sudoku). Given a correct ...


8

Here are the benefits of the imports at the top of the file: As soon as I open the file, I can see all its dependencies. I know it's using datetime or os, because I can immediately see the imports appearing at the top. If imports are dispersed, the only way to find that is to grep through the file. If you do the import in a function, you may end up in a ...


7

Generically, this sort of thing is called Type Aliasing. When you're doing it specifically for a namespace, you're importing the namespace (or more accurately, importing the types within the namespace).


7

I think objects are only built correctly around coherent behaviors and not around data. I will provoke and say that data is almost irrelevant in the object oriented world. In fact, it's possible and sometime common to have objects that never return data, for example "log sinks", or objects that never return the data they are passed, for example if they ...


7

Yes, the terms do mean the same. A string literal means the way a string appears in the code (say in JavaScript, that would be quoted in either single or double quotes ('literal' or "literal"), in the same way that you would have numbers appearing in code - again, a literal (so, in the code var n = 2;, the 2 is a numeric literal). As you can see - this is ...


7

It depends. Here, a string literal is used which is also a hard coded string. Print("Robbie"); But here, a string literal is used to define the constant (which is also a hard coded string). However, the print statement no longer uses a hard coded string since it depends on the value of the constant. const name = 'Robbie'; Print(name);


7

A business rule is defined by business people and relates to business matters, regardless of the way these rules are implemented. Unambiguous examples: The change of the bank account of a beneficiary has to be approved by a different accountant than the one who registered the change (four eyes principle). A purchase agent can issue a purchase order up to ...


7

Agile is a set of values and not a process framework. In fact, one of the major values is individuals over processes – rather than insisting on a rigid framework, find a way of working that works well for the people involved. There are various frameworks in the agile-ish space that can be used to get started, most notably Scrum which is geared towards ...


7

Is it a unit test or an integration test, to ensure that the inputs to a mocked dependency were correct? If "unit test" and "integration test" are the only two choices you are allowed, then you should probably consider this to be a unit test, because your test includes only one of the two elements that participate in the integration. If ...


7

"NoSQL" doesn't consistently refer to any one concept, because it's a marketing term, not a technical one. See for instance my answer on the DBA site. I think you have to look at the historical development of the term, rather than its face meaning: early databases were many and varied. Relational databases in their theoretical purity never actually ...


6

I'll take a stab at putting it into layman's terms. If you think in terms of the parse tree (not the AST, but the parser's visitation and expansion of the input), left recursion results in a tree that grows left and downwards. Right recursion is exactly the opposite. As an example, a common grammar in a compiler is a list of items. Lets take a list of ...


6

Outside of the testing context, the term fixture is sometimes used to describe the initial data in storage (like the initial data in a database) when deploying an application for the first time.


Only top voted, non community-wiki answers of a minimum length are eligible