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

help-circle








  • Yes. I learned this from Haskell. I like Haskell, but it has a lot of very granular functions.

    Earlier comment said that breaking up 1 function into 3 improves readability? Well, if you really want readability then break it up into 30 functions using Haskell. Your single function with 25 lines will become 30 functions, so readable (/s).

    In truth, there’s a balance between the two. Breaking things up into function does have advantages, but, as you say, it makes it more likely that you’ll have to jump around a lot to understand a single process.


  • Shorter code is almost always better.

    Should you use a class? Should you use a Factory pattern or some other pattern? Should you reorganize your code? Whichever results in the least code is probably best.

    A nice thing about code length is it’s objective. We can argue all day about which design pattern makes more sense, but we can agree on which of two implementations is shorter.

    It takes a damn good abstraction to beat having shorter code.


  • The precompiled implementation is the only supported way to use the macros that are published in serde_derive

    That statement is straight up gaslighting.

    The precompiled binary is only provided for one platform, Linux. Windows does not use a precompiled binary but compiles its own from the source. How can he claim it’s the “only supported way”, when for most platforms he is doing it another way? Also, the crate, throughout most of its life, has been doing it another way.


  • I’ve had in my mind a political cartoon; two panels:

    The first panel is The Free Market Ideal. Dozens of carts and woodend stands selling fresh fruit, food, hand made goods, etc. There’s lots of energetic people moving about and talking and haggling with merchants over prices and comparing prices and looking at all their choices.

    The second panel is The Free Market Reality. A bunch of tired people standing in line for one of two computer terminals.

    The truths portrayed is that there is no bargaining with the monopolies that dominate our markets, their processes are automated. This is not a market of equals, the people are tired and manipulated. As for choice, sometimes you can choose between 2 or 3 companies, sometimes there’s only 1 option.

    The things that happen in a healthy free market are not happening.