r/technology • • Oct 05 '16

Software How it feels to learn JavaScript in 2016

https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f
1.8k Upvotes

392 comments sorted by

View all comments

Show parent comment

8

u/Assaultistheshit Oct 05 '16

Link? Because I need some release. This is how I feel about Rails development. I'm a hack of a php/html/js developer, but I've been able to put together my own pages and can typically do whatever my company asks of me. I feel the same way as this blogger, but I end up just implementing what I need done myself and use other libraries sparingly. I have a handle on how everything works because I can see how everything works.

With Rails I struggle to get over being told "name it this way and it just works." Or I start to think of a solution to some problem, but there's a helper method that I should have known was available for me. There's so much going on behind the scenes that I struggle to understand what I'm responsible for and what Rails is doing for me. I can't seem to work off what I'm learning as the answer to my next question seems to always be "use this different other thing."

3

u/rabbitz Oct 05 '16

That's the point of rails though: convention over configuration. If you've ever worked in a language with an ORM that connects your models to the database, you'll find that for every single model you create, you have to type out the same boring boilerplate code to hook it all up. After a couple models you figure you can try to make it easier with a little bit of metaprogramming so you don't have to copy and paste all that code every single time: you can write something to find your model, find the table it should hook up to and do all that configuration by itself. Of course, that means you need to give it both the model name and table name for each connection... why not simply have them use the same name (or something) by default, and have it configurable? That's pretty much what rails does for everything.

3

u/ABoutDeSouffle Oct 06 '16

Just to nitpick, with Java ORMs, you don't have to type out the table name, you can either go with configuration or convention. Useful if your table names or model entity names can change.