DEV Community

Cover image for What's Been Your Most Perplexing Coding Moment?
Ben Halpern for CodeNewbie

Posted on

What's Been Your Most Perplexing Coding Moment?

Share a coding experience that left you scratching your head in confusion. What was the problem, and how did you eventually figure it out? What lessons did you learn from that experience?

Follow the CodeNewbie Org and #codenewbie for more discussions and online camaraderie!

Image by Freepik

Top comments (3)

rasheedmozaffar profile image
Rasheed K Mozaffar

A very noob moment, when I was starting out with a client side framework (Blazor), and I added a delete functionality to the items on a page, and every time I'd click delete, the request will go to the server and delete the resource, but the element would stay on the page until I refresh 🗿

I dunno why that was confusing, and it took me some good time to figure out what's wrong 🥲

bytebodger profile image
Adam Nathaniel Davis • Edited

I've been doing this so long that I remember when we used to write all of our code in plain text editors. No fancy, comforting IDEs. And like most coders, I used a fixed-width font. I didn't realize that, in the font I was using, a capital "I" and a lowercase "L" were, pixel-for-pixel, identical.

I had a PHP script with a few thousand LoC. And though it's rather hard to pull off, somehow I'd managed to type a capital "I" where a lowercase "L" should've been. Inside of one of my variable names. Of course, there was no convenient red, squiggly, underscore below the mistyped variable name. You had to run the script and then see the erroneous output claiming that the variable was undefined - even though (I thought) I could plainly see it there in the editor. My troubleshooting skills were also not as "evolved" at that point. It drove me friggin insane.

I seem to recall spending a couple of days just trying to solve that one baffling issue.

baenencalin profile image
Calin Baenen

Isn't this similar to the previous CodeNewbie Daily Discussion, What Aspects of Coding Still Leave You Feeling Uncertain??