Skip to content

Instantly share code, notes, and snippets.

@TGNThump
Created January 18, 2019 00:07
Show Gist options
  • Save TGNThump/acc2744f0ed98cb4a896c02e71635395 to your computer and use it in GitHub Desktop.
Save TGNThump/acc2744f0ed98cb4a896c02e71635395 to your computer and use it in GitHub Desktop.
COMP327
  1. i. Forced unwrapping throws an error and crashes if an optional value in the chain is not present. Optional chaining stops the execution if the chain is broken by a not present value.

    ii. The Type of Optional Int is infered from the variabe assignment as none is specified. Adding a ! after the Int(myString) will force unwrap the value to a Int, which will then be infered as the type of the variable.

    The Int class has an initialiser method that takes a string composed of digits and converts them to an integer, but this can fail, so it returns an Int?

  2. Apple-Pay is more secure as it requires biometric verification to use, such as fingerprints (touch-id) or your face (face-id). All of the devices that use apple pay contain a "Secure Element" that keeps the customer information secure. Credit card numbers are never sent over the air.

When a transaction is made, the device account number along with a dynamic security code unique to the transaction is sent via NFC to the payment terminal. The security code is a one time cryptograb that ensures the transaction is conducted by a device containing the account number, without the account number ever leaving the device.

Store security breaches that leak credit card numbers will not affect apple pay users, and store clerks will never see a users card number.

    • unpradictable medium
    • intermittel or noisy connection
      • high error rates
      • low quality / low bandwith connection
    • shared medium
    • easier to eavesdrop
    • non fixed location
    • handover between transcievers
    • more power required / more battery
    • SDM: Space Devision multiplexing - Put the people in different rooms.
    • FDM: Frequency Defined Multiplexing - People talk at different pitches.
    • TDM: Time Devision Multiplexing - People take turns talking one at a time.
    • CDM: Code Devision Multiplexing - People talk at the same time in different languages
    • Circuit Switching

      • A path from the source to the destination is reserved for the duration of the communication.
      • Other users cannot use this path, so reduced overall capacity.
      • Full bandwidth.
      • Billing is often time based, not data based.
    • Packet Switching

      • The communication is split up into packets (which include headers for routing), each of which is routed over the network individually.
      • More bandwidth, as nothing is reserved for a single user.
      • The packets can take different routes through the network.
      • Reassembled at the other end.
      • Packets may be dropped at busy times. Ongoing quality of commununication can change over time.
      • Packets may need to be resent.
  1. A protocol is a template/blueprint for a set of functions that must be implemented by a class or structure that adopts it.

  2. Virtual Keyboards require a large amunt of screen real estate. Often made as small as possible, which limits usage. Users traditionaly use a stylus bcause screes were resistive. Greater accuracy was required to hit the correct key.

Modern touch screens are capacitive, which requires the use of the finger to bridge the circuit. A standard sylus will not work.

Predictive texting and autocorrect technologigies help assist the users fat fingers.

  1. i. 2 * 3 * (60/5) * (8-3) = 360

    ii. 2 * 3 * (60/4) * (8-5) = 270, you'd need 1 extra pair per sector.

  2. i. 7p, one message (Ascii is 7 bit!). ii. Emoji requires unicode which is 16-bit characters. 157 / 67 > 2, so 3 messages are required => 21p.

  3. Handover: Transfer a call or data session from one channel to another.

    • A phone is moving from one cell to another.
    • Cell capacity exhausted, and phone is in an overlapping cell with excess capacity.
    • Interference between channels occurs.
    • The signal from the current cell becomes degraded due to local conditions.
    • The user's behaviour changes (e.g. from fast traveling (ubrella cell) to stationary (macro or micro cell)).

    Both phones and cells monitor parameters of the signal in the channel to determin if/wghen to handover.

    Hard handover is where the previous connection is dropped before the new connection is established. Soft handover is where the previous connection is kept open until the new connection is reliable.

    Hard handover will drop a call if the new channel fails. Used by GSM.

    With soft handover, both channels may be held for some time. The best signal from any channel is used until there is no advantage in using two. Softhandover requires more expensive / sophisticated technology.

  4. Human Computer Interaction is important because a user is more likely to adopt a device that makes it easy to acomplish the tasks they are using the device for. Poor HCI can be overcome if...

  5. P2P systesm such as paypal make it easy to transfer money between individuals.

  6. Spatian context can be relevant when users are looking for location specific tasks, such as odering food, ordering taxis (Uber) or when intergrated with other technologies such as augmented reality.

  7. The statement is valid because WiFi data transfer relies on the underlying network, which can be limited. WiFi is also dependant on distance and interferance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment