this post was submitted on 11 Jul 2024
448 points (97.5% liked)

Programmer Humor

19551 readers
1019 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Meme transcription [Kid drowning in pool]

In the background a person plays with a kid in the pool. The person is labeled “Companies updating their website”. The kid is labeled “The company logo”.

In the foreground a kid seems to be drowning. It is labeled “Useful information”.

In a second panel a skeleton sits at the bottom of the pool. It is labeled “The copyright year”

top 30 comments
sorted by: hot top controversial new old
[–] [email protected] 46 points 4 months ago (1 children)

At least in Europe the year after the copyright statement has no meaning, and even the copyright statement itself is useless. Since if not stated otherwise, no rights are granted by default.

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

Indeed. Yet every webpage ever has an outdated copyright year.

[–] [email protected] 22 points 4 months ago

[checks personal website]

Yes, shame on them!

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

I thought everyone does <?php echo date("Y"); ?>

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

No no, we do

time_t t = time(NULL);
struct tm tm = *localtime(&t);
tm.tm_year + 1900;

Everyone writes their web server in plain C, right?

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

The cool thing to do now is to write it in Rust, only using the standard library.

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

And I hate it. Nice concept, but I don't like neither, the language nor compiler.

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

It’s a very different vibe. I remember my first seg fault in C - kids days are missing out!

[–] [email protected] 2 points 4 months ago (1 children)
[–] [email protected] 1 points 4 months ago (1 children)
  • The C compiler, when I parse a &(float) as (long) (it's actually an evil floating point hack to run Quake III on an X86_64 CPU emulated in Scratch running on Spotifys Car Thing) (This would never be possible in Rust)
[–] [email protected] 2 points 4 months ago* (last edited 4 months ago) (1 children)
[–] [email protected] 1 points 4 months ago (1 children)

Yes, but

  1. it's unsafe, therefore not really Rust I'd argue
  2. it doesn't look as good
float Q_rsqrt(float number) {
   long i;
   float x2, y;
   const float threehalfs = 1.5F;

   x2 = number * 0.5F;
   y = number;

   i = * ( long * ) &y;
   i = 0x5f3759df - ( i >> 1 );
   y = * ( float * ) &i;

   y = y * ( threehalfs - ( x2 * y * y ) );
   return y;
} 
[–] [email protected] 2 points 4 months ago (1 children)

Please don't tell me you, unironically, actually use the Carmack rsqrt function in the year of our Linux Desktop 2024.

Also if you like, you can write unsafe Rust in safe Rust instead.

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

No. But somebody may be.

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

Well, everyone who’s coding their websites is, yeah. Seeing how almost 10% of all websites use Elementor now and are built by people without an understanding of coding concepts, there are probably plenty of websites that don’t output their copyright year dynamically.

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

Elementor has this feature, though.

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

Also:

they: you can find the solution for your problem here

clicks on the 'here' link

404

[–] [email protected] 7 points 4 months ago

This happened at my work with internal docs as we switched from an ancient intranet to a new service that had a ton more features but no backwards compatibility so all the pages got updated to PDFs with helpful links that went nowhere and it caused chaos for like 3 months.

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

When they don't update it, im legally allowed to go into the inspect elements and copy all the code.

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

view-source:https://url for easy copying.

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

Tangentially related, I remember at one of my jobs being tasked (several years in a row) with updating the copyright year in all our source files' headers.

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

it's probably a red flag if your website can't do currentYear() in the footer.

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

that's actually an anti-pattern. the purpose if a copyright notice is not to declare the current year to each visitor, fyi.

[–] [email protected] 0 points 4 months ago

Yes, it's actually to notify people who aren't part of countries with membership to the WTO of the first available year of public declaration of distribution without restriction, however, putting "1997" on your website makes it look old so people put current year to make it look new.

It's only legally distinct in Aruba, Eritrea, Kiribati, Micronesia, North Korea etc... so it's almost entirely useless.

I meant it's a red flag if someone can't spin up the code and is making an intern change it by hand every year.

[–] [email protected] 5 points 4 months ago

Or have a single general footer that they all refer to.

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

Well it wasn't a website, for what it's worth.

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

that's where date('Y') comes in

[–] [email protected] 11 points 4 months ago

Year of the tiddies

[–] [email protected] 6 points 4 months ago

I read this as boobs.

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

Is that your date?