One of the best things that can happen in a developer's career is a brutal code review. But it's crucial that you don't walk away feeling like a loser! Instead, we need to learn not only how to avoid the same mistakes in the future, but also how to give a code review. Join Ryan Headley of Salesforce.org (http://salesforce.org/) and Kevin Poorman as they look at some classic and subtle bugs through the lens of a code review, aiming not only to help developers identify issues, but also how to conduct code reviews in a constructive manner.
Code live with ryan headley code reviews done right
1. Live Coding with Salesforce Developers
Oct 24, 2019
Code Reviews for fun and commit
with Ryan Headley and Kevin Poorman
2. Have Questions?
● Don’t wait until the end to ask your question!
● Technical support will answer questions starting now.
● Respect Q&A etiquette
● No need to repeat questions. The support team is working their way
down the queue.
● Please take the pop-up survey at the end of the webinar.
● Close out of the webinar and rejoin if you experience audio/visual issues.
3. This session is being recorded! The video will be posted to YouTube & the
session recap page (same URL as registration).
Salesforce Developers
Salesforce Developers
Salesforce Developers
@salesforcedevs
Go Social
4. This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the
assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we
make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber
growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief,
any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new
products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays
in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the
immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth,
new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger
enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form
10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important
disclosures are available on the SEC Filings section of the Investor Information section of our Website.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be
delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Statement under the Private Securities Litigation Reform Act of 1995
Forward-Looking Statement
5. Introductions
What’s a code review?
Why code review?
What to ask?
Let’s do a code review
Recap
Talking about what we’re gonna talk about. #meta
What’re we coding today?
6. Ryan Headley
Developer Evangelist, Salesforce.com
I like sloths.
Live Coding with Ryan Headley & Kevin Poorman
Kevin Poorman @codefriar
Lead Member of Technical Staff, Education Data
Architecture, Salesforce.org
Fronts everyone’s favorite band: Apex and the
Limits
7. Code Review
Process of asking questions
Not intended to shame
Others’ code
Everyone knows they should, but ….
9. Code Review
Does this code compile without PMD warnings?
Does this code have meaningful test coverage?
Do all tests have asserts?
Does the code reference or use any PII that is not bound by runtime CRUD/FLS checks?
Do any triggers contain logic?
Does this code refactor?
Questions to ask - a non exhaustive list
11. This way to the code
In case Kevin forgets, this is where we (finally) get away
from the slides and to the coding bits.
12. Today we
Used Github’s built in code review system
Identified a few issues
Left mentoring comments
Read through a bunch of code
13. Key Takeaways
You should do code reviews to Catch, Learn and Mentor.
There are plenty of tools for code reviews, but at a minimum, just walk through the code while
sitting next to a the developer.
Ask more questions, and be open to unexpected answers.
Remember this!
15. Next week on #CodeLive
Until then, catch up on previous episodes
Building a LWC Mobile app to track the best halloween candy stops with Adam Daw
Until then, hit https://trailhead.salesforce.com for past episode videos!
Do you have what it takes to defeat Iron Coder Winkelmeyer?
http://bit.ly/2MuPDTd
16. Q & A
Try Trailhead: trailhead.salesforce.com
Join the conversation: @salesforcedevs
17. Survey
Your feedback is crucial to the success of our
programs. Please fill out the survey at
the end of this session. Thank you!