-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_modeling.txt
27 lines (23 loc) · 2.19 KB
/
data_modeling.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1) One assumption the developers of Mockaroo made was that all emails would contain "@". I did not
take this assumption for granted, so I made sure to check that each email contained "@" to be considered
a valid email. Another assumption is that users would input valid street addresses, as all the data
that was generated by Mockaroo contains a street and house/apartment number. Furthermore, people with
names in alphabets different from the English one are excluded from this data set, another assumption
Mockaroo makes.
2) I tried to make decisions of what data I would encounter in the future by putting myself in the shoes
of the user. For example, I could definitely see a user inputting an invalid email address so I tried to check
for this by checking if the string contained "@". One edge case that could break my model is if a user
decided to include their city name or country within the "Street Address" field and separated it by a comma.
This would break my CSV parser, since it splits on commas. Another edge case that could break my model is if
a user input an invalid domain for their email. I could not figure out how to check for valid domains, so this
could break my model if I needed to use the email somehow.
3) I tried to make my REPL extensible by using a "run" method defined in my Method interface. This allows
multiple different objects to be able to use this command and handle them internally in their classes. Furthermore,
I can reuse this part of my REPL code since it does not require any specific class to be instantiated to
call this method, since it only relies on what my HashMap returns based on the inputted command.
One change that might have to be made to my REPL to make it even more reusable is to allow users to pass in how
they want to split their user input. Currently, my REPL splits the user input on spaces excluding quotation marks,
so that star names are seen as 1 string. However, their could be a situation where a user would want the REPL to
split on underscores, and in that case my REPL code would not be reusable. Therefore, I could change my code by
creating a parameter for the REPL class that asks for the user to input how they want their commands to be parsed,
perhaps using regex.