Reputation
1,611
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 13
Impact
~142k people reached

  • 0 posts edited
  • 1 helpful flag
  • 91 votes cast
Jun
19
comment How can I write unit tests that simplify feature implementation?
Does your colleague who claims that "tests were constantly in his way when he tried to implement a new feature" also claim that traffic lights are constantly hindering him when he drives around town, and that he could drive better if there were no such thing as traffic lights?
Apr
17
comment How can I argue convincingly against duplicating database columns?
Yes, but is it actually your job to train the database designer? If it is, then go ahead and do it. But if not, then the best thing you can do is to do your own job well, and not worry too much about other people's jobs. In other words, tolerate the consequences of the database design being what it is, until you've built up a few brownie points for doing your own job well. Also remember that changing the data model retrospectively may be an expensive process, even though it will improve things in the long run, and may not be well received by management.
Apr
17
comment How can I argue convincingly against duplicating database columns?
If you're the new kid on the block, it may be premature for you to start rocking the boat. Presumably, they have their reasons for designing the database the way they have; and they may or may not appreciate being told that their reasons are bad reasons. Especially by someone who is new to the organisation, and who maybe doesn't even know what the reasons are. If I were you, I would just keep quiet and tolerate it, until you gain a bit more credibility in the organisation.
Jan
12
comment Is there any value in writing a unit test that is a subset of another test?
@SteveJessop Yeah, I keep forgetting that it's needed. When I was writing Python tests a while ago, I got into the habit of beginning them all with test_that_, like test_that_return_values_are_in_order and so on. Maybe a future version of the test framework will work around this requirement somehow.
Jan
12
comment Is there any value in writing a unit test that is a subset of another test?
@DocBrown No, the question was "Is there any value in writing a unit test that is a subset of another test?" and the two particular tests shown were a Python example. The fact that similar tests would behave differently in Javascript is off-topic for the question. The very mention of Javascript is a red herring. (BTW I didn't downvote this).
Jan
12
answered Is there any value in writing a unit test that is a subset of another test?
Jan
12
comment Is there any value in writing a unit test that is a subset of another test?
I think the question is about the case where failure of test_length implies failure of test_order. The fact that a similar pair of tests written in Javascript wouldn't behave the same as these two python tests is kind of irrelevant.
Dec
28
comment Is every language written in C?
... because YOU know what the OP meant, is heavy handed and arrogant. You instructed people not to downvote. You shouldn't be doing that. @AndresF. Other people's opinions are valid too.
Dec
28
comment Is every language written in C?
Not at all. "Is there an implementation of Python that's written in C" is an entirely different question from "is every implementation of Python written in C". Interestingly, most of the people who have answered this question have answered something like "was the first implementation of Python written in C". It's fine to choose one interpretation of an unclear question; although in my experience, people who do so often pick an interpretation that's different from what the OP intended. But to turn round and argue that the question isn't unclear, and that people shouldn't downvote it, ...
Dec
28
comment Is every language written in C?
It says "every language". It doesn't say "every compiler for every language".
Dec
28
comment Is every language written in C?
Right, so does it mean "every compiler/interpreter for X is written in Y", does it mean "there is a compiler/interpreter for X that's written in Y", or does it mean "the first compiler/interpreter for X was written in Y"? You say "self-evident", @AndresF. and that's your opinion. My opinion is different, but that's not the point. The point is, you have no right at all to come here and tell people they shouldn't downvote. It's perfectly valid to downvote this question, just as it's perfectly valid to upvote this. But how dare you come here and tell me what my opinion should be!
Dec
28
awarded  Citizen Patrol
Dec
28
comment Is every language written in C?
@AndresF. No, it is not a pretty reasonable question with a clear answer. It is four separate questions. The meaning of the first question is entirely unclear - what does it mean to "write" one language in another? The second question's OK. The third question is far too broad - what does "each concept" actually include? And the fourth question is entirely meaningless. Please don't tell other people that their downvotes are unjustified. I would VTC if I could.
Dec
22
awarded  Yearling
Nov
2
comment Should a getter throw an exception if its object has invalid state?
@DeadMG Yes, but we don't know what OTHER uses there are of getCompleteName() in the rest of the class, or even in other parts of the program. In some cases, returning null may be exactly what is required. But while there is ONE method whose spec is "throw an exception in this case", that's EXACTLY what we should code.
Nov
2
comment Should a getter throw an exception if its object has invalid state?
No, @DeadMG, you only have to check it in cases where an exception should be thrown if getCompleteName returns null. Which is the way it should be. This solution is correct.
Oct
3
comment Should test data be checked into version control?
... production, and to situations where the developer knows that a bug exists, but can't "find it again". If your experience differs, then count yourself lucky. My advice to anyone reading this is to avoid this kind of test like the plague, because it WILL bite you. @congusbongus
Oct
3
comment Should test data be checked into version control?
Well, your experience may differ. But I've lost count of how many times I've seen bugs sneak through testing because a developer has just used a "random" approach to test data, instead of stopping to think about which test cases are actually needed. Moreover, in such cases, if on one lucky test run, the random data does happen to highlight a bug, it can be well-nigh impossible to identify and fix the bug, because you can't reproduce the data that found the bug; which makes the whole test a waste of time. So, in MY experience, tests that generate random data lead both to bugs in ...
Oct
3
comment Should test data be checked into version control?
If your system is recording input data, and your test is recycling that data, then it's not random. Random means unpredictable, therefore unreproducible. You can't change the meaning of an English word by using a new testing technique. @congusbongus
Oct
3
comment Should test data be checked into version control?
Actually, @congusbongus, "unreproducible" is EXACTLY what random means.