Code structure
Sometimes overlooked, but very important
Structure is an important concept to understand when writing clean code. From file structure down to specific tabbing conventions within chunks of code, structure is important to consider. Here are some good resources:
http://www.danfletcherblog.ca/2017/01/beginners-tip-organize-coding-projects/
Different approaches work for different people, but it is important to find something that works for you or styles that work for your team where relevant.
If you have an idea of your structure from every level going into a project, then the workflow can be optimized for creating a webpage/web app efficiently. Shortcuts and templates are key for quickly building up a project. Having clearly defined copy and designs before writing a single line of code is the most efficient way to make the coding process all about converting ideas into real web content. Planning is vital and should never be overlooked. If you’re doing it yourself, then this is the time to be creative, make design decisions, and really consider the layout and content of your site. From wireframes to mockups, be sure to take care during this initial phase to make the rest of any project run more smoothly.
Clean code structure can also be assisted with your chosen IDE. My program of choice is Microsoft’s VSCode, and along with a few choice plugins, I can organize my code clearly. Some of my favorites are Bracket Pair Colorizer and indent rainbow. I used to use Prettier but have been avoiding it lately because it seems to sometimes do unpredictable things to my code, and ultimately I want control of that.
I’ve been going through and editing a rather large project lately and am seeing ways that my past self tried to organize code to be very inefficient so have been forced to do some damage control. From indentions to too many styles in each CSS file, I’ve learned the hard way how to not structure code. That said, I’ve also learned a ton over the past six months or so, and it’s kind of fun to go back to code that I wrote early on and see my progress. It's also kind of ugly at times but I’m slowly making my way through some old code to clean it up. This also makes it apparent how something like this could cause trouble when working with a team and why it's so important to define, understand and adhere to conventions early on.