SlideShare a Scribd company logo
Writing code well
Tools, tips & tricks
Take advantage of a versioning system
“Version control is the ability to manage the change and configuration of an
application. Versioning is a priceless process, especially when you have multiple
developers working on a single application, because it allows them to easily share
files.”
-- from some Google search hit
Take advantage of a versioning system (1)
Git is a free and open source distributed version control system designed to
handle everything from small to very large projects with speed and efficiency.
Take advantage of a versioning system (2)
Here’s some don’t(s) you should avoid:
- Share your code on Dropbox/Drive/…
- Zip your code and send it around via email
- Share only some files/functions
Please use branches!!
You should be able to
look at your code
after 6 months
and be able to
understand what is going on!
Name things meaningfully
Your code should be telling you what is happening: you will never remember on
your own!!!!!
for i in lst:
result = function_1(i)
for position in positions:
place = locate_position(position)
Code organization
- Functions can be handy!!
- Let’s avoid multiple copies of same piece code around your files
- Take advantage of classes and objects (when possible)
- Object oriented programming has tons of benefits:
- Objects created for Object Oriented Programs can easily be reused in other programs
- Once an object is created, the knowledge of its implementation is not necessary for its
use
- The bigger the project, the more complex the structure
- Let’s avoid saving all the files in the same root folder
Use a common style
geoSpatialCoordinates
number_of_items_included_into_the_box
maximum-Distance_betweenObjects
Use an IDE
- Code inspection
- Function and variable auto-completion
- Hints (you may learn something new!)
- Renaming support (can be a hell of a pain!!)
- Running code
- Debugging with visual execution
Document your code
It is for sure going to help others (and yourself) in:
1. Understanding what is going on
2. Applying
a. Modifications
b. Fixes
c. Improvements
Write a Readme file
1. General description of the project
2. Instructions on how to run the code
a. Include info about other required components not included (databases?)
3. Include a few examples showing how to combine the various pieces of your
code
When working with APIs: document them!
We have been using:
1. Apiary
2. Swagger
+ A unique version of the documentation
+ Publicly accessible
+ No excuses (it’s been written there!!)
+ They may provide code snippets for performing queries!!
When working with APIs: document them! (1)
Test your code!
You don’t want to have surprises when in production (you’ll have them anyway, but
let’s minimize!!!)
1. Take advantage of the test suites for testing the specific functions
2. Run lots of test scenarios while in dev mode (locally on your computer or on a
dedicated test instance)
Run your code
Docker may come in handy!!
“... operating-system-level virtualization, also known as containerization ...”
1. Compatibility and Maintainability
2. Simplicity and Faster Configurations
3. Rapid Deployment
4. Multi-Cloud Platforms
5. Isolation
6. Security
This training material is part of the FogGuru project that has received funding from the European Union’s Horizon
2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 765452. The
information and views set out in this material are those of the author(s) and do not necessarily reflect the official
opinion of the European Union. Neither the European Union institutions and bodies nor any person acting on their
behalf may be held responsible for the use which may be made of the information contained therein.

More Related Content

What's hot

Large Scale PHP
Large Scale PHPLarge Scale PHP
Large Scale PHP
Jonathan Oxer
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
Wekoslav Stefanovski
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
Gabriel Dogaru
 
Testing and symfony2
Testing and symfony2Testing and symfony2
Testing and symfony2
The Software House
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine Rankings
Joomla Day South Africa
 
Deployer
DeployerDeployer
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
Meaghan Lewis
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test Cloud
Emanuel Amiguinho
 
Continuous SDK
Continuous SDKContinuous SDK
Continuous SDK
Johannes Ebner
 
Play framework - Bristol Java meetup
Play framework - Bristol Java meetupPlay framework - Bristol Java meetup
Play framework - Bristol Java meetup
Robin Warren
 
Sonarqube + Docker
Sonarqube + DockerSonarqube + Docker
Sonarqube + Docker
Estefanía Fernández Muñoz
 
Android development at mercari 2015
Android development at mercari 2015Android development at mercari 2015
Android development at mercari 2015
Tomoaki Imai
 
Elixir koans
Elixir koansElixir koans
Elixir koans
Ruben Amortegui
 
Java Applications with Visual Studio
Java Applications with Visual StudioJava Applications with Visual Studio
Java Applications with Visual Studio
Red Hat Developers
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentationDaniel Straus
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnycJamil Spain
 
Getting your project_started
Getting your project_startedGetting your project_started
Getting your project_started
Adam Culp
 
Softshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offlineSoftshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offline
Claire Reynaud
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h edition
Jorge Ortiz
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
Hemmerling
 

What's hot (20)

Large Scale PHP
Large Scale PHPLarge Scale PHP
Large Scale PHP
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
Testing and symfony2
Testing and symfony2Testing and symfony2
Testing and symfony2
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine Rankings
 
Deployer
DeployerDeployer
Deployer
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test Cloud
 
Continuous SDK
Continuous SDKContinuous SDK
Continuous SDK
 
Play framework - Bristol Java meetup
Play framework - Bristol Java meetupPlay framework - Bristol Java meetup
Play framework - Bristol Java meetup
 
Sonarqube + Docker
Sonarqube + DockerSonarqube + Docker
Sonarqube + Docker
 
Android development at mercari 2015
Android development at mercari 2015Android development at mercari 2015
Android development at mercari 2015
 
Elixir koans
Elixir koansElixir koans
Elixir koans
 
Java Applications with Visual Studio
Java Applications with Visual StudioJava Applications with Visual Studio
Java Applications with Visual Studio
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentation
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnyc
 
Getting your project_started
Getting your project_startedGetting your project_started
Getting your project_started
 
Softshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offlineSoftshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offline
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h edition
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
 

Similar to Writing code well: tools, tips and tricks

Testing & should i do it
Testing & should i do itTesting & should i do it
Testing & should i do it
Martin Sykora
 
DevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdfDevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdf
Vishwas N
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
Silicon Straits
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
Shafiul Azam Chowdhury
 
Putting the pro in programmer
Putting the pro in programmerPutting the pro in programmer
Putting the pro in programmer
Switch Systems Ltd
 
Programming tools for developers
Programming tools for developersProgramming tools for developers
Programming tools for developers
BBVA API Market
 
Sonatype DevSecOps Leadership forum 2020
Sonatype DevSecOps Leadership forum 2020Sonatype DevSecOps Leadership forum 2020
Sonatype DevSecOps Leadership forum 2020
Daniel Garcia (a.k.a cr0hn)
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
Daniel Garcia (a.k.a cr0hn)
 
Sample Project using design patterns and agile
Sample Project using design patterns and agileSample Project using design patterns and agile
Sample Project using design patterns and agile
Vicente Bolea
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
Amal Mohan N
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation Slides
Fab L
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOpsOmid Vahdaty
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021
WrapPixel
 
Rooted con 2020 - from the heaven to hell in the CI - CD
Rooted con 2020 - from the heaven to hell in the CI - CDRooted con 2020 - from the heaven to hell in the CI - CD
Rooted con 2020 - from the heaven to hell in the CI - CD
Daniel Garcia (a.k.a cr0hn)
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Developmentbsadd
 
ID E's features
ID E's featuresID E's features
ID E's features
wajahat Gul
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
MinhTrnNht7
 
DevOps interview questions and answers
DevOps interview questions and answersDevOps interview questions and answers
DevOps interview questions and answers
HopeTutors1
 
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanCara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
DicodingEvent
 

Similar to Writing code well: tools, tips and tricks (20)

Testing & should i do it
Testing & should i do itTesting & should i do it
Testing & should i do it
 
DevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdfDevOps - A Purpose for an Institution.pdf
DevOps - A Purpose for an Institution.pdf
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
 
Putting the pro in programmer
Putting the pro in programmerPutting the pro in programmer
Putting the pro in programmer
 
Programming tools for developers
Programming tools for developersProgramming tools for developers
Programming tools for developers
 
Sonatype DevSecOps Leadership forum 2020
Sonatype DevSecOps Leadership forum 2020Sonatype DevSecOps Leadership forum 2020
Sonatype DevSecOps Leadership forum 2020
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
 
Sample Project using design patterns and agile
Sample Project using design patterns and agileSample Project using design patterns and agile
Sample Project using design patterns and agile
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation Slides
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021Top 10 IDEs for React.js Developers in 2021
Top 10 IDEs for React.js Developers in 2021
 
Rooted con 2020 - from the heaven to hell in the CI - CD
Rooted con 2020 - from the heaven to hell in the CI - CDRooted con 2020 - from the heaven to hell in the CI - CD
Rooted con 2020 - from the heaven to hell in the CI - CD
 
Introducing Systems Analysis Design Development
Introducing Systems Analysis Design DevelopmentIntroducing Systems Analysis Design Development
Introducing Systems Analysis Design Development
 
