DEV Community

Discussion on: What is your best advice for a junior software developer?

Collapse
 
buphmin profile image
buphmin

I taught myself to program on the job to automate a lot of repetitive tasks and eventually built a rather complex web app. One of the things I look back on now that I have been doing this for a number of years is my decision to look up and curate a list of best practices. I followed that as closely as possible and I think that was a life saver. I think any developer of any level can benefit by taking the extra effort to follow a best practice guideline. Just remember that they are in fact guidelines and that sometimes there are better ways to do things in a specific scenario, but that will come with experience.

Collapse
 
ewoks profile image
Beeblebrox

can you maybe share your curated list of best practises?

Collapse
 
buphmin profile image
buphmin

I don't have my original list from 3~4 years, a job, and a move across the country ago but here is the gist:

  • symfony.com/doc/current/best_pract... (symfony specific)
  • php-fig.org/psr/
  • Always test your code, a mix of automated and manual
    • Especially in web a unit test doesn't tell you the website looks awful
  • Keep functions/methods simple (doing as few things as possible)
  • Use/create libraries/services when code will need to be reused.
    • But keep them simple, you don't want a million flags just so you can cram everything into one function
  • And whatever else you might do write comments/document your code.
    • People need to be able to understand what you are accomplishing (including yourself 6 months from now)

Now not all of these may apply to you, such as Symfony, but I think for the most part these are universal.