Month 0, Stumbling Start

Month 0, Stumbling Start

Writing code on the terminal, creating bash scripts for automation, welcome to the first month of the ALX program.

ยท

3 min read

๐Ÿ“…
Aug 29th โ€“ Sep 26th

The first month of the ALX SE program, termed Month 0 because programmers count from 0 not 1 (๐Ÿ˜). After a two-week onboarding period, we started out proper with the curriculum for Sprint 1 foundations.

TL;DR: Learnt my way around the Linux environment, wrote my first bash script, started using Vim for most of my coding. Started out with C too!

Overview for the month

Based on what was in the curriculum and calendar, I expected this month to be a bit soft (lol.) We started out getting familiar with working on the terminal; learning Linux commands, reading and setting file permissions, writing code on the terminal by using Vi or Emacs (Team Vi๐Ÿ™ˆ, only psychopaths use Emacs๐Ÿ’€.)

After a refresher on git, we started learning how to use a lot of shell commands. From playing with file permissions to doing some basic I/O redirection, I became better with navigating my way around the Ubuntu Linux distro. The highlight of this was me writing a bash script that automated style checking of a C code (with ALX code guidelines, codename "Betty") and compilation processes.

Ade automating some processes using a bash script

After a lot of shell commands and bash scripting, we were introduced to our first programming language in the program, C. The rest of the month fizzled out with me trying my best not to die while trying to understand how variables were just labels to a memory space and not containers like I previously thought, how pointers worked especially the relationship between pointers, arrays and strings in C, was confused on why I had to declare the type of each variable I create in a C source code (JavaScript wasn't like this๐Ÿ˜ช), learned the benefits of a strongly-typed programming language compared to a loosely-typed one.

Key Concepts Learnt

Shell Navigation and File Permissions

  • Navigating and operating a Linux environment on the terminal.

  • Checking file permissions, and changing it based on my needs.

  • Creating Bash scripts that can automate tasks on the shell.

  • Knowing how to read through man pages on the terminal to learn how unclear commands/system calls work and how to use them.

The C programming language (basics)

  • Wrote "Hello, world!" in C.

  • Variables in C, strongly-typed languages, if-else statements.

  • Functions, the main function in C, header files and function prototypes.

  • Loops. Lots of practice with both while and for loops in C. Situations where either a for loop or a while loop is preferred.

  • Pointers. Arrays. Strings and string manipulation in C.

Writing Acceptable Code and Documentation

  • Writing code that follows the ALX style guide, which is hugely inspired by the Linux Kernel coding style, and mandated on all source code written in our assessment tasks.

In hindsight, this wasn't actually an easy month. Learning C was quite tasking, and following the ALX style guide in all the C code I wrote was really frustrating when we started out.

Going through my code now makes me understand the importance of following the style guide, well-written code is easier to understand and collaborate on!

Summary

Month 0 was interesting and full of new technologies/tools to learn. Switching from VSCode on Windows to working mainly in Vi on the terminal was also difficult, but I'm glad I pulled through that. Looking forward to the challenges Month 1 will bring, and writing more code in C!

Thanks for reading through my trials and tribulations as a SE student๐Ÿซ , that's a wrap on Month 0๐ŸŽ‰๐ŸŽ‰.

ย