Git Product home page Git Product logo

pycodestyle-tutorial's Introduction

pycodestyle-tutorial

Get familiar with Python coding styles, idioms, and get set up to do automatic linting!

Who this is for

I made this short tutorial for my fellow Insight Fellows. However, I see it as being applicable to data scientists out there.

Why code style matters

For data scientists, coding style can affect personal and team productivity. The biggest motivation for writing code with good style is maintenance. A few months down the road, you're going to be reading your own code, or you're going to hand off your code to an engineering team to be put into production. If you write code with good style, your personal and team productivity will simultaneously improve for the long run.

Remember, small wins compound into big wins!

Where it gets difficult

Code style seemingly looks like YARTF: "yet-another-requirement-to-fulfill". That's because code style requirements are picky, opinionated, and worst of all difficult to memorize. Fear not! There's a way out.

How we make it easy

We use linters! Code linters have those picky, opinionated (I will address this point later) criteria programmed into their codebase. This means they're able to automatically figure out where your code doesn't match accepted code style!

What's in this short tutorial

  1. A collection of Python idioms and where to use them, geared towards a data scientist's most probable use cases.
  2. A short walk-through on how to get set up for automatic code linting with the Atom text editor.
  3. An example of how to write idiomatic matplotlib code!

pycodestyle-tutorial's People

Contributors

ericmjl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.