this post was submitted on 18 Aug 2025
609 points (99.0% liked)

Programmer Humor

25776 readers
2112 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 2 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] spicehoarder@lemmy.zip 2 points 27 minutes ago

I scored 18/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

[–] Turret3857@infosec.pub 1 points 15 minutes ago

12/21

are things that are considered out of current spec really "valid" though?

[–] isaaclyman@lemmy.world 8 points 1 hour ago

Let us recite the email validator’s oath:

If it has something before the @, something between the @ and the ., and something after the ., it’s valid enough.

[–] moseschrute@lemmy.ml 3 points 1 hour ago

I scored 13/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

[–] rumba@lemmy.zip 8 points 1 hour ago

I lost it at the fork bomb. I mean I hit valid because there was no way it was on the and not valid, but there's no way i'd have expected that. after that I just kept guessing the most stupid answer and did pretty well

[–] ikidd@lemmy.world 15 points 3 hours ago

I gave up when I got like 5 wrong. I've ran mail servers for decades, most of the invalid "valids" would get rejected by any mailservers I've administered.

[–] marzhall@lemmy.world 19 points 4 hours ago

I scored 16/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

Damn, and here I thought I had this locked down because I was salty that so many places struggle with + in the email addy. But my god, there's comments?

[–] sexy_peach@feddit.org 9 points 4 hours ago (1 children)
[–] d00ery@lemmy.world 4 points 2 hours ago

Me too.

I scored 11/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

[–] mp04610@lemmy.zip 4 points 3 hours ago

I scored 16/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

[–] TomasEkeli@programming.dev 25 points 5 hours ago (1 children)

I don't validate emails, I test them.

That's your email? OK, what did we send it? if we couldn't send to it or the user can't read it there's no reason to accept it.

OK, maybe I do some light validation first, but I don't trust the email address just because it's email-address-shaped.

[–] ChaoticNeutralCzech@feddit.org 5 points 5 hours ago (2 children)

What kind of "light validation"? I'm guessing a .*@.* regex match.

[–] TomasEkeli@programming.dev 9 points 5 hours ago* (last edited 5 hours ago) (2 children)

Almost correct. ^.+@.+$

Too hard to validate properly to be worth it. Even if it is technically valid that's insufficient. It must also work, and the easiest way to test that is to use it and verify that the user got what we sent.

[–] qaz@lemmy.world 1 points 14 minutes ago
[–] GreenKnight23@lemmy.world 3 points 4 hours ago (1 children)

I see you accept lemmy handles.

[–] TomasEkeli@programming.dev 6 points 4 hours ago

if i can email them and the user gets it - fine by me

[–] qqq@lemmy.world 6 points 5 hours ago
[–] defuse959@lemmy.dbzer0.com 4 points 3 hours ago

I scored 12/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

[–] shalafi@lemmy.world 4 points 3 hours ago

17/21. Would have been 18 but the first example of spaces screwed me.

[–] canihasaccount@lemmy.world 35 points 6 hours ago (1 children)

What if we 👉@👈 ..? 🤭

[–] rumba@lemmy.zip 1 points 1 hour ago

Now i just need a registrar that allows emoji...

[–] maxwells_daemon@lemmy.world 37 points 6 hours ago (1 children)

I don't care who the IRS sends, I am not validating emails with spaces on them.

[–] tyler@programming.dev 15 points 6 hours ago (2 children)

You shouldn’t be validating emails yourself anyway. Use a library or check for only the @ and then send an email confirmation.

[–] zurohki@aussie.zone 7 points 4 hours ago

Even if it's a completely valid address and the domain exists, they still might've fat fingered the username part. Going to extreme lengths to validate email addresses is pointless, you still have to send an email to it anyway.

[–] TomasEkeli@programming.dev 2 points 5 hours ago

This is the way.

[–] Blackmist@feddit.uk 48 points 7 hours ago (1 children)

I don't think it really matters what the standard is, because you'll be completely limited by some 25 year old bit of Regex from Stack Overflow that every web developer ever has implemented into their form sanity checks.

[–] frezik@lemmy.blahaj.zone 13 points 7 hours ago (1 children)

The main one that gets passed around will match the weirdness fine. In fact, it probably matches things you don't want, anyway.

