Skip to content

Instantly share code, notes, and snippets.

View waspyfaeleith's full-sized avatar

Sandy McMillan waspyfaeleith

View GitHub Profile
@waspyfaeleith
waspyfaeleith / installfest.md
Last active December 21, 2015 15:10
Installfest Notes

Installfest

Pre-install

  1. Identify which version of OSX you're using - ideally you should have Yosemite or newer (10.10.x)
  2. Ensure you've got Xcode installed - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
  3. Ensure that you've uninstalled any antivirus software you may have, as it can prevent some of the tools from installing properly

Install and connect to HipChat

Student Machine Setup

Google Chrome

Log in to Google using your Google account.

Configure Git

Configure your name and email address for commits (be sure to use the email address you have registered with Github). Open up your Terminal and type the following commands:

git config --global user.name "Your Name"

@waspyfaeleith
waspyfaeleith / rock_paper_scissors_lizard_spock.md
Last active April 21, 2017 09:39
Rock, Paper, Scissors, Lizard, Spock

Rock, Paper, Scissors, Lizard, Spock

Tonight's homework is to create the Rock, Paper, Scissors, Lizard, Spock game in JavaScript/jQuery, where you play one-v-one against the computer.

The game is an expansion on the game Rock, Paper, Scissors. Each player picks a variable and reveals it at the same time. The winner is the one who defeats the others. In a tie, the process is repeated until a winner is found.

Rules for Winning the Game

Scissors cuts Paper

@waspyfaeleith
waspyfaeleith / calc-u-l8r_in_c.md
Last active April 21, 2017 09:38
calc-u-l8r in C

Task - calc-u-l8r in c

Write a command line calculator application in C

Tasks:

  1. You already have the code to perform an addition, now add the following:

    functionality for 'subtraction'

Test Score Block Graph

The Task

Given a set of 20 test scores (each score being out of 100), you are to determine the grade of each score (A,B,C,D, or E).

You then need find number of the scores of each grade as a percentage of the total number of scores e.g. if there are 5 test scores with a grade of B, then this would be 25%.

Finally, you are to display these percentages in the form of a block graph, where each 1% is represented by an asterisk e.g.:

Installfest Notes

Pre-install

  1. Identify which version of OSX you're using - ideally you should have El Capitan (10.11.x). If not, upgrade the OS in App Store.
  2. Install any OS updates displayed in the App Store
  3. Ensure that you've uninstalled any antivirus software you may have, as it can prevent some of the tools from installing properly

Installfest using Migration Assistant

Master copy

Ensure a machine is available to clone. This should be set up as per the instructions below.

Machine to be setup: Wipe drive and reinstall OS X

Skip this if it's a new machine

Press the power button. As soon as you hear the bing, press Cmd and R

Pizza Shop Lab

Objectives
  • Complete CRUD actions
  • Add more functionality to analysis model

So far we have created new objects of Pizzas and persisted them as rows in our DB.

We have also read from the DB with the .all method we created.

Lab / Homework

  • Add a new class Chicken which only clucks(), and allow the bear to eat it.
  • Add a method that returns the names of all the food in the bears belly (use class names)
  • Add a check so that if the bear is intolerant to the food when he eats it, he will throw up this item

Feel free to add other animals for practice. You may want to try adding your own interface(s).

Lab

Today we looked at the Strategy pattern. There are many other patterns that developers have come up with that we can also use.

Choose one or more of the following patterns to investigate:

  • Factory
  • State
  • Command
  • Decorator