Thank you for submitting the test.
I think it is a quite good submission and I like many part of it. As we would like to make as much as the interview as possible offline, could you please find some time to address a fe concerns that I have?
I understand you have worked with Hexagonal architecture, which is great! At 90poe we bundle together the following patterns:
- hexagonal for the code organisation and testability
- DDD for naming and semantic code structure
- clean code and SOLID for enhanced code maintainability
I don't quite understand why you are using multiple subpackages. I think that this exercise is small enough to simply have:
- internal/config
- internal/core or domain
- internal/repository/port
- internal/transport/http
I would suggest to think about placing all models and ports inside the domain package, in this way other packages will depend on it, and it can contain all your hexagonal business logic.
To follow DDD and help to differentiate each service from each other we don't use terms like model, adapter, port, common, util, etc. Instead we use names of things as much as possible like in this case MaritimePort (or port), for all the other variables their place should make clear if the are ports (interfaces) or adapters (implementations). Also you should find a home for utils and common code.
I appreciate your knowledge of CQRS, but I would say that it is overkill for this exercise.
It seems that you use pointers returns and pointers receiver many times, even if you don't need to mutate the received, so I would advise to consider returning values and using value receivers whenever you can, this will help avoid nil pointer checks as well as avoiding memory escaping to the heap.
Please let me know if this makes sense, and if you would like to have inline comments in the PR to clarify some of the points.
Thank you again for taking the time for interviewing with 90poe.
Fabrizio
Chief of Engineering
Thank you for submitting the test.
I think it is a quite good submission and I like many part of it. As we would like to make as much as the interview as possible offline, could you please find some time to address a fe concerns that I have?
I understand you have worked with Hexagonal architecture, which is great! At 90poe we bundle together the following patterns:
I don't quite understand why you are using multiple subpackages. I think that this exercise is small enough to simply have:
I would suggest to think about placing all models and ports inside the domain package, in this way other packages will depend on it, and it can contain all your hexagonal business logic.
To follow DDD and help to differentiate each service from each other we don't use terms like model, adapter, port, common, util, etc. Instead we use names of things as much as possible like in this case MaritimePort (or port), for all the other variables their place should make clear if the are ports (interfaces) or adapters (implementations). Also you should find a home for utils and common code.
I appreciate your knowledge of CQRS, but I would say that it is overkill for this exercise.
It seems that you use pointers returns and pointers receiver many times, even if you don't need to mutate the received, so I would advise to consider returning values and using value receivers whenever you can, this will help avoid nil pointer checks as well as avoiding memory escaping to the heap.
Please let me know if this makes sense, and if you would like to have inline comments in the PR to clarify some of the points.
Thank you again for taking the time for interviewing with 90poe.
Fabrizio
Chief of Engineering