samlang is my favorite and most sophisticated side project. It is a functional programming language with an optimizing compiler that targets the X86 instruction set and a language server that can provide type query and autocompletion.
The reality is always harsher than the theory. It takes a significant effort of refactoring to make this happen. In this blog post, I will explain these efforts and some of the tricky design decisions I made along the way.
Almost a year ago, I started to perform developer lead responsibilities at Cornell DTI. My first major task was to grade part of developers at the end of the spring 2019 semester. A few days ago, I just finished grading all developers for their performance in the spring 2020 semester, wrapping up almost a year of work.
I came into the position thinking that developer lead has the easiest issues to deal with. I still believe this statement is true for me. However, I didn't realize that the easiest issues are still issues of a complex system full of Byzantine faults. Easy DevOps issues become exponentially harder to deal with when there is a people factor. Just like software engineering, sometimes it's all about compromises.
Therefore, I decided to write this blog post as both a reflection for myself and as documentation for future leads.
In the year of 2016, a school in Shanghai celebrated its 20th founding anniversary. Beyond this ceremony in December, its high school division students have made record-breaking college admission success: Engineering school admission in Ivy League had finally invalidated the 0 success rate record, and there was a student that made it into Columbia University after several years of hiatus.
However, compared to later years, it was quite an insignificant year, at least to the high school division. A year later, it would celebrate its 10th anniversary since it started the IBDP program. The college admission record in the next year also completely overshined the year of 2016. There were a few miniscale crises, but none of them had caused widespread dissent over a long period. Those small crises tend to be remembered less than a week. Yet, these events started to manifest themselves as symptoms of a larger problem, which might eventually lead to a spontaneous online protest that is beyond the imagination of school administrators.
Let's start with something small.
Implement autocomplete in 79 lines of code. Actually, it's not that easy.
Without the infrastructure discussed in this post, that code snippet mentioned here is useless.
I will walk through my journey to implement autocomplete in this blog post, using my programming language SAMLANG as an example.
I want to clarify that I intend to present the following content as plain facts. I will talk about the facts that certain events happened, and the facts that I thought and reacted to certain events in certain ways. You should treat them as a totally ordered set of boring logs rather than definitive guidance to something.
(To be friendlier to not-so-technical readers, I italicized all the technical jokes that are not essential to understand the story.)
In the last article The Road to Better Engineering, I promised that there will be a new post about my recent website re-architecturing effort. In the past week, I am working to gradually transform the website monorepo into a repository with latest technologies and reliable automation. At the time of writing this article, the transformation is complete and the repository has reached a state that I am mostly satisfied with.
About three years ago, a student club welcomes the largest influx of new members in its entire existence. It is considered as a milestone: it’s a de facto recognition that it’s becoming prominent. By that time, its product covers over 40% of the student base and the club is the place for future software engineers to go. The former president of the club publicly celebrated this, and he was thinking about how the club can continue to move fast without any overhead of bureaucracy.
If you have read my blog post before, you know what had happened. Beneath the promising sign of future prosperity, there were huge risks: the main product already hit the upper bound of the user count; the engineering team was not well-trained by the former president; more importantly, the codebase was in a hell state.
That club is called Computerization and that dumb former president was me.
In the last summer, I developed my first programming language SAMPL. Measured against my technical skills at that time, it was a clear success. I was able to implement an interpreter and a compiler for a self-designed functional programming language with only the knowledge to implement an interpreter for a toy language in Cornell CS 3110. I was particularly proud of the module system and generics in that language.
I won't write a reflection on what I did in 2018 because my resume and GitHub commit history are already self-evident. In the first part of this post, I will list some amazing things I created in 2018 for the purpose of summary, because some of the blog posts are long and I know you want to a TLDR version. I will then talk about some short-term plans that I hope to check off before my winter holiday ends.