• 0 Posts
  • 37 Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle


  • We often used to get video games for Christmas, but wouldn’t be allowed to play them straight away because we were spending quality time with family etc. Then we’d get up early on the 26th and pack the car to go on a 2 week camping trip, still not having played our precious new game.

    We would take the instruction manual with us on the trip and spend those 2 weeks intensely studying the controls, the lore, everything. By the time we returned home we were fucking ready.







  • There’s more to it than that. Firstly, at a theoretical level you dealing with the concepts of entropy and information density. A given file has a certain level of information in it. Compressing it is sort of like distilling the file down to its purest form. Once you reached that point, there’s nothing left to “boil away” without losing information.

    Secondly, from a more practical point of view, compression algorithms are designed to work nicely with “normal” real world data. For example as a programmer you might notice that your data often contains repeated digits. So say you have this data: “11188885555555”. That’s easy to compress by describing the runs. There are three 1s, four 8s, and seven 5s. So we can compress it to this: “314875”. This is called “Run Length Encoding” and it just compressed our data by more than half!

    But look what happens if we try to apply the same compression to our already compressed data. There are no repeated digits, there’s just one 3, then one 1, and so on: “131114181715”. It doubled the size of our data, almost back to the original size.

    This is a contrived example but it illustrates the point. If you apply an algorithm to data that it wasn’t designed for, it will perform badly.




  • In general it is often true that a motor and a generator are two sides of the same coin.

    If you put a current through a wire you can make a magnet move which can be used to spin a motor. And symmetrically, if you spin a wire and make its magnet move near a wire you can induce a current in the wire.

    Depends on the exact wiring and stuff but yeah sometimes you can damage a motorised device by manually spinning the thing without turning it on.