As a Ruby programmer, I often hear that Ruby and Ruby on Rails are very slow, but are they really? After a few years working with Ruby code I think that the problem is more complex. In this short article I would like to show you where the main problems are and how not to fall into their trap. I hope that after reading it, you will look at code in a different way.
Compared to what? Ruby mostly powers web apps, and those web apps run just as well as other infrastructures. The RoR community also has put together vast amounts of matured frameworks to make building complex apps quite easily. The "new kids on the block" languages have a long way to go to have comparable tooling to that of the Ruby community.
Compared for example to Elixir. Some things that are the reason why it's so easy to start coding using Ruby, follow the programmer for years - like Active Records and no 'join' or 'include' in quiry, which causes 'n+1'.
I'm not sure if junior devs can tell the difference between several different ways of coding the same features, if you ask me. It would be an easy world if they did, because seniors wouldn't have to lead every ticket in the project. But to teach them and help them is the very reason why I wrote what I wrote, so you're probably right. Thanks!
10 comments
6 u/przemek4mm [OP] 18 Jul 2017 12:02
As a Ruby programmer, I often hear that Ruby and Ruby on Rails are very slow, but are they really? After a few years working with Ruby code I think that the problem is more complex. In this short article I would like to show you where the main problems are and how not to fall into their trap. I hope that after reading it, you will look at code in a different way.
4 u/whisky_cat 18 Jul 2017 12:41
Compared to what? Ruby mostly powers web apps, and those web apps run just as well as other infrastructures. The RoR community also has put together vast amounts of matured frameworks to make building complex apps quite easily. The "new kids on the block" languages have a long way to go to have comparable tooling to that of the Ruby community.
1 u/przemek4mm [OP] 19 Jul 2017 07:23
Compared for example to Elixir. Some things that are the reason why it's so easy to start coding using Ruby, follow the programmer for years - like Active Records and no 'join' or 'include' in quiry, which causes 'n+1'.
0 u/MartinGoortz 18 Jul 2017 12:13
Awsome that you give examples. But in general the post is a bit basic - for juniors rather then regulars. Points for effort!
1 u/przemek4mm [OP] 19 Jul 2017 07:26
I'm not sure if junior devs can tell the difference between several different ways of coding the same features, if you ask me. It would be an easy world if they did, because seniors wouldn't have to lead every ticket in the project. But to teach them and help them is the very reason why I wrote what I wrote, so you're probably right. Thanks!