I strayed from the CS path into econometrics and then data science, so Ruby just wasn't a good fit for basically anything I do. That seems to remain the case, unfortunately, though I like it on the language level more than my bread and butter Python. Oh well.
An Ode to Ruby
31–40 of 204 posts
Re: An Ode to Ruby
#32Earlier quoted context omitted.
"I still can't think of a better language for scripting." Python I find equally if not more simple. Would you agree?
Nope. Can't stand that Python uses built-in functions for basic things like list, map, fold, etc... instead of methods on base classes. Here's a super basic example. Add one to an array [1,2,3] and print results. Python: print(list(map(lambda x: x + 1, [1,2,3]))) Ruby: print [1,2,3].map {|x| x + 1} So much more readable, easy to write, etc... Ruby keeps it consistent by making pretty much everything an object and you…
Re: An Ode to Ruby
#33Earlier quoted context omitted.
"I still can't think of a better language for scripting." Python I find equally if not more simple. Would you agree?
Nope. Can't stand that Python uses built-in functions for basic things like list, map, fold, etc... instead of methods on base classes. Here's a super basic example. Add one to an array [1,2,3] and print results. Python: print(list(map(lambda x: x + 1, [1,2,3]))) Ruby: print [1,2,3].map {|x| x + 1} So much more readable, easy to write, etc... Ruby keeps it consistent by making pretty much everything an object and you…
`print([x + 1 for x in [1, 2, 3])`
I agree that the ruby approach is better in terms of consistency, but most developers will be aware of the conventions python uses.
Re: An Ode to Ruby
#34I recently interviewed for a ruby/rails job where the dev team had come from a previous start up that tried to port an existing Rails app to a React/Microservices one with disastrous results. For this job they were relishing coming back to a monolithic Rails app. I hope this trend continues!
Re: An Ode to Ruby
#35A big shoutout to the author to include the Nokogiri installation "experience"... :D Well done!
I have similar problems in Python with OpenCV. It should be so simple, but generally is not (or at least last I tried)
To be honest, it's always this dice roll with most things on pypi. If there are wheels for you, golden. If not, you better hope it's a pure python package or it doesn't pull any outside libs. Things are getting better though with solutions like cibuildwheel.
Re: An Ode to Ruby
#36Earlier quoted context omitted.
Nope. Can't stand that Python uses built-in functions for basic things like list, map, fold, etc... instead of methods on base classes. Here's a super basic example. Add one to an array [1,2,3] and print results. Python: print(list(map(lambda x: x + 1, [1,2,3]))) Ruby: print [1,2,3].map {|x| x + 1} So much more readable, easy to write, etc... Ruby keeps it consistent by making pretty much everything an object and you…
To be fair, you almost never should use the map builtin instead of the pythonic equivalent, list comprehensions. `print([x + 1 for x in [1, 2, 3])` I agree that the ruby approach is better in terms of consistency, but most developers will be aware of the conventions python uses.
Re: An Ode to Ruby
#37Earlier quoted context omitted.
To be fair, you almost never should use the map builtin instead of the pythonic equivalent, list comprehensions. `print([x + 1 for x in [1, 2, 3])` I agree that the ruby approach is better in terms of consistency, but most developers will be aware of the conventions python uses.
Ok, that's a nicer result (obviously I don't write Python lol) but still seems inconsistent to me (putting the function before the array) considering Python is an OO language and most people are going to be writing methods for classes where you call methods with dot. I just remember list comprehensions from Coffee-script and not going to lie, I hate them. It's like reading backwards.
Re: An Ode to Ruby
#38Earlier quoted context omitted.
Nope. Can't stand that Python uses built-in functions for basic things like list, map, fold, etc... instead of methods on base classes. Here's a super basic example. Add one to an array [1,2,3] and print results. Python: print(list(map(lambda x: x + 1, [1,2,3]))) Ruby: print [1,2,3].map {|x| x + 1} So much more readable, easy to write, etc... Ruby keeps it consistent by making pretty much everything an object and you…
To be fair, you almost never should use the map builtin instead of the pythonic equivalent, list comprehensions. `print([x + 1 for x in [1, 2, 3])` I agree that the ruby approach is better in terms of consistency, but most developers will be aware of the conventions python uses.
Re: An Ode to Ruby
#39Earlier quoted context omitted.
"I still can't think of a better language for scripting." Python I find equally if not more simple. Would you agree?
I am not a Python or a Ruby dev. The Ruby devs I know are overall great devs The Python people are second-rate. Ruby produced tons of good software as a framework base besides Rails. Python? Eh.
Re: An Ode to Ruby
#40For all that I despise Java's ridiculous boiler plate, I always know exactly what's going on.
In Ruby, I feel like there are unknowns in every file.
I hate Java, but Ruby makes me miss Java.