• 0 Posts
  • 59 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Ephera@lemmy.mltoMemes@sopuli.xyzOmnomnom
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    11 hours ago

    In regular expressions, it would match “aaaaaaaas”, since the character before the asterisk is what needs to be repeated. To match “avocados”, the pattern would be a.*s (or a\w*s).

    Or alternatively, a*s as a glob pattern would match “avocados”.


  • I wouldn’t because no one’s an expert in all aspects of programming, and as with any learned skill, the majority of folks are at the lower end of the skill spectrum. Some folks reading along are experts in biology and only do some light scripting to process their data, but still generally get the jokes.

    But even if it were the case that this was a community exclusively for senior software engineers, it would still be legal to just explain the difference rather than throwing a quip at them.



  • Ephera@lemmy.mltomemes@lemmy.worldPure magic!
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    2 days ago

    My parents recently got a new wired telephone at their home. It announces on the display that a call is coming in, but only starts ringing a second later.

    I would love to know why that was deemed a good design decision.













  • Ah, yeah, very familiar with that article. 🙃

    It’s definitely part of the reason why I like these really narrow types. But the other big reason is that your internal APIs start to look like this:

    Shape sorter game for babies

    It just makes it almost impossible to pass the wrong value into a parameter. You don’t need to wonder, whether you should pass your port variable into a parameter called bind_port, if you introduced separate types BindPort and RemotePort for them.

    Of course, this is a somewhat extreme example. It’s up to you to decide, whether you’re likely to encounter multiple values of the same type and whether it’s therefore helpful to make it impossible to confuse them.