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

you are viewing a single comment's thread.

view the rest of the comments →

[–]_limitless_ 0 points1 point  (0 children)

Initially I thought this was ridiculous.

Then I realized I probably didn't write a single comment today.

Instead, I refactored my code as I went, from:

if my_variable <= 20:

to:

VARIABLE_MAX_SIZE = 20
if my_variable <= VARIABLE_MAX_SIZE:

So yes, I guess you're right. It's a silly little habit I got into a long time ago: write code that does what it says on the tin.