this post was submitted on 24 Apr 2025
208 points (100.0% liked)

Comic Strips

17636 readers
1607 users here now

Comic Strips is a community for those who love comic stories.

The rules are simple:

Web of links

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 2 months ago (2 children)

I’m starting to understand why programmers are always so angry…

[–] [email protected] 6 points 2 months ago (1 children)

Oh no this isn't it, this is extremely basic. As a programmer you will encounter way way more complex logic problems, so logic problems become 2nd nature. And it can be frustrating when "normies" don't understand what appear to a programmer to be a matter of pretty simple logic thinking.

[–] [email protected] 3 points 2 months ago (1 children)

As a “normie” I’d never assume to understand even the most basic of programming. My head hurts to even try and come up with a joke involving the subject.

[–] [email protected] 4 points 2 months ago (1 children)

It's so nice we have people like you, that allows us to feel superior, even if we are inferior in every other way imaginable. 👍

[–] [email protected] 3 points 2 months ago (1 children)
[–] [email protected] 4 points 2 months ago (1 children)

Because it's the same? Or because it's very different?
My wife was a professional musician for a few years.

PS:
Do you get this joke?
The wife sends the man for shopping and asks him to buy 1 liter milk and if they have eggs buy 12.
When he comes home, she looks at him astonished, why did you buy 12 liters of milk?
Because they had eggs he responds.

[–] [email protected] 3 points 2 months ago

I do get that joke, but that’s probably because I’m of the ASD persuasion.

[–] [email protected] 3 points 2 months ago (2 children)
[–] [email protected] 2 points 2 months ago

Ahh. Makes sense that it can be automated. Same as with audio engineering. Though I like to normalize by hand sometimes as automated normalization tends to make a track sound lifeless and dead.

[–] [email protected] 1 points 2 months ago

A Perl program to convert the number of digits in the first numeric field that appears in a list of filenames.

source

#!/usr/bin/perl -w
# numberit.pl
# Converts between number formats (number of leading zeros) in numbers in title names
# Usage: <number of digits> filelist

$digits = shift (@ARGV);

if ($digits > -1)
{
    foreach $oldName (@ARGV)
    {
        $newName = $digitValue = $oldName;

        if ($digitValue =~ m/\//) {
          $digitValue =~ m/^(.*\/[^0-9\/]*)([0-9]+)([^\/]*)$/;
          $prefix = $1;
          $postfix = $3;
          if (!defined($prefix)) {
            $prefix = "";
          }

          $digitFormatted = sprintf("%0${digits}d", $2);

        } else {
          $digitValue =~ m/^([^0-9]*)([0-9]+)([^\/]*)$/;
          $prefix = $1;
          $postfix = $3;
          if (!defined($prefix)) {
            $prefix = "";
          }

          $digitFormatted = sprintf("%0${digits}d", $2);


        }

        if ($digitValue) {
          $newName = $prefix . $digitFormatted . $postfix;
          rename($oldName, $newName);
        }
      }
}

Looks something like:

$ touch a1.mp3
$ touch a2.mp3
$ numberit.pl 3 *
$ ls
a001.mp3  a002.mp3
$ numberit.pl 2 *
$ ls
a01.mp3  a02.mp3
$