My first Javascript project

My first Javascript project

My first Javascript project

My latest stage in my self-development journey is about learning Javascript to help me when I’m writing my automation tests and also to help me figure out which path I want to go down in my career. The best way I learn is by doing so I decided to create a Javascript calculator. I have started my learning already by watching videos on Udemy and Pluralsight but there’s only so many videos I can watch before I fall asleep. I have to start doing.

The html and CSS parts of the project I found simple as I am familiar with that kind of stuff now and I was already familiar with CSS from my previous job as a graphic designer. So I started by creating a simple UI for the calculator, nothing fancy, 10 numbers and some operators, job done. The next bit was my biggest challenge, how to get this thing working. I started this project on Monday, I stared at the screen for ages wondering where do I even start? I googled and googled and in the end I turned to a tutorial about how to build a calculator. The first few steps I understood fine but then it got a bit tricky. And by a bit tricky I mean impossible. I couldn’t relate to why certain things were being done in the tutorial and why variables were in certain places in the code etc. I found myself copying and pasting, who learns anything by copying and pasting? Not me! Down and disheartened I was ready to give up learning Javascript altogether, I’m never going to be able to do this? I knew the syntax and steps I had to take and the actions I had to take to make the buttons work etc. but I just didn’t know where to start with putting all of these things together. I know what to do I just don’t know when to do it.

Monday passed and I was telling myself I couldn’t do it. I’m not the kind to give up easily especially when it comes to making myself better so I thought I’d give it another go on Tuesday. No tutorials or videos that could confuse me, just me in my own bubble figuring things out. I started by writing down each step I would have to take to make it work starting with the buttons. And then slowly but surely something started coming together. There was still some googling and article reading etc. However within a few hours I’d done it. I had made my very own calculator, decimal places and everything. Then the tester in me took over and I started finding things wrong but again in no time I had debugged and fixed them. To say I was proud of myself was an understatement and the high I felt on the Tuesday compared to the low I felt on Monday really made me realise that I can do it, I’d had my light bulb moment. Don’t get caught up in the tutorials online or the videos, yes use them as guidance but don’t just copy because your logic might be different but you get the same result. Do things your way and learn by doing things wrong. I feel much more confident now and I still have a million miles to go but everyone has to start somewhere.

There are still some things I would still like to do but have a look at how I managed to make a calculator https://github.com/nicolestanton/Calculator-js

Nicole

Leave a Reply