Simon Willison’s Weblog

Subscribe
Atom feed for james-bennett

19 items tagged “james-bennett”

2023

Several libraries let you declare objects with type-hinted members and automatically derive validation rules and serialization/deserialization from the type hints – Pydantic is the most popular, but alternatives like msgspec are out there too. There’s also a whole new generation of web frameworks like FastAPI and Starlite which use type hints at runtime to do not just input validation and serialization/deserialization but also things like dependency injection.

Personally, I’ve seen more significant gains in productivity from those runtime usages of Python’s type hints than from any static ahead-of-time type checking, which mostly is only useful to me as documentation.

James Bennett

# 7th April 2023, 2:19 am / james-bennett, python

2022

Boring Python: code quality. James Bennett provides an opinionated guide to setting up Python tools for linting, code formatting and and other code quality concerns. Of particular interest to me is his section on packaging checks, which introduces a whole bunch of new-to-me tools that can help avoid accidentally shipping broken packages to PyPI.

# 20th December 2022, 7:55 pm / packaging, james-bennett, python

2020

James Bennett on why Django should not support JWT in core (via) The topic of adding JWT support to Django core comes up occasionally—here’s James Bennett’s detailed argument for not doing that. The short version is that the JWT specification isn’t just difficult to implement securely: it’s fundamentally flawed, which results in things like five implementations in three different languages all manifesting the same vulnerability. Third party modules exist that add JWT support to Django, but baking it into core would act as a form of endorsement and Django’s philosophy has always been to encourage people towards best practices.

# 1st August 2020, 12:28 am / security, django, james-bennett, jwt

2009

History of Django’s popularity. “What sequence of events made Django the most popular Python web framework?”—insightful answers from Alex Martelli and James Bennett.

# 4th October 2009, 10:29 am / django, python, history, alex-martelli, james-bennett

Insofar as it encouraged workaday web professionals to recognize that there are such things as best practices independent of particular browser implementations, I think XHTML can be termed successful. Insofar as it got people thinking about the possibility of a better Web ahead of us, I think XHTML can be termed successful. Insofar as it changed the popular conception of professional web design and thrust standards into the forefront, I think XHTML can be termed successful.

James Bennett

# 8th July 2009, 7:36 pm / james-bennett, web-standards, xhtml

2008

On packaging. James Bennett discusses the problems with setuptools (and ruby gems), and recommends Ian Bicking’s pip as a setuptools replacement.

# 14th December 2008, 4:57 pm / python, setuptools, pip, ian-bicking, james-bennett, ruby, gems

James Bennett: Why HTML. Finally, somewhere to point people when they ask why I avoid XHTML that’s a bit more up to date than Hixie’s rant from 2002.

# 18th June 2008, 12:27 pm / xhtml, james-bennett, html, ian-hickson, hixie, web-standards

There are two [Wikipedias]: One is the public-facing reliable-enough-on-average encyclopedia that people read every day, which makes for nice fluff pieces in the media about "these new Web thingamajigs that the kids are building, aren't they neat?". The other is the insular behind-the-scenes bureaucracy, which reads like an improvised performance of the collected writings of Clay Shirky.

James Bennett

# 16th June 2008, 8:16 am / clay-shirky, james-bennett, snark, wikipedia

Minimal. James Bennett follows Ryan Tomayko’s example and experiments with the minimalist school of blog design.

# 15th June 2008, 11:40 am / james-bennett, ryan-tomayko, design, minimalism

James B. on Pownce (via) James Bennett has started using Pownce for sort of medium-format blog entries, longer than a tweet but shorter than a blog essay and delivered with a healthy dose of snark.

# 2nd May 2008, 9:15 pm / snark, james-bennett, pownce, blogging

Legacy. James Bennett has what I think is the most interesting analysis of the X-UA-Compatible header to date.

# 23rd January 2008, 2:14 pm / james-bennett, xuacompatible, internet-explorer, ie8, browsers, web-standards

2007

The future of web standards. Nice analysis from James Bennett, who suggests that successful open source projects (Linux, Python, Perl etc) could be used as the model for a more effective standards process, and points out that Ian Hickson is something of a BDFL for the WHAT-WG.

# 17th December 2007, 1:16 pm / w3c, bdfl, whatwg, ian-hickson, james-bennett, web-standards, linux, python, perl, open-source, standards

Updates to template_utils. James Bennett’s Django template_utils library now provides tags for consuming external RSS and Atom feeds. Combine with template fragment caching for an instant mashup written just using templates.

# 10th December 2007, 3:25 pm / james-bennett, django, templateutils, rss, atom, feeds, universalfeedparser, python

Newforms, part 1. James Bennett provides a detailed description of Django’s newforms (not so new now though, they’ve been around for over a year), complete with attractive diagrams.

# 23rd November 2007, 11:54 pm / james-bennett, newforms, django, python

Django documentation bookmarklets. James Bennett continues his month-long series of daily Django tutorials with documentation for one of Django’s best kept secrets: application introspection HTTP headers and bookmarklets that make use of them.

# 8th November 2007, 10:59 am / bookmarklets, django, james-bennett, python, introspection

JavaScript Minifier that doesn’t break code (via) Perl re-implementation of Douglas Crockford’s classic JSMin that doesn’t clobber IE’s conditional comments, by Peter Michaux.

# 4th June 2007, 5:44 pm / douglas-crockford, jsmin, james-bennett, internet-explorer, ie, conditionalcomments, perl, pete-michaux, javascript

Django snippets. James Bennett’s new site for Django snippets. The source code to the whole site is available.

# 26th February 2007, 10:08 am / django, django-snippets, james-bennett, python

mimeparse.py (via) Parsing mime-types is harder than you might think.

# 8th January 2007, 6:43 pm / mimetypes, python, james-bennett