Reputation
2,905
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
13 30
Newest
 Yearling
Impact
~138k people reached

Dec
1
comment Which is more maintainable — boolean assignment via if/else or boolean expression?
Writing a clean boolean expression is not a clever trick!
Nov
30
comment Which is more maintainable — boolean assignment via if/else or boolean expression?
The first form had at least 1 bug which needed to be corrected, hidden in its verbosity. Second form was simple and to the point, and had no bug. I rest my case. In any case, the main purpose was not to type less characters! And this question wasn't about performance at all, which is irrelevant in this case.
Nov
30
comment Which is more maintainable — boolean assignment via if/else or boolean expression?
What!? c = (a == b); is not error-prone. First form in the original question is way more error prone, as demonstrated by the OP itself having to edit his/her question to fix bugs!
Nov
30
comment Which is more maintainable — boolean assignment via if/else or boolean expression?
Wow, do C# devs really consider the first form acceptable? This... seriously reduces my trust in them. In my experience, use of the first form heavily hints at a complete misunderstanding of boolean expressions.
Nov
28
comment Is it useful to unit test methods where the only logic is guards?
You are not making "more work" for the maintainers. If they change logic, they must change the corresponding unit tests. That's how it works. I don't see your cons: if your unit test didn't require changing, then it wouldn't be testing anything, would it? You might as well question whether unit testing is useful at all.
Nov
25
comment Is modern C++ replacing C#? Is Microsoft pushing developers to adopt C++?
@rotman Please do not reply to other people's answers in your own answer. Answers should only address the original question :)
Nov
22
comment Is there an excuse for short variable names?
My guess is that longer names make sense in OOP because meaning is derived from them, whereas in FP, where generality and abstraction are much higher, succinctness is more valued.
Nov
22
comment Is there an excuse for short variable names?
Not an answer because I quite can't understand it yet, but in Haskell (and FP in general, I guess) the consensus seems to be to write 1 or 2-character variable names. (this is unrelated to common Physics or Maths abreviations). I'm still not used to it, but it seems to be related to the extreme generality FP programmers strive for. So lists are usually named "xs", with a particular element named "x"; longer names seem to be frowned upon. And yes, industrial strength software IS written with Haskell/FP.
Nov
20
comment C++ job interview questions?
You should probably be honest with the interviewer and explain that you are proficient with C, but have little experience with C++.
Nov
20
revised What's the benefit of the Nothing constructor in Haskell?
added 3 characters in body
Nov
20
answered What's the benefit of the Nothing constructor in Haskell?
Nov
20
comment What does it mean that “language A is written in language B”?
@YannisRizos Isn't Unladen Swallow dead as well?
Nov
18
comment Why don't we have web IDEs?
@Javier Good point. The two main advantages of webapps (no config, automatic updates) are actually disadvantages for IDEs... we developers being people who start flamewars over which is the best text editor; and even while agreeing on the editor, over which version and config is the best :)
Nov
16
comment What's The Difference Between Imperative, Procedural and Structured Programming?
@thiton I disagree. Monads are functional constructs too; they only look imperative due to Haskell's syntax sugar (the "do notation"). When you desugar monads, their functional nature becomes evident. In contrast, OO languages are indeed imperative: at their core they are based on the sequential execution of statements.
Nov
14
comment Should I give the answer to a failed interview coding exercise?
@GlenH7 Yeah, I deleted my comment because it was buzzkill. Glen deserves props for his analysis, even if it doesn't answer the question AT ALL :D (Besides, I totally coded and tried my own solution moments ago)
Nov
14
comment Should I give the answer to a failed interview coding exercise?
@DHall Heh heh, true! Glen's answer is awfully off-topic, but is a fine example of this irresistible urge all programmers have :)
Nov
14
comment Should I give the answer to a failed interview coding exercise?
It's a sad day when people on programmers.SE are considering the modulus operator "advanced math" or "not necessary for their jobs". Next up: "I don't need to know division or multiplication, I never used them in my web app".
Nov
14
comment FizzBuzz - really?
Who on earth goes to a university where they "teach Java". Programming language schools are less than useful (regardless of it being Java, C++, Lisp or whatever); is that what you have in the US? Where I studied CS, you more or less taught yourself the prog language as required (an exception would be the Paradigms class, I guess). University courses taught math, CS theory, multiple programming paradigms, calculus, etc. Anyone graduating from that can easily solve FizzBuzz, because we had to solve harder problems just to pass the courses.
Nov
12
comment Why prefer a wildcard to a type discriminator in a Java API (Re: Effective Java)
I have to agree with @Will, the simplification is so tiny it hardly looks worth doing.
Nov
12
comment Immutable Method in Java
@Giorgio Thanks, good point. I'm a bit rusty with my C++ :)