Plurrrr

Sat 26 Nov 2022

You can program functionally in any computer language

A few days ago I wrote a comment on The Orange Site that seemed to strike a chord there. The comment was about applying a few principles of functional programming in any language (well, maybe not BASIC from the 70s or 80s, but these versions of BASIC aren't used much these days). There's no need for functional application, functional composition, first class functions, monads, (“Monads! How do they work?”) or even currying. No, I feel like you can get about 85% of the way to functional programming by following three simple principles.

Source: You can program functionally in any computer language, an article by Sean Conner.

Test factory functions in Django

When writing tests for Django projects, you typically need to create quite a lot of instances of database model objects. This page documents the patterns I recommend, and the ones I don’t.

Before I get going, I should mention that a lot of this can be avoided altogether if you can separate out database independent logic from your models. But you can only go so far without serious contortions, and you’ll probably still need to write a fair number of tests that hit the database.

Source: Test factory functions in Django, an article by Luke Plant.

Fall (2022)

Best friends Becky and Hunter find themselves at the top of a 2,000-foot radio tower.

In the evening Esme and I watched Fall. At first I was not sure if I would be able to watch the movie because I am very afraid of heights. But with only one short break I managed to watch the whole movie. I liked it and give the movie a 7 out of 10.