This book is a short, introductory guide for the Python programming language. This book is well suited:
* As a reference material for Python beginner workshops
* If you have prior experience with another programming language
* If you want a complement resource after reading a Python basics book, watching a video course, etc
---
The post link takes you to the free online version of the ebook. PDF/EPUB versions are currently free (for about a week) along with some of my other books. You can get them from gumroad/leanpub, links are given below:
The first thing I'd tell you is that people who are looking to learn python with 0% knowledge of python are most likely not using linux as an operating system.
Windows/Mac instructions up front make a lot of sense.
Other hangups newbies have: where to type things? Where to run commands? Hell, what's a command? These are the things one of my kids asked me when I was showing them python last night.
That's how I read it as well. That said, I think it's fair to note that anyone who has only ever used their computer for browsing, word processing, and gaming who gets dropped into most Introduction to X courses really has a whole (somewhat operating system and tools-dependent) course worth of material they probably need to go through first.
I've seen the discussion boards of a couple nominally-intro MOOC courses filled with people utterly bewildered about basically how to use a computer for programming.
Web IDEs are great for these intro-to-programming courses. Ideally the students get a couple of weeks of material on how to set up a local development environment later.
I have Linux only, so can't give Windows/Mac instructions. That said I do show how to use IDLE, so command line knowledge isn't strictly necessary to follow along this book. I also mention links for websites you can use as an alternate.
Given that knowing another programming language is a prerequisite, I hope getting started won't be an issue. I'll see if I can improve on the current instructions.
> I have Linux only, so can't give Windows/Mac instructions. That said I do show how to use IDLE, so command line knowledge isn't strictly necessary to follow along this book.
You bring up IDLE but don't define it. It's mentioned that it's related to IDE only.
> Given that knowing another programming language is a prerequisite...
There are plenty of books teaching Python for beginners to programming (Think Python, Automate the Boring Stuff, Python Crash Course and so on). And those are all 200+ page books, requiring a lot of effort from the author to teach programming concepts.
I've seen a few people wanting a book that assumes the reader is already familiar with programming basics. The official Python tutorial is awesome for that purpose and there are a few books as well (A Whirlwind Tour of Python, Python 101, etc). I had started another book on Python projects and I felt I needed to improve my Python knowledge, so I wrote this book.
>You bring up IDLE but don't define it. It's mentioned that it's related to IDE only.
I'm assuming reader already knows IDE. I can add a wikipedia link to make it easier to look it up for those who don't know about it.
While Mac is indeed problematic, for Windows you can just download a copy of their evaluation VM and go through installation there. For my own course installing and doing "Hello World" is actually the 0th exercise, because it doesn't make sense to start doing stuff if this doesn't work.
Google Colab is amazing for speeding through these early roadblocks. Controversial opinion but a beginner’s goal should be accomplishing a task - not learning about software development.
A few wins later, they’re going to run into some friction and that’s when you can teach them about the standard to write code. Most importantly, they’ll understand the underlying “why” at this point.
>* beginner’s goal should be accomplishing a task*
Yup - I learned Photoshop in the mid 1990s because I was given a task to make some marketing material for the architecture firm I worked for... and they paid hourly for me to go to the Kinkos near the office as they had workstations with Photoshop on them.
If you have a goal/task that you need to create then you will learn faster.
You can't just sit down in front of a piece of software, such as Autocad or Photoshop and "learn" it unless you have a goal...
There is a bad-ass piece of software called "Bartender" By Seagull Scientific and its used extensively in the cannabis industry to make labels - I love that software and I had to learn how to use it as I needed to design and print Cannabis labels...
I recently read The C Programming Language, and the paragraph about the difficulty of writing a 'Hello, world' resonated with me:
> This is the big hurdle; to leap over it you have to be able to create the program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy.
For beginners, getting the development environment figured out can be a significant roadblock.
Seconded. When my brother was learning front-end developement those were the kind of things that caused most problems in the beginning but were the most glossed over in the tutorials.
I personally think that learning the nuts and bolts of how things work is where one should start. What compiles what, where is what stored, what process executes what, how does that thing know where that other thing is located etc.
Most people who code will need an inverted triangle of knowledge in relation to the software stack. Starting with some subset of software fundamentals is great, but it's easy to lose the forest for the trees in that approach.
If I love websites and now I want to build one, spending more time on fundamentals than is necessary to impart a general scheme and more importantly the metaphors of those fundamentals would be a waste.
My partner has tried learning Python multiple times. What hung her up the most each time was the installation and setup on a Mac. After finally finding a Python course that held her hand through the installation phase, the next hurdle was finding a project that was interesting to her.
Thank you for posting this. I've been meaning to get back into programming for fun recently but have been struggling to find something I wanted to work on.
Also, renpy is used for a number of games, including some commercial games, so modifiying an existing game would be another option. (As a side note, I wish someone would make a python point and click adventure equivalent of renpy since for being such basic games they very often have major technical issues).
A lot of talk with issues of setup here. I have been using https://trinket.io/ with my lecture notes / students as a good way of getting started. Especially now we are teaching online and not using our dedicated labs with python already installed. It works well and you can use turtle.
Great work! One minor nitpick would be to move the "In-place editing with fileinput" section to "Dealing with files" as it seems only tangentially related to command line arguments. At first glance I thought it was put there in error...
Thanks for the feedback. I put fileinput in CLI chapter since it is a good example for a cli app and I'm introducing sys.argv in that chapter. I link this section in Files chapter as well. That said, putting it in Files chapter would work too.
27 comments
[ 3.1 ms ] story [ 66.4 ms ] threadThis book is a short, introductory guide for the Python programming language. This book is well suited:
* As a reference material for Python beginner workshops
* If you have prior experience with another programming language
* If you want a complement resource after reading a Python basics book, watching a video course, etc
---
The post link takes you to the free online version of the ebook. PDF/EPUB versions are currently free (for about a week) along with some of my other books. You can get them from gumroad/leanpub, links are given below:
* 100 Page Python Intro: https://gumroad.com/l/100pagepythonintro or https://leanpub.com/100pagepythonintro
* Python re(gex)?: https://gumroad.com/l/py_regex or https://leanpub.com/py_regex
* Magical one-liners (grep/sed/awk/perl/ruby): https://gumroad.com/l/oneliners or https://leanpub.com/b/oneliners
Windows/Mac instructions up front make a lot of sense.
Other hangups newbies have: where to type things? Where to run commands? Hell, what's a command? These are the things one of my kids asked me when I was showing them python last night.
I've seen the discussion boards of a couple nominally-intro MOOC courses filled with people utterly bewildered about basically how to use a computer for programming.
I have Linux only, so can't give Windows/Mac instructions. That said I do show how to use IDLE, so command line knowledge isn't strictly necessary to follow along this book. I also mention links for websites you can use as an alternate.
Given that knowing another programming language is a prerequisite, I hope getting started won't be an issue. I'll see if I can improve on the current instructions.
> I have Linux only, so can't give Windows/Mac instructions. That said I do show how to use IDLE, so command line knowledge isn't strictly necessary to follow along this book.
You bring up IDLE but don't define it. It's mentioned that it's related to IDE only.
> Given that knowing another programming language is a prerequisite...
Is that mentioned at all? And which ones? Why?
I mention it in the preface chapter: https://learnbyexample.github.io/100_page_python_intro/prefa...
There are plenty of books teaching Python for beginners to programming (Think Python, Automate the Boring Stuff, Python Crash Course and so on). And those are all 200+ page books, requiring a lot of effort from the author to teach programming concepts.
I've seen a few people wanting a book that assumes the reader is already familiar with programming basics. The official Python tutorial is awesome for that purpose and there are a few books as well (A Whirlwind Tour of Python, Python 101, etc). I had started another book on Python projects and I felt I needed to improve my Python knowledge, so I wrote this book.
>You bring up IDLE but don't define it. It's mentioned that it's related to IDE only.
I'm assuming reader already knows IDE. I can add a wikipedia link to make it easier to look it up for those who don't know about it.
A few wins later, they’re going to run into some friction and that’s when you can teach them about the standard to write code. Most importantly, they’ll understand the underlying “why” at this point.
Yup - I learned Photoshop in the mid 1990s because I was given a task to make some marketing material for the architecture firm I worked for... and they paid hourly for me to go to the Kinkos near the office as they had workstations with Photoshop on them.
If you have a goal/task that you need to create then you will learn faster.
You can't just sit down in front of a piece of software, such as Autocad or Photoshop and "learn" it unless you have a goal...
There is a bad-ass piece of software called "Bartender" By Seagull Scientific and its used extensively in the cannabis industry to make labels - I love that software and I had to learn how to use it as I needed to design and print Cannabis labels...
> This is the big hurdle; to leap over it you have to be able to create the program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy.
For beginners, getting the development environment figured out can be a significant roadblock.
I personally think that learning the nuts and bolts of how things work is where one should start. What compiles what, where is what stored, what process executes what, how does that thing know where that other thing is located etc.
If I love websites and now I want to build one, spending more time on fundamentals than is necessary to impart a general scheme and more importantly the metaphors of those fundamentals would be a waste.
Simple JS, after you figure out which toolchain to use and how to configure it for your development and deployment environments...
> Simple JS, after you figure out which toolchain to use and how to configure it for your development and deployment environments...
And god help you when any of your dependencies undergo a major update ;).
* https://github.com/tuvtran/project-based-learning#python
* https://github.com/karan/Projects-Solutions
* https://github.com/norvig/pytudes
* What do you automate with Python at home? - https://www.reddit.com/r/learnpython/comments/k5k1h0/what_do...
* Books: https://www.manning.com/books/tiny-python-projects, https://nostarch.com/impracticalpythonprojects, https://nostarch.com/real-world-python
https://github.com/kovidgoyal/kitty
Also, renpy is used for a number of games, including some commercial games, so modifiying an existing game would be another option. (As a side note, I wish someone would make a python point and click adventure equivalent of renpy since for being such basic games they very often have major technical issues).
Setup - use an online IDE Projects - learn by building
If she tries it I would love any feedback!
It's very thorough, written with care, and presented in a way that makes sense. Even as an intermediate Python programmer, I found use in this book.