• 0 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2023

help-circle








  • For remote backup, always keep your data in multiple ‘importance levels’. There’s replaceable, irreplaceable and very important.

    Replaceable is non-niche movies and all kinds of other things that are commonly available, data not ‘exclusive to you’. Irreplaceable is data that is (probably) only owned by you - photos, videos, source code, documents and so on. Very important are the few documents you really can’t afford to lose. Security keys, banking info and so on.

    I don’t bother backing up replaceable data - I keep one local and one off site backup for the irreplaceable data and very important data (1tb hetzner storage box is enough for me), and I keep a few encrypted physical usb sticks and sd cards strewn around at my parents and at work for the irreplaceable data that periodically get updated.


  • uberrice@feddit.detoProgrammer Humor@programming.devAlways write comments
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    11 months ago

    If you think a block of code needs a comment, turn it into a method and give it a proper name instead.

    Really depends. Yes, if someone doesn’t get what’s wrong with this statement, they should. But you shouldn’t wrap something in a method all the time just because. Sure, maybe you can make it an inline method, but usually, a method call takes time, and while it’s not a lot of time, in constrained or complex system that can accumulate. A lot. Sure, the compiler might optimize stuff away, but don’t just go blindly trusting your compiler.

    Sure, a method call for something that gets called once a second is not a problem. But when you suddenly have thousands and thousands of method calls when say, you click a button, which calls method x which calls method x1 which calls y1 and y2 which call z1-10 and so on, then the method calls can suddenly turn into a problem.

    Maybe not on a fast, modern device, but on an older or more constrained device. If your code never runs on there, sure, don’t bother.



  • Definitely. I assume the actual cost for the cable is <10$, but engineering work gets very expensive very fast if you’re small scale.

    I’m interested in something - say you got an order for 1 million units, what’s the price per unit you could offer?

    Edit: just looked at the DIY option - seems right now you’re just using off the shelf parts, which is fine. Clever use of them, even. Main part seems to be ‘present usb device - once the usb device gets removed, lock down the PC’. So, you specifically just need some usb device with a cord that attaches magnetically - and securely enough that it doesn’t disconnect randomly, with some mechanical way to fix it to yourself. So yeah, at million scale, seems you could definitely sell it for 10 bucks a piece.