TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why junior developers are learning bad habits from Angular

114 pointsby senoffover 10 years ago

26 comments

jereover 10 years ago
&gt;Many would not even see the problem here, and just as children don&#x27;t know cars can hurt, juniors don&#x27;t know just how destructive this anti-pattern can be to performance, separation of concerns and long term code base maintenance.<p>Yup, I don&#x27;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&#x27;t know JS at all. Feels good man.<p>Other than some horribly obtuse undefined checking, there&#x27;s no explanation of what the problem is. The argument seems to be that the controller depends on $scope. I... I thought that was the point. From the first line of documentation on controllers:<p>&gt;In Angular, a Controller is a JavaScript constructor function that is used to augment the Angular Scope.<p>If the idea is that this is a bad habit to bring elsewhere, fine. Some more explanation would be nice, but whatever. But the implication is that this is a trap within the context of Angular dev itself.
评论 #8966381 未加载
评论 #8966420 未加载
评论 #8966514 未加载
评论 #8966455 未加载
评论 #8968825 未加载
评论 #8966340 未加载
yummybearover 10 years ago
(sorry if this comes off a bit snarky)<p>&quot;Overuse of the eventing system ($watch, $emit, $broadcast) leading to performance problems and memory leaks and not realizing it or being able to debug it&quot;<p>Blindly overusing most features in frameworks or libraries can cause performance problems. Which memory leaks?<p>&quot;Writing Controllers and Directives that take dependencies which make them nearly impossible to test.&quot;<p>Doesn&#x27;t dependencies in general make any code harder to test?<p>&quot;Views that are heavily dosed with logic - but more on that later&quot;<p>I certainly don&#x27;t feel my views are dosed with logic? Which kind of &#x27;logic&#x27; are you referring to here? Is there something preventing you from moving your logic outside of the view?<p>&quot;Their first experience of DI is quite often that in Angular and it&#x27;s horribly broken. Since the &quot;patch&quot; which fixed the minification issues, it&#x27;s still really just a square peg in a round hole with woeful support for scope and lifetime and features which most DI gives you for free such as child containers. They end up hating DI and shy away from it on other projects.&quot;<p>This seems like wild speculation here, as well as not being very specific (how is it broken?). I&#x27;m sure DI in Angular could have been done in a more elegant way (I have no idea how), but I don&#x27;t seem to run into any problems.<p>&quot;Strange bugs that (when called over) have us all scratching our heads until one of use realizes - oh yeah, sorry we forgot to mention that pretty much everything passed around is global, and Directives etc. aren&#x27;t namespaced, so I see what&#x27;s happened - you&#x27;ve got a naming collision there&quot;<p>Not sure what to respond here - you had a bug in your code and discovered it was due to naming collision. Do you run into this daily? I&#x27;ve run into &#x27;strange bugs&#x27; or at least hard-to-diagnose bugs in almost every framework or library I&#x27;ve used.<p>None of these issues seem especially unique to Angular. I&#x27;m not saying Angular is a perfect framework, but my own experience have been mostly pleasant, and I don&#x27;t feel that there is anything in particular in Angular vs. other frameworks or libraries that encourage bad behavior - juniors or seniors.
评论 #8967417 未加载
评论 #8966328 未加载
colundover 10 years ago
The page is not loading properly for me (on a Windows laptop with Chrome). When I use the given link I get &quot;500 - InternalServerError Something went horribly, horribly wrong while servicing your request. We&#x27;re sorry :-(&quot; and when I go via javascriptkicks.com it keeps loading and never completes.
评论 #8966103 未加载
评论 #8966169 未加载
评论 #8966254 未加载
评论 #8966212 未加载
评论 #8966138 未加载
评论 #8966383 未加载
评论 #8966446 未加载
评论 #8966075 未加载
评论 #8966150 未加载
robertthegreyover 10 years ago
There was a lot of commentary on my first post <a href="https://javascriptkicks.com/stories/2657" rel="nofollow">https:&#x2F;&#x2F;javascriptkicks.com&#x2F;stories&#x2F;2657</a> about not detailing enough why I think Angular isn&#x27;t good for junior programmers asking for more detail. Here it is.<p>One of the big motivators for this follow-up post is due the the cries of FUD. Of course it&#x27;s just my opinion, but I like to back my opinion up with facts if possible and it seems there were some questions cropping up around how much of a problem it geniunly is versus me just having a whine about it.<p>In all fairness I&#x27;m excited about Angular 2.0, but it&#x27;s just too far off to quantify its use just yet. So it&#x27;s not that I&#x27;m anti-Angular, I&#x27;m just anti-Crap, and there is a lot of that in the first incarnation I&#x27;m afraid, and it&#x27;s biting too hard to ignore.<p>I hope my next post will be a lot more cheerful :)
city41over 10 years ago
I find it interesting that most negative Angular articles are so vague. Why is it so tough to articulate what is wrong with Angular? I agree Angular is not the best, but I don&#x27;t have such strong negative feelings for it. I&#x27;ve used it successfully in the past and as long as you keep things simple and don&#x27;t go overboard with all that it offers, you can create a decent website with it.
davexunitover 10 years ago
I wish I could go back in time and strongly oppose AngularJS at the last place I worked. Knowing what I know now, it was such a bad idea. I also made the mistake of adding it to a resume, too, so I have gotten too many recruiter emails about AngularJS jobs.<p>AngularJS has an amazing success&#x2F;failure story. The developers have managed to get their technology used by so many web development teams whilst being extremely over-engineered and having a very steep learning curve. Why did so many of us get enamored with it in the first place? The power of Google?
评论 #8966235 未加载
评论 #8966792 未加载
评论 #8966603 未加载
评论 #8966241 未加载
batoureover 10 years ago
&gt;those that said I was just spouting FUD<p>I was not part of the crowd that made this comment at the outset of the first article but I would say that the second article only confirms the suspicions of these readers.<p>Identifying a treacherous design pattern is one thing. To say that a particular pattern says one thing or another about the skill or scale of a particular developer is another. Especially in the land of Javascript frameworks where the flexibility to do and incorporate anything can be a serious poison pill.<p>I have worked on and lead two teams that implemented angular projects, on the first we moved into it as a group of relatively experienced developers. In the second we on-boarded a number of junior developers. My experience with the junior developers was that they took their queues pretty quickly from the work of the senior developers.<p>In particular I have never seen this particular pattern in our code. I have found that the tendency to want to break the angular paradigm with outside JavaScript or angular library injection overkill are much more common practices that we end up needing to spend time quashing.
rdtscover 10 years ago
I am not a web developer but I have been trying to keep up with the technology.<p>I tried learning Angular because people at work started using and hyping it beyond measure. So I thought &#x27;ok&#x27; this got to be really good stuff.<p>And it was good, _if_ experienced people held my hand. Otherwise I got lost in a soup of what seemed like unnecessary terminology -- $scopes, controllers, digest cycles, dependency injections, directives, and so on.<p>It kind of brought back memories of first generations of Enterprise Java frameworks (you know the factoryfactorymanager joke...)<p>So I have seen Angular work easily for already experienced devs who knew web front-end development very well. For me, what I really like is React. Ever since watching Peter Hunt&#x27;s video one or two years ago, the idea of the virtual DOM and how events propagate made sense and was small enough to fit in my brain. I was able to go through some tutorial and do a few toy project in my spare time.<p>Anyway, if you care for another data point, there it is.
评论 #8966758 未加载
评论 #8966602 未加载
评论 #8966620 未加载
istoricalover 10 years ago
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.<p>I think the difficulty of Angular is largely you have so many tools available but it&#x27;s hard for a junior developer (like myself) to recognise when each should be used.
评论 #8966276 未加载
cpursleyover 10 years ago
In other news &quot;How junior developer was able to quickly ship their first SPA using Angular, satisfy client requirements and get paid.&quot;
guiomieover 10 years ago
Anyone has an exemple on how to use the $scope properly ...? He only shows the wrong way of using it, but has no code for the right way.
评论 #8966368 未加载
staticelfover 10 years ago
Interesting, the title tells something about bad habits but as soon as I try to visit it I just get a &quot;loading&quot; message that never seems to complete. If something is a bad habit, that&#x27;s how it looks like.
radicalbyteover 10 years ago
Is there a way to open this full-screen? I find the pop very distracting.
评论 #8966152 未加载
moron4hireover 10 years ago
&gt; the second camp, those that said I was just spouting FUD because I didn&#x27;t explain myself in detail, which surprised me a bit because those are developers who presumably have been working on Angular and in my opinion should already know about the pitfalls and their effect on juniors.<p>I have come to learn that the majority of people who <i>say</i> they work in a particular system have actually only ever dabbled in it.
MrDosuover 10 years ago
MVVM has been around for years and years. It&#x27;s just newish to the JS scene.<p>It is painful to read articles like this where even the author misunderstands the pattern and failed to read some of the standard literature on the topic. Just because MVVM is hip now does not mean everyone needs to reinvent wheels.
milankragujevicover 10 years ago
If anybody is having issues loading the page, here&#x27;s a really long screenshot of the text... <a href="http://milankragujevic.com/uploads/2015-01-29_151409.jpg" rel="nofollow">http:&#x2F;&#x2F;milankragujevic.com&#x2F;uploads&#x2F;2015-01-29_151409.jpg</a>
评论 #8966208 未加载
wnevetsover 10 years ago
Why junior developers are learning bad habits from &lt;insert anything here&gt;.
yoanizerover 10 years ago
I see a lot of hate, but I can&#x27;t see the arguments.
robertthegreyover 10 years ago
Apologies to those of you who might be having trouble viewing this on mobile - it&#x27;s high up on the list to fix in the coming days
评论 #8966059 未加载
评论 #8966049 未加载
cheshire137over 10 years ago
I wish he had clarified what was wrong with stuff. This article wasn&#x27;t helpful for me at all.
alblueover 10 years ago
The blog rambles and disables native scrolling. It&#x27;s not worth your time reading it.
treerunnerover 10 years ago
Hmm. I think I&#x27;ll check out what my boss blogged about today..
mcmillionover 10 years ago
It&#x27;s like Kinja, but somehow worse.
v512over 10 years ago
seriously, the website design sucks.
评论 #8966975 未加载
kuni-toko-tachiover 10 years ago
The central problem with Angular is what is says about the software industry in general - that a framework so fundamentally and ridiculously flawed could invite such wide appeal suggests that many people have absolutely no idea what they are doing. The thousand monkeys approach to engineering has wide implications for security and safety of systems that we rely on. There is simply no way that you can say that you know Javascript and at the same time support Angular. None.
评论 #8966153 未加载
评论 #8966125 未加载
评论 #8966229 未加载
评论 #8966384 未加载
评论 #8966784 未加载
评论 #8966608 未加载
评论 #8966106 未加载
评论 #8966248 未加载
评论 #8966132 未加载
lcfcjsover 10 years ago
Fix the site! this sounds interesting
评论 #8967141 未加载