Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Meditations

( #480=superdoc: print w/replies, xml ) Need Help??

If you've discovered something amazing about Perl that you just need to share with everyone, this is the right place.

This section is also used for non-question discussions about Perl, and for any discussions that are not specifically programming related. For example, if you want to share or discuss opinions on hacker culture, the job market, or Perl 6 development, this is the place. (Note, however, that discussions about the PerlMonks web site belong in PerlMonks Discussion.)

Meditations is sometimes used as a sounding-board — a place to post initial drafts of perl tutorials, code modules, book reviews, articles, quizzes, etc. — so that the author can benefit from the collective insight of the monks before publishing the finished item to its proper place (be it Tutorials, Cool Uses for Perl, Reviews, or whatever). If you do this, it is generally considered appropriate to prefix your node title with "RFC:" (for "request for comments").

User Meditations
Perl, JavaScript and Strandbeests
2 direct replies — Read more / Contribute
by cavac
on Jul 20, 2017 at 08:19

    A little over a year ago, i have been playing with AI::Genetic, Javascript::V8 and Strandbeest evolution for a Linuxdays Demo. I wrote this originally as a distributed genetic evolution demo, complete with managment web interface, but for the sake of clarity, here is the single-user command-line version of it.

    (I might do another meditation later that show more of the distributed stuff, but my Raspberry Pi cluster is still in a packing crate in the attic... i hope... after moving house in a chaotioc fashion).

    Before i begin, you should note that the Javascript::V8 version on CPAN has a memory leak. You might try my own, non-official version at https://cavac.at/public/mercurial/JavaScript-V8/. It is in a mercurial repo, so you should be able to do this:

    hg clone https://cavac.at/public/mercurial/JavaScript-V8/ cd JavaScript-V8 perl Makefile.PL make test install distclean

    The magic of Strandbeests

    I was always fascinated my Strandbeests, the huge moving "animals" created by Theo Jansen. Although mostly made out of PVC tubes, they exhibit a really strange, lifelike movement.

    The key part of this creatures of the length relationship between their eleven leg parts that lets them walk with very little effort. As Theo put it: "But even for the computer the number of possible ratios between 11 rods was immense. Suppose every rod can have 10 different lengths, then there are 10,000,000,000,000 possible curves. If the computer were to go through all these possibilities systematically, it would be kept busy for 100,000 years. I didn't have this much time, which is why I opted for the evolutionary method."

    Computers? Doing evolution? Hell yeah, i needed to learn how thats done!

    Why JavaScript?

    While i'm a competent developer when it comes to PostgreSQL databases, HTML and similar stuff, a lot of the math required for analyzing and evaluating the movement of a Strandbeest leg is completely outside my comfort zone (i.e. i have absolutely no clue how to do it).

    Thankfully, someone on Stackoverflow made a nice Javascript demo, which (for my Linuxdays thing) also solved the HTML visualization problem for me.

    Perl to the rescue

    This is where i came in. Now i had two options. Either convert the JS code to Perl (and keep it compatible with the JS version, so the HTML visu was in sync), or just use Javascript without the drawing functions from within Perl. I chose the latter, because it seemed easier.

    To run the genetic evolution algorithm itself, i chose the AI::Genetic module, since this seemed the easiest interface for what i needed.

    Before we begin, we need to define FileSlurp.pm (which is a simplified copy from the one in my maplat_helpers repo):

    We also need James Coglan's Sylvester Vector and Matrix library for JavaScript, saved as "sylvester.js"

    And last but not least in our list of "support" files, the Strandbeest evaluation function itself, saved in a file with the name "strandbeest.js". This is the one with all the graphical functions removed:

    Now that we have to copied portions of our code, let's write some of our own.

    beest.pl

    This is basically our caller for the main module and runs the main loop. First we check for some command line arguments, set up the evolver, and then run in an infinite loop.

    We want to support 4 different arguments:

    • --load Loads previous best 3 fits from fittest.dat and seeds the population with them.
    • --save Every time we find a new best fit, we save the best 3 members of the population to fittest.dat.
    • --population_size=1000 Set how many members does each generation have.
    • --crosspolination_count=10 Set the level of cross-polination during evolution.

    Here is the code (file "beest.pl"):

    Evolver.pm

    Most of what Evolver.pm does, is a pretty straight forward wrapper around AI::Genetic, except the Javascript-Handling:

    use JavaScript::V8; ... my $vectorjs = slurpBinFile('sylvester.js'); my $strandbeestjs = slurpBinFile('strandbeest.js'); my $js = $vectorjs . ' ' . $strandbeestjs; ... my $ok = -1; my $errortype = 'MATH_ERROR'; my %scores; my $ctx = JavaScript::V8::Context->new(); $ctx->bind_function(write => sub { print @_ }); $ctx->bind_function(setFailed => sub { $ok = 0; $errortype = shift @_; }); $ctx->bind_function(setFinished => sub { $ok = 1; %scores = @_; }); $ctx->bind(params => \%params); $ctx->eval($js); my $error = $@; my $total = -1000; # Default: Failed! if(defined($error)) { print("SCRIPT ERROR: $error\n"); } elsif($ok == -1) { print("Script didn't call setFailed() or setFinished()\n"); } ...

    Here is the full code of Evolver.pm:

    While i'm a bit sparse here with explanations (never was the type who could do the teaching stuff), it should give you a nice overview of both how to run Genetic algorithms in Perl, as well as how to use existing JavaScript code to solve a problem.

    Additional information

Fun with Prototypes
3 direct replies — Read more / Contribute
by haukex
on Jul 19, 2017 at 07:54

    Can you tell me:

    1. How does this get parsed? (e.g. try adding parentheses to show precedence)
    2. Given that the body of each of the four subs is { print Dumper(\@_) }, what is the output?
    $_ = "#x"; my @a = qw/b c/; foo /#(\w+)/, @a; bar /#(\w+)/, @a; quz /#(\w+)/, @a; baz /#(\w+)/, @a;

    Hint:

    Solution:

Error reporting in Perl
6 direct replies — Read more / Contribute
by Jambo Hamon
on Jul 12, 2017 at 20:41
    Use of /c modifier is meaningless without /g at (eval 14) line 1, <__A +NONIO__> line 4.

    Would it not be nice to see the offending string in an error code, taint approved? And if it's not a string... Then it's not Perl.

    I slay me,
    Jambo

Barstool Chatter
3 direct replies — Read more / Contribute
by Jambo Hamon
on Jul 09, 2017 at 21:00
    What will the pundits say Perl can't do next?
    
    $pundits = shift
    
    
    :]
    
