Behavioral product strategist and gamification designer. This is my public hypertext notebook, sharing my thinking in motion at various stages of development.

Home

Direct functions and end-user programming

Just a little anecdote of a small project:

I needed to make a program to resize images in a weird way for GuidedTrackGuidedTrack
GuidedTrack is a simple low-code application that allows you to make surveys, experiments, web applications, online courses, signup forms, and more. Spark Wave built GuidedTrack so that it could build advanced studies and rapidly prototype, and is making the software available more broadly.

Alternative study platforms like Qualtrics and Typeform required so much clicking and dragging that they were tedious and took forever to build. Additionally, it was difficult to package the study itself ...
. Instead of scaling images, I needed to add whitespace to the horizontal margins. As far as I could tell, Clojure didn't have many pre-built libraries for it, so I switched to Racket, where it seemed to have some specific functions out of the box to do what I wanted. I figured a Lisp is a Lisp so it couldn't be that different. I was able to make a function in 6 lines of code that would take an images name and dimensions that would transform it.

Here's the first version of it: image-resizer-first-draft

Here's a version that's a bit more automatic (so I wouldn't need to manually enter the dimensions, just the title): image-resizer-second-draft

The crazy thing to me about this is that the first version was fairly plug and play from finding the right items in the documentation. I'm not saying I would have been able to figure it out without any prior knowledge of Lisp from Clojure, but it didn't take much to get me there. That's 6 lines of code to do something where I could have spent a while searching to try and find a pre-made tool. The end function was so easy to use after it was built that I could have easily told someone else how to use it. It felt like I created my own little command line tool.

End-user programming is an incredibly exciting topic for me, and this gives me faith in Domain-specific languages as end-user softwareDomain-specific languages as end-user software
What I learned from GuidedTrack

Working on GuidedTrack, I have become very interested in this concept of domain-specific languages as applications. GuidedTrack does this interesting thing where the functions are so high level that it's fairly plug and play to make a research study, form, or choose-your-own-adventure story.



You can even write your code in a structured editor that lets you fill out a form to generate your code for you. As you get more familiar with the language, you don't n...
. What if we just give people a bunch of prepackaged, composable functions? What if people look at the REPL as an "app" to use these functions?

From Wade DominicWade Dominic
His twitter
: