SlideShare a Scribd company logo
1 of 63
Top 10 Things Admins Can Learn from Developers
(without learning to code)
DAN
APPLEMAN
#YeurDreamin2019
What do admins and developers do?
We solve problems and implement processes in Salesforce by customizing
metadata
#YeurDreamin2019
Yes, Code IS Metadata!
#YeurDreamin2019
What do admins and developers do?
We solve problems and implement processes in Salesforce by customizing
metadata
We all live in the same metadata
#YeurDreamin2019
Have you seen, heard of or experienced any of these?
• Someone changed something and broke something else.
• Fields that exist, but you don’t know why
• Workflows or processes that you don’t understand
• Try to deploy but unit tests are failing, and you don’t know why or when
they started failing
• Code on the org that exists but you don’t know what it does
• Try to figure out something you did a year ago and why?
• Can’t figure out who changed something, when and why.
#YeurDreamin2019
Declarative
• 20 years (but early years had less
complexity)
• Not much “formal” research
• How many admin+devs – 2 or 3
million success users, but we know
there are many duplicates…
Looking Back as an Admin
#YeurDreamin2019
Looking Back as a Software Developer
Software
• 73 years since ENIAC
• 25 million + software developers
• Extensive formal research
(professors, grad students,
corporate research, etc)
#YeurDreamin2019
We’re doing the same thing, but…
Declarative
• 20 years (but early years had less
complexity)
• Not much “formal” research
• How many admin+devs – 2 or 3
million success users, but we know
there are many duplicates…
Software
• 73 years since ENIAC
• 25 million + software developers
• Extensive formal research
(professors, grad students,
corporate research, etc)
#YeurDreamin2019
We’ve spent decades addressing these issues!
• Someone changed something and broke something else.
• Fields that exist, but you don’t know why
• Workflows or processes that you don’t understand
• Try to deploy but unit tests are failing, and you don’t know why or when
they started failing
• Code on the org that exists but you don’t know what it does
• Try to figure out something you did a year ago and why?
• Can’t figure out who changed something, when and why.
#YeurDreamin2019
Top 10 Things Admins Can Learn from Developers
(without learning to code)
• This isn’t about learning to code. Personally, I don’t think it makes sense
for admins to learn to code unless they love coding (reading code is
another matter).
• This is about taking the lessons of the software development word and
applying them to the admin/declarative world.
#YeurDreamin2019
#1 Application Lifecycle Cost
If you learn nothing else from this talk – learn this.
#YeurDreamin2019
Here’s how we do it…
Define the Requirements
Design the Solution
Implement the Solution
Test the Solution
Document the Solution
Maintain it over Time
#YeurDreamin2019
Here’s what it costs…
Define the Requirements
Design the Solution
Implement the Solution
Test the Solution
Document the Solution
Maintain it over Time 50-80%
#YeurDreamin2019
Maintenance is your largest cost
• May be even larger on SFDC
• Investing on faster coding is silly
• The practice of bringing in consultants to build stuff who then go away may
be a false economy – plan on a long-term relationship.
• Anything you do early in the project to reduce maintenance costs, is good.
#YeurDreamin2019
#2 Unit Tests Aren’t About Testing
They are about regression testing
#YeurDreamin2019
What is a Unit Test?
• It’s Apex code
• Its purpose is to test other code
• It does not change the state of the org
#YeurDreamin2019
#YeurDreamin2019
Unit Tests
• They aren’t about the initial test – you’re going to do manual testing
anyway. They are about detecting when someone breaks something –
maintenance!!!!
#YeurDreamin2019
#YeurDreamin2019
#3 Code Coverage Doesn’t Matter as much as you think
#YeurDreamin2019
Diminishing returns
• 100% code coverage means you’re probably wasting time
(with exceptions and trivialities)
• SFDC does code coverage because it’s the only thing you can measure!
• They need to actually test something (system asserts)
#YeurDreamin2019
Original Test
@istest
public static void TestLeadTriggerTest()
{
List<Lead> leads = [Select id, Status from Lead];
for(Lead ld: leads) ld.status = 'Working - Contacted’;
test.startTest();
update leads;
test.stopTest();
}
#YeurDreamin2019
Correct Test
@istest
public static void TestLeadTriggerTest()
{
List<Lead> leads = [Select id, Status from Lead];
for(Lead ld: leads) ld.status = 'Working - Contacted’;
test.startTest();
update leads;
test.stopTest();
List<Task> tasks =
[Select ID from Task where WhoId in :leads];
system.assertEquals(10, tasks.size());
}
#YeurDreamin2019
#YeurDreamin2019
@future
public static void LeadStatusChanged(List<ID> leadIds)
{
List<Lead> leads = [Select ID, Name, Status from Lead where ID in :leadIds];
List<Task> tasks = new List<Task>();
for(Lead ld: leads)
{
if(ld.status == 'Working - Contacted')
{
tasks.add(new Task(Description = ld.Name + ' is now working',
WhoId = ld.Id // Was WhatId = ld.Id
));
}
}
if(tasks.size()>0)
{
try {
insert tasks;
} catch (Exception ex) {
system.debug('Exception occurred');
system.debug(ex.getMessage());
}
}
#YeurDreamin2019
#YeurDreamin2019
#4 Test before Deployment
QA/Test orgs
#YeurDreamin2019
First the obvious
• Build on sandbox or scratch org, UAT org
• Run the unit tests
• Only then, deploy
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#5 Continuous Integration
#YeurDreamin2019
Automatic regression testing!
• The crazy super powerful techniques that you’ll be using in a few years…
• What you can do today
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#6 You Can Test More Than Code
You can even test declarative
#YeurDreamin2019
Apex code that tests a workflow
@istest
public class WorkingWorkflowTest {
static List<Lead> makeData(Integer daysOffset){
List<Lead> leads = new List<Lead>();
for(Integer x = 0; x<10; x++)
{
String leadname = 'ld' + string.valueOf(x);
leads.add(new Lead(FirstName = leadname, LastName = leadName,
Email = leadname + '@test.com’,
Company = leadname + 'company'));
}
insert leads;
for(Lead ld: leads)
Test.setCreatedDate(ld.id, DateTime.Now().addDays(daysOffset));
return leads;
}
#YeurDreamin2019
Apex code that tests a workflow
@istest
public static void testOldLeads()
{
List<Lead> leads = MakeData(-31);
for(Lead ld: leads) ld.status = 'Working - Contacted’;
test.startTest();
update leads;
test.stopTest();
List<Lead> updatedLeads = [Select Id, Status from Lead];
for(Lead ld: updatedLeads)
{
system.assertEquals('Working Harder', ld.status);
}
}
#YeurDreamin2019
Apex code that tests a workflow
@istest
public static void testNewerLeads()
{
List<Lead> leads = MakeData(-29);
for(Lead ld: leads) ld.status = 'Working - Contacted’;
test.startTest();
update leads;
test.stopTest();
List<Lead> updatedLeads = [Select Id, Status from Lead];
for(Lead ld: updatedLeads)
{
system.assertEquals('Working - Contacted', ld.status);
}
}
}
#YeurDreamin2019
#7 Source Control
#YeurDreamin2019
The bad old days
• Audit log
• Looking at modified dates
• Processes are better (supports versions)
#YeurDreamin2019
#YeurDreamin2019
Salesforce DX – git with it!
• Build, pull, deploy
• Detailed history
• Why did someone make that change? Who made it? When?
• Meanwhile – pull and commit!
#YeurDreamin2019
#YeurDreamin2019
#YeurDreamin2019
#8 Project Management
#YeurDreamin2019
Check out Jira
• Tasks
• Explanations – history
• Tied to source control – so complete history
#YeurDreamin2019
#YeurDreamin2019
Link to docs!
Link to code
changes
Comments below
#YeurDreamin2019
#YeurDreamin2019
#9 Comments Matter
#YeurDreamin2019
#YeurDreamin2019
Comments in formulas
• Add comments to formulas!
• Doesn’t count against compiled limit
#YeurDreamin2019
#10 Formulas are Code
Maybe it should be taught like it
#YeurDreamin2019
Learning Core Concepts
• If only the earth were flat…
• Boolean Algebra – you’re using it even if you don’t realize it
(wouldn’t you like to use it better)?
#YeurDreamin2019
#YeurDreamin2019
Have you seen, heard of or experienced any of these?
• Someone changed something and broke something else. (Unit tests)
• Fields that exist, but you don’t know why (In git)
• Workflows or processes that you don’t understand
(Comments, git and Jira)
• Try to deploy but unit tests are failing, and you don’t know why or when
they started failing (SFDX, Continuous Integration)
• Code on the org that exists but you don’t know what it does (git & Jira)
• Try to figure out something you did a year ago and why? (git & Jira)
• Can’t figure out who changed something, when and why. (git & Jira)
#YeurDreamin2019
#YeurDreamin2019
Join us for drinks
@18:00 sponsored
by
Community sponsors:
Thank you!
Dan Appleman
@danappleman
dan@desawarepublishing.com
http://advancedapex.com
http://advancedapex.com/testtracker
NonProfit-track sponsor:

More Related Content

What's hot

Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)Peter Kofler
 
