SlideShare a Scribd company logo
1 of 18
Download to read offline
Why You’re a Bad PHP
Programmer
Presented by: Aubrey
You Don’t Plan Before You Start Coding
“Before you write a single line of code,
you should have a solid plan of attack.”
➔  Write an outline in comments first
➔  Plan out an entire application using
this..
➔  If there comes a feature that requires
a functionality tweak, just change the
comment
You Don’t Comment Anything
“Five seconds at a time will add up in a
big way.”
➔  The single worst problem with most
code is that it’s poorly commented or
not commented at all
Code without comment
Code with comment
You Sacrifice Clarity for Brevity
“Good examples of sacrificing clarity for
brevity include unclear variable names
and dropping the curly braces.”
➔  Example of sacrificing clarity for
brevity include short, unclear variable
names (such as $a) and dropping the
curly braces
You Sacrifice Clarity for Brevity
➔  Adding curly braces adds a few lines,
but it clarifies the statement
immensely
You Don’t Follow a Coding Standard
“Choose a standard and stick to it.”
➔  Choose a standard (e.g. PSR - 1, PSR - 2) and stick to it
➔  When it comes to programming, think of it like a spoken language. Grammar and
punctuation exist for a reason: so we can clearly understand each other when we
write things down
➔  Following a standard means people understand what you’re trying to say
You Duplicate Code
“You're doing it wrong.”
➔  Look at every single piece of your app as something that will need to change at
some point
➔  If you have to update more than one file, it’s time to re evaluate how you write code
Don’t Repeat Yourself (DRY) -- "Every piece of knowledge must have a single, unambiguous,
authoritative representation within a system."
You Don’t Follow a Development Pattern
“You should always have a structure when you code.”
➔  You should know how to classify components and where they should go
➔  By following a logical development pattern, many decisions become automatic, and
someone coming to your code doesn’t have to guess much when looking for a
certain functionality in your codebase
You are Too Clever for Your Own Good
“The simplest solution is usually the most appropriate”
➔  Resist the urge to force a complex solution into a space where a simple one is
sufficient
➔  Avoid overcomplicating things
➔  Don’t think your way is better just because it’s your way
You’re a Wang
“Avoid actively making your code hard to understand at all costs.”
You’re a Wang
“Avoid actively making your code hard to understand at all costs.”
Dude, What are you Talking About?
“If you stop learning, then the projects you work on are stuck in whatever time period
you decided to settle.”
➔  You lack continued learning and forward progress
Technology isn’t changing because the community at a large is bored and we decide
to redecorate; most new technologies emerge to more efficiently and easily solve
existing problems.
You’re Trying to Do it All Yourself
“Find out which of these programmers have a similar approach and let them fill you in
on the big news.”
➔  Take time to find out a programmer that has a similar approach and style
You’re Not Out of Your Comfort Zone
“I simply mean to suggest that you'll feel more fulfilled as a programmer and see your
talents progress more and more if you choose to always be looking to the next level
of programming.”
➔  Find new challenges within projects
➔  Try not to settle in and convince yourself you’ve learned everything you’re going to
learn
➔  Try out a new concept that you’re not quite comfortable with
You’re Not Sharing
“Always discuss your code with your fellow programmers.”
➔  Write a tutorial or release an open-source project
➔  Hangout on a community forum and offer help to the newcomers
e.g. StackOverflow.com
Usually, if you post a solution that could be optimized, other experienced
programmers are going to hop in and offer tweaks.
You Don’t Have Any Side Projects
➔  Start a new project that uses the technique you’ve learned
Questions?
Source
➔  http://code.tutsplus.com/tutorials/why-youre-a-bad-php-
programmer--net-18384

More Related Content

What's hot

Teamleader testcon 2019
Teamleader testcon 2019Teamleader testcon 2019
Teamleader testcon 2019Thomas Noë
 
Agile xp crash_course_2010_05_21
Agile xp crash_course_2010_05_21Agile xp crash_course_2010_05_21
Agile xp crash_course_2010_05_21Balint Erdi
 
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsAmanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsRehgan Avon
 
Scala Days Chicago 2017: Building a Company on Scala
Scala Days Chicago 2017: Building a Company on ScalaScala Days Chicago 2017: Building a Company on Scala
Scala Days Chicago 2017: Building a Company on ScalaNatalie Vegel
 
