Live data from Hacker News

How it feels to learn JavaScript in 2016

hackernoon.com

121–130 of 236 posts

Re: How it feels to learn JavaScript in 2016

#121
post #68
post #62

Earlier quoted context omitted.

> React is very popular but it suits one very specific use case, it should be used almost nowhere else. Which use case? I've never worked with React but from yesterday's stateofjs.com I got the impression it's currently the go-to framework for everything.

It gives you components. If your webpage is loaded and significantly complex with a need for different things all over the place then it's for you. It was built for Facebook, which has stuff everywhere on every page. If all you want is a normal webpage, like a blog, like all of the websites out there I'd say you do not need components. Just build your own object. That is a lot of stuff just to do something that has b…

I'm sorry, but once you feel comfortable using React there are very few things that React would not be a good fit for, however small the task.

I started coding in JavaScript two years ago, right at the point React was gaining popularity. I made a gamble going for it 100%, and since then both the company I was working at back then and the one I started working at recently have fully switched to React for all new front-end development after seeing how much easier it is than anything they'd ever used before (jQuery, self-rolled prototype-based things, Backbone, Angular 1, Ember).

Yes, sure, you have to get the basics set up every time, and yes, sure you have to package React on every page. But as a gigantic win, you get a uniform way of dealing with the DOM every single time. React has well-defined best practices by now. When every Javascript coder in your workplace is familiar with React, it's usually best for you and for them to simply continue coding in React.

Re: How it feels to learn JavaScript in 2016

#122
post #74
post #38

"-Ever heard of Python 3?" (go to top)

People love to joke about Python 3 and I totally get it. But compared to Javascript, the mess is nowhere nearly as great. To make python 2 code compatible with python 3, a few things need changing. For 99% of the code it's very simple, and for the 1% big changes, well, you just need to go through it and refactor some of your code. People have been postponing this but we are well on our way. During the transitioning p…

I totally agree that Python is much less problem compared to Javascript but I think that it's not fair to compare a backend language to a frontend language. My only complain is that Python is not great at async operations so people have to create unstable async libraries such as gevent and it's usually cause trouble in production. Luckily Python 3 solves this problem but backward compatibility is one of the most important things that is important in a programming language. People usually develop backend services once and maintain it for years but frontend is subject to change more often.

Re: How it feels to learn JavaScript in 2016

#123
post #65

In my experience, the developers who fall into this trap of despair almost always do so because they aren't consciously choosing what tools to use; instead they are letting the tools choose them. They see job descriptions demanding AngularJS or ReactJS and they think that they must learn it, or someone posts an article here and they don't want to feel left behind. Choose a library or tool because it improves your dev…

I think that someone coming to the field cold is going to be sucked into the vortex of enthusiasm surrounding one or more frameworks and, eventually either become a die-hard fan of some specific stack or jaded by the phenomenon.

I'm a member of the second group since, like 1995.

Right now we're on the nth cycle of lemming like enthusiasm which is currently favoring React because it just tried Angular two years ago and writing a new site with React sounds a whole lot more awesome than fixing the incomprehensible pile of crap you wrote in Angular which, guess what, seemed like a great idea at the time because of the mess you made with jquery UI.

Re: How it feels to learn JavaScript in 2016

#124
post #22

Earlier quoted context omitted.

Even for a simple app that it'd take me 20 - 30 hours If your entire job is doing small apps that take a week of work, these tools are not much better than the previous generation (personally I'd use Rails but that's just one generation on from PHP/MySQL). Especially when you add in the cost of non uniformity if you let everyone choose their own slightly different flavour of the innumerable javascript tools available…

Sorry, I'm confused: what do you mean by "migrated a 5 year old codebase from Rails to React"? What are you using as your backend?

Just one of the many ways that modern Javascript baffles me - people pretend the client and server are equivalent.

Re: How it feels to learn JavaScript in 2016

#125
post #22

Earlier quoted context omitted.

Even for a simple app that it'd take me 20 - 30 hours If your entire job is doing small apps that take a week of work, these tools are not much better than the previous generation (personally I'd use Rails but that's just one generation on from PHP/MySQL). Especially when you add in the cost of non uniformity if you let everyone choose their own slightly different flavour of the innumerable javascript tools available…

