Reputation
14,930
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
5 41 62
Newest
 Nice Answer
Impact
~347k people reached

Nov
20
comment Write C line by line
@MarkMessa: not impossible, but it drastically changes the cost/benefit trade-off.
Nov
20
comment Write C line by line
Keep in mind, a typical line of a mathematica notebook does TONS more stuff than a typical line of a C program.
Nov
20
comment Should one check for every little error in C?
@Alex: there is definitely an excuse for being lazy, and that is that there are a finite number of hours in the day and I need to prioritize what delivers maximum value for minimum cost. Time spent making a check for something that's pretty much never going to happen is time I can't spend doing other things that are more valuable to the end result.
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
28
awarded  Yearling
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.