Skip to content

Week 1: Principles and Practice / Project Management

Tasks For This Week

  • Work through a git tutorial.
  • Build a personal website describing you and your final project.
  • Sketch a final project idea
  • Complete the student agreement

GitLab Tutorial

GitLab is used for Fab Academy to store and share students' work. Before this I knew about GitHub and had accessed it, but had never uploaded anything. I found GitLab similar to navigate and once I got the hang of pushing my files it was easy to use.

GitLab allows you to see commits overtime of your work for Fab Academy, giving you version control, which is useful if you need to go back in time and see what you did. When you are collaborating you can also branch off and make another version, which in the future you can merge back into the original if you want to.

GitLab also enables the public sharing of the personal website, which I think is great as I like that a key part of Fab Academy is you share what you have made and learnt so others can do the same and build on your work.

Step 1 Install Git for Windows

  • Go to https://gitforwindows.org/ to get Git Bash
  • As part of setup I needed to choose a default editor, you can choose from many including Vim which is the the default for Windows when you are running the installation.
  • I have used Vim in the past, but saw that there is an option for using Visual Studio Code, which is my preferred code editor. So I decided to set my default as Visual Studio Code.
  • I left the rest of the settings in the installation to what they were set to as default.

Git Bash

Step 2 Setup Credentials

Open Git Bash at C:/users/"your name"

Set you credentials

git config --global user.name "your_username"  
git config --global user.email "your_email_address@example.com"  

Check credentials have been set

git config --global --list  
Sources: https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html
http://fabacademy.org/2019/docs/FabAcademy-Tutorials/week01_principles_practices_project_management/git_simple.html

Step 3 Generate SSH Key to Connect to Git Lab

In Git Bash enter the following to generate your Key

ssh-keygen -t rsa -C "$your_email"   
A .ssh folder will be created and a key file called id_rsa.pub will be generated

See your key

cat ~/.ssh/id_rsa.pub

Copy your Key

clip < ~/.ssh/id_rsa.pub  

Open Git Lab and go to User Settings > SSH Keys
Under Add an SSH Key, paste the key you have copied into the Key textbox and give it a Title and set an Expiration Date
SSH

Source: http://fabacademy.org/2019/docs/FabAcademy-Tutorials/week01_principles_practices_project_management/git_simple.html

Step 4 Clone Repository

In Git Bash type

git clone "name of repository"  
Git Bash will create a folder for your Clone of your Repository
Go to your file folders to see the Cloned Repository

Open Git Bash in your Repository
You can now use the following commands to update, add and commit changes to your Git Repository

git pull  
Update to the latest

git status   
Check current status of the local vs online files

git commit -m "change description"  
Commit changes to repository

git push   
Upload to repository

Source: http://fabacademy.org/2019/docs/FabAcademy-Tutorials/week01_principles_practices_project_management/git_simple.html

Create a Website

Step 1 Create a Website using MkDocs

In the past I have used website builders such as Sqaurespace, Wordpress and Dreamweaver. It was suggested by the team at Kamakura that I try out making a website using MkDocs and Markdown language.

I have not used MkDocs or Markdown before, I had a look at the documentation available at https://www.mkdocs.org/user-guide/ and I also asked ChatGPT by OpenAi to write me a guide on how to make a website with mkdocs:

  1. Install MkDocs: To use MkDocs, you will first need to have Python installed on your computer. Once Python is installed, you can install MkDocs using pip by running the command "pip install mkdocs" in your command line.
  2. Create a new project: Once MkDocs is installed, navigate to the directory where you want to create your new project, and run the command "mkdocs new projectname" to create a new project. This will create a new directory with the specified name, containing the basic file structure for your new project.
  3. Add content: Navigate to the new directory and add your Markdown files to the "docs" folder. These files will be used to create the pages of your website. You can also add images, videos, and other files to the "docs" folder, and they will be included in the website.
  4. Edit the configuration file: The "mkdocs.yml" file in the root directory of your project contains the configuration for your website. You can edit this file to change the title, theme, and other settings for your website.
  5. Preview your website: Run the command "mkdocs serve" in the root directory of your project to preview your website. This will start a local web server, and you can view your website by opening a web browser and navigating to "http://localhost:8000".
  6. Build and Deploy: Once you are satisfied with the result, you can build your website using the command "mkdocs build" and then deploy the website to a web server.
  7. Customize: You can customize the look and feel of your website by changing the theme, or by creating a custom theme. You can also add extra functionality to your website by using plugins.
    Note:
    • Make sure you have the latest version of mkdocs installed
    • Once deployed, the website will be a static one, so it will not support any dynamic operations.
    This guide is a basic overview on how to create a website with MkDocs and Markdown, there are a lot more things you can do with it.

