6 ms·
> It's readable... when you start to learn a new programming language, you look up what people are doing. ruby let programmers write incomprehensible and unfri
by blondin 7y ago
> It's readable...
when you start to learn a new programming language, you look up what people are doing. ruby let programmers write incomprehensible and unfriendly code. my experience is that it has been a huge turn off for beginners. there was a rush to make popular websites in the rails era, but that ended quickly.
as another example, cpp used to be a cool language to read and write in. they even taught it as first programming language. since then, they added some crazy stuff that made the language very unfriendly when put in the hands of some people. it is now very beginner unfriendly.
the syntax of python will remain a great inspiration for readability if they don't make the same mistakes. it always amazes me to see people from all levels read python the first time and get it.
- pdimitar 7y ago> there was a rush to make popular websites in the rails era, but that ended quickly. I so much want to agree with you here but I can't. 99% of all business people I've ever met are all about "Alright! We got the perfect idea! Let's have the first iteration done next week!" -- has been the sad reality of most of my bootstrapping conversations. Even if they aren't a young-ish enthusiastic bunch they still are going to go to whoever promises them the fastest delivered MVP. IMO to this day Rails is a big winner in the MVP area -- although I will immediately agree that nowadays there are no small amount of other technologies that can give you a pretty good-looking and well-working MVP (mostly in JS land I think). But a lot of business people just managed to memorise that Rails is the way to go for MVPs. Their mind isn't easily changed. Now those several whom I talked with in the last 1-2 year were like "yeah yeah, you techies always chase the newest thing" -- and sadly they are often correct. So the hope of breaking free from Rails' "monopoly" on making MVPs looks pretty slim lately, to me at least. I fully understand the business people's desire for things not to change often. But they vastly overestimate the viability of most of the tech out there. Or maybe it suits their bias. No clue.
- bitbang 7y ago>the syntax of python will remain a great inspiration for readability if they don't make the same mistakes. it always amazes me to see people from all levels read python the first time and get it. Oh please. I like python and use it a lot, but it's readability can be awful. Constructs like 'delimiter_string'.join( list_var ) may have logic behind them, but the readability for someone accustomed to OOP paradigms is backasswards. Comprehensions are quite powerful, but ironically they're nearly incomprehensible. Lambdas are a sad sad attempt at closures/anonymous functions. There are many conventions in python made early on that have not aged well in regards to readability.
- ramchip 7y agoIn my experience with Python, these were minor annoyances. The real problem was the amount of decorators and monkey patching in libraries like Flask, FoundationDB, Gunicorn, or Celery. Using gevent didn’t help...
- AlchemistCamp 7y agoI found Ruby a bit easier to read and much easier to learn than Python as a beginner. In fact, I'd say it's the most beginner-friendly language I've seen, especially with great resources like Chris Pine's Learn to Program. If I had to rank learning difficulty I've found various languages, I'd say Ruby was the easiest one I've ever encountered. It's very consistent, everything is an object, it's flexible and you don't need to learn anywhere near all of it to become productive with it. Python is fairly beginner-friendly too, but it's less consistent, significant whitespace leads to a certain class of mistakes that are maddening for a beginner and at least when I used it pip was nowhere near as nice to work with as gems and bundler. Both are much easier than JavaScript or anything where you manage your own memory, though!
- dnautics 7y ago> the syntax of python will remain a great inspiration for readability if they don't make the same mistakes... it always amazes me to see people from all levels read python the first time and get it. I think python had already crossed that bridge, at least for webapps and ml (albeit not at the syntax level). Consider what you must bring in for a real webapps deployment: virtualenv, uwsgi, celery, nginx, at a minimum, probably rabbitmq for many apps. Deployment is a nightmare. For ml, you'll need to pick your library, version it correctly (some ml models are even firmly stuck in python 2.7), probably manage it all in conda if you are testing different models, since your source is bound to different tensorflow/pytorch/python/cuda version dependencies, and deployment is a nightmare. Maybe I'm missing some python best practices due to the places I've been (django/angular shops that don't write tests) but ultimately I think this is Not very beginner-friendly at all.
- luhn 7y agoI think the parent was speaking specifically about the language, not the ecosystem. More "if I open up this Python file, can I understand what it's doing," not "can I execute this application easily." I think Python is excellent at the former—Syntax is simple and explicit, "clever" code is discourages by both the language and the community. Packaging is a known pain-point in Python and does make the language less approachable. But beyond that I don't understand your criticisms. uwsgi, celery, nginx, RabbitMQ are all useful tools that are oftentimes used in web applications. What language are you using that magics away the need for tools like these? All these same tools or their equivalent still exist in the Rails ecosystem. I don't have much hands on experience with ML, so I guess I can't comment on that. Is there something about Python that exacerbates the issues you've laid out?
- dnautics 7y agoEixir/Phoenix at least makes those dependencies go away, but some use nginx (I have) and you might use rabbitmq but only if you want to run a queue that other languages participate in.
- nwmcsween 7y agoWe must be reading different versions of Python as the magic double underscore, weird bolted on OOP is in my opinion a lot more unreadable than some code golf rubiest go for.