Home/Blog/Learn to Code/The best way to learn Python coding
Home/Blog/Learn to Code/The best way to learn Python coding

The best way to learn Python coding

Junaid Akhtar
Mar 12, 2024
10 min read

Become a Software Engineer in Months, Not Years

From your first line of code, to your first day on the job — Educative has you covered. Join 2M+ developers learning in-demand programming skills.

With so many programming languages in the world and millions of people trying to learn the art of programming, can anything give you an edge over others? This blog can. Let’s talk about where to start and the best way to learn to code in Python.

Why Python?#

The Importance Of Being Earnest, or TIOBE, specializes in assessing and tracking the quality of software in general, but they also rank and index programming languages according to their popularity. They do this every month. In February 2024, Python came out on the very top once again. There are other credible sources of rankings as well, with similar results.

PYPL Popularity of Programming Language Index

Rank

Language

Share

1

Python

28.11%

2

Java

15.52%

3

JavaScript

8.57%

In 2023, DevJobsScanner scraped 14 million software development job posts for 17 months and made public the results for the most in-demand jobs in the world. With almost 20% of jobs requiring proficiency in it, Python came out as the second most sought-after language in the software industry.

It’s no surprise that Python is so popular in the industry, but if you’re just about to learn how to code for the first time, there’s another reason why you should start with Python. Let’s compare what three programs in Java, C++, and Python do when you press the “Run” button. First, a program in Java:

class HelloWorld {
public static void main( String args[] ) {
System.out.println( "Hello World" );
}
}

Let’s try the same thing but in C++:

#include <iostream>
using namespace std;
int main() {
cout << "Hello World";
return 0;
}

When running the two programs above, you might have noticed that the code looks pretty lengthy and complicated for a program achieving such a trivial outcome—printing simple text on the screen. Doesn’t that seem bizarre? Now, take a look at how Python makes the life of a beginner, one who wants to learn how to code, easier in contrast:

print("Hello World")

A 17-year-old coder lands a job at a top AI startup#

Some news from the industry that made the rounds last year was when the founder and CTO of Pair AI, Jason Goodison, hired a 17-year-old kid from India, skipping over 300 other software engineer contenders from the top software companies. Turns out that what caught the CTO’s attention was the fact that the 17-year-old Shashv had created and published a very useful app named Verba in his spare time that solved a cool problem for himself and others.

The problem Shashv solved is not what we want to highlight here, but rather what made his profile stand out from the crowd of software coders wanting to find their place in the world. Perhaps the world is looking for problem-solvers and builders, not just a set of standard credentials.

Getting an edge when you learn how to code#

“Building a real application that solves a real problem and printing hello world are just two completely different things.” –Jason Goodison“Learn to code with an unfair advantage.” Accessed March 12, 2024. https://youtu.be/SXjIYRih13I

The founder, Jason Goodison, is one individual who thinks building useful projects is an important way to get an edge when learning to code. Jason is looking for individuals like Sashv who have learned to code and actually have something useful to showcase to recruiters instead of just showing the world a static CV or a portfolio of varied skills.

But is this just one individual case out of millions where this strategy paid off, or is there something more general going on here? This blog unfolds the answer to this question. Perhaps you can learn to code like Sashv, in no time.

First principles of teaching and learning#

Philosophically, first principles refer to the fundamental concepts or basic truths from which all other knowledge can be derived or built upon. These principles are considered self-evident and do not rely in turn on any further element. First principles serve as the foundation of reasoning and understanding in various fields, including philosophy, science, and mathematics. Examples of first principles include principles of logic, axioms in mathematics, and fundamental laws of nature in physics.

Similarly, when it comes to teaching and the art of instructing, David Merill theorized that all pedagogical approaches are based on the following five first principles:

Five First Principles

Principle

Description

Problem-centered approach

Merrill uses the term “problem” to denote a wide range of activities, with the most critical characteristic being that the activity is a whole task rather than only components of a task and that the task is representative of those the learner will encounter in the world.

Activation

Learning is promoted when learners activate existing knowledge and skills as a foundation for new skills. This principle is rooted in a key tenet of instruction—to start where the learner is.

Demonstration

The effectiveness of a course is enhanced, first, when learners are shown examples of both poor and good practices, and second, when the demonstration is consistent with the type of knowledge or skill being taught.

Application

Applying new knowledge or skills to real-world tasks is a necessary condition for effective learning.

Integration

The effectiveness of a course is enhanced when learners are provided with opportunities to reflect on what they have learned in order to revise, synthesize, recombine, and modify their new knowledge or skills.

Holistically, what Merrill’s design-oriented principles ensure is that a great course is very aware of who the learner is and where they conceptually stand at the beginning of the course (as opposed to a course designed without a specific learner in mind). A great course aims to develop a mental modelA mental model refers to a learner's internal representation or understanding of how something works or how concepts relate to each other. It is a cognitive structure that individuals use to interpret and make sense of information, experiences, and the world around them. (how stuff works) of the concepts from the first lesson to the last. It starts out with a very basic model and keeps evolving it along the way (as opposed to a course that keeps throwing topic after topic at the learner without giving any thought to where these new topics will stick in the learner’s mind). The course grounds each new concept in a real-world problem-solving scenario; the learner understands the problem, and the concepts being learned come in as a solution to that problem (as opposed to learning one concept after another for the sake of learning that concept, without any regard to where and why the concept will ever be used).