Coderetreat - Practice to Master Your Crafts
Coderetreat - Practice to Master Your CraftsCoderetreat - Practice to Master Your Crafts
Coderetreat - Practice to Master Your CraftsLemi Orhan Ergin
 
How To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentHow To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentSven Peters
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersZeroTurnaround
 
The Seven Wastes of Software Development
The Seven Wastes of Software DevelopmentThe Seven Wastes of Software Development
The Seven Wastes of Software DevelopmentMatt Stine
 
Tdd 4 everyone full version
Tdd 4 everyone full versionTdd 4 everyone full version
Tdd 4 everyone full versionLior Israel
 
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)Radu Marinescu
 
Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Mikalai Alimenkou
 
Extreme & pair programming Slides ppt
Extreme & pair programming Slides pptExtreme & pair programming Slides ppt
Extreme & pair programming Slides pptMr SMAK
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Developmentjazoon13
 
Small Hyper-Productive Teams (IT Brunch)
Small Hyper-Productive Teams (IT Brunch)Small Hyper-Productive Teams (IT Brunch)
Small Hyper-Productive Teams (IT Brunch)Mikalai Alimenkou
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product releaseLaurent Cerveau
 
Move test planning before implementation
Move test planning before implementationMove test planning before implementation
Move test planning before implementationTed Cheng
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Dror Helper
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]Agile đây Vietnam
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven developmentAhmed El-Deeb
 
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, Bucharest
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, BucharestSandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, Bucharest
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, BucharestMozaic Works
 