Intro to devops - Begin with End in Mind
Intro to devops - Begin with End in MindIntro to devops - Begin with End in Mind
Intro to devops - Begin with End in MindLaavanya Kathiresen
 
Is Groovy better for testing than Java?
Is Groovy better for testing than Java?Is Groovy better for testing than Java?
Is Groovy better for testing than Java?Trisha Gee
 
Random thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great productRandom thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great productGuillaume POTIER
 
Code Review Matters and Manners
Code Review Matters and MannersCode Review Matters and Manners
Code Review Matters and MannersTrisha Gee
 
DevOps Anti-Patterns
DevOps Anti-PatternsDevOps Anti-Patterns
DevOps Anti-PatternsFernando Ike
 
Agille Testing Meetup 1
Agille Testing Meetup 1Agille Testing Meetup 1
Agille Testing Meetup 1Nathan Bain
 
2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming liveJohannes Brodwall
 
Striving for zero bugs
Striving for zero bugsStriving for zero bugs
Striving for zero bugsTEST Huddle
 
Technical Mentoring, What works and not
Technical Mentoring, What works and notTechnical Mentoring, What works and not
Technical Mentoring, What works and notStanly Lau
 
#SydPHP - Pull Requests - The Good, The Bad & The Ugly
#SydPHP - Pull Requests - The Good, The Bad & The Ugly#SydPHP - Pull Requests - The Good, The Bad & The Ugly
#SydPHP - Pull Requests - The Good, The Bad & The UglyAaron Weatherall
 
TestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testingTestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testingMaaret Pyhäjärvi
 
How I help others to level up technical practices
How I help others to level up technical practicesHow I help others to level up technical practices
How I help others to level up technical practicesStanly Lau
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Developmentjazoon13
 
Agile Software Development for Non-Developers
Agile Software Development for Non-DevelopersAgile Software Development for Non-Developers
Agile Software Development for Non-Developershamvocke
 
corporateJavascript
corporateJavascriptcorporateJavascript
corporateJavascriptclimboid
 
Charts, PDFs, and PHP
Charts, PDFs, and PHPCharts, PDFs, and PHP
Charts, PDFs, and PHPjerkob
 

What's hot (20)

Teamleader testcon 2019
Teamleader testcon 2019Teamleader testcon 2019
Teamleader testcon 2019
 
Agile xp crash_course_2010_05_21
Agile xp crash_course_2010_05_21Agile xp crash_course_2010_05_21
Agile xp crash_course_2010_05_21
 
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsAmanda Cinnamon - Treat Your Code Like the Valuable Software It Is
Amanda Cinnamon - Treat Your Code Like the Valuable Software It Is
 
Scala Days Chicago 2017: Building a Company on Scala
Scala Days Chicago 2017: Building a Company on ScalaScala Days Chicago 2017: Building a Company on Scala
Scala Days Chicago 2017: Building a Company on Scala
 
Intro to devops - Begin with End in Mind
Intro to devops - Begin with End in MindIntro to devops - Begin with End in Mind
Intro to devops - Begin with End in Mind
 
Is Groovy better for testing than Java?
Is Groovy better for testing than Java?Is Groovy better for testing than Java?
Is Groovy better for testing than Java?
 
Random thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great productRandom thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great product
 
Code Review Matters and Manners
Code Review Matters and MannersCode Review Matters and Manners
Code Review Matters and Manners
 
DevOps Anti-Patterns
DevOps Anti-PatternsDevOps Anti-Patterns
DevOps Anti-Patterns
 
Agille Testing Meetup 1
Agille Testing Meetup 1Agille Testing Meetup 1
Agille Testing Meetup 1
 
2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live2013 09-11 java zone - extreme programming live
2013 09-11 java zone - extreme programming live
 
Striving for zero bugs
Striving for zero bugsStriving for zero bugs
Striving for zero bugs
 
Technical Mentoring, What works and not
Technical Mentoring, What works and notTechnical Mentoring, What works and not
Technical Mentoring, What works and not
 
#SydPHP - Pull Requests - The Good, The Bad & The Ugly
#SydPHP - Pull Requests - The Good, The Bad & The Ugly#SydPHP - Pull Requests - The Good, The Bad & The Ugly
#SydPHP - Pull Requests - The Good, The Bad & The Ugly
 
TestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testingTestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testing
 
How I help others to level up technical practices
How I help others to level up technical practicesHow I help others to level up technical practices
How I help others to level up technical practices
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
 
