Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Worst part of debugging my own code

Worst part of debugging my own code

Scheduled Pinned Locked Moved The Lounge
18 Posts 18 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chris Maunder

    I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

    cheers Chris Maunder

    Mike HankeyM Offline
    Mike HankeyM Offline
    Mike Hankey
    wrote on last edited by
    #4

    Good thing about multiple personalities is that you have alternate views, bad news is do you trust them? :0

    New version: WinHeist Version 2.2.2 Beta
    tomorrow (noun): a mystical land where 99% of all human productivity, motivation and achievement is stored.

    1 Reply Last reply
    0
    • C Chris Maunder

      I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

      cheers Chris Maunder

      L Offline
      L Offline
      ledtech3
      wrote on last edited by
      #5

      It sounds like they are wishful thinking comments , rather than Actual code comments. :) Remember, Trust but verify.

      1 Reply Last reply
      0
      • C Chris Maunder

        I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

        cheers Chris Maunder

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #6

        lol And do you say out the logic loud?If yes, then it's a loud lie! Just like some folks do here in my team.. :rolleyes: :) They just speak out the code while typing. Sounds amusing like "Here we get the list, now this gets sorted, and pass it here.." I feel like he has a Fat mute button on his head.

        Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

        1 Reply Last reply
        0
        • C Chris Maunder

          I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

          cheers Chris Maunder

          J Offline
          J Offline
          Johnny J
          wrote on last edited by
          #7

          At least you've got a better memory than me. I can't remember what code I wrote two days ago, so no matter if it's my code or somebody elses that doesn't work, I will always think to myself: "What flucking moron wrote this piece of c.... ode?) :sigh: So I hate version control systems with blame functionality! :laugh: But I must admit that in my own projects where only I have been involved, I can see a clear difference in code quality from what I do today and what I did 3 years ago. I'm not going to say which code is better, you take the guess... ;)

          Anything that is unrelated to elephants is irrelephant
          Anonymous
          -----
          The problem with quotes on the internet is that you can never tell if they're genuine
          Winston Churchill, 1944
          -----
          I'd just like a chance to prove that money can't make me happy.
          Me, all the time

          1 Reply Last reply
          0
          • C Chris Maunder

            I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

            cheers Chris Maunder

            Sander RosselS Offline
            Sander RosselS Offline
            Sander Rossel
            wrote on last edited by
            #8

            That's the reason I don't read comments and only rarely write them :D

            Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

            Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

            Regards, Sander

            1 Reply Last reply
            0
            • C Chris Maunder

              I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

              cheers Chris Maunder

              B Offline
              B Offline
              Beginner Luck
              wrote on last edited by
              #9

              especially when going round and round doing the same thing and believe it will work :((

              1 Reply Last reply
              0
              • C Chris Maunder

                I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                cheers Chris Maunder

                W Offline
                W Offline
                W Balboos GHB
                wrote on last edited by
                #10

                As an old timer in the world of programming (feed-register-release), I learned that I really cannot debug my own code - and one reason is a constant background process that simply removes thoughts about doing stupid and unexpected things to the application. Over the years, like the rest of us, I spend a lot of effort handling boundary conditions in an attempt to foil user attempts at getting my attention. I comment all over the place - honestly, I'll admit - but sometimes what seemed so clear so long ago was apparently gibberish, after all. Oddly, I don't remember being drunk at the time. So - if I'm fortunate, someone will bang on it before it goes live, looking for problems. Describing the problem to someone also seems to work as I rephrase into the common speech. But - the bottom line is that, when you wrote and released the work, you didn't leave any bugs you knew about in it (or do you work for MicroSoft?) - so why should they be easy to spot now? If they were they'd never have gotten by to begin with. Disclaimer: the preceding was a fantasy of how I pretend I work. Any resemblance to any code that has gone live or is in beta is purely coincidental and probably a figment of both of our imaginations.

                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                "As far as we know, our computer has never had an undetected error." - Weisert

                "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                1 Reply Last reply
                0
                • C Chris Maunder

                  I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                  cheers Chris Maunder

                  B Offline
                  B Offline
                  Bassam Abdul Baki
                  wrote on last edited by
                  #11

                  Remember, he's laughing with you, not at you.

                  Web - BM - RSS - Math - LinkedIn

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                    cheers Chris Maunder

                    M Offline
                    M Offline
                    Member 11159118
                    wrote on last edited by
                    #12

                    No such things as bugs - they are referred to as "undocumented product characteristics".

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                      cheers Chris Maunder

                      B Offline
                      B Offline
                      Brad Stiles
                      wrote on last edited by
                      #13

                      This why I don't generally comment my code. :) Once in a while I will, if it's a case of a brief explanation of an unusual algorithm, or it's not obvious as to why I did something. I adamantly refuse to comment what code is doing, except with regard to the XML comments on library code. Yes, I'm one of those people.

                      Currently reading: "The Two Towers", by J.R.R. Tolkien

                      1 Reply Last reply
                      0
                      • C Chris Maunder

                        I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                        cheers Chris Maunder

                        M Offline
                        M Offline
                        MikeTheFid
                        wrote on last edited by
                        #14

                        Quote:

                        Except they are lies: damn lies.

                        Do you have any statistics on that? ;)

                        Cheers, Mike Fidler "I intend to live forever - so far, so good." Steven Wright "I almost had a psychic girlfriend but she left me before we met." Also Steven Wright "I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.

                        1 Reply Last reply
                        0
                        • C Chris Maunder

                          I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                          cheers Chris Maunder

                          A Offline
                          A Offline
                          agolddog
                          wrote on last edited by
                          #15

                          On the plus side, shows that you're continuing to improve as a developer. Seems as if every time I review something from (say) six months ago, it's "what was I thinking?"

                          H 1 Reply Last reply
                          0
                          • C Chris Maunder

                            I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                            cheers Chris Maunder

                            C Offline
                            C Offline
                            carlospc1970
                            wrote on last edited by
                            #16

                            Try not to be too hard on yourself, you were doing it for your own good... :~ :laugh:

                            1 Reply Last reply
                            0
                            • A agolddog

                              On the plus side, shows that you're continuing to improve as a developer. Seems as if every time I review something from (say) six months ago, it's "what was I thinking?"

                              H Offline
                              H Offline
                              Herbie Mountjoy
                              wrote on last edited by
                              #17

                              Reading comments from 10 years ago is like finding an old diary. Sometimes you think "What was I smoking when I wrote that?" and other times you just chuckle at how naive you were. .

                              I may not last forever but the mess I leave behind certainly will.

                              1 Reply Last reply
                              0
                              • C Chris Maunder

                                I've realised that I lie to myself in code. My comments on why a piece of logic is as it is sound so very convincing and reasonable. Except they are lies: damn lies. I need to sit down and have a word to myself, I think.

                                cheers Chris Maunder

                                S Offline
                                S Offline
                                Slow Eddie
                                wrote on last edited by
                                #18

                                I have recently begun extensively commenting my code, and discovered that it is a wonderful way to de-bug it. I write the code first, then go back and comment it testing to make sure it is really doing what I expected. Now I know purists out there will say I am doing it Bass-ackwards, but it works really well for me. ;P

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups