6 ms·
I had a similarly frustrating experience when I first set up Python to use Django. The complete mess that is the Python 2/3 split (thankfully somewhat better no
by esperent 6y ago
I had a similarly frustrating experience when I first set up Python to use Django. The complete mess that is the Python 2/3 split (thankfully somewhat better now after many years), trying to figure out what the hell pip and pipenv were (this was before I was familiar with package management).
However, I initially learned some Python in university and I liked it then. We just installed Idle and ran some simple scripts, and everything worked. That's the right way to learn a language. If you dive straight into JS package management, you are attempting to learn multiple things at the same time:
* Node.js environment
* Browser environment
* JavaScript syntax
* 'running a localhost'
* JavaScript modules
* NPM package management
You need to tackle these one by one. If you do them all at once, even with prior experience in other languages, of course you're gonna have a bad time.
Really what I take away from this post is that the author is a bad teacher, although the experience of her student is probably similar to what many people experience when trying to learn by themselves.
There are many improvements that could be made to the JS ecosystem, but this post does not do the current state justice. What it highlights, if anything, is a problem with the available of a standardized learning path. But I'm not sure what the solution to that would be.
- open-source-ux 6y ago"Really what I take away from this post is that the author is a bad teacher" No she isn't. This entire thread is full of the generic excuses one has come to expect from this profession when people struggle with programming setup and running programs. Always a defence of the (broken) status quo. Something has gone wrong? You didn't read the documentation (the incomplete or non-existing documentation). Or it's actually simple, all you need to do is x, y, z followed by a, b, c - how could you not know that? (Often implied in these responses: you're clearly a clueless noob). This is quite simply a profession that wouldn't recognise 'simple' if it came and bit it on the arse (or ass).
- pottertheotter 6y agoI've been learning Vue this year (I'm new to anything JavaScript so that means I also had to learn JavaScript, Node, NPM, We pack, etc.). I'm getting a lot better, but it has been a pretty frustrating experience. There are so many different layers and they are constantly changing what they do and don't use in another layer. I've been working in Python for the last several years. There's definitely a learning curve there, and I get frustrated with things all the time, but the whole JavaScript ecosystem seems like such a mess compared to Python. One of the things I miss the most about Python when working in JavaScript is the documentation. And I mean the core documentation from Python.org. The Tutorial is amazing [0]. And you can download the entire documentation already in PDF. Maybe I'm one of the few, but when I'm learning something new it is such a better process if I can leave my computer and read through a tutorial and mark it up. [0] https://docs.python.org/3/tutorial/index.html https://docs.python.org/3/tutorial/index.html
- emilsedgh 6y agoThat's an unfair comparison. Javascript runs directly on the browser. That automatically makes it much more complex because: 1. There are some packages written for browser and some for Node. 2. There are transpilers, abstractions layers, bundlers, etc to make packages run on both environments. 3. Browser based packages need to have all sort of backward incompatibilities in mind (from IE6 to now) Multiply these 2 and 3 together and you'll see why it's a mess of an ecosystem... Yet, it only takes a little bit of knowledge and experience to get something working. It's hugely productive. I mean honestly considering the hand dealt with it (decades of backward incompatibility required), I think the js ecosystem is holding up real well.
- rk06 6y agoif you are learning vue and new to javascript ecosystem, would it not be better to start with index.html using Vue from a CDN, and switch to advanced workflow (node, npm, webapack, etc) later? of course, if you are new, then this approach may not be obvious
- nicbou 6y agoWhen I learned Vue, I just inclued the library with a script tag, and started writing plain JavaScript around it. That was about 3 years ago, and I just started using modules. Even then, I use the native browser modules, no Webpack. With HTTP2, there is little cost to requesting many small files. Likewise, I don't use a CSS preprocessor in any of my projects. They aren't that complicated. Those projects have no build process. What you write is what you run (WYWIWYR?). If the project is small enough I'll serve its root directory with Python's SimpleHttpServer. Later, I might have nginx do it. This allows me to get a project running in a minute. I add tools when they are needed, because then I have the motivation to learn them and set them up properly. Such tools are required if you must coordinate the work of multiple developers. Their cost is divided by the number of devs, and their benefits multiplied. If you're just a home gamer toying around, you can do without them.
- tbran 6y agoI completely agree! I started using Vue from a script tag a year ago (not that hard). But when I started building an SPA, things got complicated very quickly. I found myself longing for a really good tutorial similar to Django's [0], rather than the thousand variations of "Today We'll Build a To-Do App in Vue!" that are so common. For the projects that I work on, I use the same pip/virtualenv setup that I've used for years. Can't imagine that happening with Webpack (Side note: it might be that I could use the same Webpack setup for years, but the unstable reputation around the JS ecosystem makes me think I couldn't). [0] https://docs.djangoproject.com/en/3.0/intro/tutorial01/ https://docs.djangoproject.com/en/3.0/intro/tutorial01/
- cornishpixels 6y agoIMO this is a symptom of a larger problem with the entire web 'ecosystem' (HTML, CSS, JS primarily). It all tries (or tried, anyway) to be simple and easy and forgiving - which means that simple things are easy, and moderately complex things are insanely difficult. I honestly think the only real solution is re-doing all of it 'from scratch', to make everything (a) stricter and (b) more normal/consistent. (I think the extant transpilers/preprocessors tend to try to be too 'thin' of a wrapper around CSS/JS: they do give some nice quality of life features but still don't really clean up the mess that is JS and the DOM.)
- Paperweight 6y agoIf you push down the front of the learning curve, the back gets steeper.
- michaelt 6y agoThat depends on how much of the front of the current learning curve is composed of things people will need to know later. A person can be a successful programmer for decades and do millions of HTTP operations without knowing the distinction between TCP and IP.
- wrnr 6y agoIt actually it is (mostly) as easy as it can be if you think about how the web lets one run third part code safely, not only as a sandboxed in the host environment but also from different domains. I've seen this space evolve since the days of DHTML and the best way to create dynamic content is with document.createElement. Actually I use the crelt[1] util, and the code is shorter and faster then any React/Vue virtual-dom templating system. It like finally riding a bicycle a without training wheels after 15 years of practice. [1] https://github.com/marijnh/crelt https://github.com/marijnh/crelt
- PopeDotNinja 6y agoComing from a language that didn't need virtualenvwrapper, I can't say I was a fan of needing to learn how to use virtualenvwrapper.
- weiming 6y agoAnd so I use create-react-app anytime I need to start a front-end JS/TS project, even if I am not using React at all. Basically avoiding dealing with troubleshooting the soup of build time dependencies and mismatching package versions, which unfortunately comes with the modern JS (or node) ecosystem.
- onion2k 6y agoUsing Parcel.js (https://parceljs.org/getting_started.html https://parceljs.org/getting_started.html) or Snowpack (https://www.snowpack.dev/ https://www.snowpack.dev/) would give you the same benefit without pulling in the React things that you're not using.
- number6 6y agoHow did you come to the conclusion that the author is a bad teacher? Sometimes I am in the same boat. Thinking, this should be easy, ending up yak shaving.
- torb-xyz 6y agoI was going to use Django for a project, but ended up not doing so, as I was literally not able to set up my Python project correctly. For all Python's ease of use language wise it‘s ecosystem can be utterly inscrutable.
- esperent 6y agoYeah, I almost gave up. I'm glad I didn't though, because, occasional hiccups with pipenv aside, Django is great to work with.
- extra88 6y ago> the author is a bad teacher She wasn’t helping one of her students, she was helping a friend who is a computer scientist. The closing thought was if this person, with so much existing knowledge and some assistance, can’t make one “simple” thing work in a reasonable timeframe, what hope do actual novices have?
- machiaweliczny 6y agoNovices don't need any of this - Babel and webpack are for pros who need to support IE9. I have in my team 19 year old who knows all this stuff to implementation detail, so it's not that hard to learn - speaks more about this friend. Novices should be referred to preset codesandbox.
- extra88 6y agoThe article didn't mention Babel or Webpack, the first attempts to use the module were with Node, not in a browser. There's blame to go around but I mostly blame npm for being full of hot garbage while obscuring what is garbage and hot.
- thawaway1837 6y agoI’m pretty sure the author isn’t teaching anything but is instead pointing out the unfortunately common pitfalls when having someone new start with the JS ecosystem.
- hajile 6y agoJavascript is the ONLY language where people think they can just pick it up and use it with ZERO education first. Sure, they spent years learning to program in language X or Y, but even a couple days to learn Javascript is just too much effort. If you think learning NPM is hard, try telling a new dev how to setup a Java or C# build by hand. If you think webpack is hard, try teaching someone the intricacies of make. What about babel? Other languages make breaking changes and dictate that the new version of code just won't be compatible with older stuff. Python 2/3 wouldn't be a blip on the radar if the same option to transpile between versions existed. Those famous "update your .Net version to whatever" warnings simply wouldn't be needed. Instead, people complain that learning a few lines of config is too difficult. If people put half the time into learning JS that they put into learning the other languages and build tools they know, there would be almost no complaints because the tooling these days just isn't that bad.
- growse 6y ago> Javascript is the ONLY language where people think they can just pick it up and use it with ZERO education first. Sure, they spent years learning to program in language X or Y, but even a couple days to learn Javascript is just too much effort. The problem is not one of putting the effort in, it's even knowing where to go. If I want to learn about how to use some new JS library/utility/webpacker, I can probably find about 30 good-quality-looking blogs/articles/documentation pages on how to do it. Most of them won't work, because they'll be out of date. This is hugely frustrating, because you don't know if it's not working because the documentation is wrong, or because you're holding it wrong. > If you think learning NPM is hard, try telling a new dev how to setup a Java or C# build by hand. If you think webpack is hard, try teaching someone the intricacies of make. Make is actually a brilliant example of something that's complex and daunting, but ultimately rewarding. It's easy to put the effort in to learn it because the maintainers don't change their minds every 2 minutes about what the Makefile syntax is, so learning how to use it is pretty straightforward. And once you know it, you can understand makefiles written both yesterday and decades ago. Give me make over webpack any day of the week. I'll put money on which dies first.