Top "Language-agnostic" questions

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

Understanding "randomness"

I can't get my head around this, which is more random? rand() OR: rand() * rand() I´m finding it a …

math language-agnostic random
O(N log N) Complexity - Similar to linear?

So I think I'm going to get buried for asking such a trivial question but I'm a little confused about …

language-agnostic complexity-theory quicksort
Unique (non-repeating) random numbers in O(1)?

I'd like to generate unique random numbers between 0 and 1000 that never repeat (i.e. 6 doesn't show up twice), but that …

algorithm math random language-agnostic
Design Patterns: Factory vs Factory method vs Abstract Factory

I was reading design patterns from a website There I read about Factory, Factory method and Abstract factory but they …

java design-patterns language-agnostic factory factory-method
What is the difference between a map and a dictionary?

I know a map is a data structure that maps keys to values. Isn't a dictionary the same? What is …

dictionary data-structures language-agnostic key-value
Inheritance vs. Aggregation

There are two schools of thought on how to best extend, enhance, and reuse code in an object-oriented system: Inheritance: …

oop inheritance language-agnostic aggregation
Real world use cases of bitwise operators

What are some real world use cases of the following bitwise operators? AND XOR NOT OR Left/Right shift

language-agnostic bitwise-operators
Get the application's path

I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed …

language-agnostic path
Fast rectangle to rectangle intersection

What's a fast way to test if 2 rectangles are intersecting? A search on the internet came up with this one-liner (…

javascript c++ language-agnostic graphics
Generate colors between red and green for a power meter?

I'm writing a Java game and I want to implement a power meter for how hard you are going to …

language-agnostic graphics colors interpolation