Forum

    • Register
    • Login
    • Search
    • Categories

    The pain of programming - just venting

    General Questions
    5
    6
    104
    Loading More Posts
    • 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.
    • d.healey
      d.healey last edited by d.healey

      I've spent the last two days trying to solve an issue with my custom wordpress API plugin. In order to do that I had to set up a proper PHP debugger, in order to that I needed to update the PHP version on my local server, in doing that I accidently wiped my database!

      So then I tried to restore from a backup, that didn't work, so then I rebuilt the site. Then I installed the debugger and spent two hours trying to get it to work. Then it finally worked and in two minutes I found the problem - I needed to add a single backslash to my code!

      alt text

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      Casey Kolb 1 Reply Last reply Reply Quote 7
      • Casey Kolb
        Casey Kolb @d.healey last edited by

        @d-healey I feel your pain. I spent a week trying to figure out why the new Develop branch was completely incompatible with CUBE. Every time I would open it, I'd get like 30 errors with no explainable cause and the whole interface was broken. Turns out x === undefined now always returns false in HISE, and all I had to do was change it to x == undefined or use isDefined() 😲

        Casey Kolb
        Founder & CEO of Lunacy Audio
        Composer | Producer | Software Developer

        1 Reply Last reply Reply Quote 2
        • A
          arminh last edited by

          @d-healey said in The pain of programming - just venting:

          m a backup, that didn't work, so then I rebuilt the site. Then I installed the debugger and spent two hours trying to get it to work. Then it finally worked and in two minutes I found t

          Just PHP things. That's why I prefer write own ecommerce solutions with MENN (Mongo, Express, Node, Next.js);

          1 Reply Last reply Reply Quote 0
          • Christoph Hart
            Christoph Hart last edited by

            @Casey-Kolb I think what you have encountered is the special Javascript type void, which is only used if you try to access a nonexistent member of an object (or out-of bounds indexed access of an array). I don't understand why it's there and any code that relies on that distinction has a code chance to win the "Most Horrible Code Award", but apparently the === operator (which I never use) distinguishes between undefined and void.

            var x = {};
            var y = undefined;
            
            reg a = x.prop == undefined; // true
            reg b = x.prop === undefined; // false (it's void)
            reg c = y === undefined; // true (it's undefined);
            
            Casey Kolb 1 Reply Last reply Reply Quote 3
            • Casey Kolb
              Casey Kolb @Christoph Hart last edited by

              @christoph-hart Fascinating! I've definitely been nominated for "Most Horrible Code Award" before 😂

              Casey Kolb
              Founder & CEO of Lunacy Audio
              Composer | Producer | Software Developer

              dustbro 1 Reply Last reply Reply Quote 1
              • dustbro
                dustbro @Casey Kolb last edited by

                @casey-kolb dont-need-obfuscate-your-code-because-understands-anyway-meme-6305f86a8bab7f98-756f5588f884eb67.jpg

                Dan Korneff - Producer / Mixer / Audio Nerd

                1 Reply Last reply Reply Quote 3
                • First post
                  Last post

                23
                Online

                803
                Users

                5.5k
                Topics

                51.7k
                Posts