> migrated a 5 year old codebase from Rails to React This statement doesn't make sense to me, and is one of the points of the article. React is a view layer. That's it. So you wouldn't migrate from Rails to React. You'd migrate Rails to React + Relay + Webpack + etc. On top of all of that you then have to decide if you're sticking with Rails for your API or if you're switching over your entire back end as well. The d…

It makes sense to me. The previous generations had pages that had more rendering on the server and "forms." Now, it's single page applications hitting REST end points.

So before, you had complex models, tightly bound back-end controllers, sending data to a view.

Now, you have simpler APIs on the server, you arrange and manage the data in the browser, getting more data as needed.

Re: How it feels to learn JavaScript in 2016

#126

I have no trouble at all "keeping up" with the "insanity" that is front-end development. If you're confused learning new things, it means you're learning. At my company, we have moved a lot of our front-end code to eslint-checked ES6 with some plugins, writing react/redux powered interfaces. New hires generally learn the codebase fast, you're well protected from shooting yourself in the foot thanks to type checking a…

I've recently decided that I'm using React for the next 3 years before I consider switching to something new.

Re: How it feels to learn JavaScript in 2016

#127
post #63

Earlier quoted context omitted.

> We're professionals, after all, and TypeScript and React were not build by some teenage hackers. Overall correct > The reason is that we started to build complex applications instead of enhancing grandma's blog using jQuery.animate, get over it. And this is where we disagree Complexity is needed sometimes, needless complexity only brings the overall value down If I want to do a website using Django I need to get: D…

> I have one package manager: pip. It works Funny, because this is not the general sentiment in the Python community. See links like [1], [2], [3]. Thankfully, things are improving. [1] http://lucumr.pocoo.org/2012/6/22/hate-hate-hate-everywhere/ [2] https://www.reddit.com/r/Python/comments/zrm3h/there_have_be... [3] https://blog.ionelmc.ro/2015/02/24/the-problem-with-packagin...

I found Python packaging very easy. pip install works for tons of packages.

Re: How it feels to learn JavaScript in 2016

#129

Earlier quoted context omitted.

Where the OP falls off is with stuff like "OMG don't use jQuery" or "no one uses HTML anymore". There's nothing wrong with using those -- and frankly using plain old javascript and HTML is fine. Remember we reached for jQuery in the first place because the browser lacked features we wanted, and because it handled cross browser stuff for us. That is, it simplified things we were already doing manually . So the trap is…

I've been to more than one interview where I defaulted to jQuery and was immediately disqualified, based on the looks on the interviewers' faces. As a ruby developer, it certainly feels like keeping up-to-date on JS takes more work than the other 90% of languages that I'm familiar with.

Interview question: "iterate over an array":

  angular.forEach([1,2,3] ...

  $.each([ 1, 2, 3 ], ...

  [1,2,3].forEach(...
One of these things is not like the other. I hire people that know javascript, not ones that only know the tool we use. The tool we use today may not be the tool we use 6 months from now. I've never asked a javascript question that required framework knowledge unless it was explicitly about concepts of the framework. Someone taking the time to include jQuery is instantly out the door. Walking through people's code demonstrates whether or not they default to other people's solutions than their own.

This isn't to say your experience didn't happen, I'm just pointing out that there is a lot more that goes into it than just which framework the cool kids are using nowadays.

Re: How it feels to learn JavaScript in 2016

#130
A common problem when I try to switch to platform that I haven't been paying close attention to. It is very difficult to quickly figure out what is the current stack of libraries and tools you should use if you are starting now. For example jump to the .NET and it is not so obvious should go for Core, Asp.net Core, how to do data access, which version of EF to use and so on.

Usually it is very difficult to find this information from anywhere. Articles and blog posts get outdated fast. Material produced by vendors is usually a bit biased. You get to see all the good things, but they might forget to mention stuff that is still under development. If you are new to the field, you don't know the right people and right blogs.

Post reply on HN