SlideShare a Scribd company logo
1 of 33
Develop Best Practices
The secret sauce for coding modern software
Kosala Nuwan Perera
@kosalanuwan
Peter Falk told to Paul Reiser…
get some paper
put it in a typewriter
type FADE IN
... and keep typing.
Problem, solution, and solve…
Biggest mistake of all time is
jump straight to “Solve”.
People really don’t get this!
Every feature is
a commitment, a financial debt,
even if its not used.
Did you know that you are
woefully stuck in the Appland?
Well, now you know 
Things that teams literally struggle
- More granular tracing and auditing
- User telemetry
- Support for flexible DevOps
- Modularization
- Hybrid could opportunities
- End-to-end message security
- Powerful API for Public and Private
- Asynchronous UX
- Support for Multiplicity of clients
- More efficient background processing
Things that teams literally struggle
- More granular tracing and auditing
- User telemetry
- Support for flexible DevOps
- Modularization
- Hybrid could opportunities
- End-to-end message security
- Powerful API for Public and Private
- Asynchronous UX
- Support for Multiplicity of clients
- More efficient background processing
Things that teams literally struggle
- More granular tracing and auditing
- User telemetry
- Support for flexible DevOps
- Modularization
- Hybrid could opportunities
- End-to-end message security
- Powerful API for Public and Private
- Asynchronous UX
- Support for Multiplicity of clients
- More efficient background processing
A computer program is
the most complicated thing on earth,
second to a woman's brain.
I just told this and she second it 
How do you make things so complicated?
- Rigid
Small change causing cascade changes.
- Fragile
Breaks in many places due to a single change.
- Immobility
Cannot reuse in other projects due to risks/high efforts.
- Design debt
Technical debt by taking shortcuts?
- Environment debt
Technical debt by not running build, test, and other tasks.
- Needless complexity
- Needless repetition
- Opacity
Cannot/hard to understand. Requires reengineering.
How do you make things so complicated?
- Rigid
Small change causing cascade changes.
- Fragile
Breaks in many places due to a single change.
- Immobility
Cannot reuse in other projects due to risks/high efforts.
- Design debt
Technical debt by taking shortcuts?
- Environment debt
Technical debt by not running build, test, and other tasks.
- Needless complexity
- Needless repetition
- Opacity
Cannot/hard to understand. Requires reengineering.
How do you make things so complicated?
- Rigid
Small change causing cascade changes.
- Fragile
Breaks in many places due to a single change.
- Immobility
Cannot reuse in other projects due to risks/high efforts.
- Design debt
Technical debt by taking shortcuts?
- Environment debt
Technical debt by not running build, test, and other tasks.
- Needless complexity
- Needless repetition
- Opacity
Cannot/hard to understand. Requires reengineering.
How do you make things so complicated?
- Rigid
Small change causing cascade changes.
- Fragile
Breaks in many places due to a single change.
- Immobility
Cannot reuse in other projects due to risks/high efforts.
- Design debt
Technical debt by taking shortcuts?
- Environment debt
Technical debt by not running build, test, and other tasks.
- Needless complexity
- Needless repetition
- Opacity
Cannot/hard to understand. Requires reengineering.
Why would you care?
- Respond to change
- Cost of change
- Financial debt
You have a limited number of
keystrokes left in your hands
before you “die”.
What can you try Today?
- Naming conventions
- Methods
- Design principles
- Dependency injection
- Encapsulate conditionals
- Polymorphism to If/Else or Switch/Case
- Exception over return codes
Read more at Crockford's guidelines for JavaScript and
Google guidelines for JavaScript
Convention Example
App Root PascalCase Approvely
Files camelCased autoComplete.controller.js
Constructors PascalCase WebRequest
Namespaces camelCased but it’s unusual to have
two parts in one word though
Approvely.widgets
Functions camelCased toString
Non-constant variables
including params
camelCased
Constants but ES5 has
no constants
Capitalized or PascalCase CLICK_EVENT, Events.Click
Enums but ES5 has no
enums
Capitalized or PascalCase. Singular
for non-flags and plural for flags
HTTP_STATUS_CODE,
HttpStatusCode, BindingFlags
What can you try Today?
- Naming conventions
- Methods
- Design principles
- Dependency injection
- Encapsulate conditionals
- Polymorphism to If/Else or Switch/Case
- Exception over return codes
What can you try Today?
- Naming conventions
- Methods
- Design principles
- Dependency injection
- Encapsulate conditionals
- Polymorphism to If/Else or Switch/Case
- Exception over return codes
class Sword
{
public void Hit(string target) { ... }
}
class Samurai
{
private Sword sword;
public Samurai()
{
sword = new Sword();
}
public void Attack(string target)
{
sword.Hit(target);
}
}
Usage:
Samurai warrior = new Samurai();
warrior.Attack("the evildoers");
interface IWeapon
{
void Hit(string target);
}
class Sword : IWeapon
{
public void Hit(string target) { ... }
}
class Shuriken : IWeapon
{
public void Hit(string target) { ... }
}
class Samurai
{
public Samurai(IWeapon w) { ... }
public void Attack(string target) { ... }
}
Usage:
Shuriken weap1 = new Shuriken();
Samurai warrior1 = new Samurai(weap1);
warrior1.Attack("the evildoers");
Sword weap2 = new Sword();
Samurai warrior2 = new Samurai(weap2);
warrior2.Attack("the evildoers");
What can you try Today?
- Naming conventions
- Methods
- Design principles
- Dependency injection
- Encapsulate conditionals
- Polymorphism to If/Else or Switch/Case
- Exception over return codes
if (navigator.appName == "Microsoft Internet Explorer") {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
$(".js-slider-frame").animate({ left: "-130px" }, 1000);
flag = false;
} else {
$(".js-slider-frame").animate({ left: "236px" }, 1000);
flag = true;
}
return false;
});
} else {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
move(".js-slider-frame").set("left", -130).duration("1s").end();
flag = false;
} else {
move(".js-slider-frame").set("left", 236).duration("1s").end();
flag = true;
}
return false;
});
}
if (navigator.appName == "Microsoft Internet Explorer") {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
$(".js-slider-frame").animate({ left: "-130px" }, 1000);
flag = false;
} else {
$(".js-slider-frame").animate({ left: "236px" }, 1000);
flag = true;
}
return false;
});
} else {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
move(".js-slider-frame").set("left", -130).duration("1s").end();
flag = false;
} else {
move(".js-slider-frame").set("left", 236).duration("1s").end();
flag = true;
}
return false;
});
}
if (navigator.appName == "Microsoft Internet Explorer") {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
$(".js-slider-frame").animate({ left: "-130px" }, 1000);
flag = false;
} else {
$(".js-slider-frame").animate({ left: "236px" }, 1000);
flag = true;
}
return false;
});
} else {
var flag = true;
$(".js-right-arrow").click(function () {
if (flag) {
move(".js-slider-frame").set("left", -130).duration("1s").end();
flag = false;
} else {
move(".js-slider-frame").set("left", 236).duration("1s").end();
flag = true;
}
return false;
});
}
var flag = true,
isIE = navigator.appName == "Microsoft Internet Explorer";
$(".js-right-arrow").click(function () {
if (isIE) {
$(".js-slider-frame").animate({ left: flag ? "-130px" : "236px" }, 1000);
} else {
move(".js-slider-frame").set("left", flag ? -130 : 236).duration("1s");
}
flag = !flag;
return false;
});
What can you try Today?
- Naming conventions
- Methods
- Design principles
- Dependency injection
- Encapsulate conditionals
- Polymorphism to If/Else or Switch/Case
- Exception over return codes
When you are matured with these
principles and patterns,
it will become difficult for you to
think without those.
Where to begin?
- Good Editor
- Static analysis tools
- Builds
- Test automation tools
- Source control
- Continuous integration
What other things that go with it?
- Open source
- Code kata
- Pair programming
- Design/Code reviews
- Peer reviews
I swear to write software,
more useful software
and nothing but well-crafted software
so help me God!
- The Software Craftsmanship Oath
Happy Coding 
Kosala Nuwan Perera
@kosalanuwan

