It's never too soon (or too late) to test our understanding of programming fundamentals. In this post, I want to explore two very simple benchmarking tests that show how small platform changes can lead to large speed improvements. First, I'll walk you through some code you might remember from Sorting & Performance In Apex to show off how the existing enhancements made to sorting in Winter '24 have led to major sorting performance enhancements. Secondly, we'll take a look at the upcoming suppo...| www.jamessimone.net
Following up on the Object-Oriented Basics post, this time we switch our attention to interfaces and abstract classes - when to use them, when to avoid them, and how to distinguish between them. Learn all about what makes an interface successful, how to consolidate logic in abstract classes, and more!| www.jamessimone.net
Expressing intent through naming is a challenge, but well-named methods can help to expose even the most complicated of programming mechanisms. In programming, as in life, context is key - let's explore how naming can elevate the intent and rationale behind code! Whether you're just beginning your programming journey or you're a veteran programmer of many years, it's my hope that there's something in this post for everybody.| www.jamessimone.net
Learn how to implement the Fisher-Yates / Knuth random sort or shuffling algorithm in order to select random elements out of a list in this entry from the Joys Of Apex. Revisit some older code and watch as it gets spruced up with the help of algorithms and hindsight to produce a better version than existed previously. How often do you revisit old code?| www.jamessimone.net
So-called Lazy evaluated functions have their actual execution delayed until a terminator function is called. It's common for lazy functions to be chained together using fluent interfaces, culminating with actions being performed when the terminator function is called. What can Salesforce developers writing Apex code stand to gain by learning more about lazy functions? Fluent interfaces -- or objects that return themselves during function calls -- also tend to satisfy one of the prerequisites...| www.jamessimone.net
The abstract enum class in Apex can be very helpful as a class-like object, but there are a few things you should keep in mind to avoid getting bitten by the use of enums.| www.jamessimone.net