Goedel's Proof of God in Perl
2 direct replies — Read more / Contribute
by Jambo Hamon
on Jul 09, 2017 at 08:38
A meditation on the naming of perl6
4 direct replies — Read more / Contribute
by stevieb
on Jul 07, 2017 at 09:38
REFLECTIONS on $_
3 direct replies — Read more / Contribute
by Jambo Hamon
on Jul 06, 2017 at 21:21

    SOLIPISM KNOWLEDGE OF $SELF FOR ALL YOUR DEEPEST QUERIES.

    How many meditations does it take to reach ``Knowledge of Self''?

    The following links to the randomly choosing elements from an array node. It is meant to show the reflective nature of $_ and is not an excercise in using or creating a link. Display purposes only. :]

    https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja +&uact=8&ved=0ahUKEwj0yqChgPbUAhVBeD4KHXnPDJsQFggwMAE&url=http%3A%2F%2 +Fwww.perlmonks.org%2F%3Fnode%3Drandomly%2520choosing%2520elements%252 +0from%2520an%2520array&usg=AFQjCNEYUua_3UVPyzYBRG4ruf_ZfYRTXw

    If you squint a bit you can see the GET string looks a lot like Perl code?

    a) It's a string with lot's of punctuation.

    b) It's lexical in nature, meaning it's value is only apparent inside the context of the page "url", coincidence? :]

    ---

    Note:

    I thought one of the purposes of the meditations page was to have meditations.

    I mean that I could try to explain what I was thinking when i though let's paste this link from google as a meditation, but isn't it better to just meditate on it?

    Having fun if you are,
    Jambo

Mahalo - Thank you in Hawaii
1 direct reply — Read more / Contribute
by Jambo Hamon
on Jul 06, 2017 at 19:00
    I just want to say something publicly; Even though it might be taken a million different ways. I want to say thank you to the culture of Perl for engaging me. Culture has many different contexts, and the many different abilities of Perl is what makes it work.
