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

help-circle


  • The only other solutions to “VPNs circumvent OSA” are:

    1. Licence/regulate VPN usage (which is essentially a ban WRT the OSA).
      Extremely difficult to do. It’s fairly trivial to just tunnel your connection over SSH to a VPS in another country.
      Also fairly trivial to get a VPN that tunnels over a websocket, making the traffic identical to website traffic.
      The government is going to play cat&mouse with decades of legitimate infosec.

    2. Do something progressive, and drop the OSA (which isn’t going to happen).
      They’ve literally just implemented these laws. It’s not getting repealed.

    They are going to make consumer use of anything that changes the public source address of a packet illegal.
    How they enforce that, I dunno.
    Like the whole OSA, it seems really poorly thought out. I dunno how they completely overlooked VPN usage







  • Smaller file size, lower data rate, less computational overhead, no conversion loss.

    A 64 bit float requires 64 bits to store.
    ASCII representation of a 64 bit float (in the example above) is 21 characters or 168 bits.
    Also, if every record is the same then there is a huge overhead for storing the name of each value. Plus the extra spaces, commas and braces.
    So, you are at least doubling the file size and data throughput. And there is precision loss when converting float-string-float. Plus the computational overhead of doing those conversions.

    Something like sqlite is lightweight, fast and will store the native data types.
    It is widely supported, and allows for easy querying of the data.
    Also makes it easy for 3rd party programs to interact with the data.

    If you are ever thinking of implementing some sort of data storage in files, consider sqlite first.


  • I don’t use it anymore though because I found the suggestions to be annoying and distracting most of the time and got tired of hitting escape

    Same. It took longer for me to parse and validate the suggestion as it did for me to just type what I wanted.

    I do like the helper for more complex refractors.
    Where you have a bunch of similar, but not exactly the same, changes to make.
    Where a search & replace refactor isn’t enough.
    It manages to figure out what you are doing, highlights the next instance of it and suggests the replacement.
    I don’t think I’ve seen it make a mistake doing that, and it is a useful speedup.
    I guess the LLM already has all the context: the needle, the haystack and the term.


  • Yeh, my example was pretty contrived and very surface level.
    It grouped things that seemed related at a surface level but weren’t actually related at all. Which makes it a bad example.
    And realistically, you would use a timer class that raised events, and passed in an interval class that could be constructed from any appropriate units.

    It was more to highlight that types and classes are a fairly easy way to improve the context around variable.
    It can also use type checker to show incorrect conversions between minutes and seconds, Polar and Cartesian coords, RGB and HSV, or miles and kilometers. Any number of scenarios where unit conversions aren’t a syntax error.



  • I feel like variable or function names that become overly verbose indicate that a specific type or a separate class should be considered.
    I see it as a mild code smell.

    Something like int intervalSeconds = 5 could maybe have a type that extends an int called seconds. So then you are declaring seconds Interval = 5.
    It describes the unit, so the variable name just describes the purpose.
    You could even add methods for fromMinutes etc. to reduce a bunch of (obvious) magic numbers elsewhere.

    To extend this contrived example further, perhaps there are a couple of intervals. A refresh, a timeout and a sleep interval.
    Instead of having.

    int sleepIntervalSeconds = 0;
    // etc...
    

    You could create an intervals class/object/whatever.
    So then you have.

    public class Intervals {
        public seconds Sleep
        public seconds Refresh
        public seconds Timeout
    }
    

    The class/object defines the context, the type defines the unit, and you get nice variable names describing the purpose.






  • The issue is big companies.
    Google/Amazon/Microsoft can now fork sudo-rs and not have to upstream their changes.
    So then Google fixes an exploit for their sudo-rs implementation (or whatever software) and patch it under a different licence. Now the upstream, Amazon and Microsoft forks don’t know if that exploit is also in their implementation, is related to their implementation, or how to potentially fix it.

    The only way it works is if sudo-rs is implementing new features in a way that it benefits Google/Amazon/Microsoft to contribute back to upstream so they don’t have to keep merging/fixing their exploit code.

    For something as stable as sudo, it actually benefits Google/Microsoft/Amazon NOT to share their changes.
    If they are rolling and recommending their own distros (which I’m sure they already are) that include their forked changes, then they can say that their software is more secure than other brands. It benefits them for their competition to suffer security breaches, especially if they trace back to these kinda changes.

    Which makes everything worse for everyone.


  • Years ago, I played with AWS then contacted their support to make sure any AWS billing to my account was disabled.
    I thought I’d try it again recently, and couldn’t log in.
    I still don’t think I’m missing anything.

    I’d rather have VPS or server providers where I know exactly what I’m getting per month no matter what, tho I’ve ran near data transfer surcharges.


  • Oh, it’s expected costs.
    Like, figure out the compute requirements of your code, multiply by the cost per compute unit (or whatever): boom, your cost.
    Totally predictable.
    Compared to suddenly having to replace a $20k server that dies in your data center.
    So much easier.

    Except when your code (let’s be honest, the most likely thing to have an error in it… At least compared to some 4+ year old production hardware that everyone runs) has a bug in it that requires 20x compute.
    But maybe that is a popularity spike (the hug-of-death)! That’s why you migrated to the #cloud anyway, right? To handle these spikes! And you’ve always paid your bills so… Yeh, here’s a 20x bill.