Calcu…much…later

Things I’ve worked on/completed since my last post…

I want to use a lot of exclamation marks, but I’ll just use a subtle bracketed one instead…

I finished the calculator project(!). I also started on the Intermediate HTML and CSS course.

https://codecara.github.io/Calculator-Project-The-Odin-Project/

Things that went well…

Finishing the calculator project is the thing that went well.

However…some other things I was pleased with included:

Figuring out how to do little things I hadn’t done before (e.g. truncating decimal numbers).

I noticed that I had more awareness of where I was returning values from functions, which may not sound like a big deal, but I have returned values in the wrong places previously.

I did need a little help from the Discord community early on in the project, but *I figured out all the rest by myself *(I was determined not to ask for help this time unless it was absolutely necessary). 

I thought that I finished the project on Monday the 29th of July, until I realised I had made a serious error (see details in next section below). Part of me wanted to scrap what I had as I wasn’t sure I would know how to rework what I had to get it working, but on the advice of someone on The Odin Project, I stuck with it and solved it in the end, which I am proud of.

I used a colour palette from a website I found online – my first time doing this.

When trying to fix bugs, on more than one occasion, I would go to test the calculator and nothing would appear on the screen. I tried not to panic when this happened and went slowly through the changes I made. In most cases, this was due to a missing regular or curly bracket. 

In spite of my ‘false finish’ on Monday, I ended up fixing the calculator and even implemented a new feature, which was to showing the current calculation at the top of the screen.

I also spotted one or two further errors (such as returning an error prematurely when dividing by ‘0’, which impeded calculations by numbers > 0 and < 1. I also fixed this error.

Things didn’t go quite so well…

I thought I finished the project on Monday 29th of July, but realised I had a serious error, which meant that the ‘=’ button needed to pressed after each calculation before any subsequent calculations could be done.

After a lot of going through the code again, testing and seeing other bugs along the way, I finally finished it (again!) on Thursday the 1st of August.

I posted it to the finished projects forum on The Odin Project and as much as I appreciated all the kind messages I got, I also got a message which kindly pointed out another bug that I had. So I tried to fix that, created one or two more bugs along the way, fixed those and submitted the final result (above).

I admit that I am almost afraid to test it ‘too much’ in case I discover another bug as I think it is acceptable for this stage of the course and from what people have told me, as long as it does what it was required to do, it’s best to move along.

I had some issues with long chains of logical operators at some points, but went through them line-by-line to find the errors each time.

When sorting out the initial problem with the calculator, I saw that I had introduced further bugs on occasions. Perhaps because I was so eager to finish it, I neglected testing it sufficiently (to adhere to the project specs at least). Some of my bugs were caused by relatively ‘simple’ things like misusing equality and assignment operators, but I found them in the end and fixed them and learnt a lot from this.

Although I am proud of my project, I was more concerned with ‘getting it working’ than with creating the most aesthetically-pleasing calculator possible. I do think the final result is not too bad, but it was suggested to me that the Clear button was perhaps too large, which I would probably agree with. However, for the purposes of moving on, I decided that I did not feel it was worth the time investment on this project, to then change the UI. *Perhaps I will give more thought to the UI in my next project. *

Things I’ve learnt/things I need to improve on…

I did initially try to start this project with pseudocode, but ended up just getting into the coding part and discarded this. In hindsight, I probably should have invested some time into the pseudocode, which may have helped me to avoid some problems.

I did not do much (if any) refactoring. I think I could have done this and could have done it even more efficiently if I had planned with pseudocode to begin with, which would have enabled me to see repetition before I began coding.

I need to test more before submitting a project.

I used console.log an awful lot to figure out how things were working and where. I would like to learn how to use the debugger more and to rely less on console.log.

Plan for the forthcoming week…

I have moved onto Intermediate HTML and CSS and am working my way through the theory part at the moment. I anticipate that I will still be doing the theory part by next week, although I would love to finish it within that week and move onto the projects (perhaps too ambitious – I will see how it goes).


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top