Reputation
462
Top tag
Next privilege 500 Rep.
Access review queues
Badges
5 11
Newest
 Nice Answer
Impact
~9k people reached

Feb
4
awarded  Nice Answer
Dec
24
awarded  Yearling
Dec
24
revised If this is camelCase what-is-this?
added 648 characters in body
Dec
23
comment How to enforce good/better source code control practices?
Please, nobody implement this idea.
Dec
23
comment How to enforce good/better source code control practices?
...But it also (3) has the potential to destroy hours of work if someone forgets to check in code, or accidentally doesn't for some reason and (4) demonstrates to the devs that management does not trust them to follow rules, instead imposing the rules in a draconian manner, potentially making it an us-vs-them environment and (5) it has the potential to encourage them to circumvent the rules just to be productive.
Dec
23
comment How to enforce good/better source code control practices?
Wow, this is a terrible idea for so many reasons. As already mentioned in the comments above, (1) it prevents any possibility of continuity from day to day and (2) denies people the ability to set up custom dev environments that stick around...
Oct
21
comment Environment that enables variable constraint checking and creation
I think your first method you showed, before your progressions, was the best. I think you are vastly underestimating the power in simplicity here. I think that method is actually the most maintainable.
Jul
22
comment Started wrong with a project. Should I start over?
@Aaronaught, take it easy. Of course nobody takes that phrase at face value. It's just word play.
Jul
14
comment Designing database related methods, which is better to return: true/false or row affected?
That said, if your requirements change in the future end you do end up needing more information about the operation aside from success/failure, the method outlined in this answer is an excellent way to encapsulate the information.
Jul
14
revised Designing database related methods, which is better to return: true/false or row affected?
edited body
Jul
14
comment Designing database related methods, which is better to return: true/false or row affected?
@HoangTran, don't underestimate the cost of a "little more code". I downvoted this answer because that's actually one of the most costly things you can do. Even though in absolute terms the complexity here is not very much, compared to the possible alternatives this answer is actually significantly more complex. Image if you made everything this much more complex than you have to. Then you end up with a whole program significantly more complex than it has to be. This answer violates KISS and YAGNI and is not the right approach (see my answer for a more detailed explanation of this point).
Jul
14
answered Designing database related methods, which is better to return: true/false or row affected?
Jul
7
comment Why is a private member accessible in a static method?
BTW, this isn't a feature of OOP across the board, but rather a particular style of OOP where factories are common. Ruby, for example, is a highly OOP paradigm but a port of the above code would not work, throwing an exception when attempting to use the private member accessors. And factories are a very rare phenomenon in Ruby code. Goes hand in hand.
Jul
3
comment Do Rails Join Models Get Controllers?
You outlined exactly the right approach.
Apr
8
comment Are there flavours of OOP where some or all of the SOLID principles are antithetical to clean code?
I agree. I think the correct principle(s) to follow clearly depend on the situation, but aside from hard performance requirements, which always rank above everything else (this matters especially in game development), I tend to think DRY and KISS are usually both more important than SOLID. Of course, the more clean you make the code the better, so if can follow all the principles without conflicts, all the better.
Apr
8
comment Why is “Select * from table” considered bad practice
Wow, the accepted answer was so poor at actually explaining anything that I down-voted it. Amazed that this isn't the accepted answer. +1.
Mar
10
comment Is it conventional to raise a NotImplementedError for methods whose implementation is pending, but not planned to be abstract?
+1, but I'd also add that for this kind of convention, a little documentation can go a long way. Like a one-line note in a dev wiki, repo readme, or style guideline -- something like that -- explaining what you use this exception for.
Feb
24
comment How did separation of code and data become a practice?
@cHao, I actually agree with you entirely. I was just trying to clarify Euphoric's point, since the discussion was sidetracked by a poor example. Even though I don't really agree with said point, it is a worthy of consideration, which is why I thought it was a good idea to clarify it.
Feb
24
comment How did separation of code and data become a practice?
@cHao, forget about i18n and the vowels example. The point is you'd be surprised how often something you think is constant to you program and will never change turns out to be something you need to be able to modify or configure.
Feb
23
comment Does this justify goto statements?
+1, was just about to post this answer, and believe this should be the accepted answer. I can't believe the accepted answer got accepted because that method only works for a specific subset of nested loop algorithms, and doesn't necessarily make the code much cleaner. The method in this answer works generally.