I've recently been building web applications with front-end frameworks like React, Reagent, and Angular 2. I was recently working on an Angualr 2 project and thought, "man, this sure seems like a ton of lines of code", but had no concrete evidence to prove it. After a quick google search I came to this stack overflow question, and the awesome answer(s) therein.
Ah git. Git is powerfully ferocious utility for version control of the code for a software project, but you must tame the beastly demon of experience by coming to sumbling blocks, getting through them, and documenting how you did it. So, let's do it...
Yep, this blog post is the result of yet another great discovery by yours truly! After making a few AWS Lambda services that automate Twitter activity I realized that I needed to deploy the same function many times, each as a scheduled event in AWS but with slightly different configurations (such as twitter access keys for the desired account, keywords for posts to like, etc). I wanted to keep the same core codebase of logic for each type of lambda function but somehow deploy multiple versions of it, and I wanted to be able to upload the code in one place and have all the places where it's used be updated without having to deploy to each one individually. Here's how I managed to do it!
I grew up on "Algol" style languages like Java, C++, and ActionScript 3 where one of the first things you learn about is the concept of a class, a blueprint for an object. I guess I'm too young to remember a lisp world without Clojure so at first I was amazed that you could even have a programming language that didn't based its foundational architectural patterns around classes or object use classes! I just today was working on a project and found it refreshingly simple to just write some functions in a namespace so I could require and call them from another file. In this post we'll take a look at how to we import functions in a ClojureScript project using the build tool leiningen without classes or objects.
The shorthand syntax for an anonymous function in Clojure can be a bit confusing (at least it was for me when I first saw it!). In this post I'll go over what it is and show that it's actually not all that scary.
The posts on this site are written and maintained by Jim Lynch. About Jim...