Resources for Learning to Program
Samuel D. Conte Professor of Computer Science, Purdue University
Before Real Programming
- CodeMonkey: Coding for Kids
- This teaches block coding. My younger son was addicted to this for about two weeks when he was around 9. This teaches some concepts of programming such as conditional branching and looping, and possibly helepd somewhat when he started real programming. However, it is only for short-term usage and totally optional. This is not free.
- Coursera's Code Yourself! An Introduction to Programming
- This teaches Scratch. Younger son did this when he was a little over 10, and enjoyed it. This is not free.
Learning the Python Language
- Coursera's An Introduction to Interactive Programming in Python (Part 1)
- Coursera's An Introduction to Interactive Programming in Python (Part 2)
- This teaches Pythond 2, but the differences from Python 3 is minor. It is not free. One can pay for each course or pay for monthly access to Coursera Plus.
- Both boys did this around age 10 and half. Needed help from me. Younger son really enjoyed it. I think this is the best resource for learning Python language for kids.
- Because Python is so widely used, I think it is a good idea to start with Python.
After programming with Python for some time, one can transition to Java, which is used for AP Computer Science A and many college-level courses. ( If one wants to continue doing competitive programming, one should then learn C++. To do serious competitive programming, one should expect to program intensively for a few years. There is enough time to practice familiarity with multiple languages. I know of a student who got into USACO Platinum in high school and was really good at competitive proigramming, but failed to test out Purdue's introductory programming course (using Java), because he was using only C++ in USACO.
Learning to Program
After learning the basics of a language, the next step is to write many small programs. The following are some resources.
- DMOJ has a collection of problems that are suitable for learning to program. One can search problems by category and point range. The easiest problems are 3 points, next up are 5 points, and the hardest ones are 50 points. If one finds 3-point problem to be very easy, one can move on to 5-point problems. Problems 7 points and above generally require some data structure knowledge and not suitable for beginners. Canadian Computing Competition (CCC) and Croatian Open Competition in Informatics (COCI) have good problems. Following are some lists for conveniences.
- Learning to Code on the Cloud
- This was created by me for middle and high school students for a two-week summer camp to teach kids Python. There are slides, lecture videos, and problems on the page. Problems are from codeforces, and may be a bit challenging for independent learning. There were 4 topics planned, but it turned out we only had time for the first three topics.
- The same material but arranged into separate days are available
- Yet Another Coding Class
- I collected this list of problems for a coding class teaching C++ for USACO Bronze. One can solve the problems using Python, or any other languages. DMOJ problems are easier than USACO ones. Example problems from USACO are the hardest; don't start with them if you are studying yourselves.
If one can solve most of the problems in the above independently, one has learned how to program.
- Coursera's Computer Science: Programming with a Purpose
- This is Princeton's introductory programming course, and I believe it is completely free.
- I have not used this before, but plan to use it when my younger son transitions from Python to Java.
Learning Basic Data Structures
- CS190-CP0 (Introduction to Programming)
- I created this to teach introduction to programming using the C++ language in Summer 2020. In hindsight, it was too hard to beginners. However, it should work fine for learning the C++ language once one already knows programming. The webpage has slides, videos for most lectures, and problems. It uses Hackerrank.