01b_CA_Learn_to_Code_Webpage_Banner_1500x200px

Thanks for submitting your details, if you chose to receive more information about our coding bootcamps keep an eye on your email for your course guide.

 

LESSON 3: LET'S START CODING

Now we know what we are trying to solve, let’s start coding!

Here's what we'll learn in Lesson 3:

Terminal:

  • how to run our file -ruby file_name
  • how to run ruby commands from terminal -irb
  • hit the up arrow key to bring back previously used commands

Ruby:

  • how to get input from our user -gets.chomp
  • how to output things to the screen -puts "Coding is mega fun!!"
  • how to use variables in our string aka string interpolation -\# variable
  • how to use do different things at different times -if elsif else
  • how to assign a variable a value - 
  • how to check the value of a variable - 

DID YOU KNOW?

Coder Academy's Web Development Bootcamps are offered in two durations?

FAST TRACK - For those that want to up-skill fast and;

FLEX TRACK - For those that need to fit study around other commitments like family and/or work. 

 

LESSON 4: DEBUGGING

 

We have the bulk of our app already written, but there are a few little bugs that may cause us problems! Let’s have a look at how to make our app even better so it won’t break! This is called debugging. 

 

Here's what we'll learn in Lesson 4.

Ruby:

  • how to capitalise a variable -variable.capitalize
  • get.chomp always gives us a string!
  • how to change a string to an integer -variable.to_i

DID YOU KNOW?

In the 1940s a woman by the name of Admiral Grace Hopper came up with the term De-Bugging! While she was working on a Mark II computer at Harvard a moth literally got stuck in a relay and impeded operation. She told her team that she needed to 'De-Bug' the system! 

 

LESSON 5: PUSHING TO GITHUB

 

Now that our application is complete, let’s have a look at how to share your code with other developers using GitHub.

 

Here's what we'll learn in Lesson 5.

  • GitHub usage

FURTHER CHALLENGES...

  • Get the user to input how much they would like to deposit instead of hardcoding $20
  • If the user inputs anything apart from ‘D’, ‘W’, ‘B’, show an error message: “Invalid entry, try again”- only if the amount is a valid number, update the balance, else send an error message “invalid amount, please enter a value > 0

ADVANCED CHALLENGES...

  • Modify the code to stay on the application unless user selects an option to exit. Hint: explore loops
  • Work on the previous balance until you exit the app, instead of starting from zero. Hint: explore global variables
  • Persist the account balance and associate with a particular user and find ways of storing data, even after exiting the application. Hint: explore hashes, and file read and write

RESOURCES...

 

Final Code:

01_CA_Mobile_Web_Tiles

DOWNLOAD A COURSE GUIDE TO LEARN MORE ABOUT OUR WEB DEVELOPMENT BOOTCAMPS!