6 ms·
When I look at what the front-end developers at the company I work for have had to go through with respect to package and dependency management to get an Angula
by sidlls 10y ago
When I look at what the front-end developers at the company I work for have had to go through with respect to package and dependency management to get an Angular application going, I cringe.
The problem isn't that JavaScript is a bad language (that's purely subjective), it's that it has a terrible ecosystem and a community that, apparently, is willing to accept very low standards in library and package management.
- monkmartinez 10y agoYes and I would add that the ecosystem practically begs devs to do this. The language lends itself nicely to these ends as well. I wish there were more options for the web...
- Rapzid 10y agoI have similar feelings about Python.
- cshenton 10y agoWhat problems do you run into? I've had good luck with a pretty vanilla virtualenv + requirements.txt files, and docker for packaging (great for c libs that my python packages call down to).
- Rapzid 10y agoI've worked through most of my packaging and pyenv/virtualenv issues but I must say I found it much more convoluted and painful than any other language I've worked with in the past 6 years. The need for all the virtualenv's makes me sad, and I'm not a huge fan of the shim system. Working on multiple projects that need different versions of a dependency, particularly when your also working on that dependency, can be a pain still. This is very subjective but pipenv was just released THIS YEAR and has over 3k stars on github; clearly there is some general angst out there. But I more meant the ecosystem in general: A "batteries included" language makes me create my own UTC tzinfo implementation so I can get a datetime in UTC... Python's time situation is maddening and by far the worst I've worked with. I'm sure others feel this way because there are a bakers dozen of time libraries trying to fill the gaps. I almost rage quit the industry trying to save and retrieve a UTC datetime from the database with sqlalchemy. Luckily I found Arrow and ArrowType and that's been working well enough for now. On the subject of time this has been open for close to five years? https://bugs.python.org/issue15873 https://bugs.python.org/issue15873 . I get the impression that lots of proposed improvements are languishing like this. sqlalchemy and alembic feel like JUST ONE GUY is working on them. Massive achievement, but the gaps are visible. The module system feels stale; a holdout of a system from different workflow times. Splitting stuff off into separate files for maintainability(including improving multi-dev workflows trying to reduce conflicts) creates some gross imports. It feels like there is a reluctance to evolve the language itself; a lot of enhancements appear to be made via more magic metaprogramming and function usage. super(Cls, self).__init__() comes off as an artifact of this. Not really my cup of tea these days, but I can see how this is very subjective. The propper way to handle generated members with pylint is supposedly a plugin; which almost no projects provide. Type annotations are supposed to go a long way in 3.x, but the prevalence of metaprogramming and lack of tooling awareness has probably defeated more jedi than Darth Vader. boto3 has no official async support even though lambda just released support for Python 3.6. Meanwhile the javascript sdk is shipping with TypeScript definitions and a new promise interface. A lot of this is very subjective(other than perhaps the languishing of certain library areas) of course. To me though, after having worked with a lot of other languages, it just feels like Python is a bit of a ghetto these days. It's like the language world has built north and Python is.. Not living to the north. EDIT: The pipenv announcement thread has some comments that go into more detail on package/project management situation: https://news.ycombinator.com/item?id=13459740 https://news.ycombinator.com/item?id=13459740 . sjellis and sametmax touch on most of the stuff I've run into.
- bitexploder 10y agoI think JS ecosystem is an order of magnitude more unstable. I can still write a Django/Flask/Pyramid app in roughly the same way I did 5 years ago. The key libraries have longer and more consistent development. The whole environment is just easier to use. Maybe I am biased from nearly a decade of heavy Pyhton use, but I have written a non-trivial amount of JS code. Angular 1 is basically a relic. It just isn't a user friendly sandbox to play in. Python has its warts but we build and use tools in Python and it seems much easier than JS.
- ng12 10y agoIs your complaint that JS development is getting better? People didn't ditch Angular1 because it was old, they ditched it because Angular2 is better.
- mercer 10y agoThat's not saying much though. I keep reading that Angular 2 is still a really bad idea (haven't gotten to using it myself though). What's your experience comparing Angular 2 to other frameworks you've tried?
- bitexploder 10y agoI am just saying that the "newest" tools in Python are more stable and if you pick a popular framework or package in Python chances are good it will still be active years later. Whereas JS community seems to have ADHD and things like TypeScript come along in the JS world. The cost of learning and staying modern in JS and front end development in particular is high. It does create meaningful new ideas but it is a mess compared to investing in almost any other popular language. So, I learned Angular 1 for a project. Some concept there really are everywhere (promises, DI), but you might as well not even call Anuglar 2 Angular. It is totally different and even getting started in it took so much effort I gave up. I have almost never done that as a hacker. But the sheer amount of stuff to install and learn just to implement Hello World was more than I was willing to deal with at the time.
- 10y ago
- sidlls 10y agoThe language I use day-to-day in my current job (machine learning and data engineering) is Python, although I employ a smattering of C++ and, lately, Rust as well (the only one to use either of the latter, that I'm aware of, in the company). Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen.
- indexerror 10y ago> Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen In terms of what? Can you please do a npm vs pip and a nvm vs virtualenv? Thanks
- Can_Not 10y ago> Python's virtualenv/pip system, for all its warts, is orders of magnitude better than any JS package management system I've seen. I've had the complete opposite experience. Crates, composer, and npm are my go-to examples of good package mangers. Python is my go-to example for lack of a good package manager.
- milesrout 10y agoWell that's simply stupid. Python is utterly different from JS in this respect.
- tigershark 10y agoI second this. I'm tired of fighting to enable my AMD card on the MacBook Pro in theano. Maybe I will find a working solution one day, but I'm supposed to learn neural networks, not all the environmental problems when using a Mac with an amd card. And apparently at some point in time it used to work, albeit compiling stuff from the develop branch of some libs. Now it seems broken, at least with python 3.5 and/or with the stuff on my machine..
- hiram112 10y agoAgreed. I must be getting old and grumpy, but I really am tired of learning 'new' frameworks and ideas unless they actually provide some sort of benefit. For example, I started using Docker here and there. There's a bit of a learning curve and I initially thought 'how is this all that much different than running a VM or two?' Only later, when a single docker compose file set me up with a full CMS, DB, NGINX, etc. stack did I understand just how cool it was. To compare, I've spent a few years now on various projects where the front-end guys have added all sorts of bloat - bower, then grunt, gulp, Angular, React, Browserify, JSPM, onto Webpack. Hell, it looks like npm is now being replaced by Yarn - WTF? And the vast majority of this crap is absolutely no better for the user than the old school MVC server side template apps+JQuery that worked for years.
- specialist 10y ago"...vast majority of this crap is absolutely no better..." Recurring amnesia. It's because the industry (number of programmers) is grower faster than the rate of diffusion of knowledge (experience). Also, easier communication mediums has greatly increased the noise to signal ratio. So maintaining our BS filters requires that much more effort.
- CharlesW 10y ago> …it's that it has a terrible ecosystem… Two follow-ups if you don't mind: (1) "terrible" in what kinds of ways, and (2) compared to what, specifically? (Genuinely curious.)
- weego 10y agoFragmentation, wheel reinvention, people using dependencies that are long-term unmaintained and or deprecated are a few that immediately spring to mind
- krzyk 10y agoFor me it is a mix of zillions of libraries with broken package management (npm + gulp). Compare to maven in java. Yes, you need to write XML, but it is not that hard, you mostly add <dependency>. And then it just works. And with npm, I get - this doesn't work with that version of npm (which BTW has a funny versioning that is almost exponential, there are 0.x and x.x versions), but it doesn't say that the version is wrong, it just does not work and you are to figure out why. More over, npm package locations, you can have three places, in project directory, in home directory and system wide. And to make matters worse you switch between those by using a command line switch. And it breaks, because once you downloaded a package into home dir (accident) and then your packages in current dir don't work, just because - build breaks and you are out of luck. I don't even count how many times I had to remove all npm directories to get rid of some package that was downloaded. With maven you have simple system, that is constraint and because of that you have much fewer places where it will shoot you in the foot. With npm (+gulp) you get wild west of package management, just like it was with ant days of java. And don't get me started on the AngularJS - I thought that I won't see anything that complicated since the days of EJB < 3.
- mercer 10y agoYarn might solve a bunch of those problems. And at least here on HN there seems to be consensus (or at least a very large group) that considers AngularJS a particularly bad idea. I don't disagree with you though; just saying.
- zitterbewegung 10y agoI have written an angular app with just angular scripting script imports. No tooling or package management.
- alttab 10y agoYes but have you worked on that with 10 other developers and deployed it to multiple stages or environments for testing and then onto production hundreds of times for paying customers?
- ng12 10y agoSo why don't you write something better if the shortcomings are so obvious? I'm not saying that the current popular stack (npm, babel|typescript, webpack) is the end-all solution but it's miles better everything else that came out in the last 10+ years.
- blitmap 10y agoI have for the longest time wanted to filter npm-search results by shared dependencies or licenses. Package management could be so much better.
- krapp 10y agoAfter the left-pad fiasco[0] several people mentioned wanting to develop saner package management to replace npm, then of course nothing happened, because package management is hard. [0]https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/ https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
- Can_Not 10y agoThe made yarn, which is better, but didn't they fix leftPad?
- haburka 10y agoKeep in mind that angular is not made for small, simple apps. It's designed to support large web applications and I think it does a great job doing that. Addiitionally, there are seed projects which you can use to avoid writing your own build tools. I agree that the build is complicated but it's much more complicated to make a large scale app without using the abstractions that the build tools provide you with.
- ysavir 10y ago> Keep in mind that angular is not made for small, simple apps. It's designed to support large web applications and I think it does a great job doing that. My experience has been the complete opposite. Angular has been best for simple, straightforward apps. The larger the app got, the more convoluted the code grew, and the more I found myself fighting with the "angular way". Maybe 2.0+ is different. I wouldn't know, and have no interest in finding out.
- haburka 10y agoI have been developing in angular 2+ and this is absolutely true. It lets you build large scale apps pretty easily. It makes it simple to use design patterns.