Day 34: Progress but Overwhelmed

I built out the majority of my calculator based on my design but it feels like a hot mess. I think I should have written some tests or check points to confirm if I am doing things correctly. It sort of feels like I am working while blind. My plan was not as thorough as it should have been and I had to add a lot of things on the fly. Overall I think it’s an improvement but I haven’t fully tested it. I think the core design makes sense but sticking to best practices and one single methodology while coding is easier said than done. I understand now why frameworks are popular. It’s hard to make your own framework and stay true to it.

TLDR;

Okay, so here are the highlights of what I did:

  • Practice -> Continued working on the calculator project provided in the “The Odin Project” Fundamentals course. Felt like a flurry coding so much without testing the UI. This is a huge difference from how I approached my last calculator. Still have to finish before I can make a genuine comparison.

Task List So Far

  • [x] Finish basic outline design of project (Containers for UI)
  • [x] Set up files and links between them
  • [x] Add rough HTML layout of elements (display, buttons)
  • [x] Plan and Outline functionality of code (How will the calculator work)
  • [x] Build out arithmetic functions (add, subtract, multiply, divide)
  • [x] Build out core functions for calculator
    • [x] Build update state function by matching staging values and checking for differences (Type check is a bonus)
    • [x] Build button / decimal button callback function for their respective event listeners
      • [x] Build decimalCheck function to prevent multiple decimals inserted into Calculator
      • [x] Build updateDisplay function to handle display calls.
    • [x] Build operator button callback function for their respective event listeners
  • [x] Build initialization code to connect elements to event listeners to make the calculator work
    • [x] Had to update HTML to includes classes to get all related UI
    • [x] Had to fix bug for pulling <td> element value
    • [x] Had to add case for the base case of the Calculator Display showing “0”
    • [x] Fix bug where second operand is being appended instead of replacing display

Goal For Round 7 of the #100DaysofCode Challenge

This is my seventh round of the “#100daysofcode” challenge. I will be continuing my work from round five and round six into round seven. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in turn derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.

I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.