▲ 442 ▼ POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency. (lemmy.blahaj.zone) submitted 8 months ago by not_IO@lemmy.blahaj.zone to c/programmer_humor@programming.dev 49 comments fedilink hide all child comments 🤔 1
[–] Jesus_666@lemmy.world 14 points 8 months ago (4 children) Then they could add their own function in later stages. YAGNI exists for a reason. permalink fedilink source parent hideshow 4 child comments replies: [–] Avicenna@programming.dev 11 points 8 months ago* (1 child) I think it is a balance. Despite having quite functional IDEs now a days, it is still more error prone to change 10 instances of math.random than a single function you define modularly. If you think there is a good chance such an extension might be needed in future or that you might want to change libraries later on, I wouldn't necessarily call this a bad decision, even if it goes unused. YAGNI works best when it prevents adding complex unused futures which are error prone and complicates a simpler program logic and flow. In this case you are just encapsulating a function inside another one without any change to program complexity. permalink fedilink source parent hideshow 1 child comment replies: [–] Jesus_666@lemmy.world 5 points 8 months ago It definitely depends on the use case. I could accept this being abstracted out to facilitate mocking, for instance (although I'd recommend mocking at a higher level). But in general this wouldn't pass review with me unless I get a good explanation for why it's necessary. permalink fedilink source parent [–] LodeMike@lemmy.today 4 points 8 months ago (1 child) Yagni? permalink fedilink source parent hideshow 1 child comment replies: [–] bleistift2@sopuli.xyz 16 points 8 months ago “You ain’t gonna need it”. It means: Build the thing you need now and don’t try to predict what you’ll need in 3 years. You ain’t gonna need it anyway. permalink fedilink source parent
[–] Avicenna@programming.dev 11 points 8 months ago* (1 child) I think it is a balance. Despite having quite functional IDEs now a days, it is still more error prone to change 10 instances of math.random than a single function you define modularly. If you think there is a good chance such an extension might be needed in future or that you might want to change libraries later on, I wouldn't necessarily call this a bad decision, even if it goes unused. YAGNI works best when it prevents adding complex unused futures which are error prone and complicates a simpler program logic and flow. In this case you are just encapsulating a function inside another one without any change to program complexity. permalink fedilink source parent hideshow 1 child comment replies: [–] Jesus_666@lemmy.world 5 points 8 months ago It definitely depends on the use case. I could accept this being abstracted out to facilitate mocking, for instance (although I'd recommend mocking at a higher level). But in general this wouldn't pass review with me unless I get a good explanation for why it's necessary. permalink fedilink source parent
[–] Jesus_666@lemmy.world 5 points 8 months ago It definitely depends on the use case. I could accept this being abstracted out to facilitate mocking, for instance (although I'd recommend mocking at a higher level). But in general this wouldn't pass review with me unless I get a good explanation for why it's necessary. permalink fedilink source parent
[–] LodeMike@lemmy.today 4 points 8 months ago (1 child) Yagni? permalink fedilink source parent hideshow 1 child comment replies: [–] bleistift2@sopuli.xyz 16 points 8 months ago “You ain’t gonna need it”. It means: Build the thing you need now and don’t try to predict what you’ll need in 3 years. You ain’t gonna need it anyway. permalink fedilink source parent
[–] bleistift2@sopuli.xyz 16 points 8 months ago “You ain’t gonna need it”. It means: Build the thing you need now and don’t try to predict what you’ll need in 3 years. You ain’t gonna need it anyway. permalink fedilink source parent