This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Add this file under your project /database folder (create it if it doesn't exist) | |
-- then to execute it, run the command: | |
-- sqlite3 database.sqlite < schema.sql | |
-- Run it from your terminal after navigating to /database folder | |
-- this will create a database file called database.sqlite | |
DROP TABLE IF EXISTS customers; | |
CREATE TABLE customers ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { | |
View, | |
Text, | |
Button, | |
Platform, | |
TextInput, | |
StyleSheet | |
} from 'react-native' | |
import { Constants, Location, Permissions } from 'expo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { View, Text, Button, TextInput, StyleSheet } from 'react-native' | |
// https://developers.google.com/places/web-service/get-api-key | |
const ApiKey = 'AIzaSyAl_gQqNibe6FCE_MRBUyOOsQgmZJZvAjU' | |
class PlaceFinder extends Component { | |
constructor (props) { | |
super(props) | |
this.state = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Students | |
- Think about the solution before writing any code (maybe even write pseudocode, or pencil a solution) | |
- Break bigger tasks into smaller pieces, and solve them one step at a time. | |
- Think about your function signature | |
- Write Test -> Write Code Implementation -> Refactor (repeat) | |
- Use the debugger | |
- Good functions | |
- have good names and clear parameter names | |
- have single responsibility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Students | |
Think about the solution before writing any code (maybe even write pseudocode, or pencil a solution) | |
Break bigger tasks into smaller pieces, and solve them one step at a time. | |
Think about your function signature | |
Write Test -> Write Code Implementation -> Refactor (repeat) | |
Use the debugger | |
Good functions | |
have good names and clear parameter names | |
have single responsibility | |
be defensive: don't trust your parameter |