One criticism of opponents of Perl is that it is a "write-only" language meaning that once the code is written, it is extremely difficult to maintain because it is difficult to understand upon re-examination. As with many criticisms, this should be aimed at those undisciplined developers who are writing the code, and not their tool of choice.
Having said that, I think it is also fair to say that Perl makes it very easy to write difficult-to-decipher code. This is the doubleedged sword which is the shorthand Perl gives us to be very expressive in a small amount of space. A negative application of this is obfuscated Perl (where the author intentionally makes his code difficult to read), while a more positive application is the craft of creating Perl "oneliners" (trying to include a great deal of functionality in a single line of code). A oneliner can be a powerful weapon in the arsenal of a system administrator.
In this talk:
* We'll look at a line of code in a subroutine that is in desperate need of readability changes
* We'll make the code more readable by introducing:
* appropriate whitespace
* different ways of writing the same thing, for example: $array[$#array] vs. $array[-1]
* useful names for variables, versus $index, $j $k $l, etc
* breaking up one line of code into multiple lines
* exploring further improvements through Perl::Critic and by extension Perl::Tidy
This talk will be beginner-friendly.
I will show how to create an interpreter for a simple programming language using Perl 6 grammars.
This talk is not an introduction to Perl 6 regexes and grammars, so we'll use them straight on, but I will add comments so that you can understand what's going on even if you never tried Perl 6 grammars.
There will not be enough time to write the whole compiler, of course, but I will show how you can do that at home.
A few techniques for everyday Ruby hacking
Touching on the following topics:
DRY Assignment
Ternary operator
Bang bang
Conditional assignment
Parallel assignment
Multiple return
Implied begin
Exception lists
Symbol to Proc
MapReduce
Regex captures
tap
sprintf
case equality
Splat Array
Splat args
blank?
present?
presence
truncate
try
in?
Delegation
delegate
Memoization
memoize
alias_method_chain
class_attribute
HashWithIndifferentAccess
I will show how to create an interpreter for a simple programming language using Perl 6 grammars.
This talk is not an introduction to Perl 6 regexes and grammars, so we'll use them straight on, but I will add comments so that you can understand what's going on even if you never tried Perl 6 grammars.
There will not be enough time to write the whole compiler, of course, but I will show how you can do that at home.
A few techniques for everyday Ruby hacking
Touching on the following topics:
DRY Assignment
Ternary operator
Bang bang
Conditional assignment
Parallel assignment
Multiple return
Implied begin
Exception lists
Symbol to Proc
MapReduce
Regex captures
tap
sprintf
case equality
Splat Array
Splat args
blank?
present?
presence
truncate
try
in?
Delegation
delegate
Memoization
memoize
alias_method_chain
class_attribute
HashWithIndifferentAccess
You’ve built a WordPress site or two (or 10), your installed plugins and themes to MOSTLY get what you want. Now you’re ready to learn the inner workings of WordPress and take your development to the next level. Jump into WordPress development and PHP by building a Plugin and learn to speak WordPress’ language: PHP.
There are several tools out there that help to develop and maintain high quality PHP code. They allow you to identify the most fragile and messy parts of your codebase. PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. Learn how it works, how you can use it and how can you bend it to meet your requirements!
My Beginners Perl tutorial, much abbreviated and as presented at the London Perl Workshop on Dec 1st 2007.
Also includes the section on Regular Expressions that we didn't have time for on the day.
Perl 5.10 for People Who Aren't Totally InsaneRicardo Signes
All the hype about perl 5.10 can sound a little intimidating. User-level pragmata! Overloadable smartmatching operator! Thread-safe refkey hashes! For Pete's sake, have you heard about lexically scoped pluggable regexp engines?
It's enough to make you think that 5.10's changes are just for the hard-core perl hackers, but it couldn't be further from the truth! The new version of Perl is full of changes that are easy to use and pack lots of useful benefits for doing plain old every day Perl programming.
We'll look at the new features, small and large, and see why you, too, will love 5.10.
There are a lot of operators in Perl 6, so many that it can be called an OOL: operator oriented language. Here I describe most of them from the angle of contexts, which Perl 6 has also much more than Perl 5.
These are the slides I was using when delivering a short talk in Vienna PHP. The talk took place in Vienna on September 22th. More information about the PHP course I deliver can be found at php.course.lifemichael.com
You’ve built a WordPress site or two (or 10), your installed plugins and themes to MOSTLY get what you want. Now you’re ready to learn the inner workings of WordPress and take your development to the next level. Jump into WordPress development and PHP by building a Plugin and learn to speak WordPress’ language: PHP.
There are several tools out there that help to develop and maintain high quality PHP code. They allow you to identify the most fragile and messy parts of your codebase. PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. Learn how it works, how you can use it and how can you bend it to meet your requirements!
My Beginners Perl tutorial, much abbreviated and as presented at the London Perl Workshop on Dec 1st 2007.
Also includes the section on Regular Expressions that we didn't have time for on the day.
Perl 5.10 for People Who Aren't Totally InsaneRicardo Signes
All the hype about perl 5.10 can sound a little intimidating. User-level pragmata! Overloadable smartmatching operator! Thread-safe refkey hashes! For Pete's sake, have you heard about lexically scoped pluggable regexp engines?
It's enough to make you think that 5.10's changes are just for the hard-core perl hackers, but it couldn't be further from the truth! The new version of Perl is full of changes that are easy to use and pack lots of useful benefits for doing plain old every day Perl programming.
We'll look at the new features, small and large, and see why you, too, will love 5.10.
There are a lot of operators in Perl 6, so many that it can be called an OOL: operator oriented language. Here I describe most of them from the angle of contexts, which Perl 6 has also much more than Perl 5.
These are the slides I was using when delivering a short talk in Vienna PHP. The talk took place in Vienna on September 22th. More information about the PHP course I deliver can be found at php.course.lifemichael.com
Why async and functional programming in PHP7 suck and how to get overr it?Lucas Witold Adamus
This presentation describes basic issues related to functional programming with PHP and solution for most of problems served by the library called PhpSlang.
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
"Simple Ways To Be A Better Programmer' as presented at OSCON 2007 by Michael G Schwern.
The audio is still out of sync, working on it. Downloading will be available once the sync is done.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Understanding Nidhi Software Pricing: A Quick Guide 🌟
Choosing the right software is vital for Nidhi companies to streamline operations. Our latest presentation covers Nidhi software pricing, key factors, costs, and negotiation tips.
📊 What You’ll Learn:
Key factors influencing Nidhi software price
Understanding the true cost beyond the initial price
Tips for negotiating the best deal
Affordable and customizable pricing options with Vector Nidhi Software
🔗 Learn more at: www.vectornidhisoftware.com/software-for-nidhi-company/
#NidhiSoftwarePrice #NidhiSoftware #VectorNidhi
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
3. Who am I?
● Web Engineer at OmniTI
– Full stack tech consulting
– Remote database management and consulting
– Large Scale / Mission Critical
– We're Hiring!
– omniti.com
6. Why This Talk?
● Is Perl a "write-only" language? No!
● ...but it can be.
7. Why This Talk?
● Is Perl a "write-only" language? No!
● ...but it can be.
● It's our responsibility to keep code:
8. Why This Talk?
● Is Perl a "write-only" language? No!
● ...but it can be.
● It's our responsibility to keep code:
– Easy to read
9. Why This Talk?
● Is Perl a "write-only" language? No!
● ...but it can be.
● It's our responsibility to keep code:
– Easy to read, so it will be:
10. Why This Talk?
● Is Perl a "write-only" language? No!
● ...but it can be.
● It's our responsibility to keep code:
– Easy to read, so it will be:
– Easy to maintain
12. Purpose of listify
Take a list, for example:
List # 1, with 10 items
one two three four five six seven eight nine ten
Give me several lists back, each containing no more than N items,
for example, 4:
List #1 with 4 items: one two three four
List #2 with 4 items: five six seven eight
List #3 with 2 items: nine ten
13. Prepare to call listify
listify( @list, 4 );
Result:
@array = (
[ 'one', 'two', 'three', 'four' ],
[ 'five', 'six', 'seven', 'eight' ],
[ 'nine', 'ten' ],
);
my @list = qw( one two three four five six seven eight nine ten );
14. Call to listify
my @list = qw( one two three four five six seven eight nine ten );
Result:
@array = (
[ 'one', 'two', 'three', 'four' ],
[ 'five', 'six', 'seven', 'eight' ],
[ 'nine', 'ten' ],
);
listify( @list, 4 );
15. Result of listify
my @list = qw( one two three four five six seven eight nine ten );
listify( @list, 4 );
Result:
@array = (
[ 'one', 'two', 'three', 'four' ],
[ 'five', 'six', 'seven', 'eight' ],
[ 'nine', 'ten' ],
);
16. Declare function listify
sub listify {
my ($aref,$cc) = @_;
if( ref $aref eq 'ARRAY' && $cc > 0 ) {
my $j;
for(my $i=0; $i<=$#$aref; $i+=$cc) {
push @$j, [@$aref[$i..$i+$cc-1]];
}
$#{$j->[$#{$j}]}=$#$aref%$cc;
@$aref = @$j;
return 1;
}
return;
}
sub listify {
}
17. Get Parameters
sub listify {
my ($aref,$cc) = @_;
if( ref $aref eq 'ARRAY' && $cc > 0 ) {
my $j;
for(my $i=0; $i<=$#$aref; $i+=$cc) {
push @$j, [@$aref[$i..$i+$cc-1]];
}
$#{$j->[$#{$j}]}=$#$aref%$cc;
@$aref = @$j;
return 1;
}
return;
}
my ($aref,$cc) = @_;
25. Clever (but not easy to read) Line
$#{$j->[$#{$j}]}=$#$aref%$cc;
26. Purpose of Clever Line
The purpose of the line is to truncate the final array to the number of remaining
elements so we don't end up with this:
@array = (
[ 'one', 'two', 'three', 'four' ],
[ 'five', 'six', 'seven', 'eight' ],
[ 'nine', 'ten', undef, undef ],
);
31. Improvement #5: Split Another Line
my $final_aref = $result_array[ -1 ];
my $elements_in_final = $#$in_aref % $elements_per_array;
$#$final_aref = $elements_in_final;
32. Improvement #6: More Whitespace
my $final_aref = $result_array[ -1 ];
my $elements_in_final = $#$in_aref % $elements_per_array;
$#$final_aref = $elements_in_final;
33. Improvement #7: A comment!
my $final_aref = $result_array[ -1 ];
my $elements_in_final = $#$in_aref % $elements_per_array;
# Truncate final array
$#$final_aref = $elements_in_final;
34. Easier to Read Now?
Original:
$#{$j->[$#{$j}]}=$#$aref%$cc;
Revised:
my $final_aref = $result_array[ -1 ];
my $elements_in_final = $#$in_aref % $elements_per_array;
# Truncate final array
$#$final_aref = $elements_in_final;
35. Apply Principles to Entire Function
sub listify {
my ( $in_aref, $elements_per_array ) = @_;
return if (
ref $in_aref ne 'ARRAY' or
$elements_per_array <= 0
);
my @result_array;
for( my $i = 0; $i <= $#$in_aref; $i += $elements_per_array ) {
push @result_array, [
@$in_aref[ $i..$i + $elements_per_array - 1 ]
];
}
# Continued on next slide
36. Apply Principles to Entire Function
# Continued from previous slide
my $final_aref = $result_array[ -1 ];
my $elements_in_final = $#$in_aref % $elements_per_array;
# Truncate final array
$#$final_aref = $elements_in_final;
@$in_aref = @result_array;
}
38. perlcritic Result
$ perlcritic -1 listify.pl
Code not contained in explicit package at line 1, column 1. Violates
encapsulation. (Severity: 4)
Code before strictures are enabled at line 1, column 1. See page
429 of PBP. (Severity: 5)
Subroutine "listify" does not end with "return" at line 1, column 1.
See page 197 of PBP. (Severity: 4)
Code before warnings are enabled at line 1, column 1. See page 431 of
PBP. (Severity: 4)
No package-scoped "$VERSION" variable found at line 1, column 1. See
page 404 of PBP. (Severity: 2)
C-style "for" loop used at line 10, column 7. See page 100 of PBP.
(Severity: 2)
Double-sigil dereference at line 10, column 26. See page 228 of PBP.
(Severity: 2)
(more double-sigil warnings follow)
39. Critical Fixes
Code not contained in explicit package at line 1, column 1. Violates
encapsulation. (Severity: 4)
Code before strictures are enabled at line 1, column 1. See page 429
of PBP. (Severity: 5)
Code before warnings are enabled at line 1, column 1. See page 431
of PBP. (Severity: 4)
sub listify {
my ( $in_aref, $elements_per_array ) = @_;
# --- cut ---
#!/usr/bin/perl
use strict;
use warnings;
40. Explicit Return
Subroutine "listify" does not end with "return" at line 2,
column 1. See page 197 of PBP. (Severity: 4)
# Truncate final array
$#$final_aref = $elements_in_final;
@$in_aref = @result_array;
}
return;
41. $VERSION
No package-scoped "$VERSION" variable found at line 1,
column 1. See page 404 of PBP. (Severity: 2)
#!/usr/bin/perl
use strict;
use warnings;
sub listify {
my ( $in_aref, $elements_per_array ) = @_;
# --- cut ---
our $VERSION = '1.19';
43. C-style "for" Loop
C-style "for" loop used at line 11, column 7. See page 100
of PBP. (Severity: 2)
● “What?” No C-style “for” loops
44. C-style "for" Loop
C-style "for" loop used at line 11, column 7. See page 100
of PBP. (Severity: 2)
● “What?” No C-style “for” loops
● “Why?” More difficult to read and maintain
45. C-style "for" Loop
C-style "for" loop used at line 11, column 7. See page 100
of PBP. (Severity: 2)
● “What?” No C-style “for” loops
● “Why?” More difficult to read and maintain
● “I disagree.” That's OK. Modify Perl::Critic settings!
46. C-style "for" Loop
C-style "for" loop used at line 11, column 7. See page 100
of PBP. (Severity: 2)
● “What?” No C-style “for” loops
● “Why?” More difficult to read and maintain
● “I disagree.” That's OK. Modify Perl::Critic settings!
But today, I'm going to fix all the defaults
47. Change to “while” loop
C-style "for" loop used at line 11, column 7. See page 100 of
PBP. (Severity: 2)
Old:
for( my $i = 0; $i <= $#$in_aref; $i += $elements_per_array ) {
# (loop contents)
}
New:
my $i = 0;
while($i <= $#$in_aref) {
# (loop contents)
$i += $elements_per_array;
}
49. JAPH: The Do-Not Example
sub q{ord($_[0])}sub qq{chr($_[0])}(@q=(j,q,q,,q,s,,u,o,[$;=@q,$"=sub{for(@q){
s/(.)/&qq(&q($1)-1)/e}},$_=q,*534`!./4(%2`0%2{`(!#+%2,,tr;{;,;,s/(.)/&q($1)>95?
&qq(&q($1)-64):&qq(&q($ 1)+64)/eg,% q=(q,qq,,sub{eval$ _[0]},q,q,,1)])),&{$ "},
$q{qq}->(qq.$;->[$q=$q{q}]${$;}[++$q]$;->[$[]${$;}[-1+$)-$ )+$#q]$;->[$#q-$q].)
50. JAPH: The Do-Not Example
sub q{ord($_[0])}sub qq{chr($_[0])}(@q=(j,q,q,,q,s,,u,o,[$;=@q,$"=sub{for(@q){
s/(.)/&qq(&q($1)-1)/e}},$_=q,*534`!./4(%2`0%2{`(!#+%2,,tr;{;,;,s/(.)/&q($1)>95?
&qq(&q($1)-64):&qq(&q($ 1)+64)/eg,% q=(q,qq,,sub{eval$ _[0]},q,q,,1)])),&{$ "},
$q{qq}->(qq.$;->[$q=$q{q}]${$;}[++$q]$;->[$[]${$;}[-1+$)-$ )+$#q]$;->[$#q-$q].)
● Ugly variables $" $; $ " and even $_, @_
51. JAPH: The Do-Not Example
sub q{ord($_[0])}sub qq{chr($_[0])}(@q=(j,q,q,,q,s,,u,o,[$;=@q,$"=sub{for(@q){
s/(.)/&qq(&q($1)-1)/e}},$_=q,*534`!./4(%2`0%2{`(!#+%2,,tr;{;,;,s/(.)/&q($1)>95?
&qq(&q($1)-64):&qq(&q($ 1)+64)/eg,% q=(q,qq,,sub{eval$ _[0]},q,q,,1)])),&{$ "},
$q{qq}->(qq.$;->[$q=$q{q}]${$;}[++$q]$;->[$[]${$;}[-1+$)-$ )+$#q]$;->[$#q-$q].)
● Ugly variables $" $; $ " and even $_, @_
– use English;
52. JAPH: The Do-Not Example
sub q{ord($_[0])}sub qq{chr($_[0])}(@q=(j,q,q,,q,s,,u,o,[$;=@q,$"=sub{for(@q){
s/(.)/&qq(&q($1)-1)/e}},$_=q,*534`!./4(%2`0%2{`(!#+%2,,tr;{;,;,s/(.)/&q($1)>95?
&qq(&q($1)-64):&qq(&q($ 1)+64)/eg,% q=(q,qq,,sub{eval$ _[0]},q,q,,1)])),&{$ "},
$q{qq}->(qq.$;->[$q=$q{q}]${$;}[++$q]$;->[$[]${$;}[-1+$)-$ )+$#q]$;->[$#q-$q].)
● Ugly variables $" $; $ " and even $_, @_
– use English;
● 74% non-alpha/space
53. JAPH: The Do-Not Example
sub q{ord($_[0])}sub qq{chr($_[0])}(@q=(j,q,q,,q,s,,u,o,[$;=@q,$"=sub{for(@q){
s/(.)/&qq(&q($1)-1)/e}},$_=q,*534`!./4(%2`0%2{`(!#+%2,,tr;{;,;,s/(.)/&q($1)>95?
&qq(&q($1)-64):&qq(&q($ 1)+64)/eg,% q=(q,qq,,sub{eval$ _[0]},q,q,,1)])),&{$ "},
$q{qq}->(qq.$;->[$q=$q{q}]${$;}[++$q]$;->[$[]${$;}[-1+$)-$ )+$#q]$;->[$#q-$q].)
● Ugly variables $" $; $ " and even $_, @_
– use English;
● 74% non-alpha/space
– More non-alpha characters, more difficult to read
57. Other Considerations
● Conformity can be good
● How to implement good change?
● The “next guy” might be YOU.
● Comment to preempt disputes or misunderstandings
58. Best Book on this Topic
Perl Best Practices by Damian Conway
C-style &quot;for&quot; loop used at line 11, column 7. See page 100 of PBP. (Severity: 2)
“What?” Damian recommends against using C-style “for” loops”
“Why?” His main argument is that C-style “for” loops are more difficult to read and therefore more difficult to maintain
“I disagree.” That&apos;s OK and in fact Perl::Critic allows for a lot of customizations to alter or remove those policies you don&apos;t agree with
BUT, I&apos;m going to fix all the default suggestions for the purpose of this presentation
C-style &quot;for&quot; loop used at line 11, column 7. See page 100 of PBP. (Severity: 2)
“What?” Damian recommends against using C-style “for” loops”
“Why?” His main argument is that C-style “for” loops are more difficult to read and therefore more difficult to maintain
“I disagree.” That&apos;s OK and in fact Perl::Critic allows for a lot of customizations to alter or remove those policies you don&apos;t agree with
BUT, I&apos;m going to fix all the default suggestions for the purpose of this presentation
C-style &quot;for&quot; loop used at line 11, column 7. See page 100 of PBP. (Severity: 2)
“What?” Damian recommends against using C-style “for” loops”
“Why?” His main argument is that C-style “for” loops are more difficult to read and therefore more difficult to maintain
“I disagree.” That&apos;s OK and in fact Perl::Critic allows for a lot of customizations to alter or remove those policies you don&apos;t agree with
BUT, I&apos;m going to fix all the default suggestions for the purpose of this presentation
C-style &quot;for&quot; loop used at line 11, column 7. See page 100 of PBP. (Severity: 2)
“What?” Damian recommends against using C-style “for” loops”
“Why?” His main argument is that C-style “for” loops are more difficult to read and therefore more difficult to maintain
“I disagree.” That&apos;s OK and in fact Perl::Critic allows for a lot of customizations to alter or remove those policies you don&apos;t agree with
BUT, I&apos;m going to fix all the default suggestions for the purpose of this presentation
C-style &quot;for&quot; loop used at line 11, column 7. See page 100 of PBP. (Severity: 2)
“What?” Damian recommends against using C-style “for” loops”
“Why?” His main argument is that C-style “for” loops are more difficult to read and therefore more difficult to maintain
“I disagree.” That&apos;s OK and in fact Perl::Critic allows for a lot of customizations to alter or remove those policies you don&apos;t agree with
BUT, I&apos;m going to fix all the default suggestions for the purpose of this presentation
$&quot;, $;, $ &quot; (ignored space - crazy! Whitespace thus used to my advantage) even $_, @_
use English;
My obfuscated code is 74% non-alpha/space, and that isn&apos;t considering the abuse of alpha conventions like q qq s tr etc
The higher percentage of non-alpha characters, the more difficult to read
$&quot;, $;, $ &quot; (ignored space - crazy! Whitespace thus used to my advantage) even $_, @_
use English;
My obfuscated code is 74% non-alpha/space, and that isn&apos;t considering the abuse of alpha conventions like q qq s tr etc
The higher percentage of non-alpha characters, the more difficult to read
$&quot;, $;, $ &quot; (ignored space - crazy! Whitespace thus used to my advantage) even $_, @_
use English;
My obfuscated code is 74% non-alpha/space, and that isn&apos;t considering the abuse of alpha conventions like q qq s tr etc
The higher percentage of non-alpha characters, the more difficult to read
$&quot;, $;, $ &quot; (ignored space - crazy! Whitespace thus used to my advantage) even $_, @_
use English;
My obfuscated code is 74% non-alpha/space, and that isn&apos;t considering the abuse of alpha conventions like q qq s tr etc
The higher percentage of non-alpha characters, the more difficult to read
$&quot;, $;, $ &quot; (ignored space - crazy! Whitespace thus used to my advantage) even $_, @_
use English;
My obfuscated code is 74% non-alpha/space, and that isn&apos;t considering the abuse of alpha conventions like q qq s tr etc
The higher percentage of non-alpha characters, the more difficult to read
Conformity can be good: code like everyone else has in the apps you inherit or join. Unless it&apos;s horrible, then start a consistent style.
Then how to implement good change? One idea: implement across the entire code base, a little at a time. For example, get &quot;use strict&quot; working everywhere first.
Make it easy on the &quot;next guy&quot;. The next guy might be YOU.
Comment to pre-empt disputes or misunderstandings that will break production.
Conformity can be good: code like everyone else has in the apps you inherit or join. Unless it&apos;s horrible, then start a consistent style.
Then how to implement good change? One idea: implement across the entire code base, a little at a time. For example, get &quot;use strict&quot; working everywhere first.
Make it easy on the &quot;next guy&quot;. The next guy might be YOU.
Comment to pre-empt disputes or misunderstandings that will break production.
Conformity can be good: code like everyone else has in the apps you inherit or join. Unless it&apos;s horrible, then start a consistent style.
Then how to implement good change? One idea: implement across the entire code base, a little at a time. For example, get &quot;use strict&quot; working everywhere first.
Make it easy on the &quot;next guy&quot;. The next guy might be YOU.
Comment to pre-empt disputes or misunderstandings that will break production.
Conformity can be good: code like everyone else has in the apps you inherit or join. Unless it&apos;s horrible, then start a consistent style.
Then how to implement good change? One idea: implement across the entire code base, a little at a time. For example, get &quot;use strict&quot; working everywhere first.
Make it easy on the &quot;next guy&quot;. The next guy might be YOU.
Comment to pre-empt disputes or misunderstandings that will break production.