Ruby
Welcome to the eighth week of the AcadeCoders session: Ruby. This blog post will cover each daily activity of each camp day with various pictures and descriptions. Ruby is a prominent back-end object-oriented coding language used for web applications and scaling. Companies such as Shopify, Airbnb, and Twitter.
Day 1: Monday, August 15th, 2016
First day of Ruby for the AcadeCoders! The AcadeCoders started off their morning strong with a jiu-jitsu lesson from an instructor of K2 Martial Arts!
Following jiu-jitsu and snack-time, the AcadeCoders were ready to learn how yo code in Ruby! The AcadeCoders started with learning the basics of how Ruby functions and the provided syntax. They were taught variables, data types, ‘puts’ and ‘print’, string methods, naming conventions, and comments.
After they were taught the basics to Ruby, they were set to complete their first challenge! In their first challenge, “Putting the Form in Formatter”, they had to create a small program that will read a user’s input and correct his or her capitalization.
Following lunch, the AcadeCoders were ready for their afternoon session of Ruby! The AcadeCoders were taught control flow in Ruby. This is where they learned to use if/else/elsif/unless statements, making comparisons, and boolean operators.
For their afternoon challenge, “Thith Meanth War!”, the AcadeCoders had to combine control flow with a few new Ruby string methods to Daffy Duckify a user’s string, replacing each “s” with “th”.
Day 2: Tuesday, August 16th, 2016
Second day of Ruby for the AcadeCoders! The AcadeCoders started off their morning strong with a lesson on loops. The AcadeCoders were taught the ‘while’, ‘until’, infinite, and ‘for’ loops.
Following snack, the AcadeCoders continued their lesson and practice questions on looping with Ruby. They were taught how to use iterators within loops and how to use blocks, .each iterator, and .time iterator.
After the lesson, they were ready for their morning challenge; Redacted! In this challenge, the AcadeCoders had to build a spy program that searches a string of text for your name, if it finds it, replaces with the word “redacted”.
Following lunch, the AcadeCoders took time off their computers their afternoon activity! We usually head for Morrison Park for outdoor activities and free-play, but the rainy weather said otherwise. The indoor activity was Speed Stacks and the AcadeCoders were put in singles and doubles tournaments to see who has the fastest time to stack up and stack down speed cups.
After Speed Stacks, the AcadeCoders were ready to continue with Ruby! The AcadeCoders spent the first half of the afternoon learning arrays and hashes. They learned to crate and access arays, hashes, and iterating over arrays and hashes.
Following the lesson, the AcadeCoders took on their afternoon challenge of “Creat a Histogram”. In this challenge, they had to use everything they have learned about Ruby and Write a program that reads a block of text and tells us how many times each word appears
Day 3: Wednesday, August 17th, 2016
Third day of ruby for the AcadeCoders! The AcadeCoders started off their morning strong with a lesson on blocks and sorting. They were taught methods syntax, parameters, and arguments.
After snack, the AcadeCoders continued with blocks and sorting! They were taught and given practice questions on nameless methods, how blocks differ from methods and sorting with blocks.
The AcadeCoders would then take on their morning challenge: Ordering Your Library. In this challenge, the AcadeCoders had to build a large quantity of data and organize it in various orders.
Following lunch and outdoor activities, the AcadeCoders were ready to get back to Ruby! The AcadeCoders spent the first part of the afternoon being taught hashes and symbols. This includes learning to iterate over hashes, setting your own defaults, symbol syntax, converting between symbols, and combining both hashes and symbols.
The second part of the afternoon was spent on their afternoon challenge: A Night at the Movies. In this challenge, the AcadeCoders had to use hashes and symbols to create a program that displays, adds, updates, and removing movie ratings.
Day 4: Thursday, August 18th, 2016
Fourth day of Ruby for the AcadeCoders! The AcadeCoders started off the morning strong with a lesson on refactoring! They were taught a simpler ‘if’ statement, conditional assignments, implicit return, and short-circuit evaluation.
Following snack, the AcadeCoders continued their lesson and practice challenges on Refactoring. They were taught call and response, string interpolation, and the ternary operator.
After their lesson, the AcadeCoders were ready for their morning challenge: The Refactor Factory. In this challenge, the AcadeCoders had to take the first_n_primes, that takes a number n and generates a list of the first n prime numbers. Unfortunately, our poor author hasn’t yet mastered all the tools available in Ruby. But the AcadeCoders fixed that!
Following lunch, the AcadeCoders had their afternoon lesson and practice questions on blocks, procs, and lambdas.The AcadeCoders were taught to yield with parameters, keeping their DRY, proc syntax, ruby lambda, and passing a lambda to a method.
Day 5: Friday, August 19th, 2016
Fifth day of Ruby for the AcadeCoders! The AcadeCoders started off the morning strong with a lesson on object-oriented programming: part 1. In this lesson the AcadeCoders were tigt instantiating an object, scoping, ad name variables.
After snack, the AcadCoders went back into their lesson and practice questions on object-oriented programming with inheritance syntax, override, and class basics.
After their lesson, the AcadeCoders were ready for their afternoon challenge: Virtual Computer. The AcadeCders had to create an imaginary computer that stores large amounts of information and data just like a real virtual machine.
After lunch and outdoor activities / free-play, the AcadeCoders were ready for their last Ruby lesson and challenge. The AcadeCoders were taught information hiding in Ruby, module syntax, and how to imitate multiple inheritances.
After their last object-oriented programming lesson, the AcadeCoders were given their last project: Banking on Ruby. The AcadeCoders had to create a program that could store, update, and display a bank account balance.
No Comments on "AcadeCoders Blog 2016: Ruby"