#AntiPatterns

2025-01-30

Just a friendly reminder that infinite scroll is an anti-pattern, and that building ethical social media is about more than ownership, algorithms, and licensing: Respecting users' time and not replicating patterns deliberately designed to create addiction is equally important. indieweb.org/infinite_scroll

#mastodon #pixelfed #loops #fediverse #UX #UI #FOSS #FLOSS #AntiPattern #AntiPatterns

Justin D Kruger (he/him)jdavidnet@me.dm
2025-01-24

Yeah, #PGE, I use more energy than the average person because I actually charge my #PHEV. (unlike the average owner ).

You shouldn't shame people for reducing their carbon footprint.

Ditch the #AntiPattern and support people #DeCarbonizing

#UtilityReform #PublicPowerSF #ScottWiener #GavinNewsom #DanielLurie
#EnergyPolicy #EnergyCosts #Electricity #SolarPunk #SolarPower #CarbonFootprint #UX #AntiPatterns
#CA #SF #SanFrancisco #SFBay #NorCal

2024-12-02

Salesforce Flow Best Practices

Best practices in flow revolve around principles that enhance low-code quality, maintainability, and collaboration. Key practices include, but are not limited to, building clear and concise automation with meaningful resource names to improve readability and consistently adhering to standards for uniformity.

Overall, following best practices leads to more efficient and effective automation.

Antipatterns in flow refer to common practices or solutions that may seem beneficial but ultimately lead to poor software design, increased complexity, or maintenance challenges. They are the opposite of best practices and often arise from attempts to solve problems without fully understanding the implications. Recognizing and avoiding antipatterns is crucial for creating clean, efficient, and maintainable code.

While reviewing legacy flow automation is very different from reading and reviewing code, the visual builder flow canvas presents opportunities to spot antipatterns easily.

I gathered the antipatterns I have seen throughout the years and created a slide-set for a comprehensive list. This list is not meant to be the definitive list. I hope it will start fruitful discussions around the topic, which may yield better flow automation quality in the ecosystem.

This post will start a best-practice blog post series. Each item on the list will receive a comprehensive post, and I will link it to this master post upon completion.

Without further ado, let’s dive into the list:

  1. Can You After-Save When You Can Before-Save? Consider performing the same record updates in before-save flows.
  2. Can You Use DML or SOQL Inside the Loop? While there are situations where you may need to break the rule, DMLs and SOQLs (Create, Update, Delete, and Get) should be placed outside the loop.
  3. Is Your Salesforce Flow Too Big? Consider a modular approach and leverage subflows for an easily maintainable structure when your flow becomes too big.
  4. Can You Start With a Loop Inside Your Schedule-Triggered Flow? When you loop immediately after a start element with an object associated, you will loop for every record the flow launches on. This design is not often intended and will potentially generate faults.
  5. Can You Loop Inside a Loop? While this may be necessary in certain situations, it is often a sign of a weak design. Loops inside loops will cause a high number of iterations, hurting performance and usually yielding faults.
  6. Can You Start With a Decision Inside Your Record-Triggered Flow? Starting your record-triggered flow with a decision creates two or more distinct paths inside your automation, which you can split into multiple flows with tighter start element conditions. The latter often is the better-performing design.
  7. Formula Resources in Criteria Conditions—Yes or No? Instead of inserting formula resources in criteria for decisions and updates, you should consider building multi-line conditions combined with AND and OR operators.
  8. Can Your DMLs Have Criteria Conditions Other Than Id? Updates that include conditions beyond specifying the Id of the record consume one SOQL and one DML against your execution governor limits; ensure your condition is necessary.
  9. Can You Leave Unused Input and Output Variables? Mark your variables as available for input and output only when necessary for security reasons.
  10. Is Your System Context Usage Necessary? Heavy-handed use of system context without sharing can cause unwanted changes in your database. This increases the harm caused by a potential attacker running the flow.
  11. Should You Use Fault Paths? Your DMLs, SOQLs, and Actions need a fault path to ensure the whole transaction does not fail. Fault paths can offer custom messages and alternative routes, preventing complex system fault messages from being displayed to the user.
  12. Should You Use Roll Back Records In Screen Flows? Roll Back Record element provides a way for you to roll back the recent DMLs,  and ensures that half-baked record updates don’t persist in the database.
  13. Is Hardcoding Ids a Good Idea? Hardcoded Ids are potential points of failure especially when deploying flows between unconnected environments like scratch orgs.
  14. What Is The Best Way Of Checking Record Types in Record-Triggered Flows? You can check for record type developer name or name in your record-triggered flow start element without needing a get element inside your flow.
  15. Should You Hardcode Business Logic In Your Flow? If there is frequently changing business logic in your flow, the preferable approach is to build this on a table outside your flow and have SMEs update the reference table.
  16. Are Your HTTP Callouts and Outbound Messages on an Async Path? Salesforce requires integration messaging to execute on an async path. In schedule-triggered flows, the wait element provides a similar function.
  17. Is Your Flow Comparing and Processing Collections? When you go down into the related records, find junction objects, and perform enhanced operations with collections, you may be better off leveraging Apex.
  18. Are Your Email Actions on an Async Path? Perform email actions and create trivial object records for internal follow-up on an async path. This ensures that the main part of the execution does not slow down or stop due to performance or error reasons.
  19. Other Miscellaneous Items: Testing, naming, comments, documentation, null check etc.

Let’s start with the obvious: Build in the sandbox, debug, and test your flows very well. Create good documentation for your flows, add comments and descriptions, and follow naming conventions.

Here are the slides I created for this topic:

View and download Salesforce Flow Antipatterns and Best Practices here.

I presented these items at London’s Calling, Apex Hours, and Trailblazer User Group Meetings.

