Entries in category “Pedantics”
Truths programmers should know about case
A couple weeks ago I gave a talk about usernames at North Bay Python. The content came mostly from things I’ve learned in roughly 12 years of maintaining django-registration, which has taught me more than I ever wanted to know about how complex even “simple” things can be.
I mentioned toward the beginning of the talk, though, that it wasn’t going to be one of those “falsehoods programmers believe about X” things. If you’re not familiar with those, you can just Google for “falsehoods programmers believe” and get a bunch ...
Let’s talk about usernames
A few weeks ago I released django-registration 2.4.1. The 2.4 series is the last in the django-registration 2.x line, and from here on out it’ll only get bugfixes. The
master branch is now prepping for 3.0, which will remove a lot of the deprecated cruft that’s accumulated over the past decade of maintaining it, and try to focus on best practices for modern Django applications.
I’ll write more about that sometime soon, but right now I want to spend a little bit of time talking about ...
How Python does Unicode
As we all (hopefully) know by now, Python 3 made a significant change to how strings work in the language. I’m on the record as being strongly in favor of this change, and I’ve written at length about why I think it was the right thing to do. But for those who’ve been living under a rock the past ten years or so, here’s a brief summary, because it’s relevant to what I want to go into today:
In Python 2, two types could be used to represent strings. One of ...
On Python 3, again
A while back, Brett Cannon went into some detail on why Python 3 happened (that is, why it was backwards-incompatible with Python 2 and why it was backwards-incompatible in the particular ways it was). Python 3 has been pretty controversial, with people I respect chiming in on both sides of the good idea/bad idea debate. And the transition (which Brett has also taken a recent look at) has indeed been slow, but that at least was fully expected — at the time, I remember announcements coming from the Python ...
Things and stuff
I’ve been awfully busy lately, but also thinking about a lot of stuff. Since microblogging is no longer really a thing I have access to (Pownce, I miss you), that means doing periodic brain dumps, yay!
Conferences and costs
Over the past few months there’s been a pretty significant conversation starting about tech conferences and “paying” speakers (where “paying” typically means at least providing a free ticket to anyone giving a talk). Which is a topic full of complicated thoughts for me.
On the one hand, the obvious argument: there’s significant overlap ...
A real Python “wat”
A few weeks ago I went through and explained the various items in a list of “Python wats” — behaviors of Python which seemingly made no sense. Calling them “wats” is a bit of a stretch in most cases, though, because most of them were simply consequences of fairly reasonable design decisions in how Python or its standard libraries work, but presented in ways which obscured what was actually going on.
Lest I be accused of defending Python too much there, I’d like to point out an absolutely genuine “wat” moment ...
Wat’s up, doc?
A stateful problem
So, this week we dropped some security updates, which you should definitely check out if you haven’t seen them yet.
We also released the first 1.3 beta, which is an important milestone since it means 1.3 is now feature-frozen and will get only bugfix and polishing work until the final release. Quite a few useful things made it in between alpha and beta, and a couple just barely slipped in under the wire. One feature in particular is near and dear to me, since I’ve been ranting about it ...
Back in 2008 I posted some rambling thoughts on distributed version-control systems, largely in response to the huge amount of hype surrounding such tools (particularly git). Then at PyCon last year, amid even more hype as it was announced that Python will switch from Subversion to a distributed tool, I gave a lightning talk reflecting on what I’d picked up and seen during the intervening eight months.
It’s now been a year and a half since that original blog post; in that time I’ve switched all of my personal projects from ...
When licenses attack
Jacob posted twenty questions about the GPL. Zed followed with an explanation of why he placed Lamson under the GPL. This has provoked some discussion around the internets, some of which I have read and some of which I’ve ignored.
Unfortunately, there’s a lot of noise drowning out useful discussion, much of it centered around alleging — directly or indirectly — that if you ask questions about how the GPL interacts with other licenses, you must be trying to “get around” the GPL, or take someone’s GPL code and use it ...
In pace requiescat
So the charter of the XHTML Working Group will be allowed to expire without renewal. This is a source of consternation for some, who feel that the W3C is perhaps sending conflicting messages — how long until we find out that HTML5 isn’t really the future, either? — and, perhaps, smug “I told you so” satisfaction for others.
I have little to add to either of those camps, so what follows here is nothing more than my rambling, disconnected thoughts on the news.
XHTML had it coming
In a way I ...
What happened today:
Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress: but no Senator or Representative, or Person holding an Office of Trust or Profit under the United States, shall be appointed an Elector.
What happens next:
The Electors shall meet in their respective states, and vote by ballot for President and Vice-President, one of whom, at least, shall not be an inhabitant of the ...
While scanning reddit, I saw an article pop up by Jeff Davis lamenting the way most people interact with databases, particularly when it comes to ORMs. Jeff seems to be pointing out (and, to an extent, conflating) two issues:
- At the moment, programming languages and SQL don’t really mesh all that well.
- Most people, in Jeff’s opinion, take the wrong approach to working with a database from their programming language of choice.
The first point is one I’m happy to concede; SQL is a fundamentally different beast from, well, pretty much any ...
Microformats and such
I hope you’ll forgive this brief diversion from my ongoing attempt to distinguish web developers from web designers, but it’s late, I’ve had a couple beers and I’ve been tinkering a bit with some code. Regularly-scheduled programming will return shortly.
So. The microformats people and the accessibility people are at war with each other, or so it seems (remember to read that article with tongue firmly in cheek). The cause of this tempest in a teapot is a simple enough question: how do you embed both a “human friendly” and “machine ...
Things I have learned about XHTML
The following are gleaned from the comments to my recent explanation of why I chose to use HTML 4.01 Strict for my redesign, rather than a flavor of XHTML, an explanation in which I mostly boiled the debate — for my needs, here on this site — down to “XHTML doesn’t offer me any compelling advantage, and it’s more complex to do right than most people know/admit”.
Advance warning: yes, this is snarky and is going to make fun of uninformed comments. Yes, I do think it’s necessary ...
Let’s talk about documentation
One of the most active threads on reddit’s programming section right now discusses things people look for when reviewing someone else’s code; the article being discussed treats this as a great interview question and points to things like algorithm choices and object-oriented design as good responses. While these are important considerations, I’ve found I tend to make snap judgments long before I get to that level of analysis, and they’re almost always based on one key factor: documentation.
Of course, I have the luxury of mostly reviewing Python code, and ...
So, as I let the dust settle from the most controversial changes I made in the redesign (and tweak some things and watch my stats in response to the constructive feedback I’ve gotten), I’d like to address the other big change that people have been asking about: why I switched (switched back, actually) from XHTML 1.0 to HTML 4.01.
The short and sweet reason is simply this: XHTML offers no compelling advantage — to me — over HTML, but even if it did it would also offer increased ...
Once again, with apologies to John Gruber…
Q: Do standards-based developers have to use
X-UA-Compatible if they care about progressive enhancement for future browsers?
A: As I see it, yes.
Q: Doesn’t Internet Explorer already offer a fine-grained way to target specific versions?
A: Yes, definitely.
Q: So if there was a problem with the IE6 to IE7 transition, doesn’t that mean people weren’t properly using an existing tool which could have future-proofed their sites?
A: You may rely on it.
Q: Given that, is it likely that people will properly use a new ...
The future of web standards
The world of standards-based web design and development has been undergoing something of a shake-up these past few days; Andy Clarke’s “CSS Unworking Group” seems to have opened the floodgates to expressions of dissatisfaction with the current method of progress (or lack thereof) in developing and standardizing new features for web developers and designers. Alex Russell’s “The W3C Cannot Save Us” and my friend and former colleague Jeff Croft’s “Do we need a return to the browser wars?” continue the theme, as does Stuart Langridge’s “Reigniting the browser ...
A chronicle of the Ages of the Web
Sometime pretty soon (in fact, in the very next thing I write), I’m going to need some consistent way to refer to different periods in the history of the Web. I don’t know of any widely-accepted chronology for this, and I especially don’t know of any which really fits with the sort of references I’m going to need to make, so, with apologies to J.R.R. Tolkien, I present my own chronicle, derived from one too many nights of having re-read The Lord of the Rings when I should ...
I can’t believe it’s not XML!
As you may or may not have heard, JSON came to Dave Winer’s attention today. He is, quite obviously, of the opinion that this is just a reinvention of what people are already doing just fine with XML, thank you very much, so what’s the point?
Of course, this ignores the fact that the Lisp folks have been making the same argument for years, wondering why there was this great pressing need to go out and invent XML when s-expressions were just dandy.
But once you get past the egos and the ...
Defenders of design theft
When a case of alleged design theft on the Web — the appropriation of one or more elements of a site’s design, without permission — is exposed, there is an elite group of mentally-challenged individuals who spring into action to defend said theft. Their arguments never vary; they stay the course and seem to assume that if they simply repeat themselves often enough, their lack of functioning neurons will be ignored.
Broadly speaking, these arguments fall into three categories. I pray you’ll forgive my abominable Latin grammar in describing them.
Django, gzip and WSGI
One of the available middleware components for Django allows content to be gzipped for output when the client specifies ‘gzip’ in its
Accept-Encoding header; this is handy because it both conserves bandwidth and allows pages to be downloaded more quickly. Most popular web servers allow this (Apache via
mod_deflate, lighttpd via
mod_compress, etc.), but it’s ...