• 0 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: June 28th, 2023

help-circle





  • The apps are already amazing and will not suffer issues of scale themselves because they run on users’ devices. The scaling issues will be in Lemmy server code and ActivityPub in general.

    ActivityPub doesn’t seem very scalable IMHO. It works well if all instances are about the same size and communities are well-distributed. Right now a few servers like lemmy.world, sh.itjust.works, and lemmy.ml are much larger than others. They host most of the popular communities as well. This creates an imbalance which ActivityPub doesn’t handle well.

    I think Lemmy instances should be topic based. But that’d be confusing for people coming from centralized social media who are only trying to find a reliable starting place. So I really hope we reach a point of maturity and mainstream-ness of Fediverse that people feel comfortable with smaller theme-based instances.











  • Well, life is about trade-offs and neither spaces or tabs are perfect in every scenario, but the industry overall prefers spaces over tabs nowadays and the tooling reflects that too. For me personally, as long as a project is consistent in its formatting and developers don’t need to fight its tooling, I’m happy with either. We can yak shave all we want (and lots of people are doing that on the internets) but I hope I at least answered your initial question about why people prefer spaces over tabs.


  • It makes a difference when you’re working on a large project with lots of people. Even Linux mandates 1 tab = 8 spaces.

    The only argument i see in favour of tabs is the “i can change the width on my own machine!” which isn’t very convincing if you are working on a team and need to follow conventions every time you commit code. The indentation will keep looking weird on your machine.


  • If you’re using monospaced fonts for writing code (please tell me you are) spaces make sure that the code will look roughly the same on everyone’s machine.

    def function(paramX: str,
                 paramY: str,
                 paramZ: str) -> int:
      pass
    

    If I’d used tabs, the second and third parameter might not align with the first.

    Also, left-side indentation is only a small part of the overall whitespace in code. You’re adding whitespace even when you write x = y. Spaces make sure that this whitespace around the = grows in the same scale as the indentation.