A signin/registration form really only needs to do sanity checks to get rid of obviously bad addresses. You'll have to send a round-trip email confirmation message to make sure the email is real, anyway, so why bother going into great detail? Just check that there's an '@' symbol and a dot in the domain. Most of the rest is wanking off.

[–] Dremor@lemmy.world 7 points 7 hours ago (5 children)

A domaine without tld (me@home) is a valide address. I saw an email server being used as a mqtt-like server this way (it is very old and predate those software).

load more comments (5 replies)
[–] dawcas@scribe.disroot.org 17 points 6 hours ago (2 children)

13 right answers and I didn't expect so many lol

I'll never validate some of the 💩 I've learnt today.

[–] piccolo@sh.itjust.works 1 points 40 minutes ago

Validation should just check if it has a @ and send an email and wait for a response... because who knows if mailservers "respect" the spec anyway.

[–] Endymion_Mallorn@kbin.melroy.org 13 points 6 hours ago (1 children)

Wow. if I ever have the madness required to self-host, I'll have my email at an IP address.

[–] rmuk@feddit.uk 9 points 6 hours ago (1 children)

I'm gonna have a mailbox per device and the addresses will be deviceip@serverip. 10.254.17.5@145.80.205.19.

[–] Natanael@infosec.pub 7 points 5 hours ago

Needs to be IPv6, including support for subnets to message multiple devices

[–] thomasloven@lemmy.world 5 points 5 hours ago (2 children)

If qoutes are removed and internal spaces are invalid, how could ":(){␣:|:&␣};:"@example.com be valid?

[–] ChairmanMeow@programming.dev 3 points 3 hours ago (1 children)

Presumably the space between quotes is "escaped", meaning it's supposed to act like any other character.

[–] rumba@lemmy.zip 1 points 1 hour ago

Yeah they're processed, but not passed through.

[–] bamboo@lemmy.blahaj.zone 1 points 3 hours ago

Not too sure, but a previous one says spaces are allowed in comments. I would assume the {} is similar?

[–] Dack@programming.dev 8 points 6 hours ago

I got 13/21. I mean thats not bad 😄

[–] CommanderCloon@lemmy.ml 51 points 10 hours ago* (last edited 10 hours ago) (5 children)

Question 5 is incorrect, name@example is a fully valid email address, even after RFC 2822

The spec of RFC 2822 defines an address (3.4.1) as:

local- part "@" domain

domain is defined (3.4.1) as:

domain = dot-atom / domain-literal / obs-domain

dot-atom is defined (3.2.4) as:

dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)

1*atext meaning at least 1 alphanumeric character, followed by *("." 1*atext) meaning at least 0 "." 1*atext


If tomorrow, google decided to use its google top-level domain as an email domain, it would be perfectly valid, as could any other company owning top-level domains

Google even owns a gmail TLD so I wouldn't even be surprised if they decided to use it

[–] pineapplelover@lemmy.dbzer0.com 2 points 4 hours ago* (last edited 4 hours ago)

I didn't understand this one. How do you have a no dot domain? Like you need to distinguish from example.com or example.wtf

Edit: do you mean if you own .google you can have your email@google address?

load more comments (4 replies)
[–] nimble@lemmy.blahaj.zone 38 points 10 hours ago (2 children)
load more comments (2 replies)
[–] Speiser0@feddit.org 15 points 8 hours ago

Pretty much everything I've seen in e-mail is needlessly complicated and weird. So of course addresses are as well.

[–] frezik@lemmy.blahaj.zone 32 points 10 hours ago* (last edited 9 hours ago) (2 children)

Two of my "favorite" features it didn't even touch on. You can have nested comments:

foo(one(two(three(four(five(six(seven)))))))@example.com

This will actually fail on that big email regex that gets copied around (originally from Mastering Regular Expressions in 1997), because it can only handle comment nesting to a depth of six. It is actually possible to do indefinite nesting now with recursive regex, but it was developed before that feature existed.

RFC822 also allows routing addresses through multiple servers:

<@foo.example.com@bar.example.com:123@example.com>

But this is almost always denied on modern email servers because it was abused by spammers.

load more comments (2 replies)
load more comments
view more: next ›