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

Dec
3
answered Read data from a device through usb port at high frequency
Dec
2
comment Extensible way to create bash program
My "XY problem" meter is hovering in the red.
Nov
26
comment How did the gets function ever make into the standard?
Things were a lot different in 1972.
Nov
24
comment Would UTF-8 be able to support the inclusion of a vast alien language with millions of new characters?
You're lacking in imagination. Dance choreographers have plenty of language and terminology they can use to describe and teach the dances the stage actors are to perform. If we were to learn what bees were communicating, we could definitely devise a written terminology for it. After all, most of our written languages today are an encoding of sound. Encoding movement isn't all that different from encoding sound.
Nov
22
comment How to avoid violating the SRP in a class to manage caching?
In the future you'd be better off with "widget" instead of fluffy for future similar questions, as a widget is understood to be a non-particular stand in for examples.
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?