tagged [language-agnostic]

Database, Table and Column Naming Conventions?

Database, Table and Column Naming Conventions? Whenever I design a database, I always wonder if there is a best way of naming an item in my database. Quite often I ask myself the following questions: ...

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

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 oper...

When do you design the GUI first and the backend code later, or vice versa?

When do you design the GUI first and the backend code later, or vice versa? When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but othe...

9 Oct at 09:51

Way to go from recursion to iteration

Way to go from recursion to iteration I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/spee...

What is the difference between value types and primitive types?

What is the difference between value types and primitive types? Reading a book about C# I noticed that sometimes is mentioned value type and sometimes primitive type for some data type (e.g. int, doub...

15 Nov at 08:29

When to use unsigned values over signed ones?

When to use unsigned values over signed ones? When is it appropriate to use an unsigned variable over a signed one? What about in a `for` loop? I hear a lot of opinions about this and I wanted to see ...

7 Jul at 15:23

how to always round up to the next integer

how to always round up to the next integer i am trying to find total pages in building a pager on a website (so i want the result to be an integer. i get a list of records and i want to split into 10 ...

31 Jan at 00:29

How to parse relative time?

How to parse relative time? This question is the other side of the question asking, "[How do I calculate relative time?](https://stackoverflow.com/questions/11/how-do-i-calculate-relative-time)". Give...

22 Apr at 16:0

Interface vs Base class

Interface vs Base class When should I use an interface and when should I use a base class? Should it always be an interface if I don't want to actually define a base implementation of the methods? If ...

What is the difference between concurrent programming and parallel programming?

What is the difference between concurrent programming and parallel programming? What is the difference between concurrent programming and parallel programing? I asked google but didn't find anything t...

Why are function pointers not considered object oriented?

Why are function pointers not considered object oriented? In the C# language specifications it explicitly states: > Delegates are similar to the concept of function pointers found in some other lang...

20 Apr at 17:45

Resources for getting started with web development?

Resources for getting started with web development? Let's say I woke up today and wanted to create a clone of StackOverflow.com, and reap the financial windfall of millions $0.02 ad clicks. Where do I...

6 May at 20:26

How to minimize bugs invoked by programmer's manual input?

How to minimize bugs invoked by programmer's manual input? Sometimes all we have to work with manual input, not relying on Intellisense - with components, XML, other declarative things, strings, dynam...

28 Aug at 07:15

Why shouldn't I use "Hungarian Notation"?

Why shouldn't I use "Hungarian Notation"? I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, ev...

How do libraries in different programming languages handle Date & Time, Timestamps & Durations, Leapseconds & -years, DSTs & Timezones, ...?

How do libraries in different programming languages handle Date & Time, Timestamps & Durations, Leapseconds & -years, DSTs & Timezones, ...? Is there a standard body or a specific normative way how ti...

23 Sep at 07:47

Is a double really unsuitable for money?

Is a double really unsuitable for money? I always tell in c# a variable of type double is not suitable for money. All weird things could happen. But I can't seem to create an example to demonstrate so...

25 Nov at 10:52

Difference between Hashing a Password and Encrypting it

Difference between Hashing a Password and Encrypting it The current top-voted to [this question](https://stackoverflow.com/questions/325862/what-are-the-most-common-security-mistakes-programmers-make)...

Why are const parameters not allowed in C#?

Why are const parameters not allowed in C#? It looks strange especially for C++ developers. In C++ we used to mark a parameter as `const` in order to be sure that its state will not be changed in the ...

15 Jan at 12:35

Should I throw on null parameters in private/internal methods?

Should I throw on null parameters in private/internal methods? I'm writing a library that has several public classes and methods, as well as several private or internal classes and methods that the li...

Good Practice: Loop And If statement

Good Practice: Loop And If statement [https://codereview.stackexchange.com/questions/1747/good-practice-loop-and-if-statement](https://codereview.stackexchange.com/questions/1747/good-practice-loop-an...

13 Apr at 12:40

Getting parts of a URL (Regex)

Getting parts of a URL (Regex) Given the URL (single line): [http://test.example.com/dir/subdir/file.html](http://test.example.com/dir/subdir/file.html) How can I extract the following parts using reg...

13 Jan at 11:34

C# logic order and compiler behavior

C# logic order and compiler behavior In C#, (and feel free to answer for other languages), what order does the runtime evaluate a logic statement? Example: Which statement does the runtime evaluate fi...

Shortest distance between a point and a line segment

Shortest distance between a point and a line segment I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want;...

Why are relational set-based queries better than cursors?

Why are relational set-based queries better than cursors? When writing database queries in something like TSQL or PLSQL, we often have a choice of iterating over rows with a cursor to accomplish the t...

Simple Deadlock Examples

Simple Deadlock Examples I would like to explain threading deadlocks to newbies. I have seen many examples for deadlocks in the past, some using code and some using illustrations (like the famous [4 c...