Embarking on a Coding Journey: Exploring the Enchanting World of Go Programming Language First Glance

Arista Indrajaya
4 min readJul 25, 2023

From Novice to Enthusiast: Embracing Go in the Coding Adventure

Photo by Chinmay B on Unsplash

Pursuing knowledge in programming languages often presents many opportunities, and the Go programming language is no exception. It is a language that has gained a reputation for its simplicity, efficiency, and versatility. By writing this article, I want to inform you and take a closer look at the Go programming language and explore its enchanting world.

At first glance, the Go programming language may seem intimidating to those unfamiliar with it (so do I). However, once you delve deeper into its intricacies, you’ll discover that the language offers a unique blend of simplicity and power. Go was developed by Google to address the issues of concurrency, performance and scalability developers face in modern software development. Its syntax is straightforward, making it easy to read and write, and it provides excellent support for concurrent programming.

package main

import "fmt"

func main(){
fmt.Println("Welcome to Go")
fmt.Printf("Go is the right choice isn't, dear %s, you just need to pay attention, and enjoyt it", "Readers")
}
Go Terminal results

In the past, developers were forced to make a tough choice between selecting a programming language that offered excellent performance or one that provided good scalability. This predicament often led to frustration and inefficiency during the development process. Nevertheless, the introduction of the Go programming language has eliminated this issue. Go offers both high performance and scalability, hence revolutionizing the programming industry. It’s unsurprising that Go remains a popular choice among developers who desire optimal results.

Background

In 2007, Google encountered difficulties in maintaining its extensive codebase while simultaneously emphasizing performance and scalability, all while utilizing C++. Developers were concerned about three primary factors, which were like a magical unicorn that didn’t exist at that time.

  • Fast compile times (how long does it take your code to reflect something that you have just done?)
  • Ease of development (on a daily basis how it is easy to use during development).
  • Fast execution (and fast execution of build times when you do finally wanna build and compile your code and test it and run it, how long is that feedback loop before you know what you wanna do differently)

And then Go programming language was created. The programming language Go boasts fast compilation and build times, making it a suitable alternative to C. It offers simplicity and efficient feedback on any changes made.

To further explain, the Go programming language boasts a lightweight type system that shares similarities with the well-known C language. Furthermore, it excels in handling concurrency and managing multi-threading and asynchronous behaviour through the use of go routines and sync packages. Additionally, memory allocation is of no concern to developers as automatic garbage collection is incorporated. The language enforces strict dependencies and follows conventions that are consistently upheld by the community.

Installation

Here are the installation steps for any version of Go programming language on macOS, Linux, and Windows:

Note: Replace X.X in the above instructions with the specific version number available on the Go website at the time of installation. Make sure to always use the latest stable version for security and performance improvements.

MacOS

  1. Download the macOS installer package from the official Go website.
  2. Open the downloaded package (it has a filename like go1.X.X.darwin-amd64.pkg).
  3. Follow the installation wizard instructions and complete the installation.

Linux

  1. Open a terminal window.
  2. Download the Linux tarball from the official Go website.
  3. Extract the downloaded tarball to the /usr/local directory (you may need root/sudo access):
    sudo tar -C /usr/local -xzf go1.X.X.linux-amd64.tar.gz
  4. Add the Go binary directory to the PATH environment variable. Add the following line to your shell profile (e.g., ~/.bashrc or ~/.zshrc):
    export PATH=$PATH:/usr/local/go/bin
  5. Save the file and reload the shell configuration:
    source ~/.bashrc # or source ~/.zshrc

Windows

  1. Download the Windows installer from the official Go website.
  2. Run the downloaded installer (it has a filename like go1.X.X.windows-amd64.msi).
  3. Follow the installation wizard instructions and complete the installation.

After installation

After installation, you can verify the Go installation by opening a terminal (or command prompt) and running the following command:

go version

It should display the installed Go version, confirming that Go is successfully installed on your system.

Conclusion

In conclusion, the Go programming language is more than just a language; it is an enchanting gateway to a world of endless possibilities. With its clean and pragmatic approach, Go has won the hearts of developers worldwide, and its future looks brighter than ever. As we continue to explore and harness the power of Go, we are certain to find ourselves at the forefront of innovative and exciting developments in the world of software engineering. So, embrace this journey, and let the enchantment of Go inspire you to create extraordinary things in the realm of coding. Happy coding!

--

--