Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

The first cargo cults

by jepri (Parson)
on Jan 11, 2002 at 18:23 UTC ( #138003=perlmeditation: print w/ replies, xml ) Need Help??








I didn't believe in evil until I dated it.

Comment on The first cargo cults
Re (tilly) 1: The first cargo cults
by tilly (Archbishop) on Jan 11, 2002 at 19:00 UTC
    Those who want to read the speech the above Feynman quote is from can find it online as well.

    It isn't as simple as just saying to experiment. It is a lot (as Feynman says in the longer speech) about maintaining a conceptual integrity from which you learn through experience what to pay attention to, what is essential, and what is probably not. Programming is a little different from science in this. In science we have no good preconceptions available of how things should be. In programming there is likely to be documentation on how things were intended to be (they might not have wound up that way, but that is another story).

    But still, without a solid mental model of why we do the actions that we do, we are likely to repeat actions by rote which make no sense out of their original context, and we will miss obvious ways of doing things simply because we have no way to even understand that they make sense. So try to understand what you are working with. Don't wave bamboo because it looks like what you saw. Understand what you saw and then act according to your best understanding.

      Ack! It does look like I said that Feynman's remedy was to experiment. Like you say, Feyman was really getting into integrity and experimental methodology. Although I would point out a large part of that speech was about how people don't learn from experience what to pay attention to.

      I appreciate how correct you are in focussing on building a compact mental model that helps you understand and perform better. I was trying to focus more on the first step, which is letting go of a very beguiling mental model, the 'magic wand' model of doing something.

      I suggested the experiment idea because I have never failed to learn something by taking stuff apart - whether programs, televisions or cars. I feel that conceptual integrity only becomes an issue after someone stops believing in magic and starts forming their own concepts.

      I didn't believe in evil until I dated it.

        What I think is that we all start by believing in some form of "magic". How we learn to distinguish our magical misconceptions from reality is through trying to create conceptual integrity. Without having at least some of that we lack the basic tools to try to form our own concepts. (For more on this, a lot more on this, I suggest picking up Why People Believe Weird Things.)

        As for the speech, I agree absolutely that a lot of it was about how people don't learn from experience. More than that, it was what you need to do to have a chance of learning from experience. And at the top of that list is that you have to be willing to discover that you are wrong. If at all possible, you want to encourage this. Keep in mind that that discovering that you are wrong is the first step to improving and having a chance of being right.

        Incidentally while this is one of the first principles of how successful science works, it is not sufficient for progress. All of the willingness to learn won't help you one bit if what you are trying to learn about isn't amenable to simplification and analysis with your current toolset. Which is one of the reasons that the social sciences have been unable to establish solid foundations for themselves. It is not that no good scientists have tried to do so. It is that the subject is not tractable enough for us to do a good job with it.

Re: The first cargo cults
by talexb (Canon) on Jan 11, 2002 at 19:19 UTC




    --t. alex








      I didn't believe in evil until I dated it.


        You wrote:




        Sorry, but you just hit a pet peeve.










      So follolwing your explantion I'm doing cargo cult?

      My opinions may have changed,
      but not the fact that I am right

Re: The first cargo cults
by MungeMeister (Scribe) on Jan 11, 2002 at 21:30 UTC
    If you think about it, this relates to Perl and other programming languages perfectly. Why did the "cargo cult" think that making a runway with lights (fires) and sticks to direct there airplanes would make the airplanes arrive? Because they didn't have all of the information, and it wasn't easily available! The missing link was the radio to call the airplanes, which would have been locked and off-limits. C/C++/Java are very similar. You can get some really cool module/libraries, but you can't learn how they work because you don't get the source code.

    But Perl is different...

    Because of great communities like PerlMonks, not only are there repositories of code, but also excellent descriptions of how they work. And with the open nature of Perl, if you want to know how a module like works, take a look. The source code is there for you to read. Almost nothing is hidden! Try that with C, C++, or Java.

    One of the best things, IMHO, about perl is that it allows you to easily experiment. I use all the time now. I'm always testing snippets of code to make sure I understand what is going to happen before I stick it in a big script. It makes it easy to try new techniques and commands. This really reduces the amount of time I spend not only writing the overall script, but also debugging time.

    All of this combines to make Perl easy to pick up and start using, even if you don't understand all of the "why". Then, as you use it more, its easy to pick pieces of the language to learn more about and understand how things work. My own Perl experience has followed that course.

    In other words, the door to the radio room is open, and everyone is encouraged to talk...

Re: The first cargo cults
by archen (Pilgrim) on Jan 11, 2002 at 23:53 UTC
    Well I'd venture to say that it's not ALWAYS a bad thing to cut and paste code (certainly not if you understand it and wrote it yourself).

    Okay, a confession: I cut and pasted a lot of code when I first started Perl (that includes typing what I found in a book). My first project (and the reason I learned Perl) was to make a guestbook MY way. My reference was the Black Book of Perl - informative, but horribly organized. The only code I used for reference was the Ultimate Bulletin Board (UBB), yes THAT one.

    About half of the code was my own, and about half was some sort of copy job which I vaguely understood. The guestbook worked, which was good enough for me.

    Months pass, and I tend to hack Perl on a daily basis. I decided to go back to the guestbook to add a feature. I was somewhat horrified what I found in there, but needless to say it was a mess. I endeavored to fix it, and in the end it's far better then the cut and paste patch job. It's also a good feeling when you surpass the things that taught you.

    So in a nutshell, sometimes 'cut and paste' makes a good crutch. Just keep in mind that in the long run, it will eventually hold you back - and it's certainly no substitute for learning the language.
Re: The first cargo cults
by danger (Priest) on Jan 12, 2002 at 04:11 UTC








      Excellent post. Just a couple of points.











Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://138003]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-12-26 03:46 GMT
Find Nodes?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?

    Results (164 votes), past polls