2,419 reputation
1215
bio website
location Las Vegas, NV
age 49
visits member for 4 years, 5 months
seen yesterday

I can be reached at lorenpechtel @ hotmail . com


1d
comment Source file shouldn't be more than 100 SLOC
I'm looking at a routine with over 400 lines right now--and I don't have a problem with it. It's a massive switch statement that parses a configuration file. Most of the lines assign a value into a variable, some have to parse out multiple parameters. Sure, I could replace much of it with a big table of parameters and routines but generally I consider such approaches harder to read. Such things are rare but there are no elegant answers to dispatchers.
2d
comment Error: Code too big for 64k
There's almost no reason for a class so big that it goes over a 64k limit. It sounds like you're trying to put everything in one class rather than call other classes to do part of the work.
Mar
12
revised Should one check for null if he does not expect null?
added 100 characters in body
Mar
1
comment Bad sign if nobody can comprehend one's code?
@Craig That's why I said it was probably an unreasonable one.
Feb
28
comment Bad sign if nobody can comprehend one's code?
Assuming the second example produces the same result I can see a reason for it: The conditional form generates a branch, the complex form does not--the cache dump from a failed branch prediction is a lot more expensive than the extra code. Thus this is an optimization--most likely an unreasonable one. It certainly should be documented what's going on.
Feb
16
comment What is the rule for nested loop code?
There's no special rule for nested loops. They always need to be looked at with a bit of caution because it's easy to write something very slow with mutiply-nested loops but if that's truly what you need you do it anyway. I've got 8 levels deep once in a dataset verification issue--it took 12 hours and the only reason it could run at all was the tree got very heavily pruned on the second level.
Feb
10
answered C# if statements
Feb
1
answered A practical use of “yield” keyword in C#
Jan
30
comment Hard Coded File Paths - Solution?
My inclination here would be to simply make each path part of the configuration the program loads at startup.
Jan
25
comment Sudoku hidden sets algorithm
@DocBrown While I'm not seeing a rebuttal off the top of my head it must exist--otherwise there would be no reason to look for hidden sets as they would always be revealed by finding the naked sets.
Jan
24
revised Sudoku hidden sets algorithm
added 519 characters in body
Jan
23
answered Sudoku hidden sets algorithm
Jan
20
comment Is address 0000000C a special address?
@delnan Good point, but there can still be object metadata.
Jan
20
comment Is address 0000000C a special address?
@delnan If your pointer is actually a null and you skip over some header data to get to the body...
Jan
20
comment Is address 0000000C a special address?
@delnan Remember that some systems put some pointers in front of a memory allocation in order to keep track of the heap.
Jan
20
comment Is address 0000000C a special address?
@delnan You misunderstand. I'm wondering if this is a reference to zero where the first 12 bytes are something other than user data.
Jan
20
comment Is address 0000000C a special address?
Just a guess here--could the first bytes be used with tracking memory allocations, thus making 12 the first real address in some language?
Jan
9
comment Why would a program require a specific minimum number of CPU cores?
@reirab Boost it's priority.
Jan
8
answered Why would a program require a specific minimum number of CPU cores?
Jan
7
comment Why is there little use of filesharing as compression (outside of libraries)?
@Ordous If done correctly that's not a problem--do a copy-on-write system. Now, if it did it across drives, though--can you say "backup eater"?