83
Factory factory factory (factoryfactoryfactory.net)
top 9 comments
sorted by: hot top controversial new old
[-] _pi@lemmy.ml 16 points 1 month ago* (last edited 1 month ago)

Factory factory...n is literally just creating an OOP closure for when your language doesn't support first class functions, closures and/or currying.

Also metaprogramming and abstraction is literally the only way to actually manage and deal with the capriciousness of your stakeholders.

It's not simple, because it's literally not that simple. It's Conway's Law. That's what being a programmer in the industry is. I run a platform team, and I get paid because I can organize and deal with technical risk and contingency better than anyone else at my company. You bet your ass I do metaprogramming.

Also my product itself is a factory factory factory. Users create processes to author content, author content, and that content is delivered to other users. All in the same system. Managing complexity is extremely important if you want to work on interesting things.

"And this is the way everyone is doing it now? Everyone is using a general-purpose tool-building factory factory factory now, whenever they need a hammer?"

I've had this exact conversation with a programmer who was retiring. He was complaining that I ask too much because I told him that he needed a more generic way to represent the logic that encodes how our end-users traverse the content that our authoring users create and manage. He literally said something to the effect of the above quote to me, but as complaining contempt.

The business explicitly doesn't want to spend money crafting individual code bases and products and unique logic. Our system lives and dies by our ability to service our internal clients and meet their needs in a dynamic manner. We need manage each factory layer carefully because very often different clients want two different things at two different times, and so each decision needs to be encoded in a way that allows us to make future platform changes without having to sell the business on refactors.

Sure you'll run into people who overuse things when it could be simpler from the business perspective. But the reality is that most programmers in the industry have never stepped foot into a well run shop. Most programmers in the industry haven't actually launched a product tip to tail.

It's very easy to criticize patterns when you don't actually have to use them, you've never seen them being used properly, and you don't know how and when to implement them.

You don't know how many times I've had to explain what two phase migration means and how to do them across multiple dependency links in the chain.

[-] propter_hog@hexbear.net 2 points 1 month ago

Bingo. We didn't invent complicated systems for shits and giggles. Reuse is king, and abstracted code is reusable code.

[-] riskable@programming.dev -2 points 1 month ago

Sounds sooooo second class to me. I only deal with first class languages so I can enjoy my curry with a satisfying closure ๐ŸŽฉ ๐Ÿ‘Œ

[-] _pi@lemmy.ml 1 points 1 month ago* (last edited 1 month ago)

first class languages

So like Racket/Scheme and like maybe Ruby?

[-] tetris11@lemmy.ml 9 points 1 month ago

If nails were standardised then yeah all this would be overkill. But new nails and heck, wood types are coming out all the time, and you definitely can't build a spice rack with the wrong tools.

[-] BaumGeist@lemmy.ml 6 points 1 month ago
[-] propter_hog@hexbear.net 2 points 1 month ago

I didn't see the full URL when I clicked it and was thinking of commenting "there's also enterprise java fizzbuzz". Get out of my head.

[-] anzo@programming.dev 0 points 1 month ago

from hammers import sledgehammer and that's why I love Python :)

[-] Luccus@feddit.org 4 points 1 month ago

Nono, it's:

"I need to format stings with values from a dictonary. What should I do?"

"Use Django. It has a templating engine."

^This is based on a actual exchange I saw on XDA^

this post was submitted on 14 Nov 2024
83 points (98.8% liked)

Programmer Humor

32739 readers
745 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS