Ephes Blog

Miscellaneous things. Mostly Weeknotes and links I stumbled upon.

Date -

Weeknotes 2024-09-30

, Jochen
There’s nothing quite like tight kerning to make a design look dean and modem. --Chris Shiflett

I didn’t manage to accomplish much this week. I was generally busy but not really making any progress. However, I attended a great local green software meetup, which was solid fun - this talk about sustainable web design for example.

Articles

Weeknotes

Fediverse

Software


Weeknotes 2024-09-23

, Jochen

This week, I released a new version of kptncook that includes a fix for Windows by setting the default encoding to UTF-8. I also attended a meeting of the Django User Group in Cologne and enjoyed a really good talk comparing Django and Laravel.

Articles

Books

Videos

Software


Type Annotations can Cause Unexpected Behavior in Python

, Jochen

Today I learned that type annotations in Python, while being valid code, can sometimes lead to unexpected problems. In a Django view, I had the following line:

def some_view(request):
    ...
    context["form"]: form
    return render(request, some_template, context=context)

This line doesn't raise a SyntaxError because the colon is interpreted as part of a type annotation, which is ignored at runtime. As a result, the line effectively becomes just context["form"], which is a no-op but still valid Python code.


It took me some time to figure out why {% if form.field.errors %} used later on was was always false. 🤦‍♂️


Weeknotes 2024-09-16

, Jochen
Be nice to us folks who wear glasses. We paid money to see you. --BobGolen

I just released a new version of kptncook because my wife's attempt to export her 800+ favorite recipes from kptncook to Paprika broke the process, so I finally had to fix it. Turns out that when you're generating JSON using Jinja2 templates, you need to remove a lot of junk characters if you want to be able to parse them again 😅.

Articles

Software

Podcasts

Out of Context Images


Weeknotes 2024-09-09

, Jochen
WHY WAS IT CALLED SINGLE-SIGN ON WHEN SIGN-ON 37 TIMES PER DAY WAS RIGHT THERE --Joe B

I'm rereading Every Layout and practicing some CSS on my own—it’s going well so far. There’s finally a new django-cast release, but I could barely remember how to put it together. Maybe I should just stick to a weekly release schedule.

Articles

Software

Fediverse

Podcasts

Out of Context Images