1. 24
  1.  

  2. 18

    It’s pretty remarkable that people can learn to program when confronted with the Tower of Babel that is the Web.

    I’m not talking about JS, I’m talking about the sheer number of concepts to hold in the head at once. The browser is really nice because of it’s ubiquity, familiarity, and also because you may not need a CLI. But, wow, making sense of HTML/CSS/JS all together is a bit much.

    1. 7

      I find that HTML/CSS/JS aren’t that hard compared to others. They are rather cleanly separated, have a lot of reasonable vocabulary (a “border” is a “border”). And they are certainly no tower of Babel: all speak the same languages.

      The development environment is readily available and you can start working immediately. They allow experimentation through their development tool like no other.

      Compare to writing native applications. “iconify”, what? On which platform. What’s a “document-based” app? Lifecycles. And why is this in Obj-C, that in Java and that in C#? And what is a linker error?

      Pure backend development is even worse, not to begin with distributed develop,ent.

      The web stack wins through approachability, even if it’s three languages. It’s a lot to learn, but so are all the others.

      1. 2

        Indeed. Even if you add server-side langs like PHP or Node to the mix, it still seems to fit together pretty darn well.

      2. 6
        1. 3

          And don’t forget http://opalang.org/

          1. 1

            I tried Elm on the platform it’s most likely to be deployed to: Linux. I have to install Haskell, which is not that easy on Red Hat. Then I have to install Elm, which takes forever. Then I can remove Haskell… just give me a version that doesn’t need Haskell! I got to the point of doing the Cabal install and hitting dependency issues after following the directions word for word on RHEL 6.5 and I gave up. It’s not worth it. I’ll try again when I can install it and actually use it.

            I installed it on Windows and it worked just fine. But my web server doesn’t run on Windows, so what does that matter?

        2. 9

          If the person asking me “what language should I learn?” only wants to do front end stuff, I’ll also recommend JS. But if there’s any hint that they may be interested in something more, I recommend Python. The applications for it are so much more diverse, and they will be able to read other people’s code much faster.

          1. 12

            Your problem is that you’re already looking at this from the perspective of someone who uses programming to solve problems.

            I remember learning to program when I was young. The teacher that taught me knew C and BASIC. C would’ve surely been the better choice because BASIC is ugly and used nowhere - but with BASIC, I was making 3D spinning boxes and music on the speaker and that was freaking awesome and I was desperate to keep learning more.

            Try telling eight year old me when I’m done free()ing what I malloc()ed and null-terminating my strings the computer will ask me my name and I’ll type it in and it’ll say “Hello, namek☺◙z̬̖͑ͭͯ͋͐ͪ̀z̷̶͚̜̮̺͂̍ͤ̌͒̎̄ͬ͘z̵̰̲̙ͯ̿͊ General protection fault”. I doubt I would’ve stuck with it for very long.

            If you want to hold a student’s interest, give them something that lets them do cool things quickly. And while the sound API isn’t as easy as SOUND 2600, 10, it’s way cooler than making a CLI tic-tac-toe game.

            1. 2

              Are you saying that Python is to C as JS is to BASIC? I recommend Python because I think it’s far more clear for many beginners in my opinion.

              1. 2

                Are you saying that Python is to C as JS is to BASIC?

                Only along the axis of “this language lets me make interesting things quickly.” But I think that axis is seriously important for teaching people: most people today aren’t interested in making sail(6) and hunt(6).

                1. 2

                  I think that’s pretty farfetched. I’m also biased by the kinds of things that most people who ask me how to get started want to do. I’m friends with a lot of philosophers who want to get started with things like sentiment analysis, and I would simply never tell them to use JS for that when there are such amazing libraries for Python. Maybe if the person who is asking wants to make games quickly then the situation is reversed. But in any case, it’s a pretty bad habit to assume one way or the other.

                  1. 2

                    I think it’s much safer to assume that young children and students – especially those to which the OP is making his recommendation – will be more interested in writing games than to assume that they are ‘philosophers who want to get started with things like sentiment analysis.’

                    1. 2

                      My point is, you shouldn’t assume. Just like pretty much everything else with computers, it’s a tradeoff, and there is rarely a single correct answer.

                  2. 2

                    I’d agree 100% to that. What language lets me get up and running with an interface straight out of the box? I haven’t run into one since Visual Basic. Why isn’t it as easy as double-clicking on the button and typing your code into onClick…?

                    Even in Javascript, I still need to learn HTML and CSS, which is pretty silly.

                2. 1

                  Try telling eight year old me when I’m done free()ing what I malloc()ed and null-terminating my strings the computer will ask me my name and I’ll type it in and it’ll say “Hello, namek☺◙z̬̖͑ͭͯ͋͐ͪ̀z̷̶͚̜̮̺͂̍ͤ̌͒̎̄ͬ͘z̵̰̲̙ͯ̿͊ General protection fault”. I doubt I would’ve stuck with it for very long.

                  That’s what I did though. GW-BASIC on DOS, then Linux & C. Be the first to admit I didn’t get very far until I found Common Lisp though.

                  1. 1

                    Me too. Our expectations were entirely different due to the norms of computing during that period. Today’s version of DONKEY.BAS is the Unreal Engine…

                3. 7

                  I outright stopped recommending a language (I’m member of the board for a Ruby non-profit, so that means something). I ask people for an idea for a project or whether they have found peers they would like to learn with.

                  I then ask them to find other people working on similar stuff or get them in touch with someone. In the end, that might be a Rails Girls course, a python learners group or someone doing C. Having a teacher or friends to work with helps a lot.

                4. 6

                  The title references a good language for teaching, but the article then goes on to discuss topics such as ubiquity and distribution. I would think these are two very different issues (and I would not recommend JavaScript as a learning language, but certainly agree on its ubiquity).

                  1. 7

                    I think you’re overlooking the fact that people want results; motivation to learn is intertwined with making progress and getting results out of the process. Most people don’t want to learn programming just for the sake of learning programming I imagine. And even if they do, getting results that are useful for something in the real world (as the OP points out) is a huge motivator.

                    1. 2

                      But the article (or at least the title and the first paragraph) were framed in the context of people who want a foundation.

                      1. 3

                        You don’t get a foundation if you drop the subject out of disinterest.

                  2. 6

                    Goodness, yes. Even as a die hard Haskell user Javascript is the best language to get someone started on.

                    Why? Because Cmd-Opt-J. I want you to see at least a touch of what programming is like before I even mention the word “terminal” or “download” or “compiler” or “interpreter” or “repl”.

                    1. 3

                      What is Cmd-Opt-J, for those of us allergic to fruit?

                      1. 2

                        It opens the console in chrome/chromium.

                    2. 2

                      I came to the same conclusion.

                      1. 1

                        Python has been adopted very readily by data analysts and people who want to crunch numbers without learning R or Matlab, mostly because it’s easy to read and the data libraries are already there. Javascript before npm() was a hackish maze… And in some ways still is. Skip to minute 1:20 here if you don’t believe me.

                        1. 1

                          “I dismissed so many other languages without considering their features, type systems, or syntaxes, simply because they aren’t natively supported by modern web browsers”

                          And that sucks. How is Python so widely used, yet still suck so much for anything GUI related? You want it on the web? Looks like you’re learning Python AND Javascript AND HTML AND CSS. You want to make a game? You’d better like PyGame, and be prepared to ship PyGame and a Python interpreter with every copy. You want to make a GUI? Tkinker, or if you want choices, you have to re-write it for every platform. Command line, yeah we can do command line. Yet for some reason everyone knows and recommends Python. It’s like the lingua franca for anyone who isn’t a front-end web developer and is supported by everything except the things that you would expect it to support. Lua has a great game framework, for crying out loud! By there’s nothing like it for Python?

                          Someone mentioned Elm further down, and not to repeat myself, but I would love the language if it wasn’t unnecessarily impossible to install on RHEL. But Python? I just don’t get it.