Playful Python -- An alternative approach to teach programming

Playful Python -- An alternative approach to teach programming

If you go and take a look at any course that teaches programming -- be it in school, college or even corporate -- you'll see a typical progression on the topics covered. First you'll learn about variables and data types, then control structures, loops, functions and so on. This is what I call a linear progression teaching -- start with simple concepts and keep building more complex concepts on top of the previously learned concepts. This method of teaching is so common that we would not even think about doing it any other way.

But what if I told you that there is another way -- and it involves starting straight away with full, working programs? It was a surprise to me too, and I only understood it properly when I started looking a how kids learn.

As an example, lets look at how a child picks up language. Do we teach, these words are nouns, and these words are verbs and a sentence contains a noun and a verb? Certainly not! (Though when they learn a second language in school, this is exactly how it is taught) They simply keep listening to others talking and start identifying words and patterns. They then repeat what they hear. Over time they pick up the language, without any lessons on grammar or sentence structure.

Immersion

Humans are very good at recognising repeating patterns. I was talking about this to Dhaval Dalal the other day, and we were thinking about the conditions required to pick up concepts like this. We came up with one key item: Immersion.

The child picks up language because he or she is always in an environment where it is being used. There is exposure almost every minute of their life. At school, college or in a corporate training, you get to study a topic for anywhere between thirty minutes to a few hours. After that the next time you return to a topic might be the next day, or even much later. There is certainly no immersion the way a child receives from its environment.

Does it mean that such a method is not feasible in practice? I recently had an opportunity to test it out when I was coaching a team of manual testers. The team was transitioning to automated testing. To do automation testing, they had to learn Java, HTML, XPath, Selenium and Cucumber -- all from scratch since they didn't have any programming experience.

A traditional approach would have been to train them on Java, then HTML and so on, going step by step until they knew everything and were ready to write automation tests. Instead we started with writing full blown automation tests right from the get-go. Obviously they didn't understand the whole program at first, but by observing and repeating, they were able to pick up patterns. The patterns were small to start with -- this is the place I need to put in the URL, this is where I locate the element, this is how I perform an action on the element. They continuously wrote tests for a few months, observing and repeating and over time the patterns increased, until they were able to write much more complex tests by themselves across all the five technologies.

Playful Python

That's the philosophy with which I started my new YouTube channel Playful Python. The aim of the channel is to code many small python programs -- I'm aiming for about 60 -- which anyone can watch and type. By watching and typing often, you start seeing some patterns repeating, for which you can go online and look up what they mean. Over time you not only start understanding bits of python, but also how they can fit together to form different kinds of programs. I aim to keep each program relatively short and simple -- 10-15 mins and under 50 lines of code, though a few might be longer -- so that it's easily digestible by the viewer. So if you've been interested in learning some python, then check out Playful Python. Feedback welcome :)

Image credits: Photo by Alexis Brown

Badri Narayanan

Proprietary Investment Management. Founder, EquityLevers, online e learning finance lab.

7y

This is the difference between any type of formal education and actual practice that come from repeating patterns. Well articulated. Thanks

Like
Reply
Sanjay Phadke

Builder 0 –> ♾, Author (The Fintech Future - Digital DNA of Finance @Amazon), Explorer, Podcaster, Continuous Learner at Vayana Finance | Mind | AI | Consciousness

7y

Great share. From the little i know, this is equivalent to neural networks- the process by which humans learn. A lot of things, including drug discovery, is slowly starting to happen by this process of big data/ ANNs to complement traditional hypothesis testing models. Going from logical sample to a full universe, which is linear; vs. Looking at the universe as is, with its vastness, and detect patterns and learn, which is exponential.. does require huge computing power, either of modern computers or brain!

Like
Reply
Vinoth Kumar R

Senior Manager Products at ZF Group | Driving Innovation with Market Insights

7y

New approach and nicely articulated.

Tapan Kumar Behera

TOGAF® 9.2 Certified Architect | Researcher | Author | SMIEEE | 🥇EB1-A ‘Einstein’ Visa Recipient

7y

Nice observation and approach...will apply on my new learnings!!!

Like
Reply
Dinkar Gupta

Chief Information and Technology Officer (CIO/CTO) at KPMG Switzerland

7y

Excellent idea.. completely second your view. I have learnt many languages and design styles using this approach and give real thumbs up to this. Code reading with this will make this very powerful medium. I am in .. will have my kid learn python using Playful python.

To view or add a comment, sign in

More articles by Siddharta Govindaraj

Insights from the community

Others also viewed

Explore topics