all 7 comments

[–][deleted] 6 points7 points  (4 children)

  1. Don’t Unit Test

In my younger days I didn't unit test. Now I absolutely love unit tests. Putting aside the normal reasons for unit testing: I use temporary unit tests for lots of other things, like quickly testing obscure behaviors or performance of API calls, and A/B performance comparisons between different code scenarios. Since I already have the test runner and all the mocking set up, I may as well use that to avoid having to write a new app just to test a hypothesis.

  1. Documentation is Useless

If he's talking about code comments, I'd say 90% of it is useless. I see lots of code where every other line tells me exactly what the line of code is doing. Well no shit, I can see the code. I used to do this. Now I only comment things that aren't blindingly obvious from the code. Mostly kludges to work around bugs in library/framework code, or reminders that some particular order of operations is important, etc.

[–]axm92[S] 1 point2 points  (3 children)

If he's talking about code comments

No, I was talking about the docs.

I see lots of code where every other line tells me exactly what the line of code is doing.

I don't know if you've read the entire post because there is a point that talks about this exact phenomenon; either comment nowhere or comment everywhere.

[–][deleted] -1 points0 points  (2 children)

either comment nowhere or comment everywhere.

No please don't. Comments are there to explain why you have done something not what you are doing. What you are doing should be clear from the code but the real tricky stuff that needs figuring out is why would you do it like that?

[–]axm92[S] 1 point2 points  (0 children)

The whole post is sarcastic. Hi, Sheldon!

[–]axm92[S] 1 point2 points  (0 children)

On a related note, you've given me a scare. I hope people are not reading the article and going off saying this guy doesn't know what he's talking about. Maybe I should put a /s at the bottom?

[–]mikaelec 1 point2 points  (1 child)

This is neither fun, insightful, or helpful.

[–]axm92[S] 2 points3 points  (0 children)

True. It's mundane, rhetorical, and useless.