Contemplating a documentation series for my Raspberry Pi work
5 direct replies — Read more / Contribute
by stevieb
on Jul 03, 2017 at 13:53

    So, after over a year of learning, development, implementation and testing, I am very near the point where my Raspberry Pi Perl software is ready for prime-time use by the masses. After a few more tweaks, test additions, documentation updates and one last once-over, I plan on writing a "Howto Pi with Perl" type tutorial, across several articles in a series.

    Trying to put together some sort of sane format, I'm looking to those who have publishing experience or technical writers to give my initial thoughts a once-over and provide me any feedback. Most, if not all portions will include breadboard diagrams of each task, code (of course), pictures if reasonable and in some cases potentially even video clips.

    Initial, broad-view structure:

    • very brief intro to the Pi, its capabilities, and overview of the features/limitations of the software
    • a synopsis of what will be being taught, formats/conventions that will be used
    • basic intro on creating and using a Pi object
    • intro to the most basic part of the Pi, the GPIO
    • examples of creating and using a GPIO pin at the most basic level (INPUT, OUTPUT, HIGH and LOW etc)
    • intro and examples using advanced pin features (interrupts, PWM, pull up/down etc)
    • workshop: using simple pin-based sensors and devices (LEDs, hygrometers, thermo-resistors, distance sensors etc)
    • detailed overview of the communication mechanisms included (I2C, Serial, SPI etc)
    • workshop: detailed overview of using the comms, starting very basic, leading into writing your own device/sensor modules using the software
    • workshop: using an LCD and/or OLED screen to display things on it
    • workshop: intro to and using Analog to Digital converters
    • workshop: intro to and using Digital to Analog converters
    • workshop: intro to and using Digital Potentiometers
    • workshop: intro to and using shift registers (basic through to advanced usage)
    • workshop: using a GPS module
    • workshop: advanced uses: utilizing several ICs and sensors in much larger and more involved projects (probably put together a few of these)
    • workshop: connecting to and using features of an Arduino with the Pi (over varying communication methods, including example Arduino sketches)
    • how this software came about, and some basic information on the underlying parts that allow it to work
    • extensive article on how I ensure the code is fully tested after each commit on a custom hardware test platform
    • possibly some details/photos on some of my real life projects I use at home (my indoor grow room automation system for example)
    • possibly a demo example of writing a web UI with jQuery to automate and provide a GUI of a basic project

    update: I think I'm going to use this as my initial template, so I may periodically update it with feedback and new ideas.../update

    For each element that contains a specific topic, include, where feasible/available a section at the bottom of the doc for advanced users perhaps in <small> or equivalent tags (these are just thoughts, nothing firm):

    • link to datasheet
    • list of issues or possible enhancements
    • link to relevant section in the Pi datasheet
    • link to the specific module that houses the code
    • link to a C/C++ example
    • link to Python equivalent

    Any thoughts on this general first thoughts layout? Anything that I should include that's not already? Anything I should remove? How about any thoughts on the individual elements and the manner in which to present them?

    I think I will create the actual demonstration parts first, then weave in the commentary thereafter. At first thought, this seems like the simplest approach that'll allow me to review all of the actual working parts as I go back through and edit in commentary.

    Thanks,

    -stevieb

Web Crawling using Perl
2 direct replies — Read more / Contribute
by ckj
on Jun 24, 2017 at 08:49
    Here, I'm going to discuss all the steps to do a web crawling using any language or technology. Crawler/Scrapper/Spider/Bot/ multiple synonyms for same stuff which is basically meant to copy content from any site. Based on website crawlers need to be configured. Please share your feedback, if it's good then I can post it on a larger platform as well where I'm planning to discuss crawling in java etc as well:

    1. Static Content Crawling: Static content are those which are generated once and doesn’t keeps on changing on their own, they need manual intervention and update to push any changes in content. So, such pages are easy to create but such pages are highly prone to security and their content can be crawled easily. So, in this case your crawler would be very efficient and providing accurate result as they simply have to access a page and get details.

    2. Dynamic Content Crawling: Dynamic content are those which keeps changing dynamically, in this case page contains server-side code which allows the server to generate a unique content whenever the page is loaded. Since, these contents are dynamically generated using different technology hence they are very secure as well as very difficult to crawl. So, in this case the crawler creation would be very difficult and getting accurate data is also not possible as class names etc are generated on load and there is no html code available on page to get that. Hence, you may have to use different functionalities here such as using proxy or creating robot.txt.

    Static Content Crawling
    my $mech = WWW::Mechanize->new(); my $response = $mech->get(URL); if ($response->is_success) { print $mech->content; } else { die $response->status_line; }
    Dynamic Content Crawling
    use WWW::mechanize::Firefox; use Data::Dumper; $mech= WWW::Mechanize::Firefox->new(); $mech->get(URL); %arr_ref = (AL => [1795, 1276, 795, 1719, 1363, 1145, 961, 17, 18, 199 +5, 977, 1910, 1691, 21, 1660, 1768], AK => [1145, 961, 1995, 977, 1781, 1704], AZ => [1873, 872, 1145, 690, 1162, 961, 918, 528, 811, 704, 529, 1983, + 931, 40, 1995, 977, 597, 1157, 530, 598, 886, 782, 42, 691, 1945]); foreach my $key (sort keys %arr_ref) { print "$key :: @{$arr_ref{$key}} \n"; $mech->field( stateUSAId => $key ); foreach (@{$arr_ref{$key}}) { $mech->field(institutionUSAId=>$_); print $mech->content; } }
