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

help-circle
  • 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.












  • Yeh it is.
    Proving that a scientific theory is wrong means we don’t understand enough about the thing. And we know we need to look at other theories about the thing.
    Proving things wrong as well as failed hypothesis is as important (even if it is disappointing) as proving things correct and successful hypothesis. It rules the theory out, and guides further scientific study.
    With published papers, other scientists can hopefully see what the publishing scientists missed.
    Scientists can also repeat experiments of successful papers to confirm the papers conclusion, and perhaps even make further observations that can support further studies.




  • WRT macros & VBA conversion:

    with AI to save time and avoid errors

    Maybe it saves time, but I doubt it avoids errors.
    I would rather the time spent to develop this was spent on improving the plugin/extension/macro development ecosystem.
    I know they have an SDK, and I’m sure it’s great.

    But with MS Office, I can install Visual Studio, create a new VSTO plugin for what I’m targeting (excel, word, powerpoint, outlook etc), and get into coding. When I hit Play (as in run with debugger) it will launch the targeted application and build/hook in my plugin.
    It’s literally idiot proof, until it gets to writing code (then it’s c#).
    And Visual Studio is a decent IDE.
    The only thing really holding it back is the terrible documentation from Microsoft regarding the VSTO or Com Interop or whatever it’s called. It’s truely terrible, trying to figure out how to implement your idea.

    Make Codium systems similar to Platform.io (which is for Arduino, ESP32 etc), except for your given office suite.
    Make it better than the Visual Studio VSTO experience.

    That’s what I really want.
    And more people to use it, of course. I’m so fed up of Microsoft crap


  • I had an offline windows account on my laptop.
    I was freelancing for a company that gave me a Microsoft account.
    I logged into teams, but was very careful not to assign my laptop to that account. I had to use teams, but I didn’t want my client to manage my device.

    Shortly after I installed Linux, which broke windows bitlocker, and I had to get my bitlocker key.
    I hadn’t set up bitlocker, I wasn’t expecting it. As far as I was concerned, I had bricked my device.
    On a hunch of “hmm, maybe”, I checked my Microsoft account from the client, and it has a bitlocker key which unlocked my windows install.

    At which point, I disabled bitlocker and now primary Linux.
    But yeh, in my experience bitlocker is transparently applied during windows install and you never know your bitlocker key. If you never log in to a Microsoft account, you will never be able to recover it if you don’t save it in advance. And if you don’t know its happened, why would you know to save it in advance?!
    The fact that I was able to recover my bitlocker key for my offline/local windows account because I had installed & logged-in to teams via a client provided Microsoft account is strange as fuck.