atlas news
    
Death and Gravity
07  mars     07h00
reader 3.12 released - split search index, changes API
   Today we’re implementing a least recently used cache with priorities and expiry, using only the Python standard library. This is a bIG TEch CoDINg InTerVIEW problem, so we’ll work hard to stay away from the correctâ data structures, but end up with a decent solution anyway
20  janvier     12h00
This is not interview advice: a priority-expiry LRU cache without heaps or trees in Python
   Having trouble figuring out when to use classes In this article, we look at another heuristic for using classes in Python, with examples from real world code, and some things to keep in mind.
12  novembre     18h00
reader 3.10 released - storage internal API
   So, you’re doing some sync stuff. But you also need to do some async stuff, without making everything async. Hint: asyncio.Runner will get you at least part of the way there.
11  septembre     21h00
When to use classes in Python? When you repeat similar sets of functions
   Do you feel you’re fighting your tools Do you feel you’re relying too much on autocomplete and inline documentation tl;dr: Most good documentation won’t show up in your IDE rather, it is about how to use the library, and the problem the library is solving.
28  août     20h00
reader 3.9 released
   Java is notoriously verbose, especially when used in a serious Enterprise Projectâ ...so naturally, I made linesieve, a Python text munging tool to split output into sections and match sub split with the full power of Python’s re module.
29  juillet     18h00
Running async code from sync in Python asyncio
   So, you’re doing some async stuff, repeatedly, hundreds of thousands of times. How do you not do it all at once Hint: asyncio.Semaphore is not always the best way, despite what Stack Overflow may tell you ;
15  juillet     18h00
reader 3.7 released - contributor docs, 300 stars
   in which you’ll find out what while constructing a mapping found unhashable key PyYAML errors mean, why do they happen, and what you can do about it.
16  mai     10h00
Why you should still read the docs
   in which you’ll learn how to cache a lot of methods in Python, even for objects created by someone else. Did you know that, contrary to popular belief, Python programmers can have a little monkey patching as a treat
25  avril     18h00
Announcing linesieve 1.0: an unholy blend of grep, sed, awk, and Python, born out of spite
   reader, my Python feed reader library, is years old; since this is a special occasion, I thought I’d share a few thoughts on the journey so far.
27  mars     18h00
Limiting concurrency in Python asyncio: the story of async imap unordered()
   in which we check if your password has been compromised in many inconvenient ways, in a tale of destruction, obsession, and self discovery.
21  février     23h02
yaml: while constructing a mapping found unhashable key
   in which we look at one or two ways to make life easier when working with Python regular expressions.
13  février     20h00
Caching a lot of methods in Python
   in which you’ll find out what could not determine a constructor for the tag PyYAML errors mean, why do they happen, and what you can do about it.
23  janvier     18h00
reader 3.4 released - 5 years, 2000 commits
   in which we use PyYAML to safely read and write YAML with any tags, in a way that’s as straightforward as interacting with built in types.
13  décembre     11h20
Has your password been pwned? Or, how I almost failed to search a 37 GB text file in under 1 millisecond (in Python)
   This is the fourth article in a series about writing my own SQL query builder. Today, we’ll rewrite it from scratch, explore API design, learn when to be lazy, and look at worse and better ways of doing things all in lines of Python
16  septembre     18h00
reader 3.0 released
   namedtuple has been around since forever, and over time, its convenience saw it used far outside its originally intended purpose. With dataclasses now covering part of those use cases, what should one use named tuples for In this article, I address this question, and give a few examples from real...
01  juillet     18h18
reader 2.14 released
   This is the third article in a series about writing an SQL query builder in lines of Python. Here, I talk about why I decided to write my own, the alternatives I considered, why I didn’t use an existing library, and how I knew it wouldn’t become a maintenance burden.
18  mai     22h24
The unreasonable effectiveness of f - strings and re.VERBOSE
   In this article, we look at a few real world examples where functions taking the same arguments don’t necessarily make a class, as counter examples to a heuristic for using classes in Python.
18  mars     18h35
reader 2.11 released
   PEP proposes adding a utility for defining sentinel values in the Python standard library. In this article, you’ll get a PEP summary, learn what sentinel objects are with real world examples , how to use them with type hints, and a bit about why PEPs exist in the first place.
22  février     22h02
yaml: could not determine a constructor for the tag
   In this article, we look at a heuristic for using classes in Python, with examples from real world code, and some things to keep in mind.
23  janvier     10h53
Dealing with YAML with arbitrary tags in Python
   This is the second article in a series about writing an SQL query builder in lines of Python, why I wrote it, how I thought about it, and the decisions I had to make. In this article, I talk about why I needed a query builder in the first place, with examples derived from real use cases I had...
29  octobre     12h55
reader 2.5 released
   In this series, we examine an SQL query builder I wrote in lines of Python, why I wrote it, how I thought about it, and the decisions I had to make. This article is a sneak peek of the series and the code.
20  août     16h42
Write an SQL query builder in 150 lines of Python
   in which we look at an interesting alternative to Makefiles with .PHONY only targets, and why I think it’s cool.
21  juillet     07h55
namedtuple in a post-dataclasses world
   In this article, you’ll find out what Python hashlib object supporting the buffer API required TypeErrors mean, why do they happen, and what you can do about it.
18  juillet     16h10
reader 2.0 released
   On your Python learning journey, you may have heard that a great way to get better is to read code written by other people. That’s true, but finding good code to study is not easy, mostly because the design philosophy and the reasoning behind the code are rarely documented. The Python standard...
28  juin     11h35
Why I wrote my own SQL query builder (in Python)
   in which we talk about the many ways of using Python dataclasses without type annotations or even variable annotations, and what this says about Python.
18  juin     12h05
When your functions take the same arguments, consider using a class: counter-examples
   In this article, you’ll learn how to calculate deterministic hashes for arbitrary Python data objects, stable across interpreter versions and implementations.
10  juin     07h50
Python sentinel objects, type hints, and PEP 661
   Are you having trouble making the modules work together in a larger project Have you tried looking at popular projects as models, but were put off by their size and scope, or found it hard to see why they did the things they did Resources about this do exist, but they’re scattered all over, and...
27  mai     09h55
When to use classes in Python? When your functions take the same arguments
   in which we optimize our Advent of Code day Conway Cubes solution, focusing on profiling and optimizing existing code, in a way that helps you translate those skills to your regular, non puzzle coding. With a touch of code generation and some help from PyPy, we end up with a x...
18  mai     15h20
Why use an SQL query builder in the first place?
   in which we solve the day problem from Advent of Code , Conway Cubes, in a generic way, focusing on testing, refactoring, and idiomatic Python, in a way that helps you translate those skills to your regular, non puzzle coding.
11  mai     07h50
SQL query builder in 150 lines of Python
  
28  avril     15h40
Using a Makefile with .PHONY-only targets? Use a run.sh script instead
  
20  avril     12h44
hashlib: object supporting the buffer API required
  
12  avril     14h55
Learn by reading code: Python standard library design decisions explained
  
23  mars     15h18
Dataclasses without type annotations
  
19  mars     17h25
Deterministic hashing of Python data objects
  
10  mars     12h00
Struggling to structure code in larger programs? Great resources a beginner might not find so easily
  
08  février     16h20
Optimizing Advent of Code 2020 day 17
  
22  janvier     15h10
Solving Advent of Code 2020 day 17 by not solving it