Reputation
3,845
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 18 34
Newest
 Guru
Impact
~207k people reached

Feb
13
comment How can I unit test a class which requires a web service call?
@kevincline I fully agree on the necessity of the tests you propose, and indeed I write them in my day job and have proven themselves useful. But they are by definition NOT unit tests, which is what the question was about :) Consider this: if it is a unit test, and the code fails because the webservice was changed, what is the "unit" that you're testing? What exactly failed? You are not testing in isolation, as needed by unit testing.
Feb
10
reviewed Edit Are developers expected to have skills of business analysts?
Feb
10
revised Are developers expected to have skills of business analysts?
fix spelling errors
Feb
7
awarded  Yearling
Feb
5
reviewed Reject Why is an anemic domain model considered bad in C#/OOP, but very important in F#/FP?
Feb
5
reviewed Edit FizzBuzz - really?
Feb
5
revised FizzBuzz - really?
Removed dead link
Jan
31
comment What is the name of the functional argument in fold
@Izkata Are all higher-order functions catamorphisms? If not, then it isn't an "universally used name for catamorphisms", just like jozefg asserted.
Jan
29
comment Why does the US government disallow dynamic languages for secure projects?
@romkyns But that's not what I said. As a fan of static typing, I'm well aware it gets rid of whole categories of bugs, which is what I argued ("another layer that helps the correctness [...]"). I wouldn't use dynamic typing for mission-critical software.
Jan
27
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
For your specific example, consider Haskell: sum :: Num a => [a] -> a. You can sum a list of anything that is a number. Unlike javascript, if you attempt to sum something that is not a number, the error will be caught at compile time.
Jan
27
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
"In statically typed languages, this involves overloads" I think you meant "in some statically typed languages" :) Good statically typed languages don't require overloading for something like your sum example.
Jan
23
reviewed Approve Arrow => in Perl
Jan
18
reviewed Reject Plagued by indecision - how to choose technologies to use for projects?
Jan
18
reviewed Approve Plagued by indecision - how to choose technologies to use for projects?
Jan
17
comment Should integer divide by zero halt execution?
@supercat Disagreed. For one, the OP explicitly asked us to ignore how existing hardware works. Second, the remainder of integer division must be between 0 and the divisor. If the divisor is zero, the remainder is undefined. Hence, the remainder of 3/0 cannot be 3.
Jan
17
comment Should integer divide by zero halt execution?
@supercat An unexpected integer overflow is pretty dangerous as well, re: incorrect CC dosage. But division by zero is mathematical nonsense, while an overflow is a result of a particular computer architecture. Regardless of the computer, the instant you divide by zero, it's an error.
Jan
17
comment Should integer divide by zero halt execution?
@supercat My point in my previous comment was, btw, that whatever you choose to do (throw an exception, make the result NaN), it must put the program in an error state that you cannot ignore. A division by zero must force you to deal with it. Throwing an exception is an acceptable way of doing this; not saying it's the only way. If, like you say, one NaN in the chain causes the end result to be NaN, and then you cannot ignore it's NaN, that's also valid. The key point is that at the end you must not be able to ignore the division by zero error.
Jan
17
comment Should integer divide by zero halt execution?
@supercat "Should integer divide by zero halt execution?"
Jan
15
reviewed Reviewed Programming beginner: Options for small program interfaces?
Jan
15
comment Programming beginner: Options for small program interfaces?
What is the actual question? :)