Untangled Development

Home ·  Blog ·  About

Gemfinder Q1 2022; keeping up with web development

Articles I’ve encountered in Q1 2022 that struck a chord. And that I may be sharing around in PMs, or PR review comments, with colleagues going forward! Tried to organise them in these sections:

Software Engineering

How to keep up with web development without falling into despair

By Baldur Bjarnason. This is an excellent post. It starts by describing the problem:

People say that web development is unique because of the fast pace and volume of changes in the field. [..] web development seems unique in invoking this feeling of helplessness.

It is unique in overwhelming those of us who practise it, but it isn’t uniquely fast-paced.

I’m not talking here about the difficulty of doing or learning the job.

It’s the task of keeping up with change and new developments in the field once you’re in it. In that regard, web dev isn’t unique.

If anything, compared to fields that still have active research going on (which isn’t the case for software or web dev) like medicine or biotech, the pace of change is arguably much, much lower in web dev.

But, this feeling of being spread too thin, of being unable to keep up, is real.

Hits very close to home, right?

He then describes approaches professionals in other fields use to handle constant change. The first two are not applicable to web development. Baldur explains why. But the third, i.e. being research-driven on current “work questions”, works for him.

All “new” stuff is pushed onto us by a barrage of articles, tweets, newsletters. This makes the situation unmanageable. Helplessness ensues. Instead Baldur proposes taking quick notes, and then pulling only what you need. (I’m oversimplifying. Read his post.)

Note that he sets aside 2h/day. He doesn’t use them all, every day. But still, my first mistake is not allocating any time at all. And just attempt to fit “keeping up” in between other tasks I’m working on. A lose-lose situation.

That said, this ought to work for me too. Perhaps for you too. So give that link a good read. Hope that helps. I already started to formalise this process to keep keeping up.

How I build a feature

In this post Simon Willison documents his own process of “building” a feature. Simon maintains and directs several open source projects. So this is an interesting peek into the steps he takes.

It’s interesting that most steps do not directly implement the feature. But lead to a better, more predictable process. The resulting projects are the natural consequence to this process.

Python & Django

Quick tip: Reverse that if-statement

By Marijke Luttekes, makes the case to return control out of a programming construct as soon as possible:

This technique revolves around breaking from a function, loop, or script early instead of nesting if-statements into other if-statements.

As a result of this technique, code flow becomes flatter and less indented.

I have been asking for this specific practice a lot during PR reviews. So I will just link to this post going forward 😎

My (free) Django monitoring stack for 2022

Another great post by Matt Segal on the (free) tools he uses for:

  • Uptime monitoring
  • Error reporting
  • Log aggregation
  • Tracking performance

Trailing URL Slashes in Django

In this post Will Vincent makes a practical example around Django’s default APPEND_SLASH functionality. Using this example he shows why it’s always good practice to add a trailing slash to URLs in your Django project.

How to Make Django Raise an Error for Missing Template Variables

In this post Adam Johnson provides four approaches to catch template-level issues. Issues that would otherwise “fail silently”.

  1. First approach is very easy to setup. As it uses an option the Django template langauge provides: string_if_invalid. Docs. This approach however has severe limitations (details in Adam’s post) and cannot be enabled in production.

  2. The MissingVariableErrorFilter Adam has written makes up for any limitations the previous, simple approach might result in. But this approach may result in HTTP500 errors for projects already deployed to production.

  3. The logging-missing-variables-as-errors approach is therefore used to log errors. I.e. only log without resulting in HTTP500 for the application’s users.

  4. The last-suggested approach is Jinja-templates specific.

Git

How to Squash and Rebase a Git Branch

It can be tiresome to rebase feature branches with many commits. You may have several commits that conflict with your main branch. Before rebasing such branches, you may want to squash your commits together, and then rebase that single commit, so you can handle all conflicts at once. Here’s how to do that.

I have been using interactive rebase to clean up commits before opening a PR. I.e. when Bobby Wallace showed me how back in 2014. And how better PRs would look as a result.

It seems I have been doing it kinda wrong since then. As I’ve only learned about the fixup operation during a rebase only 8 years later. That is while reading Adam’s post above. I have been manually deleting squashed commits’ messages text since then! Oh well!

Will be sending the link to this post around! Thanks Adam!

Conclusion

Hope you find the above links as helpful as I did.

Subscribe via Atom feed, Twitter, or email:

I won't spam you. I'm too lazy. And I hate spam. Maximum one email per month. Thanks!