Author: Aidan Harding

Philosophy, Challenges, and Opportunities of DevOps on Salesforce

 

DevOps on Salesforce is not simple. But why does it have to be so complex? If we go back to the beginning and think about the philosophy of DevOps, it reminds us of what we’re actually trying to achieve. It helps us to understand which scenarios demand layers of tools and processes, and which scenarios can be solved simply. It also highlights the opportunities: What can we gain by adopting these practices?

Continue reading “Philosophy, Challenges, and Opportunities of DevOps on Salesforce”

What do the diffs in a GitHub Pull Request actually tell you?

You’re reviewing a Pull Request (PR) on GitHub. You see a list of diffs from the files changed in the PR. But what, precisely, do the diffs represent? I had a model for this in my head. Recently, I was forced to realise that my model must be wrong. Reviewing a PR started me on a journey into “two-dot” and “three-dot” diffs in git. That journey updated my mental model for GitHub and I hope that it will also be a useful lesson for you when you are working with PRs on GitHub yourself.

Continue reading “What do the diffs in a GitHub Pull Request actually tell you?”

Code Sharing With Classes in LWC

There are some well-established methods for code sharing in LWC: We can compose entire UI components in the HTML template, or via Lightning App Builder. Or we can create a service component, and then export functions from that component (see the Developer Guide). But sometimes neither of those is appropriate

Continue reading “Code Sharing With Classes in LWC”

Flow for Developers

Rivers, and paddling them in a canoe, can teach you important lessons about going with the flow. You’re never going to successfully paddle upstream against the Yukon (trust me – I’ve been there). Poor communication with a tandem canoe partner can make you both end up swimming. If you get pinned sideways, you must lean in to the obstacle.

The most important lesson, though, is the first one: Go with the flow. Let the river guide you. Work together to get the boat where it needs to be. All that power, blended with a bit of control, can have beautiful results.

Continue reading “Flow for Developers”

From Draft to Finished in Apex

Paul Gardner said “A painting is never finished. It simply stops in interesting places”.

This is 100% true of code. The finish is not the most important thing – when we seek to learn by looking at code, the steps along the way say much more than the end-product alone.

So, as I created a self-contained piece of Apex for a project, I thought that I would git-commit every step. I don’t claim that this code is perfect, but I hope that, by showing my working, it might stimulate thought/discussion. It certainly made me think about the reasons for each step, from draft to finish, more than I otherwise would have.

Continue reading “From Draft to Finished in Apex”

Debugging For Salesforce Developers

A bug has been reported in production and there’s no obvious path to the problem. What are you going to do? A build process is failing and the errors make no sense. What are you going to do? A report is showing you things in the data that just shouldn’t happen. What are you going to do?

Continue reading “Debugging For Salesforce Developers”

Using Lazy Evaluation to Write Salesforce Apex Code Without For-Loops

Functions or for-loops?

A developer working in Javascript has access to some really convenient functions on Arrays. Functions like filter() and map()  can avoid the need to write for-loops. Is this actually a good thing? Can we write Apex this way?

Continue reading “Using Lazy Evaluation to Write Salesforce Apex Code Without For-Loops”