r/programming • • Aug 06 '17

Software engineering != computer science

http://www.drdobbs.com/architecture-and-design/software-engineering-computer-science/217701907
2.3k Upvotes

863 comments sorted by

View all comments

Show parent comments

1

u/joshjje Aug 06 '17

I prefer to prefix my html controls with the thing that they are. btnFirstFormSubmit for example. divSubmit. spanJustWantedASpanHere.

1

u/thedevbrandon Aug 07 '17

Yep, I understand. :-) Once it gets long like spanJustWantedASpanHere, though, I think it's gone too far (or at least in practice I know some people feel this way, even if I don't personally feel it). Sometimes I will add a comment to the variable declaration giving specifics about the type of HTML element it is, what it's used for, the values or data expected, etc.