Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: print every nth element of an array.

by sundialsvc4 (Abbot)
on Jun 06, 2013 at 03:51 UTC ( #1037356=note: print w/replies, xml ) Need Help??

in reply to Re: print every nth element of an array.
in thread print every nth element of an array.

Y’know, in this case, I think that what I’d do is “a C-style for-loop,” for exactly the reason mentioned:   because it is “certainly one that would be understood by almost anyone who has taken up programming, regardless of the language.”   Someone (anyone ...) could someday encounter that piece of code, fairly-quickly guess what it was long-ago intended to do, and be correct.   If they now were tasked with changing that piece of code, they could once again do so with confidence.   And that, to me, pretty much trumps every other consideration.   “Shrink-wrap it... ship it...”

  • Comment on Re^2: print every nth element of an array.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037356]
[stevieb]: I don't know what you mean. I write the code in C/C++ that accesses the ICs per the datasheet, wrap it for Perl, then use them. My code ensures that the functions/methods from Perl do the right thing for the chips/sensors etc
[stevieb]: At least that's what I'm working on right now. I've also been updating my automated test software Test::BrewBuild so it handles this work properly. It's not really easy meshing high level languages with low-level hardware :)
[stevieb]: this link is probably better for an overview of my test software
[stevieb]: the top-level Raspberry Pi distribution, that sucks in all sub modules. All of this software have imminent updated releases coming

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-06-25 23:18 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (572 votes). Check out past polls.