this post was submitted on 22 Oct 2023
613 points (95.7% liked)

Programmer Humor

32143 readers
146 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] writeblankspace@lemm.ee 5 points 11 months ago

Thief, or Procrastinator.

[–] TonyToniToneOfficial@lemmy.ml 5 points 11 months ago (1 children)

Last one should be // still a student

[–] xmunk@sh.itjust.works 4 points 11 months ago

Every single entry other than thief is "still a student"

[–] cpw@lemmy.ca 4 points 11 months ago

Max11 is all my code. Why doesn't it work????🤔

[–] pomodoro_longbreak@sh.itjust.works 4 points 11 months ago

Yoink.

Actually I've probably been all of these at various times in my career.

[–] Windex007@lemmy.world 4 points 11 months ago

I use 8, but only when I'm operating on unsigned longs.

[–] affiliate@lemmy.world 3 points 11 months ago

here’s another mathematical approach (that has the added benefit of only working when x and y are both positive).

let f denote the linear functional on ℝ^2^ defined by f(1,0) = x and f(0,1) = y (and extend by linearity). then the operator norm || f || is equal to max(x,y).

[–] crandlecan@mander.xyz 3 points 11 months ago

I'm mostly lost and in over my head

[–] GTG3000@programming.dev 3 points 11 months ago

Why use const max = (x, y) => x > y ? x : y instead of function max(x, y) { return x > y ? x : y } ?

[–] dinckelman@lemmy.world 2 points 11 months ago (2 children)

2, but I'm incredibly embarrassed to say that I've had to do 9 before

load more comments (2 replies)
[–] scroll_responsibly@lemmy.sdf.org 1 points 11 months ago* (last edited 11 months ago)

my $max = $x > $y ? $x : $y;

load more comments
view more: ‹ prev next ›