SlideShare a Scribd company logo
1 of 18
Download to read offline
I WILL KILL YOU
AKA, do_this() and die;
AKA, things that piss me off

Sawyer X ( @PerlSawyer )
WORDS OF CAUTION
TIMTOWTDI
Your mileage may vary
No batteries included
Don't drink and drive
And lastly...
SMALL PROBLEMS
uls(
nes)
Postfix i (
f)
REALLY STUPID STUFF
$ , $ ,$ , $ , $ , $ , $ , $
a b i j k l m n
$,$,$,$, $,$,$
f u c k y o u
Trailing spaces STOP IT!
$a,@ra,%ah
vr ary hs
TABS VS. SPACES
The eternal struggle
Do not mix tabs and spaces
Do NOT mix tabs and spaces
DO NOT mix tabs and spaces
DO NOT MIX TABS AND SPACES!
Best rule? No tabs, only spaces
MISUNDERSTANDINGS
m pwithout checking value
a
#mpEP,IT
a XRLS
m %gs =mp+ $ = $is$}'g' ) ky %is
y ae
a ( _ > kd{_{ae} , es kd;
#mpBOKLS
a LC IT
m @otd=mp {$-[]
y sre
a
_>0
}
sr {$-[]<>$-[] }
ot
a>1 = b>1
mp {[$,ceku(_ ]}@ie;
a
_ hcsm$)
szs

C-style f rf r a h
o/ oec
#frfrahLS
o/oec IT
m @is=q<en jf jh jci jmjh ja jn jd js>
y kd
wjny ef on ake i on on ue ue oh;
fr(m $ =0 $ <@is $+ ){
o
y i
; i
kd; i+
sy">$is$];
a - kd[i"
}
frahm $i (kd){
oec y kd @is
sy">$i"
a - kd;
}
sy">$"fr@is
a - _ o kd;
SWITCHES
i
f
(oe
$n) {.}
..
esf(to
li $w) {.}
..
esf(tre {.}
li $he) ..
es
le
{.}
..
m %ipth=(
y dsac
$n
oe = sb{.}
> u ..,
$w
to = sb{.}
> u ..,
$he = sb{.}
tre > u ..,
)
;
i (eit $ipth$nu}){
f
xss dsac{ipt
$ipth$nu}>..;
dsac{ipt-(.)
}es {.}
le ..
EMPTY IF CLAUSE
i (smtig {
f $oehn)
#d ntig
o ohn
}es {
le
#teata wr
h cul ok
}
RETURN VARIABLES
m $eun
y rtr;
i (ti){
f $hs
..
.
$eun='hs;
rtr
ti'
}esf(aohrtig {
li $nte_hn)
..
.
$eun='ht;
rtr
ta'
}
rtr $eun
eun rtr;
CLASS METHODS
Sm:Cas>ymto
oe:ls-m_ehd
WORKFLOW TRY/CATCH
NOT FOR WORKFLOW!
GOTO HELL;
NOT FOR WORKFLOW!
#Clbljms
ae up
gt HL;
oo EL
#smweees
oehr le
HL:
EL
cniu_BxCascd(;
otneDI_ls_oe)
#oerdstecretfaei tesak
vrie h urn rm n h tc
#go,we ncsay
od hn eesr
gt &yfnto;
oo m_ucin
WHY?
Because code is alive and grows
Sometimes to ridiculous age
You might not be the last
And the next might know your address
THANK YOU
HIDDEN SLIDES
AN ODD ODE

TO A SPECIAL SOMEONE...
You are the air beneath my wings
You are the sunlight in my garden
And I am happy you are here
And to Cluj.pm...
I warned you!

More Related Content

Similar to do_this and die();

Similar to do_this and die(); (20)

Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
 
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
 
Climbing the Abstract Syntax Tree (php[world] 2019)
Climbing the Abstract Syntax Tree (php[world] 2019)Climbing the Abstract Syntax Tree (php[world] 2019)
Climbing the Abstract Syntax Tree (php[world] 2019)
 
Climbing the Abstract Syntax Tree (phpDay 2017)
Climbing the Abstract Syntax Tree (phpDay 2017)Climbing the Abstract Syntax Tree (phpDay 2017)
Climbing the Abstract Syntax Tree (phpDay 2017)
 
Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)
 
Climbing the Abstract Syntax Tree (PHP UK 2018)
Climbing the Abstract Syntax Tree (PHP UK 2018)Climbing the Abstract Syntax Tree (PHP UK 2018)
Climbing the Abstract Syntax Tree (PHP UK 2018)
 
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
 
Climbing the Abstract Syntax Tree (Forum PHP 2017)
Climbing the Abstract Syntax Tree (Forum PHP 2017)Climbing the Abstract Syntax Tree (Forum PHP 2017)
Climbing the Abstract Syntax Tree (Forum PHP 2017)
 
Climbing the Abstract Syntax Tree (Southeast PHP 2018)
Climbing the Abstract Syntax Tree (Southeast PHP 2018)Climbing the Abstract Syntax Tree (Southeast PHP 2018)
Climbing the Abstract Syntax Tree (Southeast PHP 2018)
 
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
 
Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)
 
Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)
 
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
 
