Documentation 1. Principles and Practices 2. Project Management 2.1 Assignment 3. Computer-aided Design
'If you wish to move mountains tomorrow, you must start by lifting stones today.'
African Proverbs

Week 1 - Principles and Practices

If it is not documented then it was never executed.
Gotta Get Git!

Since Fab Academy is hosted on GitLab's platform, the knowledge about how to download, install and utilise the package is very important.

So what is Git?

Git is a Distributed Version Control Systems (DVCSs), that is used to mirror a repository. Git thinks and stores data as a series of snapshots of a miniature filesystem. Which means everytime you run a 'commit' command, Git takes a present snapshot of your files and saves a reference of that snapshot. Other benefits of Git are listed below:

  • 1. Most operations in Git are done with local files and resources
  • 2. Another critical benefit is the ability to collaborate and work with others irrespective of the geographical location
  • 3. You can work offline, only commit modified files when you get to a network connection, and enjoy a 'happily ever after'
  • 4. Git has integrity. This is because Everything in Git is checksummed before storage, and referenced by the checksum after storage
  • 5. Git mainly adds data. Most actions performed on Git only adds data to the Git database.
  • The Three States

    Git functions based on three main states on which your files can reside in. These are: modified, staged, and committed.

  • Modified means that you have changed a file but yet to commit it on your database.
  • Staged means that you have scheduled the modified files into your next commit snapshot.
  • Commited means that the data has been locally stored in your database.
  • Download and Installation

    To install the needed software for linux Click here

    To install the needed software for macOS Click here

    To install the needed software for windows Click here

    VORSICHT!

    As recommended by Neil Gershenfeld and other Fab Gurus such as Daniele Ingrassia, 'since Rome was not built in a day, so also is a genius not born in a day'. Hence, it is advisable to use the command prompt instead of the GUI option. Sorry but there is no Abracadabra to this! You just gotta bash Git Bash however you choose to do that (hopefully, not with a hammer)! To use the command prompt, just click on the Git bash on your desktop (this should have been installed with the software downloaded using any of the links provided above), then you are good to go.

    Experience they say is the best teacher. From my experience fiddling with Git bash, it is relatively easy as long as you make this tutorial your first call before jumping into the program. At least that worked for me. If it does not work for you, then do not hesitate to suck the life out of your Fab Instructor (*winks). In my case, Daniele Ingrassia was not spared from my endless silly questions.

    Enough with the gists. So after installation, the first thing you should do is to set your identity, that is, your user name and email address. To do this, enter the following command:

    git config --global user.name "John Doe"
    git config --global user.email johndoe@example.com

    Once you are through with this, then you need to generate your SSH key, to generate the SSH key, use the following command:

    ssh-keygen -t rsa -C "email"
    Do not forget to replace the "email" with your email address. After this, please type in the command below to display the SSH key.

    cat ~/.ssh/id_rsa.pub
    Learn from my Mistakes

    It might be helpful to some to learn about some silly mistakes I made while generating the SSH key. During the generation process, I got a prompt 'Enter file in which to save the key:' so I entered a file name. However, I was unable to display the generated SSH key. It was showing an error message 'No such file or directory'. So what I did was to rerun the command to generate the key, then press 'ENTER' at the remaining three prompts, then voila!

    Once you have successfully displayed the key, go to settings on your Gitlab account (sent to you from Fab Academy), then on the left hand navigation bar, you will find the ssh section. Click it, then copy the displayed key from Git Bash in the space depicted in the picture below.

    GreenLab Logo

    So you can now run your first real command, and that is to clone your files from your GitLab account to your local database. To do this, enter the commang below:

    git clone /path/to/repository
    I advise you copy and paste the link from your GitLab account. Check the picture below to know where to copy from.

    Now you are well on your way to becoming a FabLab Guru!

    Here are some basic commands that you need to know to git going

    mkdir 'Name'
    to create directory

    touch 'Name'
    to create file

    cd 'Name'
    to go to the named folder

    cd ..
    to exit the present folder

    pwd
    to know the present folder you are in

    git status
    this should be your best friend to know the present state of the modifications you have made. It shows the staged file(s) and untracked file(s).

    git add 'Name'
    transfers the untracked file from the working directory to the Staged section

    git commit 'Name'
    saves the staged files on your local database.

    For more tutorial, Click here. You are now ready to take over the world!

    Resizing Pictures - the Gangnam Style

    'If you want to get something done faster give it to a lazy man'

    Just as highlighted in the saying above, well, I happen to know a little trick about resizing pictures (the lazy man's way). Not that I am a big chatter, but I noticed WhatsApp messaging app has a good tool for resizing pictures. So my lazy man's trick is to send the picture to someone, and humbly ask the person to send it back to me. This dramatically reduces the large chump of the picture size to a few kilobytes. I wish this could be used for weightloss program. It would really help lots of fellow lazy citizens get their 'New Year resolution' ticked in seconds. However, that is not the case, and I am also sad to inform you that I have not yet found a lazy man's trick for weightloss. Maybe registering for Fab Academy could do the trick! Please do not get me wrong, Fab Academy is not for the faint hearted. What I am trying to say is that I expect to shed some unnecessary weights through the rigorous nature of Fab Academy, work, and a lovely family to take care of.