Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> SQL is rather readable these days. It's obviously not as easy to read as ruby

As someone who can't read Ruby but can handle "any level" of SQL fluently, that's obviously not a very objective statement.



I made a very broad assumption based on my past experiences with engineers and I apologize if I offended you.

Most engineers I have met in my career have really depended on an ORM to do all of their heavy lifting. They can write some of the most eloquent ActiveRecord queries but would be unable to create the same functionality using raw SQL.

Again, deeply sorry if I offended. It was not my intention.


Wow, is this really the norm? I mean, not knowing SQL and working purely with ORM. This seems weird to me, as I learned SQL first.


Yes, that's definitely the norm. Having some experience with Rails, I'm pretty sure that 90% of Rails developers have never written any SQL. If they need to access the production database, most of them would use the rails console on the production app server instead of psql etc.

And I can sympathize. For example, I wouldn't even know how Rails maps a many-to-many relation to SQL tables, so I would have to use the rails console myself to traverse such a relation.


Although Rails is very reasonable with its mappings and they are easy to use directly, I prefer Rails for db manipulaton, it is usually much easier and faster to type 'User.find(1).favorites << Product.find(10)' than an equivalent SQL.


Very true, but I've found that it's easy for those ActiveRecord abstractions to kill performance (I did this on a dashboard that was performing some serious calculations across hundreds of millions of records, often joining other similarly sized tables)


I don't know if it's the norm or not, but leveraging an ORM without knowing SQL is a thing. ORMs have so many benefits (query parameterization just to name one). That and people can stay in their comfort zone language (Ruby, Python, Haskell, etc) and let the ORM do the heavy lifting instead of having to dip down into SQL.

Those that are really good with an ORM can generally go into SQL with ease.

The above is not meant to be objective, just my general observations.


To be clear I'm not against the use of ORMs.

They are a fine tool, but I find it weird that people are using them without knowing the underlying technology which they are based on.

And you also don't need ORMs to do query parameterization.


Also, think of the various boot camps (General Assembly, Launch Academy, etc). Those do not teach SQL, but do teach some ORM.


Seems to be, especially among younger developers that learned Rails, and even more so among boot-campers.


Yeah, well, not everything everyone says is objective.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: