• 0 Posts
  • 75 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle







  • atzanteol@sh.itjust.workstoSelfhosted@lemmy.worldProxmox VE Helper-Scripts
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    10 days ago

    You can install with package managers and include with it a helper script to setup the service. No big deal.

    But can you spot the difference between http://myservice.com/script.sh and http://myserv1ce.com/script.sh if you use a font that doesn’t make it clear? If you get people used to just copy/pasting/running scripts then there’s a risk they’ll run something entirely different by accident.

    There’s no good reason to install things this way.



  • atzanteol@sh.itjust.workstoSelfhosted@lemmy.worldProxmox VE Helper-Scripts
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    10 days ago

    The URL can point to a different file. People can post maliciously similar URLs and trick you into running something else.

    With a repository you have some semblance of “people have looked at this before”. Packages are signed and it will provide a standard way to uninstall and upgrade in the future.

    There’s literally no good reason to replace it with a shell script on a website.



  • I deal with the syntax on a daily basis though. Moving code around is objectively more difficult with Python since IDEs can’t always know where the block should be tabbed to. Sometimes it is correct at guessing, sometimes not. And when it’s not all I can think of is “why the fuck am I dealing with this?”. It’s a non-issue in proper languages. Just simply doesn’t exist. The IDE there can know where things should be tabbed to. It’s a problem created explicitly by the language syntax.





  • With OOP languages, class methods can create a dichotomy of expected returns: Using a list reversal as an example, will a list.reverse(some_list) function reverse the list in-place, or return a copy of the reversed list and leave the original in-tact?

    Mmm - that is an excellent example, though not one specific to OOP… But I see your point. I think Kotlin and other languages have addressed these types of issues with ‘mutability’ as part of the type where it becomes explicit which variables can be modified. Kotlin even has “MutableList” as distinct from “List” which lets you say whether a list’s contents can be modified.




  • It solved a problem that didn’t exist and created problems that hadn’t previously existed.

    There’s a reason every python “intro” begins with “spend 20 minutes setting up an editor to deal with whitespace” properly.

    It makes moving code harder. It makes jumping around code blocks harder. Often the ide can help but sometimes it can’t.

    In any curly-brace language these are things I simply don’t need to even think about. But in Python it’s a pain.

    Yes it’s not the end of the world. Yes I can spend hours fine-tuning my editor. But… Why should I even have to? Why create these hurdles for no gain?