Reputation
6,334
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
13 51
Newest
 Nice Answer
Impact
~265k people reached

2d
comment How much lines of code does a programmer write per day?
@l3n my main job is maintenance. And most of the times, bugs are solved by reducing complexity where you end up with less code then you originally had. And yes, reading code is how I spend most of my time.
Feb
7
comment How much lines of code does a programmer write per day?
-500 lines of code is when I'm doing well.
Feb
5
comment Use the chance to return booleans after method calls for an optional layer of exception handling?
are you trying to put each and every exception you get in a true false? That's bad. On the one hand you will cover an IllegalArgumentException but what if it is an InterruptedException, then you're in for a whole lot of trouble.
Feb
4
revised Efficient way in comparing two lists
Spelling corrections.
Feb
4
comment Efficient way in comparing two lists
Being afraid of premature optimization should not stop you from using the correct and efficient algorithm for the problem you're facing.
Feb
4
comment Why is it (or was it) important to separate CSS from HTML?
I don't like how you comment on answers by editing your question. Use the comment section of the answer for that. You're moving the goalposts if valid answers that you don't like come up.
Feb
3
comment Why is chaining setters unconventional?
The reason I don't like it, is that you're doing two things: changing your object and as a function: returning an instance of this object. Also you example smells a lot like a constructor, but that depends whether setting foo and bar is optional, because if you don't chain your foo and bar will be null, which may or may not be good. If they're required to be set, this is a bad way.
Feb
1
comment Is break a code smell?
That's not a guard clause, it's in the while loop. For it to be a guard clause it has to be at the start of the function, What if test changes during dostuff? This basically becomes a function with multiple returns, which makes it "smelly". I find this to be a very bad example of a guard-clause.
Feb
1
comment Why should I use a factory class instead of direct object construction?
Now you have the added flexibility and in theory your application can use Ethernet, COM, USB and serial, is ready for fireloop or whatever, in theory. In reality your app will only communicate over Ethernet....ever.
Jan
22
comment Enforcing order for two consecutive statements
if index <= 0 return false else return true?
Jan
21
comment INI files or Registry or personal files?
@CamelCase Inifile or registry key was already mentioned in the Question, but not Database. I didn't mean to say that you can't use multiple methods at the same time.
Jan
19
answered “Too object-oriented”
Jan
12
comment Isn't the use of NoSQL Databases impractical in a large number of use cases?
NoSQL: is just a "word" meaning roughly: an alternative to a relational database. This "category" is so wide, that you really can't do a NoSQL vs relational comparison. It's like comparing apples with NoApples and then choosing to only compare to bananas and forgetting there's also pears and a lot of other NoApple fruit.
Jan
9
comment Should I write automated unit tests that fail when the code changes?
Automated tests aren't meant to break when code changes. They're meant to ensure that when you change code that your code still works to spec, and if it doesn't THEN fail.
Jan
8
comment How do I have a group of numbers which total does not exceed a limit, and each number must be >= 0?
the first row [100,200,300,500] sums up to 1100, not 1000.
Jan
6
comment Does simplicity always improve Readability?
Two common pitfalls for programmers: making simple tasks complex. But also simple solutions for complex problems.
Jan
4
comment Executing queries against multiple separate database instances
Are you trying to implement replication, a feature that Oracle already supports?
Jan
4
comment Does making a method static save memory on a class you'll have many instances of?
@JacquesB it was meant semiseriously.
Jan
3
comment Does making a method static save memory on a class you'll have many instances of?
Ins't the answer to every OO related question: Dependency Injection? If you're bothered about the memory overhead you could just design a "saver" object of which you make one instance, that can be injected....
Dec
28
comment Doesn't “always initialize variables” lead to important bugs being hidden?
And initializing with -1 can be actually meaningful. Where "int bytes_read = 0" is bad, because you can actually read 0 bytes, initializing it with -1 makes it very clear no attempt to read bytes has succeeded, and you can test for that.