• KyuubiNoKitsune@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    13
    arrow-down
    3
    ·
    1 year ago

    Probably the most unpopular opinion here but PowerShell.

    My main reason is that it’s extremely easy to learn and is a good intro to object orientated programming.

    People bash it but it’s extremely easy to inspect objects, get any properties and methods associated with that object or class, walk through all the properties of the object and transform that into whatever you need.

    It has a very fast turnaround time when developing code as you can run tiny snippets at a time and understand their outputs before moving to the next bit.

    I’m not a Dev and end up having to write python from time to time and I hate it. At one point I just needed to understand an object in a variable and I couldn’t do it, the command dir exists but it didn’t give me any of the info I needed. There’s a function in PowerShell called Get-Member (alias: gm) that you can pipe anything to and it will show you all those details of the object.

    It helped me tremendously when I was just starting out.

    Its super powerful, it can do anything C# can do because it’s built on it, you can also run inline C, C# and C++ code with on the fly compilation.

    It’s also OSS and cross platform.

    • 1984@lemmy.today
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Oh Jesus no.

      But I knew there must be someone who likes it.

      In python you may have wanted the repr command to see how an object looks like.

    • ReluctantMuskrat@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I’m a developer with 30 years experience in lots of languages and honestly PowerShell one of my favorite. Of course anything is an improvement over batch file scripting but it’s so much better than bash. An object-oriented command line is amazing - such a huge improvment over having to use text-processing tools to parse output. Built-in support for virtually every text file format, easy access to web and rest services, and now that it’s cross-platform and open-source I’m using it consistently on Linux and Macs. I’ve been using it for almost 15 years and it’s sad how few people outside of the Windows eco-system are familiar with it, and even more resistant just because it’s from MS.

      • KyuubiNoKitsune@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Yep, the disparaging comments you get on anything where you mention PowerShell are a sign of some deep rooted prejudices and the unwillingness to learn something new because of them. They’ll rather scoff and pretend that they’re morally superior because hurry durr Microsoft.

        I’m glad that there are people who appreciate it for everything it can and does do. I cringe every time I have to use bash because of just how bad and cumbersome it is to use.