DEV Community

user01010011
user01010011

Posted on

FS Blog #1: A Beginner's Guide to Programming, Step 1: Command Lines

For my blogs for Flatiron School's Full Stack Web Development Program, I want to write about some of the things I have learned in the program. The goal of this blog and the follow blogs as a blog series is to track my learning progress through writing about the technical knowledge I am learning from the program, and projects that I am working on using the technical knowledge I have learned. Hopefully this will also help other beginner programers or people who are interested in learning more about programming and web development.

Learning programming, as with learning any new languages or skills, the best way to do it is to immerse yourself fully in the new world and get familiar with all of its environments and components. However, as a beginner with little previous background, diving into the world of programming can be overwhelming.

https://images.unsplash.com/photo-1502101872923-d48509bff386?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb

"千里之行,始于足下" - 老子。

“A journey of a thousand miles begins with a single step." - Laozi.

Thanks to the Chinese sage philosopher Laozi (a.k.a Lao Tzu), whose words have inspired and continue to inspire people all over the world still thousands years later. “A journey of a thousand miles begins with a single step." The meaning behind these simple words and seemingly obvious statement is extremely powerful. Yet to me, a more accurate and more powerful translation is: "A journey of a thousand Li (Chinese miles) starts beneath one's feet." They both convey the same message, but the emphasis of the latter is not on the step, but on the awareness: the path is already beneath your feet. You are already on your path. You just might not realize it.

People often think that they must "take" the first "step" toward their journey, without realizing that the path has already been and has always been beneath their feet. Don't get me wrong, the "take" and "step" are very important too, but to me, the awareness of the path already beneath your feet is the real game changer, and what generates momentum for you and send you off on your journey.

This is the case for me when I learned about Command Lines.

Command Lines

As author Neal Stephenson famously put it, “In the Beginning… Was the Command Line.”

What are Command Lines? Command Lines are texts-based (keyboard characters) or ASCII instructions you can send to your computer through its built-in Terminal, and get responses back from your computer. If you are using any modern computer, it already has a built-in Terminal and Command Line functions, whether you have a Mac, Windows, etc. (If you are using a Mac, when you open you desktop/iMac or laptop/Macbook, you can find your Terminal in your Applications folder, it is a black rounded square icon with a >_ on the left corner.)

Using Command Lines, you can ask your computer to list all of its folders and files, make new folders and files, delete folders and files, open and close apps, perform certain tasks... etc. How amazing is that?! You can already instruct a computer to do things without learning computer programming or software development - essentially, "program" a computer by writing "codes"!

When I learned about Command Lines, it felt as if though I have always had the ability to program my computer, but just didn't realize it. The path has always been beneath me. I know, I know - knowing how to use Command Lines is still far away from actual computer programming, software development, and making amazing software or apps, and the "path" beneath me was actually paved brick by brick by the hard work of those legends who walked before me, who built the computers, wrote the first algorithms, and programmed the source codes that made it possible to communicate with the modern computer via Command Lines, and sure, Command Lines have its own vocabulary that you still need to learn (it doesn't just take ANY text), but once I am aware that "programming" a computer has always been there and so easily accessible, it made learning programming that much more exciting for me.

An experienced programer (or anyone else) might not think Command Lines are a big deal, but for me, they were a huge deal. When I first used Command Lines with my computer, it gave me WarGame(1983) and Hal9000(2001:Space Odyssey) vibes. And for a moment, I kind of get the guy in Her(2013). (I quickly realized the limitations of Command Lines and computers in general ... but still excited for the possibilities within the limits though! And hopefully one day I can help to expand the limits.)

If you want to learn more about Command Lines, there is no shortage of content written about them - you can find a lot of posts, articles, books, and resources on the internet, but I wish there is a list of clear, concise, short, and sweet one-liners or phrases that explained what all of the most commonly used Command Line commands did without all of the details, examples, and backgrounds. I couldn't find a list that I liked (so many of them have ones that I don't use and don't see myself using in the future), so I put together my own short list below, as a start. This is only a working list. And again, there are many, many more Command Line commands our there, I've only listed the ones used most frequently by beginner programmers:

  • mkdir - make a new directory
  • touch (filename) - make a new file/folder inside a directory
  • cd . or cd ./ - go to current directory/folder ("cd" stands for change directory, and "." indicates current folder/directory)
  • cd .. or cd ../ - go to previous directory/go back a directory
  • pwd - path to working folder/directory
  • tab - autocomplete typing
  • ls - list the file(s) inside a folder/directory
  • ls - lah - list of everything in a folder/directory
  • mv - move file/folder
  • rm - deletes file/folder
  • Up Arrow - the last command

Boom. With these Command Lines, you can now have simple communications with your computer, and "program" it with simple "codes". You are welcome. :)

Remember, even if you don't know how to program, if you are reading this post, you are already well on your path to learning programming. :)

Thank you for reading.

S.

Top comments (0)