Rose Project (April 2017)
About one month ago, I announced The Rose Project, my open source effort to make programming better. If you haven’t read it yet, I suggest you start there. As promised, this is my update one month later.
However, for reasons I will explain below, I decided to put this line of inquiry on hold. Before I move on, I want to note two final insights I had for this project:
- I strongly believe that the most efficient way to continue with this project is by using “Text as the G in GUI” as I refer to it in my last post. This way, you wouldn’t have to waste any time on building the AST’s display or navigator (because you’d just use the Ace text editor) so you could focus all of your efforts on empowering syntactically correct transformations, a nontrivial problem.
Better programming paradigms
Many people are doing interesting things here. As I stated before, I’m most impressed with Paul Chiusano’s vision for Unison. However, it’s not quite at a developed enough stage for me to play with, but that may change soon.
However, there is a steep learning curve to understanding the “everything is a stream” mentality. It takes time to get competent with stream utilities and combinatorics. Also, it is fairly new software so they don’t have as many libraries as you’d hope for. The more I used it, the more I understood how similar it is to Elm, a comparison that Andre makes himself but never made sense to me before.
Like it’s parent language Haskell, Elm boasts zero run-time errors. It accomplishes this with a strong type system that forces you to think though all possible cases in your code. It’s impossible to understate how amazing this is. For example, you can’t only handle the success case of a HTTP request — you have to handle all possible responses. Nor can you only handle the non-null cases — you have to handle all possible values.
On the down side, it’s difficult to install Elm (took me hours) and it has a rapidly changing API, so it’s a little too raw for my tastes. Despite this, McMaster University finds it a great tool for teach children to code.
Languages for further research
- Eve — I really admire the people behind Eve but I haven’t been able to wrap my head around it. I probably need to give it more time.
- Luna — I was pointed to this by Andre Staltz. Seems like it could be exactly what I’m looking for but I was unable to get access with it to play around.
- Lambdu — seems similar to Luna and Unison. Need to do more research here ASAP.
- NoFlo, Project Blocks, and Kite are also at the top of my list.
- Irvin Hwang (who contacted me after he read my last post) shared this list of visual programming langauges that I am hoping to look into soon.
Can we do better than HTML and CSS?
Reading Paul Chisuano’s post about CSS made me wonder if we can create better abstractions than HTML and CSS.
For example, HTML attributes have non-obvious names and values, like
target="_blank" to get a link to open in a new tab.
In CSS, it’s widely accepted that centering things is a total pain. However, shouldn’t layout be easy with the right mathematical abstraction? It feels like a good functional, mathematical, declarative language could solve this problem.
There are two routes to take here:
- Build an abstraction on top of HTML and CSS, a language that compiles to HTML and CSS. This has the advantage of not having to re-build the common HTML and CSS widgets by hand. For example, the input box is a tricky thing to get right.
- Build an abstraction from scratch on top of the HTML5 canvas. This is the route that Jens Monin’s morphic.js library takes. The upside here not having to deal with the finickiness of HTML and CSS, but the downside is rebuilding the entire web frontend UI toolkit from scratch.
One of the first lesson that I teach my computer science students is that “computers are stupid.” A computer will only do what you tell it to, no more or no less. To articulate this, we play the “code your teacher” game, whereby they give me instructions that I try my best to hilariously misunderstand. Through this game, students learn that they have to be incredibly precise to get what they want from computers.
However, does coding have to be like this? What it would look like to rethink precision as the fundamental concept of computer science.
Could computers be “less stupid?” Could computers allow for more ambiguity?
For example, when a computer is given ambiguous command, here are two different tacts it could take:
- It could make its best guess about you’re trying to say and run with it. If the computer picks incorrectly, you could notice that and let the computer know it’s not what you meant.
- It could tell you that it’s confused and give you a chance to clarify what you mean, potentially by giving you a list of options to chose from.
I wonder what work has already been done in this space. If you know of anything, I’d appreciate a note in the comments :)
Not only for beginners
When I tell people about this project, I often get asked “How will your language prepare students for working with ‘real’ programming languages?” I had trouble answering this question until I recently re-read Bret Victor’s Learnable Programming, the landmark article that started me on this path years ago.
In the last section, entitled “These are not training wheels,” he says (ellipses mine):
These design principles were presented in the context of systems for learning, but they apply universally… A frequent question about the sort of techniques presented here is, “How does this scale to real-world programming?” This is a reasonable question, but it’s somewhat like asking how the internal combustion engine will benefit horses. The question assumes the wrong kind of change.
Here is a more useful attitude: Programming has to work like this. Programmers must be able to read the vocabulary, follow the flow, and see the state. Programmers have to create by reacting and create by abstracting. Assume that these are requirements. Given these requirements, how do we redesign programming?
Taking a break
When I started working on these ideas a year ago, I truly believed that a breakthrough was right around the corner. Only after having worked on this project for over 6 months full time did I begin to realize the scope of this undertaking. To be honest, it wasn’t until recently that I understood how many others have been trying to solve the exact same problem — I thought I was charting new territory when I was in fact retracing steps.
For this reason and others related to my other job as co-founder at The Coding Space, I’ve decided to take some time off from this project to focus on other projects, in particular a program for women to learn to code that we’re trying to get off the ground.
I aim to return to this project in my spare time over the month of May and return to it in a fuller capacity in June or July 2017. In the meanwhile, I’d be happy to hear from anyone that’s working on similar projects or has thoughts on my thoughts.