This is Wes Bos's JavaScript 30 challenge written in ClojureScript.
I started learning Clojure to improve my functional programming skills and strength/diversify my programming mental model. The idea was that I would learn Clojure, a functional language, and then apply these skills to JavaScript.
This repo contains each of the JavaScript 30 exercises written in ClojureScript with write-ups on the lessons I learned while writing them. In this spirit, I hope others find this repo and can use it on their own journey towards learning Clojure.
Never heard of Clojure? Skeptical? I encourage you to watch ClojureScript for Skeptics which really highlights the story elements that make Clojure a compelling language.
To start working with this project, or even just starting with your own CLJS projects, you need to setup your local machine for ClojureScript development. Here are the things you need locally and links to where you can find guides:
The above are for OSX users. For non-osx, please see setup your development environment.
Each project has it's own README with guides for how to run them. For the most part, they are all run in the same way, but if you run across a poject and the run instructions are different it's because I am demoing other ways to run a vanilla CLJS project.
I recommend Atom or VSCode. By default, these are lightweight editors with strong Clojure language support. For a full write up on the text-editors of Clojure see Clojure Text Editors.
If you're interested in exploring Atom, there is a whole video series for Setting up Atom for Clojure Development
Each repo represents a stand alone project and will contain its own README where you can learn more about it.
- 01-drumkit
- 02-clock
- 03-css-variables
- 04-array-cardio
- 05-flex-panels-image-gallery
- 06-ajax-type-ahead
- 07-array-cardio-2
- 08-html5-canvas
- 09-dev-tool-tricks
- 10-check-multiple-checkboxes
- 11-html5-video-player
- 12-key-sequence-detection
- 13-slide-in-on-scroll
- 14-object-and-arrays
- 15-localstorage-and-event-delegation
- 16-mousemove-text-shadows
- 17-sort-without-articles
- 18-string-times
- 19-unreal-webcam-fun
- 20-native-speech-recognition
- 21-geolocation
- 22-follow-along-links
- 23-speech-synthesis
- 24-sticky-nav
- 25-event-delegation
- 26-stripe-follow-along-dropdown
- 27-click-and-drag-to-scroll
- 28-video-speed-controller-ui
- 29-countdown-clock
- 30-whack-a-mole-game
After re-reading and editing all my responses, here are some high level themes I was able to carve out:
-
Learn to read the Clojure docs
They are opinionated and consistent. Once you learn how they are written, they are an amazing tool.
-
Don't dig too deep too fast
Clojure feels more complex at times then JavaScript. Digging too deep too early leads to information overload. Take it easy.
Please note that I am a developer by trade, so I went into this with a solid understanding of development patterns and languages and most importantly how to learn languages.
If you are new to programming, do not let the above paragraph discourage you. When I wrote this I was, still and likely never will be a programming prodigy. What I do is grind it out and never stop myself from asking questions, no matter how foolish they may seem.
I want to thank wes bos for providing amazing, free content. This is a truly awesome resource that I believe could be used to help developers learn not just JavaScript, but any language that compiles to JS. For example:
and the above list goes on, but the ones I mentioned are the ones that are more interesting to me and likely more well known.
Big thanks to the clj/cljs community which is by far one of the friendliest, most willing and easily accessible communities I have experienced!