Developers deserve a better learning experience
The story of why I built codetogo.io
I could get sweaty, start shouting and clap my hands trying to tell you how important developers are in today’s world.
The struggle is real
Let’s take this example. You’re working on a project where you need to split a string into an array of characters. It should be easy to find an answer, right?
You would probably search for the following query:
You typically see 3 websites in the results:
You may have been told to avoid w3schools pages because the documentation may be outdated (although this has been fixed a few years ago).
The correct answer isn’t in that page anyway.
2. MDN Dev docs
MDN Dev docs is awesome! It’s the best source of documentation for the web. But the problem is, a lot of times developers are not looking for documentation first, they want to start by finding a solution for their use cases before reading documentation.
In our example, the MDN result takes you to String.prototype.split(), which isn’t the correct answer either.
So you’re only left with 2 Stackoverflow questions.
Let’s check out the first result:
This question is a duplicate, but it’s fine, we’re just looking for the correct answer now. Let’s scroll down.
It seems we got our answer! That’s an accepted answer ✅ with 165 upvotes!
We don’t really care about IE7 compatibility anymore so we’re going to use the first part of the answer.
Have you read all the comments?
If you take a look at the comments, you notice that this answer doesn’t cover all scenarios.
So then you check out the other answers, which confuse you even more, as some of them re-iterate on the accepted answer (which makes you believe that it’s correct) while others suggest an alternative way.
While expert developers are able to use their own judgment and understand which answer is indeed the correct one, beginner to intermediate developers will only be confused.
I’m not saying that Stackoverflow is bad. Without it, I wouldn’t have been able to solve most of the bugs that I’ve had in the last few years.
However, I think this is not the best way for beginners to learn. They do not need to know about answers that make a use case work in IE7 or IE8. This is simply not relevant anymore.
Developers deserve a better learning experience.
✨ Enter CodeToGo ✨
This is exactly why I developed CodeToGo.io.
Where CodeToGo shines
3 months ago, we launched CodeToGo and within a month it got 1K+ upvotes on Product Hunt.
Here’s how CodeToGo elegantly solves the problem that I outlined earlier.
One of the most important aspects of CodeToGo is its simplicity. This is why Nicole Saidy’s clean design focused a lot on white space, calm colors and minimal UI.
The snippets you find on CodeToGo are up to date while taking advantage of modern ES2015+ features that are supported on most modern browsers.
Made for everyone
Unlike Q&A websites where you ask a question which you get an answer for your own unique case, the snippets you find on CodeToGo are more universal, not referring to a specific developer’s problem, which makes it useful for everyone.
Understand, don’t copy
It’s also important to note that the aim of CodeToGo is not to push developers into copy-pasting ready made code without understanding it. This is why we don’t have a copy button. We want to push developers to read the couple of lines of code and understand it before trying it in their project. This is why all the examples provided present a real life use case that can be understood by reading the code and the output.
This explains why you’ll see code in the use cases written in imperative style. You could then wrap it in your own function. We’re interested in showing you the step by step transformation that happened which led to the answer you’re looking for.
Whenever possible, you’ll find a link to MDN Dev Docs so that you can understand the functions, operators & syntax you’re going to use.
Reading the MDN documentation after seeing the use case will let you understand how to solve it, why this specific function is being used as well as how you can use it later on in the future.
Limitations of CodeToGo
The only limitation of CodeToGo is scaling the number of use cases, and I think this limitation is caused by the core value that is provided by CodeToGo. CodeToGo aims to give you up to date snippets for common use cases, which means that those use cases are manually curated.
At the time of writing, CodeToGo has 117 high quality use cases. I believe that it’s better for it to grow slowly with high quality snippets rather than grow exponentially with potentially misleading answers.
If you’d like to help, CodeToGo is open source on Github. You can suggest new use cases or better answers to previous ones. You can even suggest use cases without providing the answer yourself.
As with any open source project, contributions don’t necessarily have to be in the form of written code.
Isn’t CodeToGo overlapping with MDN dev docs?
No. MDN Dev docs provides documentation, whereas CodeToGo provides use cases. However CodeToGo links to MDN dev docs whenever possible.
Where does the discussion take place then?
Are you trying to replace Stackoverflow?
Never! CodeToGo complements the existing ecosystem by filling the gap where it’s hard to find answers to common use cases.