200
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 19 Nov 2026
200 points (99.5% liked)
Programmer Humor
34316 readers
1496 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
For a strong typed language, an integer division should not cast to any other data type. Even assigning a float to an integer should not be allowed (that's why C is not really strongly typed). I think from the syntax it was PHP. If any of the dimensions were not divisible by 2, then the number changed from integer to float and it could cause an issue somewhere downstream the video processing pipeline.
OP didn't say that the problem was with the change in type. I think the interesting part is the downstream issue: what failed when a float was given while an integer was expected?
A few things, basically you can't have half a pixel. Apparently html5, resolution in a video embed is an integer only. A browser would just truncate and cast it to an integer but that is malformed html. Also php5 predates html 5. So only god knows what the video player was doing.
I don't think it's reexporting a video or something, I think it's the embed bc it is a CMS. PHP 5 isn't that old so video in webpages isn't a novel idea.
But you're right. Can't halve a pixel.
Do note that PHP5 is old, predating HTML5. Browsers probably still struggle with malformed HTML and in the absence of any sane value, just crash. Also, who knows if it was even HTML. For all I know it could be a flash.
Fuck, I forgot about Flash. I didn't think it was that old. Odds are it's just some other internal video player tbh.