Jon Rumsey

An online markdown blog and knowledge repository.


Project maintained by nojronatron Hosted on GitHub Pages — Theme by mattgraham

My Notes From Class And Daily Work Week 9

Goals For This Week

Going Forward

Finals Week team reviews due Sunday following final presentations.

Review the core Java knowledge like:

Tuesday 12 July

Tuesday is last day of code content.

Tuesday will be GooglePlay Location.

S3 Review

Add Image Button => Image Picking Activity.

Convert to an input stream and publish to S3.

Geocoding: Referencing a place by it's name or street address, and translating that to geographical coordinates.

There are privacy concerns, both PII and App, Phone security implications.

Final Project Prep

Teams need to work on project ideas and prepare, as a team, to pitch up to 2 ideas to Alex.

Teams need to agree on what they want to do before pitching it.

Domain Modeling

It is in everything.

Relationships exist in databases, but also just about everything else!

Lab - Location

GooglePlay Services: Location Provider Client - is a newer thing. The older service required the App to manage the connection to Google API Client service.

SocketIO

New:

Last Location:

Current Location:

Request Location Updates:

Before Writing Code, permissions requests must be updated:

  1. Go into AndroidManifest.xml. Multiple permissions can be edited here.
  2. Add <uses=permission> tags for one or both of ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION. Don't ask for high precision unless the App really needs it.
  3. Run & Debug will reinstall app. Reinstalling App is required whenever permissions are changed.
  4. Implement a completable future
  5. Programmatically request permissions via requestPermissions as a new String[] that contains the Manifest.permissions.PERMISSION_NAME_TAG comma-delimited list.
  6. Call fusedLocationClient to get application context via LocationServices.getFusedLocationProviderClient
  7. Execute fusedLocationClient.getLastLocation() and chain-on .addOnSuccessListener()
  8. Use an if statement to determine if ActivityCompat.checkSelfPermission() returns as expected.
  9. Implement a listener that executes (sometime) depending on success or failure getting the location. Basically, checking what Allow Permission(s) the App has.
  10. Within the listener assign results from object 'location' to get Lat, Lon, Speed, Altitude, Time, and many others. Lat and Lon are of type 'Long'.
  11. ActivityCompat.checkSelfPermission() requires a context (this), and a Manifest.permission.TAG_OF_PERMISSION_TO_QUERY.

Note: The live demo coding session resulted in an error situation. Basic solution required:

Location Resources

Android Developers Blog New Location APIs

Android Developers Last Known Location

Android Developers Network Connections

Android Developers Declare Dependencies

Android Developers Retrieve Current Location From Play Services

Android Develoeprs Location Requests

Wednesday 13Jul22

About OSS and Contributing

Transparency is very important in development.

OSS isn't just about free, it can be licensed and sold.

Many eyes on OSS can make it better.

Proprietary software can be constricted/restrictive in ways that do not support the community.

OSS contributions can (and should) be highlighted on your resume, and definitely in your GitHub/repositories.

Some OSS repos will have guidance for new contributors. Look for a "want to contribute?" button or link, or a search filter.

Check GitHub Issue labels:

GitHub "Trending" repos: Could be a good resource, but sometimes the trend is all the possible "good first issue" items are already solved.

For the OSS Lab

Go to the FirstContributions repo - a directory of OSS projects that have potentially good first issues for new OSS contributors.

What is a good contribution?

Do not write fluff documentation. Ever.

Root Cause Analysis

RCA -> Scientific method to analyse WHY something happened, external causal factors, and the timeline in which the problem occurs.

Troublshooting

There are 5 Why's of RCA:

RCA Reference by Wikipedia

Final Project

Re-teaming to a single, 6+ person team.

Everyone needs to ask themselves:

TODOs:

-[ ] Determine what my areas of improvement are and be prepared to talk about it during the final presentation.

Whiteboard Review

Node Logic:

Advice:

Avoid Assumptions, instead:

Breaking Down The Problem Domain

Recursive Functions:

Suggested Execution Pattern (subject to everything, and ask questions as needed in-flight):

  1. Pick a traversal mode and sketch it out.
  2. Break down the Problem Domain to determine what processing mechanics are needed to address all of its components.
  3. Refactor the drawings and any problem domain brake-down jottings and write them up as plain-english Algorithm segments. Reference the Problem Domain by talking through this refactoring and algorithm writing.
  4. Update my questions, test cases, and edge cases. Test Approach should include JUnit, Debugging Breakpoints, happy path, null-input, failure path, and so on.
  5. Write pseudocode.
  6. Once pseudocode is done, BigO can be written. Be sure to analyze the pseudocode to justify the BigO analysis conclusions.
  7. Refactor any and all representations to ensure they are legible, make sense, and represent your solution.
  8. Write actual code.
  9. If there is still time clean things up and ask questions about the solution to discover if more work or additional cleanup is necessary.

Thursday 14July

Early Morning Discussion

Imposter Syndrome comments:

Software Development is More Than Solving Coding Problems:

CAP Program

Technical Interview Advice

Fiday Morning Discussion

Sorting out how to manage an 8-person dev team for finals week.

Amplify: Requires a single PUSH person and a trust of IAM user password(s).

Rooms: Device-specific data, does not integrate with Amplify, S3, or Cognito, but avoids IAM complexities.

Advice:

Talking About Requirements:

TODOs:

TODOs

Return to Root Readme