What's hot (20)

Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)
 
Coderetreat - Practice to Master Your Crafts
Coderetreat - Practice to Master Your CraftsCoderetreat - Practice to Master Your Crafts
Coderetreat - Practice to Master Your Crafts
 
How To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentHow To Do Kick-Ass Software Development
How To Do Kick-Ass Software Development
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven Peters
 
The Seven Wastes of Software Development
The Seven Wastes of Software DevelopmentThe Seven Wastes of Software Development
The Seven Wastes of Software Development
 
Tdd 4 everyone full version
Tdd 4 everyone full versionTdd 4 everyone full version
Tdd 4 everyone full version
 
TesTrek Notes
TesTrek NotesTesTrek Notes
TesTrek Notes
 
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)
The Good the Bad and the Ugly of Dealing with Smelly Code (ITAKE Unconference)
 
Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?Development without Testers: Myth or Real Option?
Development without Testers: Myth or Real Option?
 
Extreme & pair programming Slides ppt
Extreme & pair programming Slides pptExtreme & pair programming Slides ppt
Extreme & pair programming Slides ppt
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
 
Small Hyper-Productive Teams (IT Brunch)
Small Hyper-Productive Teams (IT Brunch)Small Hyper-Productive Teams (IT Brunch)
Small Hyper-Productive Teams (IT Brunch)
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product release
 
Move test planning before implementation
Move test planning before implementationMove test planning before implementation
Move test planning before implementation
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
 
Binary crosswords
Binary crosswordsBinary crosswords
Binary crosswords
 
BBOM-AgilePT-2010
BBOM-AgilePT-2010BBOM-AgilePT-2010
BBOM-AgilePT-2010
 
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, Bucharest
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, BucharestSandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, Bucharest
Sandro Mancuso - Software Craftmanship @ I T.A.K.E. Unconference 2013, Bucharest
 

Similar to Top 10 Things Admins Can Learn from Developers (without learning to code)

Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Jason Tice
 
Experience with Salesforce DX on real project
Experience with Salesforce DX on real projectExperience with Salesforce DX on real project
Experience with Salesforce DX on real projectYeurDreamin'
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from IndustryGarth Gilmour
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! Nacho Cougil
 
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...CzechDreamin
 
Devops, Secops, Opsec, DevSec *ops *.* ?
Devops, Secops, Opsec, DevSec *ops *.* ?Devops, Secops, Opsec, DevSec *ops *.* ?
Devops, Secops, Opsec, DevSec *ops *.* ?Kris Buytaert
 
Django production
Django productionDjango production
Django productionpythonsd
 
Salesforce Wellington User Group - devops for admins by David Smith
Salesforce Wellington User Group - devops for admins by David SmithSalesforce Wellington User Group - devops for admins by David Smith
Salesforce Wellington User Group - devops for admins by David SmithAnna Loughnan Colquhoun
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit testTung Nguyen Thanh
 
Conquering Chaos: Helix & DevOps
Conquering Chaos: Helix & DevOpsConquering Chaos: Helix & DevOps
Conquering Chaos: Helix & DevOpsPerforce
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....Mike Harris
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)Nacho Cougil
 
Saleforce For Domino Dogs
Saleforce For Domino DogsSaleforce For Domino Dogs
Saleforce For Domino DogsMark Myers
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentShawn Jones
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)Peter Kofler
 
Generating unit tests based on user logs
Generating unit tests based on user logsGenerating unit tests based on user logs
Generating unit tests based on user logsRick Wicker
 
Unit testing
Unit testingUnit testing
Unit testingPiXeL16
 

Similar to Top 10 Things Admins Can Learn from Developers (without learning to code) (20)

Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Experience with Salesforce DX on real project
Experience with Salesforce DX on real projectExperience with Salesforce DX on real project
Experience with Salesforce DX on real project
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! 
 
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...
What (and why) Admins need to know about Unit Testing, Julio Fernandez & Dori...
 
Kku2011
Kku2011Kku2011
Kku2011
 
Kku2011
Kku2011Kku2011
Kku2011
 
Devops, Secops, Opsec, DevSec *ops *.* ?
Devops, Secops, Opsec, DevSec *ops *.* ?Devops, Secops, Opsec, DevSec *ops *.* ?
Devops, Secops, Opsec, DevSec *ops *.* ?
 
Django production
Django productionDjango production
Django production
 
Salesforce Wellington User Group - devops for admins by David Smith
Salesforce Wellington User Group - devops for admins by David SmithSalesforce Wellington User Group - devops for admins by David Smith
Salesforce Wellington User Group - devops for admins by David Smith
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit test
 
Conquering Chaos: Helix & DevOps
Conquering Chaos: Helix & DevOpsConquering Chaos: Helix & DevOps
Conquering Chaos: Helix & DevOps
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
Saleforce For Domino Dogs
Saleforce For Domino DogsSaleforce For Domino Dogs
Saleforce For Domino Dogs
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Generating unit tests based on user logs
Generating unit tests based on user logsGenerating unit tests based on user logs
Generating unit tests based on user logs
 
Unit testing
Unit testingUnit testing
Unit testing
 

More from YeurDreamin'

Discover Social Studio: The Product, The Use & The Connector
Discover Social Studio: The Product, The Use & The Connector	Discover Social Studio: The Product, The Use & The Connector
Discover Social Studio: The Product, The Use & The Connector YeurDreamin'
 
Your Salesforce toolbelt – Practical recommendations to keep your Org healthy
Your Salesforce toolbelt – Practical recommendations to keep your Org healthyYour Salesforce toolbelt – Practical recommendations to keep your Org healthy
Your Salesforce toolbelt – Practical recommendations to keep your Org healthyYeurDreamin'
 
Admins – You Can Code Too!
Admins – You Can Code Too!Admins – You Can Code Too!
Admins – You Can Code Too!YeurDreamin'
 
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...YeurDreamin'
 
Build Your Own Lightning Community in a Flash - part 2
Build Your Own Lightning Community in a Flash - part 2Build Your Own Lightning Community in a Flash - part 2
Build Your Own Lightning Community in a Flash - part 2YeurDreamin'
 
Clean Code Principles
Clean Code PrinciplesClean Code Principles
Clean Code PrinciplesYeurDreamin'
 
Build A Meaningful Network while elevating your Career – Getting the most out...
Build A Meaningful Network while elevating your Career – Getting the most out...Build A Meaningful Network while elevating your Career – Getting the most out...
Build A Meaningful Network while elevating your Career – Getting the most out...YeurDreamin'
 
From Food Truck Chef to Architect, My Salesforce Journey
From Food Truck Chef to Architect, My Salesforce JourneyFrom Food Truck Chef to Architect, My Salesforce Journey
From Food Truck Chef to Architect, My Salesforce JourneyYeurDreamin'
 
