Live data from Hacker News

Do Not Follow JavaScript Trends

pragmaticpineapple.com

141–150 of 275 posts

Re: Do Not Follow JavaScript Trends

#141
post #9

I'm a little lost on the examples. There are reasons to use fetch and hooks, and the article seems to relegate them to being unnecessary 'trends' without doing what it suggests, actually evaluating what value they might have... In React you can use hooks with a class heavy application and still be just fine / get the benefits of hooks in a given component(s). If you want to use fetch, that also is hardly an ordeal to…

I’m personally becoming frustrated by the “we draw the line at React hooks” idea - which I feel like I’m seeing repeated. Like that’s the point at which learning new concepts crosses over from useful exercise to useless extravagance. So let me say something which is true, but totally against the spirit of this article: there should be 10x as many (!) tutorials about how to implement everything in React using hooks. M…

I'm just now getting back into webdev after 3 years. Can you please recommend a good tutorial/demo using Hooks? Especially if it's using Typescript!

I strongly dislike the create-react-app project because it abstracts everything away.

Re: Do Not Follow JavaScript Trends

#142

I vividly remember 2016. I was doing backend programming at the time, but no one I knew were using Angular.js at that time for new codebases. React emerged in 2013, by 2014 the hype was at full swing, and by 2015 React "won" the framework battle. It's been 5+ years since then, and React JavaScript world was remarkably stable. Fashion changes were largely superficial: React.createClass vs ES classes, Heavy use of Deco…

Yeah; I think your timeline is off. I don't remember React being the very clear choice until probably 2017. It was still up in the air in 2016, and certainly moreso in 2015.

> by 2015 React "won" the framework battle.

Things have calmed down now. Its better, and has been for a couple years (not 5+ years). But, this isn't a battle. Its not a war. Just because things are calm now, doesn't mean they won't go crazy again.

The core of the issue has nothing to do with technology, or the frameworks, or programming languages. It has everything to do with how you, I, and Dave, who's reading this right now, respond when these new technologies come out. Just. Say. No. Play with them. Build toy projects. Give feedback. But for the love of God, at the end of the day, you Say No. No, we will not be integrating this. Looks cool though, we'll circle back in a year and see what progress you've made.

Re: Do Not Follow JavaScript Trends

#143
post #78

Earlier quoted context omitted.

> Since its introduction in late 2016 Angular 2+ has had no major changes As someone who has used Angular 2 since beta, I can tell you, it's been a bumpy ride nonetheless. > its target audience - large companies making large-scale applications - is fairly conservative React was built for Facebook, which is a large company building a large-scale application. > All this won't matter once the next gen compiler-framework…

> As someone who has used Angular 2 since beta, I can tell you, it's been a bumpy ride nonetheless. Oh yeah. I remember the "let's just apply the good parts of AngularJS here and there" in v4-6. "React was built for Facebook, which is a large company building a large-scale application." One large scale application, which is not enough to create stable conventions that are badly needed in a framework that's supposed t…

> Users don't tolerate the inherent delays caused by this approach anymore.

Well, I'm from Germany, but have a 6-y/o Android phone and live in a rural area with poor EDGE connectivity (~50kb/s). Most "modern" websites don't load/work for me.

From my personal experience, there's quite a few people now saying that their computing devices are getting faster and faster every year whereas the majority of websites, uh, webapps are seemingly getting slower each year...

This is also not just a problem with mobile and poor connectivity. Here's an example from my high-powered desktop work-station with a 100 mbits: When I open https://github.com/, my repositories (on the left) are server-rendered and shown instantly as the site is loaded, which usually happens in under 1s. The activity feed in the middle is rendered asynchronously on the client. It usually takes around 3-6s to finish rendering on my machine (while there is space for 5-8 activity feed items on my screen).

Optimizing SPAs is notoriously hard. You don't really have to optimize HTML.

Re: Do Not Follow JavaScript Trends

#144
this is a fight a developer alone cannot win. my first job after college was in a company that created a software to manage industrial production. they were on their third refactor of their frontend. first was polymer?, then angular and now they were trying vue. I spent a lot of time and energy trying to convince them to write they own framework, if they like frameworks so bad. funny story, that's how I built FOS, the framework I use on my website. anyway, I was hired by some other company and don't know the end of the story there, but I'll bet they went with vue, just to rewrite the whole thing in react in a couple of months

Re: Do Not Follow JavaScript Trends

#145
post #118

I vividly remember 2016. I was doing backend programming at the time, but no one I knew were using Angular.js at that time for new codebases. React emerged in 2013, by 2014 the hype was at full swing, and by 2015 React "won" the framework battle. It's been 5+ years since then, and React JavaScript world was remarkably stable. Fashion changes were largely superficial: React.createClass vs ES classes, Heavy use of Deco…

Rewrites only make sense if you get a multi-fold improvement. In the history of computing, that's rare. So they rarely make sense. Well, JavaScript was really horrible when it came out. It was just about the worst major programming language ever made. It sort of reminds me of an interpreter I threw together for a programming language I invented when I was in high school, when I really didn't get any aspect of program…

Typescript is leagues ahead of Python. Types and async/await are the big ones, but destructuring, no lambda weirdness, optional chaining, nullish coalescing, proxies, JSON support, and generally debugging tools are all better.

Re: Do Not Follow JavaScript Trends

#146
post #118

Earlier quoted context omitted.

Rewrites only make sense if you get a multi-fold improvement. In the history of computing, that's rare. So they rarely make sense. Well, JavaScript was really horrible when it came out. It was just about the worst major programming language ever made. It sort of reminds me of an interpreter I threw together for a programming language I invented when I was in high school, when I really didn't get any aspect of program…

How about using Typescript? That still seems like a huge improvement, especially because you can implement it incrementally (aka for parts of code where type checking is vitally important). I'm using it now at my work and I'm surprised how much info I'm getting compared to whatever JS is throwing at me.

Typescript doesn't strike me as a multi-fold improvement. Dynamic vs static typing is an age-old debate, and in general, advocates can be found arguing that moving your code in either direction results in benefits. So, regardless of your stance on it, it seems unlikely to be unambiguously beneficial. Many large programs exist written in dynamic languages that do just fine.

Re: Do Not Follow JavaScript Trends

#147

I vividly remember 2016. I was doing backend programming at the time, but no one I knew were using Angular.js at that time for new codebases. React emerged in 2013, by 2014 the hype was at full swing, and by 2015 React "won" the framework battle. It's been 5+ years since then, and React JavaScript world was remarkably stable. Fashion changes were largely superficial: React.createClass vs ES classes, Heavy use of Deco…

You make it sound like we're all using React and that's all there is to it. That's not quite true, and it's just one of the choices you have to make. So you've decided on React, but what about state management, transpilation, do you use GraphQL? What am I doing for styles, should I write them in Javascript too now? Oh no! Webpack isn't for me! Can I use modules yet? Ah bugger, we need SSR, suppose I should have managed state the "Right Way (v28.6)", doh!

Re: Do Not Follow JavaScript Trends

#148
post #55

Earlier quoted context omitted.

I once worked with a group of people that were afraid of makefiles. I doubt it was your age. People are always afraid of things that are unfamiliar. This applies to snakes and spiders just as much as it applies to programming languages and associated technologies.

> I doubt it was your age. Wish I could share your confidence, but I have run face-first into this phenomenon. [...removed some stuff that I don't feel like backing up...] We are an unpopular bunch. It used to get me quite upset, but I’ve learned to make it quite clear that I am no youngster; right up front. Avoids stuff like what I mentioned.

Really? Do you have specific examples. In my experience hacker news tends to be much more friendly and sympathetic towards older programmers.

Re: Do Not Follow JavaScript Trends

#149
post #88

From a developer perspective, changes in frontend web development have been pretty dramatic: CSS Grid / Flexbox, React, WASM, extensions to the web API, lots of new JS features, countless frameworks, plugins and build tools more homogeneity between browsers. There is always lots of change and excitement. I wonder how much of that "innovation" really makes a difference to users. As a programmer, I get a bit cynical ab…

I want to break this list of things down a bit; CSS Grid / Flexbox - Flexbox was defined in 2009, and was added to browsers about 10 years ago and iterated since. It was literally in the first public version of Chrome. This is not some new tech that's blindsided everyone. Grid is a couple of years old. React - First released 7 years ago and iterated since. Reasonably mainstream for 5 years. That's not a very dramatic…

There is always some lag when it comes to being safe to use certain features, while it's true that flexbox is quite old, consider that at the time it was released many people still had to support browsers like IE6/7.

Re: Do Not Follow JavaScript Trends

#150

A good way to not be completely overwhelmed by all the new tooling and frameworks is to have a strong grasp of the fundamentals, here are three foundational resources: "You don't know JS": https://github.com/getify/You-Dont-Know-JS "How browsers work": https://www.html5rocks.com/en/tutorials/internals/howbrowser... "High performance browser networking": https://hpbn.co/

Agreed. I think a lot of folks suffer from not understanding how web 1.0 worked and really groking REST/HATEOAS (which has since been hijacked for JSON APIs, which is complete nonsense.) Sometimes I jokingly call htmx "web 1.1 tech", but increasingly I wonder if I'm really joking.

I really "doubt" you were joking!

I'm sorry, I couldn't resist the pun.

Post reply on HN