More Related Content

Similar to Developer Best Practices - The secret sauce for coding modern software

Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDCODEiD PHP Community
 
Ultimate Node.js countdown: the coolest Application Express examples
Ultimate Node.js countdown: the coolest Application Express examplesUltimate Node.js countdown: the coolest Application Express examples
Ultimate Node.js countdown: the coolest Application Express examplesAlan Arentsen
 
Reactive programming with RxJS - Taiwan
Reactive programming with RxJS - TaiwanReactive programming with RxJS - Taiwan
Reactive programming with RxJS - Taiwanmodernweb
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deploymentFilippo Zanella
 
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...Marco Cedaro
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 mayLuciano Amodio
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Developing faster than ever (Liferay DEVCON 2017)
Developing faster than ever (Liferay DEVCON 2017)Developing faster than ever (Liferay DEVCON 2017)
Developing faster than ever (Liferay DEVCON 2017)Sébastien Le Marchand
 
Work Queues
Work QueuesWork Queues
Work Queuesciconf
 
Human scaling on the front end
Human scaling on the front endHuman scaling on the front end
Human scaling on the front endRudy Rigot
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteDr Nic Williams
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainLourens Naudé
 
The Value of Reactive
The Value of ReactiveThe Value of Reactive
The Value of ReactiveVMware Tanzu
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоGeeksLab Odessa
 
Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015Konstantin Kudryashov
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentMike Brittain
 

