Back to Blog
·Eva Popílková·1 min read·Archive 2019

Norman Niemer Reveals the 10 Most Common Coding Mistakes. Are You Making Them Too?

Norman Niemer is the Chief Data Scientist, so he has quite a bit of experience in data science. According to him, a data scientist is “a person who is better…

Norman Niemer Reveals the 10 Most Common Coding Mistakes. Are You Making Them Too?

Norman Niemer is the Chief Data Scientist, so he has quite a bit of experience in data science. According to him, a data scientist is “a person who is better at statistics than any software engineer and better at software engineering than any statistician.” Norman has now published a list of the 10 coding mistakes he frequently encounters. Let’s be honest, are you making any of these too?

For your interest, here are the first three:
1. Don’t Share Data Hardcoded in Your Code
In other words, you share your code but forget to include, for example, the dataset :)
Solution: Store the data on the web, Google Drive, or use d6tpipe.

2. Hardcoded and Inaccessible Paths
Such as: df = pd.read_csv(‘/path/i-dont/have/data.csv’) # fails
Solution: Use relative paths, global configuration variable paths, or d6tpipe to make your data easily accessible.

3. Mixing Data and Code in the Same Directory
It’s confusing!
Solution: Organise your directory into categories such as data, code, etc. See Cookiecutter Data Science and use the tools mentioned in the first tip for storing and sharing data.

Source and complete article: https://www.kdnuggets.com/…/top-10-coding-mistakes-data-sci…

Původní zdroj: wordpress

Související články