Rounding Up To Python: The Best Way to Learn to Code

Learning how to code in any language including Python is easier when the student can use the skills to solve real problems in their lives.

Tom Sullivan
Código Ecuador
3 min readNov 16, 2019

--

Financial newspaper beneath white tablet computer. How-to articles on screen about maximizing visual task management tools.
Photo by Matthew Guay on Unsplash

Learning programming is less complicated and more practical when the student can use the skills to solve real problems in their daily lives. Students should apply the skills to actual repetitive tasks in their day-to-day that they find annoying versus a textbook problem which may or may not be relatable. Programmers will always have themselves as a client even if they do not immediately begin a career as a programmer.

When I first began learning to program, I applied the skills to my job with the Arab Studies Institute. Every month, I write a news report published on jadaliyya.com, called the On the Margins Roundup. The roundup is a current event summary of political, economic, and social changes in six countries in Africa.

Python allowed me to automate repetitive tasks

Many of the steps to create the roundup were repetitive, like building links, formatting, and copying the article’s title. Although putting the roundup together only required an hour of my time, I spent much of this time performing repetitive tasks versus writing article descriptions.

Serendipitously, I was attempting to learn Python at the time. As my very first python project, I decided to see if I could use this tool to automate the article search and document formatting process. The result is my Roundup Generator application which you can find on Github.

The problem that I sought to solve with the Roundup Generator was reducing the amount of time I spent switching between different windows. It was distracting, repetitive, and unproductive to spend so much time copying and pasting information from the internet. My goal in creating the Roundup Generator app was to improve my focus on the task at hand and enable me to be in the “now” when writing.

Map out the final product

As my first step when building the Roundup Generator, I analyzed and dissected the various components and format of the On the Margins Roundup. At that point, it became clear that there was only one thing on the roundup that I should have to type: the article description. I could automate the rest with Python code.

The generator scrapes articles from online sources and sends the title and date into a word document. Also, it formats the title into a link containing the source URL. The description is the only original piece of the On the Margins Roundup.

Here is an example entry from the roundup:

FFC agree to include peace preamble to Sudan’s interim constitutional declaration (14 July 2019) The Sudanese Forces for Freedom and Change (FFC) have agreed to terms with the Sudanese military regarding the preamble to the country’s constitution, which will mention the centrality of the country’s peace process.

Check out the final output from the Python generator

Before, I wasted much time creating the hyperlinked article title and manually typing the date. These were all mind-numbing, repetitive tasks at which machines excel and humans struggle. If I can automate all the repetitive parts of a task, I can spend the extra time improving the more complex parts of the activity.

The current version of the Roundup Generator played a crucial role in helping me gain a greater understanding of programming. This is the ideal approach to learning: take something that challenges you and try to figure out how to make it easier. Every application, after all, serves some preexisting need however large or small.

--

--