Is there any sites where devs can go to ask questions without being berated? (looking at you stackoverflow)
I'm trying to figure something out but the problem is I don't know the name of what I want, and I can only explain it.

For those interested, I'm writing my own API and I currently have methods set up when the route matches my cases, i.e `/users`, `/warns`, etc. However, at the moment I just use an exact match, but I need to figure out the best way to be able to include variables in my paths i.e. `/users/:id`.
I tried to look at the source code of vue-router for inspiration and just ended up getting lost lol

  • 4
    How about using regex?
  • 3
    @neeno The language of gods? I do not have such power...
    But in seriousness I'll look into if that's possible, but regex so bloody confusing.
  • 1
    Not sure about the questions and answers place but have you considered using GraphQL?
  • 0
    I hope this is just for fun/as an exercise.
  • 4
    @WhiskeeDev it seems very intimidating at first but once you get into it it's quite simple. It gets confusing once you start using lookaheads and lookbehinds, but you're probably not going to need those.

    Push yourself to learn regex, it's very useful.

    Take a look at https://regex101.com, it'll make your life 100 times easier.
  • 0
    Quality of technical discussion websites are hard to make.

    StackOverflow might have gone a wrong way. (Reputation / downvote-and-gone systems?)

    Dev.to is failing.

    I want to hope for Reddit, Hackernoon, devRant, Hashnode; but maybe I hope too much.
  • 3
    DEV.to and Hashnode may be your best bets.
    Also, you don't have to learn the entirety of RegExp to use it; you can start with simple stuff and expand from there.
    And as @neeno said, have a look at regexp101.com, it's a great tool where you can see how an expression matches input you provide and it also breaks down your words and the results (on top of having a tutorial there).
  • 1
    @neeno this. Regex was/is very intimidating to me, but it's so damn powerful once you find out what you need it to do. Almost all questions of "not exactly matching this" lead to an answer with a form of regex so invest some time in it for your own good!
Add Comment