Repository navigation
Conversation
Fetches lists of questions from SO. Had a look at the PHP room's code but didn't really like it so I mostly ignored it. My code does a lot of looping and I tried to tone it down but it's still a bit messy in the name of having a clear way of seeing which questions are included in what categories and keeping the number of SO API calls down to one. I haven't styled it, I hate CSS. There's basically no error handling.
There was a problem hiding this comment.
If you're using modules already, why not just go with a solution like requirejs or commonjs and be done with it? (Not critical though)
There was a problem hiding this comment.
I considered requirejs or browserify, but I think the requirejs syntax is extremely bloated and I don't like it. Browserify is much nicer IMO but would need a build-step so I figured I'd just go bare-bone.
Maybe just scrap the modules entirely and put everything in a single file is just as good? Would save 2 requests as well.
There was a problem hiding this comment.
I'd love to dig into some ES6 but I think having a build step makes it way more cumbersome to add new question ids to the canonical list. Being able to make a PR with a new question directly through github's web interface increases the chance it will be done dramatically. With a build step PRs also has to include re-transpiled source code.
There was a problem hiding this comment.
This looks terrible, there's a better way, right? There has to be. I feel like I've completely missed the point of using reduce.
Fetches lists of questions from SO. Had a look at the PHP room's code
but didn't really like it so I mostly ignored it. My code does a lot of
looping and I tried to tone it down but it's still a bit messy in the
name of having a clear way of seeing which questions are included in
what categories and keeping the number of SO API calls down to one.
I haven't styled it, I hate CSS.
There's basically no error handling.