Skip to content

athensresearch/ClojureFam

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 

ClojureFam

Join us on Discord

“The object of education is to teach us to love what is beautiful.”

— Plato, The Republic

About

ClojureFam is a learning program for those who want to get a taste of Clojure(Script) and DataScript, two of the most powerful and elegant technologies that exist today.

By understanding ClojureScript, a functional, immutable Lisp, and DataScript, a Semantic Web-inspired, set-based graph database, you will not only level up as a developer, you will also understand the ideas and architecture behind networked Tools for Thought like Roam, LogSeq, and Athens.

Learners are assumed to have no Clojure or functional programming experience.

Learners complete the program when they merge code into the Athens codebase, becoming a Contributor and gaining access to Contributor-only channels.

The program consists of 1) curated learning material, 2) social accountability via #learninpublic and peer-to-peer study, 3) and mentorships and office hours with experienced Clojurians.

The program expects 35 days of 1-hour study, or 5 weeks of part-time study (~10 hours per week). We also expect you to genuinely try to work with your group, if you end up forming one.

That said, take whatever you like. If you only want to use the learning material but want to learn solo, that's fine! If you want to use different learning material, but want to share your journey on our Discord, that's great too!

As always, if you have feedback and ideas on how we can improve, please share in our Discord!

Learning Material

TLDR: This issue template.

Long Version
  • Getting Help: Learning a new language can be intimidating. Especially a more avant-garde one like Clojure. But don't worry, you'll always have help!
  • IDE: One thing that you'll have to get used to if you haven't worked with Lisps/Emacs before is structural editing. This is because there are so many parens! If you are unsure which IDE, go with VS Code or Cursive. Your text editor ideally give you hints as you type, and gives you shortcuts to easily pull docs and examples up. Dash is also nice for docs!
    • Popular editors and their plugins:
      • VS Code: Calva
      • Intelli-J: Cursive
      • Emacs: CIDER or Doom Emacs
      • Vim: Fireplace or Conjure
      • Atom: Chlorine
    • See Athens CONTRIBUTING.md for how to set up your REPL for use with the Athens Codebase.
  • REPL: the REPL is your friend! See this video for how REPL-driven programming makes you more productive.
  • Athens Stack Mind Map - what to know and what not to know
  • Books and Tutorials
  • Problems and Exercises
    • 4Clojure problems are broken down by difficulty (Elementary, Easy, Medium and Hard). However, you might find it more useful to complete problems that match what you're reading. For example, if you've just read Chapter 4 of Clojure from the Ground Up (Sequences), give the problems that are tagged "seqs" a shot.
    • Exercism is a good bonus, especially if you can get a mentor to review your code.
  • ClojureScript, Reagent, Re-frame
    • Intro to ClojureScript. ClojureScript is essentially the same as Clojure, with the exception being that your hosted language is JavaScript and not Java. You have access to JavaScript libraries, your ClojureScript code compiles to JS. Because you are no longer using Clojure, you lose threading and concurrency.

    • js->cljs synonyms: Translations from JavaScript

    • Klipse cljs->js converter: JS interop can be tricky sometimes!

    • cljs-devtools: Even though we are compiling from ClojureScript to JavaScript, we can still leverage the awesomeness of Chrome DevTools! (Sorry Firefox people, it doesn't work as well.) You can set breakpoints in ClojureScript from the source tab and jump to code where errors have been thrown, just like in JavaScript! You can also print ClojureScript data structures.

    • Intro to Reagent. Pre-requisite: Atoms, covered by Chapter 6 of Clojure from the Ground Up

    • Reagent Docs. Pre-requisite: Atoms

    • learnreagent.com, learnreframe.com for code comparisons

    • re-frame vs react-redux: re-frame is the frontend framework Athens uses, which overlaps heavily with redux. It's not a pure 1:1 mapping – Re-frame introduces a few new concepts such as fx and cofx – but it's quite close!

      | re-frame     | react-redux        |
      | ------------ | ------------------ |
      | events       | actions/reducer    |
      | db           | store              |
      | subscribe    | mapStateToProps    |
      | dispatch     | mapDispatchToProps |
      | subs         |                    |
      | fx           |                    |
      | cofx         |                    |
      
    • re-frame tutorial by PurelyFunctional.tv – primer on re-frame, hiccup, and reagent

    • re-frame's documentation's about the data loop

    • re-frame examples and re-frame-10x TodoMVC. Clone and actually modify these apps!

    • Real-world projects: conduit, status.im, Blue Genes

    • Build something of your own! Pomodoro timer, calculator, etc. Projects from previous learners: Pomato & Hail-the-wheel.

  • DataScript: DataScript is a database engine for the frontend. It is a port of an actual backend database, Datomic. The query language DataScript and Datomic are written is Datalog. Like SQL, DataLog is a declarative, logical programming language. Unlike SQL, it leverages set-logic, which makes for very flexible queries such as recursive queries and reverse lookups. Similarly, DataScript and Datomic are very flexible engines with flexible schemas. All of this plays into the graph database that Roam/Athens is built off of. Indeed, it may be the secret sauce of this whole thing!
  • Clojure History and Motivation
  • Cheatsheets: Clojure has an extensive core library and many symbols not often found in mainstream languages.
  • Paid Tutorial/Courses
  • Questions: How well do you grok Clojure? That is, do you intuit the design principles and philosophy that Clojure embodies? Some of these questions may even make a Clojure sensei pause and think. Ultimately, there isn't one right answer. And as Socrates taught us, sometimes just sitting with the questions is good enough. 🙂
    • Why are there so many core functions in clojure.core? What affordances does this give the programmer?
    • What is a persistent data structure? What affordances does they give the programmer?
    • Why is concurrency harder in some languages than others?
    • Why is Clojure a Lisp? What affordances do Lisps give to programmers?
    • What affordances does Clojure's REPL give to the programmer?
    • Why is Clojure a hosted language? What affordances does this give the programmer?
    • What is lazy evaluation? What are lazy sequences? Why might laziness be useful?
    • Where do you see the principle of accretion at play in the Clojure world?
  • Bonus Questions
    • Why do Clojurians worship Rich Hickey?
    • Who are your favorite Clojurians?

Social Accountability

MOOCs have a high dropout rate, somewhere between 80-95% (1, 2, 3).

Learning is hard, and even harder without support. But you're in luck! Many people want to learn Clojure too. What's more, Athens has a welcoming, warm community, with Learning and Collaboration as our founding values.

Mentorships and Office Hours

Firstly, the broader Clojure community is extremely approachable. It's part of why we all love the language itself. The Clojurians Slack is one of the best places to get questions answered.

For those questions that go deeper or broader, it can help having synchronous communication. If you and your team have these kinds of questions, or have lots of interrelated questions, use our Discord to organize office hours with a mentor.

Keep in mind that the availability of office hours is largely dependent on mentors, who are all doing this voluntarily. Try to ask them tough questions that can't be easily Googled!

As an aside, previous iterations of ClojureFam had fewer learners and more mentors. What we found is that this isn't scalable for mentors, and learners still dropped out, leaving their teammates alone. This is why we have less dedicated mentors and larger peer groups.

About

Clojure Learning Program

Resources

Stars

Watchers

Forks