milkbones_4_bigelow's recent activity

  1. Comment on Architecture for untrained software engineers (Python) in ~comp

    milkbones_4_bigelow
    Link Parent
    Hey, thanks for this. Yeah, I'm using bs4 (regex as a last resort). I'm storing as a dict and using json.dumps. I will try to focus on drawing it out though, good advice. Can I ask why you think...

    Hey, thanks for this. Yeah, I'm using bs4 (regex as a last resort). I'm storing as a dict and using json.dumps. I will try to focus on drawing it out though, good advice. Can I ask why you think architectural models are useless? Most of the experienced devs I've spoken to have said I should focus on getting a good understanding there.

  2. Comment on Architecture for untrained software engineers (Python) in ~comp

    milkbones_4_bigelow
    (edited )
    Link Parent
    Thanks so much for your reply Akir. It's a shame you didn't post your initial reply. I'd be really interested to know how you'd structure an application like this or the steps you'd take to...

    Thanks so much for your reply Akir. It's a shame you didn't post your initial reply. I'd be really interested to know how you'd structure an application like this or the steps you'd take to structure any application really.

    The full scope of the project is something like this. Let's say there is a table on a website somewhere consisting of an artist, song, album, year etc per row

    1. User makes a GET to the /songs endpoint
    2. At this point I make a GET request to return the entire source from the website url in question
    3. As there's a ton of junk in the response, I need to parse out the various elements I need for the response object (get_song, get_album etc) - via bs4/regex as a last resort.
    4. I then pass the return values of those methods to a json serializer
    5. Return the object in the response to the user

    If structural systems isn't the way to go, perhaps you could direct me to some appropriate design patterns? Often I get into the situation where after an application I'm working on grows to a certain size it becomes really unwieldy and not much fun to work on. After a few failed attempts I'm thinking I must be missing something here :)

    Ideally I'd like to be able to draw out a simple diagram before starting and stick to that from start to finish. That way I'd have a guide and a reference as to how the whole system works in tandem when the going gets tough.

    Thanks again for your reply Akir, I really appreciate your time.

  3. Architecture for untrained software engineers (Python)

    Hey everyone, I've been programming for some time now but notice without any formalized education in CS I often get lost in the weeds when it comes to developing larger applications. I'm familiar...

    Hey everyone,

    I've been programming for some time now but notice without any formalized education in CS I often get lost in the weeds when it comes to developing larger applications. I'm familiar with the principles of TDD and SOLID - which have helped with maintainability - however still feel that I'm lacking in the ability to architect a properly structured system. As an example, I'm currently developing a flask REST API for a website (just for learning purposes). This involves parsing a html response and serializing the result as JSON. I'm still quite unclear as to structuring this sort of thing. If any more experienced developers could point me in the right direction/offer up their opinion I'd be very appreciative. Currently I have something like this (based - I hope correctly? - on uncle bob's clean architecture).

    Firstly, I'm defining the domain model. i.e the structure of the API response. Then, from outside in.

    1. Infrastructure (Flask): User makes request via interface (in my case a request to some endpoint)
    2. Adapters: request object checks if the request is valid (on the way back it checks if the response is valid) - Is this layer only for error handling?
    3. Repository: I'm struggling a bit here, AFAIUI this layer is traditionally a database. In my case however, where the request is valid, is this where I should handle the networking layer? i.e all the requests to return the website source? I'm also confused given at this stage I should be returning the relevant domain model, like an ORM, but as my data is unstructured, in order to do this I need to transform the response first. Where would it be best to handle this?
    4. Use Cases: Here I transform the domain model depending on the request. For example, filter all objects by id. Have I understood this correctly?
    5. Serializers: Encode the domain model as JSON to return from flask route.

    If you got this far, thanks so much for reading. I really hope to hear the opinions of more experienced devs who can steer me in the right direction/correct me should I have misunderstood anything.

    8 votes
  4. Comment on questions - a site for identifying some (mostly tech related) things you don’t know in ~comp

    milkbones_4_bigelow
    Link
    This is really cool, thanks for sharing. The design is beautiful and I already learnt a few new things. Will pass along to friends/colleagues.

    This is really cool, thanks for sharing. The design is beautiful and I already learnt a few new things. Will pass along to friends/colleagues.

    2 votes
  5. Comment on The main Invidious (YouTube frontend) instance is shutting down and Omar Roth is stepping down as project owner in ~tech

    milkbones_4_bigelow
    Link
    Just came across this too. Very sad. Is an awesome project and I really feel for the guy. Hope he gets some well deserved rest.

    Just came across this too. Very sad. Is an awesome project and I really feel for the guy. Hope he gets some well deserved rest.

    1 vote
  6. Comment on Is there an open task for searching bookmarked posts? in ~tildes

    milkbones_4_bigelow
    Link Parent
    Totally agree. Accruing interesting content over time without search seems to - in part - defeat the purpose. As Tildes isn’t currently paginated though, it’s already an improvement of Reddit.

    Totally agree. Accruing interesting content over time without search seems to - in part - defeat the purpose. As Tildes isn’t currently paginated though, it’s already an improvement of Reddit.

    1 vote
  7. Anybody watching the first NBA scrimmages in the bubble?

    What were your thoughts so far? What do you think of the piped crowd audio? The sound in general? Plans for crowd participation? Has Adam Silver done a good job thus far in bringing basketball...

    What were your thoughts so far? What do you think of the piped crowd audio? The sound in general? Plans for crowd participation? Has Adam Silver done a good job thus far in bringing basketball back?

    It's lacking some excitement for me, but pleased to have basketball back in any way shape or form.

    6 votes
  8. Comment on Is there an open task for searching bookmarked posts? in ~tildes

    milkbones_4_bigelow
    Link Parent
    That's about the crux of it yeah. Let me know how you see it.

    That's about the crux of it yeah. Let me know how you see it.

    2 votes
  9. Comment on Is there an open task for searching bookmarked posts? in ~tildes

    milkbones_4_bigelow
    Link Parent
    Hey Deimos, it's not based on an actual problem I'm having, more of a theoretical scenario I can envisage might occur. Is the use case clear or would it help to write up some acceptance criteria...

    Hey Deimos, it's not based on an actual problem I'm having, more of a theoretical scenario I can envisage might occur. Is the use case clear or would it help to write up some acceptance criteria in the ticket?

    1 vote
  10. Comment on Is there an open task for searching bookmarked posts? in ~tildes

  11. Comment on Is there an open task for searching bookmarked posts? in ~tildes

    milkbones_4_bigelow
    Link Parent
    That's true, although it's a little noisy. It would ideally be possible to filter on search. In addition, the search in it's current form is limited. Let's say for example I remember some aspect...

    That's true, although it's a little noisy. It would ideally be possible to filter on search. In addition, the search in it's current form is limited. Let's say for example I remember some aspect of the conversation, not the title or tag but a comment I or another user made. In this case, it wouldn't be possible to return that bookmark. For those reasons, I think even with the lack of pagination, this would be great to implement.

    2 votes
  12. Comment on Sea turns blood red as more than 250 whales slaughtered in 'barbaric' hunt in Faroe Islands – environmental activist calls for boycott in ~enviro

    milkbones_4_bigelow
    Link Parent
    Agreed :) In the spirit of pragmatism, I agree, however, "remaining in closer harmony with nature" does not mean taking the lives of non-human animals where it is not absolutely necessary. I don't...

    I don't think anyone should eat meat

    Agreed :)

    but if I am being pragmatic, I can at least be okay if the only people eating meat are those who have basically rejected almost all of the comforts of industrial civilization in exchange for remaining in closer harmony with nature.

    In the spirit of pragmatism, I agree, however, "remaining in closer harmony with nature" does not mean taking the lives of non-human animals where it is not absolutely necessary. I don't know enough about the import/export of the Faroe islands to say whether this would be one of those cases. My suspicion is it may, however, the edge case shouldn't set the precedent.

    I can't make the same excuses for people in an industrial society where people are completely alienated from the horrors it takes to produce their own food, and actually will get angry with you if you simply point it out to them.

    Agreed, in industrialised society, I see no justification for eating animals or using animal by-products.

    it really is ridiculous when the people lecturing you on morality are people who come from a culture that by and large continues to be complicit in the murder of 8 billion animals every year, who have found a way to suffer none of the awful consequences (like by getting poor immigrants to do all the dirty work, getting PTSD so you don't have to).

    Just so I understand, in this case, who is doing the hectoring exactly, the independent? Society at large? Whatever the case, it's perfectly logical - painful but logical - for one smoker to say to the other, "you know that stuff'll kill you right?" Why does it matter if some readers (I'm generalising here, I have no idea) are complicit in other forms of suffering, perfect should not be the enemy of good, no?

    If people were just upset about Faroese whaling as they were about industrial slaughterhouses, McDonalds would not have made $21 billion in revenue in 2019.

    Perhaps there's a misunderstanding here, I'm arguing people care more about what is on their doorstep, i.e McDonalds. In addition you cite the revenue but do not contextualise it. To support my claim, for reference:

    • McDonald's revenue for the quarter ending March 31, 2020 was $4.714B, a 6.16% decline year-over-year.
    • McDonald's revenue for the twelve months ending March 31, 2020 was $20.767B, a 0.69% decline year-over-year.

    No, but at the end of the day all I'm doing is trying to get people to do exactly that, and am getting friction in response.

    Kudos :) I'm right there with you. I hope you don't feel too much friction here. All in good fun :) I appreciate the conversation and think ultimately we're on a similar page.

    1 vote
  13. Comment on Sea turns blood red as more than 250 whales slaughtered in 'barbaric' hunt in Faroe Islands – environmental activist calls for boycott in ~enviro

    milkbones_4_bigelow
    Link Parent
    Where necessity is not a factor, should extinction even be a question? In addition, basing moral consideration on levels of intelligence is a slippery slope.

    extinction

    Where necessity is not a factor, should extinction even be a question?

    In addition, basing moral consideration on levels of intelligence is a slippery slope.

    1 vote
  14. Comment on Sea turns blood red as more than 250 whales slaughtered in 'barbaric' hunt in Faroe Islands – environmental activist calls for boycott in ~enviro

    milkbones_4_bigelow
    (edited )
    Link Parent
    Do you believe that is an important distinction to be made? If so, who benefits from doing so and how? If media coverage ought to be tantamount to moral outrage, I believe the output of whaling vs...

    I only think the existence of McDonalds is a lot more morally outrageous than a rural island nation of 60 thousand people practicing a traditional lifestyle.

    Do you believe that is an important distinction to be made? If so, who benefits from doing so and how? If media coverage ought to be tantamount to moral outrage, I believe the output of whaling vs fast food articles already complies to your model. If that is indeed the case, what is your issue with this article?

    re "people practicing a traditional lifestyle". Should morality be dictated by history? I don't think it's reasonable to perpetuate any practice by virtue of the amount of time we have been practising it. I'll leave it to the reader's imagination but there are innumerable examples of the application of this reasoning that have horrifying repercussions.

    when people get more upset about that than the McDonalds that is literally five minutes from where they live, the hypocrisy is kind of implicit.

    You're basing your premise of "implicit hypocrisy" on a hasty generalisation. Who are the people you're referring to? Does a single article suggest more people are upset about this than anything else? I'd wager the majority are more concerned with what is on their doorstep, i.e McDonalds, et al (I'd be curious as to what extent this is actually true). In addition, should our proclivity to engage with an issue be dictated by distance? I fail to see how that is relevant. For a broader overview of that issue see Peter Singer’s essay “Famine, Affluence, and Morality”.

    I have no problem with the Sea Shepherd, but with the target audience of these journalistic pieces.

    Who is the target audience and why are they a problem? Does engaging with this issue preclude a person from engaging with other issues closer to home?

    3 votes
  15. Comment on Sea turns blood red as more than 250 whales slaughtered in 'barbaric' hunt in Faroe Islands – environmental activist calls for boycott in ~enviro

    milkbones_4_bigelow
    (edited )
    Link Parent
    I think the folks at Sea Sheppard would say it's not a case of choosing between the lesser of two evils. It's rather a fight for the inclusion of non-human animals in our moral circle. What is the...

    I think the folks at Sea Sheppard would say it's not a case of choosing between the lesser of two evils. It's rather a fight for the inclusion of non-human animals in our moral circle. What is the hypocrisy you're referring too? Sorry, I'm not quite following.

    5 votes
  16. Comment on Ahmad Jamal Trio - Poinciana in ~music

    milkbones_4_bigelow
    Link
    I used to love dolphin dance from "The Awakening". Thanks for reminding me :)

    I used to love dolphin dance from "The Awakening". Thanks for reminding me :)

    1 vote
  17. Comment on What's an herb, spice, spice mix, or flavoring that you want to tell people about? in ~food

    milkbones_4_bigelow
    Link
    Cheating a bit as it's a mixture, but I'd go with Za'atar, is amazing in hummus.

    Cheating a bit as it's a mixture, but I'd go with Za'atar, is amazing in hummus.

    5 votes
  18. Comment on Hailu Mergia - Yefikir Engurguro in ~music

    milkbones_4_bigelow
    Link
    Peaceful music for trying times. Hope it helps someone out there.

    Peaceful music for trying times. Hope it helps someone out there.

    1 vote