Skip to content

Commit

Permalink
challenges: approach to solving challenges
Browse files Browse the repository at this point in the history
General principles for solving Clojure challenges

Signed-off-by: John Practicalli <250870+practicalli-john@users.noreply.github.com>
  • Loading branch information
practicalli-johnny committed May 4, 2023
1 parent 63e011c commit f88737f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/coding-challenges/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@ Coding challenges are an excellent way to start learning a new language. The ch

Challenges are there to explore a language and practice your understanding of how to assemble working code. It is recommended to try different approaches to solving a challenges and even repeat the same challenges at a later date and see what additional approaches you have learned.

[4Ever-Clojure](https://4clojure.oxal.org/){target=_blank} is a highly recommended starting point for learning Clojure and does not require any installation or setup. 4Ever-Clojure is a new implementation of 4Clojure.com.
[Exercism.io](https://exercism.io){target=_blank} and [4Ever-Clojure](https://4clojure.oxal.org/){target=_blank} are highly recommended starting point for learning Clojure and does not require any installation or setup. 4Ever-Clojure is a new implementation of 4Clojure.com.

## Approach to solving challenges

Take a few minutes to digest the description of the challenge and make notes.

Identify the simplest possible thing to do, solving the problem in many small pieces which encourages experimentation

- experiment, write code and evaluate to see what it does (optionally create a comment with the result)
- use a rich comment `(comment ,,,)` to capture multiple ideas and designs, even failed experiments can be useful (separates experiments from working code)
- continually evaluate code as expressions are written, to ensure their behaviour is understood (try different argument values for functions)
- try different shapes of data
- transform data shapes to keep function definitions simpler

Once there is a working solution, refactor or try different approaches and evaluate the merit of alternative solutions


| Challenge website | Description | Requirements |
|-------------------------------------------------------|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------|
Expand Down

0 comments on commit f88737f

Please sign in to comment.