├── .gitignore ├── LICENSE.md ├── README.md ├── archive ├── calculator.md ├── farmarfinder.md ├── orange_tree.md ├── random_menu.md ├── rubrics │ ├── code_review_process.md │ ├── oral_presentation.md │ ├── personal_website.md │ ├── template.md │ ├── week_1_calculator.md │ ├── week_1_random_menu.md │ ├── week_2_hangman.md │ ├── week_2_orangetree.md │ ├── week_2_solar_system.md │ └── week_3_farmar.md ├── solar-system.md ├── topic_resources │ ├── Ada_Day1.pdf │ ├── Ada_Day3.pdf │ ├── AngularJS-intro.md │ ├── ScavengerHuntSeattle.md │ ├── a.png │ ├── active-record-associations.md │ ├── active-record.md │ ├── ada-cooks-mini.md │ ├── ada_cooks.md │ ├── adding-a-blog.md │ ├── advanced_variables.md │ ├── agile │ │ ├── agile-intro.md │ │ ├── pair-programming.md │ │ └── resources │ │ │ └── agile-video.png │ ├── algorithms_research.md │ ├── analytics.md │ ├── angular-setup.md │ ├── animal_farm │ │ ├── bird.rb │ │ ├── dog.rb │ │ └── penguin.rb │ ├── api.md │ ├── asif-daud_isilon.md │ ├── assert.md │ ├── async-programming.md │ ├── atom.md │ ├── baby_dragon.md │ ├── baby_dragon │ │ └── norbert.rb │ ├── baby_dragon_fancify.md │ ├── background-jobs.md │ ├── bank_accounts.md │ ├── basic-javascript-and-jquery.md │ ├── basic-mocks-and-stubs.md │ ├── basic_objects │ │ ├── baker.rb │ │ ├── dog.rb │ │ ├── oven.rb │ │ └── snake.rb │ ├── battleship.md │ ├── betsy.md │ ├── bios │ │ └── bios.md │ ├── blog.md │ ├── blog_post.rb │ ├── book.md │ ├── bootstrap.md │ ├── brakeman.md │ ├── break-project.md │ ├── build-a-blog.md │ ├── building-hashes.md │ ├── building_apis.md │ ├── button-for-cloning-fork.png │ ├── c3-shipping-teams.md │ ├── caching-in-rails.md │ ├── canvas-intro-and-drawing-part-two.md │ ├── canvas-intro-and-drawing.md │ ├── capstone │ │ ├── advice.md │ │ ├── c4-due-dates.md │ │ ├── c5-capstone-requirements.md │ │ ├── c5-due-dates.md │ │ ├── capstone.md │ │ ├── concept.md │ │ ├── features.md │ │ ├── groups.md │ │ ├── presentation.md │ │ ├── product-plan.md │ │ └── proposed-schedule.markdown │ ├── carrierwave.md │ ├── cd-into-clone.png │ ├── cd-solar-system.png │ ├── cdn.md │ ├── chair.rb │ ├── chart.JPG │ ├── checkboxes-and-radio-buttons.md │ ├── checkout-jnf-master.png │ ├── choose-your-project.md │ ├── clone-project-master.png │ ├── clone-url-button.png │ ├── clone-your-fork.png │ ├── code_climate.md │ ├── code_reviewing.md │ ├── collecting_collections.md │ ├── colorize.md │ ├── come_to_my_party.md │ ├── command-line-skills-upgrade │ │ ├── README.md │ │ └── try-it.md │ ├── comment.rb │ ├── commit-name-to-rubric.png │ ├── common-errors-in-rails.md │ ├── complexity.md │ ├── composition.md │ ├── congo.md │ ├── consuming-an-api.md │ ├── controller-methods.md │ ├── crash-test-dummy-passenger-error.png │ ├── css-d&c.md │ ├── csv_assignment.md │ ├── csv_database.md │ ├── data-modeling-exercise.md │ ├── database │ │ ├── advanced_db.md │ │ ├── intro_to_db.md │ │ └── using_sqlite.md │ ├── datastructures.pdf │ ├── date-time.md │ ├── db_example │ │ ├── db_example.sqlite3 │ │ ├── lib │ │ │ └── person.rb │ │ └── spec │ │ │ └── lib │ │ │ └── person_spec.rb │ ├── debugging-sample │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .htaccess │ │ ├── 404.html │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── apple-touch-icon-precomposed.png │ │ ├── crossdomain.xml │ │ ├── css │ │ │ ├── main.css │ │ │ └── normalize.css │ │ ├── doc │ │ │ ├── TOC.md │ │ │ ├── crossdomain.md │ │ │ ├── css.md │ │ │ ├── extend.md │ │ │ ├── faq.md │ │ │ ├── html.md │ │ │ ├── js.md │ │ │ ├── misc.md │ │ │ └── usage.md │ │ ├── favicon.ico │ │ ├── humans.txt │ │ ├── img │ │ │ └── .gitignore │ │ ├── index.html │ │ ├── js │ │ │ ├── main.js │ │ │ ├── plugins.js │ │ │ └── vendor │ │ │ │ ├── jquery-1.10.2.min.js │ │ │ │ └── modernizr-2.6.2.min.js │ │ └── robots.txt │ ├── debugging.md │ ├── design.md │ ├── dev_tools.md │ ├── dice │ │ ├── .rspec │ │ ├── README.md │ │ ├── lib │ │ │ ├── dice.rb │ │ │ └── dice_solution.rb │ │ └── spec │ │ │ └── lib │ │ │ └── dice_spec.rb │ ├── dictionary.md │ ├── dictionary │ │ ├── unsorted_words │ │ └── words.rb │ ├── digraph.png │ ├── divide-and-conquer.md │ ├── dns-a-record.png │ ├── dns-configuration.md │ ├── dom-part-deux.md │ ├── doubly_linked.png │ ├── dynamic-typing-coercion-equality.md │ ├── ec2-confirm.png │ ├── emitter.rb │ ├── empowered_women.md │ ├── enumerable.md │ ├── erb_and_layouts.md │ ├── evens.rb │ ├── events.md │ ├── examples │ │ ├── week1 │ │ │ └── while_loops.rb │ │ └── week8 │ │ │ └── recursion │ │ │ ├── factorials.rb │ │ │ └── hacky.rb │ ├── exercises │ │ ├── cat-adventure.md │ │ ├── lights-input.txt │ │ └── lights.md │ ├── far-mar-rails.md │ ├── farm-race.md │ ├── fetching-upstream-changes.md │ ├── filters.md │ ├── fix-url.md │ ├── fixnum │ │ └── fixnum_monkey_patch.rb │ ├── fizzbuzz.md │ ├── fizzbuzz.rb │ ├── fizzbuzz │ │ ├── fizzbuzz.rb │ │ ├── fizzbuzz_of.rb │ │ └── spec │ │ │ └── fizzbuzz_of_spec.rb │ ├── flow-control.md │ ├── flow-control.pdf │ ├── fork-the-project.png │ ├── form-objects.md │ ├── framework-presentations.md │ ├── future-lectures │ │ └── lambdas.md │ ├── games.md │ ├── get-to-know-you-games.md │ ├── ghost.rb │ ├── git-intro.md │ ├── git-status-rubric.png │ ├── git_immersion.md │ ├── graphs.md │ ├── greed │ │ └── README.md │ ├── hackathons │ │ └── 2015-holiday-hackathon.md │ ├── hamming │ │ ├── .rspec │ │ ├── README.md │ │ ├── lib │ │ │ ├── hamming.rb │ │ │ └── hamming_solution.rb │ │ └── spec │ │ │ └── lib │ │ │ └── hamming_spec.rb │ ├── hangman.md │ ├── hash-practice.md │ ├── hash.md │ ├── hashes.rb │ ├── heroku-debugging.md │ ├── heroku-installfest.md │ ├── heroku.md │ ├── homework_review.md │ ├── how-to-os-x.md │ ├── how-to-turn-in-your-projects.md │ ├── html-d&c.md │ ├── html.md │ ├── http-verbs.md │ ├── http.md │ ├── ice_cream_party.md │ ├── ice_cream_party_planner │ │ └── README.md │ ├── images │ │ ├── cheri.jpg │ │ ├── cupcat.gif │ │ ├── elise.jpg │ │ └── hello.gif │ ├── infographics │ │ ├── BuildingTheNewLeader.jpg │ │ ├── HowToBeTechie.png │ │ ├── Interviewing.jpg │ │ ├── JobInterviewingTips.jpg │ │ ├── LanguageWars.png │ │ ├── LanguageWars2.png │ │ ├── MakeResumeMatchJob.jpg │ │ └── RoadToSuccess.jpg │ ├── inheritance.md │ ├── insertion-sort.JPG │ ├── installfest.md │ ├── installfest2.md │ ├── instant-gratification-and-the-dom.md │ ├── intentional-bug.png │ ├── intermediate-css.md │ ├── internationalization.md │ ├── intro-css.md │ ├── introducing-gems.md │ ├── introduction_to_mongodb.md │ ├── it-works.png │ ├── javascript │ │ ├── ajax-exercise.md │ │ ├── ajax.md │ │ ├── exercises-101.md │ │ ├── exercism.md │ │ ├── intro-to-js.md │ │ ├── javascript-101.md │ │ ├── javascript-102.md │ │ ├── javascript-103.md │ │ ├── javascript-104.md │ │ ├── javascript-hoisting.md │ │ ├── javascript-scope.md │ │ ├── jquery-101.md │ │ ├── js-repl-setup.md │ │ ├── practice │ │ │ ├── battleship.html │ │ │ └── battleship.js │ │ ├── starter-exercises.md │ │ └── worksheets │ │ │ └── 101.md │ ├── josephus.md │ ├── js-1-exercises.md │ ├── js-1.md │ ├── js-day2.pdf │ ├── js-the-env-and-the-tools.md │ ├── js │ │ ├── battleship.html │ │ ├── battleship.js │ │ ├── bottles.html │ │ ├── bottles.js │ │ ├── bottles1.js │ │ └── todo_html.html │ ├── koans.md │ ├── lecture.html │ ├── lecture_networking │ │ ├── .ruby-gemset │ │ ├── .ruby-version │ │ ├── 1966.md │ │ ├── alphabet_soup.md │ │ ├── config.ru │ │ ├── parade │ │ ├── rack.md │ │ ├── request.md │ │ ├── response.md │ │ ├── rfc.md │ │ ├── trevor.md │ │ └── www.md │ ├── lecture_stuff.rb │ ├── legacy │ │ └── databases │ │ │ ├── create_table.md │ │ │ ├── crud.md │ │ │ ├── database.md │ │ │ ├── datasets.md │ │ │ ├── delete.md │ │ │ ├── insert.md │ │ │ ├── parade │ │ │ ├── sequel.md │ │ │ ├── sql.md │ │ │ ├── sqlite.md │ │ │ └── update.md │ ├── linked_list.png │ ├── linked_list1.rb │ ├── linked_list2.rb │ ├── list-app.md │ ├── list1.html │ ├── list_processor.rb │ ├── lister.md │ ├── literals.md │ ├── mailers.md │ ├── make-slides.sh │ ├── markets.csv │ ├── mastermind.md │ ├── mastermind_group_code.rb │ ├── media_ranker.md │ ├── memoization.md │ ├── merge-sort.md │ ├── metaprogramming.md │ ├── missing-capistrano-bundler-gem.png │ ├── moar_work │ │ ├── acronym.md │ │ ├── calculator.md │ │ ├── chess.md │ │ ├── contact-list.md │ │ ├── decoding-strings.md │ │ ├── dinos.md │ │ ├── evens.md │ │ ├── game.rb │ │ ├── games.md │ │ ├── golf.md │ │ ├── http-body-to-hash.md │ │ ├── key-value-swapper.md │ │ ├── log-parser │ │ │ ├── log-parser.md │ │ │ └── sample.log │ │ ├── parse-weekly-markdown.md │ │ └── vote.md │ ├── mockup.jpg │ ├── mockup.png │ ├── modules-and-structure.md │ ├── more_conditionals.md │ ├── more_enumerables.md │ ├── more_interview_practice.md │ ├── my_enumerable.rb │ ├── name-in-rubric.png │ ├── networking-101.md │ ├── networking.md │ ├── networking │ │ ├── client-server.png │ │ ├── request-cycle.jpg │ │ ├── server.rb │ │ ├── tim-berners-lee.png │ │ └── webserver.png │ ├── nix.md │ ├── notes.md │ ├── oauth.md │ ├── object-orientation.md │ ├── object-rules-of-thumb.md │ ├── objects-prototypes.md │ ├── objects_review.md │ ├── objects_using_objects.md │ ├── on_debugging.md │ ├── overview.md │ ├── p_patch_planner.md │ ├── parade │ ├── params_hash.md │ ├── pb_and_j.md │ ├── personal-website-overview.md │ ├── personalitysortinghat.md │ ├── planetary_age.md │ ├── planets.html │ ├── problem-solving-interview │ │ ├── ada-101.md │ │ ├── ada-102-dir_tree.png │ │ └── ada-102.md │ ├── problem_solving.md │ ├── program-introduction.md │ ├── project-forks.png │ ├── project-masters.png │ ├── project-outline.md │ ├── project-turn-in-workflow.png │ ├── promises.md │ ├── provisioning-and-deploying-to-a-vps.md │ ├── pull-request-1.png │ ├── pull-request-2.png │ ├── pull-request-3.png │ ├── pull-request-4.png │ ├── pull-request-5.png │ ├── push-branch-upstream.png │ ├── queue.rb │ ├── quiz.md │ ├── rails-break-project.md │ ├── rails-rspec-methods.md │ ├── rails-v-ng.md │ ├── rails.md │ ├── rails │ │ ├── active-record-practice.md │ │ ├── active-record-relationships.md │ │ ├── active-record.md │ │ ├── controller-filters.md │ │ ├── controllers.md │ │ ├── create-view-helpers.md │ │ ├── creating-an-api-in-rails.md │ │ ├── custom-validators.md │ │ ├── factory-girl.md │ │ ├── gemsets.md │ │ ├── intro-to-mvc.md │ │ ├── omniauth.md │ │ ├── params.md │ │ ├── rails-erd.md │ │ ├── rails-forms.md │ │ ├── rails-request-cycle.jpg │ │ ├── rails-request-cycle.pdf │ │ ├── rails-request-state.md │ │ ├── railsmvc.png │ │ ├── routes-102.md │ │ ├── routes.md │ │ ├── rspec-practice.md │ │ ├── rspec-shared-examples.md │ │ ├── rspec-with-rails.md │ │ ├── session.md │ │ ├── twitter.md │ │ ├── user-authentication-2.md │ │ ├── user-authentication.md │ │ ├── validations.md │ │ ├── view-helpers.md │ │ └── views-101.md │ ├── railsbridge-setup.md │ ├── rake.md │ ├── recap.md │ ├── recursion.md │ ├── recursion.png │ ├── refactor.md │ ├── refactoring.md │ ├── refactoring2.md │ ├── resources.md │ ├── resources │ │ ├── addEvent.html │ │ ├── addevent.js │ │ ├── alias-record.png │ │ ├── async-programming.key │ │ ├── better_errors.png │ │ ├── blank.html │ │ ├── blank.js │ │ ├── calculator.rb │ │ ├── canvas.key │ │ ├── canvas.pdf │ │ ├── chair.rb │ │ ├── code-example.js │ │ ├── code-example2.js │ │ ├── code-examples-2.html │ │ ├── code-examples.html │ │ ├── dungeon.rb │ │ ├── dynamic-typing.pdf │ │ ├── events.key │ │ ├── example0-2.js │ │ ├── example0.html │ │ ├── example0.js │ │ ├── example1.html │ │ ├── example1.js │ │ ├── example2.html │ │ ├── example2.js │ │ ├── example3.html │ │ ├── example3.js │ │ ├── functions.key │ │ ├── functions.pdf │ │ ├── github-application.png │ │ ├── github-credentials.png │ │ ├── grep_example │ │ │ ├── capitalized_fruits.txt │ │ │ ├── fruits.txt │ │ │ └── pie_flavors.txt │ │ ├── grid.html │ │ ├── grid.js │ │ ├── images │ │ │ ├── developers.png │ │ │ ├── dog.jpg │ │ │ ├── drracket_interface.png │ │ │ ├── excellent.gif │ │ │ ├── kitten.jpg │ │ │ └── nwtekno.png │ │ ├── instant-grat-and-the-dom.pdf │ │ ├── js-the-env-and-the-tools.pdf │ │ ├── message.png │ │ ├── oauth.png │ │ ├── omniauth-dance.png │ │ ├── printadd.html │ │ ├── printadd.js │ │ ├── quiz.html │ │ ├── quiz3.html │ │ ├── quiz3.js │ │ ├── rectangle.html │ │ ├── rectangle.js │ │ ├── rectangle2.js │ │ ├── request-timeline.png │ │ ├── restful-routes.md │ │ ├── scope.key │ │ ├── scope.pdf │ │ ├── scope.png │ │ ├── selection_sort.rb │ │ ├── stack-trace.png │ │ ├── story.rb │ │ ├── syntax.pdf │ │ ├── test.rb │ │ ├── weather.rb │ │ ├── weather_spec.rb │ │ └── while.rb │ ├── retro.md │ ├── revisiting_classes.md │ ├── robocop.jpg │ ├── routes-and-REST.md │ ├── routing-pt-1.md │ ├── routing-pt-2.md │ ├── rspec-tools.md │ ├── rspec.md │ ├── rspec │ │ ├── lib │ │ │ └── person.rb │ │ └── spec │ │ │ └── lib │ │ │ └── person_spec.rb │ ├── rubocop.md │ ├── ruby-101.md │ ├── ruby-102.md │ ├── ruby-103.md │ ├── ruby-104.md │ ├── ruby-messaging.md │ ├── sam_notes.md │ ├── schedule.md │ ├── scheduled-events.md │ ├── scope-forms-user-input.md │ ├── scrabble.md │ ├── secret.html │ ├── security.md │ ├── see-more.md │ ├── sequence_diagrams.md │ ├── setting-up-rails.md │ ├── sfd.md │ ├── shared-hosting-model.dia │ ├── shared-hosting-model.png │ ├── shipping_service.md │ ├── simple-jquery.html │ ├── simple-security-from-scratch.md │ ├── sinatra-blog.md │ ├── sinatra-dice │ │ ├── dice.rb │ │ └── dice_server.rb │ ├── sinatra-practice.md │ ├── sinatra_practice │ │ ├── Gemfile │ │ ├── config.ru │ │ ├── my_app.rb │ │ └── views │ │ │ └── index.erb │ ├── slides.css │ ├── soa_implementation.md │ ├── social_media.md │ ├── sorting.md │ ├── sorting_hat │ │ └── README.md │ ├── ssl.md │ ├── stack.rb │ ├── standup.md │ ├── starting-an-html-website.md │ ├── state_graph.png │ ├── states.png │ ├── structure.md │ ├── submitting-forms.md │ ├── swap.rb │ ├── switch-to-your-branch.png │ ├── syntax-fpnum-primitives.md │ ├── tags.md │ ├── tdd_bdd.md │ ├── team-project-contributions.md │ ├── test_fizzbuzz.rb │ ├── text_analyzer │ │ └── analyzer.rb │ ├── timer.rb │ ├── todo_dom.html │ ├── todo_jq.html │ ├── topics.md │ ├── transferrable-skills │ │ ├── codebase │ │ │ ├── bug-fix.md │ │ │ ├── changes-through-specs.md │ │ │ ├── fixing-a-bug.md │ │ │ ├── new-feature.md │ │ │ ├── readme.md │ │ │ ├── setup.md │ │ │ └── specify-feature.md │ │ ├── cr-etiquette.md │ │ ├── first-days.md │ │ ├── java │ │ │ └── java-setup.md │ │ ├── plan.md │ │ ├── python │ │ │ ├── python-ruby-comparison.md │ │ │ └── python-setup.md │ │ └── sicp-lectures.md │ ├── undirected_graph.png │ ├── variable-scope.md │ ├── variables_and_scope.md │ ├── views-and-forms.md │ ├── vote.rb │ ├── vps-dns.png │ ├── vps-dns.xcf │ ├── vps-model.dia │ ├── vps-model.png │ ├── warm-up example.jpg │ ├── warmup.html │ ├── warmup.md │ ├── web-api-101.md │ ├── weekly-overview.md │ ├── weekly_overview.markdown │ ├── who-we-are.md │ ├── why-frameworks.md │ ├── why-server.md │ ├── word_count │ │ ├── .rspec │ │ ├── README.md │ │ ├── lib │ │ │ └── phrase.rb │ │ └── spec │ │ │ └── lib │ │ │ └── phrase_spec.rb │ └── worksheet.md └── word-guess.md └── cohort_schedules ├── C01_internship.md ├── C02_classroom.md ├── C02_internship.md ├── C03_classroom.md ├── C03_internship.md ├── C04_classroom.md ├── C04_internship.md ├── C05_internship.md ├── C06_classroom.md ├── C06_internship.md ├── C07_classroom.md ├── C07_internship.md ├── C08_internship.md ├── C09_internship.md └── C10_internship.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | [Ada Developers Academy](http://adadevelopersacademy.org)'s Curriculum is licensed [Creative Commons Attribution-ShareAlike 4.0](http://creativecommons.org/licenses/by-sa/4.0/). 4 | ![Creative Commons License](http://i.creativecommons.org/l/by-sa/4.0/80x15.png) 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Curriculum Schedules 2 | -------------------- 3 | * Cohort 10: 4 | [Internship Calendar](cohort_schedules/C10_internship.md) 5 | * Cohort 9: 6 | [Internship Calendar](cohort_schedules/C09_internship.md) 7 | * Cohort 8: 8 | [Internship Calendar](cohort_schedules/C08_internship.md) 9 | * Cohort 7: 10 | [Classroom Calendar](cohort_schedules/C07_classroom.md) 11 | [Internship Calendar](cohort_schedules/C07_internship.md) 12 | * Cohort 6: 13 | [Classroom Calendar](cohort_schedules/C06_classroom.md) 14 | [Internship Calendar](cohort_schedules/C06_internship.md) 15 | * Cohort 5: 16 | [Internship Calendar](cohort_schedules/C05_internship.md) 17 | * Cohort 4: 18 | [Classroom Calendar](cohort_schedules/C04_classroom.md) 19 | [Internship Calendar](cohort_schedules/C04_internship.md) 20 | * Cohort 3: 21 | [Classroom Calendar](cohort_schedules/C03_classroom.md) 22 | [Internship Calendar](cohort_schedules/C03_internship.md) 23 | * Cohort 2: 24 | [Classroom Calendar](cohort_schedules/C02_classroom.md) 25 | [Internship Calendar](cohort_schedules/C02_internship.md) 26 | * Cohort 1: 27 | [Internship Calendar](cohort_schedules/C01_internship.md) 28 | 29 | How to Volunteer 30 | ---------------- 31 | Want to get involved? Yay! 32 | * [Volunteer with Ada Developers Academy](http://adadevelopersacademy.wiki/) 33 | -------------------------------------------------------------------------------- /archive/calculator.md: -------------------------------------------------------------------------------- 1 | # Calculator 2 | 3 | Build a calculator command line interface (CLI) that allows a user to perform simple arithmetic. 4 | 5 | ## Baseline 6 | The program should ask the user for an operation (string or numeric symbol) and two numbers. 7 | 8 | ## Primary Requirements 9 | The program should use the input operation and two numbers to provide the result of applying the operation to the two numbers. 10 | - The four operations supported: addition, subtraction, multiplication, and division 11 | - The program should accept both the name (`add`) and the symbol (`+`) for each possible operation. 12 | - Print out the formula in addition to the result, i.e. `2 + 2 = 4` 13 | 14 | ## Optional Enhancements 15 | ### More Math 16 | - Add support for computing exponents (`2^4 = 2 * 2 * 2 * 2 = 16`). 17 | - Add support for the modulo operator (`10 % 3 = 1`). 18 | - Add support for parentheticals, i.e. 10 / (5 + 5) = 1. 19 | 20 | ### User Input 21 | - Gracefully handle unexpected user input: 22 | - What happens if the user input is nil (i.e., the user just pressed enter)? 23 | - What happens if the user tries to add hotdog to elephant? 24 | - Make your program know when it needs to return an integer versus a float. 25 | -------------------------------------------------------------------------------- /archive/rubrics/code_review_process.md: -------------------------------------------------------------------------------- 1 | #Code Review Process 2 | 3 | Steps for projects for students and reviewer: 4 | 5 | | who | does what 6 | |----------------|-------------------------------- 7 | | Instructor | introduces a new project 8 | | Student | makes a new GitHub repo with their solution, with a README that includes a link to the project description followed by the blank rubric inline 9 | | Instructor | assigns a code reviewer (gives student the code reviewer's GitHub handle) 10 | | Student | gives code reviewer access to their repo 11 | | Instructor | emails code reviewers to let them know there is code to review 12 | | Code Reviewer | forks a branch called "codereview" 13 | | Code Reviewer | reads project description and rubric and then reviews the code 14 | | Code Reviewer | leaves comments and code changes in the code 15 | | Code Reviewer | completes rubric with leveling and overall comments/suggestions 16 | | Code Reviewer | creates a pull request 17 | | Student | gets a notification of the PR 18 | | Student/Code Reviewer | converse on PR 19 | | Student | DOES NOT merge; so that their code is preserved separate from the Code Reviewer 20 | -------------------------------------------------------------------------------- /archive/rubrics/template.md: -------------------------------------------------------------------------------- 1 | # TEMPLATE RUBRIC 2 | 3 | 1=Beginner, 2=Proficient, 3=Master 4 | 5 | ### PROJECT LEARNING GOALS 6 | 7 | | Rating | Content | Description 8 | |--------|----------------|----------------------------------------------------------- 9 | | | s | s | 10 | 11 | 12 | ### CODE QUALITY 13 | 14 | | Rating | Skill | Description 15 | |--------|----------------|----------------------------------------------------------- 16 | | | Correctness | 17 | | | Readability | 18 | | | Structure | 19 | | | Efficiency | 20 | 21 | 22 | ###OVERALL RATING 23 | 24 | 25 | 26 | ###COMMENTS 27 | -------------------------------------------------------------------------------- /archive/topic_resources/Ada_Day1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/Ada_Day1.pdf -------------------------------------------------------------------------------- /archive/topic_resources/Ada_Day3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/Ada_Day3.pdf -------------------------------------------------------------------------------- /archive/topic_resources/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/a.png -------------------------------------------------------------------------------- /archive/topic_resources/agile/resources/agile-video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/agile/resources/agile-video.png -------------------------------------------------------------------------------- /archive/topic_resources/algorithms_research.md: -------------------------------------------------------------------------------- 1 | # Algorithms! 2 | 3 | ### Research 4 | In a group, work to research an important algorithm or set of algorithms and create a 5 minute presentation about it. 5 | 6 | Your presentation should address the following points: 7 | - History: Who developed this, when, where, and why? 8 | - Usage: Who uses this algorithm today? Where is it useful? 9 | - Implementation: What is the pseudocode of this algorithm? Demonstrate the algorithm visually, if possible (e.g. diagrams, animations) so that people can understand. 10 | - How fast is this algorithm, or what is the complexity (Big O notation)? 11 | 12 | ### Algorithms 13 | Merge Sort 14 | Bubble Sort 15 | Binary Search 16 | MapReduce 17 | Dijkstra's Algorithm 18 | RSA Algorithm 19 | -------------------------------------------------------------------------------- /archive/topic_resources/animal_farm/bird.rb: -------------------------------------------------------------------------------- 1 | class Bird 2 | attr_accessor :feathers 3 | 4 | def initialize(options = {}) 5 | @feathers = options[:feathers] || rand(1..100) 6 | end 7 | 8 | def preen 9 | puts "I am cleaning my feathers." 10 | end 11 | 12 | def fly 13 | puts "I am flying." 14 | end 15 | end 16 | class Penguin < Bird 17 | end -------------------------------------------------------------------------------- /archive/topic_resources/animal_farm/dog.rb: -------------------------------------------------------------------------------- 1 | class Dog 2 | attr_accessor :breed 3 | 4 | def initialize(options = {}) 5 | @breed = options[:breed] || "Mutt" 6 | end 7 | end 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | class Lab < Dog 34 | attr_accessor :name 35 | 36 | def initialize(options = {}) 37 | super(options) 38 | @name = options[:name] 39 | end 40 | end -------------------------------------------------------------------------------- /archive/topic_resources/animal_farm/penguin.rb: -------------------------------------------------------------------------------- 1 | require './bird.rb' 2 | 3 | class Penguin < Bird 4 | def fly 5 | puts "Sorry. I'd rather swim." 6 | end 7 | end -------------------------------------------------------------------------------- /archive/topic_resources/async-programming.md: -------------------------------------------------------------------------------- 1 | # Asynchronous Programming 2 | 3 | This lesson will teach you about programming in an asynchronous environment and the pitfalls of this 4 | 5 | 6 | ### Event loop review 7 | * Review concept of event loop call stack 8 | 9 | ### Callbacks 10 | * Examples of mousedown/click/touch 11 | * Handling the context of the event in the callback 12 | 13 | ### Error handling 14 | * try/catch/finally 15 | * callback( happy, err ); 16 | 17 | ### Handling async data (nesting functions) 18 | * ajax example 19 | -------------------------------------------------------------------------------- /archive/topic_resources/baby_dragon.md: -------------------------------------------------------------------------------- 1 | Bronze 2 | ------ 3 | (See Learning to Program, Chapter 13, p.108-111) 4 | 5 | Silver 6 | ------ 7 | Create an interactive baby dragon. Write a program that lets you enter commands such as __feed__ and __walk__ and calls those methods 8 | on your dragon. Since you are inputting just strings, you will need some sort of __method dispatch__, where your program checks which string was entered and then calls the appropriate method. -------------------------------------------------------------------------------- /archive/topic_resources/baby_dragon_fancify.md: -------------------------------------------------------------------------------- 1 | ## SO FANCY! 2 | 3 | ### Update the Baby Dragon 4 | #### Include at least 2 of the items from the list below 5 | + Add the ability to give the dragon water and have the dragon track it's thirst. Be sure to enforce consequences if time continues to pass and no water is given to the dragon. 6 | + Add a color attribute for each baby dragon which will directly correlate to some sort of special behavior (your choice). 7 | + Add another behavior of your choice: 8 | + crying or being upset 9 | + any other behavior you can think of! 10 | + ASCII text representation of any/all of the different behaviors (feeding, walking, etc.) 11 | 12 | ### Presentation 13 | At the end of this exercise you will be presenting to the group what new functionality you have come up with. Be prepared to include: 14 | + Demo new functionality 15 | + Decisions your group made about updating the passage_of_time method 16 | + Challenges your group faced and how you overcame them -------------------------------------------------------------------------------- /archive/topic_resources/basic_objects/baker.rb: -------------------------------------------------------------------------------- 1 | class Baker 2 | attr_accessor :rolling_pin, :apron, :ovens 3 | attr_reader :eggs, :butter, :sugar, :flour 4 | 5 | def initialize(options_hash) 6 | @flour = 2 7 | @butter = 5 8 | @sugar = 3 9 | @eggs = 23 10 | @rolling_pin = options_hash[:rolling_pin] 11 | @apron = options_hash[:apron] 12 | @ovens = options_hash[:ovens] 13 | end 14 | 15 | def turn_off_ovens 16 | @ovens.each do |oven| 17 | oven.on = false 18 | end 19 | 20 | puts "Ok, its safe to go home! Good night!" 21 | end 22 | 23 | def make_cookies 24 | heat_oven(find_a_free_oven, 375) 25 | # other steps in the recipe... 26 | # gather_ingredients(sugar, flour, eggs) 27 | # mix_ingredients_in_blender() 28 | # put_in_oven 29 | end 30 | 31 | private 32 | def find_a_free_oven 33 | @ovens.first 34 | end 35 | 36 | def heat_oven(baking_oven, temperature) 37 | baking_oven.set_temperature(temperature) 38 | end 39 | end -------------------------------------------------------------------------------- /archive/topic_resources/basic_objects/dog.rb: -------------------------------------------------------------------------------- 1 | require 'colorize' 2 | 3 | class Dog 4 | def speak 5 | "Bark bark!" 6 | end 7 | 8 | def move 9 | puts "trotting" 10 | end 11 | 12 | def color 13 | "White" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /archive/topic_resources/basic_objects/oven.rb: -------------------------------------------------------------------------------- 1 | class Oven 2 | attr_accessor :temperature, :racks, :on 3 | attr_reader :window, :timer, :clock, :color, :type 4 | 5 | def initialize(oven_options) 6 | @type = oven_options[:type] 7 | @window = oven_options[:window] 8 | @timer = oven_options[:timer] 9 | @clock = oven_options[:clock] 10 | @racks = oven_options[:racks] 11 | @color = oven_options[:color] 12 | @on = false 13 | end 14 | 15 | def set_temperature(temperature) 16 | @temperature = temperature 17 | puts "The temperature is now #{temperature}" 18 | end 19 | 20 | def open_door 21 | 22 | end 23 | 24 | def check_timer 25 | 26 | end 27 | 28 | def clean 29 | 30 | end 31 | end 32 | 33 | oven = Oven.new({:type => "gas", :color => "steel", :racks => 2}) -------------------------------------------------------------------------------- /archive/topic_resources/basic_objects/snake.rb: -------------------------------------------------------------------------------- 1 | class Snake 2 | def speak 3 | "hiiiiissssss" 4 | end 5 | 6 | def move 7 | puts "slithering" 8 | end 9 | 10 | def color 11 | "green" 12 | end 13 | end -------------------------------------------------------------------------------- /archive/topic_resources/battleship.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/battleship.md -------------------------------------------------------------------------------- /archive/topic_resources/book.md: -------------------------------------------------------------------------------- 1 | # Exploring attr_accessor 2 | 3 | The following example show a duplicative example of the method defined manually and those defined using `attr_accessor` and `attr_reader` 4 | 5 | class Book 6 | # The following attr_accessor methods defines a `getter` and `setter` method for `title` and `author` 7 | # Line 4 accomplishes what is written between Lines 9-23 8 | attr_accessor :title, :author 9 | # attr_reader is similar to attr_accessor, but only defines a `setter` method. 10 | #Line 7 accomplishes what is written between Lines 25-27. 11 | attr_reader :pages 12 | 13 | def title 14 | @title 15 | end 16 | 17 | def title=(title_var) 18 | @title = title_var 19 | end 20 | 21 | def author 22 | @author 23 | end 24 | 25 | def author=(author_var) 26 | @author = author_var 27 | end 28 | 29 | def pages 30 | @pages 31 | end 32 | 33 | end # end Book 34 | 35 | Note: Much of this lesson is live coded, showing the defined methods using a manual approach compared to attr_accessor -------------------------------------------------------------------------------- /archive/topic_resources/bootstrap.md: -------------------------------------------------------------------------------- 1 | # Bootstrap 2 | 3 | Bootstrap is an open source project started by Twitter. It is a front-end HTML, CSS, 4 | & Javascript framework. It provides tools and standards for creating common web elements. 5 | One of it's main features is a responsive (different size screens) grid system. But it also 6 | includes things like default styles for common elements, icons, and even javascript features 7 | such as modals, tooltips, and image slideshows. 8 | 9 | Installation 10 | ------------ 11 | There are many ways to install bootstrap, it is possible to use Less or Sass to compile 12 | the CSS on the fly, this allows you to change the defaults within bootstrap by simply 13 | changing variables. There is a ruby gem which enables this but we're going to take the 14 | easy way out and just download the raw CSS. Go to [Bootstrap](http://getbootstrap.com/getting-started/#download) 15 | and click on the "Download Bootstrap" button. This will download all of the CSS, JS, and fonts. 16 | 17 | ### References 18 | [Bootstrap Docs](http://getbootstrap.com/getting-started/) 19 | [W3Schools Tutorial](http://www.w3schools.com/bootstrap/default.asp) 20 | [Bootstrap-Sass Gem](https://github.com/twbs/bootstrap-sass) 21 | -------------------------------------------------------------------------------- /archive/topic_resources/break-project.md: -------------------------------------------------------------------------------- 1 | # Break Project 2 | 3 | Create an application during your break. The app can be anything that you want! Here are some examples to get creative juices flowing: 4 | 5 | - http://thissocks.herokuapp.com/ (Blake's C1 project) 6 | - http://bksydg.com/ 7 | - http://whatcoloristheempirestatebuilding.com/ 8 | - http://www.shibui.me/web/scroll/index.html (pretty intense, but you get the idea) 9 | - http://stewd.io/pong/ (again intense) 10 | - http://www.rikeripsum.com 11 | -------------------------------------------------------------------------------- /archive/topic_resources/button-for-cloning-fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/button-for-cloning-fork.png -------------------------------------------------------------------------------- /archive/topic_resources/c3-shipping-teams.md: -------------------------------------------------------------------------------- 1 | ## Shipping Service Teams and bEtsys 2 | 3 | ## Teams and branches 4 | [Black Hats](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/black-hats/master) 5 | Brittany & Carly 6 | Kyna & Kari 7 | 8 | [Petsy](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/team-petsy-new/master) 9 | Sally & Shanna 10 | Elsa & Marleigh 11 | 12 | [Bitsy](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/malenkiy/master) 13 | Ashley & Katie 14 | Amira & Michelle 15 | 16 | [Primo](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/80sAdies/master) 17 | Corinne & Lila 18 | Brenna & Wang 19 | 20 | [Tux](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/tux/master) 21 | Loraine & Elia 22 | Victoria & Brandi 23 | 24 | [CosMade](https://github.com/Ada-Developers-Academy/C3Projects--bEtsy/tree/KittyPuppyGoddesses/master) 25 | Anita & Jeri 26 | Lindsey & Alice 27 | -------------------------------------------------------------------------------- /archive/topic_resources/canvas-intro-and-drawing-part-two.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/canvas-intro-and-drawing-part-two.md -------------------------------------------------------------------------------- /archive/topic_resources/canvas-intro-and-drawing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/canvas-intro-and-drawing.md -------------------------------------------------------------------------------- /archive/topic_resources/capstone/c4-due-dates.md: -------------------------------------------------------------------------------- 1 | ## C4 Capstone Details 2 | 3 | ## Due Dates 4 | 5 | ### Idea 6 | [Preliminary Concept](../capstone/concept.md) 7 | Due Tuesday 2/16 8 | 9 | ### Product Plan 10 | [Details](../capstone/product-plan.md) 11 | Due Monday 2/22 12 | 13 | ## [Capstone Groups](../capstone/groups.md) 14 | **PM: Charles** 15 | - Desiree, Becca, Lauren 16 | - Meighan, Jennie, Emily 17 | - Brittany, Tammy, Riley 18 | - Jenna, Annalee, Daphne 19 | 20 | **PM: Kari** 21 | - Katherine, Sarah, Kelly 22 | - Hailey, Logan, Amy, Claire 23 | - Ricky, Audrey, Jessica 24 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/c5-due-dates.md: -------------------------------------------------------------------------------- 1 | # C5 Capstone Details 2 | 3 | ## Upcoming Deliverables 4 | 1. [Preliminary Concept](../capstone/concept.md)--Due Friday 7/15 5 | 1. [Product Plan](../capstone/product-plan.md)--Due Sunday 7/24 6 | 7 | ## [Capstone Groups](../capstone/groups.md) 8 | **PM: Jeremy** 9 | TBD 10 | 11 | **PM: Charles** 12 | TBD 13 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/concept.md: -------------------------------------------------------------------------------- 1 | # Capstone Concept 2 | The first deliverable for the capstone project is the initial concept. This is your first opportunity to share your capstone ideas and research with your instructor. 3 | 4 | You should complete this exercise for any ideas that are still in consideration at the time that it is due. You should have __no more than three ideas__ at this stage. 5 | 6 | ## Concept Components 7 | 1. __Problem Statement__: A clear, concise statement describing the problem your project will solve. 8 | 1. __Draft Feature Set__: A detailed outline of all major feature sets that will result in the minimum viable product 9 | 1. __Draft Technology Choices__: This does not need to be final, but you should have an idea of which of [these](./features.md) technologies you would like to use to accomplish this project 10 | 11 | ## Format 12 | Since most of the capstone deliverables will be included in your final repository, please create this document in markdown format. 13 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/features.md: -------------------------------------------------------------------------------- 1 | # Capstone Technology Features 2 | One of the most exciting and challenging things about the capstone project is learning new technologies to integrate into your project. 3 | 4 | ### Technology Features 5 | - Choose at least __four__ technology features, examples: 6 | - Background/Async Jobs (sending emails, confirming registrations) 7 | - NoSql (MongoDB) 8 | - Content Delivery Network (CDN) 9 | - Payment Processing (Stripe) 10 | - Front-end Framework (React, Ember, Angular, Backbone, etc.) 11 | - Backend technology (Node) 12 | - Backend Language (Python, Java, Elixir, etc.) 13 | - Web App Framework (Django, Flask, Node Express) 14 | - MEAN Stack 15 | - Third-party OAuth (logging in w/ Twitter, Github, etc.) 16 | - Visualization tools (high charts, D3) 17 | - Secure Socket Layer (SSL) 18 | - Content Management System (CMS) 19 | - Internationalization (i18n) 20 | - Live Events (notifications, live updates) 21 | - Service Oriented Architecture (SOA) 22 | - S3 storage/delivery 23 | - Secure Public API (documented) 24 | - Dev Ops Tools (Docker, Chef, Puppet, Jenkins, Travis, etc.) 25 | 26 | This is not an exhaustive list, so there many be technologies and tools that you would like to use that are not on this list. 27 | 28 | __Instructors will verify that your choices for technology features are appropriate__ 29 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/presentation.md: -------------------------------------------------------------------------------- 1 | # Capstone Presentation 2 | The capstone presentation highlights your application as the culmination of your work at Ada. 3 | It should be __no more than 5 minutes__ in length and should have the following components: 4 | 5 | - What problem does the app solve? Who does it solve it for? 6 | - What are 1-2 major features of the application, demoed from the eyes of a user? 7 | - Optional: Exciting or interesting technologies you used 8 | - Optional: What was one interesting technical challenge you overcame? 9 | - Optional: Future enhancements 10 | 11 | Prior to demoing, you should have the following: 12 | - Each group should coordinate to use two computers for the demos in your group (first 3 or 4 people, and last 3 or 4 people). It would be best to choose one with an HDMI port. 13 | - Dry run at least 2x prior to the demo, in front of someone else 14 | - Know the sequence of events that you will execute to show the features you want to demo 15 | - Prepare slides for any non-app talking points 16 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/product-plan.md: -------------------------------------------------------------------------------- 1 | # Capstone Product Plan 2 | The second deliverable for the capstone is your product plan. 3 | 4 | ## Product Plan Components 5 | 1. __Problem Statement__: A clear, concise statement describing the problem your project will solve. Re-use the problem statement from the conceptual delivery or re-write for 6 | 1. __Market Research__: Outline the key insights from your research, including: 7 | - your application’s competition - what alternatives are already out there (competing apps and/or non-app solutions) 8 | - research from users on why these alternatives do not effectively address the problem. 9 | - differentiation: what makes your idea/product different 10 | 1. __User Personas__: A summary of your main target user group(s). What are their key characteristics? How do those characteristics factor into project/app/idea? 11 | 1. __Trello Board__: 12 | - Flesh out the feature set that you created in the conceptual delivery to get started with your Trello board 13 | 1. __Optional__: 14 | - Technology selections 15 | - Wireframes 16 | 17 | ## Format 18 | Since the Product Plan is part of your final deliverable and should be included in your repository, it would be easiest to do this initial draft in a markdown format for easy transferability to GitHub. 19 | -------------------------------------------------------------------------------- /archive/topic_resources/capstone/proposed-schedule.markdown: -------------------------------------------------------------------------------- 1 | # Tentative Lecture Calendar 2 | ## Week 1 3 | - PostgreSql 4 | - Rails app security w/Brakeman 5 | - i18n 6 | - Lots of Senior Engineer and PM volunteers. We cannot have enough. 7 | 8 | ## Week 2 9 | - registering a domain name and configuring DNS 10 | - how to stand up a server 11 | 12 | ## Week 3 13 | - S3 storage/delivery w/ CarrierWave 14 | - SSL 15 | - CDN 16 | 17 | ## Week 4 18 | - caching 19 | - server performance tools (NewRelic?) 20 | - we should also make sure we have volunteers lined up to do code and project reviews starting this week 21 | 22 | ## Week 5 - Projects Due! 23 | - No lectures. Focus on delivery. 24 | - As many TAs as we can get. 25 | -------------------------------------------------------------------------------- /archive/topic_resources/cd-into-clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/cd-into-clone.png -------------------------------------------------------------------------------- /archive/topic_resources/cd-solar-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/cd-solar-system.png -------------------------------------------------------------------------------- /archive/topic_resources/chair.rb: -------------------------------------------------------------------------------- 1 | class Chair 2 | def name 3 | "Vilgot" 4 | end 5 | 6 | def weight_in_lbs 7 | 29 8 | end 9 | 10 | def type 11 | "Swivel" 12 | end 13 | 14 | def color 15 | "Black" 16 | end 17 | 18 | def max_height 19 | 23.625 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /archive/topic_resources/chart.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/chart.JPG -------------------------------------------------------------------------------- /archive/topic_resources/checkout-jnf-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/checkout-jnf-master.png -------------------------------------------------------------------------------- /archive/topic_resources/clone-project-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/clone-project-master.png -------------------------------------------------------------------------------- /archive/topic_resources/clone-url-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/clone-url-button.png -------------------------------------------------------------------------------- /archive/topic_resources/clone-your-fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/clone-your-fork.png -------------------------------------------------------------------------------- /archive/topic_resources/code_climate.md: -------------------------------------------------------------------------------- 1 | Code Climate 2 | ------------ 3 | 4 | One of the requirements for the capstone project is 5 | 6 | ``` 7 | B- or greater score on Code Climate 8 | ``` 9 | 10 | Code Climate bills itself as an "automated code review" tool. What it does is use code metric tools to analyze a github repo for common code problems using these metrics: 11 | 12 | + complexity 13 | + churn 14 | + duplication 15 | + code smells 16 | 17 | It then generates a report card for your project, listing the problems it found, and giving some general advice on how to address those issues. 18 | 19 | Code Climate is free for public repos and OSS on Github. 20 | 21 | [Live Demo] 22 | -------------------------------------------------------------------------------- /archive/topic_resources/colorize.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Gems! 4 | ===== 5 | 6 | **Gems** in Ruby are what other languages call **libraries** - self-contained bundles of code that you can (relatively) easily add to your project. 7 | 8 | 9 | !SLIDE title-and-content transition=fade 10 | 11 | Finding Gems 12 | ============ 13 | 14 | There are thousands of gems available through RubyGems, all of which are open source and free to use. 15 | 16 | http://rubygems.org 17 | 18 | Ruby Toolbox is a gem review site to help you find the right gem for the job. 19 | 20 | http://www.ruby-toolbox.com/ 21 | 22 | 23 | !SLIDE title-and-content transition=fade 24 | 25 | Using Gems 26 | ========== 27 | 28 | We're going to experiment with a gem called *colorize*. 29 | 30 | ``` 31 | gem install colorize 32 | ``` 33 | 34 | *https://github.com/fazibear/colorize* 35 | 36 | 37 | !SLIDE text-size-80 title-and-content transition=fade 38 | 39 | Let's Do This! 40 | ============== 41 | 42 | Let's make a planetary system! 43 | 44 | + Add *colorize* to one of your projects and decorate what it *puts* 45 | 46 | 47 | -------------------------------------------------------------------------------- /archive/topic_resources/come_to_my_party.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | "Come To My Party!" 4 | =================== 5 | 6 | Have you ever had the experience of not seeing something until it was pointed out to you.. and then once you see it, you can't imagine how you missed it in the first place? Let's play a game... 7 | 8 | 9 | -------------------------------------------------------------------------------- /archive/topic_resources/command-line-skills-upgrade/try-it.md: -------------------------------------------------------------------------------- 1 | # Try your command line skills 2 | 3 | Yes, you could do some of this stuff without the command line, but since we're practicing the command line, let's use that! 4 | 5 | Before actually tackling this list and executing commands, first list out which commands you think you'll use for each task. Compare your list with someone else before you get hackin'. 6 | 7 | 1. [Go back in time](https://github.com/Ada-Developers-Academy/daily-curriculum/tree/ee543f7035dbc10f41850ba0804903ec98d26927) and download the Ada daily-curriculum repo as of Feb 2015 8 | 2. Rename the directory to `daily-curriculum-old` 9 | 3. Make a copy of the entire directory called `daily-curriculum-new` 10 | 4. Move all the files from `week/day/` to a new folder called `topic_resources` 11 | 5. Fix all the now-broken links to `topic_resources/*` 12 | 6. Remove all topic_resources that are not mentioned in any weekly_overview.md 13 | 7. Move stray files in `/` to `/topic_resources/` IFF they are actually referenced somewhere, otherwise, delete them. 14 | 15 | ### Optional Challenges 16 | + Move the contents of each `weekly_overview.md` into one file called `cohort_calendar.md` 17 | + Delete all the empty directories 18 | + Repeat this process for `intern_weeks/` 19 | 20 | ### Things you could fix on the real Ada daily-curriculum 21 | + Consistency with - or _ in file/folder names 22 | + UGH The table dividers not aligning on the cohort_schedules pages 23 | + There's probably more... 24 | -------------------------------------------------------------------------------- /archive/topic_resources/comment.rb: -------------------------------------------------------------------------------- 1 | class Comment 2 | attr_accessor :content, :created_at 3 | attr_reader :post_id, :author_id 4 | 5 | def initialize(row) 6 | @content = row[0] 7 | @created_at = row[1] 8 | @post_id = row[2] 9 | @author_id = row[3] 10 | end 11 | 12 | def formatted_content 13 | "#{content}\n#{created_at.strftime('%A, %b %d')} | by #{author.name}" 14 | end 15 | 16 | def post 17 | Post.find(@post_id) 18 | end 19 | 20 | def author 21 | Author.find(@author_id) unless anonymous? 22 | end 23 | 24 | def anonymous? 25 | @author_id.nil? 26 | end 27 | 28 | def self.find_by_post(id) 29 | all.find_all { |comment| comment.post_id == id } 30 | end 31 | 32 | def self.all 33 | CSV.read('path/to.csv').map {|row| Comment.new(row) } 34 | end 35 | 36 | end 37 | -------------------------------------------------------------------------------- /archive/topic_resources/commit-name-to-rubric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/commit-name-to-rubric.png -------------------------------------------------------------------------------- /archive/topic_resources/crash-test-dummy-passenger-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/crash-test-dummy-passenger-error.png -------------------------------------------------------------------------------- /archive/topic_resources/css-d&c.md: -------------------------------------------------------------------------------- 1 | # CSS Divide & Conquer 2 | 3 | - margin/padding (short-hand, difference) 4 | - font (web-safe, descending priority, short-hand) 5 | - lists (ol, ul, short-hand, nesting) 6 | - table (th, tr, td, thead, tbody) 7 | - link (in-page anchors, external link, pseudo/state classes) 8 | - display (block, inline, inline-block, none) 9 | -------------------------------------------------------------------------------- /archive/topic_resources/database/advanced_db.md: -------------------------------------------------------------------------------- 1 | 2 | ## Trigger 3 | 4 | ## Procedure 5 | 6 | ## Indexes 7 | 8 | ## Sorting 9 | 10 | ## Grouping 11 | 12 | ## Joins 13 | -------------------------------------------------------------------------------- /archive/topic_resources/datastructures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/datastructures.pdf -------------------------------------------------------------------------------- /archive/topic_resources/date-time.md: -------------------------------------------------------------------------------- 1 | # Date & DateTime 2 | 3 | Date 4 | ----- 5 | The Date class is the first that we will use that is not loaded by default in Ruby. There are many classes that are not part of the core language. To use these methods we need to use `require "date"` in any scripts or irb. 6 | 7 | The Date class create objects that represent any date, in the past, present, or future. 8 | 9 | ```ruby 10 | require 'date' 11 | 12 | date = Date.new(2014, 9, 6) # YYYY, MM, DD 13 | date.day = 6 14 | date.month = 9 15 | date.year = 2014 16 | 17 | date + 1 # => the next day 18 | 19 | date.leap? # => true or false for leap year 20 | date.monday? # => false 21 | ``` 22 | 23 | `DateTime` inherits from `Date`, which means it has all of the same methods as date, but includes methods to handle a time in a date as well 24 | 25 | ```ruby 26 | require "date" 27 | 28 | datetime = DateTime.now 29 | datetime.zone # => "-07:00" 30 | datetime.hour # => 20 31 | datetime.minute # => 47 32 | 33 | datetime - (365 * 10) # => 10 years ago, except 2 leap days :( 34 | ``` 35 | -------------------------------------------------------------------------------- /archive/topic_resources/db_example/db_example.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/db_example/db_example.sqlite3 -------------------------------------------------------------------------------- /archive/topic_resources/db_example/lib/person.rb: -------------------------------------------------------------------------------- 1 | require 'sqlite3' 2 | $db = SQLite3::Database.new('db_example.sqlite3') 3 | $db.results_as_hash = true 4 | # CREATE THE `people` TABLE 5 | 6 | class Person 7 | attr_accessor :id, :name 8 | 9 | 10 | def initialize(attrs_array=[]) 11 | @id = attrs_array["id"] 12 | @name = attrs_array["name"] 13 | end 14 | 15 | def self.find(id) 16 | data = $db.execute("select * from people WHERE id = #{id} LIMIT 1") 17 | Person.new(data.first) 18 | end 19 | 20 | def self.all 21 | $db.execute("select * from people") 22 | end 23 | 24 | def self.last 25 | $db.execute("select * from people").last 26 | end 27 | 28 | def self.create(attrs={}) 29 | $db.execute('INSERT INTO people (name, age, gender, job) VALUES ("Bookis", 25, "Male", "boy")') 30 | Person.new(last) 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /archive/topic_resources/db_example/spec/lib/person_spec.rb: -------------------------------------------------------------------------------- 1 | require 'person' 2 | 3 | describe Person do 4 | before { $db.execute('DELETE FROM people') } 5 | describe "database" do 6 | it "should return an instance of a db" do 7 | $db.should be_a SQLite3::Database 8 | end 9 | end 10 | 11 | describe "#all" do 12 | it "finds one person" do 13 | $db.execute('INSERT INTO people (name, age, gender, job) VALUES ("Bookis", 25, "Male", "boy")') 14 | Person.all.count.should eq 1 15 | end 16 | end 17 | 18 | describe "find" do 19 | let(:person) { Person.create(name: "Bookis") } 20 | it "finds the person with id 1" do 21 | person 22 | Person.find(1).id.should eq 1 23 | end 24 | end 25 | 26 | describe "create" do 27 | let(:person) { Person.create(name: "Bookis") } 28 | it "should create a new person" do 29 | person 30 | Person.all.count.should eq 1 31 | end 32 | 33 | it "returns a person object" do 34 | person.should be_a Person 35 | end 36 | 37 | it "should assign the name" do 38 | person.name.should eq "Bookis" 39 | end 40 | end 41 | end -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/debugging-sample/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/doc/crossdomain.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # crossdomain.xml 5 | 6 | A cross-domain policy file is an XML document that grants a web client—such as 7 | Adobe Flash Player, Adobe Reader, etc., permission to handle data across 8 | multiple domains. When a client hosts content from a particular source domain 9 | and that content makes requests directed towards a domain other than its own, 10 | the remote domain would need to host a cross-domain policy file that grants 11 | access to the source domain, allowing the client to continue with the 12 | transaction. Policy files grant read access to data, permit a client to include 13 | custom headers in cross-domain requests, and are also used with sockets to 14 | grant permissions for socket-based connections. 15 | 16 | For full details, check out Adobe's article about the [cross-domain policy file 17 | specification](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html). 18 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/doc/js.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The JavaScript 5 | 6 | Information about the default JavaScript included in the project. 7 | 8 | ## main.js 9 | 10 | This file can be used to contain or reference your site/app JavaScript code. 11 | For larger projects, you can make use of a JavaScript module loader, like 12 | [Require.js](http://requirejs.org/), to load any other scripts you need to 13 | run. 14 | 15 | ## plugins.js 16 | 17 | This file can be used to contain all your plugins, such as jQuery plugins and 18 | other 3rd party scripts. 19 | 20 | One approach is to put jQuery plugins inside of a `(function($){ ... 21 | })(jQuery);` closure to make sure they're in the jQuery namespace safety 22 | blanket. Read more about [jQuery plugin 23 | authoring](http://docs.jquery.com/Plugins/Authoring#Getting_Started) 24 | 25 | ## vendor 26 | 27 | This directory can be used to contain all 3rd party library code. 28 | 29 | Minified versions of the latest jQuery and Modernizr libraries are included by 30 | default. You may wish to create your own [custom Modernizr 31 | build](http://www.modernizr.com/download/). 32 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/doc/misc.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Miscellaneous 5 | 6 | ## .gitignore 7 | 8 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should 9 | primarily be used to avoid certain project-level files and directories from 10 | being kept under source control. Different development-environments will 11 | benefit from different collections of ignores. 12 | 13 | OS-specific and editor-specific files should be ignored using a "global 14 | ignore" that applies to all repositories on your system. 15 | 16 | For example, add the following to your `~/.gitconfig`, where the `.gitignore` 17 | in your HOME directory contains the files and directories you'd like to 18 | globally ignore: 19 | 20 | ```gitignore 21 | [core] 22 | excludesfile = ~/.gitignore 23 | ``` 24 | 25 | * More on global ignores: http://help.github.com/ignore-files/ 26 | * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore 27 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/debugging-sample/favicon.ico -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | -- -- 7 | 8 | # THANKS 9 | 10 | 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | HTML5, CSS3 15 | Normalize.css, jQuery, Modernizr 16 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/img/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/debugging-sample/img/.gitignore -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |

Hello world!

18 | 19 |
    20 |
  • First item
  • 21 |
  • Second item
  • 22 |
  • Third item
  • 23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/js/main.js: -------------------------------------------------------------------------------- 1 | var foo = function (x) { 2 | var y = x; 3 | console.log(x); 4 | 5 | return x; 6 | }; 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /archive/topic_resources/debugging-sample/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /archive/topic_resources/dev_tools.md: -------------------------------------------------------------------------------- 1 | # Chrome DevTools 2 | 3 | Getting into the Chrome DevTools: 4 | 5 | * Right-click and element and select "Inspect Element" 6 | 7 | * Click the triple line menu in the upper right corner of the 8 | browser. Then "Tools" (or "More Tools") > "Developer Tools" 9 | 10 | * Via the Command-Option-I keyboard shortcut 11 | 12 | The three most useful tabs (to begin with): 13 | 14 | * Elements: inspect and edit DOM and CSS/computed styles 15 | 16 | * Sources: edit sources and set breakpoints. 17 | 18 | * Console: interact with live JS 19 | 20 | ## Resources 21 | 22 | * [JavaScript Debugging For Beginners](juliepagano.com/blog/2014/05/18/javascript-debugging-for-beginners/) 23 | 24 | * [Code School for Chrome DevTools](http://discover-devtools.codeschool.com/) 25 | 26 | * [Postman Chrome Extension](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en) 27 | 28 | * [Chrome Documentation](https://developer.chrome.com/devtools/index) 29 | 30 | * [Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer/) 31 | -------------------------------------------------------------------------------- /archive/topic_resources/dice/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format NyanCatMusicFormatter -------------------------------------------------------------------------------- /archive/topic_resources/dice/README.md: -------------------------------------------------------------------------------- 1 | Dice Set 2 | ======== 3 | Implement a Dice class that passes the spec provided. Run the spec by running ```rspec``` from *daily_curriculum//week4/resources/dice* (Note that you may also need to run ```gem install nyan-cat-formatter```) 4 | 5 | The spec should all fail, complaining about 6 errors - this is expected! No need to be alarmed or overwhelmed. Read through the spec file (in *spec/lib/dice_spec.rb*) to get a sense of what it expects our Dice class to do, and address the failing specs one at a time. 6 | 7 | (From Ruby Koans) 8 | -------------------------------------------------------------------------------- /archive/topic_resources/dice/lib/dice.rb: -------------------------------------------------------------------------------- 1 | # Implement a Dice Class here: 2 | # 3 | class Dice 4 | end -------------------------------------------------------------------------------- /archive/topic_resources/dice/lib/dice_solution.rb: -------------------------------------------------------------------------------- 1 | # Implement a Dice Class here: 2 | # 3 | class Dice 4 | attr_reader :values 5 | 6 | def roll(number_to_roll = 1) 7 | @values = [] 8 | 9 | number_to_roll.times { @values << rand(1..6) } 10 | 11 | @values 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /archive/topic_resources/dictionary/words.rb: -------------------------------------------------------------------------------- 1 | class Words 2 | FILE = File.expand_path(File.dirname(__FILE__) + '/unsorted_words') 3 | 4 | def initialize 5 | @words = [] 6 | 7 | File.open(FILE).each do |line| 8 | @words << line.chomp 9 | end 10 | end 11 | 12 | def remaining_words 13 | @words.length 14 | end 15 | 16 | def next_word 17 | @words.shift 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /archive/topic_resources/digraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/digraph.png -------------------------------------------------------------------------------- /archive/topic_resources/dns-a-record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/dns-a-record.png -------------------------------------------------------------------------------- /archive/topic_resources/dom-part-deux.md: -------------------------------------------------------------------------------- 1 | # DOM part 2 2 | 3 | This lesson we're reach even further into the DOM 4 | 5 | 6 | ### Review - Create Element, put in place 7 | * doc.createElement 8 | * el.appendChild 9 | 10 | ### Create Object, add method to its prototype 11 | * `var Foobarer = function(){};` 12 | * `Foobarer.prototype.foobar = function(){};` 13 | 14 | 15 | ### Create event listener, attach to element, callback should be prototype method 16 | 17 | 18 | ### Create custom event, dispatch event. 19 | -------------------------------------------------------------------------------- /archive/topic_resources/doubly_linked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/doubly_linked.png -------------------------------------------------------------------------------- /archive/topic_resources/dynamic-typing-coercion-equality.md: -------------------------------------------------------------------------------- 1 | # Dynamic Typing, Coercion, and Equality 2 | 3 | This lesson will focus on JavaScript's Dynamic and weakly-typed type 4 | system. Through that, we will learn the pitfalls of implicit coercions 5 | and how to even begin to try to handle comparisons 6 | 7 | 8 | 9 | ### Static vs. Dynamic Typing 10 | * Ruby has dynamic typing, so does JS 11 | * Stating your type when declaring variables 12 | 13 | 14 | ### Strong vs. Weak Typing 15 | * Are types coerced? 16 | * Ruby is strongly typed, JS is weakly typed 17 | * How does that affect you? 18 | 19 | 20 | ### 3 + true === 4 21 | * Coercion 22 | * "5" / "2" //=> 2.5 && 5/2 //=> 2.5 23 | * "5"/"sandwich" //=> NaN 24 | 25 | 26 | ### [] + [] == "" && [] !== "" 27 | * Arrays and Objects can be coerced into String as well. 28 | * == vs === 29 | 30 | -------------------------------------------------------------------------------- /archive/topic_resources/ec2-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/ec2-confirm.png -------------------------------------------------------------------------------- /archive/topic_resources/emitter.rb: -------------------------------------------------------------------------------- 1 | class EventEmitter 2 | def initialize 3 | @events = {} 4 | end 5 | 6 | def trigger(event_name, *value) 7 | return nil unless @events[event_name] 8 | 9 | @events[event_name].each do |event| 10 | event.call(*value) 11 | end 12 | end 13 | 14 | def on(event_name, &block) 15 | if @events[event_name] 16 | @events[event_name] << block 17 | else 18 | @events[event_name] = [block] 19 | end 20 | end 21 | end 22 | 23 | e = EventEmitter.new 24 | 25 | e.trigger('new_user') 26 | 27 | e.on('new_user') { |user| puts "#{user} Subscribed!" } 28 | e.trigger('new_user', 'Fred') 29 | 30 | # Fred Subscribed! 31 | 32 | e.on('new_user') { |user| puts "Gotta remember to email #{user}!" } 33 | e.trigger('new_user', 'Thelma') 34 | 35 | # Thelma Subscribed! 36 | # Gotta remember to email Thelma! 37 | 38 | e.on('new_user') { |user, company| puts "#{user} from #{company} has subscribed!" } 39 | e.trigger('new_user', 'Louise', 'Twitter, Inc') 40 | # Louise from Twitter, Inc has subscribed! -------------------------------------------------------------------------------- /archive/topic_resources/empowered_women.md: -------------------------------------------------------------------------------- 1 | ### Empowered Women 2 | (In no particular order) 3 | 4 | + Carol Shaw 5 | + Evelyn Boyd Granville 6 | + Edith Clarke 7 | + Dana Ulery 8 | + Ellen Ochoa 9 | + Weili Dai 10 | + Ursula Burns 11 | + Duy-Loan Le 12 | + Margaret Hamilton 13 | + Grace Hopper 14 | + Anita Borg 15 | + ENIAC Programmers 16 | 17 | 18 | ### Activity 19 | 20 | + Take one of the cards and with a partner research the woman on that card and try to answer the following Qs: 21 | - Who is she? 22 | - What is her background? 23 | - What has she accomplished? 24 | - Anything else important/interesting to know about her? 25 | -------------------------------------------------------------------------------- /archive/topic_resources/enumerable.md: -------------------------------------------------------------------------------- 1 | ## Enumerable 2 | 3 | Enumerable operates at it's core using the `each` method. When you call `map`, `map` is using `each`. 4 | 5 | #### map & collect 6 | 7 | [1,2,3].map { |n| n ** 2 } 8 | [1,2,3].collect { |n| n ** 2 } 9 | # => [1, 4, 9] 10 | 11 | #### sort & sort_by 12 | 13 | [1,3,6,3,2,346,6,7].sort 14 | # => [1, 2, 3, 3, 6, 6, 7, 346] 15 | 16 | alphabetical_products = Product.all.sort_by {|product| product.name } 17 | alphabetical_products.first 18 | # => # 19 | 20 | #### min, max, min_by, & max_by 21 | 22 | [1,2,4].max 23 | # => 4 24 | [1,2,4].min 25 | # => 1 26 | Sale.all.min_by { |sale| sale.amount } 27 | Sale.all.max_by { |sale| sale.amount } 28 | 29 | #### first(n) 30 | 31 | Sale.all.sort_by { |sale| sale.amount }.first(5) 32 | # Returns the 5 sales with the lowest amount 33 | 34 | #### group_by 35 | 36 | Product.all.group_by {|product| product.name.split.last } 37 | # Returns a hash, the keys being the name of the food type, the values being an array of products. 38 | 39 | #### find & detect 40 | 41 | ```ruby 42 | [1,2,3,4].find {|n| n < 3 } 43 | # => 1 44 | ``` 45 | 46 | #### find_all & select 47 | 48 | ```ruby 49 | [1,2,3,4].find_all {|n| n < 3 } 50 | # => [1,2] 51 | ``` 52 | -------------------------------------------------------------------------------- /archive/topic_resources/evens.rb: -------------------------------------------------------------------------------- 1 | numbers = ["a",1,1,3,4,5] 2 | 3 | # def evens(numbers) 4 | # array = [] 5 | # numbers.each {|n| array << n if n % 2 == 0} 6 | # return array 7 | # end 8 | 9 | # def evens(numbers) 10 | # numbers.collect {|n| n if n % 2 == 0}.compact 11 | # end 12 | 13 | def evens(numbers) 14 | array = [] 15 | numbers.each_with_index {|n, i| array << n if i % 2 == 0} 16 | array 17 | end 18 | 19 | 20 | def evens(numbers) 21 | array = [] 22 | i = 2 23 | while i < numbers.length 24 | array << numbers[i] 25 | i += 2 26 | end 27 | array 28 | end 29 | 30 | puts evens(numbers).inspect 31 | -------------------------------------------------------------------------------- /archive/topic_resources/events.md: -------------------------------------------------------------------------------- 1 | # Events 2 | 3 | This lesson will give a overview of JavaScript's Event system 4 | 5 | ### Event Loop 6 | * Single-threaded 7 | * Callbacks and the callback stack 8 | 9 | ### Attaching/Removing event listeners 10 | * addEventListener/removeEventListener 11 | 12 | ### Bubbling 13 | * cancelling/stopping propagation 14 | * preventing default 15 | 16 | 17 | ### Triggering your own events 18 | 19 | * CustomEvent! 20 | * Polyfill! 21 | * Side-track on Polyfilling 22 | -------------------------------------------------------------------------------- /archive/topic_resources/examples/week1/while_loops.rb: -------------------------------------------------------------------------------- 1 | i = 0 2 | numbers = [] 3 | 4 | while i < 6 5 | puts "At the top i is #{i}" 6 | numbers.push(i) 7 | 8 | i = i + 1 9 | puts "Numbers now: #{numbers}" 10 | puts "At the bottom i is #{i}" 11 | end 12 | 13 | puts "The numbers: " 14 | 15 | numbers.each do |num| 16 | puts num 17 | end 18 | 19 | # Next Steps 20 | # 1) Convert this while loop to a method that you can call, and replace 6 in the test (i < 6) with a variable. 21 | # 2) Now use this method to rewrite the script to try different numbers. 22 | # 3) Add another variable to the method arguments that you can pass in that lets you change the + 1 on line 8 so you can change how much it increments by. 23 | # 4) Rewrite the script again to use this method to see what effect that has. 24 | # 5) Now, write it to use for-loops and ranges instead. Do you need the incrementor in the middle anymore? What happens if you do not get rid of it? 25 | -------------------------------------------------------------------------------- /archive/topic_resources/examples/week8/recursion/factorials.rb: -------------------------------------------------------------------------------- 1 | def factorial(num = 0) 2 | return "Can not calculate factorial of a negative number" if num < 0 3 | 4 | if num <= 1 5 | 1 6 | else 7 | num * factorial(num - 1) 8 | end 9 | end 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /archive/topic_resources/examples/week8/recursion/hacky.rb: -------------------------------------------------------------------------------- 1 | class Integer 2 | def factorial(num = self) 3 | return "Can not calculate factorial of a negative number" if num < 0 4 | 5 | if num <= 1 6 | 1 7 | else 8 | num * factorial(num - 1) 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /archive/topic_resources/farm-race.md: -------------------------------------------------------------------------------- 1 | # Farm 2 | 3 | Create a menagerie of animals. 4 | 5 | Bronze 6 | ------ 7 | - Create an `Animal` class which all other animals will inherit from 8 | - Define a `talk`, `walk`, `eat`, and `poop`. 9 | - Create a class for `Mammal`, `Reptile`, and `Bird`, inherit these from `Animal` 10 | - Redefine `talk`, `walk`, `eat`, and `poop` for each type of animal that differs from the default method defined from `Animal` 11 | - Create child classes of specific animals (`Cow`, `Hawk`, `Lizard`, etc...) 12 | - Redefine `talk`, `walk`, `eat`, and `poop` for each type of animal that differs from the default method defined from any of their parent classes 13 | - Create a script that initiates each child type of animal and puts each of their actions. 14 | 15 | Silver 16 | ------ 17 | - Create a `Farm` class that has an attribute `animals`, which should be an array to add animal objects into. 18 | 19 | Gold 20 | ------ 21 | -------------------------------------------------------------------------------- /archive/topic_resources/fixnum/fixnum_monkey_patch.rb: -------------------------------------------------------------------------------- 1 | class Fixnum 2 | def seconds 3 | self 4 | end 5 | 6 | def minutes 7 | self * 60 8 | end 9 | 10 | def hours 11 | self * 60 * 60 12 | end 13 | 14 | def days 15 | self * 60 * 60 * 24 16 | end 17 | end -------------------------------------------------------------------------------- /archive/topic_resources/fizzbuzz.rb: -------------------------------------------------------------------------------- 1 | 1.upto(100).each do |n| 2 | if n % 15 == 0 3 | string = "FizzBuzz" 4 | elsif (n.to_f / 3).to_s.include?(".0") 5 | string = "Fizz" 6 | elsif (n.to_f / 5).to_s.include?(".0") 7 | string = "Buzz" 8 | else 9 | string = n 10 | end 11 | puts string 12 | end 13 | -------------------------------------------------------------------------------- /archive/topic_resources/fizzbuzz/fizzbuzz.rb: -------------------------------------------------------------------------------- 1 | 1.upto(100).each do |n| 2 | if (n.to_f / 3).to_s.include?(".0") && (n.to_f / 5).to_s.include?(".0") 3 | puts "FizzBuzz" 4 | elsif (n.to_f / 3).to_s.include? ".0" 5 | puts "Fizz" 6 | elsif (n.to_f / 5).to_s.include? ".0" 7 | puts "Buzz" 8 | else 9 | puts n 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /archive/topic_resources/fizzbuzz/fizzbuzz_of.rb: -------------------------------------------------------------------------------- 1 | class FizzbuzzOf 2 | 3 | def initialize(n) 4 | @n = n 5 | end 6 | 7 | def fizz_checker 8 | if @n % 15 == 0 9 | "FizzBuzz" 10 | elsif @n % 3 == 0 11 | "Fizz" 12 | elsif @n % 5 == 0 13 | "Buzz" 14 | else 15 | @n 16 | end 17 | end 18 | 19 | def string 20 | fizz_checker.to_s 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /archive/topic_resources/fizzbuzz/spec/fizzbuzz_of_spec.rb: -------------------------------------------------------------------------------- 1 | require './fizzbuzz_of' 2 | 3 | describe FizzbuzzOf do 4 | 5 | describe "#fizz_checker" do 6 | it "returns n as an Fixnum" do 7 | expect(FizzbuzzOf.new(1).fizz_checker).to eq 1 8 | end 9 | 10 | context "when divisible by 3" do 11 | it "returns 'Fizz'" do 12 | expect(FizzbuzzOf.new(3).fizz_checker).to eq "Fizz" 13 | end 14 | end 15 | 16 | context "when divisible by 5" do 17 | it "returns 'Buzz'" do 18 | expect(FizzbuzzOf.new(5).fizz_checker).to eq "Buzz" 19 | end 20 | end 21 | 22 | context "when divisible by 3 and 5" do 23 | it "returns 'FizzBuzz'" do 24 | expect(FizzbuzzOf.new(15).fizz_checker).to eq "FizzBuzz" 25 | end 26 | end 27 | end 28 | 29 | describe "#string" do 30 | it "returns n" do 31 | expect(FizzbuzzOf.new(1).string).to eq "1" 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /archive/topic_resources/flow-control.md: -------------------------------------------------------------------------------- 1 | # FLOW CONTROL ### true and false, if and else. `true` and `false` are unique objects (technically instances of `TrueClass` and `FalseClass`) They are the result of comparison operators - `>` Greater than? - `>=` Greater than or equal to? - `<` Less than? - `<=` Less than or equal to? - `==` Equal? - `!=` Not equal? ```ruby 1 > 0 # => true "hello" == "hello" # => true ``` ## Conditionals `if` and `else` allow you to control the flow of your program. The concept is pretty simple, read the following, you should be able to get a good idea of what the program will do ```ruby puts "Hey! What’s your name?" response = gets.chomp if response.downcase == 'computer' puts "Weird, that's my name too. Small world!" else puts "Wacky name!" end puts "Well, it was nice to meet you #{response}." ``` -------------------------------------------------------------------------------- /archive/topic_resources/flow-control.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/flow-control.pdf -------------------------------------------------------------------------------- /archive/topic_resources/fork-the-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/fork-the-project.png -------------------------------------------------------------------------------- /archive/topic_resources/get-to-know-you-games.md: -------------------------------------------------------------------------------- 1 | !SLIDE transition=fade 2 | 3 | Categories! 4 | 5 | 6 | Good or bad news? 7 | arms crossed - which is on top? 8 | Favorite movie genre? 9 | hand clasped - thumb on top? 10 | hot beverage? 11 | Cable TV? 12 | favorite pet? 13 | type of shoes 14 | season of the year you were born in? 15 | toiletpaper - over or under? 16 | which side of the bed do you get out of? 17 | mode of transport taken today -------------------------------------------------------------------------------- /archive/topic_resources/ghost.rb: -------------------------------------------------------------------------------- 1 | class Ghost 2 | 3 | def initialize(name_var) 4 | @name = name_var 5 | end 6 | 7 | def name 8 | @name 9 | end 10 | 11 | def full_name 12 | if name == "casper" 13 | my_name = "Bookis" 14 | "#{@name} the ghost" 15 | else 16 | @name 17 | end 18 | my_name 19 | end 20 | 21 | def self.rise_from_the_grave 22 | # @name won't work here because this is a class method 23 | puts "Rising..." 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /archive/topic_resources/git-status-rubric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/git-status-rubric.png -------------------------------------------------------------------------------- /archive/topic_resources/git_immersion.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Git Immersion Lab 4 | ================= 5 | 6 | http://gitimmersion.com 7 | 8 | Work through as much of the Git Immersion lessons as you can today. If you don't get through all of it today, try to get through to at least lesson 29, and finish the rest by Thursday morning. -------------------------------------------------------------------------------- /archive/topic_resources/greed/README.md: -------------------------------------------------------------------------------- 1 | # A greed roll is scored as follows [for a roll of up to 5 dice]: 2 | # 3 | # * A set of three ones is 1000 points 4 | # 5 | # * A set of three numbers (other than ones) is worth 100 times the 6 | # number. (e.g. three fives is 500 points). 7 | # 8 | # * A one (that is not part of a set of three) is worth 100 points. 9 | # 10 | # * A five (that is not part of a set of three) is worth 50 points. 11 | # 12 | # * Everything else is worth 0 points. 13 | # 14 | # Examples: 15 | # 16 | # score([1,1,1,5,1]) => 1150 points 17 | # score([2,3,4,6,2]) => 0 points 18 | # score([3,4,5,3,3]) => 350 points 19 | # score([1,5,1,2,4]) => 250 points 20 | -------------------------------------------------------------------------------- /archive/topic_resources/hamming/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format NyanCatFormatter -------------------------------------------------------------------------------- /archive/topic_resources/hamming/README.md: -------------------------------------------------------------------------------- 1 | A mutation is simply a mistake that occurs during the creation or copying of a nucleic acid, in particular DNA. Because nucleic acids are vital to cellular functions, mutations tend to cause a ripple effect throughout the cell. Although mutations are technically mistakes, a very rare mutation may equip the cell with a beneficial attribute. In fact, the macro effects of evolution are attributable by the accumulated result of beneficial microscopic mutations over many generations. 2 | 3 | The simplest and most common type of nucleic acid mutation is a point mutation, which replaces one base with another at a single nucleotide. 4 | 5 | By counting the number of differences between two homologous DNA strands taken from different genomes with a common ancestor, we get a measure of the minimum number of point mutations that could have occurred on the evolutionary path between the two strands. 6 | 7 | This is called the 'Hamming distance' 8 | 9 | GAGCCTACTAACGGGAT 10 | CATCGTAATGACGGCCT 11 | ^ ^ ^ ^ ^ ^^ 12 | 13 | The Hamming distance between these two DNA strands is 7. 14 | 15 | (From exercism.io) 16 | -------------------------------------------------------------------------------- /archive/topic_resources/hamming/lib/hamming.rb: -------------------------------------------------------------------------------- 1 | # Implement a Hamming Class here: 2 | # 3 | class Hamming 4 | end 5 | -------------------------------------------------------------------------------- /archive/topic_resources/hamming/lib/hamming_solution.rb: -------------------------------------------------------------------------------- 1 | class Hamming 2 | def self.compute(strand1, strand2) 3 | new(strand1, strand2).distance 4 | end 5 | 6 | attr_reader :strand1, :strand2 7 | def initialize(strand1, strand2) 8 | @strand1 = strand1 9 | @strand2 = strand2 10 | end 11 | 12 | def distance 13 | common_pairs.count do |pair| 14 | mutation?(*pair) 15 | end 16 | end 17 | 18 | private 19 | 20 | def common_pairs 21 | sequence1.chars.zip(sequence2.chars) 22 | end 23 | 24 | def sequence1 25 | strand1[0..common_length] 26 | end 27 | 28 | def sequence2 29 | strand2[0..common_length] 30 | end 31 | 32 | def common_length 33 | [@strand1.length, @strand2.length].min - 1 34 | end 35 | 36 | def mutation?(a, b) 37 | a != b 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /archive/topic_resources/hamming/spec/lib/hamming_spec.rb: -------------------------------------------------------------------------------- 1 | require "./lib/hamming" 2 | 3 | describe Hamming do 4 | it "should report no difference between empty strands" do 5 | expect(Hamming.compute('', '')).to eq 0 6 | end 7 | 8 | it "should report no difference between matching strands" do 9 | expect(Hamming.compute('GGACTGA', 'GGACTGA')).to eq 0 10 | end 11 | 12 | it "should work on short strands" do 13 | expect(Hamming.compute('ACT', 'GGA')).to eq 3 14 | end 15 | 16 | it "should report a hamming distance in off-by-1 strands" do 17 | expect(Hamming.compute('GGACGGATTCTG', 'AGGACGGATTCT')).to eq 9 18 | end 19 | 20 | it "should report hamming distance when its in the middle of a strand" do 21 | expect(Hamming.compute('GGACG', 'GGTCG')).to eq 1 22 | end 23 | 24 | it "should ignore extra length when working with strands of unequal length" do 25 | expect(Hamming.compute('AAACTAGGGG', 'AGGCTAGCGGTAGGAC')).to eq 3 26 | end 27 | 28 | it "should ignore extra length when the original strand is the longer" do 29 | expect(Hamming.compute('GACTACGGACAGGGTAGGGAAT', 'GACATCGCACACC')).to eq 5 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /archive/topic_resources/hash-practice.md: -------------------------------------------------------------------------------- 1 | # Hash Practice 2 | - In teams of two 3 | 4 | - Pick an idea to represent in a `Hash` (people, plants, books, events, anything...), with at least four attributes. 5 | - In a .rb file, write an `Array` of `Hash` objects that represent at least two different versions of the idea. 6 | - Write a class for the idea that can have it's attributes set in `initialize`. 7 | - Write a each loop for the `Array` that creates a new class instance and `puts` it's attributes 8 | 9 | A simplified example: 10 | ```ruby 11 | people = [ 12 | {name: "B", ...}, 13 | {name: "C", ...} 14 | ] 15 | people.each do |hash| 16 | person = Person.new(hash) 17 | puts person 18 | puts person.name 19 | end 20 | ``` 21 | -------------------------------------------------------------------------------- /archive/topic_resources/hashes.rb: -------------------------------------------------------------------------------- 1 | # Practice using ruby hashes: 2 | # 1. Using the following hash in irb, pull out the values 3000000, and "Human". 3 | # 2. Create a hash representing some set of data, it could be your favorite things, grouped by category, 4 | # or native trees in the US grouped by region, or think of any other set of data that can be represented by a Hash. 5 | 6 | books = { 7 | :best_time_travel_books => [ 8 | { 9 | :title => "The Time Machine", 10 | :author => "H. G. Wells", 11 | :category => "Fiction", 12 | :rating => (4 + 4.5 + 3 + 5 + 4.5) / 5, 13 | :sales => {1895 => 3_000_000}, 14 | :plot => { 15 | :year => 802701, 16 | :species => ["Morlocks", "Eloi"] 17 | } 18 | }, 19 | { 20 | :title => "A Connecticut Yankee in King Arthur's Court", 21 | :author => "Mark Twain", 22 | :category => "Fiction", 23 | :rating => (4.5 + 4.5 + 2 + 5 + 4.5 + 4) / 6, 24 | :sales => {1889 => 2_100_000}, 25 | :plot => { 26 | :year => 528, 27 | :species => ["Human"] 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /archive/topic_resources/heroku-installfest.md: -------------------------------------------------------------------------------- 1 | # Heroku Installfest 2 | 3 | ## Sign up for Heroku 4 | 5 | http://heroku.com 6 | 7 | Click the big Sign Up button 8 | Enter your email address. 9 | (Use the same email address for Heroku, git, github, and ssh.) 10 | 11 | Heroku will send you an activation email. Open it and click on the activation link. It will take you to the Heroku site. Enter and confirm your password. Hit Save. 12 | 13 | Heroku *can* be a free service, but you will eventually have to add a credit card (I think after 5 apps), although it is still free unless you use add-ons or increase the performance. The value Heroku provides is worth hundreds of dollars, feel lucky that 14 | this exists and all you have to do it provide a number and not actually pay anything. 15 | 16 | ## Install Heroku Toolbelt 17 | 18 | https://toolbelt.heroku.com/ 19 | 20 | click the download link, and install. 21 | 22 | ### Verify 23 | 24 | Type this in the terminal: `heroku version` 25 | 26 | Expected result: Heroku Toolbelt v4 or higher 27 | 28 | ## Verify your existing SSH Key 29 | For your Git setup, you should have created an SSH key. Verify that your SSH key exists, so it can be also be added to Heroku by running the following command: 30 | `cat ~/.ssh/id_rsa.pub` 31 | 32 | The expected output is a bunch of nonsense plus your e-mail address at the end. 33 | 34 | ## Add SSH Key to Heroku 35 | 36 | ``` 37 | heroku keys:add 38 | ``` 39 | 40 | hit enter to accept the default key file to use 41 | -------------------------------------------------------------------------------- /archive/topic_resources/homework_review.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Homework Review 4 | =============== 5 | 6 | -------------------------------------------------------------------------------- /archive/topic_resources/html-d&c.md: -------------------------------------------------------------------------------- 1 | # HTML Divide & Conquer 2 | 3 | - lists (ol/ul/nav) 4 | - anchor & img 5 | - table/thead/tr/th/td/tbody 6 | - div/section/p 7 | - header/footer/article/aside 8 | - head/title/meta 9 | -------------------------------------------------------------------------------- /archive/topic_resources/http.md: -------------------------------------------------------------------------------- 1 | # HTTP 2 | -------------------------------------------------------------------------------- /archive/topic_resources/ice_cream_party.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Ice Cream Party Planner 4 | ======================= 5 | 6 |
![](http://www.colonlibrary.org/wp-content/uploads/2013/07/party-time-icecream.jpg)
7 | 8 | !SLIDE text-size-120 title-and-content transition=fade 9 | 10 | Instructions 11 | ============ 12 | 13 | ``` 14 | daily-curriculum: 15 | 16 | examples/week2/ice_cream_party_planner/README.md 17 | ``` 18 | 19 | 20 | -------------------------------------------------------------------------------- /archive/topic_resources/ice_cream_party_planner/README.md: -------------------------------------------------------------------------------- 1 | Ice Cream Party Planner 2 | ======================= 3 | 4 | Write a script that allows user(s) to enter in their favorite ice cream flavors. 5 | 6 | When done entering users and flavors, the script should print the flavors in alphabetical order. 7 | 8 | Next Steps: 9 | + have the user enter a party invitee's name as well as their favorite flavor 10 | 11 | + ask the user what kind of "report" they'd like about the party, such as 12 | + print out an alphabetical list of invitee's along with their favorite flavor 13 | + print out an alphabetical list of flavors along with the names of the users who liked that flavor. For Example: 14 | 15 | ```ruby 16 | Chocolate: Sally, Susan, Sam 17 | Rocky Road: Billy Jo, Alex 18 | Vanilla: Micah, Fred, Barry, Melissa 19 | ``` 20 | 21 | ### extra credit 22 | + allow user to enter more than one flavor for each users 23 | + adjust the reports to accommodate multiple flavors 24 | + add a new report that shows the most popular flavors, and the number of people who liked each one 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /archive/topic_resources/images/cheri.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/images/cheri.jpg -------------------------------------------------------------------------------- /archive/topic_resources/images/cupcat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/images/cupcat.gif -------------------------------------------------------------------------------- /archive/topic_resources/images/elise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/images/elise.jpg -------------------------------------------------------------------------------- /archive/topic_resources/images/hello.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/images/hello.gif -------------------------------------------------------------------------------- /archive/topic_resources/infographics/BuildingTheNewLeader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/BuildingTheNewLeader.jpg -------------------------------------------------------------------------------- /archive/topic_resources/infographics/HowToBeTechie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/HowToBeTechie.png -------------------------------------------------------------------------------- /archive/topic_resources/infographics/Interviewing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/Interviewing.jpg -------------------------------------------------------------------------------- /archive/topic_resources/infographics/JobInterviewingTips.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/JobInterviewingTips.jpg -------------------------------------------------------------------------------- /archive/topic_resources/infographics/LanguageWars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/LanguageWars.png -------------------------------------------------------------------------------- /archive/topic_resources/infographics/LanguageWars2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/LanguageWars2.png -------------------------------------------------------------------------------- /archive/topic_resources/infographics/MakeResumeMatchJob.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/MakeResumeMatchJob.jpg -------------------------------------------------------------------------------- /archive/topic_resources/infographics/RoadToSuccess.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/infographics/RoadToSuccess.jpg -------------------------------------------------------------------------------- /archive/topic_resources/insertion-sort.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/insertion-sort.JPG -------------------------------------------------------------------------------- /archive/topic_resources/instant-gratification-and-the-dom.md: -------------------------------------------------------------------------------- 1 | # Instant Gratification and the DOM 2 | 3 | This lesson will focus on the DOM: What it is, how to access it, how to 4 | add/remove elements, and how great it is to see things immediately 5 | 6 | 7 | ### Docment Object Model 8 | * DOM Tree 9 | * window.document 10 | * document.querySelector/document.querySelectorAll 11 | 12 | ### Creating Elements 13 | * element types 14 | * document.createElement 15 | * element attribute 16 | 17 | ### Adding and removing Nodes 18 | * appendChild 19 | * parentNode.removeChild 20 | * Sidenote - 21 | * Modifying the dom is $$$$$, make changes to elements before adding them 22 | 23 | ### Working within the console 24 | * console, tracing with .log 25 | * inspector 26 | * network inspector 27 | -------------------------------------------------------------------------------- /archive/topic_resources/intentional-bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/intentional-bug.png -------------------------------------------------------------------------------- /archive/topic_resources/it-works.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/it-works.png -------------------------------------------------------------------------------- /archive/topic_resources/javascript/ajax-exercise.md: -------------------------------------------------------------------------------- 1 | # AJAX Exercise 2 | 3 | With a person sitting near you, create a single page application that will load and display the data from [Socrata's Top 1000 Songs To Hear Before You Die](https://opendata.socrata.com/Fun/Top-1-000-Songs-To-Hear-Before-You-Die/ed74-c6ni). 4 | 5 | ### Start with: 6 | - HTML file that will load 7 | - JS file which will contain your code 8 | 9 | ### Goals: 10 | - You will use AJAX to retrieve the data from this API 11 | - You can decide how you want to display it on your screen 12 | - Use Python's Simple HTTP Server to run a small web server on your local machine 13 | - This prevents issues with your browser thinking you are doing cross-site scripting 14 | -------------------------------------------------------------------------------- /archive/topic_resources/javascript/exercises-101.md: -------------------------------------------------------------------------------- 1 | # Getting Started Exercises 2 | 3 | 4 | 5 | ## 1. Reverse an Array 6 | 7 | JavaScript provides an Array.reverse method. For practice, we're going to write something similar. Neither solution should use the reverse method. 8 | 9 | 10 | ### First 11 | 12 | Write a function called reverseArray() that takes an array, `ar` as an argument and returns a new array that has the same elements as `ar`, but in inverted order. 13 | 14 | ### Added fun! 15 | 16 | Write a function called reverseArrayInPlace() that takes an array `ar` as an argument and returns the same array modified to have its elements in reverse order. 17 | 18 | ## 2. Palindrome 19 | 20 | Build a function that takes a string as a parameter and returns whether or not that string is a palindrome. 21 | -------------------------------------------------------------------------------- /archive/topic_resources/javascript/exercism.md: -------------------------------------------------------------------------------- 1 | # Exercism 2 | 3 | We will be using [Exercism](http://exercism.io/) as a tool to assist in our learning of JavaScript. Exercism provides a number of practice problems along with unit tests to ensure the accuracy of your answer to the test problems. 4 | 5 | ## Setup 6 | All of the Exercism exercises can be done from the comfort of your own command line. This will require some configuration and setup on your part. 7 | 8 | 1. Sign up on Exercism via GitHub 9 | 2. Install and Configure the Command Line Interface using [these instructions](http://exercism.io/cli). 10 | 3. Fetch the first exercise from the JavaScript track using [these instructions](http://exercism.io/languages/javascript). _No need to complete or submit the exercise. Fetching is sufficient for this step._ 11 | 4. Be sure that your instructor adds you to your cohort's team on Exercism 12 | -------------------------------------------------------------------------------- /archive/topic_resources/javascript/intro-to-js.md: -------------------------------------------------------------------------------- 1 | # Basic JavaScript 2 | 3 | We try to separate concerns in web applications: 4 | 5 | * **HTML** - Document structure and information. Your HTML mark up should 6 | be a semantic representation of the information in your document. 7 | 8 | * **CSS** - Presentation. CSS controls the way that we present our 9 | information to the user. 10 | 11 | * **JavaScript** - Behavior and interactivity. We use JavaScript to handle 12 | user interactions via events, and to add interactivity to our web 13 | apps. 14 | -------------------------------------------------------------------------------- /archive/topic_resources/javascript/practice/battleship.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Battleship! 6 | 7 | 8 | 9 | 10 |

Play Battleship

11 |

Ready, aim, fire!

12 | Enter a number from 0-9: 13 |
14 | 15 | 16 |

17 |

18 |

Num guesses:

19 |

20 | 21 | 22 | -------------------------------------------------------------------------------- /archive/topic_resources/javascript/starter-exercises.md: -------------------------------------------------------------------------------- 1 | #### Ex 1 2 | Create a JSFiddle using jQuery: 3 | - fade out an element on click 4 | - fade in an element on click 5 | 6 | ##### Ex 2 7 | Create a function that accepts a 2d array as a parameter and returns the sum of all of the values within the 2d array 8 | 9 | ##### Ex 3 10 | What is the output of this code: 11 | ```javascript 12 | var text = 'outside'; 13 | 14 | function logIt() { 15 | console.log(text); 16 | var text = 'inside'; 17 | } 18 | 19 | logIt(); 20 | ``` 21 | 22 | What is the output of this code: 23 | ```javascript 24 | var text = 'outside'; 25 | 26 | function logIt() { 27 | console.log(a); 28 | var text = 'inside'; 29 | } 30 | 31 | logIt(); 32 | ``` 33 | Why are they different? 34 | -------------------------------------------------------------------------------- /archive/topic_resources/js-day2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/js-day2.pdf -------------------------------------------------------------------------------- /archive/topic_resources/js-the-env-and-the-tools.md: -------------------------------------------------------------------------------- 1 | # JavaScript - The Environment and the Tools 2 | 3 | This lesson will give a quick overview of what JavaScript is, the different implementations, 4 | how it runs, and the tools we use to develop it. 5 | 6 | ### JavaScript 7 | * Programming language 8 | * Created at Netscape in 10 days by Brendan Eich in 1995 9 | * Incredibly popular (on almost every website in the world) 10 | 11 | 12 | ### By Any Other Name 13 | * Node.js 14 | * v8 15 | 16 | * Browser engines 17 | * Firefox - Spidermonkey 18 | * Safari - Squirrelfish 19 | * Chrome - v8 20 | 21 | ### From the request to the execution - In the Browser 22 | * Browser Parser 23 | * HTTP Request 24 | * Interpreter 25 | 26 | 27 | ### Consoles and Inspectors and Toolkits! 28 | * Example - How to open the dev tools 29 | * Example - How to use the inspector 30 | 31 | 32 | ### ACTIVITY 33 | * Group Activity - Install Node.js 34 | * Make sure xcode install tools are in 35 | * Use Homebrew 36 | * Group Activity - Check browser use in room 37 | * Make sure installed - Chrome, Firefox, Safari, Virtualbox 38 | * For later - modern.ie 39 | -------------------------------------------------------------------------------- /archive/topic_resources/js/battleship.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Battleship! 6 | 7 | 8 |

Play Battleship

9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /archive/topic_resources/js/battleship.js: -------------------------------------------------------------------------------- 1 | 2 | var location1 = 3 3 | var location2 = 4 4 | var location3 = 5 5 | var guess; 6 | var hits = 0; 7 | var guesses = 0; 8 | var isSunk = false; 9 | 10 | while (isSunk == false) { 11 | guess = prompt("Ready, aim, fire! (enter a number from 0-6):"); 12 | if (guess < 0 || guess > 6) { 13 | alert("Please enter a valid cell number!"); 14 | } else { 15 | guesses = guesses + 1; 16 | if (guess == location1 || guess == location2 || guess == location3) { 17 | alert("HIT!"); 18 | hits = hits + 1; 19 | if (hits == 3) { 20 | isSunk = true; 21 | alert("You sank my battleship!"); 22 | } 23 | } else { 24 | alert("MISS"); 25 | } 26 | } 27 | } 28 | var stats = "You took " + guesses + " guesses to sink the battleship, " + 29 | "which means your shooting accuracy was " + (3/guesses); 30 | alert(stats); 31 | -------------------------------------------------------------------------------- /archive/topic_resources/js/bottles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 99 Bottles of Beer on the Wall 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /archive/topic_resources/js/bottles.js: -------------------------------------------------------------------------------- 1 | var count = 99; 2 | var word = "bottles"; 3 | 4 | while (count > 0) { 5 | 6 | console.log(count + " " + word + " of beer on the wall"); 7 | console.log(count + " " + word + " of beer,"); 8 | console.log("Take one down, pass it around,"); 9 | count = count - 1; 10 | if (count > 0) { 11 | console.log(count + " " + word + " of beer on the wall."); 12 | } 13 | else { 14 | console.log("No more " + word + " of beer on the wall."); 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /archive/topic_resources/js/bottles1.js: -------------------------------------------------------------------------------- 1 | var count = 99; 2 | var word = "bottles"; 3 | 4 | while (count > 0) { 5 | 6 | console.log(count + " " + word + " of beer on the wall
"); 7 | console.log(count + " " + word + " of beer,
"); 8 | console.log("Take one down, pass it around,
"); 9 | count = count - 1; 10 | if (count == 1) { 11 | word = "bottle"; 12 | console.log(count + " " + word + " of beer on the wall."); 13 | } 14 | else if (count > 0) { 15 | word = "bottles"; 16 | console.log(count + " " + word + " of beer on the wall."); 17 | } 18 | else { 19 | word = "bottles"; 20 | console.log("No more " + word + " of beer on the wall."); 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /archive/topic_resources/js/todo_html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ada's To Do List (version 1) 6 | 36 | 38 | 39 | 40 |
41 |

Ada's To Do List

42 |
43 |
44 |

Look in the console...

45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/.ruby-gemset: -------------------------------------------------------------------------------- 1 | ada 2 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.0.0 2 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/1966.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | ARPA and their IMP 4 | === 5 | 6 | * Diverse Vendors 7 | * Bespoke Adapters 8 | * Dependency Inversion ...the RFC is born 9 | * Internet Engineering Task Force 10 | 11 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/alphabet_soup.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-120 transition=fade 2 | 3 | ALPHABET SOUP 4 | === 5 | 6 | ## SSL UTF HTTP W3C UA HTML RFC MIME SQL JSON TCP/IP ORM XHR CSS API LSD IETF XML DOM DNS URL REST XSS 7 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/config.ru: -------------------------------------------------------------------------------- 1 | 2 | run ->(env){ [200, {"Content-Type" => "text/plain"}, ["Racked!"]] } 3 | 4 | run ->(env){ 5 | status = 200 6 | headers = {"Content-Type" => "text/plain", "ada" => "0.0.1"} 7 | body = env.collect{ |key, value| "#{key}: #{value}\n" } 8 | 9 | [status, headers, body] 10 | } 11 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/parade: -------------------------------------------------------------------------------- 1 | title "A SERIES OF TUBES" 2 | 3 | theme "slate" 4 | 5 | slides "trevor.md" 6 | slides "alphabet_soup.md" 7 | slides "1966.md" 8 | slides "www.md" 9 | slides "request.md" 10 | slides "response.md" 11 | slides "rack.md" 12 | 13 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/rack.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | Rack 4 | === 5 | 6 | * Many Ruby Web Servers, One Interface 7 | * Middleware 8 | 9 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/request.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | Client, User Agent, Browser 4 | === 5 | 6 | * Start, Headers, Body 7 | * HTTP Methods: 8 | GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, TRACE, CONNECT 9 | 10 | ``` 11 | GET / HTTP/1.1 12 | Host: 0.0.0.0:4567 13 | User-Agent: ADAbot 14 | Accept: text/html 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/response.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | Server 4 | === 5 | 6 | * Start, Headers, Body 7 | * Status Codes: 8 | 1xx, 2xx, 3xx, 4xx, 5xx 9 | 10 | ``` 11 | HTTP/1.1 204 OK 12 | Server: ADA Server 0.0.1 13 | Content-Type: text/html; charset=UTF-8 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/rfc.md: -------------------------------------------------------------------------------- 1 | !SLIDE transition=fade 2 | 3 | Request For Comments 4 | === 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/trevor.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-100 title-and-content transition=fade 2 | 3 | Trevor Bramble 4 | === 5 | 6 | ## Getty Images 7 | ## Sinatra::Contrib, Solarized 8 | 9 | ## http://trevorbramble.com/ 10 | ## _@trevorbramble.com 11 | 12 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_networking/www.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | World Wide Web 4 | === 5 | 6 | * World Wide Web Consortium (W3C) 7 | * Client/Server 8 | * Content Types 9 | * Hypertext 10 | 11 | -------------------------------------------------------------------------------- /archive/topic_resources/lecture_stuff.rb: -------------------------------------------------------------------------------- 1 | module LectureStuff 2 | def bin_search_guess_iter(ar, num) 3 | low = 0 4 | high = ar.length 5 | mid = ar.length / 2 6 | cnt = 0 7 | 8 | until high - low < 2 or cnt > 100 9 | puts "high: #{high}, low: #{low}, mid: #{mid}" 10 | if num >= ar[mid] 11 | low = mid 12 | mid = (high - low) / 2 + mid 13 | else 14 | high = mid 15 | mid = (high - low) / 2 + low 16 | end 17 | cnt += 1 18 | end 19 | mid 20 | end 21 | 22 | def bin_search_guess(ar, num) 23 | return 0 if ar.length == 0 24 | mid = ar.length / 2 25 | 26 | puts "ar.length: #{ar.length}, ar.mid: #{ar[mid]} mid: #{mid}, num: #{num}" 27 | if ar[mid] == num 28 | mid 29 | elsif num < ar[mid] 30 | bin_search_guess(ar[0...mid], num) 31 | else 32 | mid + bin_search_guess(ar[mid + 1..ar.length], num) 33 | end 34 | end 35 | 36 | def is_in?(ar, n) 37 | puts "is_in? called with : #{ar} - #{n}" 38 | if ar.length == 0 39 | false 40 | elsif ar.length == 1 41 | ar[0] == n 42 | else 43 | sub_ar_1 = ar[0...1] 44 | sub_ar_2 = ar[1..-1] 45 | is_in?(sub_ar_1, n) or is_in?(sub_ar_2, n) 46 | end 47 | end 48 | 49 | def find_insert(ar, guess, num) 50 | if ar[guess] < num 51 | guess += 1 while ar[guess] < num 52 | else 53 | guess -= 1 while ar[guess] >= num 54 | end 55 | guess 56 | end 57 | end 58 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/create_table.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Creating a table 7 | 8 | ```sql 9 | sqlite> CREATE TABLE posts ( 10 | id INTEGER PRIMARY KEY, 11 | title TEXT NOT NULL, 12 | body TEXT NOT NULL 13 | ); 14 | ``` 15 | ## Each column has a type (integer, text...) and optionally constraints (primary/unique key, default value, not null...) 16 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/crud.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | CRUD 4 | === 5 | 6 | ## Create, Read (Select), Update, Delete 7 | 8 | Sound familiar? 9 | 10 | ## POST, GET, PATCH, DELETE 11 | 12 | --- 13 | 14 | ## That's our cue! Time to do ToDo! 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/database.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | What Even Is A Database? 4 | === 5 | 6 | ## The thing you keep your data in. 7 | 8 | Sadly, yes, this includes Excel. (JOKE) 9 | 10 | ## Several popular paradigms: 11 | 12 | ### Relational 13 | ### Document 14 | ### Key-Value 15 | ### Object 16 | ### Graph, etc. 17 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/datasets.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Datasets 7 | 8 | It's all Ruby now. Let's do our DML now... 9 | 10 | ```bash 11 | 2.0.0p247 :005 > posts.insert(title: 'hello', body: 'world') 12 | => 1 13 | 2.0.0p247 :006 > posts.all 14 | => [{:id=>1, :title=>"hello", :body=>"world"}] 15 | 2.0.0p247 :007 > posts.where(id: 1).update(title: 'goodbye') 16 | => 1 17 | 2.0.0p247 :008 > posts.all 18 | => [{:id=>1, :title=>"goodbye", :body=>"world"}] 19 | 2.0.0p247 :009 > posts.where(id: 1).delete 20 | => 1 21 | 2.0.0p247 :010 > posts.all 22 | => [] 23 | ``` 24 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/delete.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Deleting a record 7 | 8 | ```sql 9 | sqlite> DELETE FROM posts WHERE id = 1; 10 | sqlite> select * from posts; 11 | sqlite> 12 | ``` 13 | 14 | ## Both INSERT and UPDATE require more caution than usual. ALWAYS be sure you're specifying your records with care! 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/insert.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Inserting a record 7 | 8 | ```sql 9 | sqlite> INSERT INTO posts (title, body) VALUES ('hello', 'world'); 10 | sqlite> .headers on 11 | sqlite> .mode tabs 12 | sqlite> SELECT * FROM posts; 13 | id title body 14 | 1 hello world 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/parade: -------------------------------------------------------------------------------- 1 | title "A SERIES OF TUBES" 2 | 3 | theme "slate" 4 | 5 | slides "database.md" 6 | slides "sql.md" 7 | slides "sqlite.md" 8 | slides "create_table.md" 9 | slides "insert.md" 10 | slides "update.md" 11 | slides "delete.md" 12 | slides "sequel.md" 13 | slides "datasets.md" 14 | slides "crud.md" 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/sequel.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | The Sequel Gem 4 | === 5 | 6 | http://rubygems.org/gems/sequel 7 | 8 | http://sequel.jeremyevans.net/ 9 | 10 | ## Extremely flexible database client abstraction 11 | 12 | ```bash 13 | $ irb 14 | 2.0.0p247 :001 > require 'sequel' 15 | => true 16 | 2.0.0p247 :002 > db = Sequel.sqlite 17 | => #:sqlite}> 18 | 2.0.0p247 :003 > db.create_table(:posts){ primary_key :id; string :title; string :body } 19 | => nil 20 | 2.0.0p247 :004 > posts = db[:posts] 21 | => # 22 | 2.0.0p247 :005 > 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/sql.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQL (Structured Query Language) 4 | === 5 | 6 | ## The language of relational databases 7 | 8 | ## DDL: Data Definition Language 9 | ### Create, Drop, Alter... 10 | ## DML: Data Manipulation Language 11 | ### Select, Insert, Update, Delete... 12 | ## DCL, TCL... 13 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/sqlite.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Tiny relational database engine 7 | 8 | http://sqlite.org/ 9 | 10 | ```bash 11 | $ sqlite3 12 | SQLite version 3.8.1 2013-10-17 12:57:35 13 | Enter ".help" for instructions 14 | Enter SQL statements terminated with a ";" 15 | sqlite> select current_date; 16 | 2013-11-22 17 | sqlite> 18 | ``` 19 | -------------------------------------------------------------------------------- /archive/topic_resources/legacy/databases/update.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 transition=fade 2 | 3 | SQLite 4 | === 5 | 6 | ## Updating a record 7 | 8 | ```sql 9 | sqlite> UPDATE posts SET title="goodbye" WHERE id = 1; 10 | sqlite> SELECT * FROM posts; 11 | id title body 12 | 1 goodbye world 13 | ``` 14 | -------------------------------------------------------------------------------- /archive/topic_resources/linked_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/linked_list.png -------------------------------------------------------------------------------- /archive/topic_resources/linked_list1.rb: -------------------------------------------------------------------------------- 1 | class ListItem 2 | attr_accessor :data, :next 3 | 4 | def initialize(data, nxt = nil) 5 | @data, @next = data, nxt 6 | end 7 | end 8 | 9 | ListItem2 = Struct.new(:data, :next) 10 | 11 | module ListProcessor 12 | def self.linear_search(want, list) 13 | l = list 14 | until l.nil? or l.data == want 15 | l = l.next 16 | end 17 | end 18 | 19 | def self.recursive_search(want, list) 20 | if list.data == want 21 | list 22 | elsif list.next.nil? 23 | nil 24 | else 25 | recursive_search(want, list.next) 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /archive/topic_resources/linked_list2.rb: -------------------------------------------------------------------------------- 1 | ListItem2 = Struct.new(:data, :next) 2 | -------------------------------------------------------------------------------- /archive/topic_resources/list1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ada's To Do List 6 | 18 | 19 | 20 |
21 |

Ada's To Do List

22 |
23 |
24 |
25 | 26 | 27 |
28 |
    29 | 30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /archive/topic_resources/list_processor.rb: -------------------------------------------------------------------------------- 1 | module ListProcessor 2 | def self.linear_search(want, list) 3 | l = list 4 | until l.nil? or l.data == want 5 | l = l.next 6 | end 7 | end 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | def self.recursive_search(want, list) 25 | if list.data == want 26 | list 27 | elsif list.next.nil? 28 | nil 29 | else 30 | recursive_search(want, list.next) 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /archive/topic_resources/make-slides.sh: -------------------------------------------------------------------------------- 1 | pandoc -t slidy -s 'provisioning-and-deploying-to-a-vps.md' -o lecture.html 2 | -------------------------------------------------------------------------------- /archive/topic_resources/merge-sort.md: -------------------------------------------------------------------------------- 1 | # Merge Sort 2 | 3 | Merge sort is a recursive, divide and conquer sort algorithm. The idea 4 | of merge sort is pretty simple: 5 | 6 | 1. Divide your list into two lists. 7 | 8 | 1. If the lists have zero or one elements, they're sorted. 9 | 10 | 1. Otherwise, sort each of those lists recursively with merge sort. 11 | 12 | 1. Once those lists are sorted, we *merge* them together in sorted order. 13 | 14 | ## The Merge Operation 15 | 16 | Assuming that you have two sorted lists, what does the merge operation 17 | look like? The solution is similar to the intuitive approach: 18 | 19 | 1. Create a new list for the merge. 20 | 21 | 1. Compare the first item of the two lists. 22 | 23 | 1. Take the smallest of the two items from the *head* of its list and 24 | add it to your new list. 25 | 26 | 1. If one of the lists is empty, use the item from the other list. 27 | 28 | 1. Repeat from #2 until both lists are empty. 29 | 30 | ## The Magical Magic 31 | 32 | ![A magical unicorn](http://img1.wikia.nocookie.net/__cb20090425203919/monster/images/c/c4/Unicorn.jpg) 33 | 34 | This is where merge sort starts to seem magical: once we have our 35 | merge operation, we're basically done. Try it out with pencil and paper! 36 | -------------------------------------------------------------------------------- /archive/topic_resources/missing-capistrano-bundler-gem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/missing-capistrano-bundler-gem.png -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/calculator.md: -------------------------------------------------------------------------------- 1 | # Calculator 2 | 3 | Create a Calculator class which takes two integers in the constructor. Implement `add`, `subtract`, `multiply`, and `divide` methods. 4 | 5 | Silver 6 | ------ 7 | Allow a list of number instead of just two integers to apply the methods to. 8 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/chess.md: -------------------------------------------------------------------------------- 1 | # Chess 2 | 3 | Create a Command Line Chess game. 4 | 5 | - Object Oriented (this is a great one for inheritance) 6 | - Two players (each person will have to pass the keyboard) 7 | - Obey the rules of [chess](http://en.wikipedia.org/wiki/Chess). 8 | - Re-Draw an ASCII-board for each turn. 9 | - Implement a game timer for each player 10 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/contact-list.md: -------------------------------------------------------------------------------- 1 | # Contact List 2 | 3 | Create a Rails application that allows a user to manage a list of contacts. 4 | 5 | Bronze 6 | ------- 7 | - Create a Person (contacts) model with the attributes 8 | - first_name 9 | - last_name 10 | - phone 11 | - email 12 | - relationship 13 | - Create a PeopleController which will handle: 14 | - Showing a list of all people 15 | - Show a single person 16 | - Create a new person 17 | - Update an existing Person 18 | - Delete a Person 19 | 20 | Silver 21 | ------ 22 | 23 | - Create a Company model with the attributes: 24 | - name 25 | - city 26 | - state 27 | - Add company_id to the Person model 28 | - Create a CompaniesController to handle the CRUD of companies 29 | - Add a drop down to fill the `company_id` attribute of People in the new and edit forms 30 | 31 | Gold 32 | ------ 33 | 34 | - Create a Tag model 35 | - Allow any number of Tags to be added to a Person (i.e. `sales`, `engineer`, `potential job`) 36 | - Create a page to show all of the people associated with a tag 37 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/decoding-strings.md: -------------------------------------------------------------------------------- 1 | # Decoding a cryptic String 2 | 3 | Create a class that can decode the cryptic string below using the following table: 4 | 5 | ```ruby 6 | 'Hello%20%22World%22%20%2D%201%20is%20%3E0%2E' 7 | # => 'Hello "World" - 1 is > 0.' 8 | ``` 9 | 10 | 11 | | Symbol | Code | 12 | |:-----------------:|:----------------------------| 13 | | " " (space) | %20 | 14 | | """ (double quote) | %22 | 15 | | "%" (percent) | %25 | 16 | | "-" (hyphen) | %2D | 17 | | "." (period) | %2E | 18 | | "<" (less than) | %3C | 19 | | ">" (greater than) | %3E | 20 | | "\" (backslash) | %5C | 21 | | "_" (underscore) | %5F | 22 | 23 | 24 | Silver 25 | ------ 26 | 27 | Add a method to encode a normal string using all of symbols in the table. 28 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/dinos.md: -------------------------------------------------------------------------------- 1 | # Dinos 2 | 3 | Clone the [Dinos Active Record](https://github.com/Ada-Developers-Academy/dinos-active-record) Rails app 4 | Set up the project by the following: 5 | 6 | ```bash 7 | cd dinos-active-record 8 | bundle install 9 | rake db:create db:migrate db:seed 10 | # creates, migrates, and adds data to the database. 11 | ``` 12 | 13 | Go into the `rails console` and query the newly created data using ActiveRecord 14 | to find out the following 15 | 16 | Bronze 17 | ------ 18 | 19 | - What is the name of the Dino with a genus of "Protarchaeopteryx" 20 | - Alphabetically by genus, what is the last Dino? 21 | - How many Dinos have a length of less than 20? 22 | 23 | Silver 24 | ------ 25 | 26 | - How many Dinos have a genus that ends in "saurus"? 27 | - How many Dinos have a length of less than 20 or a height greater than 20? 28 | - How many eggs have the color "green" in the name? 29 | 30 | Gold 31 | ----- 32 | 33 | - How many eggs does the Dino with genus "Sinosauropteryx" have? 34 | - What is the average height of all Dinos? 35 | 36 | Platinum 37 | -------- 38 | 39 | - How many eggs exist for all of the dinos with a genus which ends in "saurus". 40 | - How many dinos have eggs which have the color "green" in the name? 41 | - Create 10 eggs for each dino which has a genus that contains an "x". 42 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/evens.md: -------------------------------------------------------------------------------- 1 | # Evens 2 | 3 | Write a method which takes an array as an argument which returns an array containing only the elements with an even index 4 | 5 | ## Silver 6 | 7 | Write the same method with conceptually distinct implementation from your first. 8 | 9 | ## Gold 10 | 11 | Write the same method with conceptually distinct implementation from your first two. 12 | 13 | ## Platinum 14 | 15 | Write the same method with conceptually distinct implementation from your first three. 16 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/golf.md: -------------------------------------------------------------------------------- 1 | # Jquery Golf Practice 2 | 3 | Getting Started 4 | --------------- 5 | 6 | - Clone [this repo](https://github.com/Ada-Developers-Academy/golf-jquery-practice) 7 | - Get the app running with: 8 | 9 | ```bash 10 | cd golf-jquery-practice 11 | bundle 12 | rake db:create db:migrate db:seed 13 | rails server 14 | ``` 15 | 16 | - Navigate to the root page in the browser 17 | 18 | Todo 19 | ----- 20 | - Use jQuery in `/app/assets/javascripts/clubs.js` to override the "Choose" button's click event. 21 | - When the button is clicked add a class of "chosen" to the `
` surrounding the club 22 | - Style the class of `.chosen` to have a green-ish background in `/app/assets/stylesheets/clubs.css.scss`. 23 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/key-value-swapper.md: -------------------------------------------------------------------------------- 1 | # Key Value Swapper 2 | 3 | Make a method that takes a hash as an argument and swaps each key with it's value. 4 | 5 | ```ruby 6 | a = {name: "Wabi", species: "Cat"} 7 | swap(a) 8 | # => {"Wabi" => :name, "Cat" => :species} 9 | ``` 10 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/parse-weekly-markdown.md: -------------------------------------------------------------------------------- 1 | - Grab content of raw github url for week (https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/master/week01/weekly_overview.md) 2 | - Separate each weekday by name. 3 | - Create a Hash with each day name as a key. 4 | - Create an Array for each day containing a Hash for each row. 5 | - Strip out any markdown syntax (**, [link](links)) 6 | 7 | ```ruby 8 | {tuesday: [ 9 | {time: "9:00 - 10:00", topic: "Rails"}, 10 | {time: "9:00 - 10:00", topic: "Rails"}, 11 | {time: "9:00 - 10:00", topic: "Rails"}, 12 | {time: "9:00 - 10:00", topic: "Rails"}, 13 | {time: "9:00 - 10:00", topic: "Rails"}, 14 | ]} 15 | ``` 16 | 17 | - Write a script that finds the current week/day and returns that hash 18 | -------------------------------------------------------------------------------- /archive/topic_resources/moar_work/vote.md: -------------------------------------------------------------------------------- 1 | # Vote 2 | 3 | Create a `Vote` class. An instance of the Vote class should have a question attribute and a results attribute. 4 | 5 | The `question` attribute should be a string that is passed in as an argument when the object is created. 6 | 7 | The `result` attribute should be a hash with keys of the given answers and value of the number of votes that key has receieved 8 | 9 | ```ruby 10 | vote = Vote.new("Who should run for president in 2016?") 11 | vote.cast("Hillary") 12 | vote.cast("Ada") 13 | vote.cast("Ada") 14 | vote.results # => {"Hillary" => 1, "Ada" => 2} 15 | ``` 16 | 17 | Silver 18 | ------ 19 | 20 | Create the following methods: 21 | 22 | - `winner` Returns a string of the top entry 23 | - `vote_count` Returns the number of total votes 24 | 25 | Gold 26 | ----- 27 | 28 | Create a `stats` method that prints the current status 29 | 30 | ```ruby 31 | vote.stats 32 | 33 | # 3 Votes total 34 | # Ada (1 vote) 35 | # Hillary (2 votes) 36 | # 37 | # Ada is currently in the lead 38 | ``` 39 | -------------------------------------------------------------------------------- /archive/topic_resources/mockup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/mockup.jpg -------------------------------------------------------------------------------- /archive/topic_resources/mockup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/mockup.png -------------------------------------------------------------------------------- /archive/topic_resources/more_enumerables.md: -------------------------------------------------------------------------------- 1 | # More Enumberables 2 | 3 | ## Hashes 4 | ### Enumerable methods shared with arrays 5 | Some of the enumerable methods we've seen used with arrays can also be used on hashes. Because a hash is a data structure with multiple pairs (key and value), when we iterate over it using our enumerable methods, we write the `do end` block to take multiple parameters: 6 | 7 | ```ruby 8 | h = { 9 | first_key: "first_value", 10 | second_key: "second_value" 11 | } 12 | 13 | h.each do |key, value| 14 | puts "The key is #{key} and the value is #{value}." 15 | end 16 | ``` 17 | 18 | This outputs: 19 | ``` 20 | The key is first_key and the value is first_value. 21 | The key is second_key and the value is second_value. 22 | ``` 23 | 24 | 25 | We can also use the `map`, `find`, and `find_all` enumerable methods in a similar fashion. 26 | 27 | 28 | ### Accessing keys and values 29 | Sometimes what we want to get from our hash is just the set of keys, or just the list of values. This can be accomplished with the `keys` and `values` methods, respectively. 30 | -------------------------------------------------------------------------------- /archive/topic_resources/my_enumerable.rb: -------------------------------------------------------------------------------- 1 | module MyEnumerable 2 | class Array < Object::Array 3 | 4 | def each 5 | i = 0 6 | while self[i] 7 | yield self[i] 8 | i += 1 9 | end 10 | self 11 | end 12 | 13 | def each_with_index 14 | i = 0 15 | while self[i] 16 | yield self[i], i 17 | i += 1 18 | end 19 | self 20 | end 21 | 22 | def map 23 | i, result = 0, [] 24 | while self[i] 25 | result << (yield self[i]) 26 | i += 1 27 | end 28 | result 29 | end 30 | 31 | def map! 32 | i = 0 33 | while self[i] 34 | self[i] = (yield self[i]) 35 | i += 1 36 | end 37 | self 38 | end 39 | 40 | def select 41 | i, result = 0, [] 42 | while self[i] 43 | result << self[i] if (yield self[i]) 44 | i += 1 45 | end 46 | result 47 | end 48 | 49 | def reject 50 | i, result = 0, [] 51 | while self[i] 52 | result << self[i] if !(yield self[i]) 53 | i += 1 54 | end 55 | result 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /archive/topic_resources/name-in-rubric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/name-in-rubric.png -------------------------------------------------------------------------------- /archive/topic_resources/networking-101.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/networking-101.md -------------------------------------------------------------------------------- /archive/topic_resources/networking/client-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/networking/client-server.png -------------------------------------------------------------------------------- /archive/topic_resources/networking/request-cycle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/networking/request-cycle.jpg -------------------------------------------------------------------------------- /archive/topic_resources/networking/server.rb: -------------------------------------------------------------------------------- 1 | require 'rack' 2 | 3 | app = Proc.new do |env| 4 | puts env.inspect 5 | ['200', {'Content-Type' => 'text/html'}, ['A barebones rack app.']] 6 | end 7 | 8 | Rack::Handler::WEBrick.run app 9 | -------------------------------------------------------------------------------- /archive/topic_resources/networking/tim-berners-lee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/networking/tim-berners-lee.png -------------------------------------------------------------------------------- /archive/topic_resources/networking/webserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/networking/webserver.png -------------------------------------------------------------------------------- /archive/topic_resources/notes.md: -------------------------------------------------------------------------------- 1 | # Notes 2 | 3 | Change git commit message editor 4 | 5 | ``` 6 | git config --global core.editor "subl -w" 7 | ``` -------------------------------------------------------------------------------- /archive/topic_resources/oauth.md: -------------------------------------------------------------------------------- 1 | # OAuth 2 | OAuth stands for Open Authorization. 3 | ![OAuth](resources/oauth.png) 4 | 5 | OAuth is a protocol that allows for a more streamlined user experience for login, utilizing an existing application's logon experience. This is because OAuth allows you to share your private resources stored on one site with another site without having to hand out your username and password. 6 | 7 | Have you ever used your Facebook account to log on to another site so that you didn't need to create a new username and password to remember? Have you ever used your GitHub, Twitter, etc. to do the same? 8 | 9 | 10 | A typical example offered by the OAuth spec (Appendix A) is when a user wants to print a photo stored on another site. The interaction goes something like this: 11 | - the user signs into the printer website and place an order for prints. 12 | - The printer website asks which photos to print and the user chooses the name of the site where her photos are stored (from the list of sites supported by the printer). 13 | - The printer website sends the user to the photo site to grant access. 14 | - At the photo site the user signs into her account and is asked if she really wants to share her photos with the printer. 15 | - If she agrees, she is sent back to the printer site which can now access the photos. - At no point did the user share her username and password with the printer site. 16 | -------------------------------------------------------------------------------- /archive/topic_resources/objects_review.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Let's Talk About Objects! 4 | ========================= 5 | 6 | In Ruby, everything is an Object. 7 | 8 | ``` 9 | "foo".class 10 | => String 11 | 4.class 12 | => Fixnum 13 | [1,2,3].class 14 | => Array 15 | ``` 16 | !SLIDE text-size-90 title-and-content transition=fade 17 | 18 | What's isn't an Object? 19 | ======================= 20 | 21 | 1. Gather ingredients -- 1c flour, 1c butter, 1c sugar, 2 eggs 22 | 2. Preheat oven to 350F 23 | 3. Beat eggs and butter 24 | 4. Add flour and sugar 25 | 5. Mix 26 | 6. Bake for 10 minutes 27 | 28 | This is just a set of instructions. 29 | 30 | 31 | !SLIDE title-and-content transition=fade 32 | 33 | What's an Object? 34 | ================= 35 | 36 | An Object is a collection of data attributes and actions that are related. It is an **abstraction** that let's us deal with *concepts*. 37 | 38 | [baker](resources/basic_objects/baker.rb) 39 | [oven](resources/basic_objects/oven.rb) 40 | [dog](resources/basic_objects/dog.rb) 41 | [snake](resources/basic_objects/snake.rb) 42 | 43 | !SLIDE text-size-80 title-and-content transition=fade 44 | 45 | Let's Make More! 46 | ================ 47 | 48 | Let's make a menagerie of animals! 49 | 50 | + Everyone pick an animal 51 | + make a new file in the *examples/week2/basic_objects/* directory named [your animal's name].rb 52 | + Create an object that has methods for speak, color, and move 53 | + add any others that are peculiar to your animal 54 | + When you're done, help someone else 55 | 56 | 57 | -------------------------------------------------------------------------------- /archive/topic_resources/objects_using_objects.md: -------------------------------------------------------------------------------- 1 | !SLIDE title-and-content transition=fade 2 | 3 | Objects Using Objects 4 | ===================== 5 | 6 | Hey, remember Bob the Baker? Let's make an oven for him to use. 7 | 8 | Review *examples/week2/basic_objects/baker.rb* 9 | 10 | !SLIDE text-size-80 title-and-content transition=fade 11 | 12 | Let's Make More! 13 | ================ 14 | 15 | Let's make a planetary system! 16 | 17 | + Create a Planet class 18 | + Create a SolarSystem class that has an attribute "planets" that has 0-??? Planets 19 | + make a new directory inside the *examples/week2/solar_systems/* directory named for your solar system, and put all your work in that folder 20 | + Get creative! Give new Planets random names, diameters, mass, moons.. whatever! 21 | + When you're done, help someone else 22 | 23 | 24 | -------------------------------------------------------------------------------- /archive/topic_resources/overview.md: -------------------------------------------------------------------------------- 1 | ### Overview 2 | 3 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /archive/topic_resources/parade: -------------------------------------------------------------------------------- 1 | title "Monday, December 2" 2 | 3 | theme "archetect" 4 | 5 | section "Starting Our Day" do 6 | slides "schedule.md" 7 | slides "standup.md" 8 | end 9 | 10 | section "Introducton to Rails" do 11 | slides "rails.md" 12 | end 13 | 14 | section "Active Record" do 15 | slides "active_record.md" 16 | end 17 | 18 | section "Homework" do 19 | slides "homework.md" 20 | end -------------------------------------------------------------------------------- /archive/topic_resources/params_hash.md: -------------------------------------------------------------------------------- 1 | ## Params Hash (Sinatra & Rails) 2 | 3 | Within Sinatra there is a method we can access called `params`, `params` returns a hash. Before we get further into this, let's look at the documentation for [Sinatra::Base](https://github.com/sinatra/sinatra/blob/master/lib/sinatra/base.rb) (which is what our Sinatra app class inherit from) [docs](https://github.com/sinatra/sinatra/blob/master/lib/sinatra/base.rb). On lines 75-87 4 | 5 | attr_accessor :params 6 | 7 | def initialize(entry) 8 | params = entry.scan(HEADER_PARAM).map! do |s| 9 | key, value = s.strip.split('=', 2) 10 | value = value[1..-2].gsub(/\\(.)/, '\1') if value.start_with?('"') 11 | [key, value] 12 | end 13 | 14 | @entry = entry 15 | @type = entry[/[^;]+/].delete(' ') 16 | @params = Hash[params] 17 | @q = @params.delete('q') { 1.0 }.to_f 18 | end 19 | ... 20 | 21 | We see that `params` is simply an instance variable (`@params`) being defined by the `attr_accessor :params`. Pretty familiar. 22 | 23 | So in our route declarations in Sinatra, we can use this method to access the hash 24 | 25 | get "/" do 26 | params # This method returns a hash 27 | erb :index 28 | end 29 | 30 | So what is in the `params` hash? All of the relevant data from the URL matching or from a form submission will be assigned to the `params` hash on each request. The data does not persist between requests so everytime the page loads the hash is reassigned with that requests data. 31 | 32 | -------------------------------------------------------------------------------- /archive/topic_resources/personal-website-overview.md: -------------------------------------------------------------------------------- 1 | ## Personal Website Overview 2 | 3 | #### Breakfast 4 | 5 | - **Duration**: 3 days (then ongoing as desired) 6 | - **Submission**: Your second blog post 7 | 8 | In the Personal Website project, we will be using the [Sinatra Blog](https://github.com/Ada-Developers-Academy/daily-curriculum/topic_resources/sinatra-blog.md) you created last week. We will be adding HTML content and styling with CSS to the [layout.erb](https://github.com/Ada-Developers-Academy/daily-curriculum/topic_resources/sinatra_practice/views/layout.erb) page. The goal is to have a personal blog to promote yourself and/or to have fun. 9 | 10 | #### After this project you will be able to: 11 | 12 | 1. Mock-up a website layout using common tools. 13 | 2. Implement an HTML structure based on a mock-up using up-to-date practices. 14 | 3. Learn and practice the implementation of the most common HTML Tags. 15 | 4. Link to separate CSS files. 16 | 5. Style a webpage using basic CSS techniques. 17 | 18 | #### Lunch 19 | 20 | 25 | #### Dinner 26 | 27 | - `nth-child` selectors 28 | - CSS3 usage (rounded corners, gradients, text-manipulation, transitions, transform) 29 | - Media queries 30 | - Image sprites 31 | - Making your form functional in *any* way. 32 | -------------------------------------------------------------------------------- /archive/topic_resources/personalitysortinghat.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-80 title-and-content transition=fade 2 | 3 | Personality Sorting Hat 4 | ======================= 5 | 6 | Make a new class "SortingHat" in personality_sorting_hat.rb. 7 | 8 | A PSH (Personality Sorting Hat) object answers 'Well you are inquisitive aren't you?' if you ask her a question. 9 | 10 | She answers 'Well you are rather loud aren't you?' if you yell at her (ALL CAPS). 11 | 12 | She says 'Hello?… Are you there? You are too quiet… Or perhaps you don't exist' if you address her without actually saying anything. 13 | 14 | She answers 'Hmmmm…. I don't know… you seem complex.' to anything else. 15 | -------------------------------------------------------------------------------- /archive/topic_resources/planetary_age.md: -------------------------------------------------------------------------------- 1 | Given an age in seconds, calculate how old someone would be on: 2 | 3 | - Earth: orbital period 365.25 Earth days, or 31557600 seconds 4 | - Mercury: orbital period 0.2408467 Earth years 5 | - Venus: orbital period 0.61519726 Earth years 6 | - Mars: orbital period 1.8808158 Earth years 7 | - Jupiter: orbital period 11.862615 Earth years 8 | - Saturn: orbital period 29.447498 Earth years 9 | - Uranus: orbital period 84.016846 Earth years 10 | - Neptune: orbital period 164.79132 Earth years 11 | 12 | So if you were told someone were 1,000,000,000 seconds old, 13 | you should be able to say that they're 31 Earth-years old. 14 | 15 | If you're wondering why Pluto didn't make the cut, 16 | go watch [this youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). 17 | 18 | (via exercism.io) -------------------------------------------------------------------------------- /archive/topic_resources/planets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Planets 6 | 7 | 8 |

Green Planet

9 |

All is well

10 |

Red Planet

11 |

Nothing to report

12 |

Blue Planet

13 |

All systems A-OK

14 | 15 | 16 | -------------------------------------------------------------------------------- /archive/topic_resources/problem-solving-interview/ada-102-dir_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/problem-solving-interview/ada-102-dir_tree.png -------------------------------------------------------------------------------- /archive/topic_resources/project-forks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/project-forks.png -------------------------------------------------------------------------------- /archive/topic_resources/project-masters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/project-masters.png -------------------------------------------------------------------------------- /archive/topic_resources/project-turn-in-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/project-turn-in-workflow.png -------------------------------------------------------------------------------- /archive/topic_resources/pull-request-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/pull-request-1.png -------------------------------------------------------------------------------- /archive/topic_resources/pull-request-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/pull-request-2.png -------------------------------------------------------------------------------- /archive/topic_resources/pull-request-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/pull-request-3.png -------------------------------------------------------------------------------- /archive/topic_resources/pull-request-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/pull-request-4.png -------------------------------------------------------------------------------- /archive/topic_resources/pull-request-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/pull-request-5.png -------------------------------------------------------------------------------- /archive/topic_resources/push-branch-upstream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/push-branch-upstream.png -------------------------------------------------------------------------------- /archive/topic_resources/queue.rb: -------------------------------------------------------------------------------- 1 | class Queue 2 | def initialize 3 | @backing_store = [] 4 | end 5 | 6 | def enqueue(el) 7 | @backing_store.push el 8 | end 9 | 10 | def dequeue 11 | @backing_store.shift 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /archive/topic_resources/rails-break-project.md: -------------------------------------------------------------------------------- 1 | # Break Project 2 | 3 | Create a rails application of your choosing over break. The requirements are as follows: 4 | 5 | - At least two models that have some sort of relationship to one another 6 | - At least two controllers that handle actions for the two models 7 | - The basic set of CRUD operations associated with each models (if you want to exclude one of these for contextual purposes, that is fine as well, as long as it makes sense) 8 | - This requires routes, views, controller methods, etc. 9 | - You should incorporate good markup practices for your views and incorporate some amount of CSS for a pleasant visual presentation 10 | - Pushed to GitHub 11 | - This should be a *new* repository set up under your own GitHub account 12 | - See: `git init` and `New Repository` functionality on GitHub 13 | - You should have regular commits and meaningful commit messages 14 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/active-record-practice.md: -------------------------------------------------------------------------------- 1 | # ActiveRecord Practice 2 | 3 | - Create a new rails app (yep rails new). 4 | - Create a model called `Student` with a name and two other attributes (like favorite pie and home state) 5 | ``` 6 | rails g model student name:string other_field:type 7 | ``` 8 | - Enter rails console. 9 | - Create a record in the database for yourself. 10 | - Create a record in the database for the students sitting on all four sides of you. Ask each of them for the information you've defined for your student class. 11 | - If you're asking someone a question who has not yet setup thier `Student` model, offer to help. 12 | - After all 5 records are created. Try to use the follwing methods 13 | - find 14 | - where 15 | - find_by 16 | - destroy 17 | - where.not 18 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/create-view-helpers.md: -------------------------------------------------------------------------------- 1 | # Create Custom View Helpers 2 | 3 | New helper methods are defined in within the `app/helpers` directory. All of the helper files within `app/helpers` will be available to any page, the only reason to have separate files is to separate concerns. The `application_helper.rb` is a great place to define methods that are not specific to a model. 4 | 5 | Let's define a new method that transforms a date object into something readable: 6 | ```ruby 7 | def readable_date(date) 8 | "" + date.strftime("%A, %b %d") + "" 9 | end 10 | ``` 11 | Then within any view I could use this method, and pass in any date or time object: 12 | ```html 13 |

<%= @book.title %>

14 | <%= readable_date(@book.created_at) %> 15 | ``` 16 | This would produce the HTML 17 | ```html 18 |

<%= @book.title %>

19 | Wednesday, Jan 08 20 | ``` 21 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/custom-validators.md: -------------------------------------------------------------------------------- 1 | # Custom Validation 2 | 3 | Rails provides a number of validators for you to utilize, but there may be cases where you have your own validation that you'd like to utilize. 4 | 5 | Rails allows you to create two types of custom validators. 6 | 7 | [Custom Validations](http://guides.rubyonrails.org/active_record_validations.html#performing-custom-validations) 8 | 9 | ## Custom validators 10 | Custom validators are classes that you create that extend the `ActiveModel::Validator` class. This class must implement a `validate` method which will perform the validation. The result of the validation method should be an updated errors hash if the validation has not passed. 11 | 12 | Within the model class where you would like to use the new validation, you use `validates_with` to specify the custom validator class that you want to use. 13 | 14 | These new validator classes should be placed in the `app/validators` folder so that Rails can load them automatically for your use. 15 | 16 | ## Custom methods 17 | Custom validation methods are different than custom validators because they exist within the model class itself. The result of the validation method should be an updated errors hash if the validation has not passed (same as the custom validator class). 18 | 19 | Within the model class you use `validates` to specify the custom validation method that you want to use. 20 | 21 | Since these custom methods exist within the model class itself, there is no additional work that needs to be done to integrate the custom methods with the model. 22 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/gemsets.md: -------------------------------------------------------------------------------- 1 | # Gems! 2 | 3 | [RVM Gemset Basics](https://rvm.io/gemsets/basics) 4 | 5 | ## Gemset 6 | 7 | Do this after forking from master, make sure you're on your own branch. 8 | 9 | 1. cd into your 'project-forks' folder 10 | 2. `echo 'ProjectName' > PROJECTFOLDER/.ruby-gemset` 11 | - ex) `echo 'TaskListRails' > TaskListRails/.ruby-gemset` 12 | 3. `echo '2.2.3' > PROJECTFOLDER/.ruby-version` (Or whatever the latest version of Ruby is) 13 | - ex) `echo '2.2.3' > TaskListRails/.ruby-version` 14 | 4. cd in to project folder (wrappers happen...) 15 | 5. `rvm gemset list` (yes it's on the gemset we just created) 16 | 6. `gem install bundler` 17 | 7. `gem install rails --no-ri --no-rdoc` 18 | 8. `git add .` 19 | 9. `git commit -m "Created gemset."` 20 | 10. `rails new . -T` 21 | 11. `git add .` 22 | 12. `git commit -m "fresh Rails install"` 23 | 13. open and edit `Gemfile` with gems, save! 24 | 14. `bundle install --without production` 25 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/intro-to-mvc.md: -------------------------------------------------------------------------------- 1 | # The MVC Pattern: Model View Controller 2 | 3 | MVC was devised in '79 by the folks working on Smalltalk, which is one of the core influences of Ruby. What we call MVC today, especially in the realm of web stack, is pretty different than that original specification, but the core principles have help true. 4 | 5 | Essentially, MVC is way to divide responsibilities to complete a task. It's especially well suited to object oriented programming because of the focus on messaging between objects. 6 | 7 | ## The Model 8 | - Contains data for the application (often linked to a database) 9 | - Contains state of the application (e.g. what orders a customer has) 10 | - No knowledge of user interfaces, so it can be reused 11 | 12 | ## The View 13 | - Generates the user interface which presents data to the user 14 | - Passive, i.e. doesn’t do any processing 15 | - Views work is done once the data is displayed to the user. 16 | - Many views can access the same model for different reasons 17 | 18 | ## The Controller 19 | - Receive events from the outside world (usually from views) 20 | - Interact with the model 21 | - Determine the next step in the process flow 22 | - Often responsible for notifying the View of state changes 23 | 24 | We can think of each of these roles as the responsibility of an object, and use those responsibilities to organize a web service, like this: 25 | 26 | ![MVC in Rails](railsmvc.png) 27 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/rails-erd.md: -------------------------------------------------------------------------------- 1 | # ERD Diagrams 2 | 3 | Having an entity-relationship diagram in Rails in a useful tool in understanding the relationships that you have configured. 4 | 5 | There is a helpful Gem called `rails-erd` that uses `graphviz` to generate the ERD diagram. 6 | 7 | Use the following steps from a Rails project in order to set up to view ERD diagram: 8 | ``` 9 | brew install graphviz 10 | ``` 11 | 12 | Add `gem rails-erd` to your Gemfile 13 | 14 | To generate and view the ERD diagram, run the following commands: 15 | ``` 16 | bundle install 17 | bundle exec erd 18 | open erd.pdf 19 | ``` 20 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/rails-request-cycle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/rails/rails-request-cycle.jpg -------------------------------------------------------------------------------- /archive/topic_resources/rails/rails-request-cycle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/rails/rails-request-cycle.pdf -------------------------------------------------------------------------------- /archive/topic_resources/rails/railsmvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/rails/railsmvc.png -------------------------------------------------------------------------------- /archive/topic_resources/rails/session.md: -------------------------------------------------------------------------------- 1 | # Session 2 | 3 | The session is a hash like object (similar to params), but this object is persisted between requests. 4 | Sessions use a cookie in the browser to identify each unique session. The session is meant to store small amounts of data (4kB) 5 | 6 | The most common use is to store the id of a logged in user. The session is also a method on the controller. 7 | From within a controller we can get and set session keys using the familiar hash syntax. 8 | 9 | ```ruby 10 | class UsersController < ApplicationController 11 | 12 | def create 13 | @user = User.new 14 | if @user.save 15 | session[:user_id] = @user.id 16 | redirect_to root_path 17 | end 18 | end 19 | 20 | def show 21 | @user = User.find(session[:user_id]) 22 | end 23 | end 24 | ``` 25 | -------------------------------------------------------------------------------- /archive/topic_resources/rails/twitter.md: -------------------------------------------------------------------------------- 1 | ## Twitter 2 | Create a single serving (no users) version of Twitter. The app should have: 3 | 4 | - Tweet model 5 | - body (must be present, max 140 characters long) 6 | - author 7 | - TweetsController 8 | - An `index` action which shows all of the tweets 9 | - A `show` action to view a specific tweet 10 | - A `new` action (optional, you can put the form on `index`) 11 | - A `create` action where tweets are created 12 | 13 | ### Optional 14 | 15 | - tweet_spec.rb 16 | - Testing validations of body (presence and length) 17 | - Testing any addition methods you add 18 | - tweets_controller_spec.rb 19 | - Test each controller action 20 | - No need to test private actions 21 | 22 | ### Extra Credit 23 | 24 | Implement Users using a TDD approach. 25 | -------------------------------------------------------------------------------- /archive/topic_resources/recap.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-80 title-and-content transition=cover 2 | 3 | Last Week on Ada... 4 | =================== 5 | 6 | ### Introduction to our tools 7 | 8 | + Basic BASH 9 | + Intro to git 10 | + Atom Text 11 | 12 | !SLIDE text-size-80 title-and-content transition=cover 13 | 14 | Last Week on Ada... 15 | =================== 16 | 17 | ### Introduction to each other 18 | 19 | + Ada Board said hello 20 | + Categories Game 21 | + Cupcakes! 22 | 23 | !SLIDE text-size-80 title-and-content transition=cover 24 | 25 | Last Week on Ada... 26 | =================== 27 | 28 | ### Began to explore Ruby 29 | 30 | + Using IRB 31 | + Strings and Numbers 32 | + Loops and Conditionals 33 | + Arrays and Hashes 34 | + Methods and Objects 35 | 36 | !SLIDE text-size-80 title-and-content transition=cover 37 | 38 | Last Week on Ada... 39 | =================== 40 | 41 | ### Building things! 42 | 43 | + RailsBridge 44 | + Calculator 45 | + Adventure Game 46 | 47 | 48 | !SLIDE text-size-80 title-and-content transition=cover 49 | 50 | This Week on Ada... 51 | =================== 52 | 53 | + Working with dates and times 54 | + Our first external library ("gem") 55 | + Objects! Lots of Objects! 56 | + Methods - public and private 57 | + Get ready to write some games! 58 | -------------------------------------------------------------------------------- /archive/topic_resources/recursion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/recursion.png -------------------------------------------------------------------------------- /archive/topic_resources/resources.md: -------------------------------------------------------------------------------- 1 | ## Rails Resources 2 | This document contains links to online resources for further explainations and discussions on topics covered in week 7 3 | 4 | #### Rspec 5 | 6 | - [rspec-rails Matchers Documentation](http://rspec.rubyforge.org/rspec-rails/1.1.12/classes/Spec/Rails/Matchers.html) (i.e. `be_valid`) 7 | - [rspec-rails gem Gitub](https://github.com/rspec/rspec-rails) 8 | - [Non-rails rspec cheat-sheet](http://www.anchor.com.au/wp-content/uploads/rspec_cheatsheet_attributed.pdf) 9 | - [rspec examples](https://gist.github.com/harlow/4208459) 10 | 11 | #### Active Record 12 | 13 | - [Desktop SQL Application](http://www.sequelpro.com) 14 | - [Docs](http://api.rubyonrails.org/classes/ActiveRecord/Base.html) 15 | - [Query Guide](http://guides.rubyonrails.org/active_record_querying.html) 16 | 17 | #### Routing 18 | 19 | - [Guide](http://guides.rubyonrails.org/routing.html) 20 | 21 | #### Controllers 22 | 23 | - [ActionController Guide](http://guides.rubyonrails.org/action_controller_overview.html) 24 | - [Layouts and Rendering](http://guides.rubyonrails.org/layouts_and_rendering.html) 25 | - [Controller Screen Cast](http://rubyonrails.org/screencasts/rails3/action-controller) 26 | 27 | #### Views 28 | 29 | - [Guide](http://guides.rubyonrails.org/action_view_overview.html) -------------------------------------------------------------------------------- /archive/topic_resources/resources/addEvent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/addevent.js: -------------------------------------------------------------------------------- 1 | (function(window){ 2 | "use strict"; 3 | 4 | var document = window.document; 5 | 6 | document.addEventListener( "DOMContentLoaded", function( e ){ 7 | var btn = document.querySelector( "#numberInc" ); 8 | var numberEl = document.querySelector( "#number" ); 9 | 10 | btn.addEventListener( "click" , function( e ){ 11 | var num = numberEl.innerHTML; 12 | var num1 = parseInt( num, 10 ); 13 | num1++; 14 | numberEl.innerHTML = num1; 15 | }); 16 | }); 17 | }(this)); 18 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/alias-record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/alias-record.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/async-programming.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/async-programming.key -------------------------------------------------------------------------------- /archive/topic_resources/resources/better_errors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/better_errors.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/blank.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var o1 = { 3 | contents: "Yo", 4 | id: "yo", 5 | type: "span" 6 | }; 7 | var o2 = { 8 | contents: "What's", 9 | id: "whats", 10 | type: "span" 11 | }; 12 | var o3 = { 13 | contents: "The", 14 | id: "the", 15 | type: "span" 16 | }; 17 | var o4 = { 18 | contents: "Rumpus", 19 | id: "rumpus", 20 | type: "span" 21 | }; 22 | 23 | var createAndAddElement = function( obj ){ 24 | var el = document.createElement( obj.type ); 25 | el.id = obj.id; 26 | el.innerHTML = obj.contents; 27 | document.body.appendChild( el ); 28 | }; 29 | 30 | document.addEventListener( "DOMContentLoaded", function( e ){ 31 | [o1, o2, o3, o4].forEach( createAndAddElement ); 32 | 33 | var yo = document.querySelector( "#yo" ); 34 | yo.addEventListener( "click", function( e ){ 35 | this.style.color = "red"; 36 | }); 37 | 38 | }); 39 | 40 | 41 | }()); 42 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/calculator.rb: -------------------------------------------------------------------------------- 1 | def calculate(operation, num1, num2) 2 | if operation == "add" 3 | add(num1, num2) 4 | elsif operation == "subtract" 5 | subtract(num1, num2) 6 | end 7 | end 8 | 9 | def add(num1, num2) 10 | num1 + num2 11 | end 12 | 13 | def subtract(num1, num2) 14 | num1 - num2 15 | end 16 | 17 | puts "Hello!" 18 | 19 | quit = false 20 | 21 | while quit != true 22 | puts "What would you like to compute?" 23 | puts "Start by giving me the operation (add or subtract)..." 24 | operation = gets.chomp 25 | 26 | if operation =~ /bye/ 27 | quit = true 28 | puts "Goodbye" 29 | else 30 | puts "what is the first number?" 31 | num1 = gets.chomp 32 | 33 | puts "...and the second number?" 34 | num2 = gets.chomp 35 | 36 | answer = calculate(operation, num1.to_i, num2.to_i) 37 | if answer.nil? 38 | puts "Oops the operation '#{operation}' isn't in this calculator." 39 | puts "Try again." 40 | else 41 | puts "The answer is #{answer}" 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/canvas.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/canvas.key -------------------------------------------------------------------------------- /archive/topic_resources/resources/canvas.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/canvas.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/chair.rb: -------------------------------------------------------------------------------- 1 | class Furniture 2 | attr_accessor :name, :color 3 | 4 | def initialize(name_var, color_var) 5 | @name = name_var.reverse 6 | @color = color_var 7 | @weight = 30 8 | end 9 | 10 | def weight_in_lbs 11 | @weight 12 | end 13 | 14 | def weight_in_lbs=(num) 15 | @weight = num 16 | end 17 | 18 | def max_height 19 | 23.625 20 | end 21 | 22 | def self.all 23 | [["Vilgot", "Red"], ["Mika", "Blue"]].map do |name, color| 24 | new(name, color) 25 | end 26 | end 27 | end 28 | 29 | 30 | class Chair < Furniture 31 | 32 | 33 | def self.description 34 | "A chair is a piece of furniture with a raised surface used to sit on, commonly for use by one person." 35 | end 36 | 37 | def type 38 | "Swivel" 39 | end 40 | 41 | 42 | end -------------------------------------------------------------------------------- /archive/topic_resources/resources/code-example.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var name = "Jeff"; 3 | 4 | var greeting = greet( name ); //=> TypeError 5 | 6 | var greet = function(param){ 7 | return "Hey, " + param; 8 | }; 9 | 10 | console.log( greeting ); 11 | 12 | }()); 13 | 14 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/code-example2.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var name = "Jeff"; 3 | 4 | var greeting = greet( name ); 5 | 6 | function greet(param){ 7 | return "Hey, " + param; 8 | } 9 | 10 | console.log( greeting ); //=> "Hey, Jeff" 11 | 12 | }()); 13 | 14 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/code-examples-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code example 2 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/code-examples.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code example 1 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/dynamic-typing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/dynamic-typing.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/events.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/events.key -------------------------------------------------------------------------------- /archive/topic_resources/resources/example0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example 0 5 | 17 | 18 | 19 | 20 | Canvas Not supported 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
New VisitorsReturning Visitors
7510
37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example0.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var canv = document.querySelector( '#cvs' ); //document.getElementById( 'cvs' ); 3 | var context = canv.getContext( '2d' ); 4 | context.fillStyle = 'black'; 5 | context.beginPath(); 6 | 7 | var x = canv.width/2; 8 | var y = canv.height/2; 9 | var radius = (function(){ 10 | if( x < y ){ 11 | return x; 12 | } 13 | return y; 14 | }()); 15 | var startDeg = 0; 16 | var endDeg = Math.PI; 17 | var counterClockwise = true; 18 | context.arc( x, y, radius, startDeg, endDeg, counterClockwise ); 19 | context.fill(); 20 | }()); 21 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example 1 5 | 17 | 18 | 19 | 20 | Canvas Not supported 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example1.js: -------------------------------------------------------------------------------- 1 | (function(window){ 2 | document.addEventListener( "DOMContentLoaded" , function( e ){ 3 | var canvas = document.getElementById('canvas'), 4 | context = canvas.getContext('2d'); 5 | 6 | context.font = '38pt Arial'; 7 | context.fillStyle = 'blue'; 8 | context.strokeStyle = 'blue'; 9 | context.textAlign = "center"; 10 | 11 | context.fillText( 'Hello Ada', canvas.width/2 , canvas.height/2 ); 12 | context.strokeText( 'Hello Ada', canvas.width/2, canvas.height/2 ); 13 | }); 14 | }(this)); 15 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example 2 5 | 17 | 18 | 19 | 20 | Canvas Not supported 21 | 22 | 23 | 24 | 25 | 26 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
27 | New 28 | 30 | Returning 31 |
2575
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example 3 5 | 17 | 18 | 19 | 20 | Canvas Not supported 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/example3.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | document.addEventListener( 'DOMContentLoaded', function( e ){ 3 | var canvas = document.getElementById( 'cvs' ), 4 | context = canvas.getContext( '2d' ); 5 | 6 | context.strokeRect( canvas.width/2 - 25, canvas.height/2 - 100, 50, 200 ); 7 | context.fillRect( canvas.width/2 - 25, canvas.height/2 - 100, 50, 200 ); 8 | 9 | }); 10 | }()); 11 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/functions.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/functions.key -------------------------------------------------------------------------------- /archive/topic_resources/resources/functions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/functions.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/github-application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/github-application.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/github-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/github-credentials.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/grep_example/capitalized_fruits.txt: -------------------------------------------------------------------------------- 1 | Apple 2 | Banana 3 | Cherry -------------------------------------------------------------------------------- /archive/topic_resources/resources/grep_example/fruits.txt: -------------------------------------------------------------------------------- 1 | apple 2 | banana 3 | cherry -------------------------------------------------------------------------------- /archive/topic_resources/resources/grep_example/pie_flavors.txt: -------------------------------------------------------------------------------- 1 | Apple Pie 2 | Banana Pie 3 | Cherry Pie 4 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/grid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Grid 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/developers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/developers.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/dog.jpg -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/drracket_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/drracket_interface.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/excellent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/excellent.gif -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/kitten.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/kitten.jpg -------------------------------------------------------------------------------- /archive/topic_resources/resources/images/nwtekno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/images/nwtekno.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/instant-grat-and-the-dom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/instant-grat-and-the-dom.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/js-the-env-and-the-tools.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/js-the-env-and-the-tools.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/message.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/oauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/oauth.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/omniauth-dance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/omniauth-dance.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/printadd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Print out addresses 5 | 6 | 7 | 8 | Link 1 9 | Link 2 10 | Link 3 11 | Link 4 12 | Link 5 13 | Link 6 14 | Link 7 15 | Link 8 16 | Link 9 17 | Link 10 18 | Link 11 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/printadd.js: -------------------------------------------------------------------------------- 1 | (function( window ){ 2 | "use strict"; 3 | 4 | var printHref = function( link ){ 5 | window.console.log( link.href ); 6 | }; 7 | 8 | window.document.addEventListener( "DOMContentLoaded" , function( e ){ 9 | var links = window.document.querySelectorAll( "a" ); 10 | // Array.prototype.forEach.call( links , printHref ); 11 | Array.prototype.forEach.call( links , function( link, index, array ){ 12 | window.console.log( link.href ); 13 | } ); 14 | }); 15 | 16 | }(this)); 17 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/quiz.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Yo 6 | Ada 7 | What's 8 | The 9 | Rumpus? 10 | 11 | 12 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/quiz3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/quiz3.js: -------------------------------------------------------------------------------- 1 | (function( window ){ 2 | "use strict"; 3 | var document = window.document; 4 | 5 | document.addEventListener( "DOMContentLoaded", function( e ){ 6 | var el = document.createElement( "span" ); 7 | 8 | el.innerHTML = "JavaScript is awesome"; 9 | 10 | var colorIt = function(){ 11 | this.style.color = "green"; 12 | }; 13 | 14 | el.addEventListener( "click", colorIt ); 15 | 16 | document.body.appendChild( el ); 17 | }); 18 | })( this ); 19 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/rectangle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Rectangle 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/rectangle.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | document.addEventListener( "DOMContentLoaded", function( e ){ 3 | var cvs = document.querySelector( "#cvs" ), 4 | ctx = cvs.getContext( '2d' ); 5 | 6 | var origin = { 7 | x: 0, 8 | y: ctx.canvas.height 9 | }; 10 | var dimensions = { 11 | width: 50, 12 | height: 100 13 | }; 14 | var fillColor = 'darkgoldenrod'; 15 | var strokeColor = 'darkslategray'; 16 | 17 | ctx.beginPath(); 18 | ctx.fillStyle = fillColor; 19 | ctx.strokeStyle = strokeColor; 20 | //x, y, width, height 21 | ctx.rect(origin.x, 22 | origin.y - dimensions.height, 23 | dimensions.width, 24 | dimensions.height); 25 | ctx.stroke(); 26 | ctx.fill(); 27 | 28 | }); 29 | })(); 30 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/rectangle2.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | document.addEventListener( "DOMContentLoaded", function( e ){ 3 | // Get my canvas 4 | var canvas = document.querySelector( "#canvas" ); 5 | // Get the context 6 | var context = canvas.getContext( '2d' ); 7 | var drawBarRect = function( height, color, xCoord ){ 8 | context.beginPath(); 9 | // draw the rectangle 10 | var rectWidth = 50; 11 | var rectHeight = height; 12 | var x = xCoord; 13 | var y = canvas.height - rectHeight; 14 | // .rect( x, y, width, height ) 15 | // x, y are top left 16 | context.rect( x, y, rectWidth, rectHeight ); 17 | context.fillStyle = color; 18 | context.fill(); 19 | }; 20 | 21 | drawBarRect( 100, 'blue', 75 ); 22 | drawBarRect( 200, 'green', 200 ); 23 | drawBarRect( 75, 'orange', 300 ); 24 | 25 | }); 26 | })(); 27 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/request-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/request-timeline.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/scope.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/scope.key -------------------------------------------------------------------------------- /archive/topic_resources/resources/scope.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/scope.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/scope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/scope.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/stack-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/stack-trace.png -------------------------------------------------------------------------------- /archive/topic_resources/resources/syntax.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/resources/syntax.pdf -------------------------------------------------------------------------------- /archive/topic_resources/resources/test.rb: -------------------------------------------------------------------------------- 1 | def sing_bottles_song(number_of_bottles) 2 | if number_of_bottles == 1 3 | puts "1 bottle of beer on the wall.." 4 | 5 | puts "0 bottles of beer left!" 6 | else 7 | puts number_of_bottles.to_s + " bottles of beer on the wall.." 8 | 9 | puts (number_of_bottles - 1).to_s + " bottles of beer left!" 10 | end 11 | 12 | puts "We started with " + number_of_bottles.to_s + " bottles." 13 | puts "----------------------" 14 | end 15 | 16 | puts "How many bottles?" 17 | bottles = gets.chomp.to_i 18 | 19 | until bottles == 0 20 | sing_bottles_song(bottles) 21 | bottles = bottles - 1 22 | end 23 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/weather.rb: -------------------------------------------------------------------------------- 1 | require 'httparty' # If using Rails with a Gemfile, this require is not needed 2 | class Weather 3 | attr_accessor :city 4 | 5 | def initialize(city) 6 | @city = city 7 | end 8 | 9 | def current_weather 10 | request("weather") 11 | end 12 | 13 | def forecast 14 | request("forecast") 15 | end 16 | 17 | def request(path) 18 | response = HTTParty.get("http://api.openweathermap.org/data/2.5/#{path}?q=#{@city}") 19 | response.parsed_response 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/weather_spec.rb: -------------------------------------------------------------------------------- 1 | require 'httparty' 2 | class Weather 3 | def initialize(city) 4 | @city = city 5 | @weather = get_weather 6 | email 7 | end 8 | 9 | def description 10 | @weather["weather"][0]["description"] 11 | end 12 | 13 | def email(email_address) 14 | WeatherMailer.send_report(email_address).deliver 15 | end 16 | 17 | private 18 | 19 | def get_weather 20 | 21 | HTTParty.get("http://api.openweathermap.org/data/2.5/weather?q=#{@city}") 22 | end 23 | end 24 | 25 | describe Weather do 26 | let(:weather) { {"weather" => [{"description" => "light rain"}]}} 27 | 28 | # it "returns the weather" do 29 | # expect(Weather.new("Seattle").description).to eq "overcast clouds" 30 | # end 31 | 32 | 33 | # This is a stub 34 | it "returns the weather" do 35 | HTTParty.stub(:get) { weather } 36 | expect(Weather.new("London,uk").description).to eq "light rain" 37 | end 38 | 39 | # This is a mock 40 | it "returns the weather" do 41 | weather_data = double("data") 42 | Weather.any_instance.stub(:get_weather) { weather_data } 43 | expect(weather_data).to receive(:[]).with("weather") { weather_data } 44 | expect(weather_data).to receive(:[]).with(0) { weather_data } 45 | expect(weather_data).to receive(:[]).with("description") { weather_data } 46 | Weather.new("London,uk").description 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /archive/topic_resources/resources/while.rb: -------------------------------------------------------------------------------- 1 | def while_num_loop(n,m) 2 | 3 | numbers = [] 4 | 5 | (n..m).each do |array_number| 6 | puts "i now #{array_number}!" 7 | numbers.push(array_number) 8 | puts "Numbers now: #{numbers}" 9 | end 10 | 11 | puts "The numbers:" 12 | 13 | for num in numbers 14 | puts num 15 | end 16 | end 17 | 18 | while_num_loop(1,5) -------------------------------------------------------------------------------- /archive/topic_resources/retro.md: -------------------------------------------------------------------------------- 1 | # Retrospective 2 | 3 | In Agile teams retrospectives occur after each "sprint". There are many different ways that retrospective activities are conducted across teams. We will use the four categories below to classify our experiences and things that we want to acknowledge: 4 | 5 | 1. Challenges & Opportunities for Improvement 6 | 2. Less Of 7 | 3. More Of 8 | 4. Positive Experiences & Recognition 9 | -------------------------------------------------------------------------------- /archive/topic_resources/robocop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/robocop.jpg -------------------------------------------------------------------------------- /archive/topic_resources/rspec-tools.md: -------------------------------------------------------------------------------- 1 | # Rspec Tools 2 | 3 | #### SimpleCov 4 | 5 | We've covered [simplecov](https://github.com/colszowka/simplecov) with ruby projects in the past, but it's just as easy to implement into a rails project. In your gemfile add: 6 | 7 | gem 'simplecov', :require => false, :group => :test 8 | 9 | Then to tell simple cov to track your files add the following to the very top of the spec_helper.rb 10 | 11 | require 'simplecov' 12 | SimpleCov.start 13 | 14 | The results can be seen in HTML file `coverage/index.html`. 15 | 16 | If some files are being seen by simplecov that shouldn't such as any spec file, you can add additional configuration by changing the code at the top of the spec_helper.rb: 17 | 18 | require 'simplecov' 19 | SimpleCov.start do 20 | add_filter "/spec/" 21 | end 22 | 23 | More configuration options can be found on the [simplecov github page](https://github.com/colszowka/simplecov) 24 | 25 | #### Guard 26 | 27 | We have implemented [guard rspec](https://github.com/guard/guard-rspec) in the past as well, here are the steps for installing it within a rails application. Add to the `development` and `test` groups of the `Gemfile`: 28 | 29 | gem "guard-rspec", require: false 30 | 31 | Then from the Terminal, run the following command to setup the configuration file (`Guardfile`) 32 | 33 | guard init rspec 34 | 35 | Now you should be able to run your specs continuously by running `bundle exec guard` 36 | -------------------------------------------------------------------------------- /archive/topic_resources/rspec/lib/person.rb: -------------------------------------------------------------------------------- 1 | class Person 2 | attr_accessor :name 3 | def initialize(name) 4 | @name = name 5 | end 6 | end 7 | 8 | require 'rspec' 9 | 10 | describe "Person" do 11 | let(:person) { Person.new("Bookis") } 12 | it "has the name Bookis" do 13 | person.name.should eq "Bookis" 14 | end 15 | end 16 | # Run with `rspec filename.rb` -------------------------------------------------------------------------------- /archive/topic_resources/rspec/spec/lib/person_spec.rb: -------------------------------------------------------------------------------- 1 | require "./lib/person" 2 | 3 | describe Person do 4 | describe "new" do 5 | it "has the assigned name through the new method" do 6 | Person.new("Bookis").name.should eq "Bookis" 7 | end 8 | 9 | it "assigns the name attribute from a hash" do 10 | expect(Person.new({:name => "Bookis"}).name).to eq "Bookis" 11 | end 12 | end 13 | 14 | it "is an example" do 15 | true.should eq true 16 | end 17 | 18 | end -------------------------------------------------------------------------------- /archive/topic_resources/rubocop.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-80 title-and-content transition=fade 2 | 3 | Rubocop 4 | ======= 5 | 6 | ## Role models are important. *-- Officer Alex J. Murphy / RoboCop* 7 | 8 |
9 | 10 | 11 | !SLIDE title-and-content transition=fade 12 | 13 | Rubocop 14 | ======= 15 | 16 | RuboCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide. 17 | 18 | https://github.com/bbatsov/rubocop/ 19 | 20 | Community Style Guide:
21 | https://github.com/bbatsov/ruby-style-guide 22 | 23 | 24 | !SLIDE title-and-content transition=fade 25 | 26 | Rubocop 27 | ======= 28 | 29 | ``` 30 | $ gem install rubocop 31 | ``` 32 | 33 | ``` 34 | $ rubocop 35 | ``` 36 | -------------------------------------------------------------------------------- /archive/topic_resources/schedule.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-90 title-and-content transition=fade 2 | 3 | Monday, December 2 4 | ================== 5 | 6 | | Time | Topic | 7 | |:-----------------:|:----------------------------------------:| 8 | | **9:05 - 9:15** | Standup | 9 | | **9:15 - 10:45** | Presentations | 10 | | **10:45 - 11:00** | Break | 11 | | **11:00 - 12:00** | [Introduction to Rails](monday/rails.md) | 12 | | **12:00 - 1:30*** | Project Time - [Ada Cooks](ada_cooks.md) | 13 | | **1:30 - 2:30** | [ActiveRecord](monday/active_record.md) | 14 | | **2:30 - 5:00** | Project Time - [Ada Cooks](ada_cooks.md) | 15 | 16 | \* Take an hour lunch at any time 17 | 18 | 19 | -------------------------------------------------------------------------------- /archive/topic_resources/secret.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dr. Evel's Secret Code Page 6 | 7 | 8 |

The eagle is in the

9 |

The fox is in the

10 |

snuck into the garden last night.

11 |

They said it would rain

12 |

Does the red robin crow at

13 |

Where can I find Mr.

14 |

I told the boys to bring tea and

15 |

Where's my dough? The cake won't

16 |

My watch stopped at

17 |

barking, can't fly without umbrella.

18 |

The green canary flies at

19 |

The oyster owns a fine

20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /archive/topic_resources/shared-hosting-model.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/shared-hosting-model.dia -------------------------------------------------------------------------------- /archive/topic_resources/shared-hosting-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/shared-hosting-model.png -------------------------------------------------------------------------------- /archive/topic_resources/simple-jquery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JQuery Play 6 | 7 | 8 |

BIG HEADER 1

9 | 10 |

HEADER 2

11 | 12 |
13 | This is some content. 14 |
15 | 16 |

SECOND HEADER 2

17 | 18 |
19 | This is some more content. 20 |
21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /archive/topic_resources/sinatra-blog.md: -------------------------------------------------------------------------------- 1 | # Sinatra Blog 2 | 3 | Create a Sinatra blog. 4 | 5 | Breakfast 6 | ------ 7 | - Create a blog post in `/views/posts/post-name.erb` 8 | - Create a homepage with hand-written links to recent posts 9 | - Make a route with a named parameter to dynamically find blog posts 10 | - Create a layout file for you home page and blog posts to share 11 | 12 | Lunch 13 | ------ 14 | - Create a ruby class in `/lib` to read your `/views/posts` files 15 | - Dynamically display a link to each file within `/views/posts` on your homepage 16 | 17 | Dinner 18 | ---- 19 | - Put each blog post inside of an additional folder with the publish date as the directory name `/views/posts/2014-09-24/` 20 | - Use your ruby class to parse the date of each blog post. 21 | - Create a `most_recent(n)` for your class 22 | - Display links to the most recent 5 blog posts on your homepage 23 | 24 | Dessert 25 | -------- 26 | - Display the content of the most recent 5 blogs posts on the homepage 27 | - Create pagination (pages), allowing the reader to view then next 5 most recent blog posts. 28 | -------------------------------------------------------------------------------- /archive/topic_resources/sinatra-dice/dice.rb: -------------------------------------------------------------------------------- 1 | # Implement a Dice Class here: 2 | # 3 | class Dice 4 | attr_reader :values 5 | 6 | def roll(number_to_roll = 1) 7 | @values = [] 8 | 9 | number_to_roll.times { @values << rand(1..6) } 10 | 11 | @values 12 | (1..10).times 13 | 14 | end 15 | end 16 | end 17 | 18 | -------------------------------------------------------------------------------- /archive/topic_resources/sinatra-dice/dice_server.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | require './dice.rb' 3 | 4 | get '/' do 5 | "hi everyone" 6 | end 7 | 8 | get '/diceroll' do 9 | dice = Dice.new 10 | number_of_dice = params[:number_of_dice] || 1 11 | dice.roll(number_of_dice.to_i) 12 | 13 | dice.values.to_s 14 | end 15 | -------------------------------------------------------------------------------- /archive/topic_resources/sinatra_practice/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'sinatra' -------------------------------------------------------------------------------- /archive/topic_resources/sinatra_practice/config.ru: -------------------------------------------------------------------------------- 1 | # config.ru (run with rackup) 2 | require './my_app' 3 | run MyApp -------------------------------------------------------------------------------- /archive/topic_resources/sinatra_practice/my_app.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | 3 | class MyApp < Sinatra::Base 4 | 5 | get "/" do 6 | erb :index 7 | end 8 | 9 | end -------------------------------------------------------------------------------- /archive/topic_resources/sinatra_practice/views/index.erb: -------------------------------------------------------------------------------- 1 | 2 | Hello, the time is currently <%= Time.now %> 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 |

11 |
12 | 13 | 14 |
15 |
16 |

DEBUG

17 | The params hash: <%= params %> 18 |
19 | -------------------------------------------------------------------------------- /archive/topic_resources/slides.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Arbutus); 2 | 3 | body { 4 | background-color: #e09224; 5 | color: #212526; 6 | } 7 | 8 | .slide { 9 | background-color: white; 10 | } 11 | 12 | h1 { 13 | font-family: 'Arbutus', cursive; 14 | color: white; 15 | font-size: 50px; 16 | } 17 | 18 | 19 | table { 20 | margin: 0 auto; 21 | font-size: 40px; 22 | } 23 | 24 | li { 25 | padding: 0 !important; 26 | } -------------------------------------------------------------------------------- /archive/topic_resources/soa_implementation.md: -------------------------------------------------------------------------------- 1 | SOA Implementation 2 | ------------------ 3 | -------------------------------------------------------------------------------- /archive/topic_resources/sorting_hat/README.md: -------------------------------------------------------------------------------- 1 | Personality Sorting Hat 2 | ======================= 3 | 4 | Make a new class "SortingHat" in personality_sorting_hat.rb. 5 | 6 | A PSH (Personality Sorting Hat) object answers 'Well you are inquisitive aren't you?' if you ask her a question. 7 | 8 | She answers 'Well you are rather loud aren't you?' if you yell at her (ALL CAPS). 9 | 10 | She says 'Hello?… Are you there? You are too quiet… Or perhaps you don't exist' if you address her without actually saying anything. 11 | 12 | She answers 'Hmmmm…. I don't know… you seem complex.' to anything else. 13 | -------------------------------------------------------------------------------- /archive/topic_resources/stack.rb: -------------------------------------------------------------------------------- 1 | class Stack 2 | def initialize 3 | @backing_store = [] 4 | end 5 | 6 | def pop 7 | @backing_store.pop 8 | end 9 | 10 | def push(el) 11 | @backing_store.push el 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /archive/topic_resources/standup.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-80 title-and-content transition=fade 2 | 3 | Stand Up! 4 | ========= 5 | 6 | + break into groups of 4 7 | + try to group with new people every day! 8 | + **Pick a new leader every day to keep you on track!** 9 | + take turns sharing your answers to The 3 Questions 10 | + What did you learn yesterday? 11 | + What from yesterday do you want to know more about? 12 | + What from yesterday stumped you? 13 | + When done, go ahead and sit back down.. 14 | -------------------------------------------------------------------------------- /archive/topic_resources/state_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/state_graph.png -------------------------------------------------------------------------------- /archive/topic_resources/states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/states.png -------------------------------------------------------------------------------- /archive/topic_resources/swap.rb: -------------------------------------------------------------------------------- 1 | # Make a method that takes a hash 2 | # as an argument and swaps each key with it's value. 3 | 4 | a = {name: "Wabi", species: "Cat"} 5 | # [[:name, "Wabi"], [:species, "Cat"]] 6 | # swap(a) 7 | # => {"Wabi" => :name, "Cat" => :species} 8 | 9 | def swap(hash) 10 | new_hash = {} 11 | hash.keys.each do |k| 12 | v = hash[k] 13 | new_hash[v] = k 14 | end 15 | new_hash 16 | end 17 | 18 | puts swap(a) 19 | -------------------------------------------------------------------------------- /archive/topic_resources/switch-to-your-branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/switch-to-your-branch.png -------------------------------------------------------------------------------- /archive/topic_resources/syntax-fpnum-primitives.md: -------------------------------------------------------------------------------- 1 | # Syntax, Floating Point Numbers, Primitives 2 | 3 | This lesson will focus on JavaScript's Syntax, Primitive types that are 4 | native to the language, and the crazy math problems that floating point numbers introduce 5 | 6 | 7 | ### Syntax 8 | * Braces 9 | * Sometimes necessary 10 | * Semi-colons 11 | * ASI 12 | * if, else if, else 13 | * while 14 | * new Foo 15 | * Parens 16 | 17 | 18 | ### Primitives 19 | * Objects 20 | * Functions 21 | * Arrays 22 | * Numbers 23 | * Strings 24 | * Booleans 25 | 26 | 27 | ### Floating point... huh? 28 | * 0.1 + 0.2 === 0.30000000000000004 29 | * WTF? 30 | * Good ol 1s and 0s 31 | * parseInt/parseFloat/toFixed 32 | 33 | -------------------------------------------------------------------------------- /archive/topic_resources/tdd_bdd.md: -------------------------------------------------------------------------------- 1 | ##TDD 2 | - Test First Development 3 | - Test Driven Development 4 | - Behavior Driven Development 5 | - Growing Object Oriented Software, Guided by Tests (which is actually a book title) 6 | 7 | Test-driven development is a programming technique that requires you to write actual code and automated test code simultaneously. This ensures that you test your code—and enables you to retest your code quickly and easily, since it's automated. 8 | 9 | (1) Write a test that describes some new feature of the software. Run the test, and watch it fail. (Watching it fail is crucial!) (2) Write code that makes all the tests pass. (3) Look for opportunities to simplify your code. 10 | 11 | - Write a test 12 | - Watch it fail 13 | - Make it pass 14 | - Simplify 15 | - Repeat 16 | 17 | You'll often hear this cycle shorthanded as "Red, Green, Refactor." 18 | 19 | #BDD 20 | BDD focuses on obtaining a clear understanding of desired software behavior through discussion with stakeholders. It extends TDD by writing test cases in a natural language that non-programmers can read. This allows the developers to focus on _why_ the code should be created, rather than the technical details, and minimizes translation between the technical language in which the code is written and the domain language spoken by the business, users, stakeholders, project management, etc. 21 | -------------------------------------------------------------------------------- /archive/topic_resources/test_fizzbuzz.rb: -------------------------------------------------------------------------------- 1 | output = `ruby ./fizzbuzz.rb` 2 | 3 | if output == File.read("fizzbuzz_output.txt") 4 | puts "SUCCESS" 5 | else 6 | puts "FAIL" 7 | end 8 | -------------------------------------------------------------------------------- /archive/topic_resources/timer.rb: -------------------------------------------------------------------------------- 1 | Shoes.app :width => 200, :height => 120 do 2 | @seconds = 0 3 | @paused = false 4 | 5 | def display_time 6 | @display.clear do 7 | title "%02d:%02d:%02d" % [ 8 | @seconds / (60*60), 9 | @seconds / 60 % 60, 10 | @seconds % 60 11 | ], :stroke => @paused ? gray : black 12 | end 13 | end 14 | 15 | @display = stack :margin => 10 16 | display_time 17 | 18 | button "Pause", :width => '50%' do 19 | @paused = !@paused 20 | display_time 21 | end 22 | 23 | button "Reset", :width => '50%' do 24 | @seconds = 0 25 | display_time 26 | end 27 | 28 | animate(1) do 29 | @seconds += 1 unless @paused 30 | display_time 31 | end 32 | end -------------------------------------------------------------------------------- /archive/topic_resources/topics.md: -------------------------------------------------------------------------------- 1 | Topics 2 | ------ 3 | 4 | - Messaging 5 | - IRB 6 | - Variables 7 | - Methods 8 | - Arguments 9 | - Loops 10 | - String 11 | - Symbol 12 | - Fixnum 13 | - Array 14 | - Hash 15 | - Flow Control 16 | - Comparisons 17 | - Compound Conditions 18 | - Literals 19 | - Blocks 20 | - .each 21 | - while 22 | - Objects 23 | - Defining Classes 24 | - Instance vs Class 25 | - Local Variables 26 | - Instance Variables 27 | - Contstructor (`initialize`) 28 | - attr_accessor 29 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/codebase/bug-fix.md: -------------------------------------------------------------------------------- 1 | # Legacy Code Refactoring and Bug Fix 2 | 3 | **Overview: Extending & Fixing Typo** 4 | 5 | Typo is a blogging engine written in Rails to allow people to set up a blog easily. Typo consists of about 30,000 lines of code (30 KLOC) and comes with a ton of features, including authentication to post to the blog, attaching files to articles, adding special markup, creating custom themes, building user profiles, and allowing guests and/or users to comment on posts. It also supports more advanced features like trackbacks (allowing other blogs to “track back” to yours and mention you in their blog article). 6 | 7 | From your perspective, Typo is legacy code since you didn't write it yourself :-) In this assignment you'll go through the steps of adapting the BDD+TDD cycle to fix a bug in a piece of legacy code. 8 | 9 | **Note:** Assume that the documents you are given are the latest and greatest for a given system. They may not all be correct. If someone doesn't work, don't be surprised, just figure out how to fix it! 10 | 11 | ## Assignment Structure: 12 | 13 | 1. Get the legacy software running, kick the tires (play around with Typo yourself), and make sure its existing test suite runs correctly, to establish a baseline. 14 | 2. Examine the bug in typo. 15 | 3. Write cucumber stories to test the behavior of the bug. 16 | 4. Write a bugfix that passes the cucumber stories you created in step 3. 17 | 18 | Next: [Getting Set Up](setup.md) 19 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/codebase/fixing-a-bug.md: -------------------------------------------------------------------------------- 1 | # Fixing a Bug in Typo 2 | 3 | The version of typo you have checked out contains a bug that prevents categories from being created or edited. To see this bug, make sure you are logged in as an administrator and click on the “categories” link on the left hand side of the admin page. The page is intended to look as follows: 4 | 5 | ![](https://courses.edx.org/asset-v1:BerkeleyX+CS169.2x+1T2016+type@asset+block/Screen_Shot_2013-11-04_at_4.41.05_PM.png) 6 | 7 | This page is intended to allow you to add and edit blogging categories. 8 | 9 | Start by checking that all of the existing Rspec and Cucumber tests run. 10 | 11 | Then fix this bug by writing cucumber tests that fail when this bug is present, and then rspec unit tests that fail when the bug is present. Then fix the bug, ensuring that your rspec unit tests pass, and that your cucumber tests pass. Write sufficient tests using the BDD-TDD cycle method such that ultimately the admin user can successfully edit existing categories and create new categories. 12 | 13 | **Done!** 14 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/codebase/new-feature.md: -------------------------------------------------------------------------------- 1 | # Legacy Code Refactoring and New Feature 2 | 3 | **Overview: Extending & Fixing Typo** 4 | 5 | Typo is a blogging engine written in Rails to allow people to set up a blog easily. Typo consists of about 30,000 lines of code (30 KLOC) and comes with a ton of features, including authentication to post to the blog, attaching files to articles, adding special markup, creating custom themes, building user profiles, and allowing guests and/or users to comment on posts. It also supports more advanced features like trackbacks (allowing other blogs to “track back” to yours and mention you in their blog article). 6 | 7 | From your perspective, Typo is legacy code since you didn't write it yourself :-) In this assignment you'll go through the steps of adapting the BDD+TDD cycle to enhance a piece of legacy code. 8 | 9 | ## Assignment Structure: 10 | 11 | 0. You should already have the legacy software running, with all the tests passing from the bug fix portion. 12 | 1. Specify the feature. 13 | 2. Drive changes through writing specs. 14 | 15 | Next: [Specify Feature](specify-feature.md) 16 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/codebase/readme.md: -------------------------------------------------------------------------------- 1 | # Foreign Codebase 2 | 3 | This exercise is meant to give you exposure to using and working with a foreign code base. You may not know how to accomplish each step in this process, but that is OK! You should document, Google and use existing code to help you accomplish these tasks. 4 | 5 | First, you will get the code set up, then you will fix some code and then you will add a new feature. 6 | 7 | 1. [Setup](setup.md) 8 | 2. [Fix a bug](fixing-a-bug.md) 9 | 3. [Add a new feature](new-feature.md) 10 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/cr-etiquette.md: -------------------------------------------------------------------------------- 1 | # Code Review Etiquette 2 | 3 | Here are just a few notes (mostly my opinions) regarding code review etiquette. 4 | 5 | 1. Review all of your own code first. Check for: 6 | - Files that shouldn't be there (i.e. database file(s)) 7 | - Files that aren't necessary (i.e. random whitespace changes that aren't related to your bug fix) 8 | - Code that isn't complete (i.e. another bug that you started fixing but haven't finished yet) 9 | - Commented out code that doesn't contribute to the goal of the feature/bug 10 | 2. Note that the person reviewing your code may be genuinely asking questions - not necessarily trying to question your methods 11 | 3. Expect the code review process to take time - probably more than you think it should 12 | 4. Switch to another mode of communication if there is too much back-and-forth within the code review tool 13 | 5. Sometimes code reviews require justifying _why_ you made the decisions you made, which is sometimes more work than writing the code itself 14 | 6. Note that sometimes the longer the code review takes, the greater change of merge conflicts as more code gets merged in 15 | 7. Every code review is an opportunity to learn something new! Try to frame this process as a _learning experience_ rather than a _personal judgement_. (Honestly, this is still really hard for me sometimes) 16 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/java/java-setup.md: -------------------------------------------------------------------------------- 1 | # Java Setup 2 | 3 | ## Install the JDK 4 | JDK (Java Development Kit) 5 | http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 6 | 7 | ## Install Eclipse 8 | Download Eclipse IDE 9 | https://www.eclipse.org/downloads/ 10 | 11 | Programming is Java is often unique to the IDE that you use. I am most comfortable with Eclipse. The other most populate IDE is IntelliJ. 12 | 13 | ## Code! 14 | -------------------------------------------------------------------------------- /archive/topic_resources/transferrable-skills/plan.md: -------------------------------------------------------------------------------- 1 | # Internship Prep Plan 2 | 3 | We will utilize internship prep time to prepare for internships with transferrable skills beyond what we had time to talk about in the classroom. 4 | 5 | Part of the three weeks will be spent doing activities with the whole class, not necessarily directly related to your internship tech stack. Part of the time will be set up to maximize learning specific technologies, that are closest to your internship tech stack. We will not have time to cover every thing that every intern will use in three weeks. 6 | 7 | ## Overall Learning Goals 8 | - Navigating a foreign code base 9 | - Triaging bugs 10 | - Exposure to a new programming language 11 | - Configuring a new development environment 12 | - And as always, comfort with the uncomfortable! 13 | 14 | #### Other notes: 15 | - We are back to normal hours 9-5 16 | - You are welcome to meet with your intern companies during this time, please inform your instructors 17 | - You are welcome to explore other topics that you will be exposed to during your internship during this time, but you are expected to accomplish the tasks for our overall learning goals 18 | -------------------------------------------------------------------------------- /archive/topic_resources/undirected_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/undirected_graph.png -------------------------------------------------------------------------------- /archive/topic_resources/vote.rb: -------------------------------------------------------------------------------- 1 | # Create a Vote class. An instance of the Vote class 2 | # should have a question attribute and a results attribute. 3 | # 4 | # The question attribute should be a string that 5 | # is passed in as an argument when the object is created. 6 | # 7 | # The result attribute should be a hash with keys 8 | # of the given answers and value of the number of votes that key has receieved 9 | # 10 | # vote = Vote.new("Who should run for president in 2016?") 11 | # vote.cast("Hillary") 12 | # vote.cast("Ada") 13 | # vote.cast("Ada") 14 | # vote.results # => {"Hillary" => 1, "Ada" => 2} 15 | 16 | # Create a vote class 17 | # Add question attr (string) and result attr 18 | # Add initialize with an argument 19 | # Add a `cast` instance method 20 | # Add attr_accessor for attributes 21 | 22 | class Vote 23 | attr_accessor :question, :results 24 | 25 | def initialize(question) 26 | @question = question 27 | @results = {} 28 | end 29 | 30 | def cast(answer) 31 | if @results[answer] == nil 32 | @results[answer] = 1 33 | else 34 | @results[answer] += 1 35 | end 36 | end 37 | 38 | end 39 | -------------------------------------------------------------------------------- /archive/topic_resources/vps-dns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/vps-dns.png -------------------------------------------------------------------------------- /archive/topic_resources/vps-dns.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/vps-dns.xcf -------------------------------------------------------------------------------- /archive/topic_resources/vps-model.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/vps-model.dia -------------------------------------------------------------------------------- /archive/topic_resources/vps-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/vps-model.png -------------------------------------------------------------------------------- /archive/topic_resources/warm-up example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ada-Developers-Academy/daily-curriculum/9773a29625e0ee3b390cef613c01faedd359b6c7/archive/topic_resources/warm-up example.jpg -------------------------------------------------------------------------------- /archive/topic_resources/warmup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This and event handlers 6 | 20 | 37 | 38 | 39 |
Click Me!
40 | 41 | 42 | -------------------------------------------------------------------------------- /archive/topic_resources/warmup.md: -------------------------------------------------------------------------------- 1 | !SLIDE text-size-80 title-and-content transition=fade 2 | 3 | Dice Set 4 | ======== 5 | Implement a Dice class that passes the spec provided. Run the spec by running ```rspec``` from *daily_curriculum/examples/week4/dice* (Note that you may also need to run ```gem install nyan-cat-formatter```) 6 | 7 | The spec should all fail, complaining about 6 errors - this is expected! No need to be alarmed or overwhelmed. Read through the spec file (in *spec/lib/dice_spec.rb*) to get a sense of what it expects our Dice class to do, and address the failing specs one at a time. 8 | -------------------------------------------------------------------------------- /archive/topic_resources/word_count/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format NyanCatFormatter -------------------------------------------------------------------------------- /archive/topic_resources/word_count/README.md: -------------------------------------------------------------------------------- 1 | Write a Phrase class that counts the number of times a word is used in a given string, keeping count of each occurrence in a hash. 2 | 3 | For example for the input `"olly olly in come free"` 4 | 5 | ```ruby 6 | { 'olly' => 2, 'in' => 1, 'come' => 1, 'free' => 1 } 7 | ``` 8 | 9 | If you finish early, help someone else! Mention that you're done and free to help in Campfire, put your name up on the white board so if anyone in the class could use a hand they'll know they can talk to you, or take a few minutes and look at someone else's solution. 10 | -------------------------------------------------------------------------------- /archive/topic_resources/word_count/lib/phrase.rb: -------------------------------------------------------------------------------- 1 | # Implement a Phrase Class here: 2 | # 3 | class Phrase 4 | end 5 | -------------------------------------------------------------------------------- /archive/topic_resources/word_count/spec/lib/phrase_spec.rb: -------------------------------------------------------------------------------- 1 | require "./lib/phrase" 2 | 3 | describe Phrase do 4 | 5 | it "should count a single word one time" do 6 | phrase = Phrase.new("word") 7 | counts = { "word" => 1 } 8 | 9 | expect(phrase.word_count).to eq counts 10 | end 11 | 12 | it "should count each word one time" do 13 | phrase = Phrase.new("one of each") 14 | counts = { "one" => 1, "of" => 1, "each" => 1 } 15 | 16 | expect(phrase.word_count).to eq counts 17 | end 18 | 19 | it "should count multiple occurrences one time for each occurrence" do 20 | phrase = Phrase.new("one fish two fish red fish blue fish") 21 | counts = { "one" => 1, "fish" => 4, "two" => 1, "red" => 1, "blue" => 1 } 22 | 23 | expect(phrase.word_count).to eq counts 24 | end 25 | 26 | it "should reset its counting hash each time it counts words" do 27 | phrase = Phrase.new("all the kings horses and all the kings men") 28 | 29 | # count the words a second time 30 | phrase.word_count 31 | 32 | counts = { "all" => 2, "the" => 2, "kings" => 2, "horses" => 1, "and" => 1, "men" => 1 } 33 | 34 | expect(phrase.word_count).to eq counts 35 | end 36 | 37 | it "should normalize the case of the words" do 38 | phrase = Phrase.new("go Go GO") 39 | counts = { "go" => 3 } 40 | 41 | expect(phrase.word_count).to eq counts 42 | end 43 | end 44 | --------------------------------------------------------------------------------