Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: (OT) Interview questions -- your response?

by tadman (Prior)
on Sep 04, 2002 at 07:32 UTC ( #194994=note: print w/replies, xml ) Need Help??


in reply to (OT) Interview questions -- your response?

Here's my take on Q1, which isn't entirely original, but is self-contained:
my @c = do { my %tmp = map { $_ => 1 } @a; grep {$tmp{$_}} @b };
Here's my take on Q2 which ended up the same as others:
for (1..@foo/2) { @foo[$_-1,-$_] = @foo[-$_,$_-1]; }
The first thing that came to mind was:
@foo = map { pop(@foo) } 1..@foo;
But that's not precisely an in-place version, even though you could argue that the temporary "array" only holds things that have been removed from @foo.

Replies are listed 'Best First'.
Re: Re: (OT) Interview questions -- your response?
by demerphq (Chancellor) on Sep 04, 2002 at 19:01 UTC
    If your going to use $_ anyway you might as well use the more efficient modifier form (no scope handling overhead).
    @foo[$_-1,-$_] = @foo[-$_,$_-1] for (1..@foo/2);
    BTW: I think this is probably the best implementation (starting at one instead of zero) of all that have been present along this line (especially including my embarrasing fencepost error version) so ++ to you.

    Yves / DeMerphq
    ---
    Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

Re: Re: (OT) Interview questions -- your response?
by Anonymous Monk on Sep 04, 2002 at 08:11 UTC
    And again it is changed no less than two times since my last post. Once to acknowledge the actual thrust of the change, and then again to remove that acknowledgement and post something entirely different. Please tadman, if you are going to edit things then edit them with an eye to history and don't leave subsequent posts just hanging (no matter how good it might feel at the time).
      After sitting down and reflecting on my rather scathingly sarcastic reply, I decided, that in the interest of civility, I would retract my words. Obviously, they have been read, and so, are no longer required.

      This tactic of switching to Anonymous Monk just to fire off some heated complaint is really quite irritating. If you have any specific comments that can be expressed in a civil manner, I'm sure you wouldn't need to bother with such tactics. I'd like to think that a simple /msg could do the job, as this is really just cluttering up the main thread.

      I honestly don't understand why the removal and reinsertion of less than a half-dozen lines of text is causing so much fuss. The end result contains everything the original did, and more.
      This tactic of switching to Anonymous Monk just to fire off some heated

      Nobody switched, I *am* an anonymous monk.

      I honestly don't understand why the removal and reinsertion of less than a half-dozen lines of text is causing so much fuss. The end result contains everything the original did, and more.

      Changing history is never a good idea. I read a thread, see something I wish to discuss (correct, disagree with, concur with, whatever), and by the time I've composed my response and refreshed the page, an entire chunk of your dialogue is no longer there, and my response no longer makes any sense. But I still have some thing to say, so I recompose, and you re-edit, and again I'm left talking to a ghost.

      I may be anonymous, but I have better things to do with my time than to chase your changing words. So I ask you, will you stand behind your words or should I (and anyone else who values their time) simply ignore your ephermal scratchings on this site?

        I'd rather read tadmans retouched and generally pleasant, interesting and helpful words than yours. If you feel so strongly about this issue that want to stand up on a soapbox and rail against the world about it then how about you at least do it with a name?

        Nobody (well, maybe the gods could if they gave a toot) can tell who you are behind your pseudonym, so theres no real reason to play the "anoymous monk" bitching game.

        Anyway, I almost never vote on an anonypost, and ive never -- one for sure, so it's a bit sad that my first time doing so involves so nodes.

        Oh, BTW, its the kind of attitude that you display that makes people run from CLPM to here. Bad attitude on the part of our community is a much bigger threat to it than minor edits of a post.

        Get a pseudonym and stand by your words dude.

        Yves / DeMerphq
        ---
        Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

        Howdy!

        OK. So you didn't "switch" to Anonymous Monk. You still posted needlessly tendentious replies anonymously. That is not the mark of civil discourse and conversation. That is the mark of lame flaming.

        By remaining anonymous, you limit your credibility, and get tarred with the actions of other Anonymous Monks, since we can't tell them apart.

        You claim to have better things to do with your time. Your responses on the thread suggest that you misspeak -- otherwise why bother posting?

        yours,
        Michael (who is available for immediate employment in the Washington/Baltimore area as a Unix sysadmin, Sybase DBA/designer, Web admin, or some combination of the above -- see scratchpad for resume)

        As an anonymonk, you can't edit your posts. That means your complaint post cannot have been updated in response to the crime. You had to specifically refresh tadman's post repeatedly, monitoring for changes, waiting to make your move. Obviously you must indeed have that kind of time.

        So while your concern as such is certainly valid, do you think you are setting a brightly shining example to follow by using ambush tactics to target a stream of profanities at a fellow monk?

        Makeshifts last the longest.

    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2019-06-17 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (80 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!