SlideShare a Scribd company logo
1 of 35
Download to read offline
Writing
a high quality code
Saki
Jozef Sakáloš
•provide project consultancy and supervision
•on-line consultancy, code review, extensions
•deliver Sencha Ext and Touch Courses
Contact
•jsakalos@extjs.eu, jsakalos@gmail.com
•Facebook: jsakalos
•Skype: jsakalos
•Sencha Forums: jsakalos
Code Quality
Code must work, but
•fixing a bug introduces (many) new bugs
•a new developer cannot (easily) comprehend the code
•implementing changes/features is (extremely) difficult
•no, or not up-to-date documentation
•cross browser problems
if(anyOfAbove === “yes”) {
codeQuality !== “high enough”;
}
Quality
1. is degree of perfection of a product
2. is the standard of something as
measured against other things of a
similar kind
High quality code is
1. pleasant to read and easy to grasp
2. abide by standards
3. modular
4. bug-free
High quality code is
5. finished
6. clean
7. documented
8. working
The code must be
pleasant to read and
easy to grasp
Write the code for
another person
Ugly code
Ugliest code
Beautiful code
The code must abide
by standards
Two kind of standards
•JavaScript standards
•your coding conventions
http://jslint.com
Do you have a written
Code Style Guide?
Style Guide
•naming conventions
•spaces, indenting, commas
•how to write docs
•how to write file header footer
•... and others
Sencha recommends
naming conventions
in The Class System
guide
Code must be
modular
Example
Task #1:
Split the app into
small modules.
Rule #1: Define and
then abide by API of
modules
Corollaries
•controller must not know view internals
•view must fire custom events
•dynamic view must expose an API
•view must not access another view
Don’t do it like this
Controller
View
Button
ListenHide/Show
View
Store
Record/Field
...but like this
Controller
View
Button
View
Store
setVisible
handler
custom event
updateRecord
No more spaghetti code
The code must be
bug-free
The code must be finished
Finished === there is nothing more to
be done on it
if(code.indexOf(“@todo”) !== -1) {
code !== “finished”;
}
The code must be
documented
see http://github.com/senchalabs/jsduck
And, of course, the
code must WORK!
Questions?
Happy quality
coding!

More Related Content

What's hot

How to be proud when you are done
How to be proud when you are doneHow to be proud when you are done
How to be proud when you are done
Aleksey Solntsev
 
Code review
Code reviewCode review
Code review
Aleksey Solntsev
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
gaudol
 
BilousAnna_QA_CV_08.2016
BilousAnna_QA_CV_08.2016BilousAnna_QA_CV_08.2016
BilousAnna_QA_CV_08.2016
Anna Belous
 

What's hot (19)

Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Career path in IT
Career path in IT  Career path in IT
Career path in IT
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 
How to be proud when you are done
How to be proud when you are doneHow to be proud when you are done
How to be proud when you are done
 
Code review
Code reviewCode review
Code review
 
You Live, You Learn, Then You Get Perforce Swarm
You Live, You Learn, Then You Get Perforce SwarmYou Live, You Learn, Then You Get Perforce Swarm
You Live, You Learn, Then You Get Perforce Swarm
 
XP Injection
XP InjectionXP Injection
XP Injection
 
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with Sonarqube
 
Oop project briefing sem 1 2015 2016 (1)
Oop project briefing  sem 1 2015 2016 (1)Oop project briefing  sem 1 2015 2016 (1)
Oop project briefing sem 1 2015 2016 (1)
 
Quality Built In @ Spotify
Quality Built In @ SpotifyQuality Built In @ Spotify
Quality Built In @ Spotify
 
Code detox
Code detoxCode detox
Code detox
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers Workshop
 
Automated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and SpecflowAutomated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and Specflow
 
How to successfully grow a code review culture
How to successfully grow a code review cultureHow to successfully grow a code review culture
How to successfully grow a code review culture
 
Visual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should knowVisual Studio tricks every dot net developer should know
Visual Studio tricks every dot net developer should know
 
AlAzharTC | C# Course - Day 1
AlAzharTC | C# Course - Day 1AlAzharTC | C# Course - Day 1
AlAzharTC | C# Course - Day 1
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
 
BilousAnna_QA_CV_08.2016
BilousAnna_QA_CV_08.2016BilousAnna_QA_CV_08.2016
BilousAnna_QA_CV_08.2016
 

Viewers also liked

Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Dan Jenkins
 
Presentacion Maria Jose y Eliana
Presentacion Maria Jose y ElianaPresentacion Maria Jose y Eliana
Presentacion Maria Jose y Eliana
Rosalía García
 
Zaragoza Turismo 41
Zaragoza Turismo 41Zaragoza Turismo 41
Zaragoza Turismo 41
Saucepolis blog & Hotel Sauce
 
The day i felt my life ruined
The day i felt my life ruinedThe day i felt my life ruined
The day i felt my life ruined
Mane Omsy
 
Комплекс услуг
Комплекс услугКомплекс услуг
Комплекс услуг
Marina Kirilyuk
 
人生何求
人生何求人生何求
人生何求
honan4108
 

Viewers also liked (20)

Exploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTCExploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTC
 
WebRTC From Asterisk to Headline - MoNage
WebRTC From Asterisk to Headline - MoNageWebRTC From Asterisk to Headline - MoNage
WebRTC From Asterisk to Headline - MoNage
 
