Issue #412

Questionable Python Code Metrics, Django Governance, Conference Updates, and More

March 17, 2020

Questionable Python Code Metrics, Django Governance, Conference Updates, and More
#412 – MARCH 17, 2020 VIEW IN BROWSER
The PyCoder’s Weekly Logo
The Most Critical Python Code Metric
“Code metrics are a popular way to analyse the complexity of our software. For some reason, we are attracted to single-figure summaries of quality, whether it’s lines of code, cyclomatic complexity, or the Pylint score. Personally, I think using these are about as valuable as judging another person based on one of their visible or measurable characteristics.”
STEVE DOWER

Make a 2D Side-Scroller Game With PyGame
In this step-by-step course, you’ll learn how to use PyGame. This library allows you to create games and rich multimedia programs in Python. You’ll learn how to draw items on your screen, implement collision detection, handle user input, and much more.
REAL PYTHON video

Top 10 Python Packages for Machine Learning
The field of data science is rapidly growing and relies heavily on Machine Learning; with hundreds of ML libraries, Python has become the language of choice for most engineers. Check out ActiveState’s list of the top 10 ML packages to learn →
ACTIVESTATEsponsor

New Governance Model for the Django Project
The Django core team, the Django Technical Board, and the Board of Directors of the Django Software Foundation have held their deliberations and voted to accept Django Enhancement Proposal (DEP) 10. Learn what the adoption of DEP 10 means for Django now and in the future.
DJANGOPROJECT.COM

Do Not Log
What makes a good log? When should you log something, and when is logging overkill? In this opinion piece, Nikita Sobolev argues that logging isn’t always best-practice in an application and discuss some alternatives that might make better sense from a business perspective.
NIKITA SOBOLEV

Against Service Layers in Django
“[On the] recommendation to add a ‘service layer’ to Django applications. The short version of my opinion on this is: it’s probably not what you want in Django apps.”
JAMES BENNETT

PyCon: March 12 Update on COVID-19
PYCON.BLOGSPOT.COM

What Monty Python’s Ministry of Silly Walks Can Teach Us About Peer Review
JENNIFER OUELLETTE


Python Jobs


Senior Python Software Engineer
TESSIAN 📍 LONDON, UK

More Python Jobs >>>


Articles & Tutorials


Documentation as a Way to Build Community
Why is it so difficult to write good documentation? Why are documentation authors for projects often invisible? In this article, Melissa Mendonça investigates the answers to these questions and describes a new NumPy Enhancement Proposal that aims to restructure the NumPy documentation, build a documentation team, and diversify the contributor base.
MELISSA MENDONÇA

A Framework for Studying Population Dynamics
“World Wandering Dudes is a simulation framework in which you initiate a ‘world’ which consists of a ‘field’ and a set of ‘creatures’ (dudes). The field has food on it. Each day, the creatures run around gathering the food which they need to survive and reproduce.”
DUSTIN MCINTOSH

Learn the Skills You Need to Land a Job in Data Science, Guaranteed
As a student in Springboard’s Data Science Career Track, you’ll work one-on-one with an expert data science mentor to complete real-world projects, build your portfolio, and gain the skills necessary to get hired. Springboard’s team will work with you from the start to help you land your dream data science role. Learn more →
SPRINGBOARDsponsor

How to Do a Binary Search in Python
Binary search is a classic algorithm in computer science. In this step-by-step tutorial, you’ll learn how to implement this algorithm in Python. You’ll learn how to leverage existing libraries as well as craft your own binary search Python implementation.
REAL PYTHON

Handling Missing Dictionary Keys With defaultdict
Learn how the Python defaultdict type works and how to use it for handling missing keys when you’re working with dictionaries. You’ll also learn how to use a defaultdict to solve problems like grouping or counting the items in a sequence or collection.
REAL PYTHON

Introduction to SQLAlchemy ORM for Django Developers
The Django ORM and SQLAlchemy are two of the most popular Python ORMs, but they have some pretty significant differences. Explore how common actions work in each framework, including transactions, models, queries, and dealing with the N+1 problem.
DENIS OREHOVSKY • Shared by Denis Orehovsky

HTTP Desync Attacks With Python and AWS
“A couple of months ago, I was at work waiting patiently for some documentation to go live about a new type of attacks against modern web applications called HTTP Desync attacks. Here is the story of my findings in gunicorn!”
EMILE FUGULIN

Why Does all() Return True if the Iterable Is Empty?
Does it make sense for all() to return True for an empty list? Is “all unicorns are blue” a true statement? Does shaving your dog contradict the statement “all mammals have fur?” You’ll have to read to find out!
CARL JOHNSONS

The Troublesome Active Record Pattern
“How inappropriate data access patterns massively slow down programs and how the same problems arise with RESTful APIs.”
CAL PATERSON

Profile, Understand & Optimize Code Performance with Blackfire.io
Blackfire is a deterministic profiler, measuring how code consumes resources at run-time. Appealing graphs & UI enable you to find performance bottlenecks & understand the code’s behavior. Works on production, test/staging & development with no overhead.
BLACKFIREsponsor

WebRTC: A Working Example
Learn how to implement a simple video chat application in Python and JavaScript that leverages WebRTC.
PAWEŁ FERTYK

Beginner’s Guide to Asynchronous API Calls With Python’s Twisted Package
MOSHE ZADKA

Introduction to the Itertools Module
FLORIAN DAHLITZ • Shared by Florian Dahlitz


Projects & Code


tortoise-orm: Async ORM Inspired by Django
GITHUB.COM/TORTOISE

HPI: Human Programming Interface
GITHUB.COM/KARLICOSS

NCLS: The Nested Containment List for Python
GITHUB.COM/BIOCORE-NTNU • Shared by Endre Bakken Stovner

📆🐍 Upcoming Python Events


EuroPython 2020 and COVID-19
EuroPython 2020 is still scheduled for July 20-26 in Dublin, Ireland.

PyData COVID-19 Response
PyData statement on COVID-19 and Spring 2020 PyData events.

PyWeek Games Programming Contest (Online)
March 22 to March 30, 2020

MoscowPythonConf++
March 27 to March 28, 2020

PyCon SK 2020
Rescheduled to September 11–13 2020
Happy Pythoning!
Copyright © 2020 PyCoder’s Weekly, All rights reserved.