1. Loving Django’s prefetch/select_related — that, along with a few small changes, reduced a task which was taking > 500,000 queries to 4558

  2. I’m thinking the time might have come to write a wrapper around DOMDocument which actually makes it usable. Thoughts:

    • automatic conversion of various encodings to HTML entities to scoot round encoding issues
    • XPath queries still work but querySelector and querySelectorAll are implemented for both the document and individual elements via Symfony XPath → CSS converter and relative XPath queries
    • A DOMNodeList which actually implements ArrayAccess instead of acting like a fake array
    • Perhaps some javascript-inspired property names like innerText, innerHTML for consistency
    • Maybe some jQuery-influenced shortcut goodness for doing things like removing/replacing elements
  3. When dealing with character encoding issues I repeatedly get this feeling that we need to throw away computing and programming and redesign it all in a way which prevents stupid, hard-to-debug problems from happening live in trees and eat pita bread all day

  4. tip: if you come across weird inconsistencies between apps when trying to serve static files in dev, run with runserver --insecure even if you have DEBUG=True

  5. Emil Björklund: What is the equivalent of a unit test for HTML + CSS? (Yes, I know of Selenium, webdriver etc, but I'm fishing for other answers as well.)

    @thatemil I’ve always considered style guides/pattern libraries to be unit tests for HTML+CSS, and you could automate them with JS if they get too unwieldy.

  6. Testing websites on old windows mobile devices is an… experience.

    Connecting to WiFi gave me the option of connecting to “The Internet” or “Work” (?).

    On form submit using the software keyboard, I get a dialog warning me about the certificate, with the options “yes” and “no” but no question. Turns out the software keyboard was hiding “Do you want to proceed?”

    Now I’m finally in the site, there’s no support for label, so those nice big touch targets I made are mostly useless. Also, there’s no text wrapping.

  7. If you want to generate real PDFs from HTML (i.e. with page breaks and real text, not just vast screenshots inside a PDF) then wkpdf is the way to go. Super fast, installs easily, great output.