You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/sir-gon/algorithm-exercises-java/actions/workflows/java-gradle.yml)
I learned so much solving problem XXX, so is it okay to publish my solution elsewhere?
33
-
It appears that you have answered your own question. There is nothing quite like that "Aha!" moment when you finally beat a problem which you have been working on for some time. It is often through the best of intentions in wishing to share our insights so that others can enjoy that moment too. Sadly, that will rarely be the case for your readers. Real learning is an active process and seeing how it is done is a long way from experiencing that epiphany of discovery. Please do not deny others what you have so richly valued yourself.
45
+
- The solutions must be written on "vanilla code", that is,
46
+
avoiding as much as possible the use of external libraries (in runtime).
34
47
35
-
However, the rule about sharing solutions outside of Project Euler does not apply to the first one-hundred problems, as long as any discussion clearly aims to instruct methods, not just provide answers, and does not directly threaten to undermine the enjoyment of solving later problems. Problems 1 to 100 provide a wealth of helpful introductory teaching material and if you are able to respect our requirements, then we give permission for those problems and their solutions to be discussed elsewhere.
36
-
```
48
+
- Adoption of methodology and good practices.
49
+
Each exercise is implemented as a unit test set,
50
+
using TDD (Test-driven Development) and Clean Code ideas.
37
51
38
-
If you have better answers or optimal solutions, fork and PR-me
52
+
### Technical
39
53
40
-
Enjoy 😁 !
54
+
Foundation of a project that supports:
55
+
56
+
- Explicit **typing** when the language supports it, even when it is not mandatory.
57
+
- Static Code Analysis (**Lint**) of code, scripts and documentation.
58
+
- Uniform **Code Styling**.
59
+
-**Unit Test** framework.
60
+
-**Coverge** collection. High coverage percentage. Equal or close to 100%.
61
+
-**Pipeline** (Github Actions). Each command must take care of its
62
+
return status code.
63
+
-**Docker**-based workflow to replicate behavior in any environment.
64
+
- Other tools to support the reinforcement of software development **good practices**.
65
+
66
+
## Install and Run
67
+
68
+
You can run tests in the following ways:
69
+
70
+
-[Install and run directly](#install-and-run-directly) require runtime tools
71
+
installed in your SO.
72
+
-[Install and run with make](#install-and-run-using-make) require runtime tools
73
+
and "make" installed in your SO.
74
+
-[Install and in Docker](#install-and-running-with-docker-) require Docker and
75
+
docker-compose installed.
76
+
- (⭐️)
77
+
[Install and in Docker with make](#install-and-running-with-docker--using-make)
78
+
require docker-compose and make installed.
79
+
80
+
⭐️: Prefered way.
41
81
42
-
##Using Java runtime
82
+
### Install and Run directly
43
83
44
-
### Testing silently
84
+
Running over a JVM with gradle. You must install dependencies:
85
+
86
+
```bash
87
+
gradle --console=verbose dependencies
88
+
```
45
89
46
90
Every problem is a function with unit test.
91
+
47
92
Unit test has test cases and input data to solve the problem.
48
93
49
-
Run all tests:
94
+
Run all tests (skips static analysis, and "clean" test cache before running):
50
95
51
-
```text
52
-
gradle clean test
96
+
```bash
97
+
gradle --console=verbose clean test -x checkstyleMain checkstyleTest
53
98
```
54
99
55
-
###Testing with full logs
100
+
#### Test run with alternative behaviors
56
101
57
-
Run all tests with debug outputs:
102
+
You can change test running behaviour using some environment variables as follows:
-[Project Euler](https://projecteuler.net/) a series of computational problems
249
+
intended to be solved with computer programs.
250
+
251
+
Use these answers to learn some tip and tricks for algorithms tests.
252
+
253
+
### Disclaimer. Why I publish solutions?
254
+
255
+
As Project Euler says:
256
+
257
+
<https://projecteuler.net/about#publish>
258
+
259
+
```text
260
+
I learned so much solving problem XXX, so is it okay to publish my solution elsewhere?
261
+
It appears that you have answered your own question. There is nothing quite like that "Aha!" moment when you finally beat a problem which you have been working on for some time. It is often through the best of intentions in wishing to share our insights so that others can enjoy that moment too. Sadly, that will rarely be the case for your readers. Real learning is an active process and seeing how it is done is a long way from experiencing that epiphany of discovery. Please do not deny others what you have so richly valued yourself.
262
+
263
+
However, the rule about sharing solutions outside of Project Euler does not apply to the first one-hundred problems, as long as any discussion clearly aims to instruct methods, not just provide answers, and does not directly threaten to undermine the enjoyment of solving later problems. Problems 1 to 100 provide a wealth of helpful introductory teaching material and if you are able to respect our requirements, then we give permission for those problems and their solutions to be discussed elsewhere.
264
+
```
265
+
266
+
If you have better answers or optimal solutions, fork and PR-me
0 commit comments