6 ms·
This is actually pretty funny. I coded javascript for a solid ~18 years (I stopped about 3 years ago) and the majority of the concerns in this list are from the
by 0xr0kk3r 3y ago
This is actually pretty funny. I coded javascript for a solid ~18 years (I stopped about 3 years ago) and the majority of the concerns in this list are from the past 10 years. What I find glaringly absent, which would have been present if this were written in 2013, is the absence of polyfills.
What other things that were JS nightmares in 2013 have largely ceased to exist? (Only to be replaced by this funny list.)
This is my favorite part: "You stop to count how many tools and parsers work on your codebase: TypeScript, esbuild, swc, babel, eslint, prettier, jest, webpack, rollup, terser. You are not sure if you missed any. You are not sure if you want to know. The level of pain is so high you forget about anything else."
- k__ 3y agoGrunt, Gulp, CoffeeScript, IIFE, overridden undefined, with, closures to create private fields, modified prototypes, variables global by default, call-site-this, automatic conversions for comparisons... Ah yes, over a decade of JS.
- Sivart13 3y agothis list feels just a short jump from “we didn’t start the fire”
- eyelidlessness 3y agoThe only change in lyrics is “it’s been burning us since…”
- Ygg2 3y ago"It's been burning, since IE was turning"
- theblazehen 3y agoInspired by it: We're gonna build a framework https://www.youtube.com/watch?v=Wm2h0cbvsw8 https://www.youtube.com/watch?v=Wm2h0cbvsw8
- malfist 3y agoI am so glad you shared that. I've never seen it before and it made me laugh so hard I cried.
- yawnxyz 3y agodealing with IE6 nightmares
- jaggederest 3y agoThe IE6 debugger, specifically, which Did Not. Especially when it was a very specific IE6 crash bug that did not occur in any other context. Drawing vml polygons on maps.
- jamesdwilson 3y agoerror on line 0
- mhd 3y agoI kinda miss CoffeeScript, to be honest. I also miss ExtJs.
- cjauvin 3y agoI have done things with Ext JS that now take me forever with React + MUI. I miss it too.
- k__ 3y agoAren't there commercial ExtJS-like frameworks built on top of React? Kendo UI commes to mind.
- mhd 3y agoIt really depends on what you're missing from ExtJS. Yes, there are some frameworks oriented towards more desktop-like UI components. Some of them even do layout, maybe even non-view stuff (Kendo seems to do at least the former). But there are other degrees of ExtJS nostalgia: - Being allowed to do everything in a desktop-like manner, and not having to bother too much with either mobile or more stylized web applications, even in enterprise contexts. No technical issue, no technical solution. - Doing that in a simple manner. Even contemporary (> v4 or even v3) ExtJS might not be "ExtJS" in this regard, as the framework part got a lot more complex. First with their own weird tooling, nowadays with the worst of both worlds. - Not having to touch HTML and CSS. Early ExtJS allowed you to do most things with heavily nested JS literal objects. With angular/react/etc. it's all separate syntaxes, most of them with angle brackets.
- troupo 3y agoI'm also a bit pissed that in the past 10 (or more) years we still haven't gotten good established components in the browser that do even half of what ExtJS could do (and still does). We may have some by 2050 thanks to https://open-ui.org https://open-ui.org Browsers did pour billions of dollars and hundreds of thousands of man-hours into a lot of bullshit though :(
- 3y ago
- yard2010 3y agovar that = this
- outsidetheparty 3y agoI always favored `self = this`, personally
- no_wizard 3y agoCareful not to overwrite global self! Oh the foot guns of `this`
- runlaszlorun 3y agoOverridden undefined? Omg, that’s awesome. I think anyone feeling like a corporate mindless drone should sneak that into a code base. And I thought overriding toString() was naughty. In my defense, on my personal projects I have started using var instead of let/const, snake_case everything, don’t use semicolons, manage my objects with my own prototypical inheritance, and am fucking around with my own shitty Canvas2D widgets. Turns out ditching the DOM and using a Turing complete language still beats the crap out of wrestling with the DOM even if you have to reinvent things like word wrap and text areas. Oh! And there’s not a framework in sight. The funny thing this is, my productivity and error rate have way improved. Prob coincidence but I do actually enjoy it much more. Take that ChatGPT! edit: I actually write web assembly by hand too. Binary even. And have my own little shim in wasm to override its type safety, put code in my heap space pure von Neumann style, and have my own program counter so I can jump and goto. Can’t wait to start doing self-mutating code. I know this sounds like I’m being sarcastic here- I often actually am- but I kid you not my error rate has plummeted and its become a blast to program again. My internet actually slowed to dialup speeds lately so I’m only going to MDN or Stack Overflow if I really have to as well. ‘Modern javarscript’? Hahahaha.
- ttfkam 3y agoundefined couldn't be minified. If you assigned it to an undefined variable early on, any minifier could easily convert it to yet another single-character variable name. undefined became U (for example). An 8-byte or more reduction per reference. What can I say? Size used to matter. (Been doing JS since 1996.)
- no_wizard 3y agoIf you allow it I think most minifiers nowadays use `void 0` for undefined as it’s smaller. Though I should try this, using a variable alias for undefined and null would maximize minification.
- golergka 3y agoCallback hell, and a general lack of types. I have has a misfortune of spending today writing a test assignment for a company that still uses vanilla JS, without promises or declaration files. Felt right back in 2012 when I first tried node. Worked around the requirement of using JS by utilising JSDoc, but still — it was much worse than I remembered.
- eyelidlessness 3y agoFor future reference if you ever need to do it again, @callback is roughly equivalent to @typedef but for defining function types, and @template is generic type params for both. It’s not a good TS replacement whatever anyone might tell you, but it’s a reasonable approximation of what you might need in a pinch.
- jmchuster 3y agoSupporting ie6, ie7, and ie8 separately while developing on firefox just so we could use firebug.
- qup 3y agoI was on the "fuck ie6" train. I had to write some support for ie6 in like 2015, I almost quit the job.
- jitl 3y agoI'm so glad Internet Explorer/Edge/Trident is Officially Over. If you told me in 2010 that in 10 years the worst browser I'd have to support was Safari/Webkit... I'd be overjoyed.
- ttfkam 3y agoOne thing (only thing?) I honestly miss about IE5.5-8 is how amenable the engine was to polyfilling. It wasn't fast, but you could do almost anything with the right polyfill technique. No sessionStorage? Use window.name. No (then-) modern CSS? Use CSS3PIE [0]. IE doesn't support the transform CSS property? Use an *.htc behavior to convert the transform to a matrix filter. It was madness, and it was beautiful in a Cthulhu kind of way. [0] http://css3pie.com/ http://css3pie.com/
- noduerme 3y agoI second @golergka about callbacks. The BIG pain point for me, though, looking at my 10-year-old JS, is that it's all made of "classes" built up by modifying SomeFunction.prototype, which then get wrapped in a self-invoking anonymous function and returned as an object, just so you can call `new SomeFunction()` ... `SomeFunction.actualFunction()` as if SomeFunction were a class. That and also the lack of arrow notation; modifying Function.prototype itself to use .apply() to bind events to scope (or else just an endless abyss of .bind(this) in event callbacks)...
- deleted 3y ago[deleted]
- golergka 3y agoToday I don't even write promises anymore. Using fp-ts and piping data through Task and TaskEither monads feels so much better and easier to write and maintain.
- jon-wood 3y agoI know what most of those words mean, but I have no idea what they mean in that order. This feels symptomatic of the general state of Javascript, where I've not written any for a year or so and am now wildly out of date.
- christophilus 3y agoPeople often complain about how complex it is, but it’s really just a matter of passing endofunctions through transplainer pipelines so that you can asynchronously hydrate the islands.
- lvncelot 3y agoSeriously, once you understand the ui as a superposition of entangled complex-valued eigenstates that only collapse into place once an observer visits your page, frontend development becomes so much easier.
- EdwardDiego 3y agoPrototype.js monkey patching every prototype it could get its mitts on
- jon-wood 3y agoReplacing headers with a little Flash applet so that you can use whatever fonts you like, rather than being limited to whatever the user had installed.
- wakaru44 3y agoare polyfills solved just with core-js ( https://vived.io/fascinating-story-of-core-js-frontend-weekly-vol-125/ https://vived.io/fascinating-story-of-core-js-frontend-weekl...), or is it because people don't support as many different browser engines these days?