Reputation
3,448
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 11 32
Newest
 Nice Answer
Impact
~194k people reached

Jan
24
comment Is the number of bugs in a section of code proportional to the # of lines ? The square of the # of lines ?
Far, far more likely, it's proportional to the skill of the person who coded it, adjusted for complexity of what that code is intending to do.
Jan
24
comment Is the number of bugs in a section of code proportional to the # of lines ? The square of the # of lines ?
@LokiAstari I, on the other hand, have seen the opposite enough times to know that code with tests isn't necessarily less buggy.
Jan
22
comment How to structure our Javascript so that it is easily editable, testable, and can make calls to render a view without knowing specifics about the view
@BenjaminGruenbaum dynamically writes the java script with the needed data embedded in it - this is more commonly known as a "template" ...
Jan
21
comment What are the warning signs of impending doom to watch out for on a project?
This may be largely true, but not strictly true. I underwent such a project about 9 months ago, and it was a success. Spent over half the time on it devising tests to prove it was correct and that old/new bugs weren't introduced to the new version, and found a bunch of new bugs in the existing one in the meantime. (Though, I suppose, this makes this answer true as a warning sign)
Jan
21
comment Temporary variables vs line length requirements
Your $host and $uri example is kind of contrived, though - unless the host was being read from a setting or other input, I'd prefer them being on the same line, even if it does wrap or go off the edge.
Jan
18
comment My boss has a bad case of “Not Invented Here”
@JoelEtherton Exactly. Unsatisfactory to who? And by what percent of users? It's technically not "broken" until you reach some business-set threshold, but that's never a reason to avoid an order-of-magnitude optimization. There may be other reasons, but not that.
Jan
18
comment Is it wrong to copy ideas from other languages?
For example, here's an old tree of programming languages
Jan
18
comment Why don't languages include implication as a logical operator?
+1, I was about to ask this same thing on the question (since I'm not very familiar with "implication", it never comes up day-to-day). The if statement is far, far clearer to just about everyone.
Jan
18
comment My boss has a bad case of “Not Invented Here”
@JoelEtherton Not entirely. Performance is not a boolean, and can affect end-users depending on where the slowdown is. This is (in part) a performance question.
Jan
17
comment How do you debug without an IDE?
+1 entirely for going backwards. I often have the experience: "Hey - waittaminute, this isn't the right value! How did this become this?", and have to go back and forth in the output while reading the code. Debuggers are bad at backwards.
Jan
17
comment How do you debug without an IDE?
@syrion And ipdb is better than that ;)
Jan
13
comment Is Clojure a 3GL or a 4GL?
"as well as" does not imply "is the same as" - it means the opposite..
Jan
10
comment Why do we use story points instead of man days when estimating user stories?
@Patrick When using man-days (see man-hours on Wikipedia), there is no concept of velocity. That's an agile/scrum thing.
Jan
10
comment Why do we use story points instead of man days when estimating user stories?
@Patrick If it takes 1 month for, say, 2 developers to complete, that's about 40 man-days. Not 5. A "man day" is 1 per developer per calendar day. When estimating man-days, you don't estimate the difficulty of the task, but how long you think it would take for one developer to do. This should be easier to explain because the concept also exists in other fields, not just software development.
Jan
9
comment Is it possible to use python as a shell replacement?
@isbadawi Even with that package, it's still rather verbose/cluttered compared to bash...
Jan
8
comment Categories of 'for' loops
...I was hoping "extreme" loops would be more, well, extreme... ;)
Jan
6
comment Wrapping Primitives to Enable Returning null — Bad Practice?
@anthropomo Doesn't Integer allow you to return null without having to do any wrapping yourself? Java has had autoboxing and unboxing for a while now...
Dec
29
comment Is a day really 24 hours long?
@JohnBartholomew The code point 00:00:00 represents the full second [00:00:00, 00:00:01), when our order of magnitude is full seconds. Likewise, 23:59:59 represents the full second [23:59:59, 24:00:00). So yes; when we're dealing with units of full seconds, and that convention is used, it is completely valid to say that the day ends at 23:59:59.
Dec
29
comment What discipline does Computer Science belong to?
@red-dirt Similar to AndresF, on the more practical application side, the basic scientific method (hypothesize, test, check, repeat) comes into play during debugging - which does usually take up most of the time spent programming.
Dec
18
comment Should I use JSON just to use JSON
It speaks easily to PHP as well, since json_decode() and json_encode() convert between a JSON string and the native Array() data structure