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. I hate JavaScript

I hate JavaScript

Scheduled Pinned Locked Moved The Lounge
javascriptlearningpythoncomsysadmin
22 Posts 15 Posters 0 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.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

    V W J M K 12 Replies Last reply
    0
    • M Marc Clifton

      You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

      V Offline
      V Offline
      Vark111
      wrote on last edited by
      #2

      Marc Clifton wrote:

      Anyways, in one place, I accidentally forgot to pass in the lists:

      Rule #1 for every JS function I write: Check for undefined, null, and empty values if I don't want them. I do null param checks as the first line of code in every .NET method, why would I do any different in another language? is my thinking.

      M 1 Reply Last reply
      0
      • M Marc Clifton

        You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

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

        I use javaScript for what it does, expect from it no more than what it is. None the less, I feel sympathy for your never-ending distress on this topic. Perhaps?[^] will make all of the pain finally go away?

        <script type='text/javascript'>
        return;
        </script>

        Ravings en masse^

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

        "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

        J 1 Reply Last reply
        0
        • V Vark111

          Marc Clifton wrote:

          Anyways, in one place, I accidentally forgot to pass in the lists:

          Rule #1 for every JS function I write: Check for undefined, null, and empty values if I don't want them. I do null param checks as the first line of code in every .NET method, why would I do any different in another language? is my thinking.

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          Vark111 wrote:

          Rule #1 for every JS function I write: Check for undefined, null, and empty values if I don't want them.

          Good point.

          Vark111 wrote:

          I do null param checks as the first line of code in every .NET method, why would I do any different in another language? is my thinking.

          I agree, but in this case, I know the data was there, it was an error in the parameter list. And yes, Rule #1 would have caught it. Marc

          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

          1 Reply Last reply
          0
          • M Marc Clifton

            You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

            J Offline
            J Offline
            Jeremy Falcon
            wrote on last edited by
            #5

            You're looking at JavaScript the wrong way man. Really, this stuff is a result of not being used to JS. Welcome to the fun. You have to look at it like this, JS is a language that's finally growing up. But, it's powerful in its own right. You can do some pretty amazing stuff with it, provided you learn its quirks. One of which you obviously know about now. :-D It's a flexible language. That's the idea. That's the idea of the web even, and so JS is no exception. However, you must also deal with this as a result. ES6 provides some new stuff, but you can achieve what you're after regardless... Handling required parameters in ECMAScript 6[^] Is it totally different than C#? Yes. But once you get used to the flexibility, it does more good than harm.

            Jeremy Falcon

            M J 2 Replies Last reply
            0
            • W W Balboos GHB

              I use javaScript for what it does, expect from it no more than what it is. None the less, I feel sympathy for your never-ending distress on this topic. Perhaps?[^] will make all of the pain finally go away?

              <script type='text/javascript'>
              return;
              </script>

              Ravings en masse^

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

              "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

              J Offline
              J Offline
              Jeremy Falcon
              wrote on last edited by
              #6

              :laugh: :laugh:

              Jeremy Falcon

              1 Reply Last reply
              0
              • J Jeremy Falcon

                You're looking at JavaScript the wrong way man. Really, this stuff is a result of not being used to JS. Welcome to the fun. You have to look at it like this, JS is a language that's finally growing up. But, it's powerful in its own right. You can do some pretty amazing stuff with it, provided you learn its quirks. One of which you obviously know about now. :-D It's a flexible language. That's the idea. That's the idea of the web even, and so JS is no exception. However, you must also deal with this as a result. ES6 provides some new stuff, but you can achieve what you're after regardless... Handling required parameters in ECMAScript 6[^] Is it totally different than C#? Yes. But once you get used to the flexibility, it does more good than harm.

                Jeremy Falcon

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #7

                Jeremy Falcon wrote:

                You're looking at JavaScript the wrong way man.

                You're absolutely right.[^] I'll endeavor to break the pattern and write an "I love Javascript" post. Someday. ;) Marc

                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                J 2 Replies Last reply
                0
                • M Marc Clifton

                  Jeremy Falcon wrote:

                  You're looking at JavaScript the wrong way man.

                  You're absolutely right.[^] I'll endeavor to break the pattern and write an "I love Javascript" post. Someday. ;) Marc

                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                  J Offline
                  J Offline
                  Jeremy Falcon
                  wrote on last edited by
                  #8

                  Marc Clifton wrote:

                  Someday.

                  :laugh:

                  Jeremy Falcon

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                    M Offline
                    M Offline
                    Master Man1980
                    wrote on last edited by
                    #9

                    Who told you to love it :) It's just like a wild pet. Measure your distance on it.

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      Jeremy Falcon wrote:

                      You're looking at JavaScript the wrong way man.

                      You're absolutely right.[^] I'll endeavor to break the pattern and write an "I love Javascript" post. Someday. ;) Marc

                      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                      J Offline
                      J Offline
                      Jeremy Falcon
                      wrote on last edited by
                      #10

                      And I know it's been said before, but you really want to look at TypeScript or at least ES6/2015 transpilers. It will make your life easier and save some hair in the process.

                      Jeremy Falcon

                      M 1 Reply Last reply
                      0
                      • J Jeremy Falcon

                        And I know it's been said before, but you really want to look at TypeScript or at least ES6/2015 transpilers. It will make your life easier and save some hair in the process.

                        Jeremy Falcon

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #11

                        Jeremy Falcon wrote:

                        but you really want to look at TypeScript or at least ES6/2015 transpilers.

                        Will do. I'm at a good juncture of being able to do that, starting a new side project. Marc

                        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                        1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          You're looking at JavaScript the wrong way man. Really, this stuff is a result of not being used to JS. Welcome to the fun. You have to look at it like this, JS is a language that's finally growing up. But, it's powerful in its own right. You can do some pretty amazing stuff with it, provided you learn its quirks. One of which you obviously know about now. :-D It's a flexible language. That's the idea. That's the idea of the web even, and so JS is no exception. However, you must also deal with this as a result. ES6 provides some new stuff, but you can achieve what you're after regardless... Handling required parameters in ECMAScript 6[^] Is it totally different than C#? Yes. But once you get used to the flexibility, it does more good than harm.

                          Jeremy Falcon

                          J Offline
                          J Offline
                          Jorgen Andersson
                          wrote on last edited by
                          #12

                          Yes, it's finally growing up. despite the parents being siblings. And it can do pretty amazing stuff, on the banjo.

                          Wrong is evil and must be defeated. - Jeff Ello

                          J 1 Reply Last reply
                          0
                          • M Marc Clifton

                            You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                            K Offline
                            K Offline
                            Kiriander
                            wrote on last edited by
                            #13

                            Earlier iterations of C were so type-ignoring, you could pass 3.14 to a function expecting an int parameter. It compiled nontheless and produced horrible stack garbage.

                            1 Reply Last reply
                            0
                            • M Marc Clifton

                              You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                              Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                              P Offline
                              P Offline
                              Plamen Dragiyski
                              wrote on last edited by
                              #14

                              Don't confuse "optional" type checking with "impossible" type checking. You were never been on the other side, where in some random language (I don't want to mention names) you are enforced to write a specific type, where the parameter must be one type if the first parameter has a specific value and another one if it has another value.

                              1 Reply Last reply
                              0
                              • J Jorgen Andersson

                                Yes, it's finally growing up. despite the parents being siblings. And it can do pretty amazing stuff, on the banjo.

                                Wrong is evil and must be defeated. - Jeff Ello

                                J Offline
                                J Offline
                                Jeremy Falcon
                                wrote on last edited by
                                #15

                                A true loving and caring lanaguage keeps it in the family. :rolleyes:

                                Jeremy Falcon

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                                  K Offline
                                  K Offline
                                  kalberts
                                  wrote on last edited by
                                  #16

                                  As a general rule, I hate interpreted languages, in the sense: Languages where the syntax the basic semantics are not checked for all the code before execution starts. Some languags would be suitable for such checks even though they are (semi)interpreted languages, but leave the checking to independent lint-like tools (which reminds me: By my definition, good old K&R C comes very close to the 'interpreted' class!) - use them if you care to, but you may ignore them if you want. There is one readon why some interpreted langages (barely) tolerable to me: I was responsible for maintaining a program system of roughly 100K lines of Tcl - a language having a syntax which is roughly

                                  <token>\*
                                  

                                  The permitted sequence of tokens, and the semantics of them, are totally context dependent. You don't know if a line is a string constant or an active statement until you encounter it during execution. Or rather, any time you encounter it. In one context the line may be an active statement, a moment later it may be a string literal. Coming from Tcl to a language where an 'if (<expr>) {...}' really is a conditional statement, always and every time, is a great relief. I sure wish that <expr> was verified to be a boolean expression before we start, but even without that, we are way better off than with Tcl. But if at all possible, I try to avoid interpreted languages. And dynamic binding. And plugins (well, they are a special case of dynamic binding). Whatever can be checked statically, should be checked statically. And that should be as much of your code as possible, preferably 100%.

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                                    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                                    R Offline
                                    R Offline
                                    RugbyLeague
                                    wrote on last edited by
                                    #17

                                    I only use it once in a blue moon so maybe I am missing something but so much of it seems like guesswork - tools such as intellisense don't work with it because objects could be anything. I spend at least 80% of my time in javascript trying to work out what I have and what I can do with it.

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                                      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                                      C Offline
                                      C Offline
                                      CygnusBMT
                                      wrote on last edited by
                                      #18

                                      JavaScript is an aberration. Any efforts to make it more manageable (i.e. TypeScript) is just putting lipstick on a pig.

                                      L 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        You know you've posted this too many times when Chrome auto-completes the subject line for you! Anyways, I have this function: function initializePage(raceList, hlsList) ... (for demographics, race and Hispanic/Latino/Spanish, of course, a "I don't want to answer" is accepted) but anyways, Randomly, the list would not load. Really hard to reproduce locally, would happen once every 10 or 15 pages loads on the real site. Those lists, and others, are acquired from an Ajax call that only calls this function after all the lists have been loaded from the server. Of course it's a stupid way of doing it, but at the time... Plus this particular page used to only have those two lists, but then it grew to more things...you know how that story goes.. and of course what's worse is that this is the only page where I seem to have forgotten to refactor the code and do it "the right way." Anyways, in one place, I accidentally forgot to pass in the lists: initializePage() which resulted in the random "why isn't the list showing up" error. I blamed my SPA code, I blamed jqWidgets, I blamed my mother. And after staring at the code for hours over several weeks, I finally actually saw the offending line. God, I want parameter type checking. I know, use TypeScript or something. Marc

                                        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

                                        S Offline
                                        S Offline
                                        Steve Naidamast
                                        wrote on last edited by
                                        #19

                                        I have written quite a bit of complex JavaScript in my time as a corporate developer. And I am still amazed at why anyone would use such an awful language as their primary language for web development when there are other more mature options available such as not using it altogether and make the bloody server call...

                                        Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                        1 Reply Last reply
                                        0
                                        • C CygnusBMT

                                          JavaScript is an aberration. Any efforts to make it more manageable (i.e. TypeScript) is just putting lipstick on a pig.

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #20

                                          Agreed, and to really understand the future of JS: once upon a time people said BASIC would go away, it really needed to happen well years, no decades later, not just still here, but the super tankers of lipstick applied to it over the years has resulted in such a huge steaming mountainous POS it would choke the black hole in the center of the Milky Way. and yes, that's where java script is headed.

                                          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