6 Months with WebRTC
6 Months with WebRTC6 Months with WebRTC
6 Months with WebRTC
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 
Extjs
ExtjsExtjs
Extjs
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilities
 
Modular design
Modular design   Modular design
Modular design
 
[Sevendays] CopyLinker.com IR 2015.02.21_by shawn
[Sevendays] CopyLinker.com IR 2015.02.21_by shawn[Sevendays] CopyLinker.com IR 2015.02.21_by shawn
[Sevendays] CopyLinker.com IR 2015.02.21_by shawn
 
ME ME MEme magic
ME ME MEme magicME ME MEme magic
ME ME MEme magic
 
Presentacion Maria Jose y Eliana
Presentacion Maria Jose y ElianaPresentacion Maria Jose y Eliana
Presentacion Maria Jose y Eliana
 
Zaragoza Turismo 41
Zaragoza Turismo 41Zaragoza Turismo 41
Zaragoza Turismo 41
 
Trabajo andres
Trabajo andresTrabajo andres
Trabajo andres
 
Take Courage: Listen, Don't Talk
Take Courage: Listen, Don't TalkTake Courage: Listen, Don't Talk
Take Courage: Listen, Don't Talk
 
Abril jardim
Abril jardimAbril jardim
Abril jardim
 
The day i felt my life ruined
The day i felt my life ruinedThe day i felt my life ruined
The day i felt my life ruined
 
5° básico a semana 04 al 08 abril
5° básico a  semana 04 al  08 abril5° básico a  semana 04 al  08 abril
5° básico a semana 04 al 08 abril
 
Комплекс услуг
Комплекс услугКомплекс услуг
Комплекс услуг
 
人生何求
人生何求人生何求
人生何求
 
Felipe M, João e Gabriel T
Felipe M, João e Gabriel TFelipe M, João e Gabriel T
Felipe M, João e Gabriel T
 

Similar to Writing High Quality Code

How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
Mike Harris
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
lqi
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
nadeembtech
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
Dmytro Mindra
 

Similar to Writing High Quality Code (20)

How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality code
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit test
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
Kudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release ProcessKudo codefest : Delivering High Quality Software Through Better Release Process
Kudo codefest : Delivering High Quality Software Through Better Release Process
 
ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Tdd
TddTdd
Tdd
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Voxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereviewVoxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereview
 
Developer Job in Practice
Developer Job in PracticeDeveloper Job in Practice
Developer Job in Practice
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
 
Ten Advices for Architects
Ten Advices for ArchitectsTen Advices for Architects
Ten Advices for Architects
 
eXtreme Programming
eXtreme ProgrammingeXtreme Programming
eXtreme Programming
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
10 Hinweise für Architekten
10 Hinweise für Architekten10 Hinweise für Architekten
10 Hinweise für Architekten
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 

More from Grgur Grisogono

Building Cordova plugins for iOS
Building Cordova plugins for iOSBuilding Cordova plugins for iOS
Building Cordova plugins for iOS
Grgur Grisogono
 

More from Grgur Grisogono (17)

PRPL Pattern with Webpack and React
PRPL Pattern with Webpack and ReactPRPL Pattern with Webpack and React
PRPL Pattern with Webpack and React
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
Back to the Future with ES.next
Back to the Future with ES.nextBack to the Future with ES.next
Back to the Future with ES.next
 
Frustration-Free Packaging of Ext JS 5 Applications
Frustration-Free Packaging of Ext JS 5 ApplicationsFrustration-Free Packaging of Ext JS 5 Applications
Frustration-Free Packaging of Ext JS 5 Applications
 
Sencha Space review
Sencha Space reviewSencha Space review
Sencha Space review
 
ModUX keynote
ModUX keynoteModUX keynote
ModUX keynote
 
Building Cordova plugins for iOS
Building Cordova plugins for iOSBuilding Cordova plugins for iOS
Building Cordova plugins for iOS
 
Unit and functional testing with Siesta
Unit and functional testing with SiestaUnit and functional testing with Siesta
Unit and functional testing with Siesta
 
Practices and obstacles in agile development
Practices and obstacles in agile developmentPractices and obstacles in agile development
Practices and obstacles in agile development
 
Securing Client Side Data
 Securing Client Side Data Securing Client Side Data
Securing Client Side Data
 
Give Responsive Design a Mobile Performance Boost
Give Responsive Design a Mobile Performance BoostGive Responsive Design a Mobile Performance Boost
Give Responsive Design a Mobile Performance Boost
 
Making the Web Work on Mobile
Making the Web Work on MobileMaking the Web Work on Mobile
Making the Web Work on Mobile
 
Sencha Cmd Quick Start
Sencha Cmd Quick StartSencha Cmd Quick Start
Sencha Cmd Quick Start
 
What's Coming Next in Sencha Frameworks
What's Coming Next in Sencha FrameworksWhat's Coming Next in Sencha Frameworks
What's Coming Next in Sencha Frameworks
 
BlackBerry Loves the Web
BlackBerry Loves the WebBlackBerry Loves the Web
BlackBerry Loves the Web
 
Has Anyone Asked a Customer?
Has Anyone Asked a Customer?Has Anyone Asked a Customer?
Has Anyone Asked a Customer?
 
Sencha Touch Meets TYPO3 CMS
Sencha Touch Meets TYPO3 CMSSencha Touch Meets TYPO3 CMS
Sencha Touch Meets TYPO3 CMS
 

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
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Writing High Quality Code