5 ms·
Python has brought computer programming to a vast new audience
- 42B 8y agodupe: https://news.ycombinator.com/item?id=17569756 https://news.ycombinator.com/item?id=17569756
- jolux 8y agoThat's 4 months old and the discussion is locked on it.
- merricksb 8y agoFrom the official FAQs[0]: If a story has had significant attention in the last year or so, we kill reposts as duplicates. If not, a small number of reposts is ok. 252 points/261 comments probably qualifies as "significant attention". [0] https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html
- keir-rex 8y agoDo HN threads get locked?
- nicolashahn 8y agoPython was my first programming language love. I had a few false starts: Logo when I was very young, which I found too useless. Perl, which made no sense to me as a middle schooler. Actionscript came close, I was eventually able to create a Flash game in high school, but the API was still too arcane for me to actually like it. In college, Processing.js was what I used in the Intro to Programming class, which was fun, but like Logo, not powerful enough. Java (why do I have to type so much?) and C (why do I have to worry about memory allocation?) for the intermediate courses. But I never really enjoyed a language until one of my upper division classes had us work in Python. Finally, a reasonable language. Easy to pick up, but very powerful once mastered. Easy to read, quick and concise to write, thanks to the syntax and interpreter. A massive amount of open sources packages to choose from, for nearly any programming task you can think of. A sane blend of functional, object-oriented, and procedural features. Python was the language that made me actually enjoy programming. Thanks GVR!
- BurningFrog 8y ago> why do I have to type so much? As someone who came to it from Ruby, that is often my question about Python :)
- zmmmmm 8y agoSame from Groovy! I can understand why a lot of people start with Python. I can't work out why they stick with it once they become more advanced and understand its limitations though.
- somada141 8y agoI feel it really depends on one's background. I'm doing backend with Python now but came from academia where Matlab used to be the tool/language of choice. However, more and more academics got sick of working in that walled garden and paying oodles of money to use it and Python was a fantastic alternative to that. I believe that if you're walking the line between software-development and data-science Python does an excellent job of bridging the two.
- vorg 8y agoAbout 8 years ago, I moved on from Apache Groovy to Clojure which is far less verbose. Well placed macros in a testing script reduces a lot of clutter. Clojure has a longer ramp-up time than Groovy though, but once mastered is far more effective. I stayed with Clojure until I moved off the JVM about 5 years ago.
- zmmmmm 8y agoI am curious where you ended up? I have not found any substitute for the JVM for a flexible, rapid development yet high performance, stable and mature environment with a large base of library and deployment option support.
- robben1234 8y agoI'm a Python developer (web back) who occasionally does some fixes on legacy RoR project and I always ask myself why does Ruby needs so much sugar. Also it does not look very consistent to me, but it's probably because I get to practice only once in a couple of months. After Java, CPP and Node, Python looks to me as the greatest of all. Syntax is just comes to you and usually does not produce problems. And Python even right now has so many areas of application, and does it without much compromises, that I wonder why would I want to change anything.
- laurieg 8y agoPython was not the first programming language I wrote a program in, but it was the first one I actually ran. When I was a kid I wanted to make games, I picked up a book on C from the library. I wrote a simple interactive fiction type game but with never managed to compile it. When I tried out python a couple of years later I was blown away. I could actually write and run programs. I wrote a mandelbrot set generator and I was hooked. This is what programming is supposed to be like, I thought to myself.
- sytelus 8y agoA 5 year old can do bit of Python programming :). Start terminal, type Python and then type 2 + 3. Watch them getting kick out of typing huge numbers and Python spitting out the answers.
- jolux 8y agoSame with Haskell or ML family languages.
- bbeonx 8y agoAhhhh, but then they will ask how to print things and you'll have to explain monads :)
- jolux 8y agoI thought we were talking about a REPL instance. Have you already explained how to use a command line and what files are and how to run them? stdout?
- Godel_unicode 8y agoYou need none of that in a jupyter notebook.
- jolux 8y agoJupyter supports Haskell too though. As well as OCaml and Scheme...
- chasedehan 8y agoJust tell them they are like burritos. ;)
- coder543 8y agoZygohistomorphic prepromorphisms[0] are a common topic of discourse among five year olds, for sure... But more seriously, I strongly disagree about Haskell being anything like Python is for kids. The level of abstract reasoning that Haskell requires for more than just adding two numbers is not easy or intuitive for kids. Following step-by-step instructions is intuitive. Writing Python line-by-line is easy to understand by analogy to a list of instructions. Eventually they can start using functions when they're comfortable, but you're very unlikely to succeed in teaching a five year old about typeclasses, monads, functional purity, effect systems, or anything like that. The thing with Haskell is that you have have to know almost all of that to do anything useful from day one. Even something as simple as drawing lines on the screen.[1] Don't be ridiculous by suggesting Haskell is just the same to five year olds as Python. [0]: https://wiki.haskell.org/Zygohistomorphic_prepromorphisms https://wiki.haskell.org/Zygohistomorphic_prepromorphisms [1]: https://docs.python.org/3.7/library/turtle.html https://docs.python.org/3.7/library/turtle.html
- bbeonx 8y agoBiggus Uptickus
- jolux 8y agoI found this article to be profoundly weird in a lot of ways. It's not quite suffering from the "igon value" problem, but gosh does it come close. It's hard to measure programming language popularity, and most estimates I've seen have Python neck and neck with JavaScript with regards to popularity. Plenty of other languages have simple syntax and are easy to read, the only thing I would say Python has that is clearly superior is availability of packages and community support, (and even then JS has got to be close there) which are undoubtedly huge, but I think it's fallacious to assume that those reflect intrinsic technical worth.
- tormeh 8y ago>Plenty of other languages have simple syntax and are easy to read As easy as Python? That's a very high bar. We all agree (I hope) that JavaScript requires linters (plural) to write well. Rust/Scala/Haskell have unpleasant learning curves. Java is verbose and clumsy. Basic and Pascal have fallen into disuse. Go may be simple, but it's syntax is more symbolic and less English-like than Python. Don't get me started on Perl and the lisps. C/C++/PHP have more footguns than features. I'm not a Python die-hard, but it's obvious that it's superior when it comes to ease-of-use and learning curve. It's very similar to how people write pseudocode.
- jolux 8y agoI will argue that learning curves are similar with Ruby, SmallTalk, ML, and Scheme to Python. Logo is the original teaching language, and I think is similarly easy. It's my belief that people exaggerate the learning curve of Haskell, but whatever, I'll grant you that. If your criteria for readability is "English-like" I think you're missing a lot of what makes Python so readable in the first place. It is not very English-like at all. Compare to say COBOL, which actually had English-like readability as a design goal and was by all accounts an unmitigated disaster. AppleScript has a similar reputation for being a "read-only" language because of how difficult it is to pick up from reading it. What makes Python readable is having a small number of concise syntax constructs that compose into complex programs, the same things that make functional code readable. The presence of words vs operators is probably important, and Haskell tends towards the latter, but the ML family doesn't, and Lisps are plenty readable if you keep them simple. There's a reason that SICP and HTDP use Scheme, the latter using a gradually larger subset to make it less intimidating.
- minimaxir 8y agoAs a part of my college curriculum most students are required to take a programming course; I got put into the Java course. Although I was good at it, I hated every minute of it because it felt like I was fighting the computer to make things work. I played around with PHP in order to make hacks on WordPress themes, which again I hated due to system-fighting. I learned base R (pre RStudio/tidyverse) for stats classes, which I hated even more than the previous two since everything felt combersome. Then just for fun I installed Linux on my laptop and experimented scraping APIs with Python with only a few lines of code and I got hooked. Nowadays I use primarily Python for both work and personal projects. If I had started with learning Python, I would have had a much different career path!
- eksemplar 8y agoJava has some advantages over python in a teaching environment. Writing a basic hello world function you’ll learn about types, return values, references, imports and access modifiers, all in three lines of code. Java is also excellent for building stuff like various linked lists to see how the lists and arrays we all take for granted actually work behind the scenes. The confines of Java’s strictness is also a really great sandbox in which to teach best practices without students ever getting in danger, because java will tell them every time they do. I know a lot of teachers really struggle to do it well, but going through public void X, word for word can be extremely useful in teaching. For one, it’s very easy to spot who knows what is happening and who is just copying stuff to make it work. I think python is quite terrible for teaching beginners, but it’s certainly fun to write. These days, I think JS and Node is more fun than python but that’s mostly because it’s where a lot of the fun is happening, I certainly could do without all the {s and ;s.
- earenndil 8y agoI disagree. Those three lines of code are three lines of utter black magic to a beginner. Things are only useful insofar as they solve a problem, and the beginner hasn't yet encountered the problem solved by types yet, so there's no reason to teach them.