“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live” - John Woods
Code is read more often than it is written. Therefore it is efficient to make your code easy to read.
You need to consider the next developer who will deal with your code as your client. If you write unreadable code you have let your client down.
Making sure that your code is consistently formatted is important, but doing it all by hand is boring and prone to human error.
People shouldn’t need to waste time formatting code by hand. A machine can do a much better job. You can spot if a person is doing it by hand if:
All modern code editors worth their salt allow for some kind of autoformatting.
black
autoformatterGet the learner to set up their code editor properly. If they use vscode then they can set it up so that the formatter gets triggered every time they save a file. When you use the right tool for the job then everything is just better.