tl/dr : I am just venting my frustration with my code and myself…
I started working on a challenge (never mind what it is.) Then I wondered, is this the right question I am trying to answer? Then I went back to the problem statement seeing that I didn’t really understand what was it about but by that moment I had already written around 100 lines of code that had a dozen of functions to do A, B, C, D… It was horrible… Then I said, “Alright, I can do this…” and erased all of my code…
I made a drawing of the process I needed to follow… But, is it the right process? Am I overcomplicating things? Self-doubt… Procrastination… Time wasting… Tutorial hell… Maybe I should grab a sandwich…
My brand new editor vscode was looking fantastic and I was able to set up a nice workflow… Let’s tweak the editor (yeah, I was avoiding!) When I was done playing with the theme, the fonts, yada, yada, yada, for two or three hours, I coded againg… I was seeing the problem under a new perspective and comenced again to code… Errors poped where I didn´t expect… I couldn’t understand why… Frustration set… I restarted everything… Now it works… Sort of… Nah! It doesn’t work!
From this session of coding, I created a function to verify the format of the values entered… It runs!.. Then, upon reading carefully, the function was not needed because the challenge states that “assume that the data entered is correct.” It was too late because I started wondering about things like what is the output of print(int("09")
in python? Would it produce 9
? (luckily it did…) I was proud of a function I coded that is meaningless for the task at hand… OK, time to stop and have quality time with my family… Though, in my head I was still thinking about that silly code…
The next morning I woke up refreshed at 5:00 AM, had black coffee to become fully alive and functional (pun not intended… sorry.) “Any idiot could have written that piece of $h17!” (Thankfully my present self is compassionate with my old self…) “Have you made some sort of pseudocode yet or a drawing?” No… I haven’t… And the pseudocode thing brings me bad, bad memories from back at highschool trying to program in MS BASIC… I wish I could code like the dude Dade Murphy in Hackers… Wait, wasn’t Angelina Jolie in that movie? Can you guess what happened? I am now doing “reserach” about that Hackers movie…
Then I think: “How about taking a hint about how to solve the problem?” Easy way out… No! I have got to solve the problem myself! OK, what about posting at the forums to see the light? What am I goning to post? I don’t even know what to ask and torturing users and moderators and anyone reading here with sense-less code is a crime… Maybe I should see what’s on TV…