mindly.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mindly.Social is an English speaking, friendly Mastodon instance created for people who want to use their brains and their hearts to make social networking more social. 🧠💖

Administered by:

Server stats:

1.1K
active users

My #Python script is dancing dangerously on the line of application and wants to be both and that is a very uncomfortable place to be 😑🐍

C.

@Em0nM4stodon

"If I don't split it into multiple code files, I can still call it a script, even if it's 2500 lines..."

@cazabon Can you? When does a script loses its script-status?

Genuinely looking for insights on this.

@Em0nM4stodon

Pulling tongue out of cheek, to me a script is essentially a quick hack, in the good sense of the word. It does something conceptually simple, is self-contained, and doesn't depend on other resources.

If it becomes more than that (or starts out more), I think of it more as an application, and it should almost certainly be divided into modules and/or packages.

[...]

@Em0nM4stodon

The actual lines-of-code isn't the most important, I think. I have 1000-line scripts which are conceptually simpler than applications with half as much code.

It applies to other languages equally, I think. @jwz 's `youtubedown`, for example, is a pretty large Perl script, over 7000 lines -- but it does exactly one thing, does it well, and counts as a script in my book.

@Em0nM4stodon @jwz

And yes, to be technical, youtubedown does "exactly one thing" for certain large values of one. :)