In our latest development tutorial, Brian Seel, a software developer with the Baltimore City Department of Transportation, is going to walk us through his Python workflow using the integrated development environment PyCharm.
Seel demos the process of coding a script that will remove identifying characteristics and sanitize crash data received from the Baltimore Police Department so it can be used by the transportation department for data purposes. A lot of the Googling and testing that goes into a typical day is taken out of this workflow example, but the tools used in PyCharm and the logic remains the same.
Tools used in this process can include PEP 8, which is a Python style guide to standardize the code, making it easily readable and more professional looking. Or, use Pylint to check for errors in your code. PyCharm puts these tools into a great functional package.
The overall name for a tool like Pylint is a linter. Flake8 is also a tool you can use to check your code for errors.
Think of a linter as a spell check for coding. These run through and check your code for bugs and errors for quality control.
The gif below shows a linter in action:
The key to finding the solution often includes a familiar web resource.
“A lot of what I do is Googling. I know how to Google well,” Seel said of his process for fixing errors. “But there are some of these things that I’ve seen before, so I don’t have to Google that.”
It could be an issue where the linter is checking system-wide, instead of the specific script or virtual environment you’ve been working in, and is producing an error a developer doesn’t understand.
“That’s the kind of thing that somebody who hadn’t been using Pytest for a while or may not be as seasoned with Python might take a half day to figure out,” said Seel. “Once you’ve been using Python for a while, things start to click. That’s the difference between being a junior developer and a senior developer.”
The senior dev has seen the problem before or has seen something similar through experience, can Google that answer and implement it more efficiently.
There’s no secret sauce to being a software developer, just a commitment to the process of trial and error. PyCharm is a tool that can help smooth out that process. If you get comfortable with PyCharm and stick at coding long enough, you can get through those trials with fewer errors.
Watch the video below for a full demo:
Donte Kirby is a 2020-2021 corps member for Report for America, an initiative of The Groundtruth Project that pairs young journalists with local newsrooms. This position is supported by the Robert W. Deutsch Foundation. -30-