W5020 CS Ed Week 2020

From Coder Merlin
Revision as of 14:10, 1 December 2020 by Silvhr (talk | contribs) (→‎Navigation)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Promotional Material[edit]

Computer Science Ed week- Social Justice[edit]

 Ed Week 2020
  • Computer science Intro
  • Linux Basics
  • Shell basics
  • Igis and graphics


Merlin Shell Access Application:

https://www.codermerlin.com/wiki/index.php/Merlin_Shell_Access_Application

Spreading the news:

  • Social Media
  • Flyers
  • Clubs and classes
  • Advertise to other schools(Frisco, Plano, Lowery)

Layout[edit]

  • Incorporate diversity into it
  • What the event/organization is about:
  “Computer Science Education Week (CSEdWeek) is an annual call to action to inspire K-12 students to learn computer science, advocate for equity in computer science education, and celebrate the contributions of students, teachers, and partners to the field. As part of the #CSforGood movement this year we’re proud to elevate”

Computer Science[edit]

Why Computer Science?[edit]

Computer science is one of the fastest growing pathways in terms of not only economic viability, but also accessibility and significance. With the onset of the digital age, many industries have turned towards technology as their ticket to the future, and now, more than ever, need computer scientists in their fields: restaurants and grocery chains rely on mobile applications for deliveries and purchases, while distributors like Amazon continue to thrive in online shopping. Yet without the programmers behind the scenes, none of this would be possible.

Programming exists virtually everywhere, encompassing a large share of the job market, and can be done in any environment.

Fundamental Concepts of Computer Science[edit]

Computer Science, at its core, is an expression of variable representation and operation through numerical evaluation. In more simple terms, everything can be done by building up on numbers. Computers use binary, a series of 1’s and 0’s, to understand values. A different pattern means a different number, such as 0010 representing 2 and 1011 being 11. Coding languages are the bridge between computers and humans, allowing us to “talk” to machines and tell them what to do. Coding languages have a few basic concepts used to store real world values:

  • Integers represent positive and negative whole numbers
  • Doubles represent positive and negative decimals
  • Characters represent ‘letters’, except they also include numbers, symbols, and other written characters, so long as they are only 1 unit long. This means ‘a’ is a character while ‘an’ is two characters.
  • Strings represent words, or several characters put together

Linux Basics[edit]

Getting Ready[edit]

Installing the secure shell extension[edit]

To access Merlin, you'll need a secure shell client.

If you're using a Windows-based device: install Google Chrome, open up Chrome and search "Secure Shell Extension", install the extension.

If you're using a Mac or Linux based device, it probably already has a built-in client which can be accessed from the terminal.

You will need a connection string to access the server.

Obtaining an account[edit]

Fill out this form (if you haven't already) and wait for your credentials to be provided (via email).

Once your account is obtained, open up the "Connection Dialogue", and input the connection string. It will prompt you for your password, input it and continue to the "shell" (for further reference).

Navigating the Shell[edit]

In order to see what our working directory is inside the shell, we are going to use pwd which stands for "print the working directory". You can use the command by typing it in and hitting <RETURN>.

first-last@codermerlin:~$  pwd

After using the command you should see something like the below console line. As long as you haven't moved in the directory you should start off in the home directory.

/home/first-last 


Next, let's try the ls command which will list the directories and files in the working directory.

first-last@codermerlin:~$  ls

However no files or directories have been created yet, so there won't be anything to display.

We can make a directory by using the command mkdir

first-last@codermerlin:~$  mkdir firstDirectory

To enter the directory simply use the command "cd <SPACE> directoryName".

first-last@codermerlin:~$  cd firstDirectory

And if we use the pwd command now, we should see that we are in the created directory.

first-last@codermerlin:~$  pwd

/home/first-last/firstDirectory 


Now let's navigate out of the current directory. Using the previous cd command we can use "../" to go back one directory (which can be chained together, e.g. "../../../"), leave it blank to return to the home directory or use "~" to also get to the home directory.

first-last@codermerlin:~$  cd ../

Now that we have returned to the home directory, let's try listing again:

first-last@codermerlin:~$  ls

You should now see the directory previously added.

firstDirectory 


For more detailed information on this and relating topics: W1002 The Client, the Server, and the Shell

Emacs[edit]

Emacs is the text editor we will be using to edit our files today. Many of the important key sequences for navigating, suspending/exiting, and saving files will be displayed in the following charts. Keep in mind this list is not comprehensive, but mostly accounts for basic emacs usage. A comprehensive list of Emacs Keys can be found here. Additionally typing "emacs" into the shell brings up further documentation.

Navigation[edit]

Key Sequence Purpose
CONTROL-v Scroll down (forwards) one page
ALT-v Scroll up (backwards) one page
CONTROL-l (second character is lowercase 'L') Clear screen and redisplay the text, moving the cursor to the vertical center
CONTROL-f Move the cursor forward one character
CONTROL-b Move the cursor backward one character
CONTROL-p Move the cursor up one line (previous line)
CONTROL-n Move the cursor down one line (next line)
ALT-f Move the cursor forward one word
ALT-b Move the cursor backward one word
CONTROL-a Move the cursor to the beginning of a line
CONTROL-e Move the cursor to the end of a line
ALT-a Move the cursor to the beginning of a sentence
ALT-e Move the cursor to the end of a sentence
ALT-SHIFT-< Move the cursor to the beginning of the file
ALT-SHIFT-> Move the cursor to the end of the file

Keep in mind that the arrow keys, while somewhat easier and more intuitive to use than their key sequence counterparts, are not as quickTemplate:Citation needed.

Suspend/Exit and Save[edit]

Key Sequence Purpose
CONTROL-x CONTROL-c Exit emacs
CONTROL-z Suspend emacs temporarily
CONTROL-x CONTROL-s Save the current file
CONTROL-x s Save changed files (prompts for all confirmation)

Graphics Project[edit]

Pong

For our project we'll be recreating a 2D, table-tennis themed Atari videogame using Igis and Scenes.


Starting the project[edit]

To start, we'll import a nearly complete version of the game. We do this by typing this into the console:

first-last@codermerlin:~$   git clone https://github.com/Riley229/Igis-Graphics-Example Pong/