TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Retiring Python as a Teaching Language

280 点作者 xngzng超过 10 年前

56 条评论

johnloeber超过 10 年前
When I took an introduction to Computer Science in college, it was taught in Racket. Over winter break, I then learned Python, and I was baffled -- why would any curriculum <i>not</i> start with Python? Python was easy, expressive, and allowed the user to get lots done with little effort. It was great at motivating programming by showing its use and power. It seemed like an ideal introductory language.<p>Over the last few years, however, I&#x27;ve back-tracked on this opinion: if you really intend to <i>teach</i>, not just <i>motivate</i>, then Python is a poor choice. A language like Racket is great for teaching because it lends itself to exploring so many core concepts: complexity of algorithms, functional programming techniques, recursion, data structures, etc.<p>A language like C (the next course I was to take in the introductory sequence) is also an excellent language because it forces the user to understand programming at the systems-level.<p>I don&#x27;t really think Python is very good for illustrating either the theoretical or the systems-level CS concepts. It&#x27;s a nice language for motivating programming and showing off how much you can do with little serious investment, but it doesn&#x27;t really motivate learning Computer Science, i.e. learning Programming on a &#x27;deeper&#x27; level.<p>Thus, I don&#x27;t really think that learning Python offers solid programming <i>foundations</i>. Consequently, if you really aim to teach, not just to motivate, then use languages that bring the student closer to core CS concepts.
评论 #8922047 未加载
评论 #8921827 未加载
评论 #8921797 未加载
评论 #8921998 未加载
评论 #8922056 未加载
评论 #8922080 未加载
评论 #8923914 未加载
评论 #8921852 未加载
评论 #8921807 未加载
评论 #8922585 未加载
评论 #8923956 未加载
评论 #8922010 未加载
评论 #8922685 未加载
评论 #8930441 未加载
Mithaldu超过 10 年前
As much as i can&#x27;t disagree with the choice (the realpolitik of programming has made it the most correct choice), i am saddened that the language on which the choice falls is one not chosen based on any merit, but merely due the historical accident of being the first to be implemented in a browser and having had no appreciable opposition due to browsers at the time being in hands of corporations.<p>In &quot;A Deepness on the Sky&quot;, Vernor Vinge describes a future in which there is the reality of a profession called &quot;Programmer-at-Arms&quot;, necessitated due to thousands of years of layers of indirection and cruft that will combine to make the software of that time, making it a requirement for even simple changes in a weapon system to be done by someone who can dig through all of those layers. It seems that his prediction is closer and closer to becoming reality.
评论 #8921764 未加载
评论 #8921806 未加载
评论 #8921903 未加载
评论 #8928360 未加载
评论 #8921479 未加载
bjourne超过 10 年前
I&#x27;m saddened by the lack of academic rigour displayed in this thread. If you have not taught introductory computer science courses, then you have NO CLUE what makes a good introductory language choice. It appears James Hague isn&#x27;t working as a teacher either, just giving advice to newbies, so his opinion is just that -- opinion.<p>What you want is field studies: &quot;This year we used Haskell and 75% of all students gave up on programming stating that it was to hard. Last year we used Visual Basic and only 20% did. Ergo Visual Basic is probably a better first language than Haskell.&quot;<p>Lots of research is being done on the subject, see this survey: <a href="https://www.seas.upenn.edu/~eas285/Readings/Pears_SurveyTeachingIntroProgramming.pdf" rel="nofollow">https:&#x2F;&#x2F;www.seas.upenn.edu&#x2F;~eas285&#x2F;Readings&#x2F;Pears_SurveyTeac...</a>
评论 #8922076 未加载
评论 #8922456 未加载
评论 #8922141 未加载
评论 #8922795 未加载
shadowmint超过 10 年前
As a proponent of python and a full time python developer I fully endorse this decision.<p>There is a compelling need to be able to distribute graphical python applications that isn&#x27;t met (and that <a href="https://www.python.org/dev/peps/pep-0441/" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0441&#x2F;</a> isn&#x27;t even a step <i>in the right direction</i> is an indication of how far away a solution is).<p>Don&#x27;t get me wrong, python is a great language, but its not the right solution for teaching programming for exactly these reasons.
评论 #8921601 未加载
评论 #8921778 未加载
BuckRogers超过 10 年前
I think this author has lost his focus. Maybe there&#x27;s only 1 choice if you want something to sit &quot;on top&quot;, but anything can interact with &quot;an unprecedentedly ubiquitous cross-platform toolkit for layout, typography, and rendering&quot;. Including Python.<p>For games, an introductory class using Python with Kivy or PyGame doesn&#x27;t fit the bill because they may not always be around? If a student really wants to go deeper into game dev, they&#x27;re going to need to learn at least one of Swift&#x2F;ObjC&#x2F;Java&#x2F;C# and their respective native libraries anyway. You&#x27;re not indoctrinating them into a platform like the web or iOS, you&#x27;re introducing them to programming.<p>The rant about libraries not always being maintained is really brilliant considering the library churn than in the JS space. After all, they may be &quot;well-intentioned today but unsupported tomorrow?&quot;. TkInter? This was around before Angular 1.x was a glimmer in daddy GOOG&#x27;s eye. It&#x27;ll be around after Angular2.0, and long after 2.0 is buried and the next JS framework&#x2F;library rears its ugly head only to be put down in short time. Given the choice of having invested my time into TkInter, or Angular 1.x, I know which I&#x27;d rather have dumped my time into.<p>So what&#x27;s the goal here, to teach <i>programming</i> with something you can show others? If so, then you can do it with almost anything, especially Python.<p>Use what you want to teach, but don&#x27;t delude yourself with half-baked reasoning to justify what you clearly always considered an inferior choice to do it in- for the last 2 decades.<p>Back to the drawing board, professor.
评论 #8921751 未加载
评论 #8922203 未加载
cageface超过 10 年前
<i>It&#x27;s with all of this in mind that my recommended language for teaching beginners is now Javascript. I know, I know, it&#x27;s quirky and sometimes outright weird, but overall it&#x27;s decent and modern enough.</i><p>Javascript <i>is</i> a flawed, quirky language, but with the upcoming ES6 and ES7 standards it&#x27;s going to be a much, much better. I&#x27;d call it a tossup comparing it to Python or Ruby. I wouldn&#x27;t have recommended JS to a beginner a few years ago either but that&#x27;s where the momentum is now and, as the author says, the ease with which a newbie can get something interactive up on screen trumps smaller concerns. For a little more rigor you can use something like Typescript.
评论 #8921664 未加载
评论 #8921488 未加载
评论 #8921685 未加载
评论 #8921507 未加载
评论 #8921500 未加载
bjcubsfan超过 10 年前
You can program in Python using Kivy [1] to create apps for Android, iOS, and the desktop. I made a simple app and took it through the entire process it is now on the Android app store. You are still using Python so you can focus on programming and not language features, but you get the benefits of programming something your students can show off.<p>[1] <a href="http://kivy.org/docs/gettingstarted/intro.html" rel="nofollow">http:&#x2F;&#x2F;kivy.org&#x2F;docs&#x2F;gettingstarted&#x2F;intro.html</a>
评论 #8921710 未加载
Udo超过 10 年前
JavaScript (or rather: a subset of it) is a fine teaching language too, especially since it&#x27;s easy to publish runnable code - even for beginners.<p>However, there is no language that can do everything equally well. It&#x27;s a common reaction displayed by the proponent base of many languages, even here on HN, to advocate the use of <i>their</i> language for every conceivable need. This can&#x27;t possibly work well.<p>Programming teachers should make a habit of pointing out that writing code is a journey that will require students to learn new tools all the time.
评论 #8921409 未加载
评论 #8921388 未加载
MarcScott超过 10 年前
I think there are a lot of commentators here that are failing to appreciate that this is not about which programming language provides the best introduction to Computer Science or Software Engineering, but which language will inspire students to continue programming.<p>The readership of HN is self-selecting. Almost everyone here was drawn to the world of programming. Very few of you probably had programming thrust upon them.<p>I teach in the UK where all students from the age of 5 to 14 are now required to study computing. I personally teach students from the ages of 11 upwards, so when I&#x27;m looking at the best programming language to use, I don&#x27;t even think about which will provide the best introduction to Software Engineering.<p>My primary concern is what will interest an eleven year old, who&#x27;s only experience with a computer is using his iPhone, and whose primary interest in life is football. Or how can I make this interesting for a student whose ambition in life is to perform on stage, and has already decided not to continue studying Computing for their GCSEs.
rrggrr超过 10 年前
just the opposite. Many teachable subjects from Journalisism to data science, biology to finance increasingly include Python. NLTK, Beautiful Soup, Pandas, Ipython Notebook, Matplotlib... Programming is a tool for getting things done, and few languages offer students more tools for doing than Python. On HN we sometimes forget the ubiquity and pure value of automation and anaysis. We focus perhaps too much on software engineering (in this case gaming).
评论 #8921537 未加载
br3w5超过 10 年前
I&#x27;ve been through the Udacity CS101 and progressed well with their programming languages and design of programs courses. These are all in Python but I have covered interpreters, compilers, regex, recursion, types, etc. These all treat python as a tool to learn CS not just the language in itself. Alongside these courses I&#x27;ve also been building my own websites using Django and I&#x27;m now at a stage where I feel I can solve any problem in any technology (even though it will take me longer than someone experienced in that technology to learn it and get stuff done).<p>I&#x27;ve started exploring other languages (C, Lisp, even Java at work, Haskell next, javascript) and feel much more confident with the software engineering stuff that CS courses don&#x27;t necessarily cover, having managed development teams (git, deployment, CI, TDD, etc). I agree with other commenters that python gets out of the way so that you can explore CS concepts.<p>Javascript could be a good intro language but students might want to move onto something else fairly quickly. I already tried js first and quickly started CS courses because I didn&#x27;t feel that learning javascript was helping me understand how to solve problems with programming. I also don&#x27;t think you can teach all of the core CS concepts with javascript as effectively as you can with other languages (e.g. OOP), so when you do start teaching js they will still come to you and say &quot;how do I put this on a website&quot;, &quot;use node&quot;, &quot;ok but how does that work? why does that work? etc, etc&quot;. And when it comes to websites are you going to teach students to build a webserver in vanilla js (?!) or reach for node that abstracts so much that is going on under the hood?<p>Smart students are always going to ask questions and I&#x27;ve found in my experience that I&#x27;ve been able to either get the answers or know where to get the answers, by knowing core CS concepts. So whatever language you choose to start off with it needs to be couched in terms of what CS it exposes.
hyperion2010超过 10 年前
Funny, I have done a lot of game&#x2F;graphics related programming using python and panda3d, which is written in c++ and has nice python bindings [0]. Sure, you can&#x27;t just do &quot;import wheemakegames&quot; but the tools are out there. The same is true for GUI apps. If you want to click on stuff just have them use pyqt or pyside. I think that teaching students about other packages and how software actually works together is very important. Having said that packaging a python program into an executable installer or even just an executable is a pain in the ass (&quot;What sane person DOESN&#x27;T have at least one working python interpreter?!?&quot;).<p>0. <a href="http://www.panda3d.org/manual/index.php/Main_Page" rel="nofollow">http:&#x2F;&#x2F;www.panda3d.org&#x2F;manual&#x2F;index.php&#x2F;Main_Page</a>
评论 #8921632 未加载
jacquesm超过 10 年前
Nothing got people easier into programming than good old BASIC did.<p>MODE 4; LINE 10,10, 250,250<p>Instant attraction.<p>Beginner steps need to be small and need to give an immediate reward, BASIC got that right, almost every other language stood so far away from the available devices that the spark failed to jump the gap in many places.<p>Smalltalk is another language that got this right, people - especially beginners - need instant gratification to move from curiosity to immersion.
评论 #8922439 未加载
jfarmer超过 10 年前
I&#x27;ve had good success teaching Lua with <a href="https://love2d.org/" rel="nofollow">https:&#x2F;&#x2F;love2d.org&#x2F;</a>. Super easy to create click-and-run executables that work on OS X and Windows. Mobile&#x27;s a different story (obviously), but as a teaching language + environment I find it, well, lovely. :)
评论 #8922260 未加载
chipsy超过 10 年前
I agree. As a beginner - and even as a professional, in an average-case situation - what you need in terms of abstractive power and optimization potential tends to be something akin to a classic microcomputer Basic, plus some modern API calls. You&#x27;re already way ahead of the game when you consider JS in that light. You can write a lot of practical, maintainable JS that only uses arithmetic, string manipulation, branches, loops, arrays and simple function calls. POD objects, too, if you get a little more fancy.<p>Teaching towards that subset is also a healthy instruction in rule of least power - once you grasp how to use the basics, you have a fighting chance of picking up most other languages too. It&#x27;s way more unhealthy to guide newbies into cargo cult thoughts about &quot;proper&quot; something-something design(insert favorite methodology here) - a learner has to make their own mistakes to learn properly, but they should do so from within the subset of programming concepts that predate current languages, because those are the things that have lasted through multiple generations of software.<p>If we consider Python, Ruby, JS, C#, and Java - the design of most of their core features was locked down all the way back in the 1990&#x27;s. So all the new ideas they brought to the table tend to be &quot;baby implementations&quot;, frozen in a half-correct state of refinement. But the things they got _really_ right tend to be the things that were there and usable, but not refined so well in prior languages.
allendoerfer超过 10 年前
As already mentioned in the thread, it depends on <i>what</i> you want your students to learn. My universities CS courses (aside from theoretical stuff) started with Racket for the basic concepts, good choice. We were then taught Java to handle a small project, questionable. But after that we had no problems with the language, when we had to implement algorithms, which would look quite similar in most other OO languages, maybe with added memory management.<p>I think JavaScript&#x27;s prototype-based inheritance and global scope would make it hard to abstract concepts learned in it to other languages. Strict ES6 might help a bit. When switching from Scheme + Java to JS, you can get the Java+Scheme mix, that JavaScript is in my eyes, and use it accordingly. Switching the other way round you would basically have to relearn the concepts, because JavaScript does not express one distinct enough, but is an exotic mix of them (or an ugly hack as others might say).<p>Outside of CS though, I think introducing people to JavaScript, PHP or even advanced Excel is highly beneficial.
owlish超过 10 年前
A lot of the discussion in here revolves around &quot;not being able to get an interactive GUI up and running quickly&quot;. If this is indeed the main problem with teaching programming with Python, there are many ways of tackling this problem without resorting to teaching Javascript. Don&#x27;t get me wrong, Javascript is an interesting language, but it has many oddities that could throw off a newcomer.<p>Sites like OpenProcessing[1] and ideone[2] already allow users to compile and share code in the browser. Why not create a Python GUI &quot;toolkit&quot; that interacts with the browser and can be accessed from an interpreter implemented in Javascript? Granted, this isn&#x27;t the &quot;vanilla&quot; Python experience, but if you&#x27;re just ramping up, having shiny bells and whistles to show off to friends is definitely a plus.<p>[1]: <a href="http://www.openprocessing.org/" rel="nofollow">http:&#x2F;&#x2F;www.openprocessing.org&#x2F;</a><p>[2]: <a href="https://ideone.com/" rel="nofollow">https:&#x2F;&#x2F;ideone.com&#x2F;</a>
评论 #8922060 未加载
gunnm超过 10 年前
Wouldn&#x27;t something like pyjs (<a href="http://pyjs.org" rel="nofollow">http:&#x2F;&#x2F;pyjs.org</a>) solve all of the author&#x27;s concerns, while still teaching Python?
评论 #8927303 未加载
ekianjo超过 10 年前
&gt; A month later, more questions: &quot;How can I give this game I made to my friend? Even better, is there a way can I put this on my phone so I can show it to kids at school without them having to install it?&quot;<p>Giving a Pygame game to your friend is pretty easy. It has usually very few dependencies and should be trivial to package. And it&#x27;s multiplatform (Mac, Windows, Linux including even exotic devices like the Raspberry Pi).<p>Putting a python game on a phone is definitely more of a problem, but at the same time something that is NOT made for a Phone touch controls will anyway perform poorly if you intend to do a demonstration with it.
评论 #8921449 未加载
brudgers超过 10 年前
I have a concern with Python as a teaching language in contexts where people are not necessarily into STEM and are inexperienced or marginally experienced as programmers.<p>There&#x27;s no neat and tidy way to deal with Python 2 versus 3. You can say use 2. You can say use 3. You can kick the issue down the road by requiring programming via web browser. But in the end anyone who catches the programming bug winds up facing a decision that even seasoned professionals struggle with.<p>Python as a teaching language is great for replacing MatLab. After that it entails tradeoffs as fundamental as character encoding. Not that I&#x27;m saying JavaScript is the answer.<p>If I were trying to get someone juiced about programming and solving the problems that MatLab does wasn&#x27;t a feature the audience cared about, I&#x27;d pick Processing. It does interesting things with sound and images and exports to HTML and JavaScript to run in the browser. All that and it&#x27;s small, well documented and Googles up a low noise search results page. Yet it runs as deep as you want to dive into the JVM and its languages.
评论 #8921551 未加载
alexvr超过 10 年前
My high school&#x27;s student laptops were super restricted (I was suspended for installing Eclipse on an unrestricted computer), so I played with JavaScript a lot as a senior. I didn&#x27;t have a good understanding of the virtues of classical polymorphism and whatnot at the time, so JavaScript&#x27;s unconventional OOP didn&#x27;t bother me; I was content writing procedurally, treating objects as structs. JS was also my introduction to the notion of first-class functions, and it made them seem so natural and essential that I get angry when languages don&#x27;t have them. I think JavaScript just barely misses the mark as a great programming language. But its new standard might change that and make it the best language for learning. If a language like Swift were as ubiquitous as JS I would have a different opinion.
lmm超过 10 年前
Even if &quot;runs in the browser&quot; is a hard requirement, surely there are options like Dart that don&#x27;t have as many horrible quirks and edge cases - quirks that are probably no trouble for an experienced developer, but can be very confusing to a newcomer - as Javascript does?
dinkumthinkum超过 10 年前
This is always a hotly debated topic. When I learned to program, I started because I wanted to understand how computers work. Javascript in a Web browser so many layers above the basics of a computer; I just don&#x27;t think it is a good choice for a first language. Obviously, it depends on your goals. If you are changing careers and you just heard that you can make all this money web consulting and you couldn&#x27;t care less about computer science then maybe go for Javascript, I don&#x27;t know much about people who got into programming via that route.<p>I think Python is probably a useful first programming language for someone interested in doing mathematics or algorithms but I still think, and this is totally against the grain, that C is a good language for beginners to programming. However, it may not be the best language to teach undergrads and expect as many as possible to stick with CS, maybe that is not a terrible thing? Though, that is elitist, I think C provide enough of an abstraction on top of the machine while still allowing you to get some idea of how computers and memory work, from a CS rather than an EE perspective.<p>The other benefit is that once someone wants to know how to create a game or how to make a GUI program ... the resources are readily available and in fact most of the libraries will be written in either C or C++. I think C over C++ because OOP concepts and syntax of C++ can be needlessly overwhelming for a newcomer to programming.<p>I feel like it also gives the beginner the feeling of actually creating a program. Those interested in learning to program will always be familiar with normal executables such as EXEs on Windows or binaries that can be executed on Linux. Using C means you can create something just like those programs they are familiar with; it gives the learner a sense of really accomplishing something, in my opinion. Creating something you have to run in conjunction with another program and does not seem like a &quot;typical executable&quot; can leave the user feeling like &quot;OK, how do I create a real program, though?&quot; This is not to knock interpreted languages, at all; it&#x27;s just something I think is important for <i>some</i> learners.
bartvbl超过 10 年前
It&#x27;s a fair point that the article makes. However, I&#x27;ve started out about 1.5 year ago with a programming group for kids in high school, and my choice was Python. I have since not regretted this decision because of one factor: fun. I could have gone with a weekly lecture on all sorts of theoretical things will learn again if (or when) they start at university.<p>Instead, I wrote a wrapper around OpenGL that provided some functions like &quot;drawRectangle()&quot; or &quot;drawImage()&quot;, and they have used it to build all sorts of things. Additionally, they are constantly wanting to try other stuff. I don&#x27;t think they would have done this if they didn&#x27;t enjoy the process of writing code.
Lerc超过 10 年前
I looked at a bunch of things for teaching and I settled on JavaScript. It&#x27;s not ideal as a language, but it ticks enough of the required boxes. The primary benefit was being able to teach someone without having to install any software. Quite often I would have to use locked down school computers, so doing everything from the browser was crucial.<p>I put together a simple library that has global functions to let the very first programs do interesting things while remaining simple.<p>I made a mediawiki Plugin so that I could have code examples that you can edit and run within the page. <a href="http://fingswotidun.com/code/index.php/Main_Page" rel="nofollow">http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;Main_Page</a><p>Having simple examples that you can see,run and change helps a great deal.<p>This is my standard starter program.<p><a href="http://jsbin.com/camocarohi/1/edit?js,output" rel="nofollow">http:&#x2F;&#x2F;jsbin.com&#x2F;camocarohi&#x2F;1&#x2F;edit?js,output</a><p>It does something, and the entire program can be viewed on the one screen, so you can keep it in one place and point to the parts to show what is happening. When that question comes &quot;How can I write a game?&quot; (and it _will_ come before the first lesson is finished, I can direct them to the list of available functions at <a href="http://fingswotidun.com/code/index.php/API" rel="nofollow">http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;API</a> point out the first entry &quot;clear()&quot; then put that in front of the fillCircle() call. The program goes from a drawing program to a moving dot game. From there you just go with the flow of &quot;How do I make it do (X)?&quot;<p>This is where a single hour lesson with my own daughter (age 11) ended up after starting with that base <a href="http://jsbin.com/coguvokupu/1/edit?js,output" rel="nofollow">http:&#x2F;&#x2F;jsbin.com&#x2F;coguvokupu&#x2F;1&#x2F;edit?js,output</a><p>The single greatest downside to using JavaScript is that it is not preempting&#x2F;blocking. A beginner will always assume that<p><pre><code> var spaceShip=loadImage(&quot;myship.png&quot;)</code></pre> will have the image loaded when the next line of code is reached. Events and callbacks are not principles you want to deal with as a first step. Similarly, you have problems when they try<p><pre><code> while(true){drawCircle(rand(),rand(),rand())}; </code></pre> The reasons why they can&#x27;t do things the way they assume are at a more advanced level.
Anthony-G超过 10 年前
Since I first came across Scratch, the programming language &#x2F; environment produced by MIT, I&#x27;ve recommended it to a number of friends who wanted their kids to learn programming. It covers the basics of software development (conditionals, loops, etc.) using intuitive and attractive GUI elements which can be combined and manipulated to easily create interactive programs such as animations and games.<p>It also integrates well with the web (Scratch 2 programs can be created from within the browser) so it&#x27;s very easy for users to show the results of their work to others.<p><a href="http://scratch.mit.edu/" rel="nofollow">http:&#x2F;&#x2F;scratch.mit.edu&#x2F;</a>
sbov超过 10 年前
Javascript has been around for close to 2 decades. I&#x27;m somewhat curious if there&#x27;s a change in Javascript that has changed your mind, or is it something you think should have been true for the past 10+ years?
dkarapetyan超过 10 年前
It is amazing how much of an IDE a web browser can be. I use typescript these days to prototype stuff and it is going pretty well. Reload and changes are up. Nothing else even comes close.
评论 #8921558 未加载
jdeisenberg超过 10 年前
For getting people into programming with graphics quickly: Processing (<a href="http://processing.org/" rel="nofollow">http:&#x2F;&#x2F;processing.org&#x2F;</a>). Since Processing is a thin wrapper around Java, the programming concepts transfer easily. Processing also has a Python mode, and there&#x27;s Processing.js for the JavaScript fans. If you&#x27;re a Racket&#x2F;Scheme type person, ClojureScript might be an option, with Quil for doing Processing-type graphics.
rbanffy超过 10 年前
As much as I fear a Dijkstra apocalypse and how much brain damage newbies will sustain by starting with JavaScript (and thinking arrays being hash maps to be perfectly OK), I started with 8-bit AppleSoft BASIC and I have to say that, while the concept of a function or recursion only appeared to me after my introduction to Pascal, I turned out well enough. Also, I had a good idea of how machine language programs operated - they map very neatly to what BASIC could do.
kylebgorman超过 10 年前
I don&#x27;t think mobile gaming should play a dominant role in teaching programming. (If I wanted to teach that, though, I wouldn&#x27;t reach for Python, however.)
PythonicAlpha超过 10 年前
One important reason for the success of C was the library. One of the reasons for the success of Python is the big library and the plenty of add-on modules.<p>But on the UI side, Python has its weak point. The other problem today is the trouble with the migration from Py2-&gt;Py3. But on the long run, the UI problem can be even more trouble. Python is still a good language on the server side, even when PHP was faster and still has a bigger market share.
barrystaes超过 10 年前
I learned in QuickBasic and later Pascal, and for that purpose they where great. In my first stab at Python i had my POC running within an hour.. but i do not like the hoops i had to jump through. Mostly the tabs, the v2&#x2F;v3 incompatibilities and lingo. PHP and C# also are good languages for starters. Today its JavaScript, but my impression is that becoming an software architect in JS is not that easy.
leke超过 10 年前
I taught my son JavaScript (along with html and css) because I think the browser is a great platform to expose new programmers to programming. I also think it&#x27;s the most relevant because any knowledge and experience acquired is likely going to count in some way in their future.<p>The JavaScript adventure can continue when we look at node on the server and even use it to control embedded devices like Tessel and Espruino.
keithpeter超过 10 年前
Lets run with the OA for a bit.<p>What textbook is there that is easily available in English that could support a 30 lecture introductory course?<p>What &#x27;environment&#x27; would you use? Text editor plus browser or a browser plugin for JavaScript editing or something else?<p>What base selection of libraries would be included with each project in your opinion?<p>Possibly linked with my first question, what kinds of projects&#x2F;assignments would you suggest?
facepalm超过 10 年前
My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For example Python doesn&#x27;t have real lambdas, on the other hand it has named parameters.<p>The only reason to use Python that I can think of is maybe SciPy.<p>I made me sad to witness Python gaining so much in popularity as a beginner language in the last year.
评论 #8922402 未加载
评论 #8926712 未加载
评论 #8922502 未加载
istvan__超过 10 年前
I still recommend Ruby as the first language because it has all of the features you want to know about as a newbie and at the same time there are very few quirks. The things you sacrifice are performance and memory efficiency. I have seen junior programmers picking up Ruby as be able to write production ready code in couple of weeks. I guess the learning curve is not as steep.
评论 #8921667 未加载
评论 #8921822 未加载
MarcScott超过 10 年前
I battle with the same problem with my students. I love teaching Python, and I think it is a fantastic teaching language. JavaScript, although harder to learn, is much more exciting for the students to play with, and libraries are always just a link away.<p>My main reason for not switching completely over to teaching JS, is the nightmare that is debugging simple syntax errors.
评论 #8923042 未加载
memracom超过 10 年前
I would actually solve the game&#x2F;show problem a different way. I would teach kids how to build MVC web apps and set up a cheap server so that apps could be &quot;shown&quot; to anyone on any device. If you use a mobile-first design philosophy for the webapps then phones are not likely to be an issue.<p>Yes, there is still the issue of response time but no language works for everything. You have to accept certain limitations and make compromises.<p>Actually, I might no longer even use webapps. Nowadays it is pretty cheap to give every kid a Raspberry PI so WxPython or Pygame can be used for everything. The showing problem boils down to borrowing a monitor, keyboard and mouse. You could actually carry around a small portable bluetooth keyboard and a mouse in your backpack with the Raspberry PI.<p>So, why stick with Python? It is because Python is a leader in moving up the evolutionary curve towards functional languages and functional reactive programming. I still think that Python is easier to get into that Erlang or Scala because you can &quot;make mistakes&quot; but still have a working program. And by examining the implications of mistakes you have a learning opportunity too. Note that Javascript has been following Python&#x27;s lead in adding more functional features.<p>There is a general language evolution going on and Python is in the thick of it, maintaining compatibility with the old imperative style beloved of data crunching scientists along with the functional goodies that Haskell, Erlang and Scala focus on. It is not out of date. It is not mired in the past like PERL and PHP. What was good about Python 5 years ago is still good.
评论 #8921441 未加载
评论 #8921567 未加载
评论 #8921782 未加载
评论 #8921461 未加载
评论 #8921554 未加载
skybrian超过 10 年前
There are other languages that run in a browser and might be suitable for teaching. How about Dart or Scratch?
mhd超过 10 年前
A few months back I wondered whether one could have an introduction to programming based on the language equivalent of &quot;Evoland&quot;[1].<p>For those who don&#x27;t know this, it basically recreates the history of (console) role-playing games. You start out in something that resembles Zelda, then you&#x27;ll get color, 3D movement and other perks.<p>One could do the same with a programming language, by using different features, or even slightly tweaking syntax and semantics. One approach might be similar to how some BASICs operate: line numbers and goto in the beginning, than subroutines, objects etc.<p>Or something where people don&#x27;t have to follow actual history and we&#x27;re going at things from a more mathematica&#x2F;functional point of view (shouldn&#x27;t be a problem to do this with Racket dialects).<p>Then again, IANAT. Never mind that I would think that the <i>environment</i> is actually more important than the language itself (for most normal values of &quot;language&quot;). So please don&#x27;t inflict Eclipse on newbies.<p>1: <a href="http://evoland.shirogames.com/" rel="nofollow">http:&#x2F;&#x2F;evoland.shirogames.com&#x2F;</a>
IndianAstronaut超过 10 年前
I figured this out when I was teaching my nephew programming. I started him on Python. He got bored quickly because he really couldn&#x27;t see the results of what he did and he really wanted to make simple games.<p>Javascript turned out to be much better for making simple games and doing simple puzzles.
avinassh超过 10 年前
Interesting discussion on reddit - <a href="http://www.reddit.com/r/programming/comments/2t4pkq/retiring_python_as_a_teaching_language/" rel="nofollow">http:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;2t4pkq&#x2F;retiring...</a>
TheDong超过 10 年前
I completely disagree with the argument here.<p>The class isn&#x27;t a class to teach graphics or to teach how to make android games or how to put something on a phone. Beginning computer science classes explicitly should not be about those sorts of things.<p>Beginning computer science classes should explicitly be about what a program is, what a function is, abstractions, and so on. Not &quot;what does code look like&quot;. Not &quot;how do I make a hello world program&quot;. No, what a program is. Lambda calculus or a context sensitive grammar and lexer or what have you. If you look at SICP, it got it 100% right there.<p>Now, you say, he said <i>programming</i>, not <i>computer science</i>, and your argument presumes <i>computer science</i>. Even so, python and javascript are terrible language for beginners if we ever want to see our craft improve. If someone wants to be a good programmer, they should be able to understand the full implications of having a proper type system, what memory safety and management is, how functions work, and so on. They should be exposed to haskell, lisp, rust, or the like.<p>If we teach a beginning programmer to use C or Python or Javascript, we&#x27;re simply teaching a new generation that memory leaks and buffer overflows are <i>not</i> a solved problem. That our languages are so poorly designed you have to constantly check if your type is what you think it is. That resource ownership is not a <i>solved</i> problem. That functions are weak and uncomposable. By God, you&#x27;re withholding the true beauty of programming from them and showing them some mockery.<p>If your students find the idea of having a webpage or a game that they produced more appealing than delving into resource allocation issues and understanding what a type system is doing then they shouldn&#x27;t be told they&#x27;re professional programmers, they should be hobbyists coders. I&#x27;m all for people writing toys like games or webpages in unsafe languages that have learnt little from the last 50 years of CS research... coding but not programming. That&#x27;s great. I&#x27;m <i>not</i> all for these same people being taught that they should be writing security software, banking software, and doing this stuff professionally when they have no clue what referential transparency is.<p>Truly, one of the reasons professionally developed software is rife with issues is that we don&#x27;t teach programming or computer science in our computer science course; we teach some coding and software development and never even let them know what true programming is until the theory of computation course in senior year.
评论 #8921883 未加载
评论 #8921907 未加载
flohofwoe超过 10 年前
If the main focus of the class is to code games for smart phones the choice should be the Unity Engine. BUT that would be the entirely wrong choice to learn programming. Games are multi-discipline projects, programming is just a small part of it, there are many distractions when writing a game to get graphics, sound, AI &#x27;look and sound right&#x27;, and the visual &#x27;rapid prototyping&#x27; workflow of modern game engines gives you quick results, but you don&#x27;t learn anything about programming. You just cobble together code snippets from Stack Overflow and tinker around until it feels right.<p>Python is a much better choice to learn programming then Javascript IMHO, then take a quick tour into Lisp, Forth and C, and then may be worry about creating games or UI apps.
评论 #8922328 未加载
kinleyd超过 10 年前
Thanks for introducing me to dadgum. I read a number of his older articles and I must say his opinions resonate with me. I&#x27;m going back in for some more. :)
simula67超过 10 年前
A language like Perl 6 would probably be a good first programming language if some good libraries become available for it.<p>Printing one line of text is one line of code. Then you can start teaching branching, loops etc.<p>Object-orientation is also baked in.<p>Oh and by the way, there is this thing called &quot;types&quot;. It helps you catch some types of bugs early and can potentially make your programs be compiled and thus run faster in some cases. Learn about that also without switching the language.<p>Some functional programming concepts can also be taught.<p>Also it has a C-style syntax so switching to another similar language later on would also be easier.
评论 #8921675 未加载
评论 #8921697 未加载
oellegaard超过 10 年前
The purpose of a teaching language must be to show students core concepts of programming. Since JavaScript doesn&#x27;t have proper polymorphism, inheritance, hell even types, I don&#x27;t see how they would benefit from being introduced to it initially. We started with Java and while it was a pain in general, the concepts were clear and you could easily go ahead with any other language afterwards. We also had some scheme and C just to have a look at other programming languages, but didn&#x27;t do much with them.
评论 #8922123 未加载
Beltiras超过 10 年前
Just add HTML and a web framework at that time and all his concerns just fade into the background. Teaches marketable skills too.
reacweb超过 10 年前
javascript&#x2F;html&#x2F;css is a new lingua franca that is &quot;understood&quot; by all computers, all OS. It is always useful to learn it whatever the purpose of the student. If the purpose is to learn computer science, SICP remains the best source of inspiration, even if scheme is out fashioned. Do you know if scala is used for teaching ?
评论 #8926611 未加载
yCloser超过 10 年前
I don&#x27;t like this concept of &quot;first teaching language&quot;.<p>It does not matter at all which one one learns first! It&#x27;s not the language, it&#x27;s the ideas and the way of thinking...<p>This is like talking about whether it is better for a baby to speak english or chinese, in order to learn how to walk
hollerith超过 10 年前
Warning: this is a very opinionated comment.<p>One reason I haven&#x27;t learned how to write web apps is because (sorry, but) I consider the web-app software ecosystem to be not very good. One of the modern web&#x27;s defects relative other &quot;software ecosystems&quot; is that it is too specialized IMHO for media consumption, media distribution, entertaining and being entertained and persuading and being persuaded by &quot;emotional&quot; appeals (more precisely, appeals to System I rather than System II). Another one of its defects is that it is more complex (and consequently harder to adapt to new situations and new purposes) than most other software ecosystems.<p>The topic under discussion is what programming language (and by extension, what programming environment and what software stack) to recommend to beginners. Here is my suggestion: it depends on whether the beginner has the kind of mind that can stay engaged while alone and while staring at a white screen containing only black text all day. If the beginner can do so, then I suggest that Emacs (the version from the FSF) is the best software stack for most beginners to learn.<p>Emacs is often considered complex, but its complexity is of a different kind than the complexity of the modern web. Emacs consists of a small core that anyone would have to master to be able to modify Emacs and to build upon Emacs and a large amount of <i>optional</i> add-ons. This kind of complexity is more acceptable than the kind of complexity the web has as long as the beginner is competent enough at deciding which optional add-ons are worthy of his attention. In the case of Emacs, 95% of them are probably not. (More on this 3 paragraphs down.)<p>Most of the changes I want to make to my personal software environment (as a heavy Emacs user and experienced Emacs-Lisp programmer) can be made in Emacs. In other words, Emacs is a kind of non-proprietary &quot;middleware&quot; just as the web is a kind of middleware (which is admittedly non-proprietary in the parts most essential for a beginning programmer) and just as terminal-emulation apps plus TTYs and PTYs plus ssh plus the ncurses library and cursor-address using ANSI terminal codes is a kind of non-proprietary middleware on which a wide range of software applications (or the user interfaces of the applications) can be built. And I recommend Emacs over the &quot;platform&quot; consisting of terminals, TTYs, cursor-addressing and traditional Unix shells (including rc) because (very briefly) that platform has too many of it design decisions came out of an environment so constricted in computing resources as to be mostly irrelevant for today and because the common mouse idioms really did represent an advance in the state of the user-experience-design art. Hey, since I&#x27;ve already risked offending a large HN contingent (web programmers), why not risk offending a second large contingent (those who like apps that use a terminal for interacting with the user)!<p>I am aware that not all prospective programmers can stay engaged while staring at plain text all day. They would get bored. To stay engaged, they need more stimulation, e.g., colors, graphical elements, things that move around on the screen (or they need a social element, social interaction being very stimulating for humans). For them, maybe the web is the best environment in which to learn how to program (since it is difficult to learn programming while continuously staying engaged socially). I concede that I have not really studied the issue, so I am (provisionally) willing to believe the general consensus on this page -- but only when it comes to beginners who cannot stay engaged while staring at plain text all day.<p>Since 95% of Emacs&#x27;s add-ons (including almost everything in ELPA and MELPA and much of what is distributed in the Emacs app itself) is not worth learning or embracing, perhaps I should add to my recommendation of Emacs the further recommendation that before tackling Emacs, the beginner should first explore and learn how to use OS X so as to give him or her a fighting change at learning how to tell which 5% of Emacs is worth learning and worth adopting. (I consider most popular apps on OS X to be well-enough designed to be worth learning, and my hope in making this recommendation would be that those examples of good-enough design will rub off on the beginner to the extent that he or she would be semi-competent in deciding what parts of Emacs to learn. Textmate in particular has a very well-designed user interface, but Textmate is just text editor for coders, not a flexible middleware like Emacs is, so stay with Textmate only long enough to get an idea of what good user-interface design is.) Certainly, I believe that most beginners should stick to <i>graphical</i> Emacs so that the common mouse idioms (moving the insertion point, selecting by dragging) are available, leaving Emacs running in a terminal to experienced employed programmers who need to ssh in to servers a lot. Also, stick to dired mode as opposed to other ways of navigating and making changes to the file-name space, and avoid org mode, shell mode, eshell mode and <i>especially</i> term mode: org mode makes you learn too many new commands and keyboard shortcuts, and shell mode, eshell mode and especially term mode are too rooted in the very old &quot;ANSI terminal, cursor addressing and Unix command line&quot; way of doing things, which IMHO is overrated on HN unless the goal is to become a professional sysadmin or maybe devops person. And all 4 of those packages &#x2F; libraries, org mode in particular, do not allow the user to use the mouse enough IMHO.<p>A more important reason I haven&#x27;t learned how to write web apps is because the web is our civilization&#x27;s most important medium for reading, publishing writings and browsing (in the old sense of &quot;browsing&quot; as in browsing through a section of a book store) through collections of textual documents, and IMHO the more people writing web apps, the less suited the web becomes for this essential civilizational function -- because as a general principle, when a software ecology such as the web is adapted for a purpose A then it naturally tends to become less useful and less good for purpose B. In other words, a complex software system serving 2 masters serves those masters less well than a system serving only one master.<p>Again, I realize that not everybody finds reading static textual documents on the web stimulating enough to keep at for large blocks of time. however, for those of us that do, and who are using the web for a serious purpose (e.g., learning, teaching, inventing, creating new scientific information) the web of 1998 (when the web was already pretty good for reading, publishing and the old pre-electronic sense of &quot;browsing&quot;, but had not been significantly adapted or specialized for writing web apps) was generally superior to the web of today. And I believe that the people for whom the web of 1998 was generally superior to web of today deserve some consideration, and I choose to show them some consideration by refraining personally from learning how to create web apps.<p>I am receptive to follow-up questions via email, especially from beginning programmers.
评论 #8922069 未加载
frozenport超过 10 年前
Life isn&#x27;t all about game, sometimes its about matrix multiplication and NumPy and SciPy do this exceptionally well.
评论 #8922447 未加载
alextgordon超过 10 年前
- No memory management<p>- No pointers<p>- No cache<p>- No branch predictor<p>- No interrupts<p>- No endianness<p>- No alignment<p>What exactly are we teaching students to program? It&#x27;s certainly not a computer.
评论 #8921695 未加载
评论 #8927401 未加载
elwell超过 10 年前
I would almost suggest CoffeeScript in place of JavaScript. In fact it feels more like Python. My main concern would be lack of Google-able resources compared to plain JS.
评论 #8921416 未加载
评论 #8921454 未加载
aerovistae超过 10 年前
So incredibly in favor of this.<p>I love python, it&#x27;s probably my favorite language. I taught a class on it in Boston. But these <i>exact</i> questions have indeed brought doubts into my mind.<p>Year after year I&#x27;m disappointed by what python simply cannot provide in any straightforward way. The options are very few for making games. The options are very few for desktop GUI (I tried to do PyQt and then discovered QML with JavaScript and quickly left python behind for that project). The options are few for back-end web development-- yes, there&#x27;s Django, but it just doesn&#x27;t have the clarity, documentation, and community that Rails has, or Wordpress (different type of entity, I know), or many others. Flask is amazing but small in scope and community.<p>I&#x27;m a professional JS developer by day and I used to think JS was awful for teaching, because the functional side of it is nightmarishly confusing IN GENERAL, let alone to someone new to programming. Its objective&#x2F;prototypal system takes quite a bit of getting used to, also, and it has many other quirks.<p>But, for the <i>EXACT</i> reasons mentioned in this linked post, I changed my mind. The fact that JS can be used for <i>almost anything</i> nowadays, is ubiquitously in demand, has a massive, massive worldwide &quot;community,&quot; and allows easy GUI manipulation via HTML&#x2F;CSS, makes it the best candidate for teaching by far.<p>It&#x27;ll just take some careful consideration as for how to approach it best.
评论 #8921431 未加载
评论 #8921499 未加载