-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negroncj code review1 #9
base: main
Are you sure you want to change the base?
Conversation
1. Took out dispachers.io from the test as it was just doing the same in university service 2. Moved the IUniversityService to dao and it was in the service folder 3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt Things I learned 1. @before and @after that resets the dispatcher to an original form 2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed 3. That assert* helps a lot with data testing and makes it readable.
…rint_1_Code_Review
1. Took out dispachers.io from the test as it was just doing the same in university service 2. Moved the IUniversityService to dao and it was in the service folder 3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt Things I learned 1. @before and @after that resets the dispatcher to an original form 2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed 3. That assert* helps a lot with data testing and makes it readable. Testing circleCI
Technical suggestions 1. Took out dispachers.io from the test as it was just doing the same in university service 2. Moved the IUniversityService to dao and it was in the service folder 3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt. This idea was brought in class in 3/8/2022 by the professor. I will have to apply it as well. Analysis of the Program -I will say seeing a retrofit work other than the plantplaces really gives me hope with our project as we are still stuck in our open weatherAPI Was the program available in UC Github on time? -Yes a working main was made on time is the program documented/commented well enough for you to understand? -yes, I was able to navigate around the code and quickly understand with the variables being clear and the read me gives me a idea of what the final project might be. Does the program Compile? - Yes in the test area there is a few logic tests and a JSON test that pass well. Even CircleCI checks with the tests so the team can know that they will pass or something is wrong with the project. Rationale to my changes - It was hard for me to do much as they just started working on it. I would say it was just some fixing that would help them get to the goal faster or simply make it easy for them in the future. I may have done a comments on how they did the retrofit as I would like to use there example on my project in the future. IN the end this is a solid start Links to three commits that I have made. 1. JoshAnness/Checkpoint@ab5101c 2. JoshAnness/Checkpoint@652e9df 3. JoshAnness/Checkpoint@d6e3ca5 Things I learned 1. @before and @after that resets the dispatcher to an original form 2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed 3. That assert* helps a lot with data testing and makes it readable. Testing circleCI
Technical suggestions 1. Took out dispachers.io from the test as it was just doing the same in university service 2. Moved the IUniversityService to dao and it was in the service folder 3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt. This idea was brought in class in 3/8/2022 by the professor. I will have to apply it as well. Analysis of the Program -I will say seeing a retrofit work other than the plantplaces really gives me hope with our project as we are still stuck in our open weatherAPI Was the program available in UC Github on time? -Yes a working main was made on time is the program documented/commented well enough for you to understand? -yes, I was able to navigate around the code and quickly understand with the variables being clear and the read me gives me a idea of what the final project might be. Does the program Compile? - Yes in the test area there is a few logic tests and a JSON test that pass well. Even CircleCI checks with the tests so the team can know that they will pass or something is wrong with the project. Rationale to my changes - It was hard for me to do much as they just started working on it. I would say it was just some fixing that would help them get to the goal faster or simply make it easy for them in the future. I may have done a comments on how they did the retrofit as I would like to use there example on my project in the future. IN the end this is a solid start Links to three commits that I have made. 1. JoshAnness/Checkpoint@ab5101c 2. JoshAnness/Checkpoint@652e9df 3. JoshAnness/Checkpoint@d6e3ca5 Things I learned 1. @before and @after that resets the dispatcher to an original form 2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed 3. That assert* helps a lot with data testing and makes it readable. Testing circleCI
Technical suggestions 1. Took out dispachers.io from the test as it was just doing the same in university service 2. Moved the IUniversityService to dao and it was in the service folder 3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt. This idea was brought in class in 3/8/2022 by the professor. I will have to apply it as well. Analysis of the Program -I will say seeing a retrofit work other than the plantplaces really gives me hope with our project as we are still stuck in our open weatherAPI Was the program available in UC Github on time? -Yes a working main was made on time is the program documented/commented well enough for you to understand? -yes, I was able to navigate around the code and quickly understand with the variables being clear and the read me gives me a idea of what the final project might be. Does the program Compile? - Yes in the test area there is a few logic tests and a JSON test that pass well. Even CircleCI checks with the tests so the team can know that they will pass or something is wrong with the project. Rationale to my changes - It was hard for me to do much as they just started working on it. I would say it was just some fixing that would help them get to the goal faster or simply make it easy for them in the future. I may have done a comments on how they did the retrofit as I would like to use there example on my project in the future. IN the end this is a solid start Links to three commits that I have made. 1. JoshAnness/Checkpoint@ab5101c 2. JoshAnness/Checkpoint@652e9df 3. JoshAnness/Checkpoint@d6e3ca5 Things I learned 1. @before and @after that resets the dispatcher to an original form 2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed 3. That assert* helps a lot with data testing and makes it readable. Testing circleCI
//Saw this in the service folder. So I moved the file here. Will this be used in the future? | ||
//If not just remove it as it seems like IUniversityDAO got you covered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big no-no: do not put conversation in source code comments. That's clutter. Put the conversation here, in the Files Changed section of the pull request, where you can have a dialog with other developers.
@@ -1,4 +1,4 @@ | |||
package com.example.uniconnect.service | |||
package com.example.uniconnect.dao |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is named IUniversityService, it almost definitely belongs in a service package, not a DAO package.
@@ -29,16 +27,16 @@ import java.util.concurrent.TimeUnit | |||
class UniConnectUnitTest { | |||
|
|||
//lateinit var mvm : MainViewModel | |||
|
|||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
//@MockK | ||
//lateinit var mockUniService : UniversityService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're here, remove the commented out code.
Avoid pushing commented code to Version Control. Version control has tools that makes this unnecessary.
- You can look at history to see what used to be there.
- You can use branches for experimental features.
val thread = "UI thread" | ||
private val mainThreadSurrogate = newSingleThreadContext(thread) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to add any value... over creating a new line of code... unless the variable thread is used elsewhere.
//Removed the dispatchers IO that was here as it was doing the same in your service folder. | ||
//Seems like it still runs great | ||
//I am going to add the paths the program does on this as a example of documentation for debug in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big no-no: do not put conversation in source code comments. That's clutter. Put the conversation here, in the Files Changed section of the pull request, where you can have a dialog with other developers.
//What this does is it goes to UniversityService with RetrofitClientService | ||
//starts up the dao/IUniversityDAO and takes JSON data in the dto/University class and returns it to service/UniversityService | ||
//gets the return of the list in all universities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're putting this much into a comment, make it a KDoc comment and put it on top of the method.
But... really... is this comment adding anything over and above what a developer could figure out by reading the code or running it in the debugger? If not, it's probably not needed... and thus, clutter.
I don't see enough technical debt reduction to merge this branch. I'd remove it without merging. |
Code Review
Technical suggestions
1. Took out dispachers.io from the test as it was just doing the same in university service
2. Moved the IUniversityService to dao and it was in the service folder
3. Made a variable named thread and put it in newSingleThreadContext to avoid technical debt. This idea was brought in class in 3/8/2022 by the professor. I will have to apply it as well.
Analysis of the Program
-I will say seeing a retrofit work other than the plantplaces really gives me hope with our project as we are still stuck in our open weatherAPI
Was the program available in UC Github on time?
-Yes a working main was made on time
is the program documented/commented well enough for you to understand?
-yes, I was able to navigate around the code and quickly understand with the variables being clear and the read me gives me a idea of what the final project might be.
Does the program Compile?
Rationale to my changes
Links to three commits that I have made in my project.
Things I learned
1. @before and @after that resets the dispatcher to an original form
2. Review runTest to force the program to run the suspend function in the whenServiceDataAreReadAndParsed
3. That assert* helps a lot with data testing and makes it readable.