5,517 reputation
1246
bio website
location
age
visits member for 2 years, 10 months
seen 1 hour ago

1d
comment Is my boss's preference for Latin-1 over UTF-8 when it comes to database configuration justified?
How much of you codebase would break when converting to UTF-8 ?
2d
comment Are there any benefits of using this extra variable in the for loop annotation?
@neil this I don't see as optimization but as common sense: if you're going to get a value that you know won't change, then only get it once.
2d
comment Are there any benefits of using this extra variable in the for loop annotation?
Thing is, if your array is a million items, you're going to call array.length a million times instead of 1 time while the value stays the same. Asking something a million times and knowing that each subsequent answer will be the same as the first answer......just sounds a bit nonsensical to me.
2d
comment Are there any benefits of using this extra variable in the for loop annotation?
In reaction to you edit: this is object oriented programming. Standard array.length is fast and cheap. But for whatever reason, the implementation of .length could change to something expensive. If a value stays the same then don't get it multiple times.
2d
answered Are there any benefits of using this extra variable in the for loop annotation?
Jan
27
awarded  Civic Duty
Jan
27
comment Why does this algorithm work in O(n m)?
The complexity is both O(n*m) and O(n^2) because m is a linear function of n.
Jan
26
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
@supercat nice, thanks for the extra info about Java.
Jan
26
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
In c# and delphi at least an abort still triggers the code in the finally block.
Jan
26
answered Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
Jan
25
comment Throw exception or let code fail
On another note: This pattern is ok for sometimes adding an item to a list. Do not however use this pattern for filling an entire list because you will run into a O(n^2) situation where with large lists you will run into performance issues. You won't notice it at 100 entries but at 1000 entries you certainly and at 10.000 entries it will be a major bottleneck.
Jan
23
answered Do I need use really INNER JOIN?
Jan
21
awarded  Good Question
Jan
20
awarded  Notable Question
Jan
20
comment One of my team members committed SQL injection-vulnerable code; should I report it to the manager?
You should have mentioned it was a hotfix. Under severe time-constraints and pressure people make mistakes they normally would not. So you can report and blame your coworker which is easy, or blame the process that got a normally fine programmer to make such a mistake in the first place.
Jan
20
awarded  Nice Question
Jan
20
comment Why sacrificing good software engineering practices is typically the first choice for software development projects assuming “good enough” quality
@ThomasOwens that's your opinion.
Jan
20
comment Why sacrificing good software engineering practices is typically the first choice for software development projects assuming “good enough” quality
@ThomasOwens you don't want to know how many "throwaway" prototypes are actually sold as a product.
Jan
20
awarded  Popular Question
Jan
20
comment Why sacrificing good software engineering practices is typically the first choice for software development projects assuming “good enough” quality
Maybe because the costs of non-optimal software development are actually lower then the costs of doing it the "proper" way.