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. Why JavaScript is Insane. Reason 26

Why JavaScript is Insane. Reason 26

Scheduled Pinned Locked Moved The Lounge
javascriptphpvisual-studiocomquestion
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.
  • C Chris Maunder

    6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

    cheers Chris Maunder

    J Offline
    J Offline
    jschell
    wrote on last edited by
    #3

    Chris Maunder wrote:

    If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding?

    When I went to college I don't remember anyone teaching anything like that for the languages that they taught which included pascal and fortran. So not sure why anything should be different now. More so since I have since learned of course that often "best-practice" is very likely only "my opinion" when someone actually questions the source. In college though the 'source' at least sometimes was cited as some book which the teacher was the author - so often not really a viable source even then.

    Chris Maunder wrote:

    ...as to how knowledge of these ancient arts is passed down in a way that let's people move on sanely.

    By doing it day to day in a job. Certainly how the two people that I worked with in a lab in college did it. The lab certainly wasn't teaching anyone how to create an actual circuit but at that point they had been doing it for a job for about 15 years. They were only going to the university because, at that time, the only way you could move up at their company and get paid more was by getting a degree. Despite the very obvious evidence that taking the class wasn't going to teach them anything at all.

    1 Reply Last reply
    0
    • C Chris Maunder

      6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

      cheers Chris Maunder

      J Offline
      J Offline
      Jon McKee
      wrote on last edited by
      #4

      They didn't teach JS when I was in college (Java instead X|). Tbh I think a lot of JS confusion comes from attempting to apply how other languages work that you already know to how JS works - and it's almost always wrong. The topic that always comes to mind is this[^]. Personally I like that JS lets you have flexible control on context, use, and binding. I disliked the complexity at first but after spending some time with the language I see the usefulness on top of it being much less mysterious now. Some stuff is obsolete but some things can only be accomplished using a specific technique as the article points out.

      1 Reply Last reply
      0
      • C Chris Maunder

        6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

        cheers Chris Maunder

        M Offline
        M Offline
        Munchies_Matt
        wrote on last edited by
        #5

        I am glad I use C!

        D L 2 Replies Last reply
        0
        • M Munchies_Matt

          I am glad I use C!

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #6

          :thumbsup: fast, powerful and easy.

          GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X

          1 Reply Last reply
          0
          • C Chris Maunder

            6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

            cheers Chris Maunder

            E Offline
            E Offline
            Ehsan Sajjad
            wrote on last edited by
            #7

            where are the other 25 reasons ? curious to read those too. :)

            A 1 Reply Last reply
            0
            • C Chris Maunder

              6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

              cheers Chris Maunder

              T Offline
              T Offline
              Tim Carmichael
              wrote on last edited by
              #8

              Chris Maunder wrote:

              Is anyone learning JavaScript at a school or college?

              Sorry... we have to rephrase that as per the PM to make it 'inclusive'. What had heretofore been known as JavaScript will now be called BeverageScript. Office of the PM

              C 1 Reply Last reply
              0
              • T Tim Carmichael

                Chris Maunder wrote:

                Is anyone learning JavaScript at a school or college?

                Sorry... we have to rephrase that as per the PM to make it 'inclusive'. What had heretofore been known as JavaScript will now be called BeverageScript. Office of the PM

                C Offline
                C Offline
                Chris Maunder
                wrote on last edited by
                #9

                BeverageKind is, I think, the accepted term.

                cheers Chris Maunder

                T 1 Reply Last reply
                0
                • C Chris Maunder

                  BeverageKind is, I think, the accepted term.

                  cheers Chris Maunder

                  T Offline
                  T Offline
                  Tim Carmichael
                  wrote on last edited by
                  #10

                  Insanity rules...

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                    cheers Chris Maunder

                    K Offline
                    K Offline
                    killbot5000
                    wrote on last edited by
                    #11

                    In my experience people don't learn JavaScript. They copy-paste random code until it magically starts working, then refactor everything into a gazillion functions and plaster unit-tests all over it. Once they realize they've written too much code and have too many dependencies, they call it a framework. ¯\_(ツ)_/¯

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                      cheers Chris Maunder

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

                      Your question almost seems to assume that those writing JS are "learning it at school or college". My impression is there is a lot of blind use of "other" code, that is misunderstood, then f*rked, patched, etc. Exactly what is going on in every new crypto-currency.

                      "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

                      1 Reply Last reply
                      0
                      • M Munchies_Matt

                        I am glad I use C!

                        L Offline
                        L Offline
                        Leng Vang
                        wrote on last edited by
                        #13

                        I grad I'm NOT using C or C++. The day of manual memory management, its so flexible, so archaic, its such a dinosaur. I have to go back to it once in a while when developing IoT stuff, but other than that, I'm happy with C# and even JS.

                        M 1 Reply Last reply
                        0
                        • L Leng Vang

                          I grad I'm NOT using C or C++. The day of manual memory management, its so flexible, so archaic, its such a dinosaur. I have to go back to it once in a while when developing IoT stuff, but other than that, I'm happy with C# and even JS.

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

                          So called 'garbage collection'. That is why apps these days are so bloated. Managing the memory yourself means you only use what you need, when you need it. It really is very simple.

                          L 1 Reply Last reply
                          0
                          • C Chris Maunder

                            6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                            cheers Chris Maunder

                            L Offline
                            L Offline
                            Leng Vang
                            wrote on last edited by
                            #15

                            Last time I heard MIT switch to JavaScript from Java. Most school teach web (authoring) and some minimal JS. When I was in school, the only teachable languages available are C, Pascal and FORTRAN.

                            1 Reply Last reply
                            0
                            • M Munchies_Matt

                              So called 'garbage collection'. That is why apps these days are so bloated. Managing the memory yourself means you only use what you need, when you need it. It really is very simple.

                              L Offline
                              L Offline
                              Leng Vang
                              wrote on last edited by
                              #16

                              And so called "Memory Leaks" creep up on self managed memory allocation sometime blue-screened the entire app. Or are we so perfect that it will never happens? ;)

                              M 1 Reply Last reply
                              0
                              • L Leng Vang

                                And so called "Memory Leaks" creep up on self managed memory allocation sometime blue-screened the entire app. Or are we so perfect that it will never happens? ;)

                                M Offline
                                M Offline
                                Munchies_Matt
                                wrote on last edited by
                                #17

                                Why would memory leak? You free memory when you have done with it.

                                1 Reply Last reply
                                0
                                • C Chris Maunder

                                  6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                                  cheers Chris Maunder

                                  A Offline
                                  A Offline
                                  Asday
                                  wrote on last edited by
                                  #18

                                  >no winners or loosers

                                  1 Reply Last reply
                                  0
                                  • E Ehsan Sajjad

                                    where are the other 25 reasons ? curious to read those too. :)

                                    A Offline
                                    A Offline
                                    Asday
                                    wrote on last edited by
                                    #19

                                    [JavaScript reference - JavaScript | MDN](https://developer.mozilla.org/bm/docs/Web/JavaScript/Reference)

                                    1 Reply Last reply
                                    0
                                    • C Chris Maunder

                                      6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                                      cheers Chris Maunder

                                      D Offline
                                      D Offline
                                      dandy72
                                      wrote on last edited by
                                      #20

                                      Reason #26, and still, the page that shows the article fails to render properly on IE11. I'm seeing the image at the top, *lots* of blank space, then the comments at the very bottom of the page.

                                      1 Reply Last reply
                                      0
                                      • C Chris Maunder

                                        6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                                        cheers Chris Maunder

                                        D Offline
                                        D Offline
                                        Dar Brett 0
                                        wrote on last edited by
                                        #21

                                        JavaScript is such a mess that in the past few months while writing some code that should have been simple, loading configuration before starting listening for user requests, I caught myself thinking that what I was doing would have been trivial if I was writing it in C. Add a decent HTTP library or *cgi server and the rest of it wouldn't have been too difficult either. I'm pretty convinced that no one who says anything good about JavaScript has ever even tried to read the ECMAScript specification.

                                        1 Reply Last reply
                                        0
                                        • C Chris Maunder

                                          6 ways to declare JavaScript functions[^] and the related Function Declarations vs. Function Expressions[^] Is anyone learning JavaScript at a school or college? If so do they go into this stuff or just navigate around it and give you a best-practices approach to JavaScript coding? I'm always curious as to how knowledge of these ancient arts is passed down in a way that lets people move on sanely.

                                          cheers Chris Maunder

                                          D Offline
                                          D Offline
                                          dannette
                                          wrote on last edited by
                                          #22

                                          Used this book Pure Javascript[^] ... 1616 pages with supplemental CD! Did I learn much? That's up for debate but still use the book as a reference. And it wasn't that cheap back then.

                                          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