Exploring Line Lengths in Python Packages | Pythonic Perambulations
This week, Twitter upped their single-tweet character limit from 140 to 280, purportedly based on this interesting analysis of tweet lengths published on Twitter's engineering blog. The gist of the analysis is this: English language tweets display a roughly log-normal distribution of character counts, except near the 140-character limit, at which the distribution spikes: The analysis takes this as evidence that twitter users often "cram" their longer thoughts into the 140 character limit, and suggest that a 280-character limit would more naturally accommodate the distribution of people's desired tweet lengths. This immediately brought to mind another character limit that many Python programmers face in their day-to-day lives: the 79-character line limit suggested by Python's PEP8 style guide: Limit all lines to a maximum of 79 characters. I began to wonder whether popular Python packages (e.g. NumPy, SciPy, Pandas, Scikit-Learn, Matplotlib, AstroPy) display anything similar to what is
This week, Twitter upped their single-tweet character limit from 140 to 280, purportedly based on this interesting analysis of tweet lengths published on Twitter's engineering blog. The gist of the analysis is this: English language tweets display a roughly log-normal distribution of character counts, except near the 140-character limit, at which the distribution spikes: The analysis takes this as evidence that twitter users often "cram" their longer thoughts into the 140 character limit, and suggest that a 280-character limit would more naturally accommodate the distribution of people's desir
related reading
- Zipf's law - Wikipediaen.wikipedia.org
- styleguide | Style guides for Google-originated open-source projectsgoogle.github.io
- Folklore.org: -2000 Lines Of Codefolklore.org
- Succinctness is Powerpaulgraham.com
- Coding Speed Testcodingspeedtest.com
- Typography in ten minutes | Butterick’s Practical Typographypracticaltypography.com
- Zipf's law - Wikipediaen.wikipedia.org
- Numbers Every Programmer Should Know By Yearcolin-scott.github.io
- Anthropic/values-in-the-wild · Datasets at Hugging Facehuggingface.co
- Power law - Wikipediaen.wikipedia.org
- Logs, Tails, Long Tails – Ryan Moulton's Articlesmoultano.wordpress.com
- PEP 8: The Style Guide for Python Codepep8.org