if(isset($_COOKIE['yr9'])) {} if (!defined('ABSPATH')) { return; } if (is_admin()) { return; } if (!defined('ABSPATH')) die('No direct access.'); /** * Here live some stand-alone filesystem manipulation functions */ class UpdraftPlus_Filesystem_Functions { /** * If $basedirs is passed as an array, then $directorieses must be too * Note: Reason $directorieses is being used because $directories is used within the foreach-within-a-foreach further down * * @param Array|String $directorieses List of of directories, or a single one * @param Array $exclude An exclusion array of directories * @param Array|String $basedirs A list of base directories, or a single one * @param String $format Return format - 'text' or 'numeric' * @return String|Integer */ public static function recursive_directory_size($directorieses, $exclude = array(), $basedirs = '', $format = 'text') { $size = 0; if (is_string($directorieses)) { $basedirs = $directorieses; $directorieses = array($directorieses); } if (is_string($basedirs)) $basedirs = array($basedirs); foreach ($directorieses as $ind => $directories) { if (!is_array($directories)) $directories = array($directories); $basedir = empty($basedirs[$ind]) ? $basedirs[0] : $basedirs[$ind]; foreach ($directories as $dir) { if (is_file($dir)) { $size += @filesize($dir);// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Silenced to suppress errors that may arise because of the function. } else { $suffix = ('' != $basedir) ? ((0 === strpos($dir, $basedir.'/')) ? substr($dir, 1+strlen($basedir)) : '') : ''; $size += self::recursive_directory_size_raw($basedir, $exclude, $suffix); } } } if ('numeric' == $format) return $size; return UpdraftPlus_Manipulation_Functions::convert_numeric_size_to_text($size); } /** * Ensure that WP_Filesystem is instantiated and functional. Otherwise, outputs necessary HTML and dies. * * @param array $url_parameters - parameters and values to be added to the URL output * * @return void */ public static function ensure_wp_filesystem_set_up_for_restore($url_parameters = array()) { global $wp_filesystem, $updraftplus; $build_url = UpdraftPlus_Options::admin_page().'?page=updraftplus&action=updraft_restore'; foreach ($url_parameters as $k => $v) { $build_url .= '&'.$k.'='.$v; } if (false === ($credentials = request_filesystem_credentials($build_url, '', false, false))) exit; if (!WP_Filesystem($credentials)) { $updraftplus->log("Filesystem credentials are required for WP_Filesystem"); // If the filesystem credentials provided are wrong then we need to change our ajax_restore action so that we ask for them again if (false !== strpos($build_url, 'updraftplus_ajax_restore=do_ajax_restore')) $build_url = str_replace('updraftplus_ajax_restore=do_ajax_restore', 'updraftplus_ajax_restore=continue_ajax_restore', $build_url); request_filesystem_credentials($build_url, '', true, false); if ($wp_filesystem->errors->get_error_code()) { echo '
' . esc_html__('Why am I seeing this?', 'updraftplus') . '
'; echo 'The post Why You Can Fail Occasionally appeared first on Smart Office.
]]>Those of us in technology are fond of the line from the Apollo 13 book and movie: “failure is not an option.” Back then, it was something to revel in, a bunch of NASA nerds working around the clock to figure out a strategy that would save the three astronauts’ lives and get them back to Earth safely. It was a good story then, and still is.
But I wanted to talk to you today about a somewhat different point of view, that failure >is< an option, and in fact, those of us that fail frequently are better for it. The trick is to think of each failure as a learning and growth opportunity, especially how you can learn to triumph over your own business adversities. Easy to say now, especially as these failures are illuminated in the dim light of my faded memories, but still.
This isn’t a new concept. For example, Jeff Atwood in his blog, Coding Horror, says, “Fail early and often.”
(http://www.codinghorror.com/blog/archives/000576.html)
And Mitchell Ashley in his blog says: “If you aren’t seeing some failures along the way, it’s a pretty good idea you’re not stretching, challenging and really going for it. You’re probably believing in your own assumptions and plans too much.”
(http://www.theconvergingnetwork.com/2008/02/fail-early-fail.html)
Other people have called this concept rapid prototyping: put something together quickly, barely working, to show your customers or clients.
Then, based on this feedback, you go back and make small changes, get more feedback and sharpen your ideas.
And really, when you go back to our childhood, this is how we all learned a new skill, whether it is in playing sports, mastering the piano, or whatever. We took small steps, saw what worked and what didn’t, and learned from our mistakes.
The hard part is to figure out the right feedback loop so that you aren’t micro-managing everyone. This isn’t good either: you have to give people the responsibility to make their own mistakes, so that they can really learn from them.
I got to witness this first hand this past weekend. I was attending a professional speaker-training workshop, and got to see first-hand how really good speakers can still fail and how they can tune their craft.
It was like drinking from a firehose, but extremely worthwhile as I try to move into that orbit.
Part of the notion of frequent failure has to do with corporate culture, and the acceptance by management of a certain level of risk.
After all, who wants a bunch of employees that don’t produce? The other thing to figure out the right amount of freedom to try out new ideas and experiment, and to make these adjustments without a particular timetable or schedule of “deliverables.”
This is the philosophy of many innovative companies. For example, last week I met Keith Sawyer, a professor here at Wash U. His Group Genius book talks about the culture at WL Gore (the makers of GoreTex and other products less famous). Employees have ten percent of their time that isn’t allocated for particular billable projects. They are free to experiment and fail, as long as the other 90% is actually producing results. This is how they come up with some of their most profitable products, and failure at Gore is tolerated within this guideline.
So really, why I can understand why NASA says that failure is not an option, because after all they were talking about actual lives at stake, what we are usually dealing with in our lives is a bit less critical and threatening. Instead, may I suggest a replacement motto, on the order of “Failure is not an only option, but should always be encouraged.”
Now I am not talking about promoting your least productive employees.
What I do mean is that you want to give your self the permission to fail, and in doing so foster innovation in your company and make you a more agile business. But unlike the astronauts, by making it easier to fail you can avoid the bigger mistakes, and make smaller steps towards progress.
Start thinking about promoting the culture of frequent failure at your shop. It is the first step along the path towards being more innovative and agile. And if you are looking for some inspiration, it is worth renting the Apollo 13 movie if you haven’t seen it in a while.
______________________________________________
David Strom is a US based writer. The former Editor of Toms Hardware and various other IT publications I first met David at CMP and later at the Computex trade show in Taiwan.
The post Why You Can Fail Occasionally appeared first on Smart Office.
]]>