Was looking at some code someone else wrote and came across:
public static final String SLASH = "/ ";
FML. Dude. WTF were you even thinking? Why even have a constant? To save us from typing? Instead of one character you now have 5, and then the "+" symbol. What are the odds of making an error on a forward slash? You're just using it in other static declarations anyway *in the same class*.
No comments:
Post a Comment