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)

8226 questions
8899
votes
30 answers

What and where are the stack and heap?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this. I understand what a stack is. But,…
5522
votes
11 answers

The definitive guide to form-based website authentication

Moderator note: This question is not a good fit for our question and answer format with the topicality rules which currently apply for Stack Overflow. We normally use a "historical lock" for such questions where the content still has value.…
Michiel de Mare
  • 41,134
  • 28
  • 101
  • 133
4071
votes
37 answers

How can I pair socks from a pile efficiently?

Yesterday I was pairing the socks from the clean laundry and figured out the way I was doing it is not very efficient. I was doing a naive search — picking one sock and "iterating" the pile in order to find its pair. This requires iterating over n/2…
amit
  • 170,887
  • 25
  • 222
  • 321
3561
votes
31 answers

Is floating point math broken?

Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
Cato Johnston
  • 40,793
  • 10
  • 38
  • 42
3398
votes
38 answers

What is dependency injection?

There have been several questions already posted with specific questions about dependency injection, such as when to use it and what frameworks are there for it. However, What is dependency injection and when/why should or shouldn't it be used?
AR.
  • 37,647
  • 9
  • 41
  • 51
2020
votes
39 answers

What's the difference between a method and a function?

Can someone provide a simple explanation of methods vs. functions in OOP context?
willc2
  • 37,421
  • 25
  • 85
  • 99
1917
votes
30 answers

What is tail recursion?

Whilst starting to learn lisp, I've come across the term tail-recursive. What does it mean exactly?
1811
votes
32 answers

Prefer composition over inheritance?

Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
readonly
  • 321,454
  • 105
  • 202
  • 204
1676
votes
28 answers

What is the difference between an abstract method and a virtual method?

What is the difference between an abstract method and a virtual method? In which cases is it recommended to use abstract or virtual methods? Which one is the best approach?
Moran Helman
  • 18,052
  • 4
  • 22
  • 22
1478
votes
11 answers

What are bitwise shift (bit-shift) operators and how do they work?

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it…
1447
votes
36 answers

Determine Whether Two Date Ranges Overlap

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap? As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2.
Ian Nelson
  • 53,359
  • 20
  • 73
  • 103
1342
votes
38 answers

What is the difference between concurrency and parallelism?

What is the difference between concurrency and parallelism? Examples are appreciated.
StackUnderflow
  • 21,940
  • 14
  • 53
  • 77
1173
votes
7 answers

Ukkonen's suffix tree algorithm in plain English

I feel a bit thick at this point. I've spent days trying to fully wrap my head around suffix tree construction, but because I don't have a mathematical background, many of the explanations elude me as they start to make excessive use of mathematical…
Nathan Ridley
  • 32,418
  • 32
  • 117
  • 192
1053
votes
15 answers

What is an idempotent operation?

What is an idempotent operation?
Will
  • 18,759
  • 10
  • 42
  • 41
988
votes
24 answers

What is the difference between a framework and a library?

What is the difference between a framework and a library? I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a…
anbanm
  • 12,671
  • 5
  • 21
  • 17
1
2 3
99 100