Menu

AI made fixtures unfair to factories
📰

AI made fixtures unfair to factories

DEV Community: rails·Caio Andrade·about 23 hours ago
#euZN7wMv
#devtorails#devto#dev#fixtures#factories
Reading 0:00
15s threshold

I've been thinking a lot about one of the oldest discussions we've had as Rails developers: factories or fixtures?

At some point, I think we reached a consensus. Factories are easy for devs to manage . They're familiar and simple, and that's good. But they have a lot of problems, especially with deep nesting. Factories get slower and slower if people aren't careful , and let's just admit it, people very often aren't.

Fixtures have always been annoying to manage . They're written in a very data-heavy way, so they read more like data than objects. That brings its own problems, and they're annoying to write. But fixtures have always been super fast to run .

In a world where AI exists, I think fixtures now have such a massive edge over factories that it's not even fair anymore. The annoying part of dealing with fixtures is gone. You can just outsource it to AI.

That's what I've been doing at my current job.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.