Source: ChatGPT Jan 9 Version
Key Words Used: write a guide on how to make a website with mkdocs and markdown

I was able to use the guide generated by ChatGPT to create my base mkdocs website. ChatGPT does not always get things 100% correct, however it is a useful tool. One of the downsides is you are unable to get the source that the information it has generated has come from, so you are unable to include acknowledgements in your documentation.

Mkdocs new site creation mkdocs

Running mkdocs serve to see what site looks like mkdocs

Note: To exit mkdocs serve type Control+C in the command line (in the above case I used Git Bash to serve the mkdocs site)

I also asked ChatGPT to explain to me the difference between Markdown and html as I have not used Markdown before:

Markdown and HTML are both languages used to create and format content for the web, but they have some key differences.

  • Markdown is a simpler and more lightweight markup language compared to HTML. It uses a more readable and easy-to-write syntax, which makes it a popular choice for creating content for the web, such as blog posts, documentation, and README files.
  • In contrast, HTML is a more powerful and versatile markup language, with a larger set of tags and attributes that can be used to create a wide range of elements and styles. HTML is used to create more complex and interactive web pages, such as online stores, social media platforms, and news websites.
  • Markdown uses simple, easy-to-remember symbols to format text, such as # for headings, * for bullet points, and > for blockquotes. In contrast, HTML uses tags, such as h1, ul, and blockquote to format text.
  • Markdown is designed to be easy to read and write, even when not rendered, whereas HTML is designed to be rendered by a browser and may not be as easy to read when viewed as raw code.
  • Markdown is a limited set of syntax compared to HTML but it's also more human-readable, and it can be converted to HTML with the help of libraries. HTML can also be transformed to markdown but it's less common and less straightforward.
    In summary, Markdown is a simpler, more user-friendly markup language, that's best suited for creating content for the web, while HTML is a more powerful and versatile language, that's best suited for creating complex and interactive web pages.

Source: ChatGPT Jan 9 Version
Key Words Used: how is markdown syntax different to html

Note: If you are creating a list or a table make sure to put an empty line in your Markdown code before the list of table otherwise it will not render properly

Step 2 Setup Website Theme

There are a number of third party theme templates available for MkDocs to get you started https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes
I first tried out the Cinder theme.
Cinder
I was able to customise this theme by downloading the theme to my computer, unzipping the file and adding the folder to the top level of my repository. I was then able to manipulate the CSS code to change the colour palette of the site. To make the custom theme run on your site you need to add the following to your mkdocs.yml:

theme:
  name: null
  custom_dir: 'custom theme name'
I was not happy with the navigation on the site so I decided to change themes to Material for MkDocs
There is an extensive guide for customising the Material theme available https://squidfunk.github.io/mkdocs-material/
Material
Material I customised the theme by adding parameters into my mkdoc.yml file.
Set theme to material
theme:
  name: material
Add navigation to the top bar and make it move with scrolling
  features:
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.top
Change colours
  palette:
    primary: deep purple
    accent: deep purple
Add custom logo and favicon
  logo: media/logo.png
  favicon: media/favicon.png
Set font
  font: 
    text: Fira Sans
    code: Fira Code
Add extensions to ensure tables, lists, admonitions and icons work
markdown_extensions:
  - tables
  - attr_list
  - def_list
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - admonition
  - pymdownx.details
  - pymdownx.superfences
Add the following to the top of the code for a page to remove the left side whole of site navigation bar, as it is not needed as navigation has been added to the top bar
---
hide:
  - navigation
---

Other useful syntax:
Insert an image

![Image Name](Image file location)
Note: Make sure image file type uses lower case e.g. .jpg not .JPG

External link

