Reputation
32,171
Next tag badge:
103/100 score
18/20 answers
Badges
8 64 123
Newest
 Yearling
Impact
~1.4m people reached

Sep
26
comment Is there any language-agnostic specification for “String Natural Sorting Order”
Are you asking about sort algorithms or sort order? Algorithms for sorting are well understood and widely implemented in every language you're likely to use. The particular order that you want to sort things into depends heavily on your situation, but is usually tied to the character set you're using.
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.
Aug
18
comment Where did the notion of 'calling' a function come from?
@Timo Although I can't point to the origin of the term, my goal with this answer was to get you closer to that point. Knowing that CALL shows up in this context in Fortran (created in 1954) should significantly narrow the search for the origin. Blrfl's comment above looks like a good bound on the early side, so together we've narrowed the time period in which the term seems to have come into use to a few years.
Aug
18
revised Where did the notion of 'calling' a function come from?
added 360 characters in body