Skip to content

Conversation

@ivarni
Copy link

@ivarni ivarni commented Apr 25, 2015

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.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for babel :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ivarni ivarni closed this May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants