Reputation
1,488
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 14
Newest
 Enlightened
Impact
~214k people reached

  • 0 posts edited
  • 0 helpful flags
  • 140 votes cast
Mar
19
comment Static functions vs classes
Utilities without business logic often don't have a good OO solution and the best you can do is static classes and fixed classes like collections. If you really must do a general purpose utility you might as well abandon oo like collections, math util and all the other utilities do. In this case, he probably is just using one collection for his business code so why implement a general solution?
Mar
18
answered Static functions vs classes
Mar
18
answered Is it ok to break the “is a” relationship if I just want part of a class' functionality?
Jan
19
revised Does the use of debuggers have an effect on the efficiency of programmers?
added 44 characters in body
Jan
16
revised Is it always a best practice to write a function for anything that needs to repeat twice?
added 218 characters in body
Jan
15
answered Is it always a best practice to write a function for anything that needs to repeat twice?
Jan
12
awarded  Enlightened
Jan
12
awarded  Nice Answer
Jan
9
revised Never use Strings in Java?
added 83 characters in body
Jan
7
revised Taming the 'utility functions' classes
added 101 characters in body
Jan
7
revised Taming the 'utility functions' classes
added 218 characters in body
Jan
6
answered Taming the 'utility functions' classes
Nov
15
comment Why would a company develop an atmosphere which discourage code comments?
It's all about how long it takes to comprehend the code afterwards. If having a comment makes it quicker for someone else to pick up the code and understand it, you should put them in there. The time taken to write and maintain them is completely irrelevant, most coding time (by far) is spent understanding with existing code and dealing with problems caused by a lack of understanding existing code. If you don't believe me, count the LOC in your project and divide by man hours to see how much actual code is typed an hour over the life of a project--it's not as much as you think.
Nov
15
comment Why would a company develop an atmosphere which discourage code comments?
On the other hand, I really love (not sarcastically) the requirement tracking comment referencing back into the requirement that inspired the code. I've used it a few times to find out why something was done a specific way to help me decide if a certain change was viable or not--also when the requirements change being able to track where in the code existing parts of the requirement were implemented is really a time saver.
Nov
14
comment How can Swift be so much faster than Objective-C in these comparisons?
This answer doesn't hold water at all and is horribly misleading. OO is not really slow, in fact the fastest systems you'll find around are going to be C++, Java and C# and the style (heavily OO or not) of programming will have very little to do with the resultant speeds unless you have really bad code.
Nov
14
comment How can Swift be so much faster than Objective-C in these comparisons?
@syrion I thought about the python thing too. I think the point is to avoid comparison with a fast language. Python is one of the faster scripting languages I've seen around, but last time I checked it was still 10x slower than Java and 20x slower than C for most stuff. If they were to stick either of those in there Swift wouldn't have looked quite as swift.
Nov
10
answered Can objects constructed from the same class have unique method definitions?
Oct
30
comment Use constructor or setter method?
I would say that if it needs to be set for your object to be valid, put it in every constructor... if it's optional (has a reasonable default) and you don't care about immutability, put it in a setter. It should be impossible to instantiate your object into an invalid state or after instantiation put it into an invalid state wherever possible.
Oct
8
revised Do objects with validation logic in their domain really represent their real world counterparts?
added 36 characters in body
Oct
7
answered Do objects with validation logic in their domain really represent their real world counterparts?