DEV Community

CodeCara
CodeCara

Posted on

Yes, I'm still in the same place (To-do)

Note: I’ve decided to change the order of my posts as it makes more sense to liste the issues I’ve had, followed by the positive outcomes. Also, this should have been posted on 19/01/25.

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

I am still working on the To-do project.

Issues I had…

When I was trying to change variables and return them to use somewhere else, on one occasion, I mistakingly added the variable as a parameter which caused a lot of strange problems and I did’t get a ‘this has been declared elsewhere message’ - I only figured it out by undoing steps one-by-one.

I realised I was using unique Task IDs in the wrong way as I was trying to use them as indices for some reason, which worked fine until i started delting things so had to introduce for loop and seach for taskID.

I finally got all my logic for adding, editing and deleting tasks for one project only working correctly. I had to test everything in multiple ways to make sure there weren’t any bugs, as I had previously thought I had everything working, only to notice bugs as soon as I started testing in more complicated ways.

I moved onto the functionality to fit multiple projects - I had been so preoccupied with getting it to work for one project, that I didn’t put much thought into this bit prior. I started ‘adding things in as I went’ (not the best approach) and eventually founds myself in knots after a few days. I decided the best thing to do would be to go back to my previous git commit as I had approached this too haphazardly.

Things that went well...

I ‘solved’ a scoping problem I had in my single project functionality logic what I was stuck on for longer than I would like to admit - it turns out that using event and event target fixed the issue - not sure why I did not go down this road before, maybe I forgot about it.

I ‘solved’ other inaccessible variable problems by returning them to functions and assigning to variables in the function call in the event listener.

I have been experimenting a lot more and testing things out that made sense to me, rather than always googling solutions - I learnt so much from this. I am probably discovering things/features of JS I can’t even label, but regardless, if ths logic is going into my head, it can only be a positive.

I have not been asking asking the TOP community for as much help and have been solving more problems myself.

Things I've learnt/need to improve on...

Even though I knew what they were, I had not been using breakpoints in the debugger, thinking it would be a learning curve which would distract me from the project, but I tried it and it was easy and saved a lot of time compared to single-stepping through functions as I was doing before(!).

I find myself better at reading the console output - especially when logging structures containing classes, for example, as the format of the output takes a little bit more interpration (for me, at least - or maybe I hadn’t been looking properly)

I am still ‘rewiring’ my structures for the data and DOM to enable further projects to be added and one HUGE thing I realised is that I should have planned out ALL of these data structures at the beginning. I had planned to some degree, but I think my lack of more comprehensive planning in relation to adding further projects etc. was because I wasn’t exactly sure how to organise them for what I needed at the beginning - maybe I couldn’t see the bigger picture clearly. In any case, I think this is a huge takeaway for me and something I will give a lot more thought to in future projects.

Plan for the forthcoming week...

I hope to at least finish all the data and DOM logic for adding further projects to the To-do project.

Top comments (0)