This is a secondary account that sees the most usage. My first account is listed below. The main will have a list of all the accounts that I use.

henfredemars@lemmy.world

Garbage: Purple quickly jumps candle over whispering galaxy banana chair flute rocks.

  • 35 Posts
  • 1.23K Comments
Joined 2 years ago
cake
Cake day: July 4th, 2023

help-circle





  • Sr. Software Engineer here!

    • Great job initializing your variables. That’s a surprisingly common source of bugs, and with today’s optimizing compilers it’s basically free to define the starting value at the beginning of your function. Don’t worry if you reassign the value later. The compiler will notice and won’t waste any time doing extra setup unless it actually matters.
    • Consider providing an error message for invalid inputs. Humans can be boneheaded and not realize they gave an invalid input.
    • Your code isn’t commented. I recommend considering adding a few to build good habits early if you think you could comment something helpful for the reader. Code is read far more often than it is written ideally.
    • You perform your math operations twice: once in the printf and again later when you assign memory. Consider doing the computation just once to avoid repeating yourself to the computer. This habit tends to produce more efficient programs. Just update memory first and then reference it directly in your call to printf. This also protects against bugs where the value displayed wasn’t really the value written to memory.
    • Consider checking for division by zero and provide an error message for the unreasonable request.
    • Maybe return a non-zero status if an error occurs.

    Nice work!




  • henfredemars@infosec.pubtoSelfhosted@lemmy.worldHelp with home server plan
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    1 month ago

    The h265 hardware support is a lot less exciting than you might think. Most hardware that has support to encode it doesn’t even use the hardware encoders anyway because a software encoder produces a significantly better result. I would make sure you have CPU power to handle your transcoding, and I haven’t has any issues transcoding that resolution on my quite old Intel® Core™ i5-4590T CPU @ 2.00GHz.

    A Raspi is probably not going to be enough for reliable video transcoding at high resolutions, but I haven’t tried it myself. You certainly have more upgrade path options with a mini-PC while still keeping a low power target.

    I agree that distro is not very important if you’re running your services in Docker containers anyway. It’s mostly whatever you find comfortable. My personal recommendation is don’t get too creative unless you enjoy setting up servers. I tend to be conservative in my server OSs.










  • Instead of bundling all available security patches into the next ASB, Google now prioritizes shipping only “high-risk” vulnerabilities in its monthly releases. The majority of security fixes, meanwhile, will be shipped in quarterly ASBs. Google defines “high-risk” vulnerabilities as issues that are crucial to address immediately, such as those under active exploitation or that are part of a known exploit chain. This designation is based on real-world threat level and is distinct from a vulnerability’s formal “critical” or “high” severity rating.

    Reckless behavior! You cannot adequately rate a vulnerability’s real risk, and we have a very limited view of what’s being exploited in the wild. Threat actors don’t exactly publish their successes, and even the smallest bugs can be used to build powerful primitives in ways that can be really surprising (e.g. a single off-by-one null byte overflow that seems minor can lead actual code execution with sufficient control of the heap). Picking and choosing is a direct security compromise that makes Android less secure no matter which way you slice it.

    This reads to me as sugar-coating a cost-cutting measure. “Prioritize fixing and patching the highest-risk ones first” my ass. When you know of a bug that could have security relevance, you fix that bug. This just says you can’t afford the developers to actually fix your broken code.