"Buy Me A Coffee"

  • 1 Post
  • 31 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle





  • So the builder pattern is supposed to solve the problem of: if you have a large number of optional fields that may or may not need to be set to construct your object. Then once the dev has called all of the setters that they require, they call build to fully realize that object.

    Some rules that all builders should follow:

    • All setters SHOULD represent optional parameters. (Or ones that have a default value). If a parameter is required for all instances, include it in the constructor of the Builder itself.
    • All setters SHOULD return a copy of the Builder. This way you can chain calls off of each other.
    • Setters SHOULD do nothing more than store the provided value in a field local to the builder itself and then return itself (or a copy of itself).
    • You MUST expose a .build() method that will return the fully realized object. This method should essentially call the constructor for your target object using all of the parameters, regardless if a setter was called or not. Obviously any value where the setter wasn’t called will be null or some default value.


  • I’m also running Ubuntu as my main machine at home. (I have a Mac and do Android development for my day job).

    But at home, I do a lot of website and backend dev.

    1. Code in VSCode
    2. Build using docker buildx
    3. Test using a local container on my machine
    4. Upload the tested code to a feature brach on git (self hosted server)
    5. Download that same feature branch on a RaspberryPi for QA testing.
    6. Merge that same code to develop 6a. That kicks off a CI build that deploys a set of docker images to DockerHub.
    7. Merge that to main/master.
    8. That kicks off another CI build.
    9. SSH into my prod machine and run docker compose up -d



  • marsara9@lemmy.worldtoLemmy@lemmy.mlLemmy content aggregator bot list
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    Maybe. 2nd idea I’ve got is that if no one is replying after say 24hrs and something like 75-80% of your posts are as such and you have at least 100 such posts, you get added to the list?

    Main concern I see about something like this is false positives and how someone real could end up getting blocked.

    I definitely want to think on this some more but it might have some legs.


  • …I wonder if there’s a programmatic way to detect these bots? Some sort of analysis on their posting behavior?

    If they’re playing nice they’ll have the bot flag checked in their profile, and then maybe build a list of any bot that creates posts? As most of the “good” bots just reply to comments? Anyway just thinking out loud. But I’m thinking I could easily add a public API to my search engine that just returns a list of “posting bots”…







  • Let’s say I just sent a request from my non-existent server with my user id…

    Who or what is going to send this request if not some server that implements ActivityPub? This could be a Lemmy or Mastodon or Kbin instance… Or anything else that implements ActivityPub.

    …and just every time I wanted to check whether I got replies I would query the other server (which a Lemmy server would do to get notifications about replies or upvotes)

    ActivityPub works via pushes. So there’s nothing to query. There HAS to be some server for it to send and store that data.


  • So you can’t just send data from a domain. There has to be a service running behind that domain name to do something.

    Without a server, it’d be like asking “why do I need tires on my car?”. Well it’s not going to go anywhere without them.

    Now this could be a private instance with only you as the single user. And it could federated with the rest of the fediverse. But you still have to run some software to do that.

    Now in theory someone I guess could come up with a slim version of Lemmy that only has a single user, and you can’t post or comment directly to that instance but again something has to be running on a server behind that domain.