● THE SALESFORCE DEVELOPER'S NOTEBOOK

Better Apex.
One good pattern
at a time.

Practical tips, clear examples, and a little more confidence in the code you ship.

Explore the articles
Made for curious Salesforce developers.
THE PATTERN TO START WITHNOTE 001
A better way to bulkifyAPEX
// A little structure goes a long way.
Set<Id> accountIds = new Set<Id>();
for (Contact person : Trigger.new) {
    accountIds.add(person.AccountId);
}

// Query once. Work with the whole set.
Map<Id, Account> accounts = new Map<Id, Account>([
    SELECT Id, Name FROM Account
    WHERE Id IN :accountIds
    WITH USER_MODE
]);
FUNDAMENTALS · 4 MIN READ

Think in collections.
Your future self will thank you.

01 Patterns you can understand02 Examples you can explore03 Details that make a difference
THE FIELD NOTES

A few ideas worth keeping.

Start with a topic.
Leave with something useful.

Fundamentals/01

Think in collections. Write bulk-safe Apex.

A small shift in how you query, loop, and save can make your code ready for more than a single record.

4 min read
Security/02

Make your Apex permissions explicit.

Sharing, object permissions, and field access answer different questions. Make each choice visible in your code.

3 min read
Testing/03

Write tests that tell you what broke.

Use deliberate fixtures, a focused execution window, and assertions that explain the behavior you care about.

4 min read
Async Apex/04

Give your Queueable jobs a clear purpose.

Pass a bounded set of IDs, make the work repeatable, and keep the job ID so you can follow what happened.

4 min read
LESS MAGIC. MORE UNDERSTANDING.

Good code starts
with a good question.

What happens with 200 records? Which permissions apply? What would make this test fail? We work through the small questions that lead to more thoughtful Apex.

01 /

Learn the reason behind the pattern.

Short articles that explain the decision, alongside the code.

02 /

Try it in a practice org.

Teaching examples, with context and edge cases to explore.

03 /

Go straight to the source.

Official Salesforce references for a deeper understanding.