Skip to content

Instantly share code, notes, and snippets.

View blake41's full-sized avatar

Blake Johnson blake41

  • http://blakejohnson.brandyourself.com/
View GitHub Profile
# All bicycles are road bikes
# A Mechanic is going to need to know what spare parts to take
# for a bike on a trip in case it breaks down
# tape color is the only dynamic component of spares
############## Page 107 ##############
class Bicycle
attr_reader :size, :tape_color
def initialize(args)
@size = args[:size]
TODO 1
PART1:
- Initialize/create a single new local repository called "todos"
- inside that repo, create a new folder called todo1
- push it up to github
PART2:
- each member of your team should create a ruby file that will print their name to the console
- add each of these files to each of your team members repos
HOMEWORK: environment, utilities, and shortcuts blog post
there was a *lot* covered today in blake's lecture. these types of tips and tricks for setup are super useful and they are rarely documented and people often struggle to setup or discover them.
take a moment tonight to reflect on one aspect of today and write a helpful blog post about it.
some ideas:
a bug you had and how you solved it (include full text of errors for SEO)
a tool/shortcut and how it saved you time
step by step instructions for installing ruby
bash profile, what it is and what it can do for you
http://pages.github.com/
https://devcenter.heroku.com/articles/quickstart
this is super late, so don't worry too much. i'll be going over it tomorrow.... but if you get a chance take a look tonight!
Pick one person not currently on your team and have them be your partner for this todo.
Have them create a new repo called todo2 in which they should create a file called theirname_yourname.txt.
You should clone their repo.
In that file they should write down their name and their favorite color and push their changes.
You should pull their changes.
You should add your name and favorite color to that file, you should push your changes.
You should do the opposite instructions for each partner.
Create a file called `number-guesser.rb`
Project specs:
Should ask the user to enter a number between 1 and 100
Should receive input from the user
Should tell the user if they were correct or incorrect
CHALLENGE:
Write a test to check that your file correctly tells the user if they are right or wrong.
create a folder called todo3 in your todos folder.
create a ruby file called birthday.rb in todo3
ask the user for their birthday
print happy birthday if their birthday is today!
CHALLENGE: allow the user to enter their birthday in multiple formats
push to your github repo and post link to this thread
Create a folder in your todos repo called "Loops".
Inside it, create 2 folders:
times_five
fizzbuzz
The 'times_five' folder should contain a file called times_five.js and times_five.rb. Each file should contain code which, when ran, will print each number, 1-100, multiplied by 5.
Fizzbuzz folder should contain a single file "fizzbuzz.rb" that does the following:
(CHALLENGE: do it in javascript)
SETUP
Create a new local and remote repo called 'secrets'.
Inside this repo, create 2 files 'encoder.rb' and 'decoder.rb'
PROJECT REQUIREMENTS
In encoder.rb create a program that will take a string and apply methods from the String class to it to make the original meaning of the string difficult to discern.
In decoder.rb create a program that will take that mutated string from encoder.rb and will return it to its original configuration, making the meaning of the string clear again.
>>> PIVOT!! <<<
1. Find a teammates encoders repo ( from this lab https://github.com/flatiron-school-students/string-manipulation-bk-001)
2. Fork it!
3. Clone it!
4. Play with the encoder
5. Write a decoder
6. Push the decoder up to your Github repo
7. Post the link here!