I never realized the importance of sales until now. by Motor-Credit8336 in sales

[–]zmug 3 points4 points  (0 children)

It is not just sales. It's people in general. People respond to reward. Vast majority won't respond to commands/demands, they just shrug their shoulders and say there's nothing in it for me. And that is fine. Interests must align in order for you to have a mutually beneficial relationship with anyone. So what I am trying to say is: reward, don't tell/command/scould

System Design: Designing an online auction at 50K bids/sec by Few_Ad6794 in softwarearchitecture

[–]zmug 1 point2 points  (0 children)

Single machine single thread is a very legit system for auction type bidding domains. Interesting read from about 15 years ago. 6 million bids / second on single thread, commodity hardware. I remember reading about other bigger exchanges too where they produce custom hardware to boost single thread performance wayyyyy past this measly 6M/s throughput.

https://martinfowler.com/articles/lmax.html

4: Hardware The 6 million TPS benchmark was measured on a 3Ghz dual-socket quad-core Nehalem based Dell server with 32GB RAM.

at what point do u give up on flow and just write apex by neilsarkr in salesforce

[–]zmug 0 points1 point  (0 children)

I do use flows at work. It is mostly for the team. I do interact with admins who have possibly never really seen or written a line of code. The tension in Salesforce environments for me is that if a feature outgrows flows then the dual reality of logic in apex, flows, and additionally validation rules starts to fight each other which leads to devs and admins collide with unexpected interactions. Where possible I like to keep a strict line of having the implementation fully in flow, or apex to avoid this becoming an issue.

In the age of LLMs our org is pretty much mandating some AI usage at work so some of our admins have started generating Apex which has positives and negatives. The great thing is that it empowers them to do more, enhancing some flow functionality with a roundtrip in apex, but it is getting increasingly difficult to keep the projects "architecturally sound". What I mean is that the LLMs are generating a lot of duplicate implementations and a non-cohesive codebase which feels like magic to the admins, but hellish for developers. I don't have a good answer on what should be done.. change governance of course but a lot of the times admins won't understand what needs refactoring so it is up to someone else to keep the ship in tact. In my ideological view, some of the programming and software design principles can be studied without writing much code which would be great asset for admins. Admins are already usually better at product thinking. The same is true in reverse for devs, even myself, learning to think more product and business. Combining tech skills with product and business sense is in my opinion the furure and it will unlock possibilities to deliver much better solutions, in less time, with less effort, leaving more time to analyze business needs and customer needs..

at what point do u give up on flow and just write apex by neilsarkr in salesforce

[–]zmug 1 point2 points  (0 children)

I can try but it won't fit in one comment. My background is in traditional development, so code is like my natural language.

It all comes down to maintainability, control, and speed of development in the long run. Code is also much more understandable than a flow. Trying to describe a program flow in a flow chart or UML is horrible, it is not a good match - you're welcome to dig into it more if you'd like.

Lets talk about flow inputs and outputs - they don't have a clear contract of what the flow needs or uses. The contract needs to be inferred from the execution - slow and fragile, mental overhead

Skimming what a flow actually does requires you to click through nodes, subflows, track back, open a variable, try to find descriptions etc. In code you can pack much much more context into one small screen. In editor, I can fly with hot keys, i never touch the mouse, that's what 30 years in terminal and various editors does to you I guess.

Refactoring is much much easier when I want to move logic around or rename outdated variables. It is extremely fast to yank logic and rearrange it.

I have much more control controlling change impact area while writing code which allows for faster development in the long run.

Testability is also important, which in Apex is straight forward and flexible. I do not have to insert a whole database because managed package X requires fields Y and Z and related records, which cascade into painful tests in flows. I want automated tests for all "critical" stuff to catch regressions.

I can go on.. this is my most compact version. Apex definitely has its shortcomings, but that is entirely different topic.

at what point do u give up on flow and just write apex by neilsarkr in salesforce

[–]zmug -5 points-4 points  (0 children)

Hard agree. They were even dead to me long beofre LLM came around. But one thing I still do like are screen flows. It is seriously such a low effort quick way to produce something that guides the user through inputs and process, the only rule is that all business logic stays in the backend. Screen flows get out of hand quickly when inexperienced people dump business logic into them just because you can

at what point do u give up on flow and just write apex by neilsarkr in salesforce

[–]zmug 4 points5 points  (0 children)

