5 ms·
Write it with all the modern "proper" approaches, and good luck even just recompiling it in 10 years. While this code - however imperfect - remains just as main
by kozak 8y ago
Write it with all the modern "proper" approaches, and good luck even just recompiling it in 10 years. While this code - however imperfect - remains just as maintainable today as it was when originally written (which is probably more than 10 years ago).
- acdha 8y agoThat's true if you're talking about using React, Vue, etc. but do you really think ES5 JavaScript is more likely to be supported in the future than ES6?
- kozak 8y agoI'm talking about NPM modules and the build toolchain (which consists of even more NPM modules). This stuff goes stale very quickly (at the 10-year scale). It's good for a project that is kept continuously alive (i.e. when there is a team of developers that is continuously making changes to the project), but not when the project sits on a shelf for 10 years and then needs to be modified.
- acdha 8y agoRight, my point was that this is a subset of modern approaches.
- kozak 8y agoYou are right.
- LiterallyDoge 8y agoThis is a good point, but if you take NPM / Yarn / Bower (RIP) with a grain of salt and secure your codebase against failures, they work nicely as a toolchain.
- kozak 8y agoDo you mean committing node_modules to the Git repository? Unfortunately, that's not a panacea with build tools, because some of them contain non-JS code that is tightly coupled to Node and OS versions.
- Keyframe 8y agoIf by 10 years ago you mean two years ago, then yes. Unvote was added two years ago. Thing is simple, unreadable, and it works. Turns out, code can both work and be shit at the same time. We've all done it.