Quick question about package managers. Does it make sense to use more than a few packages and always be keeping them up to date? Why not just add a package to your site and leave it? Wouldn’t updating multiple packages to a new version increase your risk of issues / bugs with each deployment?
There's always potential security issues and bugs in the versions you're already using, which means it's good for you to update. Furthermore, there's going to be new features that, if not you yourself, other packages you are or will be using might want to use. For example, if you're still on React 0.13, you won't be able to introduce react-redux to your project without also upgrading React, which makes the cost of introducing that a lot larger.
Sure, but do you need to always be current? Wouldn’t be better to update all your packages once per year. Then do a build with no other changes, QA that release and deploy? Seems like that would be much less risk, and a lot easier then always updating.
That's a philosophy that some people (sometimes implicitly) entertain. However, the trend appears to be to move to a "release early, release often" strategy (see: continuous integration/delivery and devops). The idea is that when you do a lot of small changes continuously, you will run into potential problems early and are able to fix them while they are still small. Updates can and do have side effects that may be difficult to track down, and if you batch a lot of them together, it can be far more work to find the source of problems. Also, it's going to be more work to do in a single go, which makes you more prone to postponing.
(Obviously you will always have to keep an eye on pressing security concerns, and being able to fix them quickly is an advantage as well.)
To provide a real-world example from my work: dependencies.io regularly and automatically clones my repository, checks which dependencies are out-of-date, and submits separate pull requests for every dependency that needs updating (usually no more than three, and most of the times fewer). Each of those pull requests than automatically runs a CI pipeline that builds the code with the new dependencies, runs the tests, deploys it to a separate environment, and starts a browser that performs a few actions on that environment as if a user were controlling it.
Keeping the project up-to-date is then usually a simple click to accept the pull request, sometimes after a manual check of the environment if I suspect the update to have some risk of breaking. And rarely, but still a few times a year, something will have broken that I can then address on short notice, and it's still relatively clear what will then have broken it.
As you can see, the risk of something breaking and making it into the mainline code is relatively low, and it's still low effort to keep things up-to-date. It's pretty sweet. (The project is open source, so if you want to see this in action, see this pull request from last week.)
That said: it's dependency management is a notoriously difficult problem and there are different schools of thought, so unfortunately there's no quick and definite answer to your quick question :)
There are quite a few - Greenkeeper, Gemnasium are two I can think of off the top of my head. As GitHub, GitLab and the likes integrate this functionality, some of them are bound to disappear though.
It's just that it can become harder to update the larger the gulf become between you and latest. And you need to update eventually, else you're on unsupported software. So regular updates just become a way to pay off technical debt.
es, QA that release and deploy? Seems like that would be much less risk, and a lot easier then always updating.
True. There probably is no correct path for every scenario. Some site probably put a premium on staying current while others put a premium on stability.
I would say the best is to keep your current version up to date, and plan full version releases when you have the time for whatever migration. So far with angular since v2, it's not taken me more than 10 minutes to update a current version, and maybe 30m-1hr to upgrade to the next version.
Management that pushes for rapid adoption over stability is doomed to fail. I think it would take brain damage to push "learning new skills" over using stable, proven tech, especially when it's as prolific as PHP.
You're ridiculously out of touch, it's amazing that this company would hire you at all, especially as you feel fit to shit talk them. PHP is used by 83% of websites with a known backend, jQuery is used by 96% of all sites that use a JS framework. Get perspective.
I think those numbers are probably a little skewed by widespread adoption of WordPress etc. Not saying you're wrong, but those numbers probably aren't the best indication of where the jobs are today.
It varies by location but I think PHP is the most in demand web dev skill. Front end only frameworks are good, but Java, PHP and ASP.Net are the most popular job skills I would think.
As someone who started working as a fullstack webdev 2,5 years ago and never used jQuery single time, I'd say the only reason you might need jQuery in 2018 is if you are previous generation developer who has been using jQuery for years when it was best (and only) option available, and too lazy to learn new frameworks that make development and maintenance so much easier and faster. Since you are asking this question, it's probably not your case, so you should of course be able to recognize jQuery when you see it and look up something in the docs, but other than that, don't bother.
That's, of course, just my opinion from personal experience.
I am a .net full stack dev. Our main application was started 15 years ago. I don’t move quickly on the front end. Too much change. We have moved to GIT for source control and adopted TypeScript. But for the web we use KendoUI, JQuery and Twitter Bootstrap, no other libraries. Our team of six full stack devs evaluated Angular 2 but hated the complexity. We loved TypeScript though. It’s good for me to learn what the web developers are up to. Thanks for the information. Nice article too. It’s a balancing act trying to keep up with the ecosystem especially for full stack devs who may only spend 20% of their time on client side development. We also have to keep updating legacy code in web forms, server side MVC and webAPI too...
I cut my teeth on my boss' custom Web Forms + jQuery preferences: he thinks that stuff is as good as it will ever get. I was about 1.5 years into my career when I started to suspect that there might be better ways. jQuery gets pretty nasty when the business logic is sufficiently complex. That's the working definition of spaghetti code, if you ask me.
Then 2 years ago we all sub-contracted out to a firm using .NET MVC, Web API, and Angular, and it has been (mostly) amazing. The Angular stuff, in particular, just felt so much better, so much cleaner, so much easier to reason about. I hope to never go back to day-to-day jQuery again...
18
u/thilehoffer Mar 26 '18
Quick question about package managers. Does it make sense to use more than a few packages and always be keeping them up to date? Why not just add a package to your site and leave it? Wouldn’t updating multiple packages to a new version increase your risk of issues / bugs with each deployment?