I'm not sure how to correctly describe my problem...
Ever since I started learning how to program, I recognized that many more experienced programmers have very strict (and, in the POV of a beginner, completely artificial) rules how should programs be written. These rules seem simplicistic, yet are followed with an almost religious zealotry.
Examples of such rules:
- Thou Shalt Never Use Goto Unless Thou Writest Thine Programs In The Assembly Language;
- Thou Shalt Never Use #regions;
- Thou Shalt Never Use Properties;
- Thou Shalt Never Use Global Variables;
- Thou Shalt Use Dependency Injection Instead Of Calls To Static Methods Or Members;
- Thou Shalt Never Use Protected Fields;
- Thou Shalt Always Abide By Uncle Bob's Prescriptions;
- Thou Shalt Always Abide By Martin Fowler's Prescriptions;
- If Thou Thinkest Thou Needest To Break These Rules Thou Hast Designed Thy Architecture Wrongly And Oughtest To Redesign And Refactor Thy Code Until Thou No Longer Needest To Break These Rules.
Sometimes we can see some programmers following mutually exclusive "Thou Shalt" rules; then an almost religious discussion is likely to start whose rules are the correct ones.
Problem is, I've always had problems with following such rules or listening to people who look at my code and exclaim, "You Are Doing X But It Is Evil To Do X Refactor This According To My Arbitrary Prescriptions Or I Judge Your Code To Be Of Bad Quality Even Though It Works Flawlessly". (This is, at least, how such people's arguments were sounding in my ears.)
I must say I have an intellectual gag reflex when I see such a keen use of the universal quantification ("Thou Shalt Always / Never"). I am also perplexed when I see programers the more happy the more restrictions are placed upon them, for example when a programming language decides not to support a feature they perceive as "Evil" or when their project adopts a new, stricter code quality policy, outright rejecting any piece of code that uses X (or doesn't use X), regadless of context.
It has been my personality trait since childhood that I was more than inclined to disregard requirements I'm perceiving as arbitrary or pointless. When put in the context of programming, this means I was eager to get myself into arguments with people who were considering my code to be of a bad quality because it was violating some of such rules. I was getting annoyed when I was hearing arguments like "Since you're not as experienced as we are, you should be learning rather than contesting something you don't even understand" or "Read 'Clean Code' by Robert C. Martin" or "The law doesn't require everyone to be a good coder, if you want to be a bad one, you are free to do it - but please, make sure I don't have to read this abomination you call 'code' you're writing ever again". On the other hand, when people were actually using substantitive arguments, I was usually rejecting them as long as I couldn't verify them; and I could never verify such requirements like "Thou Shalt Not Use Global Variables", maybe because I've never written code large enough for this to be an issue.
I've once browsed to a random source file of the Linux Kernel. I laughed when I saw it breaking many of these "Thou Shalt" recommendations. Longish functions? Gotos? Global variables? Self-modifying code? If these zealots were right, the Linux Kernel could have never be that successfull for such a long time with all of those "anti-patterns"!
Finally, I've always had an intellectual gag approach when I was seeing newbie programmers (like me) eager to listen to such rules, remember them, religiously follow them, and repeat them, and teach them to everyone. Quite often, they were doing this without understanding these rules (more than I was understanding), so in my eyes they were... trying to seem more Wise, or Advanced than the rest of us newbs, because they repeat what more experienced programmers are saying, even though they clearly don't understand it. I was seeing them as... hatchlings, who collect feathers of a rooster and glue them to their rumps, and then they walk pridefully among other hatchlings, doing their best to mimic a rooster's moves, as if they were trying to say: "See? I'm almost a rooster!" (I've had similar reactions when I was seeing my peers condemn Microsoft and praise Linux and Google instead - I was thinking, "Ha, they see geeks don't like Microsoft, so these wanna-be geeks must not like Microsoft as well, of couse!")
Well, now I'm seriously thinking if I didn't harm myself by this approach - because indeed, I may have prevented myself from learning, by refusing to accept that even if I don't understand that X is a good or bad thing, this still doesn't stop X from being a good or bad thing!
I wonder... what should be the standard response to those like me?