SlideShare a Scribd company logo
1 of 16
Good
Programming
Practices
Jack Boys
Topics
• Practice Try and Fail
• Breaking a Problem: Work In
team
• Be a coding Ninja
• ABC Always be coding
• Bug Debug and error
• Testing
• Conclusion
Practice Try and Fail
• Basic of programing: Write
Code on paper
• Improve your syntax
• Thinking are clear
• Improves Ability to remove a
bug or syntax error.
• Time your self
• Divide a task into subtask
• If stuck interview your self
• Ask a friend
• Don’t love your code
Breaking a Problem:
Work in Team
• Make team of at least 2
• Use flow charts flow diagram
to solve a problem
• Solve tough coding problem
in front of your team
• Admire one for asking and
for giving a solution
• Ask the team why we are
solving in certain way
• Discuss about alternate
solution
• In market you have to work
like a team
BE A CODING NINJA
Be a Coding Ninja
• Nail the programming
fundaments
• Write an attractive peace of
code
• Add handsome comment to your
code, Comment should be in
same level of code
• Commenting should be simple
that after a year when you
read your comment you can
understand what your code is
doing
Be a Coding Ninja
• Indent your code, it improve
readability
• Use switch statement instead
of if else if else
• Introduce functions in code
• Work think like a pro
• Use standard variable naming
i.e. Pascal casing and camel
casing
• Variable name should be
meaning full
Be a Coding ninja
• Every line of code should be
useful
• A method should be not more
than 30 lines
• Refactor your
code, eliminate useless code
• Make the variable private or
protected and expose public/
protected properties.
ABC: Always be coding
• Join programming society in
your institute
• Participate in programing
competition i.e.
online, inside outside
university
• Teach your junior it will
help you keeping your coding
saw sharped
• Programming is not something
you can master in a couple
of weeks. Set yourself a
realistic target of a month
and a half.
Bug Debug and error
• Your code should crash
gracefully and with honor
• Use try catch throw
technique its called
exception handling
• Exception handling will help
you finding the error
• Be a code snippiest you
should know why your code
have crash
Test your Program
• Test your program that it
gives the correct answer we
desired
• End user of your program are
dull so your code should be
flexible
• Give your code to your
friend for testing
• Test weather the way we
started to solve the problem
had we covered all of them.
Class Activity
Write down a c program which
prints your complete name in
the output screen, you have to
use If else statement. One
printf command will print your
first name while the second
will print your second. You
have to use If else statement.
You have to use GOOD
PROGRAMMING PRACTICE to break
this problem.
HINT: One printf will be
executed in checking of if
statment
Solution
#include<iostream>
using namespace std;
void main()
{
if (!printf("Muhammadn")){}
else
printf("Iqbaln");
system("pause");
}
Good programming practices updated

More Related Content

What's hot

General skill presentation.
General skill presentation.General skill presentation.
General skill presentation.kelseytrueman
 
Building software vs programming
Building software vs programmingBuilding software vs programming
Building software vs programmingMauricio Voto
 
Preparing for a .Net Interview
Preparing for a .Net Interview Preparing for a .Net Interview
Preparing for a .Net Interview CareerBuilder
 
Proofreading and Editing Symbols
Proofreading and Editing SymbolsProofreading and Editing Symbols
Proofreading and Editing SymbolsAllison Mackley
 
Grade response
Grade responseGrade response
Grade responseEwanWild
 
Technical writing helper
Technical writing helperTechnical writing helper
Technical writing helperMahmoud Kassab
 
A PMP Exam Simulator Assesses Your Readiness For The PMP Exam
A PMP Exam Simulator Assesses Your Readiness For The PMP ExamA PMP Exam Simulator Assesses Your Readiness For The PMP Exam
A PMP Exam Simulator Assesses Your Readiness For The PMP ExamOSP International LLC
 
JavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and TricksJavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and TricksSunny Sharma
 
Competitive programming
Competitive programmingCompetitive programming
Competitive programmingDvyeshVyas
 
Test driven development - why you should test first?
Test driven development - why you should test first?Test driven development - why you should test first?
Test driven development - why you should test first?Abimbola Idowu
 
