Koans (公案) originate from Zen Buddhism. They are paradoxical riddles or stories which are used to test students on their path to enlightenment. They are designed to provoke thought or doubt in the student's mind. In finding the answer for it, the learning happens.
Transfered to the teaching of programming, a Koans are essentially a simple problem where programmer is asked to “fill in the blanks”.
Often, you are presented with tests and you have to edit the code and sometimes write it all so to get all tests to pass.
Edgecase Ruby Koans were possibly the first ones to introduce the concept.
There is a number of koans ready to be pulled from internet, for pretty much any language.
#!/usr/bin/julia
using Base.Test
x= _
y= _
@testset "Variables Tests" begin
@test x == 4+4
@test "Hello, World"=="H$(y)ld"
end
Run a search for your favorite language and add Koans to your query
-
Clojure
-
ClojureScript
-
C#
-
D
-
Elixir
-
Erlang
-
FSharp
-
Go
- cdarwin/go-koans {go koans}
-
Java and JVM
- Java
- Groovy
- Kotlin
- Kotlin/kotlin-koans {kotlin koans}
- Scala
- rubbish/scala_koans and bsamaripa/scala-koans {scala koans}
- http://www.scalakoans.org/
- sbt/sbt-koan
-
Haskell
-
Javascript an related
- mrdavidlaing/javascript-koans {javascript koans}
- liammclennan/JavaScript-Koans {javascript koans}
- ironhack-labs/lab-es6-javascript-koans {javascript koans}
- arkency/reactjs_koans {react koans}
- bjpbakker/angular-koans
- larrymyers/backbone-koans
- sleepyfox/coffeescript-koans
-
Julia
- lambdaclass/julia-koans {julia koans}
-
Lisp
-
Lua
-
Objective-C
-
Perl
-
Prolog
-
Python
- gregmalcolm/python_koans {python koans}
-
Ruby
- edgecase/ruby_koans {ruby koans}
- http://rubykoans.com/ {ruby koans}
- neo/ruby_koans {ruby koans}
-
Smalltalk
-
relevance/functional-koans and goneflyin/functional-koans {functional koans fsharp clojure python scala haskell}
-
adamwespiser/deep-learning-koans {deep-learning koans julia jupyter-notebook}
Or run a search a search to see the latest updated repos with koans in the title