Audun Nes
1 min readDec 30, 2020

--

Nice article, and I have a few inputs to how I work with some of the same typics (I am not in data science).

Regarding #10 — Setting up a virtual environment:

I am a big fan of virtualenvwrapper, which makes working with multiple virtual environments for Python a charm.

Regarding #9 — Commenting according to PEP8 standards:

Since Python is dynamically typed, it can be usefull to use type hints in both the code and the docstring. It helps the IDE, it helps the next developer, and it helps you when you revisit that code later.

Example:

def is_valid_project(project_name: str) -> bool:
"""
Checks if the project name supplied exist in Product X.
:param project_name: Product X project name
:type project_name: str
:return: bool
"""
code-bla-bla-bla...

Regarding #4 — Measuring and optimizing runtime

I read a very good article recenty about Python decorators, where the author also gave an example on how to time your code through decorators.

https://medium.com/better-programming/why-you-need-decorators-in-your-python-code-df12d43eac9c

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Audun Nes
Audun Nes

Written by Audun Nes

Lead Cloud Engineer/Site Reliability Engineer from Copenhagen, Denmark. GitHub: https://github.com/avnes

No responses yet

Write a response