Skip to content

Instantly share code, notes, and snippets.

View fernandojinzenji's full-sized avatar

Fernando Jinzenji fernandojinzenji

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fernandojinzenji on github.
  • I am fjinzenji (https://keybase.io/fjinzenji) on keybase.
  • I have a public key ASCv6_l6TJwUGViqHN338LbQTDPgxvisGx3rta3KSMxdlQo

To claim this, I am signing this object:

@fernandojinzenji
fernandojinzenji / gist:0624a038022c9c24bfe7b6bc1140d3e0
Created June 24, 2017 05:45
Week 4, Friday - Reading and Questions
Question 1: What is a deadlock? What happens to your application if you have a deadlock in it?
Deadlock occurr when a process A depends on the process B, and vice versa. This creates a dependecy cycle (called deadlock)
and makes your application unresponsive.
Question 2: In GDC, what is a barrier? Why would you want to use something like dispatchbarrierasync ?
A barrier in GDC acts like a bottleneck to create a queue in concurrent process and ensure that each one process is not
started until other is finalized. The command dispatchbarrierasync allow multiple reader blocks, but ensure that only one
write block is executed.
@fernandojinzenji
fernandojinzenji / gist:41539e7cdaa1884b53847610a5f72e68
Created June 22, 2017 22:29
Week 4, Thursday - Readings and Questions
Question 1:
ACID (Atomicity, Consistency, Integrity and Durability) is a common set of properties used by databases.
CRUD (Create, Read, Update and Delete) are the four basic operations used to create and maintain data.
Question 2:
Multithreading is a set of processes running in paralell, that can be related or unrelated between each other. When
programming for iOS is pretty important to keep heavy process in the background thread, or you could freeze your user
interface for user interaction until the process is finished.
Question 3:
@fernandojinzenji
fernandojinzenji / gist:39dc59b7fdf0b10479836a5ff5699d34
Created June 21, 2017 23:23
Week 4, Wednesday - Readings and Questions
Question 1:
Before saving the object, it is necessary to convert its information to binary data. The same when reading information from
the disk. It is necessary to convert binary data to a "readable" object.
Question 2:
Failures can occur when the disk is corrupted or some external actions stops the operating system from save the data. You
should create a NSError instance and guide your user what should the correct procedure (like try again, restart the application,
etc).
Question 3:
Question 1:
uuidgen is a command that returns a unique identifier value. You should use it when it is necessary to create a value (like a
property id for a object) and be sure that that value will never conflict with any other value.
Question 2:
CoreLocation uses GPS coordinates to provide "course" information. Heading is the direction where the iPhone is pointing,
returned from the digital compass.
Question 3:
GPS (Global Positioning System) is the device responsible to return user location (latitude, longitude, range). Magnetometer
@fernandojinzenji
fernandojinzenji / gist:476de571d462ef78e17e371393e5b4a7
Created June 20, 2017 02:06
Week 4, Monday - Questions and Answers
Question 1:
C - post
R - get
U - put
D - delete
Question 2:
200 response ok for a request
403 forbidden access
401 unauthorized
@fernandojinzenji
fernandojinzenji / gist:1107b2251e47783b352fbabfbfb791d5
Created June 14, 2017 22:36
Week 3, Wednesday - Readings and Questions
Question 1:
a) Both collection views and table views are controls to display information to the user. Table views are used to display in
a traditional tabular view, but collection views allows more flexibility in the layout of those information.
b) Collection views allow the data to be displayed horizontally (multiple itens in the same row), add supplimentary views (like
"headers and footers" for each item and even use decorator views to customize the background of each row.
Question 2:
- Cell Views - are the main elements positioned by the layout. Each cell represents a single data item in the collection.
A collection view can have a single group of cells or it can divide those cells into multiple sections. The layout object’s
@fernandojinzenji
fernandojinzenji / gist:e0df773ec5882241329fd59de6857911
Created June 13, 2017 22:58
Week 3, Tuesday - Questions and Answers
Question 1: Mail, Instagram, YouTube. They all use a table view to display information. Mail uses a table view to display
a list of all emails. Youtube shows a list of your subscribed videos or suggestions. Instagram provides a tabular view
to display all your timeline.
Question 2:
Static table views are used to design user interfaces who needs to display a set of information in a tabular view.
Question 3:
A) UITableView has the following hierarchy:
NSObject
@fernandojinzenji
fernandojinzenji / gist:2c8b13b31b5b5347caff9c81efd85c6e
Last active June 13, 2017 05:07
Week 3, Monday - Readings and Questions
Question 1:
Call [[UIDevice currentDevice] setValue:@(UIInterfaceOrientationLandscapeLeft) forKey:@"orientation"] in viewDidAppear.
or uncheck the Landscape Left and Landscape Right options under Deployment Info, Device Orientation.
Question 2:
- Tabbar: Twitter, Facebook
- PageView: iBooks, Flipboard
- Navigation: Weather, AppStore
Question 3:
@fernandojinzenji
fernandojinzenji / gist:afb8a83b4daa6be9f2b235abedbc9f73
Last active June 24, 2017 20:04
Week 2, Saturday - Readings and questions
Question 1
a) MVC - Model View Controller, where Model represents the data, the View represents the interface to display that data and/or
send user inputs to the Controller, and the Controller is responsible to provide Model data for the view and interpret user
actions from the view.
b) i. doctor can have many patients. - MODEL, where a Doctor object can have a property with a collection of Patients objects.
ii. A doctor should be able to see a list of all his/her patients. - VIEW, a system feature to capture these data from the
model.
iii. When looking at a patient's file, we should have the patient's picture in the top left hand corner. - VIEW, an image
representing patient's picture is the interface for the user.