Dom Weldon: Why & how, your Python code should be Declarative in the Age of Gen. AI

Python Ireland
30 views •

Why, and how, all your Python code should be Declarative in the Age of Generative AI Dom Weldon Python is an excellent scripting language, and its syntax and wider ecosystem have evolved over the past three and a half decades allowing it to be used to build (almost) anything. However, the strength that this flexibility offers can also be a source of weakness: because it's so easy to write a script that simply does something, what that 'something' is, and why it's being done, often goes undocumented and forgotten. This is especially true in large organisations where individuals come and go, but scripts and applications stay put. In recent years, particularly after the advent of the typing system in version 3.5, and then runtime annotations in 3.9, Python has begun to offer powerful ways to go beyond simply documenting code, and instead to record structured metadata about what code is doing and why, inside code itself. This has proven of particular use for framework builders and platform engineers, but is there for everyone involved with Python code and the technologies and processes we build with it to use. This talk will cover some of these tools and patterns, before exploring their significance in the context of new generative-AI powered systems for writing code and building technology. In particular, we'll look at the uses and abuses of the typing module's Annotated object (a Special Form), and its integrations with essential libraries like Pydantic. The talk will then move on to explore other sources of metadata within our code, such as that recorded in frameworks like ORMs, API implementations, and explicit stores of metadata like pyproject.toml. Most importantly of all, however, the talk will argue that as engineers working in a high level language, Pythonistas need to rethink what it means to write code in a world where there are tools that will so readily write it for us. Instead of writing code to do technical work, we instead need to develop deep understandings of our businesses, processes, projects, users, and colleagues, to structure and record what we want to do, and why. We'll steer clear of "prompt engineering" and "vibe coding", and instead make a brief detour into the often misunderstood academic discipline of Geography to argue for a new approach to writing Python in 2025 and beyond. Talk room 1 (400 people) Sat 4:50 pm - 5:20 pm

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close