Thursday, May 23, 2019

Day 046: BUILD THE DAMN THING - A Simple MadLibs

I'm pleased to present my first project from (mostly) scratch: a simple and silly madLibs app!

See the Pen Simple Madlibs by 4nn (@4nn) on CodePen.

It's "mostly" from scratch because I had to look up the DOM syntax and later encountered some issues with the HTML5 form inputs, namely using <input type="button"> vs <button>. I need more practice in understanding the DOM. While I understand that part of being a good coder is getting good at asking the right questions to look up stuff, but I can't wait until the day I actually know the syntax well enough to not need to reference documentation!

Here's the user story for the app:

  • Allow user to input various words
  • Generate random madLibs sentence
  • Allow user to clear the madLibs sentence
  • Allow user to clear input values
  • If any input is empty, prompt user input 
  • Pretty up UI with some bootstrap practice

In all I spent about 2 hours on it including the Bootstrap bits. I am not including the time I spent at the end of April trying to create this. This was right after I finished up the Practical JS course and was attempting to create the madLibs in the console first (like the course) and then move it to the DOM. I set up my workspace in VSCode and got to work on the JS file. Unfortunately, I ended up just confusing myself and making it more complicating than it should be and got frustrated and gave up. You know the old adage of putting the cart before the horse? Yep. 

But after watching all those videos during crunch time at work, I got a bit more confident to give it another go. Since it was simple enough, I figured starting it in Codepen was enough and it was! 

I have to admit, even getting to the point where I knew I had to start building stuff scared me. I couldn't put into words why I felt the fear of starting the project, but in retrospect I think it's the sentiment of "I can't fail if I don't start!"

Once I decided to restart the project, it took a whole day to get over the fear. I was procrastinating by doing chores or watching more videos. Once I realized what I was doing, I took to repeating to myself to:

BUILD THE DAMN THING! 

JUST BUILD THE DAMN THING!

And then I did and it wasn't terrible! Sure, I needed to reference some materials and some parts didn't work at first, but it in the end, it was resolved and it works more or less as I envisioned it. It even took less time than I thought it would (I had estimated 6 hours lol). I also reminded myself to take it one step at a time and that helped a lot. 

Knowing how I am, I am probably going to keep having the same fear as my ideas for projects get more complex. But I just have to BUILD THE DAMN THING and just keep chugging along. 

The next projects to work on is a tip calculator, day counter (so I can correctly get my #100dayofcode number), a Tabata timer, and an actual calculator. Baby steps! 


No comments:

Post a Comment