Supercharge your Salesforce with 10 Awesome tips & tricks
Supercharge your Salesforce with 10 Awesome tips & tricksSupercharge your Salesforce with 10 Awesome tips & tricks
Supercharge your Salesforce with 10 Awesome tips & tricksYeurDreamin'
 
Spectacular Specs and how to write them!
Spectacular Specs and how to write them!Spectacular Specs and how to write them!
Spectacular Specs and how to write them!YeurDreamin'
 
Set up Continuous Integration using SalesforceDX and Jenkins
Set up Continuous Integration using SalesforceDX and JenkinsSet up Continuous Integration using SalesforceDX and Jenkins
Set up Continuous Integration using SalesforceDX and JenkinsYeurDreamin'
 
Platform Events: How developers and admins work together to implement busines...
Platform Events: How developers and admins work together to implement busines...Platform Events: How developers and admins work together to implement busines...
Platform Events: How developers and admins work together to implement busines...YeurDreamin'
 
An Admin’s Guide to Workbench
An Admin’s Guide to WorkbenchAn Admin’s Guide to Workbench
An Admin’s Guide to WorkbenchYeurDreamin'
 
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...YeurDreamin'
 
How to monitor and prioritize epics of a Service Cloud implementation project...
How to monitor and prioritize epics of a Service Cloud implementation project...How to monitor and prioritize epics of a Service Cloud implementation project...
How to monitor and prioritize epics of a Service Cloud implementation project...YeurDreamin'
 
Prototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web ComponentsPrototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web ComponentsYeurDreamin'
 
Want your bank to trust you? You need a credit score. Want your customers to ...
Want your bank to trust you? You need a credit score. Want your customers to ...Want your bank to trust you? You need a credit score. Want your customers to ...
Want your bank to trust you? You need a credit score. Want your customers to ...YeurDreamin'
 

More from YeurDreamin' (18)

Discover Social Studio: The Product, The Use & The Connector
Discover Social Studio: The Product, The Use & The Connector	Discover Social Studio: The Product, The Use & The Connector
Discover Social Studio: The Product, The Use & The Connector
 
Your Salesforce toolbelt – Practical recommendations to keep your Org healthy
Your Salesforce toolbelt – Practical recommendations to keep your Org healthyYour Salesforce toolbelt – Practical recommendations to keep your Org healthy
Your Salesforce toolbelt – Practical recommendations to keep your Org healthy
 
Admins – You Can Code Too!
Admins – You Can Code Too!Admins – You Can Code Too!
Admins – You Can Code Too!
 
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...
Behind Every Device is a Customer. Learn how to connect IoT devices to Salesf...
 
Build Your Own Lightning Community in a Flash - part 2
Build Your Own Lightning Community in a Flash - part 2Build Your Own Lightning Community in a Flash - part 2
Build Your Own Lightning Community in a Flash - part 2
 
Clean Code Principles
Clean Code PrinciplesClean Code Principles
Clean Code Principles
 
Build A Meaningful Network while elevating your Career – Getting the most out...
Build A Meaningful Network while elevating your Career – Getting the most out...Build A Meaningful Network while elevating your Career – Getting the most out...
Build A Meaningful Network while elevating your Career – Getting the most out...
 
From Food Truck Chef to Architect, My Salesforce Journey
From Food Truck Chef to Architect, My Salesforce JourneyFrom Food Truck Chef to Architect, My Salesforce Journey
From Food Truck Chef to Architect, My Salesforce Journey
 
Supercharge your Salesforce with 10 Awesome tips & tricks
Supercharge your Salesforce with 10 Awesome tips & tricksSupercharge your Salesforce with 10 Awesome tips & tricks
Supercharge your Salesforce with 10 Awesome tips & tricks
 
Spectacular Specs and how to write them!
Spectacular Specs and how to write them!Spectacular Specs and how to write them!
Spectacular Specs and how to write them!
 
Set up Continuous Integration using SalesforceDX and Jenkins
Set up Continuous Integration using SalesforceDX and JenkinsSet up Continuous Integration using SalesforceDX and Jenkins
Set up Continuous Integration using SalesforceDX and Jenkins
 
Platform Events: How developers and admins work together to implement busines...
Platform Events: How developers and admins work together to implement busines...Platform Events: How developers and admins work together to implement busines...
Platform Events: How developers and admins work together to implement busines...
 
