(no title)
what2build | 5 years ago
Maybe it was something with the corner of the Ruby world I fell into, but the syntax sugar options and “cleverness” that enabled was maddening to deal with, and permeated that crowd.
Code bases with mixed styles are a thing in any language, but the Ruby-ists around me found a way to make one project look like half a dozen languages were involved.
Insert Confused Jackie Chan meme.
ritchiea|5 years ago
Rails, if done correctly, is a remarkable tool to allow developers to focus on the business logic and UI of their app and forget about the "filler features" that pretty much every app needs implemented. On the other hand if you write Rails code without reading the docs and re-invent the wheel rather than doing things the Rails way, essentially running an app in the framework without using the framework methods, you can create yourself a monstrous unmaintainable codebase like no other.
what2build|5 years ago
I moved on from Ruby land right as AWS was blowing up, and admitted I have never worked in Rails.
cageface|5 years ago
I mention Rails specifically because I can't think of any other reason I'd use Ruby these days.
nickjj|5 years ago
Oddly enough I found myself becoming less productive when I tried Elixir and Phoenix for a bit (compared to Ruby).
You could look at code written by 10 people and end up with 10 drastically different looking code bases. Not just the organization of files but the logic behind the functions. It makes it very hard to read other people's code unless you know every pattern they use very well.
Here's an example of that where I wrote something one day, asked if there's a better way to do it and someone else wrote their own version[0]. Take a look at the 2nd code snippet vs the 3rd. The first code snippet happens to be Python btw. Even after a year of casually working with Elixir I can't understand the 3rd snippet of code at a glance. When I first tried to parse it mentally I spent literally an hour picking it apart just to see what everything did and I forgot almost all of it a week later.
I also found myself much less productive mainly because the language tends to be quite verbose compared to Ruby, especially when you compare things like ActiveRecord vs Ecto. Ecto is one of those tools where it sounds unbelievably good on paper with great abstraction ideas but in practice it's pretty complicated because there's tons of different syntactical ways to do the same thing, the docs aren't inconsistent and every blog post you read has people implementing things in a different way. Then you combine that with it being fairly low level and you end up having to write huge amounts of very tricky code to do the equivalent of what you can do in AR.
At least with Rails, most projects look the same and unless someone dives off the deep end with meta programming, you can generally follow the code. I guess this is a testament to how good Rails is when it comes to developing its APIs. You can go such a long ways and develop fully featured apps based on Rails without really having to do anything crazy.
[0]: https://nickjanetakis.com/blog/formatting-seconds-into-hh-mm...
unknown|5 years ago
[deleted]
JohnBooty|5 years ago
Rubocop (with some tweaked rules; it's IMO too restrictive out of the box) was a big lifesaver in terms of steering both teams toward a common, readable coding style and mostly eliminating debates over style at PR review time.
Rochus|5 years ago
Did you have a look at https://crystal-lang.org/?
tylersmith|5 years ago
marcandre|5 years ago