AcadeCoders Blog 2016: Ruby

3834 0

5mor4

5mor5

5mor6

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!

IMG_4311

IMG_4316

IMG_4318

IMG_4322

IMG_4325

IMG_4326

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

IMG_4341

aft1

IMG_4335

aft3

IMG_4339

aft2

 

 

 

 

 

 

 

 

 

 

 

 

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.

mpro1

mrpo2

mpro3

 

 

 

 

 

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.

IMG_4336

morn1

IMG_4340

morn2

IMG_4342

morn3

 

 

 

 

 

 

 

 

 

 

 

 

 

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”.

 

IMG_4347

2mor1

IMG_43482mor2IMG_4344ac3


 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.

IMG_4347

2mor1

IMG_4348

2mor2

IMG_4344

2mor3

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

2mor4

2mor5

2mor6

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”.

2mor7

2mor8

2mor9

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.

IMG_4354

IMG_4355

IMG_4357

IMG_4361

IMG_4362

IMG_4364

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.

IMG_4350

2aft1

IMG_4351

2aft2

IMG_4352

2aft3

 

 

 

 

 

 

 

 

 

 

 

 

 

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

2aft4

2aft5

2aft6

 

 

 

 

 

 


 

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.

IMG_4367

3mor1

IMG_4372

3mor2

IMG_4374

3mor3

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.

3mor4

3mor5

3mor6

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.

3mor7

3mor8

3mor9

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.

3aft1

3aft2

3aft3

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.

3aft4

3aft5

3aft6

 


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.

4mor1

IMG_4375

4mor2

IMG_4377

4mor3

IMG_4379

Following snack, the AcadeCoders continued their lesson and practice challenges on Refactoring. They were taught call and response, string interpolation, and the ternary operator.

4mor4

4mor5

4mor6

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!

4mor7

4mor8

4mor9

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.

IMG_4376

4aft1

IMG_4378

4aft2

IMG_4380

 

 

 

 

 

4aft3


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.

IMG_4381

5mor1

IMG_4384

5mor2

IMG_4386

5mor3

After snack, the AcadCoders went back into their lesson and practice questions on object-oriented programming with inheritance syntax, override, and class basics.

5mor4

5mor5

5mor6

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.

5mor7

5mor8

5mor9

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.

5aft1

5aft2

5aft3

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.

5aft4

5aft5

5aft6

About The Author

No Comments on "AcadeCoders Blog 2016: Ruby"

Leave a Comment

Your email address will not be published. Required fields are marked *