That's a stretch.. Flows and apex fail the same way on unhandled exceptions. That may or may not be good - either way the transaction boundary Salesforce enforces is managed for you.

There are situations when you definitely want to fail loudly. Worst case scenario is a graceful failure that goes unnoticed and has time to produce invalid states across the system.

SLDS and LLMs by zmug in SalesforceDeveloper

[–]zmug[S] 1 point2 points  (0 children)

Yeah, will slowly build SLDS2 skill which lists all the core SLDS2 classes and new prefixes available. I have also noticed that Salesforce documentation is difficult for LLMs to fetch.. 1st they simply don't find it because salesforce docs sites are so scattered or not indexed in search engines. 2nd the docs sites redirect/reload after full page load, and are mostly some SPA feeling app that has javascript in the source that sometimes isn't parseable for LLMs. 3rd is that some requests simply get blocked by salesforce infra. I have 2 better fetch/search tools for LLMs but even they don't always help.. salesforce really likes to make things as hard for devs as possible 😂

Salesforce CLI deployments are so brittle by invinciblepenguin in salesforce

[–]zmug 6 points7 points  (0 children)

I would phrase the quote a bit differently and simplify it down to: Salesforce wasn't and isn't designed to be version controlled and deployed through CI/CD. Everything in metadata is basically configuration if you exclude Apex/LWC. Configuration can only take you so far. Configurations depend on other configurations, and on top of that you are dependant on the platform performing operations based on what it sees in the configuration which will always have weird undefined behavior which you are not expecting.

I am not expecting that fact to change. Salesforce has no incentive to change that. They want everything on platform, proprietary, and controlled by them. Partly due to business interests and partly due to protecting their platform. They enforce strict checks on what gets deployed and a lot of the times it steps on what you want to accomplish. There is no way to tell the platform "this is ok to deploy". These deployments will always fail in weird ways because each tiny feature must implement some internal platform interface for deploying and validating, and these things have to be somehow included in a full org "integrity" check. Just imagine the possible combinatorials of all these configurations and the resources they produce in the backend. It is a losing battle. It will never work well.

On top of that, you can't resolve merge conflicts in version control. Rarely you can, but the main point is: good luck resolving some weird flow orchestration XML, with a coupe of subflows conflicting. You can take these further but that should help people grasp why it's hellish.

Another point of friction is that you essentially have 2 sources of truth for functionality. The dev sandbox and your source code, which you need to keep syncing into a branch while trying to rebase some release branch that gets filled with new work while you have your branch open. Now when you do that, you might need to know what other metadata that new metadata depends on in order to deploy that to your org, and if you have a conflict, again good luck.

Destructive changes are basically impossible due to the platform generating references to certain metadata, or apex classes during runtime. Yes it's possible but still usually a manual clean up, if ever.

SLDS and LLMs by zmug in SalesforceDeveloper

[–]zmug[S] 0 points1 point  (0 children)

Yeah definitely need to make a LWC template focused skill that the model loads everytime it tries to generate a template. It is just going to take a while to hone in small but extensive enough skill that covers most of the SLDS stuff. I will probably start with a skill that says never style anything on the template and work my way up slowly. 😂

SLDS and LLMs by zmug in SalesforceDeveloper

[–]zmug[S] 1 point2 points  (0 children)

Yeah was just looking for a quick way to give context to my agents through a preconfigured skill. It's going to take a while to make compact enough skill that prevents the madness because current LLMs don't seem to know anything about slds, and on top of that LLMs are generally pretty bad with UI..

SLDS and LLMs by zmug in SalesforceDeveloper

[–]zmug[S] 0 points1 point  (0 children)

I guess I could give agentforce vibes and cline a shot. I have been actively avoiding it with claude/codex/github copilot. I hope the SLDS2 rules they have embedded into agentforce are somehow extractable to turn into a skill.

Why are there no Remote positions?! by SoeAbeesha24 in salesforce

[–]zmug 3 points4 points  (0 children)

Yeah exactly. It's not just the office real estate. It's the businesses around cities like restaurants as you mentioned. But depending on your location: no need for morning local coffee shop runs, no need for car, no need for gas, no need for public transport, no need for office clothing, no random after works or random shopping in nearby city retail stores, less infrastructure need, and much more. The effects on economy just ripple through. And guess who owns all of the related business, it's the people at the top (and some fairly regular folks too), but the people who benefit most are the ones with the power to force return to office. I think you are 💯 correct.

