http://www.perlmonks.org?node_id=1172684


in reply to Don't post bad code!

dear afoken, you, as usual, are right.

Every point you touch in the above meditation is correct and sounds of your will to help people learning Perl.

But to learn is a matter of intelligence and intelligence is matter of choice (intelligere intus/inter + legere as in "be able to choice among" ).

Your will to teach a better Perl does not make this monastery a school.

The monastery is a reflection of the reality: "who want to speak about Perl? come on entrance is free" is a wide call for every type of coders and even no coders at all!

Our (mmh more on me later..) goal is to offer our solutions or opinions and underline well in red which are good and wise answers; recently a bunch of discussions pointed to the necessity to show in better way good answers and good coders.

The voting system and Level of monks helps a little in this way but somehow can be a guidance for newcomers. But is up to the newcomer to understand what he choice to ear (and to copy in his program).

Many people here around are not professional programmers; sysadmins, net people, hobbyst coders, amateurs, curious ones.. many of us have no such thing called production code

I did not say this is good or wrong; is a fact.

I entered the IT in a very tangential way, I stumbled on Perl and i liked it. I immediately appreciated PerlMonks as a cave of true gems. After years spent reading I have good list of monks which post I look with attention but sometimes I can tell good and wise answers from Anonymous ones too.

When there is a discussion about something I know, even little, If I can show another way, i take my slice of freedom and I post something; if it is wrong and downvoted and some big monks explain why my contribution was no wise.. is always a way to teach and to learn, for me and others. I can produce many examples but one for all is Find 30 days from today's date

I answered with my personal examples because in many, if not all, point you touch I'm guilty, I was and I will.

TIMTOWTDI is a Perl foundamental too and is educative even to know that some task is doable with a oneliner. I recently posted many oneliners because i had fun writing them, more fun than watching tv. I think too that oneliners are somehow irreverent in respect to the programming in itself: obviously if someone fond his critical application on my idea of ten days ago using the above oneliner is a fool as fool is who write a complete program just to know which range of days in logs need to analyze.

Smart snippets, oneliners, are not wise? If they provoke challenge and fun so they can be a big boost while learning Perl.

Golf code in beginner thread? I can assure you from my experience that is completely unharmfull: in the past I looked at such code more like to some kind of ASCII art, like Linus at russian names.

The orrible hat of a turist in front of you does not erase your souvenir of Colosseo.

best regards

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Don't post bad code!
by afoken (Chancellor) on Sep 27, 2016 at 06:18 UTC
    to learn is a matter of intelligence and intelligence is matter of choice

    Good point. But as you wrote:

    Our [...] goal is to offer our solutions or opinions and underline well in red which are good and wise answers; recently a bunch of discussions pointed to the necessity to show in better way good answers and good coders.

    It is hard for a beginner to estimate the quality of a posting. The existing voting system does not help here, because you can't see the votes a posting has collected. You need to vote first. Initiates can't vote at all, Novices can vote only twice, so they can get a quality estimate for only two answers. And of course, you need to find and study the voting documentation (e.g. Voting/Experience System) first, while your real problem waits for a solution.

    So yes, an improved voting / rating system would help beginners.

    When there is a discussion about something I know, even little, If I can show another way, i take my slice of freedom and I post something; if it is wrong and downvoted and some big monks explain why my contribution was no wise.. is always a way to teach and to learn, for me and others.

    My meditation is about intentionally posting bad code (sorry, missed that important word in the meditation), not about posting "accidentally" bad code.

    I can produce many examples but one for all is Find 30 days from today's date

    Easy: perl -E 'sleep 30*24*60*60; say scalar localtime' ;-)

    Smart snippets, oneliners, are not wise? If they provoke challenge and fun so they can be a big boost while learning Perl.

    Right. But it requires a beginner willing to learn. So yes, it's a good thing.

    Golf code in beginner thread? I can assure you from my experience that is completely unharmfull: in the past I looked at such code more like to some kind of ASCII art, like Linus at russian names.

    I doubt that. If you start with perl, even good code looks like ASCII art or line noise. Especially if perl is your first language. For me, Perl was language number 5 or 6, so I could see structures even without knowing the language. MUMPS was number 15 or 20, and even if it looked like a cat ran several times over an old typewriter, it took me just a few hours to understand the basics and a few weeks to write significantly better code than my instructor. Beginners don't have that amount of experience.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)