Similar to Developer Best Practices - The secret sauce for coding modern software (20)

Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiD
 
Ultimate Node.js countdown: the coolest Application Express examples
Ultimate Node.js countdown: the coolest Application Express examplesUltimate Node.js countdown: the coolest Application Express examples
Ultimate Node.js countdown: the coolest Application Express examples
 
Reactive programming with RxJS - Taiwan
Reactive programming with RxJS - TaiwanReactive programming with RxJS - Taiwan
Reactive programming with RxJS - Taiwan
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deployment
 
Going web native
Going web nativeGoing web native
Going web native
 
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 may
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Developing faster than ever (Liferay DEVCON 2017)
Developing faster than ever (Liferay DEVCON 2017)Developing faster than ever (Liferay DEVCON 2017)
Developing faster than ever (Liferay DEVCON 2017)
 
Work Queues
Work QueuesWork Queues
Work Queues
 
Human scaling on the front end
Human scaling on the front endHuman scaling on the front end
Human scaling on the front end
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your Domain
 
The value of reactive
The value of reactiveThe value of reactive
The value of reactive
 
The Value of Reactive
The Value of ReactiveThe Value of Reactive
The Value of Reactive
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
 
Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous Deployment
 

More from Kosala Nuwan Perera

Lean UX and Design winning mobile apps
Lean UX and Design winning mobile appsLean UX and Design winning mobile apps
Lean UX and Design winning mobile appsKosala Nuwan Perera
 
Native vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentNative vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentKosala Nuwan Perera
 
Automating mobile usability heuristics
Automating mobile usability heuristicsAutomating mobile usability heuristics
Automating mobile usability heuristicsKosala Nuwan Perera
 
Crafting features that matter - UX from a Modern Analyst's perspective
Crafting features that matter - UX from a Modern Analyst's perspectiveCrafting features that matter - UX from a Modern Analyst's perspective
Crafting features that matter - UX from a Modern Analyst's perspectiveKosala Nuwan Perera
 
Web-centric application architectures
Web-centric application architecturesWeb-centric application architectures
Web-centric application architecturesKosala Nuwan Perera
 
Emphasis on sprint delivery model with Feature Crews
Emphasis on sprint delivery model with Feature CrewsEmphasis on sprint delivery model with Feature Crews
Emphasis on sprint delivery model with Feature CrewsKosala Nuwan Perera
 
Design stunning user experience with expression blend
Design stunning user experience with expression blendDesign stunning user experience with expression blend
Design stunning user experience with expression blendKosala Nuwan Perera
 
Why certain code is hard to test?
Why certain code is hard to test?Why certain code is hard to test?
Why certain code is hard to test?Kosala Nuwan Perera
 

More from Kosala Nuwan Perera (11)

Lean UX and Design winning mobile apps
Lean UX and Design winning mobile appsLean UX and Design winning mobile apps
Lean UX and Design winning mobile apps
 
Native vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentNative vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application Development
 
Automating mobile usability heuristics
Automating mobile usability heuristicsAutomating mobile usability heuristics
Automating mobile usability heuristics
 
Fake It Before Make It
Fake It Before Make ItFake It Before Make It
Fake It Before Make It
 
Crafting features that matter - UX from a Modern Analyst's perspective
Crafting features that matter - UX from a Modern Analyst's perspectiveCrafting features that matter - UX from a Modern Analyst's perspective
Crafting features that matter - UX from a Modern Analyst's perspective
 
Code Quality for a Fresh Start
Code Quality for a Fresh StartCode Quality for a Fresh Start
Code Quality for a Fresh Start
 
Web-centric application architectures
Web-centric application architecturesWeb-centric application architectures
Web-centric application architectures
 
Emphasis on sprint delivery model with Feature Crews
Emphasis on sprint delivery model with Feature CrewsEmphasis on sprint delivery model with Feature Crews
Emphasis on sprint delivery model with Feature Crews
 
Design stunning user experience with expression blend
Design stunning user experience with expression blendDesign stunning user experience with expression blend
Design stunning user experience with expression blend
 
Why certain code is hard to test?
Why certain code is hard to test?Why certain code is hard to test?
Why certain code is hard to test?
 
