Skip to content

Commit 9cd3bd1

Browse files
intro: earlier study guide
1 parent 476b8b5 commit 9cd3bd1

File tree

1 file changed

+186
-0
lines changed

1 file changed

+186
-0
lines changed

docs/introduction/study-guide.md

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# Clojure Study guide
2+
3+
A suggested study guide for those new to functional programming with Clojure.
4+
5+
> #### Hint::MeetAMentor Clojure Study Group - 3rd November 2018 onwards
6+
> [MeetAMentor Community](http://meetamentor.co.uk/) is hosting a Clojure Study group starting 3rd November, using this study guide. Sign up via the[ MaM Study Group form](http://bcrw.typeform.com/to/VkChxI).
7+
>
8+
> All broadcasts are available via the [jr0cket YouTube channel](https://www.youtube.com/channel/UCelY2sic3hsIiSeAhWt640g)
9+
10+
## Week1: Overview of Clojure
11+
12+
[![youtube live recorded broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=MZcuL4lRw5E&index=1&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
13+
14+
Briefly discuss what the Clojure programming languages is good for, some example companies using Clojure and give suggestions on how to start learning Clojure.
15+
16+
Cover [the syntax and a few common functions](https://repl.it/@jr0cket/Clojure-In-15-minutes),
17+
18+
### Homework
19+
* Simple Clojure exercises from [ClojureBridge London workshop](https://clojurebridgelondon.github.io/workshop/simple-values/)
20+
* Understand the principles behind the design of the Clojure language by watching [Simple made Easy](https://www.infoq.com/presentations/Simple-Made-Easy) by Rich Hickey (the author of Clojure)
21+
22+
## Week2: REPL Driven Development overview and ClojureBridge London exercise review
23+
24+
[![youtube live recorded broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=y5TAHwZc1JE&index=2&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
25+
26+
Discuss REPL Driven Development ([my blog post on the topic](http://jr0cket.co.uk/2018/11/REPL-driven-development-with-Clojure.html))
27+
28+
Review the ClojureBridge London exercises homework - [Github Gist](https://gist.github.com/jr0cket/6551c8ef224a63e891bc61665471bcd1) - [Repl.it project](https://repl.it/@jr0cket/ClojureBridge-London-exercises)
29+
30+
### Homework
31+
* [4Clojure exercises](http://www.4clojure.com/)
32+
33+
34+
## Week 3: Using the REPL and Structural editing
35+
36+
[![youtube live recorded broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=PmSPKvlJk74&index=3&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
37+
38+
#### Part 1: Structural Editing
39+
The first part of the video covers Structural Editing for Clojure development and the concept of code as symbolic expressions. Demonstrating the basic of structural editing using Spacemacs
40+
41+
Briefly covers the different editors that give a good Clojure experience.
42+
http://practicalli.github.io/clojure/development-tools/
43+
44+
Visit http://practicalli.github.io/spacemacs to learn more about Clojure development with Spacemacs (Emacs and CIDER).
45+
46+
#### Part 2: 4Clojure exercises 1 to 15
47+
At [34.50 onwards we discuss solving the first fifteen challenges of 4Clojure](https://www.youtube.com/watch?v=PmSPKvlJk74&feature=youtu.be&t=2090), a website that gives you Clojure code snippets to complete. Entering the missing code and the website will run the code and tests, showing if you got the answer correct.
48+
49+
[Solving the first 15 challenges - 34.50 onwards](https://www.youtube.com/watch?v=PmSPKvlJk74&feature=youtu.be&t=2090)
50+
51+
### Homework
52+
* [4Clojure exercises](http://www.4clojure.com/)
53+
* Install a Clojure development environment using these [install guides for several Clojure aware editors](https://practicalli.github.io/clojure/development-tools/)
54+
55+
56+
## Clojure Loves Data: A 40 minute sessions at London Java Community conference
57+
58+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=Ja63rOa2MFA)
59+
60+
Live coding session covering the basics of using data structures (collections) in Clojure, mostly focusing on Vectors (arrays) and Maps (hash-map, dictionary).
61+
I will also attempt to broadcast live a lightning talk on how to broadcast live (because I like being quite meta some times).
62+
63+
64+
65+
## Week 4: Clojure maps, ascii code generator and clojure test
66+
67+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=ikW6Qk73K1s)
68+
69+
Working with Clojure maps (hash-map) and [writing a simple ascii code generator](https://youtu.be/ikW6Qk73K1s?t=1052).
70+
71+
### Homework
72+
* Test driven development for the Clacks messages converter. See [61 minutes onwards for ideas how to create the tests](https://www.youtube.com/watch?v=ikW6Qk73K1s&feature=youtu.be&t=3660).
73+
74+
75+
## Week 5: Test Driven Development - Clacks messenger
76+
77+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=LvissLmUNho&index=5&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
78+
79+
This week we will look at Test Driven Development and Clojure.
80+
81+
The [`clojure.test`](https://clojure.github.io/clojure/clojure.test-api.html) library is part of Clojure and is the simplest way to start with TDD and Clojure. We will take a small challenge and solve it by first writing a failing test, then writing some code to make the test pass, then refactor the code if necessary.
82+
83+
We will start by creating a new project on the command line with Leiningen, which creates parallel source and test branches.
84+
85+
```shell
86+
lein new my-project
87+
```
88+
89+
Open the source code file from the project (`SPC f f`) and start the REPL - `, '` or `M-RET`.
90+
91+
Toggle between source code and test code with `SPC p a`. Or open the other in a new window using `SPC p f`, highlight the filename and use `C-c o` to open in new window.
92+
93+
Run all tests using `, t a` or `M-RET t a`.
94+
95+
To automate running of tests, toggle cider-auto-test-mode using `, T t` and then evaluate either source or test buffer using `, e b` and tests will run for that namespace
96+
97+
### Source code examples
98+
* [Clacks encoder/decoder TDD style](https://github.com/practicalli/clacks)
99+
100+
### Homework
101+
* Try some of the [Advent of Code challenges](https://adventofcode.com/)
102+
* Solve [4Clojure challenges](http://www.4clojure.com/) from #16 onwards
103+
104+
105+
## Week 6: Advent of Clojure
106+
107+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=opM7fU7IAV8&index=6&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
108+
109+
Solving day one of the [Advent of Code challenges](https://adventofcode.com/). The first part of the problem is solved with a simple `reduce` function. The second part we investigate several different approaches, becoming more functional and using higher abstractions in Clojure.
110+
111+
If you understand the progression of the solutions, you are a good way on to creating very clean Clojure code at a good level of abstraction.
112+
113+
> #### Note::Advent of Code
114+
> [jr0cket/advent-of-code-2018](https://github.com/jr0cket/advent-of-code-2018) repository contains documented descriptions of the solutions to Advent of Code created so far.
115+
>
116+
> [Advent of Code](https://adventofcode.com/) is a yearly coding challenge that sets one challenge per day, just like an advent calendar.
117+
>
118+
> Tim Pote will be live [streaming their solution to the advent of code](https://www.twitch.tv/timpote) each day at 12 noon (UTC-5 timezone) on Twitch.
119+
>
120+
> Borkdude also has a [Github repository where advent of code solutions will be published](https://github.com/borkdude/advent-of-spec), with all solutions checked with Clojure spec
121+
122+
123+
124+
## Week 7: Simple website with ClojureScript, reagent, bootstrap and SVG
125+
126+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=WYaIy3E6nLk&index=7&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
127+
128+
Creating a very simple front end website with ClojureScript. ClojureScript is Clojure that runs on JavaScript engines, such at the one in your browser or node.js. The project included [reagent](), a react.js style framework for ClojureScript. The web page is made up of one or more components that are managed by the reagent library, so if there are updates to the components the reagent library will refresh the web page.
129+
130+
The project also used [Bootstrap](https://getbootstrap.com/) as a Cascading Style Sheet library, to help structure the layout of the page and add visual components. The reagent library also lets us define graphics using markup, creating [Scalable Vector graphics](https://clojurebridgelondon.github.io/workshop/introducing-clojure/clojure-svg-graphics.html).
131+
132+
The project was created with the [Leiningen figwheel template](https://github.com/bhauman/lein-figwheel), to give instant feedback in the web page as we update the code.
133+
134+
```shell
135+
lein new figwheel simple-website -- --reagent
136+
```
137+
138+
139+
## Week 8: 4Clojure challenges 16 to 22
140+
141+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=8u8y73zh0w0&index=8&list=PLy9I_IfUBzKJSgctCJaRYcnF6kZdiZ5ku)
142+
143+
Solving the 4Clojure challenges from 16 to 32.
144+
145+
> #### Hint::4Clojure challenges up to 15
146+
> We solve [the first 15 challenges in study group #3 from 34.50 onwards](https://www.youtube.com/watch?v=PmSPKvlJk74&feature=youtu.be&t=2090)
147+
>
148+
> [jr0cket/four-clojure](https://github.com/jr0cket/four-clojure) repository - discussions of 4Clojure solutions
149+
150+
## Week 9: Tic-Tac-Toe
151+
152+
[![youtube live broadcast](/images/youtube-live-recorded-broadcast.png)](https://www.youtube.com/watch?v=ikW6Qk73K1s)
153+
154+
Building a simple command line tic-tac-toe game in Clojure in a very functional style.
155+
156+
No frameworks were harmed (or used) in the making of this broadcast :smile_cat:
157+
158+
* [practicalli/tictactoe GitHub repository](https://github.com/practicalli/tictactoe-cli)
159+
160+
> #### Hint::Joining the Live discussion
161+
> A hangout link will be posted to the MeetAMentor Slack channel and London Clojurians meetup page about 30 minutes before broadcast.
162+
163+
164+
165+
## Additional concepts to cover
166+
* Understanding how to model the world with immutable data (values)
167+
* Writing your own (pure) functions
168+
* using sequences
169+
* lisp comprehension
170+
* higher order functions
171+
* functional composition.
172+
173+
Homework: various small challenges and 4Clojure exercises.
174+
175+
## Resources for practising Clojure
176+
* [4Clojure](http://www.4clojure.com/)
177+
* [Exorcism](https://exercism.io/)
178+
* [CodeWars](https://www.codewars.com/)
179+
180+
Demonstrate how to use the REPL in [Spacemacs](http://practicalli.github.io/clojure/development-tools/#spacemacs) and [Atom.io with ProtoREPL](http://practicalli.github.io/clojure/development-tools/#atom-protorepl). Demonstrating evaluation of code, structural editing, refactoring, etc.
181+
182+
183+
184+
> #### Hint::Finding your own learning path
185+
> As there are many ways to study, please feel free to carve out your own learning path and share what you found useful if you wish.
186+
> [Learning Clojure section](learning-clojure.md) describes important steps you should take on your journy into Clojure.

0 commit comments

Comments
 (0)