• 1 Post
  • 364 Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle


  • Ahhh, self doubt, my old friend…

    “There is probably a better way” is a fairly common feeling. In fact there probably is a better way. But at some point you need to be pragmatic and be happy with “good enough”. Don’t let perfect be the enemy of good (enough) as they say…

    That said - follow your intuitions as well that things could be done better. Don’t be afraid to just re-write a bunch of things to see if an idea works better. Like grouping things from some “common.php” into domain specific functionality (dates.php, db.php, etc.). Or re-working how your front-end works. Maybe read other code or ask for code review from people more experienced, or even from an AI (yes, yes, I know, but they can be useful).

    One problem you can find yourself in is that you’ve created code that’s very difficult to understand, but since you’re “in it” right now you understand it completely. If you put the code down for a week or two and come back to it you may find it very difficult to re-learn. If using classes, creating a DAO layer, or some other pattern helps to make your code easier to read then it’s worth following.





  • Also, what can I expect concerning RAID? That is definitely the most concerning thing for me, as I’ve never worked with it.

    Generally speaking it’s recommended these days to use a software RAID rather than relying on hardware. If anything happens to that RAID controller you will need to replace it with a duplicate in order to mount your drives. Software RAID is controlled by the Linux OS and would be much easier to recover. There used to be a bit of a performance penalty for a software RAID but these days it’s negligible.




  • Right? This is the whole “lack of understanding” that I’m going on about. “But the install instructions for some other application said to do this.” So it becomes cargo-cult system administration.

    It’s how we end up with curl https://some.rando.url/install.sh | sudo bash -c as an acceptable way of installing software. Don’t understand it, don’t question it, don’t look at what that shell script you’re running as root does, just copy / paste / and go! I don’t want to care about the details!

    And you see it in the comments in this forum where anytime anyone asks a question there are dozens of replies like “just use yunohost” or “just rebuild your entire server with unraid” without addressing the one component that needs addressing or offering multiple solutions. It’s just “my click and forget solution worked for me so it’s the way everyone should do it.”

    This is how we end up with walled gardens - to protect these people from themselves. Self-hosting should involve some amount of learning about what you’re doing because “there be dragons” out there.

    I have nothing against yunohost or letsencrypt (the latter is simply amazing) - but one should understand that these things are components that are part of a larger system.

    </rant>






  • It still reads like an ad for yunohost…

    I think one of the mistakes many newb self hosters make is thinking of systems in their entirety rather than as components.

    “How to install pihole on a raspberry pi” and “how to setup nextcloud on yunohost” are examples. All using very specific tools and very specific steps.

    I’m noticing this more and more with documentation for apps where they tell me to use their specific docker-compose file and have instructions to use let’s encrypt in a specific way rather than referring you to let’s encrypt as an option and pointing you at their docs.

    People aren’t learning how to use each of these tools and how to be flexible in their implementation.





  • Wow - I applaud the effort but that’s… a lot.

    I have frequently used notebooks to sketch out high-level ideas and designs which in itself seems to be a rarity. But at the “It’s detailed enough that someone else could come along and replicate the steps” level is unfathomable to me.

    Having to write out what I’m going to do on a physical medium is orders of magnitude slower than typing it out and would just take ages. Maybe it’s just a lack of discipline thing but for me coding is a ton of trial / error / re-write. I refactor code constantly. But it has inspired me to maybe keep more of a log “generally” for things I’ve been working on. It can be useful to be able to refer back to notes rather than needing to dig through emails or git logs hoping to find some rational for a decision…


  • To create an invite you:

    # drop into mongo shell
    docker compose exec database mongosh
    
    # create the invite
    use revolt
    db.invites.insertOne({ _id: "enter_an_invite_code_here" })
    

    That’s pretty jank.

    Also - I’m getting pretty fed-up with self-hosting documentation that assumes very specific environments and goes into detailed configuration for that environment. Don’t tell me how to setup a server and how to enable/configure SSH and setup UFW as part of setting up your software. Just tell me how to setup your software and what ports it uses.