8,411 reputation
11738
bio website
location
age
visits member for 3 years, 9 months
seen 13 mins ago

Dec
24
comment How should I handle the Esc key in a “Press any key” screen?
This would be better on UX.
Dec
24
comment Safety-critical software and optimising compilers
One question you should be asking is whether or not the object code actually needs to be optimized. If it runs acceptably with the optimization turned off, then there's no reason to turn it on. Lots of compilers have thorough test suites, and we still find bugs in them.
Dec
23
comment Hash function with uniqueness guarantees and controllable entropy
Better hash functions produce fewer collisions and will come closer to it, but nothing which produces a digest any smaller than the data being hashed can guarantee uniqueness.
Dec
23
comment Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
@user31782: Processors don't have any notion of return type.
Dec
23
comment Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
@user31782: It shouldn't. There's a prototype for foo(), so the compiler knows what to do with it.
Dec
23
revised Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
Overhaul to address questioner's other concerns.
Dec
23
comment Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
@JamesMcLeod: What you're suggesting is that the questioner go find the answer elsewhere before asking the question.
Dec
23
comment Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
@user31782: The order of the code matters at compile time, but not at run time. The compiler is out of the picture when the program runs. By run time, the function will have been assembled and linked, its address will have been resolved and stuck into the call's address placeholder. (It's a little more complex than that, but that's the basic idea.) The processor can branch forward or backward.
Dec
23
answered Why is *declaration* of data and functions necessary in C language, when the definition is written at the end of the source code?
Dec
18
comment What's the etiquette on looking at the other person's email when pair programming?
This is more about pair anything-involving-a-computer and not programming specifically. The Workplace might be a better place for this.
Dec
16
comment How to define “or” logically
@gnat: To be fair, a truth table lists the outputs for each combination of the inputs and the Wikipedia article gives a description of the function. I think what the OP is really asking is how to define a logical OR programmatically without the use of the operator itself.
Dec
1
answered Lucene full text search of 6 million records
Nov
30
comment Should I avoid using 'break' during a coding interview?
No historically-significant version of Pascal (Niklaus Wirth's 1973 final report, ISO 7185 or ISO 10206) had break or continue. Several implementations added them, but they were never part of the design of the language.
Nov
29
revised Why do we have to tell printf() the type of data in C?
Typo
Nov
29
answered Why do we have to tell printf() the type of data in C?
Nov
29
comment Exposition of Data Representation
@justin: See my answer.
Nov
29
answered Exposition of Data Representation
Nov
28
comment Exposition of Data Representation
@justin: Slides 4 through 6 explain what happens when something exposed has to change. Consider the cost of having to change all of the now-broken code across one large system. Then think about thousands or millions of systems worldwide that need the same changes. Slide 9 explains why you want to do information hiding, and, indirectly, what costs you save by doing it.
Nov
28
revised Exposition of Data Representation
Added missing item from slide
Nov
28
revised Exposition of Data Representation
Added text from slide