Introducing new library to the deps

How do you guys introduce new libraries or package to be added in a project? More importantly convincing the team that this is going to be useful...
13 Replies
Aguilar
AguilarOP•2mo ago
for example, there is one project my team is working on is using Next.js version 10 💀💀💀 and too many useStates, useEffects, prop drilling, there is zustand but not being used and react query not being used i'm just an intern in this company but i want to convince them to start migrating to at least the latest version of next.js even if it's using pages router and not app router
cje
cje•2mo ago
you need to understand why things are in the current state is it just that the project has until now mostly been worked on by random people who dont know much about FE, and they would be happy to get better patterns? is it a low value project that doesn't get much activity and spending time on significant plumbing improvements would signal that you don't understand how to add value to the company? is there someone who has ownership of the architecture?
Aguilar
AguilarOP•2mo ago
i see i see, thanks @cje this opens up a new way to look at things for me low value definitely not, this is the company's main website getting few millions traffics which is also the main income source think i need to understand why they haven't tried to upgrade the project for more than 2 years first
Sturlen
Sturlen•2mo ago
main website getting few millions traffics which is also the main income source
why would the business want the mess with something that makes money? what benefit would an update bring? e.g. patching security vulnerabilities that could take down the server
Aguilar
AguilarOP•2mo ago
the repo is a total mess, if they didn't put the server behind cloudflare, a few DDOS that happened just in this month could've bring down the server for sure well i just got an update to know the CEO don't give a shit, as long as it makes money although the business's service in general just sucks. 😂 thanks a lot btw to both of you
splitfire?
splitfire?•2mo ago
even me working as a contractor for mainly one client, I could easily just tell them that some of our projects need to get packages updated and bill hundreds of hours updating many sites but that wouldnt really help them make more money maybe thats why they replaced their old dev with me because he used to do that for them without any real reason and i tell them it wont really improve much, just give me some peace of mind that is arguably worthless haha
chip
chip•2mo ago
@Aguilar there needs to be an incentive for the stakeholders e.g the CEO to invest time in an upgrade. All you need to do is see if it brings any value, whether it be DX, building new features in the future etc etc.
Just spin it in a way that goes like "Hey, if we do this now, we will build new features x times faster" Just make it look good for business 😄
Aguilar
AguilarOP•2mo ago
Yeah I understand what you guys are trying to tell me. Which is also what I will try to do.
Y7YA
Y7YA•2mo ago
This is the state of many legacy projects unfortunately most people in the industry aren't enthusiasts like the demographic in this discord, so the devs aren't really incentivised to follow any good practices. For this specific case though it's not really wise to refactor the whole site just for the sake of following best practices if it is generating income without issues Especially if you have any project managers or QAs on the team, you'll need to consider that they'll be doing extra work they never asked for to confirm your new code works
Aguilar
AguilarOP•2mo ago
Hmm actually true, but I was thinking from the pov where the devs in this company comes and go, so it's hard for new devs to come in and easily get started. Especially they don't have a clear docs for the project as well, always need someone to explain to the new devs some place using jsdoc some don't. I just find the whole codebase to be too like (I just wanna do my tasks, get salary, then get off work) kinda vibes I spent 2 hours for a task that just required to change images alt text. Due to the code of how they set the image src is really confusing. Some place use useState to set src (they were doing ternary checks directly inside), some use some kind of function. 🥲 But thanks to advices here, I totally get the point as devs we should always think about from the business perspective as well. I'm just worried the tech debts gets too huge one day for the company then if the most senior left also. The tech team with new devs will be fked 😂 I was thinking if we can clear the debts, it's easier to not make bugs, better DX, easier to introduce new features, easier to make tests. Maybe I will propose this and see if they will consider it. Personally I feel it will be better for business also cuz everything would be able to move so much faster.
Y7YA
Y7YA•2mo ago
I hear you but the painful truth is even if you make a fantastic refactor, after you leave they will inevitably hire non-enthusiast devs who will not appreciate any of the best practices you've poured your heart into & drag the codebase to the mud again. The biggest (& possibly only) benefit of refactoring the entire codebase is that it's fun for people like you and me I'd rather spend 3 months refactoring the whole codebase to something I like to work with than 1 month of plastering fixes through a slobby codebase. But that's just my selfish desire as an enthusiast dev, not necessarily what's best
Aguilar
AguilarOP•2mo ago
Mannn Ikr I guess they just wan "if it works and I earn money Idgaf" even tho it's only going to make developing new features / solving bugs much slower in the future
Eve
Eve•2mo ago
Yeah, but convincing management, to convince share holders; most of whom are only invested to make their money grow, and will jump ship to whatever is growing fastest; that long-term benefit is more important... is a losing battle.
Want results from more Discord servers?
Add your server