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

Codebase refactoring #7

Open
xavier-figueroa opened this issue Aug 10, 2023 · 7 comments
Open

Codebase refactoring #7

xavier-figueroa opened this issue Aug 10, 2023 · 7 comments

Comments

@xavier-figueroa
Copy link
Contributor

I've reviewing the code and I have identified a few opportunities to improve the code, I already have created some PR and I would like to continue working on this. Some of the things that can be improved are:

  • Make it work with gradle 8.X
  • Fix typos
  • Remove method calls marked for removal
  • Update javadoc: remove params that no longer exists, fix syntax, etc
  • Remove commented-out code
  • Remove unused code
  • Make use of java 8 syntax across the project
    • replace anonymous classes with lambas
    • collapse identical catch clauses
    • dymond operators
    • parametrized classes when possible
    • etc

I have noticed that freeplane has a Discussion section to propose this kind of contributions but that is not enabled for shtml. Should I post this info there? @dpolivaev . Could you please advise?

@dpolivaev
Copy link
Member

Thank you for your interest and contributions.
I have just merged or commented on your pull requests.

shtml is pretty old component and I am changing it only when it is needed, mostly to fix bugs.
If I wrote it from very beginning I would not have any comments or javadoc at all because keeping them up to date requies extra effort and I do not think that people really want to read it.

I don't read comments or javadoc at all myself, I read the code as the ultimate source of truth.

I do not think that opening discussions on this project makes sense because I do not think that shtml has its own community, and discussions are usually used for communication with and between community members. So I think that at the moment you and me can communicate using issues and pull requests.

I am curious to know why you are interested in improving shtml.

Generally, its code is quite far from being clean, but I am afraid that reworking it would not be rewarded because I do not think that many people would start contributing.

Best regards.

@dpolivaev
Copy link
Member

By the way, because Freeplane and shtml are my spare time projects, I usually answer only on weekends and fixing bugs usually has higher priority. So don't be surprised.

@xavier-figueroa
Copy link
Contributor Author

First of all, Im a Freeplane user :)
Regarding comments and javadocs I agree, usually they don't add any value. I can do a PR either keeping them up to date (I already have a draft of it) or removing them.

Regarding my interest well, I've always been interested to contribute to an open source project, I have had some free time lately and tried to contribute to a big/active projects but it has been a bit hard to get response so I figured to start with something smaller and even better if I'm using it.
Also, I'm studding to get a java certification and coding is much better than just reading :), so I'm not that much interested whether is rewarded or not

@dpolivaev
Copy link
Member

I'm not that much interested whether is rewarded or not

I do not mean any financial rewards, I am not getting money for Freeplane myself.
I mean the impact of time and effort we both spend.

I think we could have an online call to try to find a topic where your efforts could probably make a higher impact, although I appreciate your current contributions and I think they make sense.

@dpolivaev
Copy link
Member

You can write me an email to dimitry (at) freeplane (dot) org so that we can find the time for a call.

@dpolivaev
Copy link
Member

Hey @xavier-figueroa, I have seen a nice picture I wanted to share with you because it is exactly what you do.
It is called "Refactoring priority premise" and describes which order of refactorings the author finds the best.

RefactoringPriorityPremise

@xavier-figueroa
Copy link
Contributor Author

That's nice, thanks for sharing. is that part of a book/article? I'd like to learn more about 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

No branches or pull requests

2 participants