Climbing the Abstract Syntax Tree (PHP Russia 2019)
Climbing the Abstract Syntax Tree (PHP Russia 2019)Climbing the Abstract Syntax Tree (PHP Russia 2019)
Climbing the Abstract Syntax Tree (PHP Russia 2019)
 
Perl 6 in Context
Perl 6 in ContextPerl 6 in Context
Perl 6 in Context
 
Create Custom Post Type Plugin
Create Custom Post Type PluginCreate Custom Post Type Plugin
Create Custom Post Type Plugin
 
Climbing the Abstract Syntax Tree (PHP Developer Days Dresden 2018)
Climbing the Abstract Syntax Tree (PHP Developer Days Dresden 2018)Climbing the Abstract Syntax Tree (PHP Developer Days Dresden 2018)
Climbing the Abstract Syntax Tree (PHP Developer Days Dresden 2018)
 
MIPS Merge Sort
MIPS Merge SortMIPS Merge Sort
MIPS Merge Sort
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 
Document Classification In PHP
Document Classification In PHPDocument Classification In PHP
Document Classification In PHP
 

More from xSawyer

More from xSawyer (12)

Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)
 
Moose - YAPC::NA 2012
Moose - YAPC::NA 2012Moose - YAPC::NA 2012
Moose - YAPC::NA 2012
 
Our local state, my, my - Understanding Perl variables
Our local state, my, my - Understanding Perl variablesOur local state, my, my - Understanding Perl variables
Our local state, my, my - Understanding Perl variables
 
Your first website in under a minute with Dancer
Your first website in under a minute with DancerYour first website in under a minute with Dancer
Your first website in under a minute with Dancer
 
Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
 
Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
 
When Perl Met Android (YAPC::EU 2010)
When Perl Met Android (YAPC::EU 2010)When Perl Met Android (YAPC::EU 2010)
When Perl Met Android (YAPC::EU 2010)
 
Perl Dancer on Android (first attempt)
Perl Dancer on Android (first attempt)Perl Dancer on Android (first attempt)
Perl Dancer on Android (first attempt)
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
 
Moose (Perl 5)
Moose (Perl 5)Moose (Perl 5)
Moose (Perl 5)
 
Red Flags in Programming
Red Flags in ProgrammingRed Flags in Programming
Red Flags in Programming
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

do_this and die();

  • 1. I WILL KILL YOU AKA, do_this() and die; AKA, things that piss me off Sawyer X ( @PerlSawyer )
  • 2. WORDS OF CAUTION TIMTOWTDI Your mileage may vary No batteries included Don't drink and drive And lastly...
  • 4. REALLY STUPID STUFF $ , $ ,$ , $ , $ , $ , $ , $ a b i j k l m n $,$,$,$, $,$,$ f u c k y o u Trailing spaces STOP IT! $a,@ra,%ah vr ary hs
  • 5. TABS VS. SPACES The eternal struggle Do not mix tabs and spaces Do NOT mix tabs and spaces DO NOT mix tabs and spaces DO NOT MIX TABS AND SPACES! Best rule? No tabs, only spaces
  • 6. MISUNDERSTANDINGS m pwithout checking value a #mpEP,IT a XRLS m %gs =mp+ $ = $is$}'g' ) ky %is y ae a ( _ > kd{_{ae} , es kd; #mpBOKLS a LC IT m @otd=mp {$-[] y sre a _>0 } sr {$-[]<>$-[] } ot a>1 = b>1 mp {[$,ceku(_ ]}@ie; a _ hcsm$) szs C-style f rf r a h o/ oec #frfrahLS o/oec IT m @is=q<en jf jh jci jmjh ja jn jd js> y kd wjny ef on ake i on on ue ue oh; fr(m $ =0 $ <@is $+ ){ o y i ; i kd; i+ sy">$is$]; a - kd[i" } frahm $i (kd){ oec y kd @is sy">$i" a - kd; } sy">$"fr@is a - _ o kd;
  • 7. SWITCHES i f (oe $n) {.} .. esf(to li $w) {.} .. esf(tre {.} li $he) .. es le {.} .. m %ipth=( y dsac $n oe = sb{.} > u .., $w to = sb{.} > u .., $he = sb{.} tre > u .., ) ; i (eit $ipth$nu}){ f xss dsac{ipt $ipth$nu}>..; dsac{ipt-(.) }es {.} le ..
  • 8. EMPTY IF CLAUSE i (smtig { f $oehn) #d ntig o ohn }es { le #teata wr h cul ok }
  • 9. RETURN VARIABLES m $eun y rtr; i (ti){ f $hs .. . $eun='hs; rtr ti' }esf(aohrtig { li $nte_hn) .. . $eun='ht; rtr ta' } rtr $eun eun rtr;
  • 12. GOTO HELL; NOT FOR WORKFLOW! #Clbljms ae up gt HL; oo EL #smweees oehr le HL: EL cniu_BxCascd(; otneDI_ls_oe) #oerdstecretfaei tesak vrie h urn rm n h tc #go,we ncsay od hn eesr gt &yfnto; oo m_ucin
  • 13. WHY? Because code is alive and grows Sometimes to ridiculous age You might not be the last And the next might know your address
  • 16. AN ODD ODE TO A SPECIAL SOMEONE...
  • 17. You are the air beneath my wings You are the sunlight in my garden And I am happy you are here
  • 18. And to Cluj.pm... I warned you!