Anybody else have trouble with getting stuck on very little things? Keeps happening to me in class and sometimes gets to me. I'll be able to finish most of my work in quick time and all is good (I get excited that everything runs so I'll write with some speed), but then some very very little bug is there and I get stuck on it for a very long time and I just feel bad about myself. I guess this does happen, what do you guys do to blow off some steam? I know I should just take my time since I'm still a beginner and I'll try to work on that.

  • 4
    A nice hot shower. Seriously, it's the best debugger you can get!
  • 3
    Happens all the time.
    Sleep helps, too, or going for a short walk. Just get your mind off the bug for a while and replenish that energy.
  • 2
    fap and sleep
    where fap:- functional algorithmic practice
  • 2
    @tysa This one is my favourite. But where fap means the sound you make when the bottom of your fist meets your public region on the downward stroke of penis stimulation.
  • 3
    Happens to the best of us all the time.

    With code being explicitly written, there is no "you know what I meant."

    Sometimes the issue is easy to spot, sometimes not.

    A couple things that can help:
    1) A good IDE that will highlight syntactically incorrect code
    2) Peer review
    3) Time and experience with a given language
    4) Using echo/print/console.log to output data for review after key logic points using the "half-split method" which is common in electronic circuitry

    Expanding on point 4:
    The half-split method is where you check for expected values halfway through the code in question. If it's good, you know the problem is in the second half, so half the second half and try again. Keep narrowing it down that way until you find the bad code.
  • 0
    @drRoss thank you for that vivid description .
  • 1
    This is honestly a lot of being a developer. The funnest part is when you're trying to find the bug in code you didn't write! :)

    A lot of what I learned in my firsts couple if months as a dev was how to find these bugs. Step through the code, outputting variables as much as possible. Never assume that a variable has the right value, especially when you're new to programming. This is how I often find the error. Then I have to look up why it did thing X instead of thing Y.

    Patience is important. But it's also important to know when to get help. My boss has the hour rule. If you're stuck for an hour, ask for help. Could be from a professor, but it could be on a forum, from a mentor, or even just google. The better you can learn to ask the question, the better off you'll be, either because you will be more likely to get an answer or because you will find the problem in the question you ask.

    Good luck!
  • 1
    @purged Thanks, this'll come in handy big time as I start getting into more complicated projects or start working on other people's code.
  • 0
    @jediping This makes me feel quite a bit better, I'll try not to beat myself up. That hour rule will be very useful, I tried not to look things up/ask too often but it does make sense to do it once it's been too long since all it'll do is set me back in time and it can annoy me. Thanks for your input!
  • 0
    @TheBoJaN true, you have to know when to let it go
  • 0
    @tysa the good old fap... Lol
Add Comment