App name: GrampsMD
App link: https://grampsmd.now.sh/
Frontend link: https://github.com/gusmcnair/GrampsMDClient/
Backend link: https://github.com/gusmcnair/GrampsMD_API
| function urlify(input){ | |
| let urlString = '' | |
| for(let i = 0; i < input.length; i++){ | |
| if(input[i] === ' '){ | |
| urlString += '%20' | |
| } else { | |
| urlString += input[i] | |
| } | |
| } return urlString | |
| } |
| 1. Done, and in relevant files. | |
| 2. | |
| a. Length 1, Capacity 1, Address 1 | |
| b. Length 6, Capacity 12, Address 3: The capacity is tripling and the memory address is reassigned every time the limit is reached. | |
| 3. Length 3, Capacity 12, Address 3: The three last values from the array are removed, but the capacity and address stay the same. | |
| 4. It returns 'NaN' for 'tauhida' or any other text, because this array appears unable to store strings. |
| Constant time / O(1) = Getting a specific value from an array, or adding two numbers – Only one operation | |
| Logarithmic time / O(log(n)) = Decreasing the search by half every time you perform it – Repeatedly halving the operation | |
| Linear time / O(n) = Searching one-by-one through a set of info for a variable (think FOR loops) - Operation equals its length | |
| Polynomial time / O(n^k) = Comparing one set of values to itself or another set of values one-by-one, FOR loop within FOR loop | |
| Exponential time / O(2^n) = Each time the function is run, the data increases exponentially. | |
| //1. First question | |
| a. This resembles constant time – 0(1) in that you're getting a specific value without performing a full search | |
| b. This is essentially a FOR loop, and thus linear time, O(n). |
| const sumOf = function(list) { | |
| // Base case | |
| if (list.length === 1) { | |
| return list[0]; | |
| } | |
| // General case | |
| return list[0] + sumOf(list.slice(1)); | |
| } |
App name: GrampsMD
App link: https://grampsmd.now.sh/
Frontend link: https://github.com/gusmcnair/GrampsMDClient/
Backend link: https://github.com/gusmcnair/GrampsMD_API
Response to my app from friends and family:
| Describe the HTTP requests/response lifecycle. | |
| The client sends the server a request, and the server sends a response, which can be either the requested data or an error. | |
| Describe the architecture of a basic Express app. How is it organized? | |
| An express app has methods for routing HTTP requests (figuring out which route should be used based on request), configuring middleware | |
| (a series of functions often to validate request or determine specifics before sending response), and more. | |
| Organization: Request, middleware, main task, response. | |
| Tell me about a time when you've used Express Router. How was it helpful? | |
| For my Thingful project, is was helpful in that it allowed several different methods (post, delete, get) to be easily configured on |
App name: GrampsMD
Zeit: https://grampsmdclient-htzi5p41n.now.sh/
Repo: https://github.com/gusmcnair/GrampsMDClient/tree/static-client-branch/src
User feedback:
From mentor: Files are poorly organized, reorganize for better clarity
From mentor:
From friends: