3,419 reputation
926
bio website
location
age
visits member for 3 years, 5 months
seen Nov 16 at 12:29

Apr
11
asked Why do bitwise operators have lower priority than comparisons?
Feb
28
revised Try to find a word in the dictionary that has most letters given
conflicting variable names 'index'
Feb
28
answered Compiling multiple languages and Javascript
Feb
28
revised Try to find a word in the dictionary that has most letters given
added 205 characters in body
Feb
28
answered Try to find a word in the dictionary that has most letters given
Feb
26
comment How can I deal with a team member who dislikes making comments in code?
I'd say "give him a taste of his own medicine", task him with fixing/debugging/extending a piece of code some other non-commenting predecessor has left...
Feb
25
awarded  Constituent
Feb
25
awarded  Caucus
Feb
22
answered When would using a scripting language within a larger program be useful?
Jan
25
answered terms for the html/css/javascript model?
Jan
22
awarded  Pundit
Jan
22
comment Why does Internet Explorer have so many incompatibilities with other browsers?
The keyword is Embrace, Extend and Extinguish.
Jan
11
comment Recursion or while loops
@Giorgio: If it quacks like a duck? Using map you're using a system keyword that iterates [dictionary meaning] over all elements of a list. A loop based on Label:... if(condition) goto Label is non-obvious too for the same reason as recursion is non-obvious - but nobody does it nowadays.
Jan
11
comment Recursion or while loops
@Giorgio: map is still a loop ("foreach") keyword from the user's viewpoint, making it obvious toUpper works on a single element. (how compiler realizes it is besides the point)
Jan
11
comment Recursion or while loops
@Giorgio: In case of loop placed outside the function, calling it for each element, I don't need to look at the function body. char a[]="hello world; toUpperCase(a); - does it uppercase whole string or just its first character? I must open the function body. If I see char a[]="hello world; for(char *b = a; *b != '\0';b++){ toUpperCase(b); } I have no doubts.
Jan
11
comment Recursion or while loops
@Giorgio: You still talk about writing which takes 10% of the time. I'm talking about maintaining and debugging which is 90% time. If you debug a fragment of a program, and you see a function call, you really need to know whether it's a recursive loop over a whole range or whether the programmer just wants to modify the first element of a list/table/string and leave the rest untouched.
Jan
11
comment Recursion or while loops
@Giorgio: For WRITING yes, for YOU yes, but what about the person who is to maintain it after you? If they see a loop keyword, they know it's a loop. But there is no recurse keyword, they can recognize it only by seeing f(x-1) inside f(x). And now if you call g(x) in f(x), and then f(x-1) inside g(x), and only for the reason you didn't feel like writing a loop and thought to split the recursive function into two, called in sequence? Expect profanities.
Jan
11
answered Recursion or while loops
Jan
10
comment Creating huge decision tree
@DocBrown: Added a small fragment of the tree. The input module module-wide frame alone contains 6 different conditions, out of which only 3 were partially covered here, and that's not even starting on conditions of non-obvious origins!
Jan
10
revised Creating huge decision tree
Added picture