[Text for link](link)
To make a code box enclose the line of code with ``` at the start and finish of the code.

To make text bold add ** at the start and finish of the text.

To make text italics add * at the start and finish of the text.

To make a list use - or * with a space after it before the text. Note: before a list make sure there is a blank line in the code otherwise it may not render properly.

To put something in a box (admonition) you can use

!!! note ""
      text 
Note: Make sure to indent the text you want to appear in the box, this can be done for multiple paragraphs while maintaining spacing.

To make a button add

[text on button](page or link){ .md-button }

Step 3 Add a page

I used ChatGPT to write a guide for adding another page to the website:

Creating a new page in MkDocs is a simple process.

Start by creating a new Markdown file in your project's docs directory. The file name should end in .md and should be named according to the title of the page you want to create.

In the file, add a heading using the # symbol, followed by the title of the page.

Below the heading, you can add the content of the page using Markdown syntax.

To add the page to the navigation menu, open the mkdocs.yml file in the root of your project.

Under the nav section, add the title of the page and the file name to the list of pages. example:

nav:
- Home: index.md
- About: about.md
- New Page: newpage.md
Finally, run the mkdocs serve command to build and preview the site locally. Your new page should now be accessible from the navigation menu.

Note:

Make sure the indentation is correct in mkdocs.yml file, otherwise it will give error. If you are adding a subpage, you can use nested list in mkdocs.yml file. If you want to add some images or other media, you can put them in the docs/media directory.

Source: ChatGPT Jan 9 Version
Key Words Used: write a guide on creating a new page in mkdocs

Step 4 Loading an MkDocs site onto Git Lab

Fab Academy using Git Lab to host websites.

In your Git Lab repository change the .gitlab-ci.yml file to

image: python:3.8-buster

before_script:
  - pip install -r requirements.txt

pages:
  script:
  - mkdocs build
  - mv _site public
  artifacts:
    paths:
    - public
  only:
  - main
Note: Make sure the last line is the same name as the repository you are using e.g. "master", "main" etc.

Create a new requirements.txt file with the following in it

# Documentation static site generator & deployment tool
mkdocs>=1.1.2

# Add your custom theme if not inside a theme_dir
# (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes)
mkdocs-material>=5.4.0
Note: if you use a different theme you will need to change the last line to your theme. If you use a fully custom theme that is saved to your repository you do not need the last line.

Create a new .gitignore file to ignore Git Lab public folder, it should just say

public

To your mkdocs.yml add

site_dir: _site 

Copy your mkdocs files and folders to your repository, mkdocs.yml should be in the top-level of the repository where the .gitlab-ci.yml file is.

Step 5 Check Image Size

I noticed that although not large individually, the overall storage space required for my images was already over 1MB.

I decided to use Mass Image Compressor 3.1, a free Windows desktop software, to help me compress the images.
It allowed me to batch process compressing my images. I found it fast and easy to use.

Initial Final Project Idea

The Problem

Approximately 30% of Australians rent.
Most are not allowed to have pets or have difficulty getting approval from landlords to have a pet.
Pet Data
This means many renters miss out on the mental and physical health benefits of owning and caring for a pet.

Final Project Idea

To create an artificial pet that can provide comfort and motivation to its owner.

The pet will need to be able to:
- Provide opportunities for its owner to care for it
- Encourage its owner to exercise
- Know when it is being pat
- Be huggable

Sketch

Sketch 1
Owner will be able to take the separate device on walks/runs if they do not want to take the whole pet with them
Pet will provide an alert when it:
- Needs charging
- Has been neglected for too long (hugs/pats required)
- When the owner has not taken it for a walk for too long

Extra ideas
- Being able to play games with the pet
- Adding an RFID reader into the pet and making different food and toys which when touched to the pet will result in different sounds and screen outputs
- Adding LED lights to the pet

Who is this for?

This will appeal to people who cannot own a pet themselves. It will be appropriate for both children and adults, although with its cuteness factor it will appeal to the young and young at heart.

Idea Name: Kokoro Friend

Kororo Friend

The Japanese Concept of Kokoro

Kokoro is a Japanese word that is often translated as “heart” or “spirit.” However, the concept of kokoro encompasses what a person thinks, feels, and would like to express. It is made of a person’s thoughts and will that drive them forward, the knowledge and experience they have acquired through time, and all their feelings.
Yet, kokoro is more than the sum of all these elements: it is all these elements at the same time. Each person’s features give their kokoro its own “color” and “shape,” making every human a distinct individual with a unique inner richness.

A person’s kokoro cannot be seen or touched:it resides in the area of the heart. Hidden in this invisible kokoro, lies a complex patchwork of ideas, concepts, and feelings that cannot be fully accessed from the outside.

One’s kokoro lives in everything he or she creates. The creation can be a material or conceptual.
Source: https://kokoro-jp.com/what-is-kokoro/

Project Inspiration

Fluf Bot by a Shinobu Ishimura Fab Academy Student https://fabacademy.org/2021/labs/kannai/students/shinobu-ishimura/projects/final-project/

Qoobo - commercial product out now https://qoobo.info/index-en/

Paro Therapeutic Robot - commercial product out now http://www.parorobots.com/

Furby - Inspiration from my childhood https://en.wikipedia.org/wiki/Furby

Tamagotchi - Inspiration from my childhood https://en.wikipedia.org/wiki/Tamagotchi

Student Agreement

Link to Student Agreement