Preparing for Programming: A Common Platform Approach

Introduction:

In the second instalment of our programming series, we delve into the essential steps required before diving into the world of coding. Introducing programming to a diverse audience can be challenging, primarily due to the varying operating systems and versions individuals use. To ensure a consistent starting point for all our readers, we will recommend tools and methods that are widely accessible across different operating systems and versions, thus creating a common platform. In this article, we will focus on setting up the necessary tools and environment, including the popular programming language Python, a code editor, and Docker for containerization.


Choosing the Right Programming Language:

Python stands out as one of the most popular programming languages today, making it an excellent choice for beginners. However, it’s crucial to recognize that there are multiple releases of Python, each with its own features and compatibility requirements. Furthermore, the installation process and usage of Python can differ significantly between various operating systems. We’ll address these intricacies shortly.


Selecting a Code Editor:

While you can write code using any text editor, ensuring that readers see the same code as presented in our articles and images is essential for consistency. To achieve this, we recommend using Visual Studio Code (VS Code), a versatile and widely-used code editor. To make it even easier for our readers to replicate our setup, we’ll provide instructions on configuring VS Code to mirror our settings.


Setting Up Visual Studio Code:

  1. Download and install VS Code for your operating system from https://code.visualstudio.com/download.
  2. Launch VS Code.
  3. Use the shortcut Command-Shift-P (on Mac) or Ctrl-Shift-P (Windows or Linux) to open the command palette.
  4. In the search bar, start typing “Shell” until you see the command “Install Code Command in Path.” This command allows you to launch VS Code by typing ‘code’ in your command line or shell.

Configuring VS Code for Consistency:

  1. Download the provided file (see below) and remember its location.
  2. In VS Code, go to the File menu and select Share > Import Profile.
  3. Choose the downloaded file. This action will set up your VS Code with the same settings and extensions as our setup (once the extensions are fully installed).

 


Embracing Docker for Python:

In our pursuit of creating a common platform for all readers, we introduce Docker, a powerful tool for managing containers. Containers are lightweight, standalone environments that contain all the necessary tools and files to run specific applications. In our case, we’ll use Docker to facilitate Python development, ensuring compatibility across various operating systems.


Understanding Docker:

Docker is a container management tool that simplifies the process of creating, deploying, and running containers. Containers, in essence, are streamlined versions of Linux operating systems, containing only the essential components required to run an application, such as Python.


Setting Up Docker:

  1. Visit https://docs.docker.com/get-docker/ and download Docker Desktop for your operating system.
  2. Install Docker Desktop.
  3. Start Docker Desktop (this may take a moment).
  4. Test your Docker installation by running the command docker run hello-world in your command line or shell. You’ll see progress indicators as the “image” is downloaded. If successful, you’ll receive a confirmation message.


Conclusion:

Congratulations! With Visual Studio Code configured and Docker set up, we are now prepared to embark on our programming journey. In the next installment, we will dive into writing code and explore the fundamentals of programming, including sequence, selection, and repetition. Stay tuned for an exciting and educational coding adventure!
 
Please feel free to reach out to me on twitter if you need assistance with anything in this article!
Founder & Principal at Daptl | peter@daptl.com | Website | + posts

Nova Scotia-based software developer with a rich history in entrepreneurship and technology. In the year 2000, embarked on a collaborative journey to automate statistical data gathering for a hockey pool, which later evolved into a thriving business focused on curating sports statistics.

Through strategic contracting in various sectors, including telecommunications and insurance, contributed to the growth of the startup, eventually expanding it to a significant enterprise with over 100 employees and worldwide affiliates.

Now, in the phase of semi-retirement, founded 'Daptl' to explore new contracting opportunities, adding another chapter to an already impressive career.

Related posts