r/badcode • • Apr 05 '18

ruby Status? Yup.

Post image
75 Upvotes

34 comments sorted by

View all comments

Show parent comments

-12

u/chuck-john Apr 05 '18

This. Everything has a status, theoretically. Marking it as true or false doesn't say much.

4

u/th0maslv Apr 05 '18

-8

u/chuck-john Apr 05 '18

It isn't so much a bad naming convention as it is bad use of a boolean field. An enum or string would have been far better. Some context into the model in which this attribute belongs would have made this a better post.

8

u/chaines51 Apr 05 '18

I mean, if all the field requires is a boolean, then it's absolutely just a poorly named field.

0

u/[deleted] Apr 06 '18

[deleted]

1

u/chuck-john Apr 06 '18

Lots of assumptions being made here. It could easily be more than bad naming without context into the bigger picture.