SlideShare a Scribd company logo
1 of 29
Download to read offline
Code analysis for a better future
Gil Forcada 
Head developer at der Freitag
Few questions: 
pep8? 
pep257? 
internal guidelines? 
enforcing them? 
p.r.codeanalysis? 
p.api style guide? 
hacking?
Why follow standards?
"Mars Climate Orbiter 2" by NASA/JPL/Corby Waste - Licensed under Public domain via 
Wikimedia Commons
It is not clear which coding style is used for various 
shell scripts present in this repository. 
Having some clear guidelines, like how many 
characters are used for indentation, if then appears in 
the same line as if, and such will be helpful to create 
consistent code easier to read by humans. 
- developer trying to start contributing on a project (emphasis mine)
BREAKING NEWS
FWT meeting notes from 2013-03-05 
... 
... 
... 
... 
... 
We approved the style guide used by plone.api as 
the official code style guide for Plone core. 
http://plone.293351.n2.nabble.com/Framework-team-meeting-2013-03-05-td7563639.html
Examples / Ideas / Thoughts
Sanetizing Plone Views 
https://gist.github.com/regebro/5326178 
@April 12 2013
Consistency MaTterS, size not
EXAMPLE OF INCONSISTENT FILE
100 devs, 1 file
Written once, read forever
EXAMPLE OF A DIFF WITH: 
Trailing whitespaces, extra empty lines, different 
cases, mixing string quotings, different 
indentation, changing parts that are not related to 
the code, typos here and there...
Commit messages / history log
http://stackoverflow.com/questions/1057564
Don't lie
Add grok.queryAnnotation() from 
grokcore.annotation 
+from grokcore.annotation import queryAnnotation 
Actually... 
Remove code on buildout.cfg 
New version of bootstrap.py 
https://github.com/zopefoundation/grok/commit/0e4ecf6e3f2531f90f7e7e498 
97d1b9439802f29
But please...
Cognitive load 
Is the load related to the executive control of working memory 
(WM). Theories contend that during complex learning activities the 
amount of information and interactions that must be processed 
simultaneously can either underload or overload the finite amount 
of working memory one possesses. All elements must be processed 
before meaningful learning can continue. 
Wikipedia (quoting book "Cognitive Load Theory: Instructional Implications of 
the Interaction between Information Structures and Cognitive Architecture".)
plone.recipe.codeanalysis to the rescue
.py 
.zcml 
.xml 
.pt 
.js 
.css 
.rst 
package structure 
testing approach 
...
FUTURE
Openspace anyone?
THANKS!

More Related Content

What's hot

What's hot (20)

iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
Polymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to gitPolymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to git
 
DevOpsDays Taipei 2017 Opening Talk
DevOpsDays Taipei 2017 Opening TalkDevOpsDays Taipei 2017 Opening Talk
DevOpsDays Taipei 2017 Opening Talk
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
 
Paving roads
Paving roadsPaving roads
Paving roads
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務
 
Oracle Code Brussels 2017 - The DevOps disaster
Oracle Code Brussels 2017 - The DevOps disasterOracle Code Brussels 2017 - The DevOps disaster
Oracle Code Brussels 2017 - The DevOps disaster
 
Digital Ocean Amsterdam meetup March 2017 - The DevOps disaster
Digital Ocean Amsterdam meetup March 2017 - The DevOps disasterDigital Ocean Amsterdam meetup March 2017 - The DevOps disaster
Digital Ocean Amsterdam meetup March 2017 - The DevOps disaster
 
Driving development in PHP
Driving development in PHPDriving development in PHP
Driving development in PHP
 
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
The Hitchhiker's Guide to Servo Contributor [COSCUP 2020]
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)
 
The Grails introduction workshop
The Grails introduction workshopThe Grails introduction workshop
The Grails introduction workshop
 
PHP Conf Taiwan 2016 自動化與持續整合實作工作坊
PHP Conf Taiwan 2016 自動化與持續整合實作工作坊PHP Conf Taiwan 2016 自動化與持續整合實作工作坊
PHP Conf Taiwan 2016 自動化與持續整合實作工作坊
 
Continuous integration with Docker
Continuous integration with DockerContinuous integration with Docker
Continuous integration with Docker
 
Use Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projectsUse Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projects
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Golang Microservices meetup
Golang Microservices meetupGolang Microservices meetup
Golang Microservices meetup
 

Viewers also liked

Viewers also liked (19)

Content's quality for Plone editors
Content's quality for Plone editorsContent's quality for Plone editors
Content's quality for Plone editors
 
Mosaic - flexibele layouts voor Plone
Mosaic - flexibele layouts voor PloneMosaic - flexibele layouts voor Plone
Mosaic - flexibele layouts voor Plone
 
Plone Hosting: A Panel Discussion
Plone Hosting: A Panel DiscussionPlone Hosting: A Panel Discussion
Plone Hosting: A Panel Discussion
 
Running a Plone product on Substance D
Running a Plone product on Substance DRunning a Plone product on Substance D
Running a Plone product on Substance D
 
