Some programmer delusions

It’s 21st century, but these delusions born in ages when editors were crude are still out there.

Formatting with spaces is better than formatting with tabs.

Because then the text would look the same for all readers in all editors.

I’ve seen people who use 8 spaces for indentation and I’ve seen people who say that one space is enough. For me, 4 spaces is optimum. Why should anyone adjust to author’s aesthetic prefernces when we have such a wonderful tool as tabulation that could be set to any length in modern editors?

Member variables should be prefixed with “m”.

Because then we could see variable kind by looking at its name.

Most modern languages already have a way for prefixing member variables with “this” – this.someVar. Why reinvent the wheel?

It’s better to comment a part of code than to delete it.

Because it’s easier to roll back the change later.

If it’s hard to roll back the change, use another version control system or better interface to it. Ease of rollback doesn’t justify having to struggle through cowardly code where there are more commented code than working just because “my changes could be wrong and someone could need to easily revert them later”. If you are not sure in your code, think about it more.

This entry was posted in Uncategorized and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>