5

Me when I am trying to fix a bug and I skip the part of the code where the bug is, because I am sure it is correct. https://media.giphy.com/media/...

Comments
  • 0
    Don't you use error codes?
    Or group your code?
  • 1
    @Cyanite I do, but sometimes the code runs perfectly, it just does something unexpected so I need to find the flaw in the logic.
  • 0
    @GarreauArthur
    That should be solved by code groups?
  • 0
    @Cyanite What are code groups ? I checked on Wikipedia but I don't see how they can help
  • 1
    @GarreauArthur
    Exactly as it sounds. You group together similar pieces of code, so if something is wonky, you know where to look.

    Such as defining variables at the same place, or creating related functions next to each other.

    In Python, I take it a step farther. With large files, I split the file into several smaller files containing related variables/functions and import from them as needed. Though, this can't be done in all languages.
  • 1
    @GarreauArthur
    Also note that that article is talking about 'group codes' and not 'code groups'
  • 0
    @Cyanite Alright, this was what I thought in the first place. Everyone does that, but sometimes the bugs appear later, and I do not necessarily check the parts that I thought were correct. Some bugs are really tricky and involves hardware knowledge (which is not the case with python).
  • 1
    @GarreauArthur

    "Everyone does that" ...You'd be surprised of the horrors one can find on github..

    "I do not necessarily check the parts that I thought were correct" Thats your own fault. :P My advice; Unless you KNOW whats wrong, check those places first. Things go wrong where you least expect them to. And I don't just mean with programming. :3
Add Comment