Gemfinder Q4 2021; What is Software Engineering?
Articles I’ve encountered in Q4 2021 that struck a chord. Very late, I know! Tried to organise them in these sections:
By Adam Johnson, is about Adam’s insights his experience reading Software Engineering at Google: Lessons Learned from Programming Over Time :
Software engineering can be thought of as “programming integrated over time.” [..] Time brings changes, both to the program and its environment. And these changes require answers to questions [..] Many software engineering practices exist to help solve these questions [..] The longer your program lasts, and the more valuable it becomes, the more you will need software engineering practices.
I found this an enjoyable read. The author, Brett Cannon, couldn’t have said it any better:
Consider optimizing for developer time, not computation costs.
Python is easy-to-learn and widely-used. I.e. a good language to start a project with.
Question is this:
As a software developer who is not good at programming, how do I hide myself in a tech company and not get caught out?
Full answer in the link above. What struck me is Al’s definition of what programming is:
I don’t know why everyone wants to be a programmer, and everyone thinks that anyone can learn programming, just like everyone can learn proper grammar. It’s more like art - if you’re not artistic, you’ll never “learn” to be artistic, you’ll keep squeaking through art classes without learning much. The same goes for programming - if you’re not analytical, you’ll never learn to be analytical, so you’ll always be a programmer looking for someone to show you how to solve the problem you’re working on.
Al goes on to define what he means by analytical:
Survival is mainly “fight or flee”. If a lion came at you, 50,000 years ago, you didn’t analyze things, you just hoped that he’d run out of strength before he caught you. Analyzing him for a few minutes didn’t get those “analysis genes” passed on, they became lion food. Humans are pattern-seeking animals. We’re also non-analytical animals. Programming is analytical, so not many of us can actually do it. Code something that someone shows you how to do? Yes. But analyzing the problem to come up with a solution? That’s not common. But what it is, is programming.
I agree that being analytical is a trait. All the great engineers I worked with are to some degree analytical. However I have some questions:
- How do you determine if a person is analytical?
- Is it that black and white a trait? Can’t a person become more analytical? With time and experience?
I have no answer to these, yet. But somehow I don’t see it as a “zero or hero” situation.
Also such argument can be used for gatekeeping. Which is always bad.
Great post by Craig Kerstiens, with five actionable tips:
- Set a statement timeout. This can save you from your DB going down (or CPU up!)
- Ensure you have query tracking. Feat.
- Log slow running queries. Feat.
- Improve your connection management. Optimise your framework/ORM’s default connection pool to your database.
- Find your goldilocks range for indexes. An index can become more a liability than an asset over time.
Full details in the linked post.
Python & Django
Are you familiar with Joel Spolsky’s “Joel Test”? It consists of twelve yes/no questions to judge a team’s processes. Or as Adam puts it, to check “a software engineering team’s technical chops”.
One of the best aspects of working with Django is its third-party package ecosystem. In fact all Django engineers have their few favourite packages. I myself have mine that I don’t imagine myself working without.
This also means that I have worked on projects that relied on a package that became out-of-date. It’s not an easy situation:
- need to find a replacement, usually a fork
- or code your own solution
Unless you decide to somehow take charge and maintain the package yourself. Which, if you’re freelancing, good luck getting paid for that!
So judging whether a project is well-maintained is important. Adam came up with twelve checks to ask when adding a third-party package to your project:
- Is it described as “production ready”?
- Is there sufficient documentation?
- Is there a changelog?
- Is someone responding to bug reports?
- Are there sufficient tests?
- Are the tests running with the latest
- Are the tests running with the latest
- Is there a Continuous Integration (CI) configuration?
- Is the CI passing?
- Does it seem relatively well used?
- Has there been a commit in the last year?
- Has there been a release in the last year?
Do you need a task queue in your web app? This is a nice post on when to start using multiple queues in Celery, and how to do it.
In this article Michael Karamuth goes through a variety of approaches to model polymorphism in Django models.
Whether you agree with each or not, it is a nice refresher of the variety of modeling approaches the Django ORM offers.
My preference is the
contenttypes contrib module. Docs here.
So much buzz around htmx lately. Two links I might need to refer to soon:
- django-htmx-fun, by Thomas Güttler. A github repo containing “a small Django application to advertise the fun htmx can bring you”!
More like “oops” section this time:
Though experiment by Tim Bray.
Suppose you’re running your organization’s crucial apps in the cloud. Specifically, suppose you’re running them them on AWS, and in particular in the “us-east-1” region? Could us-east-1 go away? What might you do about it? Let’s catastrophize!