While solving real-world problems, the course does not only introduce correct ways of doing things. It’s equally important to demonstrate the making of ideas and even to demonstrate ways that eventually don’t help solve the problems (as opposed to a course that only ever introduces the final and finished correct forms that can only be memorized by the learner). Finally, the course should both create both timely opportunities for reflection as well as feedback for the learner (as opposed to a course that just keeps passively teaching without taking a breath, and the learner only ever gets to know at the very end where they stand conceptually).

First principles and edtech#

A lot of learning takes place online now, but the relationship between education and technology is not new, as demonstrated by this timeline“A history of teaching machines.” Accessed March 12, 2024. https://teachingmachin.es/timeline.html. In 2012, the world was introduced to Massive Open Online Courses (MOOCs), and now, edtech is a viable alternative to traditional education. Unfortunately, the verdict is that most of the edtech space has been focused more on creating technology-based experiences for learners and less on the education side of the learning experience. Margaryan et al.Anoush Margaryan, Manuela Bianco, Allison Littlejohn, Instructional quality of Massive Open Online Courses (MOOCs), Computers & Education, Volume 80, 2015, Pages 77-83, compared MOOCs to see how they fared against the first principles of teaching and learning. Here’s what they concluded:

“We found that the majority of MOOCs scored poorly on most instructional design principles. However, most MOOCs scored highly on organization and presentation of course material. The results indicate that although most MOOCs are well-packaged, their instructional design quality is low.”

While this was a general study on all types of courses, Kim et. al. published a study at a top computing education conference on “A Pedagogical Analysis of Online Coding Tutorials.”Ada S. Kim and Amy J. Ko. A Pedagogical Analysis of Online Coding Tutorials. In Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education (SIGCSE '17). Association for Computing Machinery, New York, NY, USA, 321–326.

“We found that tutorials largely taught similar content, organized content bottom-up, and provided goal-directed practices with immediate feedback. However, few were tailored to learners’ prior coding knowledge and only a few informed learners how to transfer and apply learned knowledge.”

Making great educational experiences is already challenging in an edtech/online space, it seems, but the challenge becomes manifold when engaging novices in the world of coding.

From the literatureOhud Abdullah Alasmari, Jeremy Singer, and Mireilla Bikanga Ada. 2024. Do Current Online Coding Tutorial Systems Address Novice Programmer Difficulties? In Proceedings of the 15th International Conference on Education Technology and Computers (ICETC '23). Association for Computing Machinery, New York, NY, USA, 242–248. https://doi.org/10.1145/3629296.3629333, it does seem that the first principles are universal—it doesn’t matter if the course is created for a physical classroom or in an edtech online space.

The typical tech-only way of learning how to code#

The typical course you’ll see on the internet is frequently an ineffective learning experience for a beginner who wants to learn how to code. It adopts, just as the research above indicates, a bottom-up approach, where it almost always starts with the concept of variables, then data types, operators, conditional statements, functions, lists, loops, input, other data structures, and so on.

A sign of the course being ineffective is all these concepts being taught in total isolation from each other, so in a learner’s mind, no mental model or concept map ever gets constructed along the way. The ultimate effect of this is that the learner can’t apply what they’ve learned independently to any real-world problem. This shortcoming then hurts them when they underperform in job interviews.

The edtech way to learn how to code#

In contrast to a conventional bottom-up course, a learn-to-code experience that adheres to the first principles of teaching and learning will start out by outlining for its learners the clear-cut requirements for building a useful software product, and learners will be taught each new concept of Python within the context of building that software.

The project that will be built in the course is exposed to the learner in the first lesson

This way, every new concept will find meaningful ground in the learner’s mind and in the larger concept map. Each lesson establishes the power of the new concept being taught because it solves one requirement of the project—but each lesson also makes the learner discover the concept’s limitation, creating anticipation for the next concept. This pedagogical approach ensures that the concept map keeps growing and evolving in the learner’s mind.

At Educative, we’ve adopted precisely this approach. We’ve created a course so more Shashvs of the world can build profiles that find visibility with more Jasons of the world. Explore the following course to find out for yourself. Happy project-based learning!

#

Learn Python From Scratch

Cover
Learn Python 3 from Scratch

This course focuses exclusively on teaching Python to beginners and demystifies procedural programming, grounding every new concept in the hands-on project they gradually build with the course. You will begin by understanding built-in functions for input and output, and then move on to user-defined functions. Moreover, you will learn the basic data types and their application. Next, you will learn about the various structures of programs you can write: sequential, selective, and iterative; eventually, you will apply everything you’ve learned to complete an interesting project. More than anything else, this course aims to make you a lifelong learner, and intends to act as a great start to your wonderful career in the world of computing.

6hrs
Beginner
62 Playgrounds
5 Quizzes


  

Free Resources