Introduction to software craftsmanship
Introduction to software craftsmanshipIntroduction to software craftsmanship
Introduction to software craftsmanshipAlexandru Bolboaca
 
Lesson 6 evaluating and writing your podcast
Lesson 6  evaluating and writing your podcastLesson 6  evaluating and writing your podcast
Lesson 6 evaluating and writing your podcasthwells2101
 
Learning by contributing to Open-Source Software
 Learning by contributing to Open-Source Software Learning by contributing to Open-Source Software
Learning by contributing to Open-Source SoftwareESUG
 
WTAB - Assignment Support
WTAB - Assignment SupportWTAB - Assignment Support
WTAB - Assignment Supportchriswalton
 
Introduction to Programming Contests
Introduction to Programming ContestsIntroduction to Programming Contests
Introduction to Programming ContestsBadhan Sen
 
Turning humans into developers with Perl - London Perl Workshop 2017
Turning humans into developers with Perl - London Perl Workshop 2017Turning humans into developers with Perl - London Perl Workshop 2017
Turning humans into developers with Perl - London Perl Workshop 2017Julien Fiegehenn
 

What's hot (20)

General skill presentation.
General skill presentation.General skill presentation.
General skill presentation.
 
Building software vs programming
Building software vs programmingBuilding software vs programming
Building software vs programming
 
Preparing for a .Net Interview
Preparing for a .Net Interview Preparing for a .Net Interview
Preparing for a .Net Interview
 
At a glance
At a glanceAt a glance
At a glance
 
Proofreading and Editing Symbols
Proofreading and Editing SymbolsProofreading and Editing Symbols
Proofreading and Editing Symbols
 
Grade response
Grade responseGrade response
Grade response
 
Technical writing helper
Technical writing helperTechnical writing helper
Technical writing helper
 
A PMP Exam Simulator Assesses Your Readiness For The PMP Exam
A PMP Exam Simulator Assesses Your Readiness For The PMP ExamA PMP Exam Simulator Assesses Your Readiness For The PMP Exam
A PMP Exam Simulator Assesses Your Readiness For The PMP Exam
 
Agile Practices
Agile PracticesAgile Practices
Agile Practices
 
Proof reading marks
Proof reading marksProof reading marks
Proof reading marks
 
JavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and TricksJavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and Tricks
 
Competitive programming
Competitive programmingCompetitive programming
Competitive programming
 
Programming Kiss
Programming KissProgramming Kiss
Programming Kiss
 
Test driven development - why you should test first?
Test driven development - why you should test first?Test driven development - why you should test first?
Test driven development - why you should test first?
 
Introduction to software craftsmanship
Introduction to software craftsmanshipIntroduction to software craftsmanship
Introduction to software craftsmanship
 
Lesson 6 evaluating and writing your podcast
Lesson 6  evaluating and writing your podcastLesson 6  evaluating and writing your podcast
Lesson 6 evaluating and writing your podcast
 
Learning by contributing to Open-Source Software
 Learning by contributing to Open-Source Software Learning by contributing to Open-Source Software
Learning by contributing to Open-Source Software
 
WTAB - Assignment Support
WTAB - Assignment SupportWTAB - Assignment Support
WTAB - Assignment Support
 
Introduction to Programming Contests
Introduction to Programming ContestsIntroduction to Programming Contests
Introduction to Programming Contests
 
Turning humans into developers with Perl - London Perl Workshop 2017
Turning humans into developers with Perl - London Perl Workshop 2017Turning humans into developers with Perl - London Perl Workshop 2017
Turning humans into developers with Perl - London Perl Workshop 2017
 

Similar to Good programming practices updated

CPP01 - Introduction to C++
CPP01 - Introduction to C++CPP01 - Introduction to C++
CPP01 - Introduction to C++Michael Heron
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipCamille Bell
 
Developers Best Practices
Developers Best PracticesDevelopers Best Practices
Developers Best Practicesaqib javaid
 
Computing basics
Computing basicsComputing basics
Computing basicsluke32
 
Getting better through Katas
Getting better through KatasGetting better through Katas
Getting better through KatasNola Stowe
 