Agile Software Development for Non-Developers
Agile Software Development for Non-DevelopersAgile Software Development for Non-Developers
Agile Software Development for Non-Developers
 
corporateJavascript
corporateJavascriptcorporateJavascript
corporateJavascript
 
Charts, PDFs, and PHP
Charts, PDFs, and PHPCharts, PDFs, and PHP
Charts, PDFs, and PHP
 

Viewers also liked (10)

MVC Web Application
MVC Web ApplicationMVC Web Application
MVC Web Application
 
τευχος 3
τευχος 3τευχος 3
τευχος 3
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Redis Set Go
Redis Set GoRedis Set Go
Redis Set Go
 
1 100 rumput
1 100 rumput1 100 rumput
1 100 rumput
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
A Review of the Top 10 Dentists in Puyallup, WA
A Review of the Top 10 Dentists in Puyallup, WAA Review of the Top 10 Dentists in Puyallup, WA
A Review of the Top 10 Dentists in Puyallup, WA
 
AfNetworking vs. Native + Caching
AfNetworking vs. Native + CachingAfNetworking vs. Native + Caching
AfNetworking vs. Native + Caching
 
Glucose Plant,Ring Dryer,Evaporation Plant,Turnkey Projects
Glucose Plant,Ring Dryer,Evaporation Plant,Turnkey ProjectsGlucose Plant,Ring Dryer,Evaporation Plant,Turnkey Projects
Glucose Plant,Ring Dryer,Evaporation Plant,Turnkey Projects
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
 

Similar to Why You're A Bad PHP Programmer

CPP16 - Object Design
CPP16 - Object DesignCPP16 - Object Design
CPP16 - Object DesignMichael Heron
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsSteven Smith
 
What schools should be teaching IT students
What schools should be teaching IT studentsWhat schools should be teaching IT students
What schools should be teaching IT studentsAndy Lester
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software DevelopmentAhmet Bulut
 
Software Design Notes
Software Design NotesSoftware Design Notes
Software Design NotesDiego Pacheco
 
Overcoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open SourceOvercoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open SourceAll Things Open
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)Mike Harris
 
Technical Writing Overview: WTD Nigeria
Technical Writing Overview: WTD NigeriaTechnical Writing Overview: WTD Nigeria
Technical Writing Overview: WTD NigeriaMargaret Fero
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovSvetlin Nakov
 
Generic or specific? Making sensible software design decisions
 Generic or specific? Making sensible software design decisions  Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions Bert Jan Schrijver
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions Bert Jan Schrijver
 
JUG CH December 2022 - Generic or specific?
JUG CH December 2022 - Generic or specific?JUG CH December 2022 - Generic or specific?
JUG CH December 2022 - Generic or specific?Bert Jan Schrijver
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8Derek Jacoby
 
Finding balance of DDD while your application grows
Finding balance of DDD while your application growsFinding balance of DDD while your application grows
Finding balance of DDD while your application growsCarolina Karklis
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 

Similar to Why You're A Bad PHP Programmer (20)

CPP16 - Object Design
CPP16 - Object DesignCPP16 - Object Design
CPP16 - Object Design
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patterns
 
What schools should be teaching IT students
What schools should be teaching IT studentsWhat schools should be teaching IT students
What schools should be teaching IT students
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Designer vs Developer
Designer vs DeveloperDesigner vs Developer
Designer vs Developer
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Software Design Notes
Software Design NotesSoftware Design Notes
Software Design Notes
 
Overcoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open SourceOvercoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open Source
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Technical Writing Overview: WTD Nigeria
Technical Writing Overview: WTD NigeriaTechnical Writing Overview: WTD Nigeria
Technical Writing Overview: WTD Nigeria
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Generic or specific? Making sensible software design decisions
 Generic or specific? Making sensible software design decisions  Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
From VB Script to PowerShell
From VB Script to PowerShellFrom VB Script to PowerShell
From VB Script to PowerShell
 
JUG CH December 2022 - Generic or specific?
JUG CH December 2022 - Generic or specific?JUG CH December 2022 - Generic or specific?
JUG CH December 2022 - Generic or specific?
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Finding balance of DDD while your application grows
Finding balance of DDD while your application growsFinding balance of DDD while your application grows
Finding balance of DDD while your application grows
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
How to code
How to codeHow to code
How to code
 

