Live data from Hacker News

Why junior developers are learning bad habits from Angular

javascriptkicks.com

111–120 of 138 posts

Re: Why junior developers are learning bad habits from Angular

#111

Earlier quoted context omitted.

This is a rather surprisingly and unnecessary harsh comment. Would you like to explain why do you think Angular is so flawed?

For one, it is incompatible with the whole open web stack. You cannot use Bootstrap with it. And if you decide to move off Angular, you are going to be in a world of pain. Second and worst of all - it is a monolithic framework. As long as you just do things the "Angular Way" - you are fine. If you want to change or override something, you are in a world of pain. If you are learning Angular - you are hardly learning J…

There are a lot of broad generalizations and some misinformation here.

I am curious what you consider to be the open web stack and why you think that Angular is not "compatible" with them. In my mind, it includes things like Linux, Apache, possibly Nginx, MySQL, languages that begin with a "P" and some other letters, etc. None of these remotely have incompatibilities with Angular. You want to sprinkle in some jQuery with Angular on the front-end? That's fine too, if you want.

As for moving off of Angular causing a world of pain, the same could be hypothesized as likely if moving from any set of patterns to a new set of patterns. I would not discredit it for providing a set of patterns, it is a framework and that is the point. Also, as for learning Angular versus learning JavaScript -- the same goes for most frameworks. You can learn the framework, and you can also learn the underlying, lower-level details that implement the framework. The two are not the same.

Doesn't work with Bootstrap? What? Sure it does. You can use any CSS classes you like, and as for the Javascript components, although not necessary there are even these native directives from the AngularJS team to make things easier:

http://angular-ui.github.io/bootstrap/

I am not going to touch your last statement. :)

Re: Why junior developers are learning bad habits from Angular

#112
post #52

>Many would not even see the problem here, and just as children don't know cars can hurt, juniors don't know just how destructive this anti-pattern can be to performance, separation of concerns and long term code base maintenance. Yup, I don't get it. I guess not only am I eternally doomed to be a junior dev but also am being compared to a child, a monkey typing at a typewriter, but also someone who doesn't know JS a…

The thing that struck me about it was that the $scope.displayName() function shadows itself by setting $scope.displayName again: $scope.displayName = function () { if ($scope.anonymous()) { return; } $scope.displayName = $scope.name; }; I have no idea how that's related to Angular, though. It looks like it's just bad programming practice.

Yes not to mention that displayName() will crash next time it will get called.

Re: Why junior developers are learning bad habits from Angular

#113
post #63

seriously, the website design sucks.

Agreed. If you click out of the weird popup the article is in, you get a list of articles. If you click on one of those articles, a new window/tab opens in your browser, with a similar setup (article in weird popup), and if you click to the left of that, now you have two windows/tabs with lists of articles.

I almost wonder if it was made like that as a joke.

Re: Why junior developers are learning bad habits from Angular

#114

Earlier quoted context omitted.

>One of the most common features pushed by just about every framework (just saw it about React yesterday) is desperately, and leakily, trying to abstract Javascript into some sort of classic OOP language. You missed the point of yesterday's React announcement. It's not at all about OOP. See this: https://news.ycombinator.com/item?id=8959691 https://twitter.com/swannodette/status/560554408782864384

You seem to have misunderstood what I was saying. I said that I saw it yesterday about React. You know, in their announcement where they outright said - "JavaScript originally didn't have a built-in class system. Every popular framework built their own, and so did we." I was not making a comment on any new development or change in direction, just that React (a tool I don't use) admitted to also jumping on the pretend…

Thank you for clarification, I get your point now.

To be fair though, React never allowed inheritance (even in its own class system) so it's a bit misleading to compare it to other frameworks where (pseudo-)inheritance is one of the valid ways to reuse UI code.

Of all OOP, in my experience it's inheritance that doesn't play well with UI code at all—and React never allowed it in the first place.

Re: Why junior developers are learning bad habits from Angular

#115
post #97

Earlier quoted context omitted.

It is a criticism of big monolyth frameworks. We have had shit like this circa 2005 - when jQuery started hitting the mainstream. And monolyths had to cede their ground to small specialized frameworks that would be built for fast deprecation and mixing with other stuff. Sort of the UNIX way. Angular is causing just as much damage as GWT, ASP and others did in their day. IMHO.

Are you seriously suggesting that diving fully into the deep end of the hype cycle is a viable, let alone preferable way to build anything but a throwaway MVP for your resume?

Not intentionally, would you mind pointing out how you got that impression?

Re: Why junior developers are learning bad habits from Angular

#117

Earlier quoted context omitted.

No Boostrap? The project I recently worked on must not have happened, and it must have all been a dream... Are there non-monolithic frameworks? I believe that's the main value proposition of using a framework: you don't need to think about how to organize things because it's the framework's job to provide you with square and round holes, all you have to do is provide the square and round pegs. I am not saying that fr…

> Lastly, Angular has something that many other frameworks don't: a commercial backer. This means that it's not likely to just bitrot on GitHub for years when the original author loses interest. Google's track record is hardly impeccable in this regard.

True. I'd rather see Red Hat or some such backing it. However, Google is better than a random dev working on a project a few hours a month, then losing interest. Having Google as the backer will give Angular a boost that will get it to be popular. Then, if Google ever walks away from it, someone with enough money will depend on it so much that they'd have to pick up where Google left off.

Re: Why junior developers are learning bad habits from Angular

#119

It seems like what junior Angular devs really need is a post showing examples of both what NOT to do and also what to do INSTEAD. I think the difficulty of Angular is largely you have so many tools available but it's hard for a junior developer (like myself) to recognise when each should be used.

I agree, and this article does not really help. I feel that part of calling yourself a senior developer is teaching junior developers how to write great software.

As I said in the post, you just need to google for it. Here's one I found that helps you with $scope: http://csharperimage.jeremylikness.com/2014/11/the-top-5-mis...

Re: Why junior developers are learning bad habits from Angular

#120
post #61
post #52

>Many would not even see the problem here, and just as children don't know cars can hurt, juniors don't know just how destructive this anti-pattern can be to performance, separation of concerns and long term code base maintenance. Yup, I don't get it. I guess not only am I eternally doomed to be a junior dev but also am being compared to a child, a monkey typing at a typewriter, but also someone who doesn't know JS a…

agreed, some explanation on what's actually wrong here would be nice

One thing that definitely can be improved is using "Controller As" syntax. It solves most of the $scope issues.

Here's a good writeup: http://toddmotto.com/digging-into-angulars-controller-as-syn...

Post reply on HN