Learn C Programming - Setting Up a Programming Environment
In our first section of Learning C Programming, we’re going to setup a programming environment. First, we’ll need to setup our text editor and terminal. This will all depend on your preferences, but I prefer working in Visual Studio Code (VSCode). If you are just starting out, I would recommend something with little to no features just so it is as straight forward as possible.
You’ll be spending a lot of time in your text editor, so let’s set it up right!
Choosing your text editor
You’ll want to choose a light weight text editor that will grow with you along your journey. While you can use Notepad or Notes (built in with most operating systems), they do not have great features for programming and may make it more difficult to get started. The following links are text editors we would recommend you try:
These are great options to get you started on the right track! We don’t get any kickbacks for recommending these programs either. You are more than welcome to use an IDE like CodeBlocks, but I personally do not like it and will not use a full IDE in the program.
Installation
The download files will usually come with a guided wizard. If the download is in a zipped file, extract the contents and open the file.
- If you are using Windows, follow the wizard prompted when you open the .exe file.
- If you are using Mac, you can open the program and drag the icon into your Applications folder.
- If you are using Linux, you can use the command line to install and launch the program. Run man [name_of_program] for more details about how to run your specific program.
This process should be straightforward, however, feel free leave a comment with any questions you may have regarding this step.
Customization
It is crucial to customize your text editor and terminal! Spend some time reading the editor documentation to adjust the following elements:
- Color scheme
- Font size
- Font style
- Line spacing
While you may not need to adjust these items, these components will typically make or break you experience with the text editor. Additionally, you may find that you need to modify other components that are not listed. The main goal of this step is to make the editor as pleasant to work with before we begin programming. These settings can always be changed later down the road.
Part 2: Using the Terminal
The terminal is where we will manage our files and run programs. Terminals are built in to the operating system and can be used for a plethora of tasks outside of programming!
Finding your terminal
Each operating system has a different terminal by default.
- Windows: CMD or Powershell (Powershell is recommended)
-
- Mac: ZSH or BASH (either will do just fine)
- Linux: BASH most likely
On Windows, hit the Windows icon and type Powershell to find the Powershell application. For easier access, you may wish to create a Shortcut for this application by right-clicking and clicking the Create Shortcut or Pin to taskbar option.
On Mac, click the search icon in the top right section of your display and type terminal. You can drag the terminal onto your hotbar for easier access. Searching for the terminal in Linux should be similar, however, you may need to save a shortcut to the terminal by right-clicking and creating a shortcut to your desktop or taskbar.
Customizing your terminal
This process is very similar to customizing your text editor. Search for the documentation that corresponds to your particular terminal and make the necessary customizations to ensure your terminal is to your liking.
Founder and CEO of R U Coding Me LLC. Jacob obtained his Bachelor’s of Computer Science at the University of Central Florida. He likes to go to the gym and teach people about technology.