Clojure Workflow in VS Code, coding FizzBuzz

Published: 02 July 2021
on channel: CalvaTV
4,898
128

The workflow to develop a program in Clojure is special in that you let the program ”grow” by building a piece, testing it, fixing it, adding it, build a new piece, test it, fix it, add it, and so on and so forth, piece by tested and fixed piece. And you do it using the Clojure REPL hooked in to the editor so you can test that your pieces do what you want them to do without leaving the file where these pieces reside in the program you are building.

In this video I try to demonstrate this workflow using the simple and familiar problem, FizzBuzz. No Clojure knowledge required.

If you like the t-shirt, check https://calva.io/merch out 😍

Even if the video is more about workflow than about implementation, I do try to explain a bit about some particular constructs I use. A friend noted down this time-line:

00:00 Introduction
03:45 Calva: Start a standalone REPL (not in a project)
04:56 Rich comments
05:35 mod function
06:31 range function
06:44 def special form
07:00 map function
07:04 fn special form
07:56 = function
08:42 Start defining multiple-of? function
08:54 defn macro
09:14 partial function
09:50 zero? function
11:41 Feedback from clj-kondo
12:03 Start defining fizz-buzz function
12:46 First refinement of fizz-buzz function
13:44 Second refinement of fizz-buzz function
14:09 cond macro
14:34 Convention of using :else in cond
15:18 Third refinement of fizz-buzz function
15:39 Fourth refinement of fizz-buzz function
15:45 * function
16:06 Migrating some bits out of comment
17:17 Using condp
22:20 Using multimethods
22:48 defmulti macro
24:14 juxt function
26:55 defmethod macro

Calva is an easy to use Clojure and ClojureScript IDE for Visual Studio Code.

https://calva.io/
https://github.com/BetterThanTomorrow...
https://marketplace.visualstudio.com/...


On this page of the site you can watch the video online Clojure Workflow in VS Code, coding FizzBuzz with a duration of hours minute second in good quality, which was uploaded by the user CalvaTV 02 July 2021, share the link with friends and acquaintances, this video has already been watched 4,898 times on youtube and it was liked by 128 viewers. Enjoy your viewing!