Skip to content

Newberts_CodeReview_1.1#8

Open
Newbtree45 wants to merge 1 commit intomasterfrom
Newberts_CodeReview_1.1
Open

Newberts_CodeReview_1.1#8
Newbtree45 wants to merge 1 commit intomasterfrom
Newberts_CodeReview_1.1

Conversation

@Newbtree45
Copy link
Copy Markdown
Collaborator

Added a main view model that implements aspects of the movie service. I also added kotlinx dependencies to the gradle.

Added a main view model that implements aspects of the movie service. I also added kotlinx dependencies to the gradle.
@Newbtree45
Copy link
Copy Markdown
Collaborator Author

I went back and made some different changes. I added a main view model that implements your movie service. I also added some kotlinx dependencies to your gradle to hopefully fix a few error in other parts of your project.

@Newbtree45
Copy link
Copy Markdown
Collaborator Author

In all your project had a few dependency errors that came up with the latest commit. The original project a little before that commit worked well with no errors but lacked many of the recent additions. The code was easy to follow with a few good comments to help figure out what was happening. There was a lack of tests to test the different parts of the code. I think you guys are off to a good start though.

@Newbtree45
Copy link
Copy Markdown
Collaborator Author

You guys are also quick on your commits as one was made as I was working on this review today.

Comment thread app/build.gradle
Comment on lines +51 to +53
//Adding Kotlinx
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0'
testImplementation "io.mockk:mockk:1.12.2"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an incomplete feature.
Are you using these anywhere? I don't see them used.
If not in use, remove them. Unused code is clutter, and bad documentation, which increases technical debt.
Only complete features, which meet the team's Definition of Done, should be merged to Main/Master.

Comment on lines +1 to +19
package com.example.mymovieinfo

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.mymovieinfo.dto.Movie
import com.example.mymovieinfo.service.MovieService
import kotlinx.coroutines.launch

class MainViewModel : ViewModel() {
var movies : MutableLiveData<List<Movie>> = MutableLiveData<List<Movie>>()
var movieService : MovieService = MovieService()
fun fetchCountries() {
viewModelScope.launch {
var innerMovies = movieService.fetchMovies()
movies.postValue(innerMovies)
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an incomplete feature.
Are you using these anywhere? I don't see them used.
If not in use, remove them. Unused code is clutter, and bad documentation, which increases technical debt.
Only complete features, which meet the team's Definition of Done, should be merged to Main/Master.

@discospiff
Copy link
Copy Markdown

This branch introduces new, and possibly incomplete, functionality, instead of reducing technical debt of existing functionality. New functionality should be kept in a separate branch until it is complete and meets the team's Definition of Done. Thus, if the team would like these features, they can keep the branch open and continue to work on it, and then merge once it meets the Definition of Done. Otherwise, if they do not want these changes, they can abandon/delete this branch and not merge it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants