• 0 Posts
  • 405 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle

  • Heck yeh! Great work.
    I think most critique has been covered.

    I consider too-many-indentations to be a code smell.
    Not actually an issue, but maybe there is…

    There is nothing wrong with your code, and no reason to change it (beyond error catching as you have discovered). It runs, is easy to follow, and doesn’t over-complicate.

    I like descriptive function names and early returns (ie, throw or return on all the conditions that means this function shouldn’t continue, then process the parameters to return a result).
    This could massively clean up what’s going on.
    There could be a “getUserCommand()” that returns the desired number, or 0 if it’s invalid.
    If the returned value is 0, then break.
    If the returned value is 6, then print values; then break.
    Otherwise we know the value should be 1-5.

    You could use an Enum to define the choices.
    This way, the print lines and the conditional tests can both reference the enum. It also removes “magic numbers” (IE values that appear in code with no explanation).
    In something simple like this, it doesn’t really matter. But it improves IDE awareness (helping language servers suggest code/errors/fixes). And Makes the code SOO much more descriptive (Ie “choice == 3” becomes “choice == Choices.Product”).





  • It’s referring to binary blobs. A windows exe might be a binary blob.
    These are distributed compiled. Even if the project is open sources, the binary blob might have been generated by a compromised compiler.

    This is one of the reasons the XZ Utils compromisation went unnoticed for so long. One of the compressed files used for testing contained malicious code that would be included in the build artefacts (IE, the final compiled binary) under very narrow and specific circumstances.

    So “deblobbed” means absolutely everything in the OS was built & compiled on their computer from original source code


  • The planned obsolescence is most likely a deliberate trade off rather than actual planned obsolescence.

    If fast charging did do significant damage to battery life and this was known at the time of implementation, the decision would have been “users want fast charging phones” Vs “users want devices that last a long time”.
    In this instance, the convenience of fast charging absolutely would have won.

    “Users want a clear and easy to use device” Vs “users want a robust device”. Which is why we all have glass screens, and the glass technology had to catch up to further expectations.

    “Users want easy wireless connectivity” Vs “users want fast and reliable network speeds”. WiFi wins, and has to catch up to further expectations.





  • I installed endeavouros on my windows laptop.
    The installer guided me through the partitioning, setting up systemd-boot, and it was all great.
    I had to disable bitlocker in windows (not that bothered about) and secure boot in bios (also not that bothered about).

    Ran smoothly dual booting both for about 4 months.
    Then a windows update hit, and fucked the boot.

    Thankfully, this is a common enough thing that there are plenty of tutorials out there.
    A liveUSB of endeavouros, some tinkering, and I was back up and running.

    The cause seems to be FastBoot, where windows keeps the boot partition mounted. What I think happens is that bios tries to read the boot partition, which is configured/loaded for windows (because it never cleaned up after itself due to FastBoot being on) and boots into windows.
    Since turning off FastBoot, I haven’t had any issues in the past 8 months.







  • Maybe Ukraine couldn’t retake the areas occupied by Russia, but they could deliver a Pyrrhic blow to Kremlin.

    They have delivered a pyrrhic victory.
    Russia thought they could take Kyiv (Ukraine?) on 3 days.
    The fact that Ukraine has resisted so hard, have redefined the modern battlefield, have conducted huge deep strikes…
    Ukraine is winning.

    The reason Ukraine may not be “winning” is because the Russian war machine is huge. Like really really big.
    The reason that Ukraine is “winning” is because the Russian war machine is outdated and corrupt.

    The western opinion of Russia has been devastated. Russia tested themselves, and failed.
    Russia is holding on by their nukes.