So you know a bit of logical programming and can put together a script. The syntax is all there the code works and delivers what it should. Then six months later I need to go make a few changes. I look at my code and shudder. I’ve learnt a lot more in the past six months, but mainly I’ve learned that I need to tidy up after myself and make things clearer so I don’t have to remember they why I did that so much.

I started looking at documenting my code better, and ran into phpDoc. Great now I can have some documentation with my project. But then it lead me into PSR. There are standards for how your code is structured, ok your syntax is fine, but there’s a standard for how the code can be written, so it can be read clearly by anyone.

I now know I clearly need to understand where to use camelCase and snake_case. I also had to change my style of opening and closing braces {}. But these standards are pretty easy to follow and not a hugely onerous read. So yeah, it’s going to frustrate me for a while, but it will drag me away from those huge wrapping single lines that appear in my code from time to time.

Advertisements