# What the hell just happened?

**URL:** <https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270>\
**Category:** General\
**Created:** [July 5, 2017, 9:54pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270 "2017-07-05T21:54:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![carrola7](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@carrola7](https://forum.freecodecamp.org/u/carrola7)\
**Post date:** [July 5, 2017, 9:54pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/1 "2017-07-05T21:54:28Z")

</div>

So I’ve been flying along with the free code camp curriculum, completing the basic algorithm scripting with no issues. Then I meet the quote generator. HOW IN THE NAME OF GOD DO I EVEN START THIS?

Am I missing something here? I’ve spent around 50 hours on it so far and I’ve gotten nowhere. Surely the few snippets of lessons on JSON and Ajax can’t be it. Where did you guys go to learn more on the subject of APIs etc?

---

<div class="post-metadata">

**Author:** ![johnnyosullivan](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/johnnyosullivan/32/158768_2.png) [@johnnyosullivan](https://forum.freecodecamp.org/u/johnnyosullivan)\
**Post date:** [July 5, 2017, 9:57pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/2 "2017-07-05T21:57:09Z")

</div>

Your post just made me laugh out loud. I’m in exactly the same spot. I guess we’ll just have to figure it out. Maybe there are some tips on it in the Guides section of the forums.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [July 5, 2017, 10:02pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/3 "2017-07-05T22:02:56Z")

</div>

Everyone hits this point on one of the projects. Take a deep breath. I’m going to be DRY and link to my response for someone freaking out over the profile project. It all applies to this project too.

> [@Just looked at the personal portfolio project and sweet baby jesus](https://forum.freecodecamp.org/t/just-looked-at-the-personal-portfolio-project-and-sweet-baby-jesus/98816/2):
>
> Break it down to its simplest version and get that working. Make it ugly and boring and use plenty of placeholders. Keep adding features and styling little by little and focus on not breaking what you already have. You’ve done the tribute page. How can you adapt that to make a basic skeleton of your profile? Save incremental versions (now is a great time to learn [Git](https://red-badger.com/blog/2016/11/29/gitgithub-in-plain-english)) and be patient with yourself. A ton of people here have done the profile project, so if you get stuck on something, search…

---

<div class="post-metadata">

**Author:** ![coymeetsworld](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/coymeetsworld/32/72953_2.png) [@coymeetsworld](https://forum.freecodecamp.org/u/coymeetsworld)\
**Post date:** [July 5, 2017, 10:04pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/4 "2017-07-05T22:04:23Z")

</div>

I did have to go outside the curriculum to learn more about JSON/Ajax, specifically with working on other APIs. Having said that, you don’t necessarily need to use a quote API for this project. If you want you could just create a static array of your own quotes locally, that’s what I did.

---

<div class="post-metadata">

**Author:** ![cndragn](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/cndragn/32/159093_2.png) [@cndragn](https://forum.freecodecamp.org/u/cndragn)\
**Post date:** [July 6, 2017, 2:50am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/5 "2017-07-06T02:50:54Z")

</div>

I felt that way too when I got to the Quote Generator…was flying along like butter and then wait, what?! I spent a couple days in panic mode just feeling lost, then I applied Read, Search, Ask… figured it out in Read and Search before getting to the Ask part… but I did a lot of reading and searching.

Take heart, sooo many people have felt that way at this point too and theres a load of information right here in the forums to help with a kick start in the right direction to help consider what steps you need to take and where you need to start the process of thinking to break this down.

I was determined to do mine with API because its something I want to learn…took awhile but when I finally finished, I learned a ton and was happy I stuck with it.

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [July 6, 2017, 5:27am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/6 "2017-07-06T05:27:42Z")

</div>

#When you’re finally getting this stuff and the AJAX hits.

![](https://global.discourse-cdn.com/freecodecamp/original/3X/c/8/c8cbb8ce2012698e0077384adf8252b32ca82163.gif)

---

<div class="post-metadata">

**Author:** ![lionel-rowe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lionel-rowe/32/41877_2.png) [@lionel-rowe](https://forum.freecodecamp.org/u/lionel-rowe)\
**Post date:** [July 6, 2017, 5:40am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/7 "2017-07-06T05:40:49Z")

</div>

If you’re using jQuery, choose one of `$.ajax()` or `$.getJSON()`, then look through the requisite page in the official jQuery documentation. If you’re using native JS, look up `XMLHttpRequest()` on MDN.

Also read up on CORS (cross-origin resource sharing). The easiest way to avoid CORS problems is to make sure both the API you’re using and the site hosting your page (likely Codepen) use https (or they both use http, though http is now deprecated based on consensus from security experts).

It’s true you need to read fairly widely _outside_ of fcc, but this is just a skill you’ll need to learn in order to succeed as a developer. It’s just a shame fcc doesn’t explicitly tell students “oh, by the way, you should start researching this stuff now because we haven’t taught it yet.” I think that’s what catches people out and makes them frustrated.

---

<div class="post-metadata">

**Author:** ![vikramnr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/vikramnr/32/34785_2.png) [@vikramnr](https://forum.freecodecamp.org/u/vikramnr)\
**Post date:** [July 6, 2017, 5:49am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/8 "2017-07-06T05:49:58Z")

</div>

I’m was also in same condition for at least 3 weeks and some how I have managed to get around it. At first, we can try creating our own json file and accessing it with java script then move on to API’s. I used [http://wunderground.com/](http://wunderground.com/) API which I think is fairly easy. I also helps in satisfying the user stories.

At first I found XMLHttpRequest as easy way to access it. But jQuery is also fairly simple. So try out both methods. To prevent CORS error you can append [https://cors-anywhere.herokuapp.com](https://cors-anywhere.herokuapp.com) this link to the API request. CORS is explained much detailed manner in [https://stackoverflow.com](https://stackoverflow.com).

---

<div class="post-metadata">

**Author:** ![jenovs](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jenovs/32/60963_2.png) [@jenovs](https://forum.freecodecamp.org/u/jenovs)\
**Post date:** [July 6, 2017, 5:51am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/9 "2017-07-06T05:51:07Z")

</div>

> **[If you are struggling with the FreeCodeCamp Intermediate Projects](https://medium.com/p1xts-blog/if-you-are-struggling-with-the-freecodecamp-intermediate-projects-9f7fe943601c)**
>
> I’d like to tell you a tale of some bullshit…

---

<div class="post-metadata">

**Author:** ![carrola7](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@carrola7](https://forum.freecodecamp.org/u/carrola7)\
**Post date:** [July 6, 2017, 7:04am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/10 "2017-07-06T07:04:45Z")

</div>

Brilliant replies, thanks everyone. Nice to know I’m not completely stupid 😊

---

<div class="post-metadata">

**Author:** ![Soupedenuit](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/soupedenuit/32/32478_2.png) [@Soupedenuit](https://forum.freecodecamp.org/u/Soupedenuit)\
**Post date:** [July 6, 2017, 8:18am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/11 "2017-07-06T08:18:38Z")

</div>

It’s taken me well over a month of hard work to build this [Quote Generator](https://soupedenuit.github.io/Random-Quotes/) and it’s not done yet (looks terrible on a phone). Used native JS for the AJAX. Little piece of advice; going beyond the basic requirements is a pain but worth the effort.

---

<div class="post-metadata">

**Author:** ![Ashyri](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ashyri/32/60867_2.png) [@Ashyri](https://forum.freecodecamp.org/u/Ashyri)\
**Post date:** [July 6, 2017, 9:09am UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/12 "2017-07-06T09:09:34Z")

</div>

This was very helpful.  
I am only on the tribute page part, but I realized that pretty much all I did before the tribute page was copy & pasting and changing the word “blue” to “red”

As a result, everything that I was supposed to learn about bootstrap & jQuery didn’t really stick in my memory and I find myself having to click through all the “lessons” again to remember it.

I guess FCC is good as an introduction to the subjects but really requires external resources to gain a solid understanding of the subjects.

---

<div class="post-metadata">

**Author:** ![MichielHuijse](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/michielhuijse/32/60893_2.png) [@MichielHuijse](https://forum.freecodecamp.org/u/MichielHuijse)\
**Post date:** [July 6, 2017, 1:33pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/13 "2017-07-06T13:33:15Z")

</div>

Funny, I had the same problem, but I solved the quote generator with an array of strings and a random index which was than printed out afte an element in the dom using Jquery. But when I arrived at the Local weather apo this took me ages to understand what I was doing.  
Key is to understand Json and how to use it. Google , stackoverflow but also Quora, sitepoint and W3 have some good recources on it.

---

<div class="post-metadata">

**Author:** ![Nicknyr](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nicknyr](https://forum.freecodecamp.org/u/Nicknyr)\
**Post date:** [July 6, 2017, 10:49pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/14 "2017-07-06T22:49:11Z")

</div>

Don’t be afraid to look on youtube or elsewhere and see how other people are doing theirs or just working with API’s in general.

Some times the best approach is to give it a good try, get stuck, try some more, and then realize you’re stuck and go look for answers online. You’ll learn more with this approach than you would have if you just kept banging your head against the wall alone.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 6:02pm UTC](https://forum.freecodecamp.org/t/what-the-hell-just-happened/134270/15 "2021-01-16T18:02:11Z")

</div>

Closed on January 16, 2021, 6:02pm UTC


