6 ms·
One might say the same about the English language, yet it is taught in classrooms all across the United States, despite the fact that the U.S. has no codified n
by bradleyland 15y ago
One might say the same about the English language, yet it is taught in classrooms all across the United States, despite the fact that the U.S. has no codified national language. English is the de facto national language, but nothing more.
So why Javascript as a first language? Probably the best argument is that it has the widest reach of any programming language in use today because Javascript will run in any web browser on any platform. It is the closest thing to a universal programming language you'll find today.
- kevingadd 15y agoIf widest reach is your criteria, Java and C would also be equally good choices. Unless the web browser is special in some particular way that makes it 'more worthy' than other execution environments?
- maximusprime 15y agoEveryone already has a browser, which includes a profiler, debugger, REPL etc. Not everyone has a c compiler or JDK, or wants the hassle of having to set them up just to start learning.
- kevingadd 15y agoThe claim that everyone has a profiler, debugger and REPL is blatantly false. Only a subset of commonly available desktop browsers include those features, and out of those, only recent versions do. Mobile web browsers don't include any development or debugging tools. The cost of installing Visual Studio or Eclipse is pretty small considering that you only have to do it once. Compare that with the cost a newbie programmer pays every time they use the comparison operator or the arithmetic operator and they now have to consult their reference text to figure out what the operator is going to do and whether they're using the right operator. If your goal is to lead someone into a lifetime of programming and help them enjoy it, choosing a language in order to avoid a pesky 15 minute setup cost for a compiler is tremendously short-sighted.
- DrHankPym 15y ago> Mobile web browsers don't include any development or debugging tools. LOL. Great point. /sarcasm > The cost of installing Visual Studio or Eclipse is pretty small considering that you only have to do it once. Boom. That's all it takes to create a barrier of entry. Not everyone has permissions to install whatever they want on the computer they're using. Then you get into issues with multiple operating systems. Windows does it one way and Linux and OSX does it another way. Also, the tools you've mentioned are always changing. Will it be the same in a year or two? And for what? So you don't confuse an extra set of comparison operators? Javascript is not that bad.
- kenjackson 15y agoBoom. That's all it takes to create a barrier of entry. Not everyone has permissions to install whatever they want on the computer they're using. Then you get into issues with multiple operating systems. Windows does it one way and Linux and OSX does it another way. Also, the tools you've mentioned are always changing. Will it be the same in a year or two? But won't they need to install an editor anyways? Or are they just going to use notepad? That will be a horrible experience. And JS is changing too. None of the languages change so drastically that it's not just something simple to incrementally learn. And I think getting students used to the fact that things change isn't a bad thing. But also let them know that typically backwards compat isn't broken with these changes. With that said I'm a big fan of JS as a first language. I'd probably spend the first day with them using notepad or vi (or whatever is natively installed on the system) -- and then have them install some nice IDE of my choosing.
- wahnfrieden 15y agoI'm all for vim, but you're mad if you think first-time coders should pick that up before even writing their first piece of code. Talk about barriers to entry and unintuitive behaviors... I think the most viable environments for absolute beginners will be online ones that include an REPL and editor, using either JS or something that compiles to JS or to anything else on the backend, so even browser choice is irrelevant. Then you don't have to teach how to load a JS file into a document and so on.
- absconditus 15y agoI struggle with this mindset. It probably makes sense for Khan Academy, but this industry (software development) needs fewer people who refuse to learn anything unless all obstacles are removed and the information is spoon fed.
- maximusprime 15y agoWell, I grew up in a day when it was even easier. * Buy home computer (ZX81) * Turn on * 10 Print "Hello world" * run I don't think the instant gratification and ease of use did me any harm.
- tmorton 15y agoOf course, the "buy home computer" step was a lot harder back in those days.
- chc 15y agoMore expensive? Sure. Less common? Definitely. Harder? Not all that much.
- maximusprime 15y agoIt wasn't. At least in the UK in the 80s, you could go out to any town center, walk into a shop, and buy a "home" computer. They were everywhere.
- kls 15y agoRight the technical stack has become daunting to the point that many cannot get the feedback so needed early on. Now days you either advanced with the technology, or you spent a significant investment of time to learn the trade with the intent of entering the field. The days of the hobbyist programmer have seen their peek until that changes.
- Apocryphon 15y agoI find your statement to be amusing considering a lot of the anti-JS comments on this thread are about how unwieldy it is as a language. Of course, your critique and those complaints are two different things. You are criticizing that people are too coddled about having an accessible environment to program in. The complaints are that JS is too unfriendly and muddled, and so does not coddle beginners enough!
- laconian 15y agoThis is an eminently solvable problem. There are excellent open source IDEs and toolchains available that can be repackaged in any way, shape, or form. Double click an installer, and boom - everything's set up. Barrier to entry is a moot point.
- syaz1 15y agoAlmost everything comes with installer these days, yet some refused to install better, secure browsers since they already have IE by default. Barrier of entry is a problem.
- anonymoushn 15y agoThat's fine. We can already run lots of better languages in the browser either using interpreters written in JS or cross-compilers targeting JS.
- deleted 15y ago[deleted]
- fiblye 15y agoJava is an extremely confusing language for newcomers. While it's "simple" in comparison to languages like C++ and Haskell, the perceived inconsistencies (do I use == or equals()? length, length(), or size()?) really drive newcomers--and some veterans--up a wall. Throw that in with the insanity of generics, the "everything must be within a class" concept, the mess between objects and primitive types (ints AREN'T Integers!), the verbosity (and inconsistency in naming things), and the lazy-ass exceptions that only vaguely sometimes give you a general idea of where things go wrong, and it's horrible for new programmers. Javascript is relatively strange, but it's much easier for me to teach JS to somebody than Java. I find it much more easy to explain how and why things work in javascript, whereas when someone asks me why something in Java works this way, I respond with an "I have no clue--they just decided it'd be a good idea and I think it's terrible."
- tikhonj 15y agoJava isn't really simple in comparison to Haskell--Java is full of warts and inconsistencies while Haskell is simple, consistent and elegant. The reason Haskell is viewed as hard is that it takes basically nothing from languages you already know. If you don't know any languages, it's actually a great starting point.
- adgar 15y ago> The reason Haskell is viewed as hard is that it takes basically nothing from languages you already know. If you don't know any languages, it's actually a great starting point. At my undergrad program, Haskell was used for the second CS course after the basic intro course. It was a nightmare and drove people away from the major in droves. They just did a curriculum overhaul and one of the changes the CS faculty are most excited about is moving the Haskell course out of the spot where it crushed the spirits of potential majors.
- TimboMac 15y agoFunny that http://www.lambdassociates.org/blog/decline.htm http://www.lambdassociates.org/blog/decline.htm should be on the front page at the same time.
- malandrew 15y agoJava isn't a language that promotes "play" like Javascript does, because it's been engineered to prevent you from shooting yourself in the foot. Play helps make learning more fun. C would be a good choice, except for the fact that memory management and pointers are a very important concept early on in the language that you really don't want to bog people down with that are completely new to programming. I remember a blog post by spolsky about how you lose a lot of people on that one concept, especially if it is poorly taught.
- blub 15y agoThe fact that something is popular doesn't make it necessarily good, so your best argument is no argument at all. Same as with English - no connection whatsoever to a programming language, it's a bad parallel.
- brudgers 15y agoI think the argument is more along the lines of "javascript is ubiquitous, therefore learning javascript is likely to be useful (despite drawbacks created by its idiosyncrasies)."