Reputation
1,058
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
11 19
Newest
 Nice Answer
Impact
~191k people reached

Aug
27
comment Tabs versus spaces—what is the proper indentation character for everything, in every situation, ever?
@JordanReiter, Not so - with my example there is no visual difference to one coder. Copying 3-space code into a 4-space code immediately looks wrong without some type of whitespace visualization (and if there isn't, I suggest that programmer needs to start using a monospace font ;)
Aug
8
comment Preferring Python over C for Algorithmic Programming
This is my take on it: plus.google.com/101996847784434186165/posts/7941QuL69yP
Aug
8
comment Do I need to use an interface when only one class will ever implement it?
@LaminSanneh, elaborated. Does that help?
Aug
8
revised Do I need to use an interface when only one class will ever implement it?
added explanation of interfaces
Aug
8
comment How big does my project need to be for me to unit test it?
There are at least two other types of testing - integration test, and acceptance tests. Unit tests cover a specific unit (e.g. this function of this class is supposed to Frab the Fizz). You mock/stub all the other places where that class interacts, passing it el fake-o data. When you do integration tests, you combine two (or more) classes to make sure that your classes go together the way you think they should. Eventually you build up enough tests that you're doing end-to-end testing of your entire system, sometimes known as "smoke tests".
Aug
8
comment How big does my project need to be for me to unit test it?
You shouldn't test everything, but you should test any behavior that's exposed to the outside world. There is/are certainly maintenance costs to testing, and as Kent Beck said in some SO answer (I think it was SO) - test enough to make you confident that your code is correct.
Aug
8
comment How big does my project need to be for me to unit test it?
1 line of code? ;)
Aug
8
answered Do I need to use an interface when only one class will ever implement it?
Aug
8
comment Do I need to use an interface when only one class will ever implement it?
@YannisRizos, even if they don't, I think I'd agree with Fabio about the non-violation of YAGNI. My personal opinion about developing in a statically bound language is that if you create a class, it probably needs an interface. The only exception (I've seen) is if the behavior of the class is actually part of another, interface'd class' API (e.g. a UserControl on a View). Then the tests against the interface should expose errors in the other class.
Aug
8
comment Do I need to use an interface when only one class will ever implement it?
This why I love dynamically bound languages - Unless you're checking isinstance(), all you care about is that whatever came in has the function/method/property you want to look at. Of course that makes good testing a priority... but requiring good practice isn't exactly a criticism...
Jul
10
answered What if globals make sense?
May
25
awarded  Nice Answer
May
25
comment How to become a super user (programming)?
@MadsAndersen, just because you don't get (grade?) credit, doesn't mean you get no credit.
May
25
comment How to become a super user (programming)?
@JamesYoungman, wish I could upvote your comment twice :P
May
17
comment Worst coding standard you've ever had to follow?
We use this style in our COBOL code on z/OS. No subversion (or better) tools there.
May
16
comment Why is Mercurial considered to be easier than Git?
@progo, that's besically the crux of the issue. Mercurial has great Windows support, git doesn't. I've heard rumor that's by design - git windows improvements are discouraged by Linus... but, [citation needed] of course.
Apr
25
awarded  Excavator
Apr
25
revised Python - Service, how to get a code review
improved spelling, grammar
Apr
25
suggested approved edit on Python - Service, how to get a code review
Apr
25
comment How do I review my own code?
Concerning the check-list, having a spec is super useful.