Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: Refactoring technique?

by hdb (Monsignor)
on Apr 24, 2015 at 21:31 UTC ( [id://1124613]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Refactoring technique?
in thread Refactoring technique?

I have been meditating over your original code. I cannot say what it does but the generalstructure looks like this: there are three sections, one for each plane. I would call that parameter $plane. In each of the three sections, there are three subsections: some prep stuff involving the two other directions in the same way and then two sections that you seem to want to refactor into doStuff. Each section needs both other directions but starts dealing with one of them first. For example, in tge z plane section it first deals with the x axis, then with the y axis. I would therefore call one direction $primary and the other $secondary. So in summary it would be doStuff( $plane, $primary, $secondary ).

Replies are listed 'Best First'.
Re^6: Refactoring technique?
by BrowserUk (Patriarch) on Apr 25, 2015 at 00:59 UTC

    As you'll see in the third code block, I went with your suggestions, at least until something better falls out of my brain :)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found