Tkx - bind - append binding
1 direct reply — Read more / Contribute
by kcott
on Jun 23, 2017 at 16:23

    I'm currently working on a module which uses Tkx. I came across something tricky involving appending bindings. It took a while to work out and, in the process, I ran a lot of tests: the results were quite surprising. I've posted this here in case anyone else finds themselves in a similar position: hopefully, it might save them some time and effort.

    Tkx is a thin wrapper around Tcl. Its documentation is minimal: it just links to the Tcl documentation and leaves you to work out how to use it. In this instance, I was looking at the bind command documentation for information on appending a binding. I've linked to all of it, here's the relevant parts for this specific post:

    NAME

    bind — Arrange for X events to invoke Tcl scripts

    SYNOPSIS

    bind tag ?sequence? ?+??script?

    INTRODUCTION

    ... If script is prefixed with a "+", then it is appended to any existing binding for sequence; ...

    That's all it says about appending bindings. I investigated this; ran some tests; and was somewhat surprised at the outcome. The module I'm currently working on now contains this documentation:

    Appending Bindings

    When appending bindings, using the ?+??script? format, the plus (+) isn't a separate argument. Any of the following syntax variations are valid (subname works for normal named subroutines as well as lexical subroutines).

    See Update below.

    '+' . sub { ... } '+' . \&subname '+' . [\&subname] '+' . [\&subname, @args] ['+' . \&subname] ['+' . \&subname, @args] '+' . $coderef '+' . [$coderef] '+' . [$coderef, @args] ['+' . $coderef] ['+' . $coderef, @args]

    The surprising part was all the different ways of concatenating a string ('+') with an anonymous coderef, a named coderef, and an anonymous arrayref, without the code blowing up in my face.

    This may also be useful to those using related modules, like Tcl::Tk and Tcl::pTk; although, I could be completely wrong on that (I have little knowledge of these beyond knowing of their existence).

    Update: Despite successfully running two dozen or so tests on all those syntax formats, none of them appear to be actually functional. My apologies to anyone who's been trying to get them to work.

    I've spent a bit of time looking into this. I can append one binding using either

    ... '+' . Tkx::i::interp->create_tcl_sub( CODEREF ) ...

    or

    my $interp = Tkx::i::interp(); ... '+' . $interp->create_tcl_sub( CODEREF ) ...

    And that works for CODEREF as any of these three:

    sub { ... } \&subname $coderef

    However, whenever I attempt to append a second (or third) binding, none of the appended bindings work; although, the original binding works as expected. The only feedback I get looks like the following (there's no line numbers or other useful information):

    Error: invalid command name "::perl::CODE(0x7ffef5dd34d8)"

    So again, my apologies to anyone who rushed off to try what I originally posted. I will spend some more time on this: I'll let you know if that proves fruitful.

    — Ken

Spaces vs Tabs
9 direct replies — Read more / Contribute
by Tanktalus
on Jun 16, 2017 at 10:14

    Do you use spaces or tabs in your code for indentation?

    Apparently, StackOverflow says you get paid better for spaces than tabs!

    (I'm not sure whether to take this seriously or not, or, if serious, how much salt to consume simultaneously...)

    Me, I just let my editor do my indenting for me, and it produces spaces, so I'm good. :)

Patience is a Monk Virtue
10 direct replies — Read more / Contribute
by marinersk
on Jun 14, 2017 at 05:13

    In reviewing recently reaped nodes, I see a disturbing trend.

    I know many of you detest one particular Monk's posts, so badly that you'll downvote them just because it was he who posted them. And at least one of you has already indicated that you'll always vote Reap on anything of his that gets Considered.

    I would encourage my fellow Monks to re-read How do I use the power of consideration responsibly?; it is still considered Required Reading in Nodes to consider. Notably, disagreeing with content or style is not supposed to be a reason to Consider.

    The war against one Monk's perceived incompetence seemed childish when it amounted merely to downvotes and snide comments. Now we're moving solidly into cyberbullying and censorship.

    I find this terribly inconsistent with the spirit of the Monastery.

    Surely we are better than this...

red thread
No replies — Read more | Post response
by Discipulus
on Jun 13, 2017 at 02:57
    
    Wir hören von einer besondern Einrichtung bei der englischen Marine. Sämtliche Tauwerke der königlichen Flotte, vom stärksten bis zum schwächsten, sind dergestalt gesponnen, daß ein roter Faden durch das Ganze durchgeht, den man nicht herauswinden kann, ohne alles aufzulösen, und woran auch die kleinsten Stücke kenntlich sind, daß sie der Krone gehören.
    Ebenso zieht sich durch Ottiliens Tagebuch ein Faden der Neigung und Anhänglichkeit, der alles verbindet und das Ganze bezeichnet.
    ----
    There is, we are told, a curious contrivance in the service of the English marine.
    The ropes in use in the royal navy, from the largest to the smallest, are so twisted that a red thread runs through them from end to end, which cannot be extracted without undoing the whole; and by which the smallest pieces may be recognized as belonging to the crown.
    Similarly a thread of attachment and affection is woven into Ottilie’s diary which connects it all together, and characterizes the whole

    Goethe, Elective Affinities, part two, chapter two

    Dedicated to my 15th anniversary at perlmonks (Happy Monkday!!1! You've been here 15 distressing years. Has it really been that long?), but also to monks who forgot to celebrate their anniversary here; to all my firends at the monastery old and new ones!

    Indeed 5 years (one lustro in eatalien, a word with no translation) are passed since Ten (years) Here. The fact you dont know is that i have spent 1/3 of my life lurking here; no regrets!

    Sincerely perlmonks is still my only online community, as Perl is my only programing language: machines are invading our lives: Perl let me to exercitate my will against them. I know i loose a lot knowing only Perl and not many other interesting technologies, but I have also some real life to attend..

    Can you guess what Perl level i reached after 15 years? I just completed the basics! It is true that ten years are the minimum to achieve a good degree at something. I needed even more because of my classical education and my partime employement (or maybe I'm a bit dumb as my TERM %ENV var.. ).

    Infact I have a lot more to learn and to practice: module creation and testing being on top of the list. Not because I have something important to share in CPAN, but principally because abstracting behaviours to modules is the only easy way I found to test. And good tests are the headcorner stone of any solid building. Web developping with modern Perl tecniques follow very near in the list. Parallel programming and hardware interaction follow as well.

    Perl help me a lot during my daily tasks. I'm a lazy (in a Perl sense..) sysadmin forced by the market to have $^O matching 2 ** 5 most of the times; I use Perl as soon as I can, many times in the darkness of my desktop, just showing results. I activate, fix, automate, report, communicate, summarize, show, backup, retrieve.. using Perl, peppering with some fun a (permit me to say) boring job.

    Utterly astonished by the knoweledge and altruism of many monks here at the monastery I find everyday something interesting to learn or to bookmark in my cell for further investigation. Some good old monk is returned after years to perlmonks, for my joy, and some new, very skilled ones have joined recently. I've learn what to pick and what to discard and every progress I made in my Perl skill is due to this community.

    Let me say that, as five years ago, I still own and ride my wonderful Kawasaki GPZ motorcycles, I still have the same wife (even if motorcycles are easier to handle). I plan to repaint both when I have some money to spend (motorcycles not wife!).

    Using Perl to solve my dilemmas and to expand my action field let me feel the same thrill for the challenge as fifteen years ago. I have some math fascination (having no math background at all) for Tartaglia's (well Pascal's) triangle and for numeric series and some interest in photo manipulation with surprising (to me!) good results: I put them on github and I'll put some other decent old project and new things in the future.

    Serving here at the monastery, helping when I can (and when powerful monks are distracted) is a pleasure and a privilege. Again everything I know in Perl, every progress I made is a gift from perlmonks and the Perl community in general. CPAN is a big sea full of treasures and syrens (even dangers for the unwares) and is worth the navigation: I see there many different way to approach problems, wrong and unmaintained attempts, state of the art by genial ones.

    15th anniversary! I'm still a teenager in Perl programming. As every teenager I have dreams and some destructive luddite will as well: oneliners and evil evals comes from this part of my brains. But sometimes I gave some very wise answer as well. It happens.

    At nigth sometimes I find myself lurking into longtime abandoned cells of monks of the past: you can find there funny nodes and precious insights. Byfar better than watching tv! Surprisingly most of such content is still modern and valuable even after many release of Perl. I suspect I started with 5.6 or 5.8 and I'm still alive during 5.26 days. Looking backward and forward too: (?<=pm) and (?=pm)

    Time is money and this post is already too long, so just some final words:

    Perl and Perlmonks forever!

    Many thanks to perlmonks community for this fun and profiting time and take, as souvenir of the party, a little toy by my part!

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Conflict in Teams
2 direct replies — Read more / Contribute
by eyepopslikeamosquito
on Jun 12, 2017 at 09:29

    Following on from Working Solo and in a Team, this meditation focuses on conflict in teams.

    Vulnerability and Trust

    I'm a genius and always the smartest person in the room. I also am the greatest expert on every topic ever as soon as I've thought about it for at least five seconds, none of my subordinates could possible know more about anything than me so I should always be micromanaging them and telling them exactly what to do in every situation, and if you think what I said blatantly makes no sense that's just because you are so simple compared to my vast intellect. Well, if we failed in our goals it's obviously the fault of all my various subordinates and not me, because after all, I'm awesome!

    -- perldigious describes a dysfunctional manager he once worked for

    Vulnerability and trust are crucial to good teamwork. Everyone in the team needs to be vulnerable. Everyone. To freely admit: "I don't know the answer", "I need help", "I stuffed up, sorry". Sadly, just one team member with a toxic attitude, like perldigious's dysfunctional manager above, destroys teamwork.

    Reinforcing points made in Psychological Safety, Patrick Lencioni, in a talk on Team Dysfunctions, gives some real-world examples of teams becoming dysfunctional when just one team member could not be vulnerable. And it's worst of all when that one non-vulnerable team member happens to be the team leader.

    How to get everyone in the team to be vulnerable and acknowledge their weaknesses? According to Patrick, there is only one way: The leader must go first!

    Why is vulnerability and trust so important?

    Conflict

    Without trust, conflict is politics. With trust, conflict is the pursuit of truth.

    -- Patrick Lencioni in The Five Dysfunctions of a Team

    Conflict is normal. Conflict is expected. Part of the human condition. Handling conflict effectively is the primary reason why trust is so important in teams. Without trust, conflict tends to become personal or political; with trust, conflict is the pursuit of truth, finding the best solution.

    It's vital for the team to not hold back, to disagree passionately when required. To be honest to each other. And respectful. Is arguing a "waste of time"? No! No argument means no commitment! Of course, the arguments must be focused on finding the best solution, never personal or political.

    Disagree and Commit

    Intel has a saying: Disagree and Commit. Curiously, without disagreement it's difficult to get commitment and cohesion. In general, when people have a chance to express their point of view and have its pros and cons heard and appreciated, they are more likely to accept and support a differing approach.

    In contrast, conflict that persists after the group has made a well-examined decision is often harmful. At a certain point in a project, the potential benefit of changing approaches is less than the disruption caused by changing direction. At that stage, commitment is required. Early disagreement is welcome, but then the team must unite behind a shared goal.

    -- Disagree and Commit: The Risk of Conflict to Teams

    Have Backbone; Disagree and Commit. Leaders are obligated to respectfully challenge decisions when they disagree, even when doing so is uncomfortable or exhausting. Leaders have conviction and are tenacious. They do not compromise for the sake of social cohesion. Once a decision is determined, they commit wholly.

    -- Amazon 13th Principle

    Though Intel and Amazon share the same "Disagree and Commit" slogan, they appear to have a different emphasis. Intel emphasize teamwork and cohesion (when people have a chance to express their point of view and have its pros and cons heard and appreciated, they are more likely to accept and support a differing approach) while Amazon focus on faster decision making ("I know we disagree on this but will you gamble with me on it? Disagree and commit?") and innovation (for more innovation, you need disagreement, not consensus).

    Accountability

    Peer-to-peer accountability is the best kind of accountability. When people don't commit, they don't hold each other accountable. Leaders must be willing to hold people accountable, not just on quantitative issues (KPIs), but behavioral ones too.

    References


Add your Meditation
Title:
Meditation:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":


  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (4)
    As of 2017-07-22 13:19 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      I came, I saw, I ...
























      Results (338 votes). Check out past polls.