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:
- how to run our file -
- how to run ruby commands from terminal -
- hit the up arrow key to bring back previously used commands
- how to get input from our user -
- how to output things to the screen -
puts "Coding is mega fun!!"
- how to use variables in our string aka string interpolation -
- 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 -
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.
- how to capitalise a variable -
- get.chomp always gives us a string!
- how to change a string to an integer -
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
- 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
- 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