Question on Build a Random Quote Machine


#1

i just started on this about a month ago so maybe I am missing something. I looked at the code example for this and it seems like overkill to me. I have done this kind of app in PHP and other languages and it did not take so much code.

And it seems that there should be a simpler example. There is too much of a leap in complexity from what has gone before this to this challenge.

Again, I might be missing something. Anybody have an insight on this? ty!


#2

It depends. Mine took about 60 lines of Javascript, but that was because I wanted to make it a little fancier. Your results will vary. Good luck and happy coding.

Here’s my solution: Random Quote Machine


#3

The example projects only show an example of what you can do. Ultimately, you only need to ensure the following:

  • User Story: I can click a button to show me a new random quote.
  • User Story: I can press a button to tweet out a quote.

You don’t need to have animations, background color changes, etc. The user stories can be met with around 10 lines of JavaScript + HTML. Here’s a much simpler example.


#4

Indeed…mine is pretty basic and I completed it in 25 lines of code… I was curious and looked at the example and wow yeah, it does take a lot of lines. Kinda leads back through to a discussion on here a few days ago of someone looking at the example code and getting overwhelmed and frustrated… that will mess with your head big time if you do that. And now that I looked at the code for this, glad that I didnt see it before I started my project :laughing:

For real, dont let the examples freak you out, that is only one way to do it…clear your mind and start working on it in a way that makes sense to you. First thing I did was find an API Id like to use… and pull that info,then googled for how to display that info on my page, use the new quote button to pull a new quote, then googled how to send that info to twitter. Thats literally it that I have, to fulfill the requirements.

Im going to go back, through all my projects, and refine them now that Ive learned more and feel more comfortable, but dont let yourself get overwhelemd…use the example as far as how it functions, dont use it to try and write the code exactly like they have there, cause yeah, thats enough to freak anyone out.


#5

Black, sky, cnd,

Thanks VERY much for your help. This makes more sense now. In my previous life my modus was to start with the easiest req and then add on the more complex, then add bells and whistles and lastly pretty it up.

Thanks again!