Contributing to Worst Style Guide Ever

(Mostly written by Github Copilot from title and few hinted keywords copied to clipboard to the end)

In 2022 I have started contributing to Worst Style Guide Ever project. This post just to share my experience with some of these style guides applied in production.

21. Sometimes forget to indent, other times indent twice for no apparent reason

I have seen this in c# and javascript a lot. It usually comes from developers working on a scope or introducing a new scope. Once they have scope defined if they copy this code somewhere the indentation is not correct. This is usually fixed by the IDE but no some devs love having control. They would do it themselves and sometimes they would indent twice for no apparent reason.

The fix is infact available at time of paste, at time of save, at time of commit. The github review will show the block that devs have worked on which looks indented nicely but when you see code above or below it will be far right or far left. Amazing to see this artwork in code.

33. Services, Components and Modules are all just folders in JS worlds. You can easily put all their code in one file and it will run the same. Avoid extra folders where possible

Organisation of code is another big problem along with naming variables. How can you name something that is changing and how on earth you keep it at right spot. Impossible. There are brave developers in this world who will put a component in services folder and service in global folder because it is used by the app which is kind of global. They fight fearlessly with paths and node modules to avoid importing modules but then declare module in declaration files to take over the castle. They are the true heroes of the world. When you ask for Scissors they will offer to cut it with knife themselves rather than giving you the scissors. This generosity is what brings them to the code again and again. They fight with booleans and numbers to convert them to strings forever. So hard that /d or /D both give up on these variables. Code Splitting is something they love. They will put the variables in variable.js and functions in function.js then responses in response.js. Even the dying enemy will admire the queue of js files in alphabetical order. CSS Devs are so great designers that they will write code, indent it and then put all off it through a milkshake machine. CSS would spread out like grid columns. You will see one colour definition in style tag on page and the other colour has its own file called purple.less. Best Split I have seen is to call .top-text class and place it in footer in a hope that this child is split from its parents forever.