2,280 reputation
1015
bio website
location Las Vegas, NV
age 49
visits member for 3 years, 11 months
seen 11 hours ago

I can be reached at lorenpechtel @ hotmail . com


Sep
25
answered Is there ever a reason to do all an object's work in a constructor?
Sep
24
awarded  Autobiographer
Sep
21
comment What is more efficient, a single square root or multiple divisions?
I suspect that's a matter of running out of registers.
Sep
18
comment Why do some languages round to the nearest EVEN integer?
@Profpatsch You could never accept random rounding in most situations because it means a non-deterministic result. For a game or simulation, though, it sounds like a good idea.
Sep
16
comment The importance of duplicate code removal
@IulianOnofrei I was making a joke about a question about duplication being marked a duplicate.
Sep
16
comment The importance of duplicate code removal
It's like the importance of duplicate question removal!
Sep
15
awarded  Guru
Sep
15
awarded  Good Answer
Sep
15
awarded  Enlightened
Sep
15
awarded  Nice Answer
Sep
14
answered Why do some languages round to the nearest EVEN integer?
Sep
13
comment What is more efficient, a single square root or multiple divisions?
The pre-computed square root is more efficient than the multiplication that must be done each time around the loop.
Sep
13
comment Function only returns unchanged parameter, useless?
I can see a legitimate case for this: It's one of a variety of methods, one of which will actually be used in any given case. You have to select a filter, this is a filter that does nothing. If the do-nothing case is uncommon it's probably cheaper to simply have a do-nothing function than to test if there's a function to do.
Sep
7
comment Difference between defect and bug in testing
Yup, many, many years ago I spent a while trying to fix a bug. I had some annoying flicker in one cell on the screen and it made no sense. It finally flew off. (This was in the era of white text on a black screen, the spot in question was far enough to the right to always be black while I was editing, thus I only noticed it when the program put some white behind it.)
Aug
28
comment Is there any danger in writing raw bytes to a file?
It depends on what you're doing. Sometimes the performance hit of SQL vs a roll-your-own is major. The last time I did it I had small records and there was a high chance I would want neighbors. Reading a bigger block off the disk would generally cost almost nothing so if I wanted one record I read 1000 into a cache. My records were almost certainly next to each other, with SQL the disk head would be bouncing all over the place.
Aug
19
comment What is the ideal length of a method?
@JohnR.Strohm I'm talking about per method, not overall. Sure, in the big picture it's highly correlated--the question is how to split that code up into methods. 10 methods of 100 lines or 100 methods of 10 lines will still have the same overall SLOC and complexity but the former is going to be a lot harder to work with.
Aug
17
comment How meaningful is the Big-O time complexity of an algorithm?
It depends on the complexity and the n. Below O(n^2) you can basically ignore it. Never write code above that without considering what the performance will be and profiling it for real-world n. (My personal highest was O(n^8), albeit somewhat sparse. 12 hour runtime on the real dataset. Going into it I knew that the task might prove infeasible.)
Aug
6
answered Dictionary vs List
Jul
29
answered Why was the first compiler written before the first interpreter?
Jul
29
answered What is the ideal length of a method?