Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Steven Sullivan
Steven Sullivan
11,616 Points

I just spent 6 hours learning and building out a Node.js project that didn't work -- and I couldn't be happier.

I've used Node.js in many projects, but as of yesterday decided I needed to understand WHY I was using it. It's always been a dependency I've installed for a hybrid app framework I use, but I never fully understood why I needed it. So I read up on a ton of docs, did a course on Treehouse, and started applying what I learned to an old project.

My project was a simple webapp that's core function was retrieving the status code of a prolific cryptocurrency website, and putting the response through a conditional statement to either display "Up" or "Down" onto the webpage.

A few months ago I ran into a ton of trouble with CORS and gave up. After picking up Node and seeing how easily I was able to retrieve the necessary information, I figured I'd jump back into my project.

After fiddling with it for a few hours, zoning in on my goal, and searching some errors on StackOverflow, I was coming to the conclusion that Node wasn't going to work for this particular project. It registered to me that I completely ignored Node's primary use case.

Node was not designed for running in a browser. It was designed specifically to bring your .js out of the browser.

I spent this entire morning super pumped about finishing an old project that simply can't work with the way I built it, and I feel more accomplished than I have when I've finished projects.

I'm pretty new to developing. While today may not have been a great success, it was definitely an "Ah ha!" moment that taught me a lot.

If you're also new to development, you should chalk situations like this up to a win. It's time well spent, and you probably won't make the same mistake again. Learn why you're using the tools you're using.

1 Answer

Steven Parker
Steven Parker
229,657 Points

Thanks for the candid descriptions of your experiences. It's a wonderful example of how mistakes can be most powerful teachers and why students should not be embarrassed by them. :+1: