13 ms·
Python, the "second best language for everything", has had a huge impact for teaching people programming. Beginners can do useful and interesting things and sol
by sixhobbits 8y ago
Python, the "second best language for everything", has had a huge impact for teaching people programming. Beginners can do useful and interesting things and solve real problems after a few hours of learning.
And yet the number of times I've seen beginners completely discouraged or even give up programming forever because they have conda and pip and brew and pyenv installed and can't run a basic script after 4 hours of trying because environment mess-up is ridiculous.
The value in a programming environment that literally just works and can give you a functioning web app (the modern very basic I/O) in less than a minute is a huge value add for education.
I'm a complete convert. I've worked with Amasad to write tutorials[0] showing how easy repl is to use and these have become some of my most popular tutorials.
Absolutely incredible that repl.it has done so much in such a short time and with a very small team. All the best for the future!
[0] https://www.codementor.io/garethdwyer/posts https://www.codementor.io/garethdwyer/posts
- avip 8y agoThis is where JS shines (we all have browsers). I think dedicating 10 minutes to ensure `docker run --rm -it -v $PWD:/srv python bash` should suffice, without digging into what it does.
- nonce725 8y agoAs a beginner, I have no idea what docker is. This is one of the most frustrating parts of learning ANY language. The assumed knowledge and supposed "here's a quick start guide" actually starts on step 8. Don't assume the beginner knows what docker is. Don't assume the beginner knows what a shell is. I've tried to learn 3-4 languages or frameworks over the years, and I have only a vague idea of how to move between directories in the command prompt. Nevermind where I should download or extract files. I've found people's attitude when I tell them this is dismissive. But I sold a business for 6 figures last year that was parimarily automation scripts in PHP. Figure that one out.
- avip 8y agoI do not assume anything. I'm taking the beginner seat almost daily, in some context or another. But he who shell instruct his children to start with installing docker, rather with installing "python" (which is an ill-defined term) - will have much, much sooner, a class running predictable setup. And, speaking of assuming things - it will keep running even without network connectivity.
- iamdave 8y agoBut I sold a business for 6 figures last year that was parimarily automation scripts in PHP. Figure that one out. I'd be keen to learn more, can I reach out? I'm not really looking for guidance or ideas to do the same, I just genuinely enjoy reading these kinds of stories-like a weird Reader's Digest sort of thing but for entrepreneurs.
- darkerside 8y agoHere's a counterpoint. It's ok that you don't know what docker is. It's ok that you don't know what a shell is. What exactly is the nature of the dismissive attitude from others that has held you back from learning? Perhaps these are real opinions, but consider the source. If they are smarter than they are rude, and their opinions hold value, maybe suck it up and learn something. If it's not worth it to you, ignore them and walk away. Regardless, don't let other people's feelings hold you back from learning. And don't let other people's feelings about you dictate your feelings about yourself. On the other hand, perhaps these attitudes are partly a projection of your own feelings. Use it as motivation to learn the things that you feel like you should know.
- Avshalom 8y agoYeah it's fine not to know what docker is in like a moral sense. But when it comes to wanting to write anything beyond hello world you start running into package and environment and container managers that everyone is arguing with everyone about. I mean hell this thread is like three different recommendations for python that all end with "fuck it use JavaScript". That shit is discouraging and the annoying thing--coming from some who first wrote a Tetris clone a decade ago--is that it's recent. A decade ago you just downloaded a library and put it in the folder you were writing in. Now while that still probably works library how-tos have all either gotten complicated or assume you've already complicated that shit.
- Sophistifunk 8y ago10 minutes installing and configuring docker is a good way for beginners to start programming?
- avip 8y agoNo. It's a good way for a programming instructor to start a programming class. And there is nothing to "configure" in docker.
- calgoo 8y agoLast time i setup docker for some quick testing i had to: 1. Install docker using Apt or Yum 1a. So for CentOS i had to download and run a script on my machine to add the repository and install. 1b. Setup autostart of the service 1c. Configure my user so i can manage docker without sudo. Then once its installed: 2a. Lookup the correct flags to use 2b. Find the correct image to run 2c. Learn how to map a local folder for persistence 2d. Learn how to open ports for the program to be accessible. As a system administrator with 15+ years of experience, this is easy for me. But if I where to ask someone without any system experience to do this, I can for-see a lot of frustrating moments where they would give up.
- avip 8y agoWhat would you suggest as an alternative plan for shepherding 10 random dudes and their homegrown laptops into a consistent state of python + pip installed?
- calgoo 8y agoThats the problem I guess, how to standardize something that's not standard and never will be. Im sure that VMs have been tested and done as well, bringing their own different issues. We could add another layer of abstraction, like some type of orchestration tool, but then that needs to be supported and there will still be issues with the system underneath. Maybe stat with something like lambda in AWS using their cloud9 instance as an IDE? It will cost a few $ but might help with the basics. However, this would only be good for very limited learning, so maybe add a small sysadmin crash course after that? So maybe schedule it similar to this: Basics: 10 days of coding in lambda using dynodb etc. Systems: 2 days of devops using python to setup and control the environment Rest of the course ....
- Alex3917 8y ago> And yet the number of times I've seen beginners completely discouraged or even give up programming forever because they have conda and pip and brew and pyenv installed and can't run a basic script after 4 hours of trying because environment mess-up is ridiculous. Definitely true. Getting Python to run correctly is not only one of the hardest parts of learning to code, but comes right at the beginning so before people have experienced any success. It's gotten less bad in the last year or so thanks to pipenv, but it's still not a great situation.
- brownbat 8y ago> Getting Python to run correctly is not only one of the hardest parts of learning to code, but comes right at the beginning so before people have experienced any success. This is a surreal statement to read as someone who basically just writes and runs nearly pure Python in a text editor.
- Alex3917 8y ago> This is a surreal statement to read as someone who basically just writes and runs nearly pure Python in a text editor. Go help out at meetups for Python beginners and you'll see what I mean.
- Xeronate 8y agoSo does pretty much everyone. The problem is with setting up virtual environments and managing packages.
- talltimtom 8y agoSo much more harm than good is done trying to get new users to use virtual environments. Just get them started with straight up python, tell them that the solution to “couldn’t find X” is always just to type pip install X in a terminal and leave them to it. They’ll figure out the rest long before it becomes relevant and they won’t have need for it until long after they figure it out.
- dnautics 8y ago
- ryandrake 8y agoThis was one of the great things about the ol’ Commodore 64, decades ago: straight from the factory, power on, and a second later, you were in a fully set up BASIC developer environment/REPL. How did things get so complicated?
- amasad 8y agoWe think repl.it is the C64 of the cloud era: >Cloud-computing is one of the most significant paradigm shifts in our industry, yet it remains commandable only by relatively few professionals. It's similar to when, prior to microcomputers, only big corporations and universities had mainframes. We want Repl.it to be the microcomputer to the cloud's mainframe.
- ryandrake 8y agoI like the goal but find it weird that getting back to the great usability of a system over 30 years old now requires a cloud service and round trips to a server. Why can’t I buy a boot ROM for a PC that drops me to a python prompt after a sub-1-second boot up?
- amasad 8y agoThat should exist too. Right now doing it in the cloud allows instant sharing and hosting but I hope we can get to a point where we can build something like what you suggest.
- Blackthorn 8y agoI mean, you can. The reason things are hard is because of external libraries (dependencies) that you might dynamically download and start using. If you don't have that restriction, things get vastly simpler.
- jimbokun 8y agoDependency management is the big one, I think. It’s still pretty easy to run default Python prompt in MacOS (as long as you know what the terminal is). But it gets complex really fast the moment you want to use a cool library. Which is probably a few minutes into your coding tutorial.
- 7ewis 8y agoI've been using Python as my go-to language for a while. It works well and I feel like I understand the basics, but pipenv, pyenv, pip etc. seem needlessly complex. Especially when I'm trying to create a serverless framework package, or upload a zip to AWS Lambda. Never know what tool to use to install packages, or how to specify the python version... or even change the python version on my Mac. Homebrew Python, system python, virtualenv? Would love it if I could find one simple way to do all of this, but always seem to run into issues and have to use another method. How do the professionals do it? Do you know if any good guides?
- Klathmon 8y agoThis doesn't answer your questions, but I firmly believe this is the major reason node took off in popularity. Npm let you install packages minutes after being installed, and they went right into a folder right there, and they didn't conflict with any other packages on your system. I was like you and played with python for years but never anything larger than small scripts, and every time I went to do "real" python I'd hit a wall where you were. npm was just so easy, so simple, so fast that it won me over. And it was years before I ever setup a virtualenv, and even then I'm still at this point not entirely sure how it works and what it's doing despite having published a pip package.
- qudat 8y agoI'll echo this statement as someone who has published packages both to npm as well as pypi. There's no contest, npm is so much simpler as a maintainer. For anyone wondering why, no one should go beyond the confusing requirements.txt and setup.py parity madness. Furthermore, try uploading non-python files to pypi and explain to me why it has to be this difficult? The answer coming swiftly from npm: it doesn't.
- nahtnam 8y agoI don't think many people here will agree with you but I do. I use Javascript for almost everything I do because "It just works." Assuming you are running Node 6.0+ and NPM 4+ you'll almost never run into an issue unless you are using something that needs some native packages installed.
- monk_e_boy 8y agoI use it in all my lessons (1st yr degree) coding made simple again. Wish php was better, it only outputs to the console. No SQL. :( No debugger.
- amasad 8y agoPHP is getting better soon!
- qaminsod 8y agoI think there is a lot of value in going through the pains of setting up a development environment, writing build scripts, debugging environment issues, etc. > Beginners can do useful and interesting things and solve real problems after a few hours of learning. What real problems are beginners actually solving? I literally cannot think of a single one. Most introductory programming tutorials I've seen start off with very straightforward instructions to setting up a basic environment - and this is actually useful in the long run. vs programming in some special editor abstracted away from the real world. That being said online repls are useful for writing quick code for e.g. testing something out.
- gmmeyer 8y agoI really couldn't roll my eyes harder at this. Yes, they're not building a distributed system. But they can do things that make them feel like they're solving problems.
- qaminsod 8y agoSolving real problems is not the same as doing things that make you feel that you are through your imagination.
- rorykoehler 8y ago>I think there is a lot of value in going through the pains of setting up a development environment, writing build scripts, debugging environment issues, etc. There is but not as the first thing you do. Even I still get frustrated with setting up new dev envs for new (to me) languages. I'd much prefer to just try it out first and then figure out the plumbing later. >What real problems are beginners actually solving? I literally cannot think of a single one. That's a very elitist take. Firstly they are solving their own very real problem of not knowing how to code. Second they could have a very specific problem they want to solve that can only be solved by code. >Most introductory programming tutorials I've seen start off with very straightforward instructions to setting up a basic environment - and this is actually useful in the long run. It's true but what is also true is that there will almost always be version changes and OS specific changes that break the instructions in small but material ways. A beginner will not have the skills or knowledge on how to resolve that. >That being said online repls are useful for writing quick code for e.g. testing something out. Isn't that exactly the same problem they are solving for beginners?
- jdminhbg 8y ago> And yet the number of times I've seen beginners completely discouraged or even give up programming forever because they have conda and pip and brew and pyenv installed and can't run a basic script after 4 hours of trying because environment mess-up is ridiculous. Beginners? I've been in the industry for a decade and the same applies to me. The Python environment situation is a trainwreck.
- Hbthegreat 8y agoI share this feeling. Going to python for the first time as someone that has developed software for 16+ years was incredibly more difficult and time consuming than I would have hoped. I still don't understand how it has become the default go to language for teaching new coders when it has quite unintuitive syntax / packages and setup steps.
- nomel 8y ago> unintuitive syntax I don't see this often. Could you point out some syntax or concepts that aren't clear, in Python?
- anc84 8y agoOn Linux it is all quite easy. On Windows, just install WinPython or Thonny and you are good to go.
- talltimtom 8y agoDon’t install thonny, it’ll fail in horribly odd ways for a multitude of widely used simple to use libraries. Just go for winpython or anaconda, and use a text-editor or IDE that’s stable. The last thing you want new users to run into are issues where odd interrelations between your “editor” and the runtime cause problems that google can only find issue descriptions about.
- aivarannamaa 8y agoI'm sorry to hear you have had problems with Thonny. Which libraries you had problems with?