Reputation
14,650
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
5 41 61
Newest
 Good Answer
Impact
~326k people reached

Nov
18
comment Does the Factory Pattern violate the Open/Closed Principle?
How's your factory going to decide which pointer to use? Eventually you have to make a decision.
Nov
18
comment Is measuring the binary size of a c++ program a good indication of code complexity? Or something else?
Plenty of programs can have resources embedded in them such as images, icons, and sounds, which will trivially destroy any naive binary size->complexity relationship.
Nov
17
comment Should one check for every little error in C?
@TMN: If malloc failed the program would immediately segfault and terminate, it wouldn't carry on doing stuff. It's all about risk and what's appropriate, not "almost never".
Nov
17
comment Should one check for every little error in C?
I think the gazillions of programs that never bother to check their malloc calls and yet never crash is a good reason to be lazy when a desktop program only uses a few MBs of memory.
Nov
15
comment Is recursion a bad idea for large input sizes due to the limited call stack size?
I think that if you are dealing with input sizes of millions or billions, on a web page, you are going to be having all kinds of problems.
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
@PiotrFalkowski: How does the class actively "manage" the download? What does "management" even mean?
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
Because it's basically 20 lines of boilerplate that wrap what could reasonably be accomplished in 3 with no loss of clarity. The class doesn't even "manage" anything by virtue of controlling data through it, all it does is blindly pass-through.
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
The class is only "definitely reusable" because it doesn't do anything of any significance.
Nov
11
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
Just seeing "Manager" in the title makes me immediately suspicious.
Nov
4
comment In general, is it worth using virtual functions to avoid branching?
an O(1) operation isn't necessarily faster in real-world execution time than an O(n) or even O(n^20).
Nov
3
comment Who should read Exception.Message if at all?
I don't agree with the bold claim of "Never". I think it depends on what the exception type is. There are plenty of situations where specific exception types can carry messages to be shown to the user, as the alternative is tons of boilerplate code.
Oct
28
comment Use of electronics in programming
@RichardTingle: I write software for medical devices for a living, and often have to use a scope to debug stuff. You're telling me my electronics knowledge is not even slightly important to my abilities?
Oct
27
comment develop crossplatform GUI based DESKTOP application with HTML5/CSS
Just use winforms already. Everything html/css is just one hackjob piled upon another.
Oct
22
comment How can I represent a flowchart, complete with conditional logic using JSON or XML?
Look at graphviz and the dot language.
Oct
18
comment What are the advantages of matrix multiplication over individual variables (graphics)?
You're incorrect in thinking you can do less with non-matrix math. Matrices are ultimately just a way of ordering the required informarion. If you use '6 floats' you'll just end up reinventing the operations provided by the matrix model. You're forgetting about the z axis.
Oct
16
comment When are enums NOT a code smell?
Not everyone works on huge enterprises systems where every class has 20 layers of inheritance.
Oct
8
comment Does context (like as an argument in a function) allow for numbers in code that aren't magic numbers?
@SimonB: numeric literals aren't necessarily magic numbers. There are situations where numeric literals are the best option.
Oct
8
comment Does context (like as an argument in a function) allow for numbers in code that aren't magic numbers?
@KilianFoth: I would not say it's particularly likely. Requirements changes have the annoying behavior of changing where you don't expect and staying frozen where you do.
Oct
2
comment Classes with one public function replaced with a constructor
You might as well just have a static function
Sep
25
comment What are the key differences between low-level C development and higher level OOP development?
Is the OP interested in comparing low-level close to the metal development with high-level application development, or programming in C vs OOP languages? C development isn't necessarily low-level and you can talk close to the metal in higher level languages.