• 10 Posts
  • 591 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle

  • Hmm, maybe my opinion is just shit in that regard. I don’t code terribly much low-level, so I’m probably overestimating the complexity and underestimating the options for cleaning things up.
    That was kind of just a random example, I felt like there were many more cases where low-level code is complex, but I’m probably basing this off of shitty low-level code and forgetting that shitty high-level code isn’t exactly a rarity either.


  • In regards to there being an abundance of songs, I’ve also found that this kills off my motivation to make music.

    For one, because well, obviously there’s musicians out there that produce music at a much higher skill level and production value, so it’s easy to just never even try ‘competing’ with them, even though with a bit of effort, I definitely can create something that a certain niche will enjoy.

    But similarly, it also feels like every niche is covered. Any song I’d want to make, I would just need to search long enough and I’d find something similar on the internet.

    I myself don’t have a real demand for the songs I create. I don’t expect to create something that I would find so much better than what everyone else does.
    I do get the bonus of writing exactly the songs that ding the neurons in my brain, but those other musicians get the bonus of having more skill and production value and being the proverbial infinite monkeys with typewriters.

    At this point, I tend to go back and forth between listening to all the excellent music out there, to try to keep my own creativity up to speed, and then for a few weeks, I’ll only listen to relatively mellow songs, so that the songs I’m writing actually sound decent in comparison and I get the motivation to continue working on them.



  • In my opinion, it strongly depends on what you’re coding.

    Low-level code where you need to initialize array indices to represent certain flags? Absolutely comment the living shit out of that.
    High-level code where you’re just plumbing different libraries? Hell no, the code is just as easily readable as a comment.

    I do also think that, no matter where you lie in this spectrum, there is always merit to improving code to reduce the need for documentation:

    • Rather than typing out the specification, write a unit/integration test.
    • Rather than describing that a function should only be called in a certain way, make it impossible to do it wrongly by modelling this in your type system.
    • Rather than adding a comment to describe what a block of code does, pull it out into a separate function.
    • Rather than explaining how a snippet of code works, try to simplify it, so this becomes obvious.

    The thing with documentation is that it merely makes it easier to learn about complexity, whereas a code improvement may eliminate this complexity or the need to know about it, because the compiler/test will remember.

    This does not mean you should avoid comments like they’re actively bad. As many others said, particularly the “why” is not expressable in code. Sometimes, it is also genuinely not possible to clean up a snippet of code enough that it becomes digestable.
    But it is still a good idea, when you feel the need to leave a comment that explains something else than the “why”, to consider for a moment, if there’s not some code improvement you should be doing instead.











  • I’m not using Ansible myself, but I do use kreadconfig and kwriteconfig, and well, it does just have 4 parameters to identify a setting and its value, so that Ansible module does look like it’s sufficient for that.

    One tip I have, is that you can figure out which GUI setting corresponds to which config file change, by setting up a Git repo in ~/.config and looking at the diff. So, basically:

    cd ~/.config
    git init
    git add .
    git commit -m "original config"
    # now change setting in UI
    git diff
    

    When you’re done transferring that into Ansible, you can commit or stage the changes and tweak another UI setting, or if you’re completely done, then just rm ~/.config/.git/.
    I guess, you could also use this Git repo to roll back all the settings and see if your Ansible automation works as expected.



  • I mean, these communities do get created when someone feels like there’s a reason to. There’s just no council or whatever regulating when and where a community gets to be created, so any user on any instance can decide to open up and promote their community.

    And frankly, I have no idea what the precise effects are. When you subscribe to all of these, it won’t really be much different from just one big community in that sense. It may mean, though, that someone new accidentally joining only one of the communities will not be presented all the content they want, yeah.

    On the flip side, having it split is kind of cool, because you can decide to only subscribe to 2 out of 4 communities, if you only want half as much of this content in your feed. Or you can decide to subscribe to all of these, but not to the one on angry-instance.net, because you don’t like the tone of the discussions in that one.


  • Yeah, it’s federated, meaning you can subscribe to each of them and post to whichever one you fancy. If you want to post to multiple, it’s a good idea to use the cross-post feature.

    Having only one singular official community would be rather bad, as then the respective server owners and moderators would have central control like on Reddit.


  • Hmm, yeah, it is a bit surprising to me, too, especially for an audio issue, but it’s always possible that you had some weird configuration values in about:config for historic reasons and now some new code, that came in with a Firefox update, isn’t working with that configuration.

    Either way, it happens often enough that Mozilla has a troubleshooting routine for it, too, namely refreshing your profile.

    If I remember correctly, it places your old profile data into a folder in your Desktop folder. But you can also separately backup your profile by closing Firefox and then copying ~/.mozilla/firefox/ onto an external hard drive or such.


  • Ephera@lemmy.mltoMemes@sopuli.xyzYes please
    link
    fedilink
    arrow-up
    0
    ·
    6 days ago

    Completely unrelated story: I bought a red cabbage last week and was so glad to have found a relatively small one in the shop.

    …I have been eating red cabbage for the past three days and still have enough left for another two days. Just why is it so damn compressed? I can cut off the tiniest slice from that cabbage and it still fills a whole plate.