3 ms·
I've seen plenty of Lambda code developed in a "copy-and-paste" style, with little to no code sharing, similar to early CGI scripts from 25+ years ago. It makes
by icedchai 4y ago
I've seen plenty of Lambda code developed in a "copy-and-paste" style, with little to no code sharing, similar to early CGI scripts from 25+ years ago. It makes maintainability incredibly difficult. The more shared code the better, in my opinion.
- suzzer99 4y agoYeah if it's really shared code. But if you're just trying to factor out small redundancies that are only implemented a few times and could diverge in the future - then no. I'm a big fan of WET - write everything twice. Then maybe the 3rd of 4th time worry about creating some new abstraction to share code. It's so much easier to add an abstraction later when it becomes obviously needed - than to remove one when you find out your three things actually need different variations on the lib code.