Forum
    • Categories
    • Register
    • Login

    The pain of programming - just venting

    Scheduled Pinned Locked Moved General Questions
    6 Posts 5 Posters 736 Views
    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.
    • David HealeyD
      David Healey
      last edited by David 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

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      Casey KolbC 1 Reply Last reply Reply Quote 6
      • Casey KolbC
        Casey Kolb @David 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 HartC
            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 KolbC 1 Reply Last reply Reply Quote 3
            • Casey KolbC
              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

              Dan KorneffD 1 Reply Last reply Reply Quote 1
              • Dan KorneffD
                Dan Korneff @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

                50

                Online

                2.1k

                Users

                13.0k

                Topics

                112.7k

                Posts