🇨🇦 tunetardis

  • 1 Post
  • 25 Comments
Joined 2 months ago
cake
Cake day: June 8th, 2025

help-circle
  • A man rides an electric scooter along Polk Street on July 29, 2024 in San Francisco, California. According to a University of California San Francisco (UCSF) study, injuries involving e-bikes surged more than 3,000% across the country between 2017 and 2022, and e-scooter injuries jumped more than 560% during the same time.

    So this is essentially the entire piece. Not so much as a link to the original study. How much did e-bike/scooter usage increase over that period? How many of these injuries were caused by vehicles? How did urban infrastructure—or lack thereof—contribute to any of this?

    This reminds me of articles I’ve read on The Telegraph. Any UK people here? What is the deal with that rag? Why do they hate e-bikes so much? I read Apple News for certain paywalled sites, and they’re the first paper I’ve actually had to block. (I think the final straw was their recent diatribe over the blight of solar panels.) Do they just have a particularly curmudgeonly op-editor or is it the whole culture with them?




  • I ride my ebike on mixed use paths on my way to work. My personal policy is to treat it as a class 1 in that case, and not exceed 24 kph. When passing pedestrians, this drops to 20 or lower, depending on the circumstances (e.g. can I get their attention with the bell, are small children/unleashed dogs involved, etc.).

    Yesterday, I saw someone shoot past me on an ordinary bike. I briefly sped up to match his speed and checked my speedometer. He was doing 36 kph. In fairness, regular bikes don’t tend to come with speedometers, so he may have had no idea how fast he was moving.

    I have also seen ebikes going well over 32 kph though. Mine is software limited to top out at that for electric assist, but the cap can easily be lifted with the phone app. I have elected not to do so. I’m a commuter. I just want to get to work. Not trying to win any races.


  • I think my most common use case is with dictionary lookups.

    if (val := dct.get(key)) is not None:
        # do something with val
    

    I’ve also found some cases where the walrus is useful in something like a list comprehension. I suppose expanding on the above example, you you make one that looks up several keys in a dict and gives you their corresponding values where available.

    vals =  [val for key in (key1, key2, key3) if (val := dct.get(key)) is not None]
    

  • I’m type 2 diabetic and noticed my blood sugar tends to peak around half an hour after eating. So I now try to time any exercise I do for that window. And actually it feels good. Like I feel an urge to get up and move around at about that point, so I guess the body is trying to tell you something?

    Since most of my exercise involves cycling, if I’m say eating out someplace and can afford the time, I relax for about half an hour at the restaurant before hitting the road.

    I told this to my diabetic councillor. She said such a regimen is approximately equivalent in therapeutic value to taking a metformin pill, so this is clearly a good thing for me, but I imagine it’s not bad idea in general?


  • I’m glad you found something that works. I don’t think there is a one size fits all solution to weight gain, but it’s awesome that your approach does not necessitate splurging on diet plans or gym memberships.

    I’ve been losing weight very slowly myself over the past several years since I cancelled my largely ignored gym membership during the pandemic and bought an ebike instead. I commute on it regularly and, while it’s hardly what I would call a vigorous workout, it seems to have flipped the weight curve from slight gain/time to even slighter loss. Like we’re talking a pound/month if that. But I’ll take it!







  • This reminds me of a story my dad told me. His school went on a field trip to an ice cream factory and he was, of course, expecting this to be the best day of his life. What he discovered, though, left him mortified. They were taking poor-selling flavours and running them back through the machine to change them to something better. If you buy some store brand chocolate and it has undertones of mocha, now you know why. I think of this now whenever I see a product that “may contain peanuts”. Like they’re not sure.






  • When I first started taking climatology back in the day, I thought it a bit paradoxical that profs kept going on about how global warming would lead to more extreme weather when, on a first principles basis at least, I would’ve thought it should lessen weather variability. Anthropogenic warming is an insulating effect, and that should tend to even out conditions across the planet, just as insulating your home should reduce drafts and what not.

    I guess my problem was that I had it in my head that greater variability = more chance to hit extremes, and we were going the other way. But the way things are playing out, it’s less variability that is giving us what we view as aberrant weather. That heat dome that never leaves or that storm system that parks itself over your head for days on end. We get too much of one thing because the weather systems are actually becoming less chaotic and getting stuck in holding patterns for longer than is healthy.



  • As with most script languages, you can hit the ground running in a very procedural sort of way, as you don’t even have to define a main entry point. You just start coding.

    But Python certainly has an object model. If I’m not mistaken, everything in Python is an object. Like even functions.

    I suppose there are some aspects of the class implementation that feel a little tacked on? Like the way you need to manage the self reference manually where it may be implicitly handled for you in other languages. At least the way you call super() now is a lot less kludgy.

    One thing I miss a bit in Python is method overloading. In a general sense, function overloading is not an OOP feature per se, but I find it useful in OOP, particularly with object initializers. You can sort of achieve it with @functools.singledispatch but it’s pretty janky. For initialization, I prefer keeping the __init__ method pretty rudimentary and writing factory functions to do more complex initializations. And with @dataclass, you can forego writing an __init__ altogether if you do it that way.