3 ms·
Programming goes through phases. We are in a phase of ridiculously over-complicated tooling. In a decade or so someone will come up with the radical idea of so
by mattmanser 10y ago
Programming goes through phases.
We are in a phase of ridiculously over-complicated tooling. In a decade or so someone will come up with the radical idea of some sort of rad tool which hides all the silly complications. Like we had in the 00s.
I especially love the not one, but two, completely inexplicable:
await next();
- orf 10y ago> I especially love the not one, but two, completely inexplicable What's inexplicable about await or next()? I've literally never done ASP.NET before but it's clearly used in some form of middleware. So it's just passing control to the next middleware in the chain, then handling the response afterwards.
- mattmanser 10y agoYou know, the word "inexplicable" roughly means "some form of thing that I can't explain". Just like your "some form of middleware" without an explanation. It's inexplicably giving up control of the context in the middle of a simple if statement, not once, but TWICE, with no discernible reason for doing so. That part of the program's not making any sort of IO calls or database calls or anything. What the hell is it awaiting? What does the function next() even do, that is's so poorly named?
- orf 10y agoIt exactly means 'unable to be explained or accounted for'. If you have no domain knowledge then yeah, it's going to be confusing. Not inexplicable. Confusing. If you've never heard of middleware then yeah, it's going to be a bit confusing. If you genuinely don't know then middleware is pretty simple. Imagine a stack of functions, each one taking a HTTP request and returning a HTTP response. Each middleware can meddle with the request and/or the response and pass control up the chain. Imagine a middleware that detects if the request is authenticated, and if not returns a 403 status code. If they are authenticated it passes control to the next middleware up the chain. next() is how you call the next middleware in the chain. It's awaited because future middleware can be asynchronous. Irrespective of if you know what next() does it's pretty easy to infer. At least I think. Your millage clearly varies, but it's not because of "these damn over complicated tools that the damn kids on my lawn are using". Harking back to the shitty, insecure, monolithic messes that the 00's produced and saying how simple they all where is... wrong, at best.
- vbezhenar 10y agoI'm waiting for some opinionated build tool for web, which I can use without reading tons of tutorials and copypasting chunks of configurations from everywhere just to make it work. I can use maven, write very simple pom.xml and write my huge enterprise project and it'll work, integrate with IDE, I can build it as a web application, etc. But when I want to use something "standard" like TypeScript + React + Redux + hot reload, I'm ending with infinite headache, so huge, that last time I decided to use good old server-side JSP instead of this fancy shiny tech. What I want is to write package.json, put my code where I'm told to (let it be src/ts, src/css, or w/e) and be done. May be turn on plugins (turn on, not setup every plugin with custom configuration and glue them with JS).
- esistgut 10y ago> What I want is to write package.json, put my code where I'm told to (let it be src/ts, src/css, or w/e) and be done. May be turn on plugins (turn on, not setup every plugin with custom configuration and glue them with JS). You should take a look on Ember or Angular 2 (with angular-cli).