2,459 reputation
1216
bio website
location Las Vegas, NV
age 49
visits member for 4 years, 7 months
seen 4 hours ago

I can be reached at lorenpechtel @ hotmail . com


May
20
comment while(true) and loop-breaking - anti-pattern?
@supercat It's a little cleaner but I still wouldn't call that a really good answer.
May
19
comment Non-licensed source code later becomes licensed
@Brandin The lack of a stated license doesn't mean there's no license. By default it's protected.
May
14
comment What are linkers and loaders? How do they work?
The simplest loaders don't even have any fixup ability. I'm thinking of the old TRS-80. Executable files were simply address/size/data, repeated as needed (size was 1 byte so you normally needed multiple blocks.) You could even make splash screens by specifying a load address in video memory.
May
14
comment Is this a user story or a bug?
He's describing a bug at the design stage rather than the coding stage.
May
8
awarded  Nice Answer
May
8
comment Why Should I Avoid Inline Scripting?
Some pages can be static and yet of value--earlier today I was using a page with a calculator on it. Cacheable, yet useful. I do agree non-trivial Javascript doesn't belong on any dynamic page.
Apr
29
comment Should we always DRY? Any edge case examples of when not to?
Yeah. I find myself disgusted with the level of repetition I keep being forced to make in SQL code and to a lesser degree in code that works with the database.
Apr
17
comment Job Interview Challenges
@SebastianRedl You're assuming there is an xchg instruction in the underlying machine code. While I've never done embedded systems work my impression is that the languages are pretty simple.
Apr
12
comment My boss decided to add a “person to blame” field to every bug report. How can I convince him that it's a bad idea?
"Where's the fun in that?" -- only a sadist would ask a question like that.
Apr
10
answered Are null references really a bad thing?
Apr
6
answered Rethrow the same exception to provide more info
Mar
30
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.
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.