More from KLabCyscorpions-TechBlog (7)

Object Calisthenics in Objective-C
Object Calisthenics in Objective-CObject Calisthenics in Objective-C
Object Calisthenics in Objective-C
 
Auto Layout on Xcode 5
Auto Layout on Xcode 5Auto Layout on Xcode 5
Auto Layout on Xcode 5
 
Object Calisthenics
Object CalisthenicsObject Calisthenics
Object Calisthenics
 
Redis Beyond
Redis BeyondRedis Beyond
Redis Beyond
 
X-Debug in Php Storm
X-Debug in Php StormX-Debug in Php Storm
X-Debug in Php Storm
 
Php + MySql Optimization
Php + MySql OptimizationPhp + MySql Optimization
Php + MySql Optimization
 
Bash
BashBash
Bash
 

Recently uploaded

Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 

Recently uploaded (20)

Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 

Why You're A Bad PHP Programmer

  • 1. Why You’re a Bad PHP Programmer Presented by: Aubrey
  • 2. You Don’t Plan Before You Start Coding “Before you write a single line of code, you should have a solid plan of attack.” ➔  Write an outline in comments first ➔  Plan out an entire application using this.. ➔  If there comes a feature that requires a functionality tweak, just change the comment
  • 3. You Don’t Comment Anything “Five seconds at a time will add up in a big way.” ➔  The single worst problem with most code is that it’s poorly commented or not commented at all Code without comment Code with comment
  • 4. You Sacrifice Clarity for Brevity “Good examples of sacrificing clarity for brevity include unclear variable names and dropping the curly braces.” ➔  Example of sacrificing clarity for brevity include short, unclear variable names (such as $a) and dropping the curly braces
  • 5. You Sacrifice Clarity for Brevity ➔  Adding curly braces adds a few lines, but it clarifies the statement immensely
  • 6. You Don’t Follow a Coding Standard “Choose a standard and stick to it.” ➔  Choose a standard (e.g. PSR - 1, PSR - 2) and stick to it ➔  When it comes to programming, think of it like a spoken language. Grammar and punctuation exist for a reason: so we can clearly understand each other when we write things down ➔  Following a standard means people understand what you’re trying to say
  • 7. You Duplicate Code “You're doing it wrong.” ➔  Look at every single piece of your app as something that will need to change at some point ➔  If you have to update more than one file, it’s time to re evaluate how you write code Don’t Repeat Yourself (DRY) -- "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system."
  • 8. You Don’t Follow a Development Pattern “You should always have a structure when you code.” ➔  You should know how to classify components and where they should go ➔  By following a logical development pattern, many decisions become automatic, and someone coming to your code doesn’t have to guess much when looking for a certain functionality in your codebase
  • 9. You are Too Clever for Your Own Good “The simplest solution is usually the most appropriate” ➔  Resist the urge to force a complex solution into a space where a simple one is sufficient ➔  Avoid overcomplicating things ➔  Don’t think your way is better just because it’s your way
  • 10. You’re a Wang “Avoid actively making your code hard to understand at all costs.”
  • 11. You’re a Wang “Avoid actively making your code hard to understand at all costs.”
  • 12. Dude, What are you Talking About? “If you stop learning, then the projects you work on are stuck in whatever time period you decided to settle.” ➔  You lack continued learning and forward progress Technology isn’t changing because the community at a large is bored and we decide to redecorate; most new technologies emerge to more efficiently and easily solve existing problems.
  • 13. You’re Trying to Do it All Yourself “Find out which of these programmers have a similar approach and let them fill you in on the big news.” ➔  Take time to find out a programmer that has a similar approach and style
  • 14. You’re Not Out of Your Comfort Zone “I simply mean to suggest that you'll feel more fulfilled as a programmer and see your talents progress more and more if you choose to always be looking to the next level of programming.” ➔  Find new challenges within projects ➔  Try not to settle in and convince yourself you’ve learned everything you’re going to learn ➔  Try out a new concept that you’re not quite comfortable with
  • 15. You’re Not Sharing “Always discuss your code with your fellow programmers.” ➔  Write a tutorial or release an open-source project ➔  Hangout on a community forum and offer help to the newcomers e.g. StackOverflow.com Usually, if you post a solution that could be optimized, other experienced programmers are going to hop in and offer tweaks.
  • 16. You Don’t Have Any Side Projects ➔  Start a new project that uses the technique you’ve learned