If you dont appear on google
If you dont appear on googleIf you dont appear on google
If you dont appear on google
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Developer Best Practices - The secret sauce for coding modern software

  • 1. Develop Best Practices The secret sauce for coding modern software Kosala Nuwan Perera @kosalanuwan
  • 2. Peter Falk told to Paul Reiser… get some paper put it in a typewriter type FADE IN ... and keep typing.
  • 3. Problem, solution, and solve… Biggest mistake of all time is jump straight to “Solve”.
  • 4. People really don’t get this! Every feature is a commitment, a financial debt, even if its not used.
  • 5. Did you know that you are woefully stuck in the Appland? Well, now you know 
  • 6. Things that teams literally struggle - More granular tracing and auditing - User telemetry - Support for flexible DevOps - Modularization - Hybrid could opportunities - End-to-end message security - Powerful API for Public and Private - Asynchronous UX - Support for Multiplicity of clients - More efficient background processing
  • 7. Things that teams literally struggle - More granular tracing and auditing - User telemetry - Support for flexible DevOps - Modularization - Hybrid could opportunities - End-to-end message security - Powerful API for Public and Private - Asynchronous UX - Support for Multiplicity of clients - More efficient background processing
  • 8. Things that teams literally struggle - More granular tracing and auditing - User telemetry - Support for flexible DevOps - Modularization - Hybrid could opportunities - End-to-end message security - Powerful API for Public and Private - Asynchronous UX - Support for Multiplicity of clients - More efficient background processing
  • 9. A computer program is the most complicated thing on earth, second to a woman's brain. I just told this and she second it 
  • 10. How do you make things so complicated? - Rigid Small change causing cascade changes. - Fragile Breaks in many places due to a single change. - Immobility Cannot reuse in other projects due to risks/high efforts. - Design debt Technical debt by taking shortcuts? - Environment debt Technical debt by not running build, test, and other tasks. - Needless complexity - Needless repetition - Opacity Cannot/hard to understand. Requires reengineering.
  • 11. How do you make things so complicated? - Rigid Small change causing cascade changes. - Fragile Breaks in many places due to a single change. - Immobility Cannot reuse in other projects due to risks/high efforts. - Design debt Technical debt by taking shortcuts? - Environment debt Technical debt by not running build, test, and other tasks. - Needless complexity - Needless repetition - Opacity Cannot/hard to understand. Requires reengineering.
  • 12. How do you make things so complicated? - Rigid Small change causing cascade changes. - Fragile Breaks in many places due to a single change. - Immobility Cannot reuse in other projects due to risks/high efforts. - Design debt Technical debt by taking shortcuts? - Environment debt Technical debt by not running build, test, and other tasks. - Needless complexity - Needless repetition - Opacity Cannot/hard to understand. Requires reengineering.
  • 13. How do you make things so complicated? - Rigid Small change causing cascade changes. - Fragile Breaks in many places due to a single change. - Immobility Cannot reuse in other projects due to risks/high efforts. - Design debt Technical debt by taking shortcuts? - Environment debt Technical debt by not running build, test, and other tasks. - Needless complexity - Needless repetition - Opacity Cannot/hard to understand. Requires reengineering.
  • 14. Why would you care? - Respond to change - Cost of change - Financial debt
  • 15. You have a limited number of keystrokes left in your hands before you “die”.
  • 16. What can you try Today? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes
  • 17. Read more at Crockford's guidelines for JavaScript and Google guidelines for JavaScript Convention Example App Root PascalCase Approvely Files camelCased autoComplete.controller.js Constructors PascalCase WebRequest Namespaces camelCased but it’s unusual to have two parts in one word though Approvely.widgets Functions camelCased toString Non-constant variables including params camelCased Constants but ES5 has no constants Capitalized or PascalCase CLICK_EVENT, Events.Click Enums but ES5 has no enums Capitalized or PascalCase. Singular for non-flags and plural for flags HTTP_STATUS_CODE, HttpStatusCode, BindingFlags
  • 18. What can you try Today? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes
  • 19. What can you try Today? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes
  • 20. class Sword { public void Hit(string target) { ... } } class Samurai { private Sword sword; public Samurai() { sword = new Sword(); } public void Attack(string target) { sword.Hit(target); } } Usage: Samurai warrior = new Samurai(); warrior.Attack("the evildoers");
  • 21. interface IWeapon { void Hit(string target); } class Sword : IWeapon { public void Hit(string target) { ... } } class Shuriken : IWeapon { public void Hit(string target) { ... } } class Samurai { public Samurai(IWeapon w) { ... } public void Attack(string target) { ... } } Usage: Shuriken weap1 = new Shuriken(); Samurai warrior1 = new Samurai(weap1); warrior1.Attack("the evildoers"); Sword weap2 = new Sword(); Samurai warrior2 = new Samurai(weap2); warrior2.Attack("the evildoers");
  • 22. What can you try Today? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes
  • 23. if (navigator.appName == "Microsoft Internet Explorer") { var flag = true; $(".js-right-arrow").click(function () { if (flag) { $(".js-slider-frame").animate({ left: "-130px" }, 1000); flag = false; } else { $(".js-slider-frame").animate({ left: "236px" }, 1000); flag = true; } return false; }); } else { var flag = true; $(".js-right-arrow").click(function () { if (flag) { move(".js-slider-frame").set("left", -130).duration("1s").end(); flag = false; } else { move(".js-slider-frame").set("left", 236).duration("1s").end(); flag = true; } return false; }); }
  • 24. if (navigator.appName == "Microsoft Internet Explorer") { var flag = true; $(".js-right-arrow").click(function () { if (flag) { $(".js-slider-frame").animate({ left: "-130px" }, 1000); flag = false; } else { $(".js-slider-frame").animate({ left: "236px" }, 1000); flag = true; } return false; }); } else { var flag = true; $(".js-right-arrow").click(function () { if (flag) { move(".js-slider-frame").set("left", -130).duration("1s").end(); flag = false; } else { move(".js-slider-frame").set("left", 236).duration("1s").end(); flag = true; } return false; }); }
  • 25. if (navigator.appName == "Microsoft Internet Explorer") { var flag = true; $(".js-right-arrow").click(function () { if (flag) { $(".js-slider-frame").animate({ left: "-130px" }, 1000); flag = false; } else { $(".js-slider-frame").animate({ left: "236px" }, 1000); flag = true; } return false; }); } else { var flag = true; $(".js-right-arrow").click(function () { if (flag) { move(".js-slider-frame").set("left", -130).duration("1s").end(); flag = false; } else { move(".js-slider-frame").set("left", 236).duration("1s").end(); flag = true; } return false; }); }
  • 26. var flag = true, isIE = navigator.appName == "Microsoft Internet Explorer"; $(".js-right-arrow").click(function () { if (isIE) { $(".js-slider-frame").animate({ left: flag ? "-130px" : "236px" }, 1000); } else { move(".js-slider-frame").set("left", flag ? -130 : 236).duration("1s"); } flag = !flag; return false; });
  • 27. What can you try Today? - Naming conventions - Methods - Design principles - Dependency injection - Encapsulate conditionals - Polymorphism to If/Else or Switch/Case - Exception over return codes
  • 28. When you are matured with these principles and patterns, it will become difficult for you to think without those.
  • 29. Where to begin? - Good Editor - Static analysis tools - Builds - Test automation tools - Source control - Continuous integration
  • 30. What other things that go with it? - Open source - Code kata - Pair programming - Design/Code reviews - Peer reviews
  • 31.
  • 32. I swear to write software, more useful software and nothing but well-crafted software so help me God! - The Software Craftsmanship Oath
  • 33. Happy Coding  Kosala Nuwan Perera @kosalanuwan

Editor's Notes

  1. Problem assumptions - Do customers know they have a problem? Solution assumptions - Would they buy if there is a solution? Solve assumption - Is it feasible to solve and sell?
  2. Craving for Apps, just the app and a database. Modern software architecture is all about apps. How important is this?
  3. These are the things that teams literally struggle when succeeding. How many of us do end-to-end message security? What about Async UX? These are the things that keeps you up all night.
  4. These are the things that teams literally struggle when succeeding. How many of us do end-to-end message security? What about Async UX? These are the things that keeps you up all night.
  5. These are the things that teams literally struggle when succeeding. How many of us do end-to-end message security? What about Async UX? These are the things that keeps you up all night.
  6. Got to leave the Appland now. We are no longer building apps only. We have to build systems and it is hard.
  7. Need to know what are not-so-good practices first.
  8. The ultimate reengineering discussion. Why? We have already learnt how not to do it.
  9. Why would you even care? Understandability, Readability, Changeability, Extensibility, Maintainability
  10. What if? What would you do with the keystrokes?
  11. Common good practices we can learn from the start.
  12. JS conventions.
  13. Smelly code sample about object construction.
  14. Separating object construction.
  15. How IE complicated our lives.
  16. Take a hike once and you’ll be terrified. Keep it up and you’ll know in-and-out about the jungle after a while.
  17. Nothing beats the code reviews.