Gringott's has become too big to fail, so the Ministry of Magic has decided to break up this wizarding bank.
But they need, quite literally, a programming wizard to create the software to run these banks.
| app/controllers/admin/base_controller.rb | |
| 9: Redundant: won't current_user.admin? return nil if current_user is nil? | |
| app/controllers/admin/items_controller.rb | |
| Use strong params here? | |
| app/controllers/admin/orders_controller.rb | |
| Strong params | |
| application_controller.rb |
| Software Disasters | |
| For us, the worst that can happen when we write bad software is our app doesn't run. Maybe our website shows an error message. | |
| However, in the real world, it can get a lot worse. | |
| We're looking at two real world examples today where bad software, had really big real world implications | |
| Ariane 5 |
| class Cat | |
| def initialize | |
| end | |
| def to_s | |
| return "This is a string" | |
| end | |
| end |
| ### Keybase proof | |
| I hereby claim: | |
| * I am mikedao on github. | |
| * I am mikedao (https://keybase.io/mikedao) on keybase. | |
| * I have a public key whose fingerprint is 97F7 199D E050 F2A3 0599 81AA DDB1 3C1B A5AD 4AFD | |
| To claim this, I am signing this object: |
| Finite State Machines | |
| -Mythical Creatures | |
| Extension - How would I do this without using if statements? | |
| One Sunday morning, lying in bed - Boom Finite State Machines | |
| -What is a Finite State Machine? | |
| -Mathematical model used to design computer programs and logical circuits | |
| -Real World Examples | |
| Soda machine | |
| Electronic turnstiles |
| 2-1 Order.first.items << Item.first | |
| 2-2 | |
| 2-3 | |
| before_destroy :destroy_orders | |
| def destroy_orders | |
| self.orders.delete_all | |
| end |
| contentSecurityPolicy: { | |
| 'default-src': "'none'", | |
| 'script-src': "'self' 'unsafe-inline' 'unsafe-eval'", | |
| 'font-src': "'self'", | |
| 'connect-src': "'self'", | |
| 'img-src': "'self'", | |
| 'style-src': "'self' 'unsafe-inline'", | |
| 'frame-src': "'none'" | |
| } |
| Create a Car Class conceptually | |
| Class - Lay out the form for a category or type of an object. | |
| Instance - A single realization or actualization of a class. | |
| Google the characters in Hamlet, and you would get a list of Characters and Plays. | |
| You get a list of significant characters, and not all characters. |
git clone https://github.com/turingschool-examples/oregon_sale.git
cd oregon_sale
rvm install 1.9.3
rvm use 1.9.3
brew update