Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

I failed today

by erickp (Sexton)
on Apr 12, 2023 at 22:40 UTC ( [id://11151615]=perlmeditation: print w/replies, xml ) Need Help??

Today, I failed to convince my team at work to use Perl instead of Python for a new scripting project on Linux...They went with Python2 instead, imagine that.

Oh yes and my work is pushing most of us Linux deployers to start using Windows now for our client machines, imagine that.

What is this world coming to? Maybe I should just go flipping burgers for a living.

: (

Replies are listed 'Best First'.
Re: I failed today
by eyepopslikeamosquito (Archbishop) on Apr 13, 2023 at 01:37 UTC

    > They went with Python2 instead, imagine that

    Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.

    That is just the tip of the iceberg in my experience, with the younger guys eager to use a multitude of Infrastructure as code tools, such as Puppet and Ansible ... and new DevOps tools, often requiring JVM languages, such as Groovy ... and Microservices ... and trendy new statically typed languages, such as Golang and Rust, and ... :)

    > my work is pushing most of us Linux deployers to start using Windows now for our client machines

    In case it helps, I recently installed Ubuntu on Windows 11 - it's been working well and has made working on Windows much more enjoyable.

      > Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.

      Yep!

      > I recently installed Ubuntu on Windows 11

      Well that's Microsoft, if you can't buy them, or ruin them, embrace them...

      Though occasionally they sell too early -> microsoft-once-owned-a-chunk-of-apple xD

      Cheers Rolf
      (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
      Wikisyntax for the Monastery

        >> Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.
        > Yep!

        I admit I checked the date: was it really April 12 ... or April 1? :) ... OTOH, I shouldn't have been surprised, given what I predicted back in 2011 :)

        Python 3: I only claimed it was meeting "substantial resistance". Maybe that's unfair, depending on your interpretation of "substantial", but it's certainly meeting some resistance based on random web chatter on the subject. Well, I'm a Python user and I'm resisting it. ;-) My personal opinion is that breaking backward compatibility was unwarranted for a release with relatively modest improvements. Many businesses with large investments in Python 2.x code will resist Python 3 indefinitely because upgrading will prove too risky and/or too expensive.

        ... where is the ROI on spending millions of dollars rewriting millions of lines of already working code, without adding any customer value, while being almost guaranteed to suffer numerous breakages to critical business systems? ... you also pay an Opportunity cost ...

        See also: Re^6: Improving p5p: Perl is going to stay Perl (Backwards Compatibility)

Re: I failed today
by bliako (Monsignor) on Apr 13, 2023 at 09:12 UTC

    How do they propose to cope with the security non-updates in core AND especially in 3rd party packages?

    I am copy-pasting from a random link https://infosecwriteups.com/python-2-vulnerabilities-c3a3779f6fc:

    p = "aa" temp = input("enter pass: ") if temp == p: print("ahahah") else: print("ssss") enter pass: p <<< this is the name of the variable holding the passwo +rd! ahahah oO( lolling lolling lolling lol )

    Edit: the above is a world-first and the record is held by Python: the name of the variable holding the password must be at least as complex as the password itself. Unfortunately with a restricted charset this goes like : a_variable_you_123_will_n3v3r_b3_able_to_guez = "a strong password!". (Also added a comment in code above)

    OT: I have written an MIS for a factory in Perl. I have found that the system sending emails to users a useful feature. Then their (outsourced) IT told me that each company mail account has a monthly cost. Because ... they outsource all the factory email services to ... M$, some 365 %*%$^$&*. I can't understand that, unless M$ also signed them up for free insurance for virus and hacking damages. But that would bankrupt them. So, it's an infection which causes them to stare when you tell them what about confidentiality? Why not setup an email server and actually do some real IT rather than acting as a reseller of IT services? Stare. Stare. Stare.

    ... I am already flipping burgers part-time. Oh well, we will always have Linux

      I'm no fan of Python myself, but as most of us have seen Perl (mis-)features or improper usage used as examples of why not to use Perl, I feel someone should be intellectually honest enough to call the same when applied elsewere. In the example given, this is the use of a poorly-named feature that somehow survived in versions of Python prior to the 3.x series.

      In the 2.7.18 documentation, it says that input([prompt]) is the equivalent of eval(raw_input([prompt])), and to consider using the raw_input() function for general input from users. Their eval() is similar to our string eval() function, so I ask the question -- If you were writing a Perl script and accepting credentials, can you think of a valid reason to pass the user's input immediately through a string eval? (If you're writing a program that needs to be security-conscious, I expect some thought on the functions one calls, and honest research when testing shows something misbehaving (it was tested, right?).)

        so I ask the question -- If you were writing a Perl script and accepting credentials, can you think of a valid reason to pass the user's input immediately through a string eval?

        Of course not.

        Whereas Perl reminds us all the time that accepting unchecked user input is bad practice. And, god forbid, eval()'ing unchecked user input is criminal, Python decides to name the input+eval function input() and the sane just-input function as ... raw_input(). Why penalise the sane and common practice with more keystrokes? But you are right that reading the documentaton is key to avoid input() misbeheaving and fall in this trap.

        $ python2 --version Python 2.7.18

        at least

Re: I failed today
by Bod (Parson) on May 26, 2023 at 21:34 UTC
    I failed to convince my team at work to use Perl instead of Python

    Python does seem to be getting everywhere...

    The Raspberry Pi Pico doesn't have Perl, and all the API documentation for OpenAI uses Python - the two things I have been trying to work with recently...

    For a brief moment, I even considered learning some Python for these two purposes but I quickly came to my senses and wrote a Perl module to do what I wanted with OpenAI. The Pico will be more of a challenge!

      I’ve also picked up several pico based devices (Adafruit has a neat usb dongle with a couple rgb leds and some capacitive pads for buttons that’s about 6$) and yes they’re all micropython or some flavour thereof. Basically all it runs is a python interp (as opposed to an RPi that’s got a Linux kernel and env); someone with arduino or other µcontroller experience might could look at porting but given the resource constraints of the hardware I don’t think Perl is going to fit well (primarily RAM limits would be my fear).

      Edit: not strictly a pico (but runs circuitpython) and it’s 7$ but https://www.adafruit.com/product/4870 if anyone is interested. Also note there’s all of 32K of ram on this thing.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        I've not bothered buying a Pico because they do not run Perl...

        But I've been mighty tempted as getting hold of a Pi Zero W here in the UK is pretty much impossible. Although there are signs of a few supplies emerging.

        I might have to look to one of the other little devices that are around in increasing variations!

Re: I failed today
by LanX (Saint) on Apr 12, 2023 at 23:19 UTC
    Unfortunately I heard similar stories many times before. But ...

    ... why not Python3?

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

      Because the environment which we code for does not have standard support for python3, it is still mostly python2 unfortunately. Lots of legacy code to support.
Re: I failed today
by Jenda (Abbot) on May 25, 2023 at 21:43 UTC

    Buy yourself a fluffy rainbow emotional support butterfly.

    Jenda
    1984 was supposed to be a warning,
    not a manual!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://11151615]
Approved by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found