Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^6: Yet another config file editing programme : Tell me how to make it better !

by GrandFather (Saint)
on Sep 07, 2021 at 01:33 UTC ( #11136512=note: print w/replies, xml ) Need Help??


in reply to Re^5: Yet another config file editing programme : Tell me how to make it better !
in thread Yet another config file editing programme : Tell me how to make it better !

Try not to get hung up on the "switch" issue. In my view given/when is a fine addition to the language, but it came bundled with the smart match operator. It turned out the smart match operator was a bad idea (much too powerful and arcane) and unfortunately, because it was bundled with given/when, given/when acquired the same bad rep. As eyepopslikeamosquito suggests, there are other ways to do it - and that is really a cornerstone of Perl: there are many ways to do most things so you can play around and see what works best for you and the task at hand.

Perl is a great language for this sort of task where you are munging files. But tricky stuff is tricky stuff and all a good language can do is make it easier to think about the key parts of the problem while it hides the boring stuff away. If someone else hasn't already done the job for you (or you can't find it) and you don't want to pay someone to do it, ya just gotta do the tricky stuff.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re^6: Yet another config file editing programme : Tell me how to make it better !

Replies are listed 'Best First'.
Re^7: Yet another config file editing programme : Tell me how to make it better !
by dazz (Beadle) on Sep 07, 2021 at 09:27 UTC
    Hi

    I think the problem is mine. I know my knowledge of the language is wafer thin. I recognised that my coding was poor, which is why I came here for advice. Although professionally I direct IT based projects, I haven't seen code, or coded, as part of my job for decades. My last major IT project was for a bank where the application compiled to 22GB in size. It wasn't written in perl. I never met either the vendor or bank programmers. Too many layers of management between them and I. So I only get to actually touch code as a hobby in isolation. The absence of contact with professional programers does nothing to improve my own coding.

    I get a little testy when software doesn't match the claims on the brochure and simply doesn't work when it should. I can see that perl is good for getting down in the weeds and gluing systems together. I can also see that modules are a great way of creating Lego blocks that get the job done without reinventing wheels. I was a little frustrated to find language defects and only half built Lego blocks (modules) for a task as simple as updating a Linux/Unix config file. Something I suspect is a routine part of a perl programmers role. It is what it is and I am who I am.


    Dazz

      I get a little testy when software doesn't match the claims on the brochure and simply doesn't work when it should

      While I understand your frustration, and I feel it too (especially in lockdown), I have to ask: given you're not paying for Perl, and to the best of my knowledge have never contributed a single Perl patch or CPAN module, do you feel you have a moral right to complain?

      I too get frustrated at times but (like Your Mother) I refuse to criticize devs willing to do things I am not.

      Anyways, you've already demonstrated the talent to write useful, working programs, you just need a bit more patience and time (oops, ten years according to the first link below ;) and hard work to reach a level where it starts to become enjoyable.

      Some links you might find useful or interesting:

        Hi
        As any Mother knows, the petulant child is never concerned with rights and wrongs, only wants.

        As my daughter says, "it's all about me, me, me!"

        Thanks for the links.


        Dazz

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2021-10-26 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (90 votes). Check out past polls.

    Notices?