Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
arminiae5658yHappens 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. -
drRoss48808y@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.
-
purged39408yHappens 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. -
jediping58yThis 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! -
@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.
-
@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!
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.
undefined