4 ms·
> Any Pythonistas/Rubyists here that could point out some Ruby shortcuts that make you more productive? It depends on what you want to do. If it's building we
by nickjj 4y ago
> Any Pythonistas/Rubyists here that could point out some Ruby shortcuts that make you more productive?
It depends on what you want to do.
If it's building web apps there's Ruby on Rails, which is written in Ruby. In my opinion there's no alternative to this in Python. Sure there's Django but it's not the same even though both are considered batteries included web frameworks.
One nice thing is you'll find both Python and Ruby SDKs for a ton of third party services (like Stripe, etc.). That goes a long ways for building things quickly and with confidence.
Ruby's package manager is also a lot better IMO. It supports proper lock files out of the box and everyone uses gems with bundler. In Python it's a mix of pip, pipenv, poetry, etc. all of which have their own unique issues. With Ruby I never felt like I had to battle this aspect of the language. You just bundle install what you want and creating gems is the same process.
- lloeki 4y agoIf one wants to get into Ruby, please stay away from Rails as a first step into Ruby-land. Look into Rack and Sinatra first, then Rails. Even if it's a short trip it's going to be worth it.
- Lio 4y agoThis is personal opinion but these days I'd probably swap Sinatra for Roda[1] for small API services. It's generally faster, uses less memory and is a really good example of well written ruby code, IMHO. I also really like Jeremy Evans' book, Polished Ruby. 1. http://roda.jeremyevans.net/index.html http://roda.jeremyevans.net/index.html 2. https://www.packtpub.com/product/polished-ruby-programming/9781801072724 https://www.packtpub.com/product/polished-ruby-programming/9...
- MatthiasPortzel 4y ago> Sure there's Django but it's not the same Could you elaborate on this? I’ve used both Django and Rails and in my mind they’re direct parallels to each other. For example: in Rails you write migrations and then it generates a schema.rb, and in Django you update your model schema and then it generates migrations. They have very different philosophies, sure (reading the Rails manifesto made that clear), but from a technical standpoint they have pretty good feature parity.
- likortera 4y agoI think you're only considering the backend part of these frameworks. Rails is really full stack. Django's frontend story is a joke.
- MatthiasPortzel 4y agoOkay, when I’ve used Rails, it’s with React on the front end, so I haven’t explored that part of the framework.
- deleted 4y ago[deleted]