3 ms·
I've tried out a bunch of different tools on side projects, but always find myself coming back to Rails. It simply does so much out of the box and it does it in
by SkyPuncher 3y ago
I've tried out a bunch of different tools on side projects, but always find myself coming back to Rails. It simply does so much out of the box and it does it in a way that generally plays nice with the entire framework. Every other set of tooling I've used, I quickly run into problems that Rails solves out of the box. I either need to spend hours configuring a bunch of components, rework things after discovering a breakage, or write insane amounts of boilerplate code.
That being said, I really cannot stand how abstracted certain parts of Rails are. This is further complicated by gems that may or may not follow convention and that Rails is not a strongly typed language. It can become nearly impossible to find documentation or worse documentation with completely missing components.
----
Example: Rails Migrations.
I love the Rails Migration setup. Once you write a migration, things just work.
However, writing an actual migration is an adventure at times.
* The documentation is sub-par with only the most basic examples in place.
* Advanced features are essentially undocumented. Did you know there's an Postgres specific migration guide? Good luck finding that from within the documentation.
* Much of the documentation ends you up in apidock where you learn critical APIs are completely undocumented.
* Terrible mix of named and unnamed parameters, some of them just seem like magic. Worse is the mixed use of things like types:
* t.column :identifier, :uuid (does this actually work? Seems like it should?)
* t.uuid :identifier (woah, where'd that magical function come from)
* t.references :foo, type: :uuid (woah, why does uuid require a named parameter here)
* Flags and options are poorly documented and it's often unclear what functions are (1) exposed from the database (2) abstracted away.
* Did you know you can utilize the postgres comment field in migrations?
* Where do I use plural? Where do I use singular? Where does it get automatically converted? Why do I need plural here and singular there? Why can't everything simply use plural?
* Do I need to use `required: false` or `optional: true` on this field? Why is that different than that other field?
These types of problems are all over the place. Far too many things seem to rely on stumbling on a random, likely outdated StackOverflow post. Many of these things would be far, far easier to understand with just a touch of verbosity and a bit less magic. That being said, when you do figure things out, the solutions are often short, elegant, and robust.
Recently, I've been finding ChatGPT incredibly helpful for wading through this cruft. It does really well with the advanced features. Even if it's slightly wrong, it gets me close enough without having to wade through documentation.