Skip to content

Ushanov: 2 tasks complete#34

Open
mushanov wants to merge 1 commit intodemologin:mainfrom
mushanov:DevCryptoAnalyzerr
Open

Ushanov: 2 tasks complete#34
mushanov wants to merge 1 commit intodemologin:mainfrom
mushanov:DevCryptoAnalyzerr

Conversation

@mushanov
Copy link

@mushanov mushanov commented Sep 7, 2025

No description provided.

Copy link

@Khmelov Khmelov left a comment

Choose a reason for hiding this comment

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

В целом обращение с кодом приемлемое, но я советовал бы потратить чуть больше времени на реализацию этого проекта. Поставил оценку C

public class MainApp {
private static final String DEFAULT_TEXT_FOLDER = "text";

public static void main(String[] args) {
Copy link

Choose a reason for hiding this comment

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

Независимо от местоположения длина метода не может превышать 25 строк. Метод не должен требовать с скроллинга

@@ -0,0 +1,117 @@
package com.javarush.ushanov;

// MainApp.java
Copy link

Choose a reason for hiding this comment

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

Комментарии в коде должны быть для других разработчиков а не для того кто его написал


// CaesarCipher.java

public class CaesarCipher implements Cipher {
Copy link

Choose a reason for hiding this comment

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

Приложение лучше разбить на пакеты даже если классов мало

for (char c : text.toCharArray()) {
if (isCyrillicLower(c)) {
int index = indexOfChar(LETTERS_LOWER, c);
int shiftedIndex = mod(index + shift, lettersLength);
Copy link

Choose a reason for hiding this comment

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

Тут какая-то странная логика если алфавит оформить в виде карты то это большое разветвления превратится в одну строчку


public String readFile(String filePath) throws IOException {
StringBuilder content = new StringBuilder();
try (BufferedReader br = new BufferedReader(
Copy link

Choose a reason for hiding this comment

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

Советую обратить внимание на новые способы обращения к файловой системе

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