An Admin’s Guide to Workbench
An Admin’s Guide to WorkbenchAn Admin’s Guide to Workbench
An Admin’s Guide to Workbench
 
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...
10 Lessons of Salesforce Nonprofit implementations from a Customer and Integr...
 
How to monitor and prioritize epics of a Service Cloud implementation project...
How to monitor and prioritize epics of a Service Cloud implementation project...How to monitor and prioritize epics of a Service Cloud implementation project...
How to monitor and prioritize epics of a Service Cloud implementation project...
 
Prototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web ComponentsPrototyping UX Solutions with Playgrounds and Lightning Web Components
Prototyping UX Solutions with Playgrounds and Lightning Web Components
 
Want your bank to trust you? You need a credit score. Want your customers to ...
Want your bank to trust you? You need a credit score. Want your customers to ...Want your bank to trust you? You need a credit score. Want your customers to ...
Want your bank to trust you? You need a credit score. Want your customers to ...
 
Invocable methods
Invocable methodsInvocable methods
Invocable methods
 

Recently uploaded

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
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
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
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
 
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.
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
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
 

Recently uploaded (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
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)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
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
 
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...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
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
 

Top 10 Things Admins Can Learn from Developers (without learning to code)

  • 1. Top 10 Things Admins Can Learn from Developers (without learning to code) DAN APPLEMAN
  • 2. #YeurDreamin2019 What do admins and developers do? We solve problems and implement processes in Salesforce by customizing metadata
  • 4. #YeurDreamin2019 What do admins and developers do? We solve problems and implement processes in Salesforce by customizing metadata We all live in the same metadata
  • 5. #YeurDreamin2019 Have you seen, heard of or experienced any of these? • Someone changed something and broke something else. • Fields that exist, but you don’t know why • Workflows or processes that you don’t understand • Try to deploy but unit tests are failing, and you don’t know why or when they started failing • Code on the org that exists but you don’t know what it does • Try to figure out something you did a year ago and why? • Can’t figure out who changed something, when and why.
  • 6. #YeurDreamin2019 Declarative • 20 years (but early years had less complexity) • Not much “formal” research • How many admin+devs – 2 or 3 million success users, but we know there are many duplicates… Looking Back as an Admin
  • 7. #YeurDreamin2019 Looking Back as a Software Developer Software • 73 years since ENIAC • 25 million + software developers • Extensive formal research (professors, grad students, corporate research, etc)
  • 8. #YeurDreamin2019 We’re doing the same thing, but… Declarative • 20 years (but early years had less complexity) • Not much “formal” research • How many admin+devs – 2 or 3 million success users, but we know there are many duplicates… Software • 73 years since ENIAC • 25 million + software developers • Extensive formal research (professors, grad students, corporate research, etc)
  • 9. #YeurDreamin2019 We’ve spent decades addressing these issues! • Someone changed something and broke something else. • Fields that exist, but you don’t know why • Workflows or processes that you don’t understand • Try to deploy but unit tests are failing, and you don’t know why or when they started failing • Code on the org that exists but you don’t know what it does • Try to figure out something you did a year ago and why? • Can’t figure out who changed something, when and why.
  • 10. #YeurDreamin2019 Top 10 Things Admins Can Learn from Developers (without learning to code) • This isn’t about learning to code. Personally, I don’t think it makes sense for admins to learn to code unless they love coding (reading code is another matter). • This is about taking the lessons of the software development word and applying them to the admin/declarative world.
  • 11. #YeurDreamin2019 #1 Application Lifecycle Cost If you learn nothing else from this talk – learn this.
  • 12. #YeurDreamin2019 Here’s how we do it… Define the Requirements Design the Solution Implement the Solution Test the Solution Document the Solution Maintain it over Time
  • 13. #YeurDreamin2019 Here’s what it costs… Define the Requirements Design the Solution Implement the Solution Test the Solution Document the Solution Maintain it over Time 50-80%
  • 14. #YeurDreamin2019 Maintenance is your largest cost • May be even larger on SFDC • Investing on faster coding is silly • The practice of bringing in consultants to build stuff who then go away may be a false economy – plan on a long-term relationship. • Anything you do early in the project to reduce maintenance costs, is good.
  • 15. #YeurDreamin2019 #2 Unit Tests Aren’t About Testing They are about regression testing
  • 16. #YeurDreamin2019 What is a Unit Test? • It’s Apex code • Its purpose is to test other code • It does not change the state of the org
  • 18. #YeurDreamin2019 Unit Tests • They aren’t about the initial test – you’re going to do manual testing anyway. They are about detecting when someone breaks something – maintenance!!!!
  • 20. #YeurDreamin2019 #3 Code Coverage Doesn’t Matter as much as you think
  • 21. #YeurDreamin2019 Diminishing returns • 100% code coverage means you’re probably wasting time (with exceptions and trivialities) • SFDC does code coverage because it’s the only thing you can measure! • They need to actually test something (system asserts)
  • 22. #YeurDreamin2019 Original Test @istest public static void TestLeadTriggerTest() { List<Lead> leads = [Select id, Status from Lead]; for(Lead ld: leads) ld.status = 'Working - Contacted’; test.startTest(); update leads; test.stopTest(); }
  • 23. #YeurDreamin2019 Correct Test @istest public static void TestLeadTriggerTest() { List<Lead> leads = [Select id, Status from Lead]; for(Lead ld: leads) ld.status = 'Working - Contacted’; test.startTest(); update leads; test.stopTest(); List<Task> tasks = [Select ID from Task where WhoId in :leads]; system.assertEquals(10, tasks.size()); }
  • 25. #YeurDreamin2019 @future public static void LeadStatusChanged(List<ID> leadIds) { List<Lead> leads = [Select ID, Name, Status from Lead where ID in :leadIds]; List<Task> tasks = new List<Task>(); for(Lead ld: leads) { if(ld.status == 'Working - Contacted') { tasks.add(new Task(Description = ld.Name + ' is now working', WhoId = ld.Id // Was WhatId = ld.Id )); } } if(tasks.size()>0) { try { insert tasks; } catch (Exception ex) { system.debug('Exception occurred'); system.debug(ex.getMessage()); } }
  • 27. #YeurDreamin2019 #4 Test before Deployment QA/Test orgs
  • 28. #YeurDreamin2019 First the obvious • Build on sandbox or scratch org, UAT org • Run the unit tests • Only then, deploy
  • 33. #YeurDreamin2019 Automatic regression testing! • The crazy super powerful techniques that you’ll be using in a few years… • What you can do today
  • 40. #YeurDreamin2019 #6 You Can Test More Than Code You can even test declarative
  • 41. #YeurDreamin2019 Apex code that tests a workflow @istest public class WorkingWorkflowTest { static List<Lead> makeData(Integer daysOffset){ List<Lead> leads = new List<Lead>(); for(Integer x = 0; x<10; x++) { String leadname = 'ld' + string.valueOf(x); leads.add(new Lead(FirstName = leadname, LastName = leadName, Email = leadname + '@test.com’, Company = leadname + 'company')); } insert leads; for(Lead ld: leads) Test.setCreatedDate(ld.id, DateTime.Now().addDays(daysOffset)); return leads; }
  • 42. #YeurDreamin2019 Apex code that tests a workflow @istest public static void testOldLeads() { List<Lead> leads = MakeData(-31); for(Lead ld: leads) ld.status = 'Working - Contacted’; test.startTest(); update leads; test.stopTest(); List<Lead> updatedLeads = [Select Id, Status from Lead]; for(Lead ld: updatedLeads) { system.assertEquals('Working Harder', ld.status); } }
  • 43. #YeurDreamin2019 Apex code that tests a workflow @istest public static void testNewerLeads() { List<Lead> leads = MakeData(-29); for(Lead ld: leads) ld.status = 'Working - Contacted’; test.startTest(); update leads; test.stopTest(); List<Lead> updatedLeads = [Select Id, Status from Lead]; for(Lead ld: updatedLeads) { system.assertEquals('Working - Contacted', ld.status); } } }
  • 45. #YeurDreamin2019 The bad old days • Audit log • Looking at modified dates • Processes are better (supports versions)
  • 47. #YeurDreamin2019 Salesforce DX – git with it! • Build, pull, deploy • Detailed history • Why did someone make that change? Who made it? When? • Meanwhile – pull and commit!
  • 51. #YeurDreamin2019 Check out Jira • Tasks • Explanations – history • Tied to source control – so complete history
  • 53. #YeurDreamin2019 Link to docs! Link to code changes Comments below
  • 57. #YeurDreamin2019 Comments in formulas • Add comments to formulas! • Doesn’t count against compiled limit
  • 58. #YeurDreamin2019 #10 Formulas are Code Maybe it should be taught like it
  • 59. #YeurDreamin2019 Learning Core Concepts • If only the earth were flat… • Boolean Algebra – you’re using it even if you don’t realize it (wouldn’t you like to use it better)?
  • 61. #YeurDreamin2019 Have you seen, heard of or experienced any of these? • Someone changed something and broke something else. (Unit tests) • Fields that exist, but you don’t know why (In git) • Workflows or processes that you don’t understand (Comments, git and Jira) • Try to deploy but unit tests are failing, and you don’t know why or when they started failing (SFDX, Continuous Integration) • Code on the org that exists but you don’t know what it does (git & Jira) • Try to figure out something you did a year ago and why? (git & Jira) • Can’t figure out who changed something, when and why. (git & Jira)
  • 63. #YeurDreamin2019 Join us for drinks @18:00 sponsored by Community sponsors: Thank you! Dan Appleman @danappleman dan@desawarepublishing.com http://advancedapex.com http://advancedapex.com/testtracker NonProfit-track sponsor:

