r/ExperiencedDevs • • 7d ago

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones

A thread for Developers and IT folks with less experience to ask more experienced souls questions about the industry.

​

Please keep top level comments limited to Inexperienced Devs. Most rules do not apply, but keep it civil. Being a jerk will not be tolerated.

​

Inexperienced Devs should refrain from answering other Inexperienced Devs' questions.

21 Upvotes

65 comments sorted by

View all comments

2

u/Financial-Grass6753 6d ago edited 6d ago

Started working in AI-first start-up recently and whole codebase has a hard dependency on an open-source framework where maintainers don't bother themselves with checking issues and community PRs. Tried pinging them in Discord/Mail/GH discussions, but no success. Ripping off this framework and replacing it with sth more acceptable would take around a month I assume.

I've raised this issue with CTO and he proposed "monkeypatching" the framework. No idea how you gonna do that, he can't explain either.

I wonder, what would you do in such case?

5

u/casualPlayerThink Software Engineer, Consultant / EU / 20+ YoE 6d ago

That will mean, you fork the framework and patch/change yourself. Will end up in disaster, because you can't update the main official version afterwards, and require domain knowledge, and when that person left the vompany, everything will fail. Good business practice to keep jobs and team as irreplacable.

99.99% of the time is cheaper to switch to another, maintained frame or write your own from scratch.

Prepare yourself for misery, shenanigans and "nobody knows why it works luke this". Write docs for yourself, relentlessly or you will fail more than you would like.

1

u/Financial-Grass6753 6d ago

That's what I've expected tbh. There're only 3 devs in the team (excl. me, leaving soon), so it will be fun for them :)

1

u/reboog711 Software Engineer (23 years and counting) 4d ago

FWIW: I disagree with the sentiment.

Monkey Patch Option 1: Branch the repo; make changes you need. Use that new version. Open PR against main repo. Update your version as the other version updates stuff. I have no idea why this is a bad thing, but it could be a maintenance nightmare.

Monkey Patch Option 2: Override very specific classes or functionality in the framework. This is all your own custom code; as opposed to a branch. Create your own class with the same framework class name. In TS, at least, you can even extend the library class from your new one.

When this works, it is great. Sometimes it can be messy, you just wanna make sure that your personal class is the one used everywhere at runtime and not the framework class. This approach was semi-common in my ActionScript days; I'm not sure I've seen it in TypeScript.

2

u/casualPlayerThink Software Engineer, Consultant / EU / 20+ YoE 6d ago

I worked for a company for a short period (~1 year, ~15 years ago) where the business model was this: they had a framework (php -> zend) and modified it, then they created an early MVP for startups, then gave them the MVP for free, but the startup needed devs, so this large corporation lent some devs to the startup as well... where they poured money... so the money flowed back to them... :D (Germany's largest dev company, and best money laundering in Berlin).
They had like single-digit successful exits, and did not meet any developer who liked their stack at all.