Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Philosophical Perly Queues

by l2kashe (Deacon)
on Apr 18, 2003 at 19:55 UTC ( [id://251529]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Philosophical Perly Queues
in thread Philosophical Perly Queues

While I hear what you are saying, and what the AM you are responding to is saying, I have to say my "personal opinion" puts me more inline with the AM, and I'll state why..

Note: I'm going to attempt to keep this relativly concrete as opposed to the quasi spiritual/religious thread this has appeared to become, while addressing what I think needs to be said.

First off as to the pearls before swine. His premise is they won't grok it, and will continue to come back (give a man a fish vs teach a man to fish, yada yada), your position is throw it out there cause you're never sure who will see it and benefit. From personal experience it is a *drain* on multiple levels attempting to convey an idea to someone who simply doesn't have a solid foundation in said realm. It can also lead to someone's harm (on different levels in different situations) to attempt to use said knowledge without said base..

Case in point: There is an app being developed by a group. The members of this group know how to code in a particular language, and in a particular application. They have been hired as developers, and claim to be such. They then decided that the OS they were developing on didn't know how to manage it's own network stack, and that they were going to "grandfather" along code from a previous developer to handle their network communication. Problem was they don't grok it. So when something was going to go out the socket, they had an array as a buffer. The array was hardcoded at 2048 char elements. Sure no biggie. Instead of checking to see what was in the buffer to be sent the code looked along the lines of
for ( i = 0; i <= ARRAY_END; i++ ) { if (array[i] != NULL) to_send[i] = array[i]; else to_send[i] = 0; }
pearls before swine.. Every single transmition out of that box was 2048 null padded bytes in size, even if only say 10 bytes needed to be sent. Every single one. They couldnt figure out why the app at the far end was complaining about the packets it was receiving. They couldnt figure out why the VPN was timing out. They also have missed quite a few deadlines due to the fact that they think they grasp the problem at hand without realizing the basic onion structure of technology, especially in a networked environment. I had to provide code for them to simply be able to run commands on a remote system. Not complex things but simple things ala ping, nslookup. There lack of knowledge hurts many many people in different ways within just my organization. This is a quasi perfect example of simply not allowing the swine to become lemmings without realizing it.

Within this situation, (forgive the assumption on my part) I am the master ( better is I am a senior student.. ). I look at the acolytes and wonder why they think they are enlightened. So I passivly drop phrases, or initiate direct conversations to see the depth and breadth of their domain, and simply find them lacking, or thoroughly convinced of their "enlightenment". I shake my head and move on. Until they open their eyes, review the situation, and realize they don't grok it, anything they attempt to code up is simply going to flop. Plain simple fact. Now there is another "master" I deal with on a regular basis. I look at the problem, the other master looks at the problem, and we look at each other. Rattle off module names, 1, 2, 3, say "one hundred lines", I counter "probably, maybe 75, or some whizbang in 130". We nod. and that is that.

In an ideal world this situation would be an exception, but its not. Its the common occurance. I think in another couple of years I will be comfortable calling myself a programmer and developer. While right now I can perform some small pieces of each of those domains, Im simply not good enough to feel comfortable giving myself those labels. To tie this last paragraph in with the thread, I have been expelled from the monastary and am presently begging on my own. There are things I very well may have learned at my "master"s feet, or through his words and actions, but it would have taken too long, and I would have been fundamentally flawed as an individual if I always had a crutch to lean on. There are a depth to things I simply could *not* appreciate without pulling them apart myself. If I were to attempt to transmit what I know, and what I know I don't know yet, I could ruin alot of peoples projects..

Case in point: $class = $in || ref($in);

Yeah its right.. but why? when? where? If you shrug don't use it. How many modules will break for no apparent reason due to that one singular line?

pearls before swine

At this point I will avoid the other topics as I have rambled.. Feel free to message me at some point and we can talk at depth about this. Also note I never once in this situation attempted to go below generalities. Any of the things I said above can systematically be proven false at the individual level. Which just reinforces the point in my mind.

MMMMM... Chocolaty Perl Goodness.....

Replies are listed 'Best First'.
Re: Re: Re: Re: Philosophical Perly Queues
by demerphq (Chancellor) on Apr 20, 2003 at 11:33 UTC
    $class = $in || ref($in);

    Yeah its right.. but why? when? where? If you shrug don't use it. How many modules will break for no apparent reason due to that one singular line?

    I don't think that would be right anywhere, and certainly not in a consturctor. Perhaps you meant the opposite?

    my $class=ref($proto) || $proto;

    which AFAICT, wouldnt break any code at all. Why would it? The primary objection to this idiom (assuming you mean when it is used in a new()) is one of semantic meaning. Class->new() has a clear meaning, but $obj->new() doesn't really. Does it mean to copy the object? Does it mean to create a new object of the same type as the old? Does it mean something deeper?

    This is primarily an issue that detailed documentation resolves nicely. I would say that you could replace my $class=shift with my $proto=shift; my $class=ref($proto) or $proto; just about everywhere without a failure.

    One trap with using this idom (and about the only real trap regarding that I am aware of) is when someone accidentally mixes indirect notation with direct notation, or calls new in a strange way

    my $Obj=new Class->new(@args); my $New=Class->new(@argS)->new()->foo(); # probably an error

    most likely will create an initialized object, then use that to create an unitialized object. A hard to track down error that is thankfully rather uncommon as well.


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-06-18 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.