Tip:
Highlight text to annotate it
X
Hello! And welcome to the online course for the Austomate the Boring Stuff with
Python book. I'm Al Sweigart. I'm a software developer and textbook author.
Automate the Boring Stuff with Python is my fourth programming book and now
I've made an online course that follows the book's content.
"Learn to code" has become a huge mantra. You have sites like Codecademy and Khan
Academy and a massive online open courses to teach people the program. You hear
things like, "coding is the new literacy" or how everyone in the 21st century will
have to learn to code.
And if you want to become a software developer this course can be your first
few steps on that path.
But what if you don't want to change careers to software engineering. You're
still getting these learn to code recommendations from everyone, mostly
from people with a book to sell.
(By the way Automate the Boring Stuff with Python is released under a Creative
Commons license, so you can buy a print or ebook or you can read it online for
free at automatetheboringstuff.com.
Is there a reason the average office worker student or administrator should
learn to code? Yes. Whether you have to send emails, visit websites, or going
through a ton of spreadsheets and PDFs, these jobs use laptops and desktop PCs
as their primary tool. And sometimes using a computer means spending hours
doing tasks that require a bunch of mindless clicking and typing.
If you don't have an intern to shuffle this work off to, you should learn to code so
that you could program to computer to do these task for you. Or if you're the
intern, you should learn to code so that you can program the computer to do these
task for you. So how is this course is different from all the other online
programming courses? Well, I wrote Automate the Boring Stuff with Python
for people who wanted to get up to speed making small programs that do practical
tasks as soon as possible.
You don't need to know sorting algorithms or object oriented
programming paradigms, so this course skips all of the computer science and
concentrate on writing code that get stuff done.
But if you are a computer science student for budding software engineer,
this course will be a good first step to develop your toolkit of programming
skills. This course uses the Python programming language. Python is the best
first language to learn. Many universities are switching their
computer science curriculum away from Java and to Python. It has a simple
syntax and a gentle learning curve, but it's still a powerful language used in
the real world.
Google, NASA, Yahoo, YouTube and even non-technology companies like JPMorgan Chase
or Industrial Light and Magic, all used Python. So learning to code can increase
your productivity but it's also a fun, creative skill and unlike other creative
skills or hobbies, if you have a computer there's nothing else to buy in
order to write code. You don't have to buy paint or yarn or power tools. All you
need is some free software called the Python interpreter.
Sound good? Let's get started. Right now.
Open a web browser and go to python.org. You'll need to download and install
Python for your operating system. This is slightly different on Windows, Mac, and
Linux, so consult the course notes for specific instructions. The one thing you
need to know is that you should download a version 3 Python, like Python 3.5 and not a
version 2 Python, like Python 2.7. When we say "Python" we usually mean either the Python
interpreter software that you've just downloaded installed or the Python
language. Python (the software) comes with an editor program that you type your
Python (the language) code into. The editor is called IDLE. Consult the
course notes for how to start up IDLE on your operating system. Beginning in the
next lesson we'll start writing code using it. I highly recommend that you
have IDLE open and follow along with the videos by typing the examples into it.
Don't just sit and watch the videos. It's easy to passively watch the videos and
think you understand the concepts. Typing the code build your muscle memory and
forces you to see if you can get the code working. One last thing that you
should know from the start:
Half of the software engineers day is spent googling for information. Programming can be
complicated and no one can keep all this information in their head. So don't feel
bad about constantly looking stuff up on the internet. That's exactly what
professional software developers do every day. So if you get an error message
and you have no idea what it's talking about, a good starting point is copying
and pasting this message into a search engine.
The first 3 results will probably be to a website called Stack Overflow, which is a great
question and answer site. So before asking people for an answer,
try to find the answer yourself on the web. One, this will almost always be
faster because, two, other people have probably had your question and already
had answered.
But when you do ask questions, provide as much detail as possible
Here's a few things to keep in mind. Explain what you're trying to do, not
just what you did. Your helper can then tell you if you're on the wrong track.
If you get an error message, specify the point at which the error happens. What
line number does it happen on? Does the error happen every time or does it just
happen randomly sometimes?
Copy and paste the entire error message and your code to a pastebin site, like
pastebin.com or gist.github.com. These websites will give you a link
to your text which makes it easy to share with other people.
Explain what you've already tried to do to solve your problem.
This trims down the list of possible causes and tells people that you've already put
some work into figuring things out on your own. List the version of Python
you're using. Also, say if you're running Windows, Mac, or Linux and what version
you're running, like Windows 7 or Mavericks 10.9.2.
Asking effective questions and knowing how to find answers are invaluable tools
on your program journey. Let's begin!