Most Popular

1500 questions
54
votes
3 answers

What is constructor injection?

I have been looking at the terms constructor injection and dependency injection while going through articles on (Service locator) design patterns. When I googled about constructor injection, I got unclear results, which prompted me to check in…
TheSilverBullet
  • 1,091
  • 1
  • 11
  • 22
54
votes
10 answers

Are flag variables an absolute evil?

Are flag variables evil? Are the following kind of variables profoundly immoral and is it wicked to use them? "boolean or integer variables that you assign a value in certain places then down below you check then in orther to do something or not,…
dukeofgaming
  • 13,943
  • 6
  • 50
  • 77
54
votes
3 answers

Visual Studio 2012 - Express vs Professional

I'm having trouble finding a feature comparison between Visual Studio 2012 Express Edition and the professional edition. I'm using the trial Professional version at the moment, but it'll run out soon, so I need to make a decision whether to purchase…
Dan
  • 651
  • 1
  • 5
  • 8
54
votes
5 answers

Is "convention over configuration" not violating basic programming principles?

I was looking at the WPF MVVM framework Caliburn.Micro and read that a lot of standard things are based on naming conventions. For example, automatic binding of properties in the View to properties in the ViewModel. Although this seems to be…
Geerten
  • 1,135
  • 1
  • 8
  • 12
54
votes
7 answers

Is there something wrong with how we're doing version control?

I work with a team of programmers as the business analyst. We just released version 2.0 of our product and are working on the next version to be released in 3 months (it's an internal software product). Unfortunately version 2.0 has some issues…
Ryan
  • 1,105
  • 1
  • 10
  • 17
54
votes
2 answers

Why is 'void' not allowed as a generic type in C#

What were the design decisions that argued in favour of void not being constructable and not being allowed as a generic type? After all it is just a special empty struct and would have avoided the total PITA of having distinct Func and Action…
user23157
54
votes
11 answers

Were the first assemblers written in machine code?

I am reading the book The Elements of Computing Systems: Building a Modern Computer from First Principles, which contains projects encompassing the build of a computer from boolean gates all the way to high level applications (in that order). The…
The111
  • 713
  • 1
  • 6
  • 11
54
votes
9 answers

Why is it impossible to produce truly random numbers?

I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to read about random number generation. It has the…
Vinoth Kumar C M
  • 15,455
  • 23
  • 57
  • 86
54
votes
7 answers

SQL Triggers and when or when not to use them.

When I was originally learning about SQL I was always told, only use triggers if you really need to and opt to use stored procedures instead if possible. Now unfortunately at the time (a good few years ago) I wasn't as curious and caring about…
John Mitchell
  • 651
  • 1
  • 6
  • 7
54
votes
3 answers

What is the origin and meaning of the phrase “Lambda the ultimate?”

I've been messing around with functional programming languages for a few years, and I keep encountering this phrase. For example, it is a chapter of "The Little Schemer, which certainly predates the blog by this name. (No, the chapter doesn't help…
Eric Wilson
  • 12,071
  • 9
  • 50
  • 77
54
votes
4 answers

What does the 'cyclomatic complexity' of my code mean?

I am new to static analysis of code. My application has a Cyclomatic complexity of 17,754. The application itself is only 37,672 lines of code. Is it valid to say that the complexity is high based on the lines of code? What exactly is the Cyclomatic…
AngryBird
  • 1,805
  • 5
  • 17
  • 22
53
votes
10 answers

What's a schrödinbug?

This wiki page tells : A schrödinbug is a bug that manifests only after someone reading source code or using the program in an unusual way notices that it never should have worked in the first place, at which point the program promptly stops…
Pacerier
  • 4,973
  • 7
  • 39
  • 58
53
votes
13 answers

Is it necessary to create a database with as few tables as possible

Should we create a database structure with a minimum number of tables? Should it be designed in a way that everything stays in one place or is it okay to have more tables? Will it in anyway affect anything? I am asking this question because a…
Shaheer
  • 889
  • 1
  • 7
  • 14
53
votes
2 answers

What did Alan Kay mean by "assignment" in The Early History of Smalltalk?

I have been reading The Early History of Smalltalk and there are a few mentions of "assignment" which make me question my understanding of its meaning: Though OOP came from many motivations, two were central. The large scale one was to find a…
53
votes
9 answers

Why are pointers not recommended when coding with C++?

I read from somewhere that when using C++ it is recommended not to use pointers. Why is pointers such a bad idea when you are using C++. For C programmers that are used to using pointers, what is the better alternative and approach in C++?
Joshua Partogi
  • 3,845
  • 11
  • 34
  • 43