Everyone is welcome to comment on the blog posts, and I will read them and respond to them.

Explore related content:

6 Things You Can Do With The Transform Element

Top 9 Salesforce Winter 25 Flow Features

#AfterSave #Antipatterns #BeforeSave #Element #HowTo #Loop #Record #RecordTriggered #Update

This is the Flow Best Practices blog image
2024-11-05

I know two things for certain, I’m not a Java dev and Agile values “working software over comprehensive documentation”.

I also know the number of undocumented Deprecated annotations I see is making me angry.

#programming #development #java #antipatterns #Agile

2024-10-17

Every time a stakeholder asks for more information rather than decide. They're increasing waste and still spending money. The time and effort taken to gather the information is waste. In the absence of a decision, the team will still build something. Too bad it wasn't the highest value.

#PortfolioManagement #AntiPatterns

2024-10-04

As a web developer, it’s always mind-boggling just how often Mac-native apps include these unscrollable screens that fail to adapt to viewport dimensions, with an unreachable button at the base. Is there something about the SDKs that leads devs astray consistently? I’m sure I’ve also seen from Apple such #UserInterface #Antipatterns

Jérôme Petazzonijpetazzo@hachyderm.io
2024-09-05

Pour les copains, les copines, et les gens qui travaillent avec les #containers en général :

Mercredi 11 septembre, au #meetup #DeezerTech à #Bordeaux, je parlerai d'#antipatterns sur la construction des images de containers !

meetup.com/fr-FR/deezertech/ev

Images trop grosses, trop petites, builds trop lents... On verra quand/pourquoi c'est un problème, comment le corriger, avec plein de trucs&astuces pertinents pour les gens qui bossent avec #Docker et/ou #Kubernetes.

Viendez nombreuxes ! 😁

2024-07-24

London’s Calling and Antipatterns to Look For in Flow

What is London’s Calling?

London’s Calling is one of the most significant Dreamin’ events in the Salesforce ecosystem. Its unique feature is that most sessions are recorded. I can find recordings of the sessions from 2016 to 2023 on its website.

London’s Calling is a massive event with a packed agenda; 8 sessions are running in parallel. Attending the sessions that are important to you is a hassle. Especially if you are presenting, you may miss a few time slots getting ready before and winding down after your session.

This year, most sessions were live-streamed. Participants could buy in-person tickets that sold out a few days before the event or online tickets that allowed them to watch the sessions on live-stream.

Antipatterns

I have been thinking about creating content around flow antipatterns for some time now. I wanted to give everybody a guide on visual cues that show them potential issues with flows. London’s Calling allowed me to finish my content and present it to the ecosystem. The recording for my session, Architect Automated Solutions for Real World Antipatterns, is now available online for ticket holders. I will present this content virtually in the coming days at community group events. If you want to see it, you will have plenty of opportunities.

Which sessions did I see this year?

Enough about my own content! What did I learn?

I still managed to catch up with folks I had never met and saw a few I had met before at other events. I missed a few people, but I made new friends, as well.

Overall, it was a fun and fantastic event. I thank the organizers, Louise Lockie, Francis Pindar, Kerry Townsend, Todd Halfpenny, and Jade Hawken, as well as the sponsors, the presenters, and the participants.

Explore related content:

“Is Salesforce Dead?” at Architect Dreamin

Wir sind Ohana: First Community-Led Dreamin’ Event in Germany

TrailblazerDX 2024 Unveiled: Salesforce’s AI Evolution and Data Cloud Frontier

#Antipatterns #Architect #Automation #Community #London #Salesforce #Trailblazer

2024-07-10

Folks - don't do this. It breaks your customer relationship and in this case it slows down a workflow so badly (screenshot, save to desktop, upload, delete from desktop... really?)

You don't need to re-invent the wheel. There's so many text editors in existence that tackle this. It's a staple element with an expected behaviour.

I'm so upset 😅🤯

#ux #butwhy #antipatterns #Basecamp #projectmanagement

2024-06-12

This list of "misuse(s) of agile" looks spot on to me. There is no discussion of story points or similar in it, but I'm sure a lot of haters of "agile" could easily trace some of their observed bullshit back to these anti-patterns.

agilefederation.com/blogs/news #agile #antipatterns

2024-05-08

Slop: “…not all AI-generated content is slop. But if it’s mindlessly generated and thrust upon someone who didn’t ask for it, slop is the perfect term for it.”
simonwillison.net/2024/May/8/s
#antipatterns #ai #LLM #slop

2024-05-02

Totally Valid - The Daily WTF

The real WTF is that in languages with truthiness, this code may actually be useful- converting a falsey value to a literal false. But in C#, this is both useless and stupid.

thedailywtf.com/articles/total

#programming_humor #programming #antipatterns #WTF

2024-04-11

It’s @elle exposing anti-patterns in Rails.

Elle knows what we’ve all been up to 😉, and with much generosity brings tips to brush our apps off and make everything better.

#rubyconfau #rubyonrails #rails #antipatterns #refactoring #cleancode

2024-03-05

The Daily #WTF: Curious Perversions in Information Technology

Founded in 2004 by Alex Papadimoulis, The Daily WTF is a how-not-to guide for developing software. It recounts tales of disastrous development, from project management gone spectacularly bad to inexplicable coding choices.

thedailywtf.com/

#antipatterns #softwaredevelopment #SoftwareManagement #SoftwareEngineering #Informationtechnology #programming

Craig Sailasaila
2024-02-29

(or ) riddle the digital landscape in a short-term effort to lift business metrics — but in the end , they usually fail wot work as they erode people's trust in the experience

Avoiding their use is hard, tho and I found this piece to be a good refreshed on the things a can do to discourage their use

raw.studio/blog/designing-with

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst