Skip to content

Review #1

Description

@xtmq

Hello Ernest,

thank you for participating JetBrains Intership program and for choosing my internship project! My name is Evgeny, I am Team Lead in Rider Platform. Now I am going to provide you a comprehensive code review.

First of all, you written excellent readme.md file with detailed explanation of your vision and various feature. I liked it. Do the same in the future.

About UX. I am not sure I like your desing because it is sometimes difficult to read black code symbols on dark-gray background. Also I constantly feel application is unfocuced because of that background color.

The code is quite simple and easy-to-read. It is fine. Also you made avalonia integration well, left a good amount of comments in business logic and tried to split view and view model. However, the lack of industrial programming experience is very noticeable. Below there are several examples which I suggest you to improve.

  1. Do not put business logic into code behind. For example in OnTreeCaretEvent you mixed up some AST/Text operations and UI updates. Usually this approach leads to the spaghetti code over the years.

private void OnTreeCaretEvent(object sender, SyntaxTreeCaretEventArgs e)

  1. There are code duplicates. Cleanup such things before final commit/merge/review. Code base should be clean and straightforward.


  1. Meaningless or unused code. Try to avoid it.

string rootString = root.ToString();

int endOffset = _textEditor.Document.GetOffset(endLine, 0) + endDocumentLine.Length;

  1. Naming. private StackPanel stackPanel; but one line above private SyntaxTreeCaretEvent _treeCaretEvent;

  2. StringBuilder is your friend when you work with strings.

currString += $"Node: [{node.Kind()}]\n";

The general suggestion is to pay more attention to small details and code tidiness. While this may not seem important for a one-day home project, it becomes critical in real production. It's better to demonstrate the ability to write clean code and have knowledge not only of .NET or Avalonia frameworks, but also of MVC/MVVM and SOLID. This may sound a bit 'old-school', but I have to repeat, it becomes crucial in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions