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

help-circle






  • The use cases definitely do come up where you want the logic inside the loop to execute at least once. One common use case I have is validating user input in console applications. Put the instructions for validating the user’s inputs inside a do while and then run logic to validate it at the end - that way you can easily loop back to the start and re-prompt them for the user input again.






  • MrLuemasG@lemmy.worldtoMemes@lemmy.mlThe Lemmy experience
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    My favorite response was somebody saying small towns in America should still have infrastructure and trains to connect them (which I agree with in theory) because every small town in the UK has them without even realizing there are small towns in the US that could fit the entirety of the UK between them and the nearest other town or city.



  • MrLuemasG@lemmy.worldtoMemes@lemmy.mlThe Lemmy experience
    link
    fedilink
    arrow-up
    11
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Nooo, I ended up having to filter the fuckcars community because they were angry at ANYBODY that uses a car for any reason - like top voted comments and posts. I saw somebody get jumped by multiple responders for bringing up how there are small towns and people that live hours away from large cities that would still need cars for transportation

    Like, I’m as much for improving public transit and reducing the amount of cars on the road in every instance where it’s viable. I specifically moved within 10 miles of my job so I could start riding my bike to work instead of driving my hybrid car. It’s not that I’m pro car, I’m just anti-extremist