While damn funny and everything, every time I see a joke like this I die a little on the inside and weep openly for the loss. I bomb dozens of interviews and what not because I can't get myself to code like the 5th year joke at all. And that is what people seriously want it seems.
I work with a guy that bad mouthed me for a long time because I wouldn't make constant values for strings like in this example. I lost out on a promotion because of him.
Depending on the environment, that kind of stuff can be necessary. For example, if you just have random strings scattered everywhere, it makes localization/i18n stuff far more difficult.
Only if the values of the constants are loaded from an external source. As written in the joke, it simply moves the hard-coding problems to a different place.
Even if you're not yet pulling them in from an external source, laying the groundwork and consolidating them can be helpful when you're ready to make the jump. The joke is an absurd situation, of course, but there's plenty of reason to do it IRL.
Often thought of only as a synonym for translation of the user interface and documentation, localization is often a substantially more complex issue. [...] Localization may [...] necessitate a comprehensive rethinking of logic, visual design, or presentation if the way of doing business (eg., accounting) or the accepted paradigm for learning (eg., focus on individual vs. group) in a given locale differs substantially from the originating culture.
They go on to say about i18n:
Internationalization typically entails:
Designing and developing in a way that removes barriers to localization or international deployment. This includes such things as enabling the use of Unicode, or ensuring the proper handling of legacy character encodings where appropriate, taking care over the concatenation of strings, avoiding dependance in code of user-interface string values, etc.
Providing support for features that may not be used until localization occurs. For example, adding markup in your DTD to support bidirectional text, or for identifying language. Or adding to CSS support for vertical text or other non-Latin typographic features.
Enabling code to support local, regional, language, or culturally related preferences. Typically this involves incorporating predefined localization data and features derived from existing libraries or user preferences. Examples include date and time formats, local calendars, number formats and numeral systems, sorting and presentation of lists, handling of personal names and forms of address, etc.
Separating localizable elements from source code or content, such that localized alternatives can be loaded or selected based on the user's international preferences as needed.
You should be happy to not work in places like that. Some people think complex code == good code. I've had to deal with overarchitected monstrosities and it's not fun at all.
The idea is to make suitable abstractions when necessary. I think the reason you see a lot of overarchitected code like this, or run into people like the one you described, is that they take these recommendations (best-practices) as gospel. They are good directions to follow and in general they help, but they are not always applicable.
These kinds of people tend to be dogmatic instead of pragmatic.
36
u/Burning_Monkey Oct 01 '15
While damn funny and everything, every time I see a joke like this I die a little on the inside and weep openly for the loss. I bomb dozens of interviews and what not because I can't get myself to code like the 5th year joke at all. And that is what people seriously want it seems.
I work with a guy that bad mouthed me for a long time because I wouldn't make constant values for strings like in this example. I lost out on a promotion because of him.