site banner

Small-Scale Question Sunday for August 31, 2025

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

The original draft of my story explicitly called out my basic bitch taste. I removed it because I (correctly) excpected all the professional programmers here to call me out on it, it's what we in the writing business call a hook, heh.

Look, the design of Python is very human, and in a good way. It's not verbose, does a lot of heavy lifting for you, and there are no end of handy libraries. I never needed near bare-metal performance or felt the desire to do my own garbage cleanup.

Despite me giving you shit I actually do quite a bit of Python, because it's really the best scripting language available for Linux. I wouldn't call it my favorite language, but it is probably the language I use most.

I’d say the good thing about python is it lets you do just about anything. Any attributes of an objects can be called at any time, you can pass anything into any function, etc.

The bad thing about Python is of course that it lets you do just about anything.

I know just enough Lambda calculus to grokk that programmers/computer scientists think it is normal to treat functions as first class citizens and pass them in and out of each other like a human centipede. Either way, I have libertarian tendencies and I appreciate the opportunity to shoot my head off with a gun.

(I genuinely like Python, and it certainly beats Javascript, which is what I was taught in school)

Either way, I have libertarian tendencies and I appreciate the opportunity to shoot my head off with a gun.

May I introduce you to the lovely world of C++?

Although Undefined Behavior might better be described as a large caliber chaingun firing explosive rounds…

UB is bad enough that some people built an entire language (Rust) specifically to make it almost impossible. Sure, it has the learning curve of a cliff. Sure, the language stands in the way of doing almost anything ELSE you want to do, unless you do it in the one roundabout clunky way that the language designers permit. But the True Believers like shouting from the rooftops about how this is a Good Thing, Actually.

Nah. If UB always fired explosives it wouldn't be nearly as bad. What's diabolical is that UB is allowed to be a squirt gun on your test system and then switch to rapid-fire explosives as soon as one of your users installs a minor OS patch.

The thing that blew my mind when learning programming was that functions could be held in variables. Like this is a perfectly valid (if bad) chunk of code:

def multiply(A, B):
    return A * B

def add(A, B):
    return A + B

def doMath(operation, A, B):
    return operation(A, B)

doMath(multiply, 3, 4)

It blew my mind when I first learned about it too!

In some sense this is the same sort of mental gestalt shift that is at the basis of all scientific thought, and is therefore a useful experience for everyone to undergo.

What if a function were an object just like any other, and therefore subject to all the same sorts of operations, you can pass it around, access its properties, etc.

What if the human mind/body were an object just like any other, and therefore subject to all the same sorts of physical laws, etc.

It's one of those things which is really useful when you need it, though it can be hard to spot the utility when you are first learning. When I learned about functions as data in college I asked the professor why you would ever need to use that technique (and which, shame on him, he couldn't answer). But I've since found it to be absolutely clutch even if not something you use 90% of the time.

It's especially useful when you're writing reusable framework code, e.g. your UI library will probably have something like register_callback(Function f, Widget w) so you can perform action f whenever button w is clicked. But if you're just writing "app" code as opposed to "framework" code it may not come up as often.