by siempreb · 7y ago · 0 comments
Not 1 year you can write the same kind of code (professionally), every month new libraries you have to use, always a new framework or cloud service on the horizon, always a new hype in the making. And if all the new things in the JS world would be great solutions it could be awesome (maybe). But the reality learns that it only gets more complex and tiresome every day. Juggling with design patterns, not because they are a better solution than the design pattern you were using before, no, it's because some famous JS artist came up with an 'idea' and the entire JS herd is following it blindly. Think you can still write in the old fashion? Nope, PR declined! You protest? Beware of the company politics, the herd always wins.
Oh btw, I guess the title is inappropriate, JS is deprecated, it's Typescript now! Not sure for how long, but the jobs where you can write JS are disappearing. So web developers are now forced to write in another language, with all it's brand new issues and pain points. Nice! Did I have problems with types in JS? Hardly, but that doesn't count, I now write about 20% more code to get the same result and regularly spend a few hours to get a basic line of code working because the TS compiler complains. It goes on and on, really, unbelievable.. Web development took all the love I had for programming away.. And I acknowledge it is a great recipe for burn-out, if you fancy that.
I originally came from C++ and recently went back to it after 8 years of web development. I totally unexpected rediscovered my joy for programming. I can code things again that actually work and are understandable, without all those black boxes of magic that are pure hell when something goes wrong. I gave up on it, it's not for me.. But still, I can imagine when you're young you can kind of enjoy the JS(TS) world with all those new and exiting things.
Edit: Parcel for module bundling and transpile, but I'm waiting for JS native modules. Eventually React too, will go away in favor of Web Components.
I remember a time when jQuery was considered so standard that every StackOverflow question about "How do I X in JS?" had as the top voted answer "Use $X() in jQuery". All that accumulated knowledge is now essentially a graveyard. I feel React too will be supplanted by something more closer to a WHATWG standard in the future.
The problem, as I see it, is front end developers are still expected to churn out features like they used to in large scale organizations, but we've matured as developers. It's no longer throw a .js file, a .css file and an .html file at a browser and woo hoo you have a site. It requires more time and bootstrapping, but the promise is code that breaks less often and is easier to maintain. It also means we have front end developers that are now specialists in different facets of frontend, such as builds, data layer, typing, feature development and framework design. Notice these are meta jobs.
In order to meet the demands put upon us by our former velocity, we often have to resign ourselves to blackbox libraries and such, which don't always contribute positively to one's stack. Just today we ditched a node module we'd been using because the owner refused to update it. We should be building more internally than we do.
The worst offender for me are reactive stores. I'm reviewing a simple candidates' programming assignment (in Angular, though). There is a simple taks to perform. The horrendously complicated and generally broken ones are those where the candidates decided to use a reactive store. Just tons of unnecessary code impossible to follow and decipher.
> every month new libraries you have to use, always a new framework or cloud service on the horizon, always a new hype in the making
Did your job actually make you switch frameworks or use new libraries every month? Or is this just a trope you're repeating. That's not a problem with JavaScript, but a problem with your management.
And BTW, there are three big frameworks that are all like 5 or 6 years old. React isn't exactly new.
> Think you can still write in the old fashion? Nope, PR declined!
I read posts every day where people talk about JavaScript's horrible language design. Now the language is expanding and solving a lot of those problems, all while maintaining full backwards compatibility, and you're complaining that it changes too often? The last major language update was in 2015, and everything else has been an annual gift of a couple of new features, all of which are developed with the input of the community, and you're still complaining?
The truth is, a lot of people are using JavaScript and it's very flexible, so, yeah, people come up with design patterns all the time. Some of them are good and stick. Some of them are not. But part of the fun of being a JS dev is you can choose to explore that or not.
> JS is deprecated, it's Typescript now!
TypeScript isn't my thing, but again, people are constantly complaining about JavaScript for not having classical language features like strong types. Then an alternative comes out, and is embraced by a large portion of the community, and again with the complaining! Just don't use it! And BTW it seems bizarre to complain about TS being too verbose when you are a C++ dev.
I'm not saying you can't enjoy C++ but your reasons for hating JavaScript just sound like repeated tropes. If you get better at the language (and this applies to TS too), it will stop being so opaque.
The market, if not your particular company, requires that you know the latest iterations/tooling of your chosen framework. Even if you're not forced to use the very latest versions, just being aware of all of that movement has cognitive overhead. If you choose not to pay much attention, you can quickly fall behind the curve. There is an inherent anxiety to that reality, whether it's legitimate or not.
Multiply the number of different tools in a given stack by the frequency of major updates to each, breaking changes between different tool/plugin versions, and you can start to grasp why people often complain about FE dev. These tropes are repeated for a reason.
Typescript is a superset of JavaScript and your type issues could just be because you lack understanding of how type coercion works in JS. Additionally your tsconfig settings could be overly strict.
Huh, that's weird, because I've been writing in Angular & React and using the same basic libraries for years now. And before that it was jQuery and Handlebars and a lot of the same basic libraries for years.
I've made two large shifts in JS development over a decade.
Not sure why you seem to need to switch every month?
I would argue that we should not be intentionally relying on technical design decisions to bust through difficulties which are more related to human factors and office politics than software architecture or implementation.