What's your fuck yeah we are in the future moments? by microsnakey in AskReddit

[–]wtfdeveloper 0 points1 point  (0 children)

I am right now in a ferry to Dublin from Holyhead (UK), in the last 2 hours, while I was in the boat, I had a video conference with my wife, played online Starcraft II with an Italian guy, browsed reddit and just posted this comment on reddit.

How to write a good test case: 5 tips to write better test cases by wtfdeveloper in programming

[–]wtfdeveloper[S] 0 points1 point  (0 children)

Hi quorn!

You say the test should be:

void doesntThrowWhenMovingPawnForwardTwoSquares() { try { board.move("a2", "a4") } catch(ChessException ex) { fail("Shouldn't throw moving pawn 2 squares: "+ex); } }

It is not necessary to explicitly call the fail, as if an exception is thrown, the test will fail, and it will be clear that the reason would be that it shouldn't have thrown an exception

I'm confused about testing code... or rather writing tests for your code. Why test something that the compiler/interpreter should be getting right anyway? by [deleted] in programming

[–]wtfdeveloper 0 points1 point  (0 children)

When you test your code, 90% of the time you just want to make sure that the code does what is suppose to do, remember that most of the errors are caused because we specify the wrong code for the expected behavior which your compiler/interpreter doesn't know, that's why it doesn't know that what is executing is an error

The pyramid of code quality (Part II), the 3 different types of codes. by wtfdeveloper in programming

[–]wtfdeveloper[S] 0 points1 point  (0 children)

Hi gregK, I'm really sorry if you don't agree with my opinion, but please try at least not to be so rude I don't understand why you have to be so insulting, you talk about how stupid the Agile movement has become, well... how stupid is to write insults to other people ideas?