Thoughts on programming
Too long for a tweet, too short for a proper blog post
Procedural is simple
15 September 2020
Years ago, I wrote a couple of games using the curses library bindings for #Python. Later, I used that knowledge to write a quick start guide that’s still one of the most popular across my sites.
More recently, being between projects and not in the mood for much else, I finally got around to learning how it’s done in C. Turns out, it’s a lot simpler than in Python for the ABCs, and comparable at worst for advanced uses.
How come? In their drive to make everything fancy and by-the-book, Python programmers forgot that the typical curses program isn’t exactly a clone of the Turbo Pascal IDE. More like a glorified menu that the user can pick from by pressing a number key. It could be done in shell script, really, with the tput utility, and in fact it often is.
That’s the problem with object-oriented #programming, you see. Practicality also means being able to tell when using an industrial power drill is overkill, and you’re better off drilling holes with an ice pick.
If programmers built bridges
7 October 2020
If programmers built bridges, each bridge would last for only a year and a half before having to be torn down and replaced. After repeated protests, they’d finally come up with an “extended support” bridge that lasted for all of five years. The catch? It would be designed for the traffic from ten years ago, making it obsolete from opening day. Yet somehow it would still require maintenance every three or six months, so only half the traffic lanes would be open at any one time, making the bridge unusable in turn for cyclists, then buses, then trucks… breaking something else every time a problem is fixed.
When asked why things have to be that way, the builders would say that if they took the time to anticipate future needs and build something to last for five decades instead, a competitor would just erect their own bridge a hundred meters away and everyone would be using the shinier alternative.
Because, isn’t it, essential infrastructure is built for profit and/or bragging rights, as opposed to everyone’s benefit. Ah, modern technology.
The cutting room floor