Skip to content
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

Lab1 #37

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Lab1 #37

wants to merge 15 commits into from

Conversation

Marynarz
Copy link

@Marynarz Marynarz commented Jan 9, 2019

Dzień dobry,

Przepraszam że tak późno, ale chciałbym oddać zadania na pierwsze laboratoria.

@kowallus
Copy link

Dziękuję. Uprzejmię proszę jeszcze o maila ze zgłoszeniem tego PR (link), zgodnie z zasadami opisanym w pliku readme.md w repozytorium.

@kowallus
Copy link

Specific issues inlined in the code.

Required updates are marked using 'PLEASE FIX:' prefix. In case of repeated issues usually only one place is marked, but fixes are expected to be made to similar places.

@kowallus kowallus closed this Jan 12, 2019
@kowallus kowallus reopened this Jan 12, 2019
Copy link

@kowallus kowallus left a comment

Choose a reason for hiding this comment

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

Specific issues inlined in the code.

Required updates are marked using 'PLEASE FIX:' prefix. In case of repeated issues usually only one place is marked, but fixes are expected to be made to similar places.

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

Choose a reason for hiding this comment

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

Commits polluted with project/compilation files


public class DefaultCountingOutRhymer {

private static final int full = 11;

Choose a reason for hiding this comment

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

PLEASE FIX: Constants names should be written UPPERCASE (e.g. FULL).
The name is unclear (possibly incorrect).


protected int peekaboo() {
if (callCheck())
return wrongVal;

Choose a reason for hiding this comment

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

DEFAULT_VALUE or EMPTY_STACK_VALUE would be better

private static final int wrongVal = -1;
private final int[] NUMBERS = new int[12];

private int total = wrongVal;

Choose a reason for hiding this comment

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

This is not a WRONG_VALUE (wrong name)


private static final int full = 11;
private static final int wrongVal = -1;
private final int[] NUMBERS = new int[12];

Choose a reason for hiding this comment

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

Array is not a constant (lowercase)
Another constant (12). It is related to FULL (yet, the name is misinforming)

return new defaultCountingOutRhymer();
}
@Override
public DefaultCountingOutRhymer GetStandardRhymer() {

Choose a reason for hiding this comment

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

PLEASE FIX: Method names should start from lowercase (e.g. getStandardRhymer())

@@ -2,11 +2,35 @@

public class Node {

public int value;
public Node prev, next;
private int value;

Choose a reason for hiding this comment

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

PLEASE FIX: Immutable - should be final (setter unnecessary)

return ret;
}
private Node last;
private int i;

Choose a reason for hiding this comment

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

PLEASE FIX: Unused private field (to be removed).

private static DefaultCountingOutRhymer[] rhymersFactory() {
Rhymersfactory factory = new DefaultRhymersFactory();

return new DefaultCountingOutRhymer[]{factory.GetStandardRhymer(), factory.GetFalseRhymer(),

Choose a reason for hiding this comment

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

PLEASE FIX: This part should remain in main function. The rest (for loops) should be extracted to testRhymers method (factory should be its parameter)

@@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Choose a reason for hiding this comment

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

JavaDoc documents should not be generated, only JavaDoc java comments. (JavaDoc should be generated from sources outside the repo.)

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