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

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
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
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 

Recently uploaded (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
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 🔝✔️✔️
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 

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