Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: How do you find keys of a Blessed Hash?

by ELISHEVA (Prior)
on Oct 14, 2012 at 05:45 UTC ( #998921=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How do you find keys of a Blessed Hash?
in thread How do you find keys of a Blessed Hash?

I upvoted you on the level 2 reply to Corion for having the honesty to express your frustration and because it triggered a superb answer by Corion.

I want to stress and double stress the truth of what Corion is saying: stripping down your code to the smallest bit is time consuming work, but it is still ESSENTIAL. If you have truly found a bug in Perl, then the maintainers need to know the smallest set of circumstances that cause it. This helps them quickly identify where in the Perl codebase the code relevant to creating the bug lives.

Stripping down code without disrupting a bug is an artform and sometimes requires great skill. In a way it is catch-22 for "young" (professionally speaking) Perl coders : if you had the skill and understanding of codeflow and syntax to do the stripping down you might not need help figuring out the bug in the first place.

Sometimes the good monks here can address that issue by asking people to post code, but that only works if they are doing small programs with few outside influences. Even if a newbee can't see where the codeflow or data initialization has gone wrong, a more experienced eye can. That's why we ask people to post code.

But as you point out, this is not the situation for you. Your programs aren't small and they have lots of outside influences (third party libraries). This leaves us with two possibilities: (a) you can strip it down and won't take the time (b) you are trying to write code that outstrips your mastery of Perl.

As a general rule, if one is writing code that is too complex for one to strip down on one's own to the smallest bit that reproduces the bug, then one is probably writing code beyond one's skill level in that particular language. Just as kids shouldn't swim beyond where they can swim back, or climb jungle gyms and trees beyond the point where they can get themselves down, one shouldn't aspire to write and design programs beyond the point one can independently strip down code to the smallest segment that reproduces the bug.

Assuming you are a good soul and not lazy, that leaves me with the thought that perhaps you are overreaching your skill with some of the programs you are trying to write. You may be a top notch C++ coder and can do fancy algorithm dances in C++ or Algol or Ruby or whatever, but each language has its own idiom and debugging assumptions. Perhaps you might want to consider working on more simple programs in Perl until you've become more skilled at isolating and reproducing bugs in small code snippets?


Comment on Re^3: How do you find keys of a Blessed Hash?
Re^4: How do you find keys of a Blessed Hash?
by perl-diddler (Hermit) on Oct 17, 2012 at 17:29 UTC
    <quote> (b) you are trying to write code that outstrips your mastery of Perl. </quote> ---- As they are my own programs -- I am *CONSTANTLY* pushing against the boundaries of my current knowledge of perl.

    Staying within my comfort zone is a good way for me not to grow.

    Furthermore, if you do things write...you should rarely have the need nor the opportunity to stay in your comfort zone. I.e. if you have mastered an area, put it in a library, for re-use -- and you won't be re-writing your 'comfort zone code'. The only code left will be code that is outside of your current knowledge domain. Only there can learning occur. <quote> Perhaps you might want to consider working on more simple programs in Perl until you've become more skilled at isolating and reproducing bugs in small code snippets?</quote>

    I have a diagnosed mental condition that precludes me working on stuff that is 'simple'. I literally can't focus on it. It's not a choice. Most people don't understand that -- and people with Overfocused ADHD are often told they are lazy, or trouble makers and are often discriminated against in the workplace or on lists and in life. But it's a medically diagnosed condition that is largely untreatable with current technology. But it causes me no end of problems, as my focus is often very different from what others think it is and that results in miscommunications, which virtually no one feels a need to even TRY to understand.

    The few that try and succeed, often have great respect for my integrity, and my perseverance in spite of holding unpopular views -- I've been kick off forums for for such, because -- in one person's view, if was too risky to allow me to continue to speak to a group, as my ideas might become understood... and that would undermine the power of those in power who are running their own agenda. Thus they work to shut me away from their power base.

    I know I'm likely saying a bit more than I should, but I tend to be a bit too honest for my own good -- so I am told by my friends, when I should just keep quiet. But I feel that only by being earnest, will I authentically "get anywhere". In every case where I'm doing something ahead of the curve -- the curve catches up 2-5 years later. Would it have happened w/o me... probably, eventually, but I can't help but wonder if it would have happened as quickly.

    So I will likely continue to program at the edge of my skill -- even if they decline, as it's the only way to keep my brain at it's sharpest and do as much as possible to expand my grown and minimize decay...;-)

    Sincerely & Cheers & thanks for your insightful and candid views.,
    L Walsh

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-07-31 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (253 votes), past polls