ID E's features
ID E's featuresID E's features
ID E's features
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
 
DevOps interview questions and answers
DevOps interview questions and answersDevOps interview questions and answers
DevOps interview questions and answers
 
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanCara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
 
Fp201 unit1 1
Fp201 unit1 1Fp201 unit1 1
Fp201 unit1 1
 

More from FogGuru MSCA Project

Assignments
AssignmentsAssignments
The magical recipe for speaking in public
The magical recipe for speaking in publicThe magical recipe for speaking in public
The magical recipe for speaking in public
FogGuru MSCA Project
 
Introduction to the economics of innovation
Introduction to the economics of innovationIntroduction to the economics of innovation
Introduction to the economics of innovation
FogGuru MSCA Project
 
Introduction to entrepreneurial finances
Introduction to entrepreneurial financesIntroduction to entrepreneurial finances
Introduction to entrepreneurial finances
FogGuru MSCA Project
 
Financing Innovation and Intellectual property
Financing Innovation and Intellectual property Financing Innovation and Intellectual property
Financing Innovation and Intellectual property
FogGuru MSCA Project
 
Creating Competitive Advantage: Resource and Capabilities
Creating Competitive Advantage: Resource and Capabilities Creating Competitive Advantage: Resource and Capabilities
Creating Competitive Advantage: Resource and Capabilities
FogGuru MSCA Project
 
Business growth: material for exercises
Business growth: material for exercisesBusiness growth: material for exercises
Business growth: material for exercises
FogGuru MSCA Project
 
Business growth: material for discussions
Business growth: material for discussions  Business growth: material for discussions
Business growth: material for discussions
FogGuru MSCA Project
 
Scale-ups and large companies
Scale-ups and large companiesScale-ups and large companies
Scale-ups and large companies
FogGuru MSCA Project
 
Management, organization and leadership
Management, organization and leadershipManagement, organization and leadership
Management, organization and leadership
FogGuru MSCA Project
 
Key strategies for growth
Key strategies for growthKey strategies for growth
Key strategies for growth
FogGuru MSCA Project
 
Financing growth
Financing growthFinancing growth
Financing growth
FogGuru MSCA Project
 
Machine Learning: exercises
Machine Learning: exercises Machine Learning: exercises
Machine Learning: exercises
FogGuru MSCA Project
 
Introduction to Machine Learning
Introduction to Machine Learning Introduction to Machine Learning
Introduction to Machine Learning
FogGuru MSCA Project
 
Control of computing systems
Control of computing systemsControl of computing systems
Control of computing systems
FogGuru MSCA Project
 
How to make a presentation
How to make a presentationHow to make a presentation
How to make a presentation
FogGuru MSCA Project
 
How to carry out bibliographic research
How to carry out bibliographic research How to carry out bibliographic research
How to carry out bibliographic research
FogGuru MSCA Project
 
Guidelines for empirical evaluations
Guidelines for empirical evaluationsGuidelines for empirical evaluations
Guidelines for empirical evaluations
FogGuru MSCA Project
 
Ethics and Personal Data
Ethics and Personal DataEthics and Personal Data
Ethics and Personal Data
FogGuru MSCA Project
 
Business case 1: Soft mobility in Rennes Metropole
Business case 1: Soft mobility in Rennes Metropole Business case 1: Soft mobility in Rennes Metropole
Business case 1: Soft mobility in Rennes Metropole
FogGuru MSCA Project
 

More from FogGuru MSCA Project (20)

Assignments
AssignmentsAssignments
Assignments
 
The magical recipe for speaking in public
The magical recipe for speaking in publicThe magical recipe for speaking in public
The magical recipe for speaking in public
 
Introduction to the economics of innovation
Introduction to the economics of innovationIntroduction to the economics of innovation
Introduction to the economics of innovation
 
Introduction to entrepreneurial finances
Introduction to entrepreneurial financesIntroduction to entrepreneurial finances
Introduction to entrepreneurial finances
 
Financing Innovation and Intellectual property
Financing Innovation and Intellectual property Financing Innovation and Intellectual property
Financing Innovation and Intellectual property
 
Creating Competitive Advantage: Resource and Capabilities
Creating Competitive Advantage: Resource and Capabilities Creating Competitive Advantage: Resource and Capabilities
Creating Competitive Advantage: Resource and Capabilities
 
Business growth: material for exercises
Business growth: material for exercisesBusiness growth: material for exercises
Business growth: material for exercises
 
