Forum

Spread the love

Learning Python effectively and with ease  

 
Mike Nifemi
(@sepiamediaconcept)
Member Admin

Python might look foreign at the early stage of learning but it can also be a fun and rewarding language to learn if you find the right motivation.
So before you start your lessons at all, find your motivation then you can pick an area you’re interested in, such as:
•Data science / Machine learning
•Mobile apps
•Websites
•Games
•Hardware / Sensors / Robots
•Scripts to automate your work

Learn the Basic Syntax
Unfortunately, this step can’t be skipped. You have to learn the very basics of Python syntax before you dive deeper into your chosen area. You want to spend the minimum amount of time on this, as it isn’t very motivating. I personally made it about 30% into the Codecademy Python tutorials, which was enough.
Here are some good resources to help you learn the basics:
•Codeacademy does a good job of teaching basic syntax, and builds on itself well.
•Learn Python the Hard Way : It's a book that teaches Python concepts from the basics to more in-depth programs.
•Dataquest – Python Programming: Beginner Course. Dataquest teaches Python syntax in the context of learning data science. For example, you’ll learn about for loops while analyzing weather data.
•The Python Tutorial: This the tutorial on the main Python site.

Spend your basic time on these.

Once you’ve learned the basic syntax, it’s possible to start making projects on your own. Projects are a great way to learn, because they let you apply your knowledge. Unless you apply your knowledge, it will be hard to retain it. Projects will push your capabilities, help you learn new things, and help you build a portfolio to show to potential employers.
However, very freeform projects at this point will be painful. You can get stuck a lot, and need to refer to documentation. Because of this, it’s usually better to make more structured projects until you feel comfortable enough to make projects completely on your own. Many learning resources offer structured projects, and these projects let you build interesting things in the areas you care about while still preventing you from getting stuck.

Let’s look at some good resources for structured projects in each area:
Data science / Machine learning
•Dataquest — Teaches you Python and data science interactively. You analyze a series of interesting datasets ranging from CIA documents to NBA player stats. You eventually build complex algorithms, including neural networks and decision trees.
•Python for Data Analysis — written by the author of a major Python data analysis library, it’s a good introduction to analyzing data in Python.
•Scikit-learn documentation — Scikit-learn is the main Python machine learning library. It has some great documentation and tutorials.
•CS109 — this is a Harvard class that teaches Python for data science. They have some of their projects and other materials online.

Mobile Apps
•Kivy guide — Kivy is a tool that lets you make mobile apps with Python. They have a guide on how to get started.

Websites
•Flask tutorial — Flask is a popular web framework for Python. This is the introductory tutorial.
•Bottle tutorial — Bottle is another web framework for Python. This is how to get started with it.
•How To Tango With Django — A guide to using Django, a complex Python web framework.

Games
•Codecademy — walks you through making a couple of simple games.
•Pygame tutorials — Pygame is a popular Python library for making games, and this is a list of tutorials for it.
•Making games with Pygame — A book that teaches you how to make games in Python.
•Invent your own computer games with Python — a book that walks you through how to make several games using Python.

An example of a game you can make with Pygame. This is Barbie Seahorse Adventures 1.0, by Phil Hassey.

Hardware / Sensors / Robots
•Using Python with Arduino — learn how to use Python to control sensors connected to an Arduino.
•Learning Python with Raspberry Pi — build hardware projects using Python and a Raspberry Pi.
•Learning Robotics using Python — learn how to build robots using Python.
•Raspberry Pi Cookbook — learn how to build robots using the Raspberry Pi and Python.

Scripts to Automate Your Work
•Automate the boring stuff with Python — learn how to automate day-to-day tasks using Python.

Once you’ve done a few structured projects in your own area, you should be able to move into working on your own projects. But, before you do, it’s important to spend some time learning how to solve problems.

You will also need to consult resources and learning concepts, but you’ll be working on what you want to work on.

Before you dive into working on your own projects, you should feel comfortable debugging errors and problems with your programs. Here are some resources you should be familiar with:
•StackOverflow: a community question and answer site where people discuss programming issues. You can find Python-specific questions here.
• Google: the most commonly used tool of every experienced programmer. Very useful when trying to resolve errors. Here’s an example.
•Python documentation: a good place to find reference material on Python.

Once you have a solid handle on debugging issues, you can start working on your own projects.

If you really can’t think of any good project ideas, here are some in each area that has been discussed:

Data Science / Machine Learning
•A map that visualizes election polling by state.
•An algorithm that predicts the weather where you live.
•A tool that predicts the stock market.
•An algorithm that automatically summarizes news articles.

Mobile Apps
•An app to track how far you walk every day.
•An app that sends you weather notifications.
•A realtime location-based chat.

Websites
•A site that helps you plan your weekly meals.
•A site that allows users to review video games.
•A notetaking platform.

Games
•A location-based mobile game, where you capture territory.
•A game where you program to solve puzzles.

Hardware / Sensors / Robots
•Sensors that monitor your home temperature and let you monitor your house remotely.
•A smarter alarm clock.
•A self-driving robot that detects obstacles.

Scripts to automate your work
•A script to automate data entry.
•A tool to scrape data from the web.

The key is to pick something and do it. If you get too hung up on picking the perfect project, there’s a risk that you’ll never make one.

Keep increasing the difficulty and scope of your projects. If you’re completely comfortable with what you’re building, it means it’s time to try something harder.

Here are some ideas for when that time comes:
•Try teaching a novice how to build a project you made.
•Can you scale up your tool? Can it work with more data, or can it handle more traffic?
•Can you make your program run faster?
•Can you make your tool useful for more people?
•How would you commercialize what you’ve made?

Note that Python is evolving all the time and a few people who can legitimately claim to completely understand the language, and they created it.

You’ll need to be constantly learning and working on projects. If you do this right, you’ll find yourself looking back on your code from 6 months ago and thinking about how terrible it is. If you get to this point, you’re on the right track. Working only on things that interest you means that you’ll never get burned out or bored.

Quote
Posted : 29/07/2019 4:08 pm
Share:

Please Login or Register