Hi world, how are you? So today I’m thinking about creating an npm module called dryme, because their is already one called towel. 🙂 lol here have a look: Anyway this blog post is the off spring of my work today. So I’m working with mongoose, mongo & node.js and it’s a lot of anti dry patterns that I’m not feeling to productive. If you’re not a programming: DRY stands for Don’t Repeat Yourself. So like any good or half decent programmer, you want to reduce your workload. Plus A Good programmer is a lazy programmer – as the saying go; work smarter, not harder. So anyway as you can see, as tradition go, you create your mongoose model then integrate it in your code methodically. Then come integration, where you have to put the code from your model into your routes file. So anyway I just got the idea, It’d be nice if there was a module where you could just call the dry me instead of rewriting your model code. Maybe it would go: var dryme = require(‘dryme’) and somehow put it at the bottom of said model. then when your ready to integrate in your other code, you would just call that model, but instead of recoding, just call dryme in the body of that model. –Reality check– This is obviously a very, rough draft thought.
(– I’m by no means an mongo/mongoose expert –)
PS- Here’s to thoughts of grandeur code