Business growth: material for discussions
Business growth: material for discussions  Business growth: material for discussions
Business growth: material for discussions
 
Scale-ups and large companies
Scale-ups and large companiesScale-ups and large companies
Scale-ups and large companies
 
Management, organization and leadership
Management, organization and leadershipManagement, organization and leadership
Management, organization and leadership
 
Key strategies for growth
Key strategies for growthKey strategies for growth
Key strategies for growth
 
Financing growth
Financing growthFinancing growth
Financing growth
 
Machine Learning: exercises
Machine Learning: exercises Machine Learning: exercises
Machine Learning: exercises
 
Introduction to Machine Learning
Introduction to Machine Learning Introduction to Machine Learning
Introduction to Machine Learning
 
Control of computing systems
Control of computing systemsControl of computing systems
Control of computing systems
 
How to make a presentation
How to make a presentationHow to make a presentation
How to make a presentation
 
How to carry out bibliographic research
How to carry out bibliographic research How to carry out bibliographic research
How to carry out bibliographic research
 
Guidelines for empirical evaluations
Guidelines for empirical evaluationsGuidelines for empirical evaluations
Guidelines for empirical evaluations
 
Ethics and Personal Data
Ethics and Personal DataEthics and Personal Data
Ethics and Personal Data
 
Business case 1: Soft mobility in Rennes Metropole
Business case 1: Soft mobility in Rennes Metropole Business case 1: Soft mobility in Rennes Metropole
Business case 1: Soft mobility in Rennes Metropole
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

Writing code well: tools, tips and tricks

  • 1. Writing code well Tools, tips & tricks
  • 2.
  • 3. Take advantage of a versioning system “Version control is the ability to manage the change and configuration of an application. Versioning is a priceless process, especially when you have multiple developers working on a single application, because it allows them to easily share files.” -- from some Google search hit
  • 4. Take advantage of a versioning system (1) Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • 5. Take advantage of a versioning system (2) Here’s some don’t(s) you should avoid: - Share your code on Dropbox/Drive/… - Zip your code and send it around via email - Share only some files/functions
  • 7.
  • 8. You should be able to look at your code after 6 months and be able to understand what is going on!
  • 9. Name things meaningfully Your code should be telling you what is happening: you will never remember on your own!!!!! for i in lst: result = function_1(i) for position in positions: place = locate_position(position)
  • 10. Code organization - Functions can be handy!! - Let’s avoid multiple copies of same piece code around your files - Take advantage of classes and objects (when possible) - Object oriented programming has tons of benefits: - Objects created for Object Oriented Programs can easily be reused in other programs - Once an object is created, the knowledge of its implementation is not necessary for its use - The bigger the project, the more complex the structure - Let’s avoid saving all the files in the same root folder
  • 11. Use a common style geoSpatialCoordinates number_of_items_included_into_the_box maximum-Distance_betweenObjects
  • 12. Use an IDE - Code inspection - Function and variable auto-completion - Hints (you may learn something new!) - Renaming support (can be a hell of a pain!!) - Running code - Debugging with visual execution
  • 13.
  • 14. Document your code It is for sure going to help others (and yourself) in: 1. Understanding what is going on 2. Applying a. Modifications b. Fixes c. Improvements
  • 15. Write a Readme file 1. General description of the project 2. Instructions on how to run the code a. Include info about other required components not included (databases?) 3. Include a few examples showing how to combine the various pieces of your code
  • 16. When working with APIs: document them! We have been using: 1. Apiary 2. Swagger + A unique version of the documentation + Publicly accessible + No excuses (it’s been written there!!) + They may provide code snippets for performing queries!!
  • 17. When working with APIs: document them! (1)
  • 18.
  • 19. Test your code! You don’t want to have surprises when in production (you’ll have them anyway, but let’s minimize!!!) 1. Take advantage of the test suites for testing the specific functions 2. Run lots of test scenarios while in dev mode (locally on your computer or on a dedicated test instance)
  • 20. Run your code Docker may come in handy!! “... operating-system-level virtualization, also known as containerization ...” 1. Compatibility and Maintainability 2. Simplicity and Faster Configurations 3. Rapid Deployment 4. Multi-Cloud Platforms 5. Isolation 6. Security
  • 21.
  • 22. This training material is part of the FogGuru project that has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 765452. The information and views set out in this material are those of the author(s) and do not necessarily reflect the official opinion of the European Union. Neither the European Union institutions and bodies nor any person acting on their behalf may be held responsible for the use which may be made of the information contained therein.