What were some of your "OH MY GOD I'M AN AWESOME CODE WIZARD!" moments?

For example, I can remember two or three:
One was when I, with only cursory knowledge of C, never having worked with it but having been exposed to it (and having lots of experience with C# therefore familiar with the c-family syntax), took 5 minute look at a source code and pointed out a bug that the student working on it was trying to solve for the past 2 hours. Sadly, I don't remember what the bug was anymore.

Second one was on reddit, someone posted to gamedev group a 2minute video from his voxel+ai framework he was working on, I watched it, and without any idea what it's written in, or how, I was like "you seem to be dropping frames in a pretty regular manner unrelated to anything I see happening on the screen. You're creating too much garbage on frame-by-frame basis (probably while your AI is exploring what to do), look into object pooling, it'll help".

And the guy responded in a few hours like "by gosh, you're right! thank you! and what do you think about the source code?" (he linked git repo below the video.


=D and the feeling stayed with me for about two days.

(If it's not clear yet, it's perfectly okay, in fact, required, to brag about yourself in answering this question ;) )

  • 6
    Those are such amazing feelings 😊
  • 2
    @Root they sure are :) which is why i'm looking forward for you (and other people) to share some of yours ;)
  • 5
    This should be a weekly rant topic.
  • 1
    The best feeling is running the chunk of code you wrote and having it work the first time. Every time I try out new code I’m like 95% sure I messed something up, but more often then I feel I deserve it tends to work. Sooo, keep expectations low I guess?
  • 2
    Just today i had one of those moments!

    I had to write a callback function that gets as inputs a graph (nodes, edges) and a query response. it should return the fixed graph.
    The function needs to infer relationships between nodes according to the results.

    I gave each complicated condition a readable variable name, commented on every step of the algorithm the logic behind it. That was last week.

    Today I was presented with a complicated use case I haven't taken into consideration. So i took a look at the code, and I still have no idea why and how it works as expected on that use-case.
  • 4
    When after a night of RTFM and setting registers manually I FINALLY got 3 channels of PWM and inputs working on my particular ATTiny.
  • 7
    I still remember one of my first programming classes. Back when I couldn't identify a function from a class, my tutor gave the class a set of numbers and told us to write an algo that rearranged the numbers in order, smallest to biggest. I wrote mine, my tutor looked at my code with shock.

    "Did you look this up online?"


    Did you get help from any of your more experienced classmates?"


    Turns out I just 'invented' bubble sorting in about 10 minutes. I had no idea what I made was generally a standard practice.

    That tutor really took to me over the next couple of years after that. πŸ˜‚
  • 0
    @Emphiliis i know, right? but I'm not an admin so I can't make it one =D

    Also I have a suspicion that without at least one example it's not entirely clear what the question was asking about. Since there already were weekly rant topics of similar type, but here I wanted to elevate the "wizard" part, as in, the success' size/impact was absolutely disproportional to the amount of time+effort expended.
  • 0
    @Crunchy005 oh, yeah. but that's too mundane.

    but you reminded me of another one, recently, where I wrote a whole stackoverflow answer, about 1 a4's worth of explanation, plus 15 lines of unity3d code in 3 functions, directly into the comment box, not even checking if the code compiles, and later when the guy commented on the answer (after already having accepted it), THEN i actually bothered opening up Unity and pasting the code there, to make sure, and it actually worked flawlessly =D

    Keep training, young padawan, you'll get there too, in time ;)
  • 0
    @Mr-Myrk cool, congrats, but...

    ...well, apparently, the examples I gave didn't actually make it clear what was a big part of the point of the question - the impact/size of the success being absurdly disproportional to the tiny amount of effort+time invested.

    but thanks for sharing anyway, that's my fault for not making it clear in the question, gonna try edit that in

    (dammit, too late, can't edit it anymore)
  • 0

    i'm curious - what did he expect the students to do, if not invent bubble sort?

    (i understand the moment, must have been cool, would have been, for me too, but... you know, if he was THIS surprised about it, how did he expect the students to solve it on their own?)
  • 2
    This definitely isn't a coffee wizard moment, but I felt pretty baller when I tutored an engineering class in Matlab despite never having learning it. This was only after a year of learning Java. It's the moment I realized learning a 2nd/3rd/etc language would be easier than I thought.
  • 1
    Well the segmentation fault error stopped so that’s progress for me
  • 1
    My first time was when a friend of mine was in this online contest and he wanted to win so bad. He messaged me asking of I could help him write a program that'll help him cheat and win the contest. I wasn't confident enough about my skills but I decided to give it a shot. Almost 6 hours later and I came up with a Python program that scraps emails online, plugs the emails into the voting contest, clicks "next" on the website(a google form BTW) and clicks on my friends name. The program voted almost 200 times before he asked me to shut it down so he won't be suspected of cheating. I was so hyped because I did what I initially thought I couldn't. It was a really good experience and challenge.
  • 3
    I'm notorious for this. I'll spend a day or three picking up syntax as I go, solve a bug, and then weeks later can't remember a god damn thing about the api, the language or the code.

    It's like I'm an idiot savant. Mostly idiot, with a pinch of savant.
  • 0
    @NikolaiX sounds familiar πŸ˜‚. Although bubble sort generally is considered the worst algorithm isn't it? But I guess it's the logically most simplistic algorithm to implement without really knowing what you're doing?
  • 2
    @Midnigh-shcode I don't know man we literally got exercises where the assignment was "Create 3 variables, read numbers into them and use 3 if statements to sort them." and this was university.
    So there are other solutions... They might not be universally valid on any problem but if you specify your problem enough there is no need to write universally functional code I guess πŸ˜‚

    Freshman programming tasks literally keep people from becoming good programmers because the way they are written you're required to write bad code that will teach you nothing about the real world.
  • 1
    @ElCapitan if you specify the problem enough, you specify it away.
Add Comment