Questions tagged [language-agnostic]

Use this tag for PROGRAMMING QUESTIONS that are independent of any particular programming language.

Questions that are independent of programming language. These questions are typically more abstract than other categories.


A typical usage scenario with this tag is that you have a problem and you don't know how to solve much less what to write in a specific programming language.

So you would first ask a how type question with the tag and usually . Then when you get an acceptable answer you would code it in a specific programming language. If you have problems then you can refer back to the related question with the tag then in the new what question add the specific programming language, e.g. ,


Free Language Agnostic Programming Books


References:

Dictionary of Algorithms and Data Structures (NIST)

8332 questions
753
votes
31 answers

What is the difference between a deep copy and a shallow copy?

What is the difference between a deep copy and a shallow copy?
David Locke
  • 17,926
  • 9
  • 33
  • 53
722
votes
1 answer

"Parameter" vs "Argument"

I got parameter and argument kind of mixed up and did not really pay attention to when to use one and when to use the other. Can you please tell me?
dummy
704
votes
18 answers

What's the difference between passing by reference vs. passing by value?

What does it mean to say that a parameter is passed "by reference" or "by value"? How do such parameters differ?
ritu
697
votes
38 answers

Learning to write a compiler

Preferred languages: C/C++, Java, and Ruby. I am looking for some helpful books/tutorials on how to write your own compiler simply for educational purposes. I am most familiar with C/C++, Java, and Ruby, so I prefer resources that involve one of…
Anton
  • 12,285
  • 20
  • 64
  • 84
692
votes
14 answers

What is Turing Complete?

What does the expression "Turing Complete" mean? Can you give a simple explanation, without going into too many theoretical details?
dlinsin
  • 19,249
  • 13
  • 42
  • 53
657
votes
24 answers

Is a GUID unique 100% of the time?

Is a GUID unique 100% of the time? Will it stay unique over multiple threads?
David Basarab
  • 72,212
  • 42
  • 129
  • 156
638
votes
34 answers

Performance optimization strategies of last resort

There are plenty of performance questions on this site already, but it occurs to me that almost all are very problem-specific and fairly narrow. And almost all repeat the advice to avoid premature optimization. Let's assume: the code already is…
jerryjvl
  • 19,723
  • 7
  • 40
  • 55
608
votes
15 answers

What is a magic number, and why is it bad?

What is a magic number? Why should it be avoided? Are there cases where it's appropriate?
Adam Davis
  • 91,931
  • 60
  • 264
  • 330
588
votes
28 answers

How do you detect Credit card type based on number?

I'm trying to figure out how to detect the type of credit card based purely on its number. Does anyone know of a definitive, reliable way to find this?
Andrew Edvalson
  • 7,658
  • 5
  • 26
  • 24
543
votes
15 answers

Regex: ignore case sensitivity

How can I make the following regex ignore case sensitivity? It should match all the correct characters but ignore whether they are lower or uppercase. G[a-b].*
brother
  • 7,651
  • 9
  • 34
  • 58
505
votes
14 answers

What is an NP-complete in computer science?

What is an NP-complete problem? Why is it such an important topic in computer science?
Claudiu
  • 224,032
  • 165
  • 485
  • 680
497
votes
33 answers

When to throw an exception?

I have exceptions created for every condition that my application does not expect. UserNameNotValidException, PasswordNotCorrectException etc. However I was told I should not create exceptions for those conditions. In my UML those ARE exceptions to…
Kwan Cheng
  • 696
  • 3
  • 12
  • 16
494
votes
16 answers

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…
482
votes
26 answers

Runtime vs. Compile time

What is the difference between run-time and compile-time?
devforall
  • 7,217
  • 12
  • 36
  • 42
475
votes
16 answers

Why should I not wrap every block in "try"-"catch"?

I have always been of the belief that if a method can throw an exception then it is reckless not to protect this call with a meaningful try block. I just posted 'You should ALWAYS wrap calls that can throw in try, catch blocks.' to this question and…
Konrad
  • 39,751
  • 32
  • 78
  • 114