It feels reasonable to assume that a majority of his teaching has been for boot camp style instruction and not the traditional, 4-year formal academic route.
I say this because, across the board, I know my staff would gaff at the prospect of trying to incorporate JS into anything other than an elective. Honestly, even to that, they would throw their pinkies in the air in retort of the thought that JS be taught at all in a 4-year institution. “Nay, let it be relegated to the community college.
Which only further demonstrates the gap between a 4-yr Comp Sci degree and software development.
Which, don't get me wrong, I'm a university snob and think software engineers should understand things all the way down to the machine level, but the snobbery in reaction to JS* being taught in 4-yr curricula (which I wouldn't doubt as a widely held reaction) is saddening.
*JS wouldn't be my first choice for an actual university course on real-world coding; but I do resent the the chasm between applicable and theoretical software engineering skills... though this problem isn't confined to Comp Sci.
It's unfortunate how despised JavaScript is on Hacker News, because JavaScript is objectively the best language suited for teaching people to program.
Want to work with data from any API? Well JSON, industry standard data protocol, happens to already use exactly the syntax you're familiar with!
Want to give them a sandbox to mess around in...take your pick between jsfiddle, plnkr, codesandbox, etc. Many of these let you collaborate realtime with people to help them work through problems directly. Most people learning to program have 0 familiarity with using a terminal, and having to go through the process of getting an environment set up correctly ALONE is enough to turn off the vast majority of people to programming.
As the author already mentioned, rendering a UI in JS is going to happen on the most ubiquitous platform on the planet: the web browser. If a programmer starting today goes into UI work, the odds are that they'll be building UIs for a web browser is astronomically high, the odds that they'll be using a one-off python toy library is highly unlikely.
And last but not least, the syntax of JavaScript is very much like the syntax for Java and C. Learning JavaScript first makes it very easy to read code from other mainstream languages and have a good idea of what's going on. Particularly with ES6, there is very little to complain about in the syntax of JavaScript.
Using JavaScript to teach the design of appropriate data structures and algorithms for a computational problem is bound to be an uphill battle.
And anyone who seriously considers teaching a first language that students can't use in a data structures and algorithms course (without having to learn a second language) isn't worth paying much attention to.
You can, but it won't be as pleasant as using something more appropriate. Proofs are a big part of any decent data structures and algorithms course. So you want a language that makes it possible for students to prove things about programs written in it, without hand-waving away large parts of its semantics.
> Proofs are a big part of any decent data structures and algorithms course.
There is no need for anything more than a loosely agreed upon pseudo code for for the proofs though, actually many proofs can be made without any code.
> So you want a language that makes it possible for students to prove things about programs written in it, without hand-waving away large parts of its semantics
You can write proofs in any language. I'm not convinced that using a language that is easy to automatically prove correctness of is useful for learning proofs. If anything it's the perfect opportunity for syntax and semantics to blind the student to the fundamental assumptions and arguments that allow them to understand and write proofs.
> There is no need for anything more than a loosely agreed upon pseudo code for for the proofs though, actually many proofs can be made without any code.
The proofs have to be related to the code. Otherwise, you're just inviting sloppiness and hand-waving.
> I'm not convinced that using a language that is easy to automatically prove correctness of is useful for learning proofs.
I'm talking about writing proofs by hand, the good old-fashioned way. It is easier to prove things by hand about Java programs than JavaScript programs, and it is easier still to prove things by hand about ML programs than Java programs.
> The proofs have to be related to the code. Otherwise, you're just inviting sloppiness and hand-waving.
I disagree. Prose based proofs can just as rigorous as proofs using code, or mathematical notation or images.
> I'm talking about writing proofs by hand, the good old-fashioned way. It is easier to prove things by hand about Java programs than JavaScript programs, and it is easier still to prove things by hand about ML programs than Java programs.
As am I! I think we might be talking passed each other a little.
Why is it easier to use a language like Java to formulate a proof exactly?
What are we talking about proving? The abstract algorithms being implemented or the implementations themselves? I was under the impression it was the former and I believe you are too but I'd prefer to be explicit.
> I disagree. Prose based proofs can just as rigorous as proofs using code, or mathematical notation or images.
You can use pictures in your proofs if you want. But the proofs have to be about the actual program you have written, rather than some pseudocode claimed without justification to be equivalent to it.
> Why is it easier to use a language like Java to formulate a proof exactly?
Proofs are written in the language of mathematics, not Java or any other programming language.
However, Java programs are easier to prove things about than JavaScript programs because Java has a richer static semantics that you can use to discharge parts of your proof obligation simply by checking whether your code is a legal Java program. For instance, you can associate to each final class a set of object invariants, defined in terms of its public methods. Java's static semantics is not powerful enough to actually establish these object invariants (you have to do that yourself), but it is powerful enough to prevent users of a final class from breaking invariants that have been established by its implementor (provided users don't use certain misfeatures of the Java language, like reflection).
> What are we talking about proving? The abstract algorithms being implemented or the implementations themselves?
Both. A high-level programming language ought to allow you to express algorithms directly, without distracting you with irrelevant details. (Of course, Java doesn't always do this.)
"And anyone who seriously considers teaching a first language that students can't use in a data structures and algorithms course (without having to learn a second language) isn't worth paying much attention to."
Why? Both colleges I've been to had their DSA courses after at least two intro courses, and in a different language than the intro courses.
Did they give you a formal semantics for the language in which you implemented algorithms? Or did you merely “prove” things about informal descriptions of algorithms?
No, proofs were usually done in an entirely separate class later, with the DSA classes focused on data structures (stacks, heaps, hash tables, etc.), sorting algorithms (merge sort, quicksort, etc.), and efficiency (e.g. using Big O). Such was the majority of the content in both cases, at least.
I still don't really have an answer to my question, though. What makes using a different language such a poor choice in this context?
> No, proofs were usually done in an entirely separate class later
Okay, now that is contemptible. And you didn't address my question: Were your proofs about actual programs, or merely about informal algorithm descriptions?
> What makes using a different language such a poor choice in this context?
The fact you would waste too much time teaching a second language at a sufficiently rigorous level to write proofs about programs written in it.
JavaScript the language doesn't have to be used for SPAs, or UIs at all. It...has for and while loops (which btw share syntax with all major programming languages), it has boolean logic and bitwise operators.
And I see data structures and algorithms mentioned below...I'm not exactly sure which data structure or algorithm it is that you suspect cannot be expressed in JavaScript?
You don't hear people say C isn't a serious CS language, but it is about as typed as JS.
C is weakly typed and has implicit conversion. JS is weakly typed and has implicit conversion.
You most certainly mean static types, but even there we have issues with C because passing void pointers is a thing for generic ADTs. This is even weaker typing than JS offers (and that's without talking about the interactions with function pointers).
An even stronger argument against your position on static types is SICP. It's written in scheme, but I have yet to find an introductory book more packed with CS fundamentals. You can read it multiple times and learn new things (very rare for a book to speak to both the experienced and the novice).
If static types were really important, Java, all the C's, and most common be CS language would never be used and Standard ML would reign supreme (perhaps it should anyway).
Types are simply one weapon in the war between elitism and pragmatism.
I'm guessing you mean “no parallelism”, right? Because JavaScript has (admittedly horrible) concurrency support. Otherwise what's this “callback hell” some people complain about?
By concurrency I mean expressing in the language that a computation or operation is independent, for instance by putting it in a thread or making it lazy, and all the programming techniques that this enables: active objects, order finding (which plays very well with paralellism btw), etc.
Parallelism I see as a hardware feature that can make programs faster.
I thought about the "callback hell", this is a bit more like coroutines, a quite limited form of concurrency (like non-preemptive threads). In this sense Js is very limited in what programming techniques can be taught.
You have a point, I shouldn't have said "no concurrency".
You are restricted to what ammounts to coroutining, which is just one of the many concurrency techniques out there, none of which you can teach with javascript.
You wouldn't be able to show many of the other possibilities of concurrent programming.
Python was my first foray into programming, and I still pay the bills with it. I still love it.
Trying to not let that bias influence my opinion, I too have been frustrated with some of its shortcomings. Distribution, concurrency, and GUIs have been excersizes more in patience and persistence than utility.
I’ve moved most of my efforts into Nim and haven’t been disappointed. I don’t know if it’s a suitable teaching language yet.
But JS as a general purpose language? For web, web, web.
I feel Python is a terrible teaching language, the only saving grace being the abundance of libraries.
There is just so much magic involved that you can not give reasonable answers to the inevitable 'why' questions coming from intuitive students.
It seems absurd to recommend a teaching language without any consideration for the technical merits of the language to me. The argument in the article is among the lines of lets use javascript because it has the most shiny things.
Just wrote my first Python program today, to massage some text files. It was super easy.
I also found the syntax, uh, interesting. Mainly the lack of braces to denote blocks, ie functions, loops, if statements, etc. Indentng to me seems problematic and a learning hurdle. But as a long time Pascal/C/Objective C/Swift/JavaScript developer, what a virgin programmer thinks I’ve long since forgot.
There are a whole lot of people who think that the web is the future of computers and that everything is going to run in your browser and everything on the internet is going to use the web.
Those people are _new to the game_, they don't understand the technology, or how it evolved, and they most definitely have no f'ing clue where it's going.
I laughed when he said Javascript, because I thought it was a joke. I can see what he means tho, at least in the limited context of this topic "For beginners", it's a fine way to teach basic programming concepts. But if you aren't building a website, you should not be writing in web languages.
You know what's a good teaching language for beginners? Anything they can actually use 5 or 10 years later so they haven't wasted months of their lives learning something with an incredibly limited practical scope.
Languages are not lessons. Hello World is a lesson, and it works in any language.
There's lots of different potential approaches and contexts for teaching beginners.
For low-contact teaching where the students were going to be doing lots of independent work between contacts, that was more concerned with enabling students to try stuff out, I'd generally agree with this.
For other contexts, maybe not; I think Python (or Scheme, or some others) a better choice for a first language in a broad, structured CS curriculum. Though I'd certainly still agree JS is a useful thing to have in your toolkit fairly early on in programming these days.
I think Python would be the best choice for an absolute beginner, I almost always recommend it when I'm asked what to start with -- it's objectively more pleasant to use than js. The thing about js is, you can get your hands dirty actually making some fairly interesting things quickly, it's just that things are much messier overall.
I don’t see why anyone would need a specific “teaching language,” in the first place.
You don’t teach a language, you teach concepts. You teach about variables and call-stacks, function calls, how the hardware works, computational complexity, and common algorithms that are used.
In any application you’ll likely be using multiple languages and throughout a career you’ll be using many languages or you’ll be unemployed frequently.
I don’t have particularly positive feelings about Python as a language, in fact there’s a lot about it that I think sucks. But I feel the same way about Javascript and Lisp and C.
Which doesn’t take anything away from any of them. But it does highlight to me a deficiency in programming education if someone strongly believes that we should put off exposing students to new languages.
The syntaxes and libraries can be slightly different but the concepts are all very closely related. So I think it’s a huge problem that we allow people to have these complexes where they say “I’m a C programmer,” or “I only know Java.” Not that I’m against specialization but I think it causes some artificial intransigence that’s undesirable at any level and hard to break otherwise successful individual contributors of.
So aticle is from 2015. End of 2017 I wanted to make really simple GUI for a python script. It turned out making a GUI with 5 buttons and shipping it as exe in Python 3.6 is extremely complicated and convoluted.
I wrote the main logic in 30min, and spend 2 days figuring out the GUI and the packaging to Exe.
Perhaps the real problem is GUI framework fragmentation or confusing docs, because I ship GUI applications with tkinter and pyinstaller without great issues (pyinstaller -m hehe.py and you’re done! Single file exe you have).
Well. I tried cxfreeze first, an sit failed on including tkinter properly. And while pyinstaller handled tkinter w/o issues, it failed miserably with scrapy requiring workarounds and many trial and errors.
Anyway, having packaged apps in Javascript (nodejs) , Java and several other languages/tools/frameworks , I find the state of packaging and GUI in Python simply pathetic, it really takes you 20 years back :)
The next time you need a .exe with GUI, you might want to also try C# with the free version of Visual Studio (Community Edition). C# is pretty easy and there are lots of examples, stackoverflow questions, github projects, etc. to learn from. If you target .net framework 4.5.2, then your app will run on any computer running Windows 7 or newer. Also, the executable size will probably under 200k for a simple application. Visual Studio makes it really easy to build a GUI and attach widget event handlers, too.
Thanks for the suggestion. I kind of already know that. But does c# has something like scrapy? Scrapy is really good for scraping, makes it really easy to write all kind of scrapers and the performance is excellent for something you hack up in 30min.
I believe that teaching programming should be centered around teaching programming concepts as opposed to languages, a la SICP or Concept Techniques Models of Computer Programming. The languages used there (Scheme and Oz) are just vehicles to teaching timeless concepts.
Teach a language and you will prepare someone for the present. Teach concepts and will you prepare someone for the future.
By concepts I mean things like closures, higher-order-programming, concurrency, explicit state, inheritance, security, encapsulation, complexity, laziness, etc
You can certainly learn many concepts and techniques using js, but it is still a severily limited language for general programming.
You could learn using many different languages for sure, but I believe it would be more efficient with one language that is truly multiparadigm, where no paradigm is favoured and there are primitives for all core concepts.
With all these general concepts, techniques and design principles under your belt, learning the core of a new language is a breeze, almost just like translating the syntax.
Maybe it has all the primitives, or you have to use a lib or build your own, or apply a design pattern, it might be more or less verbose, but you would be just implementing the crucial thing, the design.
Of course, then you have to learn the idioms too to become proficient.
> but it is still a severily limited language for general programming.
I don't understand where this concept comes from? It is as turing complete as any other language. From a "General Programming" perspective, it is also one of the most prevalent run time environments.
> You could learn using many different languages for sure, but I believe it would be more efficient with one language that is truly multiparadigm, where no paradigm is favoured and there are primitives for all core concepts.
I find being in a single language can lead you to associate the abstract concepts with the syntax too much. In moving the concepts between different syntax and forms the abstract notion becomes clearer, for me at least. I appreciate that learning everything in a single would likely be more "efficient".
> With all these general concepts, techniques and design principles under your belt, learning the core of a new language is a breeze, almost just like translating the syntax.
Its just that its domain is mostly restricted to the web. As you pointed out this is not so terrible at all, at the end of the day that's where the bulk of the jobs are for instance. Actually, I am amazed that a language that was originally designed for such a narrow domain is where it is today (thank XMLHttpRequest and V8 for that).
I totally agree that learning several languages is extremely enlightening, exactly for the very reasons that you have listed.
One big reason for one teaching language is that there seems to be a bit of a FP vs OO religious war of sorts. If you think in concepts, such disputes look shallow; in fact, the whole idea of paradigms becomes irrelevant. This is why I believe that to learn both FP and OO in the same language (together with many other paradigms) is much more enriching, because then you will learn which one to choose for a given situation, based on relevant techniques, and when and how to combine them, rather than being stuck with whatever is available in a language that favours one paradigm (or just one form of concurrency, or of inheritance etc). You will learn how to let the problem drive the design, rather than the language.
Pure languages like Haskell or Smalltalk, for instance, can be optimized and super concise precisely because they are restricted to one paradigm. But, for the reason above, I don't think they would be good for teaching general programming and only entrench that FP vs OO view (in fact, I think js would be better than these). But once you know, learning such languages is a pleasure.
I still think Python is a superior teaching language. Less weird behaviors and just easier to get the basics of things like manipulating arrays and strings, reading/writing from a file, creating a "for" loop, etc. etc.
That being said there is a solid point to the article. If students want to delve into graphical displays great. Suggest they investigate JavaScript (after they get the basics of traversing an array down). Or teach both languages at once switching to JS for graphical portions. They are similar enough this shouldn't be too difficult. Plus it would help prevent language tunnel vision or language clinging and/or new language phobia.
Like many others in this thread, I think the question boils down to what you are trying to teach. How to deliver an app? Have fun with Python. :( Doesn't matter how you cut it, if your Python program needs a gui, it's going to be a challenge.
You're either going to have to go the executable route, which is difficult to figure out your first time. Or you're going to go the web route, which is also difficult to figure out the first time, and you're going to have to not only learn html, css, javascript, but also WSGI, nginx, and a few other things as well.
I happen to think that going the web route is a really good way of doing things as a teacher because you get to teach a lot of general computing things along the way.
But the bottom line is what are you trying to teach? You can teach almost anything with almost any language, and in this case I'd say take the "programming" out of the "Programming Language" and ask yourself a different question: is there any one best language in which to teach people arithmetic, or art history, or physics, or music theory?
There's obviously not. It doesn't matter if you're speaking English or German or Japanese or Russian. These concepts can be described and explained just fine.
I think a conversation about what language to teach in has to boil down at least to the context it's being taught in and what is being taught.
This author's decision is as reasonable as anyone's based on what he's saying he wants to teach. And I think I have some sympathy. I don't have a 4-year degree in comp sci. Or anything. But if there's one thing I wish teachers everywhere in the tech world spent more time on, it would be deployment strategies.
Someone should be teaching that class at schools if they are not already.
59 comments
[ 3.4 ms ] story [ 116 ms ] threadI say this because, across the board, I know my staff would gaff at the prospect of trying to incorporate JS into anything other than an elective. Honestly, even to that, they would throw their pinkies in the air in retort of the thought that JS be taught at all in a 4-year institution. “Nay, let it be relegated to the community college.
...I know I know, ‘burn him at the stake’
Which, don't get me wrong, I'm a university snob and think software engineers should understand things all the way down to the machine level, but the snobbery in reaction to JS* being taught in 4-yr curricula (which I wouldn't doubt as a widely held reaction) is saddening.
*JS wouldn't be my first choice for an actual university course on real-world coding; but I do resent the the chasm between applicable and theoretical software engineering skills... though this problem isn't confined to Comp Sci.
Want to work with data from any API? Well JSON, industry standard data protocol, happens to already use exactly the syntax you're familiar with!
Want to give them a sandbox to mess around in...take your pick between jsfiddle, plnkr, codesandbox, etc. Many of these let you collaborate realtime with people to help them work through problems directly. Most people learning to program have 0 familiarity with using a terminal, and having to go through the process of getting an environment set up correctly ALONE is enough to turn off the vast majority of people to programming.
As the author already mentioned, rendering a UI in JS is going to happen on the most ubiquitous platform on the planet: the web browser. If a programmer starting today goes into UI work, the odds are that they'll be building UIs for a web browser is astronomically high, the odds that they'll be using a one-off python toy library is highly unlikely.
And last but not least, the syntax of JavaScript is very much like the syntax for Java and C. Learning JavaScript first makes it very easy to read code from other mainstream languages and have a good idea of what's going on. Particularly with ES6, there is very little to complain about in the syntax of JavaScript.
Sure, JS is the hip language for making SPAs, but not the best way to show what boolean logic is and the difference between for and while loops.
And anyone who seriously considers teaching a first language that students can't use in a data structures and algorithms course (without having to learn a second language) isn't worth paying much attention to.
There is no need for anything more than a loosely agreed upon pseudo code for for the proofs though, actually many proofs can be made without any code.
> So you want a language that makes it possible for students to prove things about programs written in it, without hand-waving away large parts of its semantics
You can write proofs in any language. I'm not convinced that using a language that is easy to automatically prove correctness of is useful for learning proofs. If anything it's the perfect opportunity for syntax and semantics to blind the student to the fundamental assumptions and arguments that allow them to understand and write proofs.
The proofs have to be related to the code. Otherwise, you're just inviting sloppiness and hand-waving.
> I'm not convinced that using a language that is easy to automatically prove correctness of is useful for learning proofs.
I'm talking about writing proofs by hand, the good old-fashioned way. It is easier to prove things by hand about Java programs than JavaScript programs, and it is easier still to prove things by hand about ML programs than Java programs.
I disagree. Prose based proofs can just as rigorous as proofs using code, or mathematical notation or images.
> I'm talking about writing proofs by hand, the good old-fashioned way. It is easier to prove things by hand about Java programs than JavaScript programs, and it is easier still to prove things by hand about ML programs than Java programs.
As am I! I think we might be talking passed each other a little.
Why is it easier to use a language like Java to formulate a proof exactly?
What are we talking about proving? The abstract algorithms being implemented or the implementations themselves? I was under the impression it was the former and I believe you are too but I'd prefer to be explicit.
You can use pictures in your proofs if you want. But the proofs have to be about the actual program you have written, rather than some pseudocode claimed without justification to be equivalent to it.
> Why is it easier to use a language like Java to formulate a proof exactly?
Proofs are written in the language of mathematics, not Java or any other programming language.
However, Java programs are easier to prove things about than JavaScript programs because Java has a richer static semantics that you can use to discharge parts of your proof obligation simply by checking whether your code is a legal Java program. For instance, you can associate to each final class a set of object invariants, defined in terms of its public methods. Java's static semantics is not powerful enough to actually establish these object invariants (you have to do that yourself), but it is powerful enough to prevent users of a final class from breaking invariants that have been established by its implementor (provided users don't use certain misfeatures of the Java language, like reflection).
> What are we talking about proving? The abstract algorithms being implemented or the implementations themselves?
Both. A high-level programming language ought to allow you to express algorithms directly, without distracting you with irrelevant details. (Of course, Java doesn't always do this.)
Why? Both colleges I've been to had their DSA courses after at least two intro courses, and in a different language than the intro courses.
What is so inherently contemptible about this?
I still don't really have an answer to my question, though. What makes using a different language such a poor choice in this context?
Okay, now that is contemptible. And you didn't address my question: Were your proofs about actual programs, or merely about informal algorithm descriptions?
> What makes using a different language such a poor choice in this context?
The fact you would waste too much time teaching a second language at a sufficiently rigorous level to write proofs about programs written in it.
It's really no worse for that than any commonly used language. Perhaps you meant something else?
And I see data structures and algorithms mentioned below...I'm not exactly sure which data structure or algorithm it is that you suspect cannot be expressed in JavaScript?
C is weakly typed and has implicit conversion. JS is weakly typed and has implicit conversion.
You most certainly mean static types, but even there we have issues with C because passing void pointers is a thing for generic ADTs. This is even weaker typing than JS offers (and that's without talking about the interactions with function pointers).
An even stronger argument against your position on static types is SICP. It's written in scheme, but I have yet to find an introductory book more packed with CS fundamentals. You can read it multiple times and learn new things (very rare for a book to speak to both the experienced and the novice).
If static types were really important, Java, all the C's, and most common be CS language would never be used and Standard ML would reign supreme (perhaps it should anyway).
Types are simply one weapon in the war between elitism and pragmatism.
Parallelism I see as a hardware feature that can make programs faster.
I thought about the "callback hell", this is a bit more like coroutines, a quite limited form of concurrency (like non-preemptive threads). In this sense Js is very limited in what programming techniques can be taught.
What more concurrency are you looking for?
You are restricted to what ammounts to coroutining, which is just one of the many concurrency techniques out there, none of which you can teach with javascript.
You wouldn't be able to show many of the other possibilities of concurrent programming.
Trying to not let that bias influence my opinion, I too have been frustrated with some of its shortcomings. Distribution, concurrency, and GUIs have been excersizes more in patience and persistence than utility.
I’ve moved most of my efforts into Nim and haven’t been disappointed. I don’t know if it’s a suitable teaching language yet.
But JS as a general purpose language? For web, web, web.
Compared to JavaScript, where {}!={} and [["2"]]==2?
I also found the syntax, uh, interesting. Mainly the lack of braces to denote blocks, ie functions, loops, if statements, etc. Indentng to me seems problematic and a learning hurdle. But as a long time Pascal/C/Objective C/Swift/JavaScript developer, what a virgin programmer thinks I’ve long since forgot.
Better than that garbage JavaScript though.
Those people are _new to the game_, they don't understand the technology, or how it evolved, and they most definitely have no f'ing clue where it's going.
I laughed when he said Javascript, because I thought it was a joke. I can see what he means tho, at least in the limited context of this topic "For beginners", it's a fine way to teach basic programming concepts. But if you aren't building a website, you should not be writing in web languages.
You know what's a good teaching language for beginners? Anything they can actually use 5 or 10 years later so they haven't wasted months of their lives learning something with an incredibly limited practical scope.
Languages are not lessons. Hello World is a lesson, and it works in any language.
For low-contact teaching where the students were going to be doing lots of independent work between contacts, that was more concerned with enabling students to try stuff out, I'd generally agree with this.
For other contexts, maybe not; I think Python (or Scheme, or some others) a better choice for a first language in a broad, structured CS curriculum. Though I'd certainly still agree JS is a useful thing to have in your toolkit fairly early on in programming these days.
I don’t see why anyone would need a specific “teaching language,” in the first place.
You don’t teach a language, you teach concepts. You teach about variables and call-stacks, function calls, how the hardware works, computational complexity, and common algorithms that are used.
In any application you’ll likely be using multiple languages and throughout a career you’ll be using many languages or you’ll be unemployed frequently.
I don’t have particularly positive feelings about Python as a language, in fact there’s a lot about it that I think sucks. But I feel the same way about Javascript and Lisp and C.
Which doesn’t take anything away from any of them. But it does highlight to me a deficiency in programming education if someone strongly believes that we should put off exposing students to new languages.
The syntaxes and libraries can be slightly different but the concepts are all very closely related. So I think it’s a huge problem that we allow people to have these complexes where they say “I’m a C programmer,” or “I only know Java.” Not that I’m against specialization but I think it causes some artificial intransigence that’s undesirable at any level and hard to break otherwise successful individual contributors of.
Anyway, having packaged apps in Javascript (nodejs) , Java and several other languages/tools/frameworks , I find the state of packaging and GUI in Python simply pathetic, it really takes you 20 years back :)
Teach a language and you will prepare someone for the present. Teach concepts and will you prepare someone for the future.
By concepts I mean things like closures, higher-order-programming, concurrency, explicit state, inheritance, security, encapsulation, complexity, laziness, etc
Also, I believe that you need to learn more than one language to full appreciate those concepts.
There is some irony in the fact that i developed my own indepth, initiative understanding of these concepts while learning JS.
You could learn using many different languages for sure, but I believe it would be more efficient with one language that is truly multiparadigm, where no paradigm is favoured and there are primitives for all core concepts.
With all these general concepts, techniques and design principles under your belt, learning the core of a new language is a breeze, almost just like translating the syntax.
Maybe it has all the primitives, or you have to use a lib or build your own, or apply a design pattern, it might be more or less verbose, but you would be just implementing the crucial thing, the design.
Of course, then you have to learn the idioms too to become proficient.
I don't understand where this concept comes from? It is as turing complete as any other language. From a "General Programming" perspective, it is also one of the most prevalent run time environments.
> You could learn using many different languages for sure, but I believe it would be more efficient with one language that is truly multiparadigm, where no paradigm is favoured and there are primitives for all core concepts.
I find being in a single language can lead you to associate the abstract concepts with the syntax too much. In moving the concepts between different syntax and forms the abstract notion becomes clearer, for me at least. I appreciate that learning everything in a single would likely be more "efficient".
> With all these general concepts, techniques and design principles under your belt, learning the core of a new language is a breeze, almost just like translating the syntax.
Absolutely! :)
I totally agree that learning several languages is extremely enlightening, exactly for the very reasons that you have listed.
One big reason for one teaching language is that there seems to be a bit of a FP vs OO religious war of sorts. If you think in concepts, such disputes look shallow; in fact, the whole idea of paradigms becomes irrelevant. This is why I believe that to learn both FP and OO in the same language (together with many other paradigms) is much more enriching, because then you will learn which one to choose for a given situation, based on relevant techniques, and when and how to combine them, rather than being stuck with whatever is available in a language that favours one paradigm (or just one form of concurrency, or of inheritance etc). You will learn how to let the problem drive the design, rather than the language.
Pure languages like Haskell or Smalltalk, for instance, can be optimized and super concise precisely because they are restricted to one paradigm. But, for the reason above, I don't think they would be good for teaching general programming and only entrench that FP vs OO view (in fact, I think js would be better than these). But once you know, learning such languages is a pleasure.
That being said there is a solid point to the article. If students want to delve into graphical displays great. Suggest they investigate JavaScript (after they get the basics of traversing an array down). Or teach both languages at once switching to JS for graphical portions. They are similar enough this shouldn't be too difficult. Plus it would help prevent language tunnel vision or language clinging and/or new language phobia.
and a Twitter thread from 2018: https://twitter.com/mkennedy/status/949688651058835456
You're either going to have to go the executable route, which is difficult to figure out your first time. Or you're going to go the web route, which is also difficult to figure out the first time, and you're going to have to not only learn html, css, javascript, but also WSGI, nginx, and a few other things as well.
I happen to think that going the web route is a really good way of doing things as a teacher because you get to teach a lot of general computing things along the way.
But the bottom line is what are you trying to teach? You can teach almost anything with almost any language, and in this case I'd say take the "programming" out of the "Programming Language" and ask yourself a different question: is there any one best language in which to teach people arithmetic, or art history, or physics, or music theory?
There's obviously not. It doesn't matter if you're speaking English or German or Japanese or Russian. These concepts can be described and explained just fine.
I think a conversation about what language to teach in has to boil down at least to the context it's being taught in and what is being taught.
This author's decision is as reasonable as anyone's based on what he's saying he wants to teach. And I think I have some sympathy. I don't have a 4-year degree in comp sci. Or anything. But if there's one thing I wish teachers everywhere in the tech world spent more time on, it would be deployment strategies.
Someone should be teaching that class at schools if they are not already.