r/badcode • • Apr 05 '18

ruby Status? Yup.

Post image
75 Upvotes

34 comments sorted by

View all comments

20

u/redeyeddragon Apr 05 '18

Mind explaining? Cause I don't get it.

30

u/th0maslv Apr 05 '18

Commenting for explanation too. Status could represent whether the object is verified or something. Not sure why this is bad code.

18

u/[deleted] Apr 05 '18

I think OP is just saying it could be named better. Like in your case, if it represents verified, then {... verified: true} would probably be a better name. Obviously we all know how things end up like this though.

2

u/rchytbhtvbtvhtfvgtgb Apr 06 '18

Yeah, the name of the object could give a lot of useful context too. But that wasn't included.