DEV Community

omar0425
omar0425

Posted on • Edited on

My Phase 1 Final Project at Flatiron

Image description

Initially, this project felt intimidating, and I needed more confidence to make this app. While working on it, I hit many bumps in the road, some more frustrating than others. Figuring out what to create was more challenging than any code I had to write.
I kept running away from my plan to make a weather app, but I kept returning to the idea of having real-time data to be helpful. The app started as just an app that could fetch weather, but slowly it turned into more. I decided to make a button to change and convert the temperature from Celsius to Fahrenheit, and This was the most challenging part of my project.
Surprisingly the most superficial errors confuse me the most.
When creating the button to change the temperature from Celsius to Degrees, I would need clarification about what part of my code had to be true for my button to function correctly. I reached out on Reddit and asked for help with the problem I had coding the button. Everyone who helped would give me hints and ensure I struggled my way through. If my first if statement was "True," then return the opposite. Else return the "truthy" statement.
My project's second most challenging part was figuring out how to render data from the Weatherstack API. I used the destructuring method to create variables I could later use to post data to the dom. My first instinct was to make the variables global and outside a function. After researching multiple sources, I quickly learned that this was bad practice. Finally, I could create a function that could keep the variables functionally scoped. One of the best analogies I found online was by youtube instructor Mosh Hamedani. He says that a global variable can be seen as a toothbrush. You would not want everyone to use your toothbrush. This analogy helped me get through this project.
This project helped me understand functional programming as a newbie. I clearly understand how all the functions I created to flow into one another. Higher Order Functions and First Class Functions were highly challenging for me to understand, but with the completion of this project, everything is clearer.
Image description
All in all, it was a great project and learning experience. Sometimes you have to believe in yourself and just keep pushing forward.

Top comments (0)