9 ms·
First the term. By fragmentation I mean two things: 1) we have many libraries doing the same thing. 2) the implementation is JS is not the same in every environ
by kowdermeister 10y ago
First the term. By fragmentation I mean two things: 1) we have many libraries doing the same thing. 2) the implementation is JS is not the same in every environment.
If you are spending most of your time writing other languages which have a standard library, I can understand your opinion.
However, I see fragmentation as:
1) It introduces the opportunity everyone on the planet to give a shot at implementing something that may or may not be better than we consider today the best. For example I used a datepicker in my latest project but in the current it failed and I could replace it in 15 minutes rather than spending hours finding the issue with the "standard one". I'm not really experienced in the C++ world, but I guess people would call me crazy if I proposed a new stdio lib. Maybe there could be better libraries, who knows. It's a settled game there. See jQuery in JS land, it was for many years, "the golden tool". Now we have alternatives for more specialized workflows. Not everybody wears the same hat all the time.
2) EcmaScript is constantly evolving, that causes another fragmentation, but this also allows the dev community to propose changes, implement new features and create a really vibrant feedback loop. If you stick to the latest stable (currently ES5) you are safe to build whatever you like with great stability.
- inimino 10y agoThe fact that people can contribute is great, the fact that it is impossible to get started in modern JS development without making dozens of seemingly inscrutable choices is not.
- radioact1ve 10y agoExactly this. All of the upfront choices, will I make the right choice? I've been meaning to jump in and learn. After years of backend development (C#, Python, and some Go), I want to give JS a shot and at least experiment. It's a daunting process that I keep pushing back as there is no immediate need.
- inimino 10y agoThe best thing to remember is that if you're doing it for fun and learning, you don't need anything but a plain old HTML5 and a plain old script tag. Once you feel you need something more than that for a particular project (or for work) you'll be better able to evaluate what's out there. <script> // get started! </script>
- pauly 10y agoeven simpler open your browser console and just start typing, I've found new ideas by letting the autocomplete there guide me
- irrational 10y agoThis. Someone starting out should not be using webpack, react, jquery, lodash, etc. etc. etc. You need to first learn vanilla javascript which requires nothing more than a browser and a text editor.
- Klathmon 10y agoRealistically, you won't make the right choice. But that's okay. Because of the number and size of most packages, they are easily replaceable. Like the commenter higher up said, it's not like C#, Python, or Go where if you have an issue with a library, it could take days to find and implement a replacement. The vast majority of libraries in JS land are small and single purpose. Think of it as replacing the air-filter in your car vs the whole engine.
- Klathmon 10y agoBut that can (and is) solved by either just "picking one of the big ones" and moving on, or by using even more tools layered on top to abstract away a lot of those choices (don't know anything about how to start with react? Just use react-create-app and go from there).
- inimino 10y agoThen a couple years later you've learned a lot of arcane details about something that has already fallen out of fashion. It's not the end of the world but it's not optimal.
- tlrobinson 10y agoSuch is life in programming. But feel free to continue using jQuery if you feel all the new stuff isn't worthwhile. IMHO the sweet spot for picking up new JS tech is about a year or two after it first starts appearing on Hacker News.
- inimino 10y ago> Such is life in programming. Actually no, the technology churn is much higher in JavaScript-land than most anywhere else.
- moron4hire 10y agoThat is not true at all. It's also not an issue that is going away. This is The Singularity. It's only going to get worse. Either you learn to adapt or you get left behind. And "adaoting" could mean, "learn to quit being a magpie distracted by evwry shiny new thing."
- irrational 10y agoThis seems to be true, but I see it as a consequence of how many resources are being devoted to JavaScript by major corporations and legions of developers versus other programming languages. Does Google, MS, Facebook, Apple, etc. ad naseum have entire departments devoted to improving Python, C, Ruby, etc.? Not as far as I know. If there were as many resources being thrown at C as there is at JavaScript I'm sure the churn would be just as high.
- kowdermeister 10y agoThat's because "modern javascript" is not there yet, it's still in an experimental phase, we need transpilers and other stuff to use features that are not in a finished state. It will get better with time.
- inimino 10y agoAnd that getting better process is what people mean by reducing fragmentation.
- papyrus23 10y agoYou're literally contradicting yourself. "It's not there" i.e its a stinking pile of shit.
- ldehaan 10y agothat's not correct, and he did address why it doesn't suck. because it's not standardized. some people do better with more complicated things, it's ok to need directions, not everyone does.
- boggydepot 10y agoyour sentences fit in that blog post about a conversation with someone who wanted to build a simple web app in jquery
- monocasa 10y agoSo when is Javascript not going to be in an experimental phase? A couple of years ago it would have been 'when browsers support ES6'. Now it's 'when browsers support ES7'. Next year it's going to be 'when browsers support ES8'.
- irrational 10y agoTo be fair, ES6 was huge. ES7, and probably ES8, are tiny by comparison with only a few new features. Once browser creators get caught up on ES6 it _shouldn't_ be too hard to stay caught up after that point. But, most of experimentation isn't around the core ECMA features. The experimentation is happening around the toolchain, the libraries, the frameworks, etc. which are separate from stuff like ES6.
- moron4hire 10y agoPlain old HTML, CSS, and ES5 still work. You aren't forced to install Node and Gulp and any of those things. So I rather much thing the use of the word "impossible" is way out of line here.
- inimino 10y agoThey are the foundations, and I recommended them in this very thread. But that's not what most of us would call "modern JS development". The amount of extra stuff between the foundations and current "best practices" is exactly the problem.
- moron4hire 10y ago"best practices" is just a phrase. There is no objective proof that what people call "best practices" is at all. Far more often, I've seen it used as a protectionism for not learning or trying new things. Stuff like minification you probably want a pre-existing tool to do. It's stupidly simple and not that difficulty to integrate into any build process. But stuff like transpiling is completely optional. ES5 is a really high level language. There isn't anything particularly "wrong" with it, not any more so than most any other language you'll end up using.
- tracker1 10y agoStart with understanding \JS... then understand ES6 and CommonJS style modules. From there, understand that babel is just a tool to let you use new syntax, which has stabilized a tot since ES6, there's a few bits for async still baking, but that's to be expected. Beyond this is the node-style callback, and more about Promises and async. These are the core of it all... from there, it's a matter of picking the lego pieces you want to use. What I described above is no more complex than the JVM or extended .Net APIs, especially when you pick all the target options there... in fact the footprint is a lot smaller. Yes, it's a little harder to build something with the 2000 piece lego generic pack than it is with the guided here's a pirate ship with all the parts laid out. But that's what engineering is all about. If you're really stuck, start with a boilerplate or starter generator tool, there's a few of them for whatever direction you are leaning. Don't worry about picking "the right one"... there is no true path. No matter what you pick, you're going to hit a wall that conflicts with your sensibilities. Angular has the biggest adoption of any web framework ever and only has a 44% approval rating for reuse. That means a LOT of people pick wrong. Adapt, learn, grow...
- tracker1 10y agoThat's what boilerplates, and even generation tooling like yo is there for.
- heisenbit 10y agoI concur with your experience that date-picker is a not yet solved problem. I disagree that I can find in 15 minutes an alternative that carries less risk repeating the same experience. For the building to rise higher the foundations need some solidifying.
- humanrebar 10y ago> I'm not really experienced in the C++ world, but I guess people would call me crazy if I proposed a new stdio lib. Some would. But there are plenty of companies and projects with their own standard libraries. There's also serious (but early-stages) discussion within the C++ standards committee about developing an std2.