by latch · 15y ago · 0 comments
Despite this, I can't get into Python (having tried 3 or 4 times the last couple years). The Ruby ecosystem is simply more polished...gem, rvm, capistrano, rails, sinatra bundler, .... I really tried to fall in love with Python/Django, and it just isn't as good as Rails by a wide margin.
When languages are as close as Ruby and Python (or C# and Java), frameworks/ecosystem/community matters a ton more.
This is exactly why I use Python over Ruby: scipy, numpy, matplotlib, etc.
The right language + ecosystem will obviously be very domain dependent.
For reference, each element of the Ruby ecosystem has a similar Python counterpart.
- gem -> easy_install or pip
- rvm -> virtualenv
- capistrano -> fabric
- rails -> django
- sinatra -> itty, bottle, web.py, or twisted http module
- bundler -> setuptools (install_require directive)
also,
- rake -> scons, paver
- rspec -> unittest / unittest2 /nose
- watchr -> autonose
- rdoc markdown -> docstrings+restructured text
Of course they're not 1:1 mappings, but python itself is not a 1:1 mapping to ruby, and any project is not a 1:1 mapping to any other project aiming to solve the same task either.
Admittedly it seems that Rails pushed Ruby more towards web development resulting in some more polish, whereas Python became more of a generalist, but that's a slight advantage either way, and they are definitely not worlds apart.
The rails -> django thing is where I'm not so humble. It didn't take me more than 5 minutes of doing Windows Mobile (6) programming to know that it sucked. Django doesn't suck (no way), but it isn't where Rails is. And I really think that, if you're doing web dev, the web framework is as important as all the other smaller pieces (package management, deployment, ...) put together.
I can tell you my last expedition in Python land was bad. I ran into two problems: upgrading the version of Python that came on my Air and installing MongoEngine. For MongoEngine I used the instructions on their website "easy_install -U mongoengine". And after a bit of googling (I say a bit because a lot of people were having the same problem I was) I ended up installing PIP (via easy_install no less!) and then got into pathing problems.
Having to use one package manager to install a better package manager isn't polish. Again, I can agree that this might all just be familiarity and comfort (or lack of in this case).
I'm not so open to Django vs Rails though. I don't need to do a lot of struts to see how horrible it is (compared to anything). I don't need to do a lot of Django to see that it's behind Rails as a productive web frameworks. I'm not completely closed to the possibility that i'm just an idiot, but at this point it would likely take working with a guru for a couple weeks to change my mind.
Hint: pip -E yourenvdir install yourpackage
That will create a virtualenv and install the package there. You can just delete the env when you're done. You really shouldn't install things system-wide, generally...
- stock python 2.6.1 and /Library/Python/2.6/site-packages
- brew install python (which brings in python 2.7)
- brew install python3
... and a bunch of virtualenvs
Btw, I went with MongoKit after running into some index troubles using MongoEngine, worked like a charm.
Some people love Python and can't see what all the fuss is about with Ruby, others do the opposite. They're both excellent languages but you'll almost always find yourself leaning toward one over the other. This isn't because one's better, but just that it works closer to the way you think