RSSAmplifier

Blog

~gallant

Thoughts and Code

gallant.devRSS feed ↗10 posts

Latest posts

Whither poetry?

I have a soft spot for poetry. That is what poems are for - sentimental musings and meditative cogitation. These are perennial features of humanity, and well worth the time. As we find ourselves in interesting times , the gap between reality and the narrative of progress is growing, and applied human intelligence (aka "technology") is "disrupting" (aka changing without full context) many things.…

Knowing Where To Tap

You've likely heard some variant of the morality story where someone justifies their (commercial) worth as mostly a matter of knowledge, and not just labor. A typical version is as follows - a handyperson is hired to fix a failing heater. They spend a few minutes investigating and listening to it from a variety of locations, and then tap a particular spot with a hammer and fix it. They bill the…

A Consideration of SQL ORMs

Conventional wisdom in modern software development generally endorses the use of an ORM. "Any project that doesn’t use an ORM will end up with a poorly implemented partial ORM." Most developers are familiar with the dreaded SQL injection attack - an ORM provides solid protection, while exposing a comfortable OOP interface for application developers: from blog.models import Blog , Entry entry =…

The Blurring of the Public Square and the Megaphone

I originally envisioned writing this post some time back - in early 2022, Twitter escalated its dark patterns, requiring accounts (or viewing on a phone) to see certain content. My draft sat long enough (though less than a year) for that to become quaint, but the point I intend to make is increasingly relevant - that we are witnessing a blurring of the public square and the megaphone, and that…

Life is Context - Language is Specificity

"Aaaaarrrrggggh!" What does that mean? It could mean I stubbed my toe - or it could mean I dropped something. Somebody may be in mortal danger - or maybe they just read a disagreeable headline. For understanding life, language is a magnificent - yet wholly inadequate - tool. Linguistic communication enables specificity that promotes technological advancement and social coordination. Formal…

Superstition - an engineering anti-pattern

Design patterns are reusable approaches to common problems - anti-patterns are the same, but ineffective (and even counterproductive). An example of a design pattern is the singleton - we often want to allow access to a resource, without incurring the cost of building it over and over. Computationally, this means restricting the instantiation of a class to a singleton, and then coordinating access…

Exclude Unnecessary Information

The Elements of Style urges us to "omit needless words": Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts. This requires not that the writer make all their sentences short, or that they avoid all detail and treat their subjects…

Slack Tasks

"You've got to hustle. Have a side-gig. Do personal projects. Build a personal brand." Such tips are frequently offered, commonly aspired to, and irregularly achieved. It is not entirely poor advice - but it is unduly simplistic. The general idea is that you've got to somehow achieve concurrency - both multitask, and execute well and with focus. And, for a human, this isn’t really possible. So…

Yes, yet...

"Yes, and..." is a concept from improv comedy that means to affirm and build on what others do. Beyond improv, it has been popularized as a pragmatic approach to positivity - say "yes" to validate and encourage others to engage, and say "and" to be sure to engage yourself. But what about "yes people" who blindly endorse poor decisions ? And what about the need to say no to manage your time ? To…

Big O(Weird)

#!/usr/bin/env python steps = 0 def f ( x ): global steps for i in range ( x * x | 42 , x | 42 , - 42 ): steps += 1 yield i def g ( y ): global steps z1 = f ( y ) z2 = f ( y * y ) z1l = [ z for z in z1 ] steps += len ( z1l ) xyz = 0 for z1 , z2 in zip ( z1l , z2 ): steps += 1 if z1 == z2 : pass xyz += ( z1 + z2 ) return xyz def h ( z ): global steps tots = 0 for i in range ( z ): steps += 1 if not…