Skip to content

Mazurojj code review2#21

Open
JMaz-15 wants to merge 8 commits intomasterfrom
Mazurojj-CodeReview2
Open

Mazurojj code review2#21
JMaz-15 wants to merge 8 commits intomasterfrom
Mazurojj-CodeReview2

Conversation

@JMaz-15
Copy link
Copy Markdown
Collaborator

@JMaz-15 JMaz-15 commented Apr 5, 2022

Analysis of the program:
This program has made progress since I last reviewed it. It is clear what the purpose of this application is - Enter a movie by year and name and see if it is in the top 20 in the world

Was the program available in UC Github on time?
Yes

Is the program documented/commented well enough for you to understand?
There are minimal comments however the project is still very easily understandable

Does the program compile?
Yes

Rationale behind your changes:
I made a few updates to appease to the Kotlin coding standards linked here: https://kotlinlang.org/docs/coding-conventions.html
Basically, I got rid of some underscores in variable naming in the code and changed up the class structure / format a bit

My biggest change was to link what was going on in the activity_main.xml file to the Main Activity. Now the group should be able to get the data being entered in the text boxes and return the data in the text field.

Three Technical Concepts I learned:

  1. I was refreshed on the Kotlin coding standards here: https://kotlinlang.org/docs/coding-conventions.html
  2. I learned how to use TextView and call data from an XML file to the Main Activity
  3. I learned how to format an application page using XML and not Jetpack Compose

Comment on lines +21 to +31
val year = findViewById<TextView>(R.id.txtYear)
val name = findViewById<TextView>(R.id.txtMovieName)
val result = findViewById<TextView>(R.id.txtResults)


val btnFindMyMovie = findViewById<Button>(R.id.btnFindMyMovie)
btnFindMyMovie.setOnClickListener {
// your code to perform when the user clicks on the button

result.text = "the $name was released in $year"
}
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?
If not in use, remove them. Keep the codebase as small as possible to do the job you want to do. 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.

@@ -0,0 +1,13 @@
package com.example.mymovieinfo.dto

data class Specimen(var movieTitle: String = "",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Specimen?

Comment on lines +4 to +13
var movieRank: Int = 0,
var movieCountry : String = "",
var movieBoxOfficeGross: String = "",
var movieOpeningWeekendGross : String = "",
var movieDistributor : String = "")
{
override fun toString(): String {
return movieTitle
}
} 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. Keep the codebase as small as possible to do the job you want to do. 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.


<EditText
android:id="@+id/txt_MovieYear"
android:id="@+id/txtYear"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

since this is pointing to an XML element in an XML file, underscores are OK.

Comment on lines +1 to +18
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="com.google.gson.annotations.SerializedName">
</searchable>

<application>
<activity android:name=".SearchableActivity" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
</application>

</PreferenceScreen> 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. Keep the codebase as small as possible to do the job you want to do. 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.

3 participants