Most Popular

1500 questions
76
votes
9 answers

Why use partial classes?

In my understanding, the partial keyword does nothing but allow a class to be split between several source files. Is there any reason to do this other than for code organization? I've seen it used for that in generated UI classes. It seems a poor…
Michael K
  • 15,599
76
votes
11 answers

Is it really possible to decouple the UI from the business logic?

I'm reading about software architectures like Hexagonal architecture, Onion architecture etc. They put a big emphasis on decoupling. The business logic sits at the centre and the UI sits on the outside. The idea is that the UI should not touch the…
MSOACC
  • 935
76
votes
7 answers

Are stacks the only reasonable way to structure programs?

Most architectures I've seen rely on a call stack to save/restore context before function calls. It's such a common paradigm that push and pop operations are built-in to most processors. Are there systems that work without a stack? If so, how do…
76
votes
3 answers

Difference between hotfix and bugfix?

I know this is a very basic question but I cant seem to find the answer with Google. What is the difference between a hotfix and a bugfix?
Evanss
  • 933
76
votes
6 answers

Many small requests vs. few large requests (API Design)

I'm currently working on a project with an organization as follows: Client - Gets data from the main server via REST api. Server - Requests data from various other servers via third-party APIs Third-party APIs - Services out of my control that…
williamg
  • 861
76
votes
18 answers

In plain English, what is recursion?

The idea of recursion is not very common in real world. So, it seems a bit confusing to the novice programmers. Though, I guess, they become used to the concept gradually. So, what can be a nice explanation for them to grasp the idea easily?
Gulshan
  • 9,442
76
votes
3 answers

What is the difference between a Future and a Promise?

What is the difference between a Future and a promise? (In Akka and Gpars.) They look the same to me as both block and return the value of the future when get is called and a promise is to get the result of a future.
76
votes
5 answers

What are the benefits of using Dependency Injection and IoC Containers?

I'm planning to do a talk on Dependency Injection and IoC Containers, and I'm looking for some good arguments for using it. What are the most important benefits of using this technique, and these tools?
Andy Lowry
  • 2,392
76
votes
3 answers

Sets Data Structure in Golang

I really like google golang but could some one explain what the rationale is for the implementors having left out a basic data structure such as sets from the standard library?
cobie
  • 3,237
76
votes
15 answers

Is defining a variable to name a method argument a good practice?

For the sake of readability I often find myself defining temporary variables while calling functions, such as the following code var preventUndo = true; doSomething(preventUndo); The shorter version of this to this would be, doSomething(true); But…
76
votes
6 answers

When to use assertions and when to use exceptions?

Often when I write a functions I want to make sure the inputs to it are valid in order to detect such errors as early as possible (I believe these are called preconditions). When a precondition fails, I've always thrown an exception. But I'm…
gablin
  • 17,407
76
votes
56 answers

Worst coding standard you've ever had to follow?

Have you ever had to work to coding standards that: Greatly decreased your productivity? Were originally included for good reasons but were kept long after the original concern became irrelevant? Were in a list so long that it was impossible to…
finnw
  • 1,467
76
votes
6 answers

Is `catch(...) { throw; }` a bad practice?

While I agree that catching ... without rethrowing is indeed wrong, I however believe that using constructs like this: try { // Stuff } catch (...) { // Some cleanup throw; } Is acceptable in cases where RAII is not applicable. (Please, don't…
ereOn
  • 2,001
76
votes
7 answers

Dynamically vs Statically typed languages studies

Do there exist studies done on the effectiveness of statically vs dynamically typed languages? In particular: Measurements of programmer productivity Defect Rate Also including the effects of whether or not unit testing is employed. I've seen…
Winston Ewert
  • 24,862
75
votes
4 answers

What are the biggest differences between F# and Scala?

F# and Scala are both functional programming langugages that don't force the developer to only use immutable datatypes. They both have support for objects, can use libraries written in other languages and run on a virtual machine. Both languages…
Jonas
  • 14,867