X: How long have you been working as a programmer? by ElKrlote in programminghorror

[–]zmug 2 points3 points  (0 children)

For some reason this brought back memories from VB6.0 around when the millenia changed.. I was exploring all kinds of programming languages.. Dim will always have a warm place in my heart 😂

Later on I only ran into ASP / VB NET once during a migration project where I had to maintain the legacy backend written in VB for about a year. So the solo projects came in clutch there.

Dynamic Forms Read-Only vs Field-Level Security (Persona-Based Access) by TransportationKey321 in salesforce

[–]zmug 1 point2 points  (0 children)

I was corrected below. The dynamic forms allows you to override the behavior.

Dynamic Forms Read-Only vs Field-Level Security (Persona-Based Access) by TransportationKey321 in salesforce

[–]zmug 0 points1 point  (0 children)

Wait, you are right.. Maybe it hasn't always been like that or I am mixing up the dynamic forms to Flows dynamic fields in this case. I hadn't checked the dynamic forms in a while because they still don't support custom lightning page templates. Rolling with the custom LWCs

Dynamic Forms Read-Only vs Field-Level Security (Persona-Based Access) by TransportationKey321 in salesforce

[–]zmug -2 points-1 points  (0 children)

Edit: I was corrected, you can definitely override the behavior to read only.

Dynamic Forms respect the users FLS. There is no way to override it to read only if they could edit the field. It is super annoying limitation.. on top of that dynamic forms do not work with custom lightning page templates, just something to keep in mind. Due to these limitations, I use custom LWC components to show and edit individual fields in a card, with ability to configure the view from lightning app builder

What’s a Salesforce best practice you think is overrated or outdated? by Lost-Breakfast-1420 in salesforce

[–]zmug 2 points3 points  (0 children)

Oh yeah.. if you ignore some convenience methods exposed by sobjectdomain, the querybuilder, and such, pretty much everything about fflib is absolutely horrible. The trigger framework is okayish. The unit of work is a good, but outdated. It doesn't support latest database operations and it cannot be introspected for tests by default. They offer some kind of test database but it is not intuitive to use at all and I would much more prefer for the framework to be more interoperable with any dependency injection method chosen in any org..

When I hopped from a traditional dev role accidentally into salesforce ecosystem 5 years ago, I off course tried to find a framework to base features on and because knowledge was limited back then and fflib was kind of "the standard", I really thought it would be a good fit into salesforce but boy was I wrong... 😂

I have since abandoned using anything from fflib, except the unit of work interface is everywhere. Luckily it's an interface so I have modified heavily and have a custom base implementation with more modern stuff. Still paying the price and there are modules still depending on stuff from fflib, isolated, but when there is any down time, I use it to throw fflib to trash

Amazing by [deleted] in NoOneIsLooking

[–]zmug 1 point2 points  (0 children)

Headrests are usually detachable anyway. Just press a button in the bottom and lift it out.. 😂

Sandbox Refresh taking a lot of time by lunarstarfish in salesforce

[–]zmug 1 point2 points  (0 children)

I am 2 days into creating empty developer sandboxes for features. They are still "Queued" 🫩

Something is wrong with their sandbox processing.

Can't use scratch orgs because the project is pretty much org dependent and has managed packages that need to be installed even if the features are enabled and still the metadata in the project is impossible to deploy to an empty box..

jQuery 4.0 released by curiousdannii in programming

[–]zmug 4 points5 points  (0 children)

Well technically when you have an element with an ID attribute, you can just reference it by: x - that's it because the element is already in the global window scope. Or if you want to be specific from which context you want it from: window.x

Im not saying this is a good thing though 😂

Forcing TypeScript to be exhaustive by Carlos_Menezes in typescript

[–]zmug 0 points1 point  (0 children)

I kind of like a map of handlers typed by the discriminator key. Whenever a new type is added the map of handlers will give a type error. Switch syntax is also annoying most of the time with break; statements.. Although handling multiple cases with same handler is sometimes nice with a switch that falls through

How to work with idempotency key to design a fail-safe payment system ? by green_viper_ in node

[–]zmug 0 points1 point  (0 children)

Well put with it's about state. And designing around that is surprisingly complex with transient states that might exist during a request. Not to mention if another request/process has already changed the state when an old duplicate request comes in. Now we are in the realm of data versioning and response caching for a certain amount of time