Editor's Notes

  1. Salesforce is a bit odd- because the line between admin and developer is a spectrum. Super admin/adminolper that does declarative. Even though they work in declarative and we work in code, we have more in common than not.
  2. WE do the same thing.
  3. Not only are we doing the same thing. We all live in the same metadata. So we better get along. But if it’s all the same, why should I, a software developer, have anything different or unique to share that might be helpful to admins?
  4. Quick survey Software developers deal with these exact issues.
  5. We may be doing the same things and have the same problems – we have an extra 50 years
  6. Some of the smart people, grad students with pHDs. Corporations working on giant projects – even building Salesforce itself – projects far greater than the largest Apex package. The problems are the same. The economics are the same – we’re doing the same thing. We’ve made a lot of progress..
  7. People often build from least to most important, we won’t.
  8. Replace with blocks. Note on waterfall vs. agile. Note if any components are missing, chances of failure increase dramatically. And let me note that most software projects do fail. Studies show failure rates of 50% to 90%.
  9. Burn this into your memory. Junior developers don’t believe it. Schools rarely teach it.
  10. I’ll explain in a minute
  11. There are other unit test technologies – especially with lightning, we’re going to ignore that for now.
  12. Show demo – here’s how you run a test. You can see it passed. You can see the code coverage – more on that later.
  13. But in order to do that they have to actually test something!
  14. I showed code coverage, but that was misleading.
  15. We have a trigger, that when you set status to working – contacted, it creates tasks.
  16. You’re not writing code, but an admin can learn to search for this pattern. System.assert or system.assertequals!
  17. Run the test with the assert, and it fails! But code coverage is still 100%!
  18. It passes this time – but look at the code coverage.
  19. This one most of us know. Not everyone, but most.
  20. Only your own, not others
  21. Code created tasks when lead status was working-contacted
  22. This workflow changes the status to Working Harder
  23. Run it, and it will fail
  24. We’re going to fix that workflow
  25. We fix the workflow – now how do we get it deployed?
  26. One command grabs changes, converts to metadata and deploys. Could also commit to source control
  27. Put error back setting delay to zero. What happens if we try to deploy now?
  28. This time the deployment fails It will help keep you out of trouble. You can build out a CI system today – but it’s early. And it requires governance and discipline and change or process – which aren’t easy.
  29. You can do this today. It won’t prevent you from breaking the build, but at least it will let you know when it happens.
  30. Crazy idea – but unit tests can be written to validate declarative. It makes no sense to do this if it’s just about testing the declarative, but it makes sense for CI! Based on lifecycle!
  31. God’s greatest gift
  32. Here’s the secret of how I even managed this demo!
  33. (Possible Demo – git – depends on timing)
  34. There’s a trail – git and github are two different things. I think it’s more important to understand git,
  35. (probably more of a look than a demo)
  36. People focus on project management for dev, but the real value is in later/maintenance
  37. (Demo)
  38. The technology to solve these problems exists or on Salesforce, is well on the way, though best practices are still evolving. The discipline and culture is the greater challenge. In the software development world we’ve finally reached the point that developers who don’t do these things aren’t taken seriously – don’t break the build is part of the culture. It took a ridiculously long time to reach this point. Many devs still don’t really understand the ramifications of the software dev lifecycle. But the fact that it’s early in SFDC means there’s lots of low hanging improvement – simple things you can do now for massive improvements.