• 0 Posts
  • 29 Comments
Joined 1 year ago
cake
Cake day: July 9th, 2023

help-circle

  • pazukaza@lemmy.mltoBike Commuting@lemmy.mlTips for safe city cycling
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Here are the tip 2 tips I can give you based on experience:

    1. Never go into auto-pilot mode. Never get lost in your thoughts. Always be present.

    2. Never, ever ride behind a car at the same speed of the car.

    I was super tired after a 5h ride through hills and was basically in auto-pilot mode going down a slightly inclined street. The car in front of me decided to hit the breaks out of nowhere because they saw another car do a strange movement. Cars break so quickly compared to bikes. I used both breaks to avoid hitting the car, but due to slope the back tire was raised. The bike became like a slingshot and I was shot against the concrete. I was fucked up for 3 months. Broken ribs, broken fingers and fucked elbows. My helmet saved my like because after my hands hit the concrete, my head followed

    Always be present. Think 3 steps ahead.











  • People creating functions as objects inside of other functions. A few days ago saw a person create a function with two object functions inside, then passed one of the functions as an argument to the other function. Then returned the second function.

    It’s hard to find such a mess in other languages. Yeha, functions as objects are cool. Closures are also cool… But why abuse that shit?






  • My problem with it is that it gives people too much freedom. They can write the code in very, VERY ugly ways… And they do. It’s a language that let’s you write a mess pretty easily.

    That’s really my only complaint. The ugliness happens mainly in:

    • callback hell. For some reason some people still do callback hell in 2023.

    • functions as objects. This is pretty neat actually, one of the best things in Javascript, but some people just abuse the hell out of it.


  • Come on, Javascript is pretty nasty. Trying to read that shit always gives me brain tumors. Why do they need to wrap every fucking thing in a function inside a function inside a function that is passed as a parameter to a function inside another function?

    Like, bro, you know people are meant to understand what you just wrote?

    It just gives too much freedom and people forget they need to write code that is easy to read for people who aren’t totally familiar with the code base.

    They even bring that shit into typescript. Like they are already using a language that is meant to fix that shit and they are like, nope, let me create 5 nested functions just because.