I spent 6 hours fixing my TicTacToe code which I wrote 3 years ago. I am trying to make it in another way that isn’t a solution shown on the web. I failed to rebuild my code because it was made in an older version of npm. Just a 3 years old code. That’s how fast tech changed. Anyway, I managed to run it by redoing it on a newer npm version. Some other, I cannot run on mobile phone while perfectly on web version on Chrome. Sometimes, I was wondering if spending time refactoring my code is a good thing. I kept on dwelling with something that has a function. However, spending time like that made me realised a lot of errors on my program. I used to think it was easy and then after developing something else, when I went back to the old codes that I do not remember what I have really written down made me reread my code. That’s when I realized, there were so much more I did not consider doing. Like what happened after this person win. What happened if they don’t click on the empty slot but some other slot that has been filled. The player’s turn. The winning status instead of a pop up. I am still not satisfied after solving them. Then my UI was just trash. Well, have a small fix but I don’t think that is much or a problem. Well, now both programs worked the same way but wired differently. How do I check the performance? What makes my code bad and the internet solution better? The result is the same. Am I wasting my time?
The amount I spent on learning before applying actually costed me more money until I do enough work. Still learning process is still needed even while working. Doing things subconsciously can make the easiest problem complicated. Could be your old habits or subconscious typing or the auto correction? hm.. This one is more like my habit. It is a hard to catch error when we did like that. I was thinking what goes wrong and no matter what I did, it would not return my desired results. Turned the code that I wrote previously and just a line only which I overlooked while checking, was blocking the rest of the changes… Dangerous code is the counter code that you wrote to right a wrong or blocking the wrong from working. That’s normally a temporary solution but the solution turned out to be preventing me doing other works… sigh… 😮💨 Today’s a lucky day and I found it while doing another part… so it is good not to always focus on one problem. The other problem could be the c...
Comments
Post a Comment