How To Use Python’s PEP 8 To Land A Software Job
There are hundreds of skills you can learn in programming. While many different skills are essential to writing high-quality software, the most important skill when job hunting is advertising your value to a company.
You could be an expert in writing web APIs, but if you bring camelCase to a backend Python interview, you may be quickly disqualified.
One of the easiest ways to show off your Python abilities is to write high-quality code that conforms to Python’s official style guide (and other PEPs that cover overall style and best practice).
The above snippet shows that the writer does not follow Python’s style guide when writing their own code and may not have much experience in Python at all.
While you may not agree with the exact — and maybe excessive — content of my docstring, this example of code shows an understanding of PEP 8 and could be enough to convince an interviewer that you know your stuff.
Honesty Is Important
I do not mean to deceive a potential employer by hyper-focusing your learning on areas that will just make you look good. In an interview it is equally important to actually know what you are doing as it is to look like you know what you are doing.
Too often I see people who have advanced knowledge of programming and specific topics within programming, but put no emphasis on good practice and writing code that is meant to be read by others.
This could be a disqualifier when interviewing for a programming position.
Working as a programmer does not just mean knowing your stuff. You need to be able to clearly communicate, work well in a team, and write good, consistent, and well documented code. Spending time getting familiar with PEP 8 is an excellent way to practice.
PEP 8 Helps You Build Professional Dev Skills
By understanding and practicing PEP 8 you learn how to write professional-level code. This type of learning and practice goes hand-in-hand with practicing good GIT commits, project management, and generally creating your projects in a way that is meant to be understood and used by others.
Conclusion
Understanding and utilizing PEP 8 not only makes you look like you know what you are doing, it helps build your professional software skills in a way that prepares and helps you work with others. PEP 8 helps make your code readable, which is a vital component of a collaborative codebase. Writing code in this way also helps you think in a way that will make your learning more productive for professional goals.
With all of that said, there is no harm in customizing your code style a bit. I prefer to see code very close to PEP 8’s guidelines, but there are times where you might think something looks a bit ugly or unnecessary. At the end of the day, each dev team (and sometimes each project within a team) will have varying style preferences, but following PEP 8 guarantees you are keeping to a recognized standard and will surely impress the die-hard Python enthusiasts out there.