The state of Plone Intranet
The state of Plone IntranetThe state of Plone Intranet
The state of Plone Intranet
 
Why CMS will not die
Why CMS will not dieWhy CMS will not die
Why CMS will not die
 
Historico das Conferencias Python Brasil
Historico das Conferencias Python BrasilHistorico das Conferencias Python Brasil
Historico das Conferencias Python Brasil
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
 
Lightning Talk: Security matters @ploneconf 2014
Lightning Talk: Security matters @ploneconf 2014Lightning Talk: Security matters @ploneconf 2014
Lightning Talk: Security matters @ploneconf 2014
 
The Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with PloneThe Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with Plone
 
Resource registries plone conf 2014
Resource registries plone conf 2014Resource registries plone conf 2014
Resource registries plone conf 2014
 
PloneConf 2014 CDN terada
PloneConf 2014 CDN teradaPloneConf 2014 CDN terada
PloneConf 2014 CDN terada
 
TTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpressTTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpress
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easy
 
Plone 5 theming unleashed
Plone 5 theming unleashedPlone 5 theming unleashed
Plone 5 theming unleashed
 
Plone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fallPlone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fall
 
Social, Digital & Mobile Around The World (January 2014)
Social, Digital & Mobile Around The World (January 2014)Social, Digital & Mobile Around The World (January 2014)
Social, Digital & Mobile Around The World (January 2014)
 
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
 
Digital, Social & Mobile in 2015
Digital, Social & Mobile in 2015Digital, Social & Mobile in 2015
Digital, Social & Mobile in 2015
 

Similar to Code analysis for a better future

C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
Jason Hearne-McGuiness
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning products
Gianmario Spacagna
 

Similar to Code analysis for a better future (20)

Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
Makefile
MakefileMakefile
Makefile
 
Build your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesBuild your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resources
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
 
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 
Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01
 
LangChain + Docugami Webinar
LangChain + Docugami WebinarLangChain + Docugami Webinar
LangChain + Docugami Webinar
 
Tech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning productsTech leaders guide to effective building of machine learning products
Tech leaders guide to effective building of machine learning products
 
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
20180926 kubeflow-meetup-1-kubeflow-operators-Preferred Networks-Shingo Omura
 
Introducing Parallel Pixie Dust
Introducing Parallel Pixie DustIntroducing Parallel Pixie Dust
Introducing Parallel Pixie Dust
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
Fast and Reproducible Deep Learning
Fast and Reproducible Deep LearningFast and Reproducible Deep Learning
Fast and Reproducible Deep Learning
 
The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Day2 - Refactoring (Lecture SS 2015)
Day2 - Refactoring (Lecture SS 2015)Day2 - Refactoring (Lecture SS 2015)
Day2 - Refactoring (Lecture SS 2015)
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

Code analysis for a better future

  • 1. Code analysis for a better future
  • 2. Gil Forcada Head developer at der Freitag
  • 3.
  • 4. Few questions: pep8? pep257? internal guidelines? enforcing them? p.r.codeanalysis? p.api style guide? hacking?
  • 6. "Mars Climate Orbiter 2" by NASA/JPL/Corby Waste - Licensed under Public domain via Wikimedia Commons
  • 7. It is not clear which coding style is used for various shell scripts present in this repository. Having some clear guidelines, like how many characters are used for indentation, if then appears in the same line as if, and such will be helpful to create consistent code easier to read by humans. - developer trying to start contributing on a project (emphasis mine)
  • 9. FWT meeting notes from 2013-03-05 ... ... ... ... ... We approved the style guide used by plone.api as the official code style guide for Plone core. http://plone.293351.n2.nabble.com/Framework-team-meeting-2013-03-05-td7563639.html
  • 10. Examples / Ideas / Thoughts
  • 11. Sanetizing Plone Views https://gist.github.com/regebro/5326178 @April 12 2013
  • 12.
  • 15. 100 devs, 1 file
  • 17. EXAMPLE OF A DIFF WITH: Trailing whitespaces, extra empty lines, different cases, mixing string quotings, different indentation, changing parts that are not related to the code, typos here and there...
  • 18. Commit messages / history log
  • 21. Add grok.queryAnnotation() from grokcore.annotation +from grokcore.annotation import queryAnnotation Actually... Remove code on buildout.cfg New version of bootstrap.py https://github.com/zopefoundation/grok/commit/0e4ecf6e3f2531f90f7e7e498 97d1b9439802f29
  • 23.
  • 24. Cognitive load Is the load related to the executive control of working memory (WM). Theories contend that during complex learning activities the amount of information and interactions that must be processed simultaneously can either underload or overload the finite amount of working memory one possesses. All elements must be processed before meaningful learning can continue. Wikipedia (quoting book "Cognitive Load Theory: Instructional Implications of the Interaction between Information Structures and Cognitive Architecture".)
  • 26. .py .zcml .xml .pt .js .css .rst package structure testing approach ...