31,008 reputation
862120
bio website none
location United States
age
visits member for 3 years, 6 months
seen Sep 19 at 8:27

profile for Caleb on Stack Exchange, a network of free, community-driven Q&A sites


You: Do you know Jon Skeet?

Expert: I once tried to convince the community, it worked remarkably well.

You: Do you know Joel Spolsky?

Expert: I know joel spolsky to a certain degree at least.

You: Does he treat you well?

Expert: :)

You: What is it like to work at Stack Exchange?

Expert: The answer is pretty complicated.

You: I'm listening.

Expert: I used to know someone who was listening.


Sep
16
revised Returning void from a function specified to return int
added 13 characters in body
Sep
16
comment Returning void from a function specified to return int
@mattnz It seemed to me that the OP was asking for an explanation of his/her personal experience rather than a definitive description of how all standards-compliant C compilers are expected to behave, although you're certainly free to write your own answer from that perspective. I mentioned GCC as an example (I'll edit to make that clear) because despite the existence of other compilers, GCC is very popular and widely available.
Sep
15
answered Returning void from a function specified to return int
Sep
8
comment Is it correct to keep version numbers of all components always the same?
What's the point of giving each component its own version number if it doesn't indicate the version of that component? If the "version" really just indicates the version of the overall application that that component belongs to, that's fine, but you should make it clear that the number is the app version, not the component version. And as you say, any update to any component means that you have to release new versions of everything, which sort of defeats the point of a component architecture in the first place.
Sep
3
comment Beginning a sentence with a function name?
This question appears to be off-topic because it is English language and usage, and we have an entire StackExchange site for that. Indeed, there are at least four similar questions there. Also, different answers may be equally valid depending on where the writing appears, etc.
Aug
27
comment Is there any danger in writing raw bytes to a file?
Agree in general, but JSON or XML would significantly increase the size of a file containing 10^7 numbers. Also, they're generally read and parsed all at once, but the chapter in question deals with sorting files containing more data than you can fit in available memory.
Aug
27
comment Is there any danger in writing raw bytes to a file?
Note that Programming Pearls is a very old book; you could easily read the entire 10^7 integers into memory on a modern desktop machine, do the sort, and write it again. To get the original point of that chapter, limit the amount that you read at any time to a fraction of the total number. Or, increase the file size to around 10^10 integers.
Aug
27
comment Is there any danger in writing raw bytes to a file?
+1 for the last line. I'm not sure the big/little issue is the only problem -- the OP could for example get confused about where the boundaries between integers is. But good answer anyway.
Aug
25
revised Try and catch error trapping, why is it so significant?
added 1278 characters in body
Aug
25
answered Try and catch error trapping, why is it so significant?
Aug
21
awarded  Enlightened
Aug
21
awarded  Nice Answer
Aug
21
revised Where did the notion of 'calling' a function come from?
added 313 characters in body
Aug
20
comment Where did the notion of 'calling' a function come from?
@BasileStarynkevitch I don't disagree with you about λ-calculus, but note that the Wikipedia entry for that term uses "call" in several places to explain what it means to apply a function.
Aug
18
comment When is type testing OK?
See also: When to use run-time type information?
Aug
18
comment When is type testing OK?
OK means allowable, acceptable, etc., but not necessarily ideal or optimal. Contrast with not OK: if something is not OK then you shouldn't do it at all. As you indicate, the need to check the type of something can be an indication of deeper problems in the code, but there are times when it's the most expedient, least bad option, and in such situations it's obviously OK to use the tools at your disposal. (If it were easy to avoid them in all situations, they probably wouldn't be there in the first place.) The question boils down identifying those situations, and never doesn't help.
Aug
18
comment Where did the notion of 'calling' a function come from?
@LarsViklund I think that's the point -- had the term call been in use at that time the paper was written, it surely would have been used. Therefore, the paper provides some evidence that the term probably came into use between then and Fortran II.
Aug
18
comment When is type testing OK?
If by "never" you actually mean "sometimes," then you're right.
Aug
18
comment When is type testing OK?
Here's a concrete example: the top-level container in a JSON response from a web service can be either a dictionary or an array. Typically, you have some tool that turns the JSON into real objects (e.g. NSJSONSerialization in Obj-C), but you don't want to simply trust that the response contains the type that you expect, so before using it you check it (e.g. if ([theResponse isKindOfClass:[NSArray class]])...).
Aug
18
comment Where did the notion of 'calling' a function come from?
@Blrfl Great link -- thanks for that. Also: Just guessing, but the term CALL w.r.t. a subroutine might be related to the English meaning of call [on] as making a brief visit, as in I called on the Smiths today. We don't often use the word that way today (unless you watch a lot of period TV/movies), but it wasn't uncommon back in the 1940's and 1950's.