Hi
Some comments:
In the last few days, a couple of feedbacks were pointing out that some (new?) rules have to be followed and that there is some kind of “correct direction”. We also have a concept of frightening stuff which maybe we could rephrase as “experiments” …
An acceptable level of experimentation would be no experimentation at all. GeoNetwork is not a sandbox and thousands of organizations rely on it daily; experimenting on the main branch incurs tremendous migration and bugfixing costs down the line, costs which are draining potential funding for actual quality work on the project.
I’m not sure if this refers to adding new features to GeoNetwork? If that’s the case, I’m fine with that, with a proper review of the PR, test cases (not always possible to add, but that’s another history) and documentation. Also not only unit tests, but describe a test case to reproduce the issue in the PR, so that a tester can verify the fix.
I think it could help to define a release calendar, at least most customers will appreciate it. For example, a major release once or twice a year and monthly releases of the stable version(s), so new features go in the branch for the next release. That should lower the risk of introducing regressions, but also requires frequent releases, otherwise new features wait even for years to end in the stable releases.
For 4.0.x, Francois has taken care of the monthly releases, something that should also be highly appreciated as it allows to keep the project alive, as most users do not have the option to build it.
We tried in the past a couple of “constraints” without always much success eg. jslint. Maybe some tools, existing guidelines or new people’s savoir-faire can now help … We also know that we are facing common OS project issues (eg. PR with no review, long term support of PR work), and that’s an area where we can also make progress.
For me, the main problem with some of these tools has been that they weren’t as well integrated into the build process, so it was pretty easy to forget to run before committing or it took a long time to run and with all the legacy code running during the example. Findbugs required adding many exception cases for the legacy code; otherwise the report was unmanageable.
In any case, this is something to document / improve so for Javascript code it’s executed jslint (or other better tool?) and for Java code SpotBugs, at least for the new code.
We also know that we are facing common OS project issues (eg. PR with no review, long term support of PR work), and that’s an area where we can also make progress.
Fully agree, review of PR sometimes takes a long time, usually also because only a few developers do PR reviews, making it difficult to manage. I am not sure that obtaining funds from OSGeo is an option for this type of task? I think it would make the task easier.
As for suggestions, I would strongly invite anyone and everyone to stop incentivizing customers to fund the UI in the core-geonetwork project: AngularJS will be end of life in 3 months, most libraries it relies on are deprecated as well and maintenance costs are extremely high. The https://github.com/geonetwork/geonetwork-ui project has been created as a successor with higher quality standards in mind and a vision for the future of GeoNetwork as a universal data hub. The project is advancing slowly but steadily, and will benefit from all contributions of any kind.
That might be a good option, but the main problem I see, unless I’m really wrong, is that the project in the current state can’t even replace the GeoNetwork search UI app. Don’t take it as a criticism, as it’s something that requires that the different parties working in GeoNetwork should promote, but from my experience with customers, unless there is a clear work plan to replace all the applications, it is difficult to get them involved.
Also, take code review as a gift, it’s not to blame people, but to try to keep a good code overall. Another craftman guideline says “be kind with the people, but rude with the code”, in other term, all comments that push the people and the code to be better are good, don’t take them personally.
I fully agree, but when doing a review we must be constructive and understand that perhaps the person making a contribution is not an expert in specific areas where the reviewer can be an expert. So we should try to be kind with the code and propose constructive alternatives.
All what I mention sounds quite of obvious, but reality, deadlines and constraints push us to take shortcuts, which we should avoided. We should really do an effort to stick to better practices.
We could start writing these best practices in a WIKI or similar and also start supporting tools that automate some of these best practices. The Bolsena codesprint might be a good place to work on this.
Regards,
Jose García
On Tue, Sep 14, 2021 at 10:30 AM Florent Gravin via GeoNetwork-devel <geonetwork-devel@lists.sourceforge.net> wrote:
Hi François,
Thanks for pulling this down.
I would be pleased to discuss about those topics if we can arrange a meeting between developers to hear what everyone would propose to improve code quality and maintenance. It will benefit anyone.
Here some craftman trends which could be useful:
- always leave the code in a better state that how you found it
- when fixing a bug: write a failing test which illustrate the bug, try to write passing tests that cover the whole feature, fix the bug so all tests are green
- constant refactoring, the code is legacy, when you touch a piece, instead of suffering from the legacy, make the code evolve
- put love in the code you do
- add tests, refactoring is fundamental, to be sure you don’t break things while refactoring, you can only rely on tests
- non tested code is no code (garbage)
- quality is free, implementing a quick feature or a quick fix may give the impression it’s not costly, but you’ll pay the price afterwards
Actually, when we develop a feature, it’s like were a developing it 2 or 3 times:
- the first quick shot: “it works”
- the first issues “actually it does not really work when you are using it in a deeper way” => fixes
- still not working perfectly => the full implementation with tests
It implies different people, different findings and I think we are all losing from that (energy, time, faith), the feature should be implemented only once.
All what I mention sounds quite of obvious, but reality, deadlines and constraints push us to take shortcuts, which we should avoided. We should really do an effort to stick to better practices.
Also, take code review as a gift, it’s not to blame people, but to try to keep a good code overall. Another craftman guideline says “be kind with the people, but rude with the code”, in other term, all comments that push the people and the code to be better are good, don’t take them personally.
Hope it helps.
Cheers
On Tue, Sep 14, 2021 at 9:14 AM Olivier Guyot via GeoNetwork-devel <geonetwork-devel@anonymised.comts.sourceforge.net> wrote:
Hi,
An acceptable level of experimentation would be no experimentation at all. GeoNetwork is not a sandbox and thousands of organizations rely on it daily; experimenting on the main branch incurs tremendous migration and bugfixing costs down the line, costs which are draining potential funding for actual quality work on the project.
As for suggestions, I would strongly invite anyone and everyone to stop incentivizing customers to fund the UI in the core-geonetwork project: AngularJS will be end of life in 3 months, most libraries it relies on are deprecated as well and maintenance costs are extremely high. The https://github.com/geonetwork/geonetwork-ui project has been created as a successor with higher quality standards in mind and a vision for the future of GeoNetwork as a universal data hub. The project is advancing slowly but steadily, and will benefit from all contributions of any kind.
Ideally the current GeoNetwork UI would receive some sort of LTS/LTR status and enter a long-term stabilized state, but I’m not sure anyone would be willing to offer this kind of guarantee.
–
camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS
Olivier Guyot
Geospatial Developer
+49 89 2620 89 924
On Mon, Sep 13, 2021 at 6:58 PM Francois Prunayre via GeoNetwork-devel <geonetwork-devel@anonymised.comt> wrote:
Hi all,
In the last few days, a couple of feedbacks were pointing out that some (new?) rules have to be followed and that there is some kind of “correct direction”. We also have a concept of frightening stuff which maybe we could rephrase as “experiments” …
Would it make sense to discuss and define what are those rules/requirements and direction to have a clear view of what is expected from contributors? Define what level of experimentation is acceptable or not? It would also give more visibility on what level of exigences is required and if it matches supporting projects needs, people knowledge and people efforts dedicated to the project run.
We tried in the past a couple of “constraints” without always much success eg. jslint. Maybe some tools, existing guidelines or new people’s savoir-faire can now help … We also know that we are facing common OS project issues (eg. PR with no review, long term support of PR work), and that’s an area where we can also make progress.
Looking forward to ideas, suggestions and contributions.
Francois
PS: For now, I step down from my role of making an almost monthly maintenance release of version 4. Don’t hesitate to take over…
[1] https://github.com/geonetwork/core-geonetwork/pull/5920
[2] https://github.com/geonetwork/core-geonetwork/pull/5932#issuecomment-906206091
[3] https://github.com/geonetwork/core-geonetwork/pull/5931
[4] https://github.com/geonetwork/core-geonetwork/pull/5941
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
–
camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS
Florent Gravin
Technical Leader - Architect
+33 4 58 48 20 36
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
–
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.