A while back I was developing a workflow scheduler. However the run duration kept coming back negative. The runs kept finishing like 15 seconds before they started. Eventually I figured out why; the company had configured a policy to use their custom NTP server, but it was 16.7 seconds off. So my Windows laptop's time was in the future, but the WSL VM (which ran the program) used another NTP server and was correct. In the end I just added a bodge that made the program request the time from an external server on startup to calculate an offset.

you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 20 hours ago (7 children)

Sorry, but this comment still doesn't make sense (or has typos).

  • source
  • parent
  • hideshow 7 child comments
  • [–] 5 points 15 hours ago (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 9 hours ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 7 hours ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 9 hours ago

    You can't halve a pixel. Truncating would get around the issue but big issue is that you can't have a float as a video resolution. The browser should just truncate it regardless but the original code is flawed.

    OPs fix essentially does the same thing.

  • source
  • parent
  • [–] 3 points 15 hours ago*

    Dude, this reminds me of my coworker who was setting up a network and was trying to figure out a subnet mask, and he said, "I am trying to find a subnet mask between /22 and /23."

    He spent the entire day on it. I finally had to ask, and once he told me his goal, I of course asked, "how the fuck do you get half of a bit?"

    Oh, the blood drained from his face. "Yeah, bro, that's CIDR."

    How does this not make sense? I am spoon feeding this shit. Are you just vibe coding?

  • source
  • parent