Errors
So a good deal of my time coding this week has been spent not in service of the new dailies, but trying to fix one of last week’s dailies: number 5, which as of the end of open lab hours last Thursday, I believed that I had cracked (with plentiful help from Scott - thanks again). But as I’ve been repeatedly informed about coding, both in this class and from more code-minded friends, shit WILL fuck up on you, and I guess this week was my first big exception.
I was really proud of getting the 5th daily working to spec, considering that I had been banging my head against my code for quite a while trying to see what was wrong with it. One of my most satisfying coding moments to date, even considering what happened afterwards. SO after I actually got it working, I attempted some light refactoring on the code to make it more readable (classic stuff - replacing digits with variables and so forth). I refreshed the window (or at least, so I think - upon recollection this could have been my error) with my HTML file in it and all appeared well, so I did the whole pull request thing.
AND THEN.
Later on, during the code lesson, I decided to refresh the page, only to find that for some horrible reason my code has stopped functioning. My heart sinks. After some brief diagnostic stuff I basically realized that for some reason p5.js was not recognizing one of my “random”s when it was used as an x-coordinate, but only that one? I still don’t understand it.
Long story short, I get my code working, but on a smaller scale: instead of the fully functioning code I got for a brief minute last Thursday, my “rain” now only spawns on the cursor. And I haven’t been able to get it to work better on my own yet. I still believe myself to be really really close to getting it functioning again, though.
I guess on weeks like this I can seek solace in the coding issues of others, such as Joe or Todd; it makes me feel more OK about still being a little bit lost in this process.