Coding principles
Coding principles Coding principles
Coding principles DevAdnani
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsClint Edmonson
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! Nacho Cougil
 
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
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentdcsunu
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptxAmalEldhose2
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDDArati Joshi
 
Writing clean scientific software Murphy cleancoding
Writing clean scientific software Murphy cleancodingWriting clean scientific software Murphy cleancoding
Writing clean scientific software Murphy cleancodingsaber tabatabaee
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)Nacho Cougil
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 

Similar to Good programming practices updated (20)

CPP01 - Introduction to C++
CPP01 - Introduction to C++CPP01 - Introduction to C++
CPP01 - Introduction to C++
 
Make a better with clean code
Make a better with clean codeMake a better with clean code
Make a better with clean code
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW Craftsmanship
 
Developers Best Practices
Developers Best PracticesDevelopers Best Practices
Developers Best Practices
 
Preocupações Desenvolvedor Ágil
Preocupações Desenvolvedor ÁgilPreocupações Desenvolvedor Ágil
Preocupações Desenvolvedor Ágil
 
Computing basics
Computing basicsComputing basics
Computing basics
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 
Getting better through Katas
Getting better through KatasGetting better through Katas
Getting better through Katas
 
Coding principles
Coding principles Coding principles
Coding principles
 
Introduction
IntroductionIntroduction
Introduction
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software Odors
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! 
 
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
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDD
 
Writing clean scientific software Murphy cleancoding
Writing clean scientific software Murphy cleancodingWriting clean scientific software Murphy cleancoding
Writing clean scientific software Murphy cleancoding
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Good programming practices updated

  • 2. Topics • Practice Try and Fail • Breaking a Problem: Work In team • Be a coding Ninja • ABC Always be coding • Bug Debug and error • Testing • Conclusion
  • 3.
  • 4. Practice Try and Fail • Basic of programing: Write Code on paper • Improve your syntax • Thinking are clear • Improves Ability to remove a bug or syntax error. • Time your self • Divide a task into subtask • If stuck interview your self • Ask a friend • Don’t love your code
  • 5. Breaking a Problem: Work in Team • Make team of at least 2 • Use flow charts flow diagram to solve a problem • Solve tough coding problem in front of your team • Admire one for asking and for giving a solution • Ask the team why we are solving in certain way • Discuss about alternate solution • In market you have to work like a team
  • 6.
  • 7. BE A CODING NINJA
  • 8. Be a Coding Ninja • Nail the programming fundaments • Write an attractive peace of code • Add handsome comment to your code, Comment should be in same level of code • Commenting should be simple that after a year when you read your comment you can understand what your code is doing
  • 9. Be a Coding Ninja • Indent your code, it improve readability • Use switch statement instead of if else if else • Introduce functions in code • Work think like a pro • Use standard variable naming i.e. Pascal casing and camel casing • Variable name should be meaning full
  • 10. Be a Coding ninja • Every line of code should be useful • A method should be not more than 30 lines • Refactor your code, eliminate useless code • Make the variable private or protected and expose public/ protected properties.
  • 11. ABC: Always be coding • Join programming society in your institute • Participate in programing competition i.e. online, inside outside university • Teach your junior it will help you keeping your coding saw sharped • Programming is not something you can master in a couple of weeks. Set yourself a realistic target of a month and a half.
  • 12. Bug Debug and error • Your code should crash gracefully and with honor • Use try catch throw technique its called exception handling • Exception handling will help you finding the error • Be a code snippiest you should know why your code have crash
  • 13. Test your Program • Test your program that it gives the correct answer we desired • End user of your program are dull so your code should be flexible • Give your code to your friend for testing • Test weather the way we started to solve the problem had we covered all of them.
  • 14. Class Activity Write down a c program which prints your complete name in the output screen, you have to use If else statement. One printf command will print your first name while the second will print your second. You have to use If else statement. You have to use GOOD PROGRAMMING PRACTICE to break this problem. HINT: One printf will be executed in checking of if statment
  • 15. Solution #include<iostream> using namespace std; void main() { if (!printf("Muhammadn")){} else printf("Iqbaln"); system("pause"); }