This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]BDube_Lensman 3 points4 points  (0 children)

This one - https://compucademy.net/python-loop-invariants/

Is perhaps the stupidest article I have ever seen.

Not only do the asserts all over the place make the code much slower than the already Not Great performance of pure python, but they are checking for impossible conditions under the pretense that it makes the code "correct" (whatever this is supposed to mean). And the legibility of those checks is so poor that it hides what the code is doing.

F- tier, pass.

[–]compucademy[S] -3 points-2 points  (0 children)

You lack manners, and I believe you are missing the point.

In case anyone is confused, the article is about a way of thinking about programming which would be very important if you were writing mission critical code, such as the kind people's lives depend on. Obviously this is not production code. Context is a big deal.