71 karma · joined December 9, 2016
I'll still stand my ground that the first reply that I replied to was a shit comment only wanting to deflect conversation. If it followed what you said here then the appropriate response is to ignore it and report.
Nope but it is the inevitable outcome as we see here.
Your solution was that I write a script to blacklist certain words? Is that really a viable solution vs a product implementation?
> Don't make it appear that your apathy regarding politics should be the status quo.
And nowhere in this discussion was I against the discussion of politics just that this immediate and visceral reaction to wanting to discuss a topic is my issue here.
If we had a meta forum as mentioned above I would love for discussions like this to be moved in that direction but we are where we are because the lack of structure.
Also I agree and I enjoy seeing politics discussed. You are conflating my defending of someones discussion around the structure with the site / features or focus of the the sites content with me defending their argument. Two different things here.
The top reply at the time was a low level deflection of the idea rather than a constructive feedback of the idea / feature as others did above. Deflections don't constructively argue for one side or the other. It is merely to shut down an idea and stop discussion.
> Rather than critically discussing why you don't want the feature you deflect from the idea.
> Hyperscan is licensed under the BSD License.
> Copyright (c) 2015, Intel Corporation
There were certainly parts that were exceptionally easy to work with. Many, many, many repos all over the place doing various different things and inside of some of those you would find some very cleanly written code with excellent tests, examples, and documentation. The problem was once those nice little libraries, tools, etc got brought together it became a mess.
Also agree middleware is a good solution which can go through and provide a user object directly onto the request or another level of abstraction created if you prefer. That was simply to show how multiple service calls could be easily tied together rather than a full and usable example.
A benefit of callbacks though, at least from my experience, is error messages when testing with mocha / chai. I only have experience with jasmine, mocha, and chai but the errors when test driving were much easier to follow with callbacks.
Controller calls the service.
Service returns a call to a repo with any mapping that needs to occur.
Repo calls out to database or external api and returns the promise.
Makes the work very boring and repetitive for the most part which is a good thing I think.
function someController(req, res) {
UserService.getUser(req.session.user)
.then(SomeService.getSomething)
.then((val) => res.json(val))
.catch(handleError);
}
function getSomething(user) {
return SomeRepo.getSomething(user)
.then(MapSomething)
.catch(alternativeHigherLevelCatch);
}
function getSomething(user) {
return new Promise((resolve, reject) => {
database.getSomething(
'defined parameters',
user,
resolve,
reject
)
});
}Maybe saying the same thing over and over again has merit to nail in the idea but eventually it becomes stale.