Recent Posts
Rust Visibility
Understanding whether or not I should make struct fields public was one of the hardest challenges in learning Rust. With OO languages such as Java and C# the rule is incredibly easy: always make fields private and use getters and setters for access. And when starting with Rust, my immediate impulse was to follow this same rule, but it quickly becomes clear that that simple rule is not right for Rust.
read more
The Painful Experience of Learning
The experience of learning a new language. Around the beginning of the year, I began to teach myself the Rust programming language. While learning Rust, one sensation that I felt to an incredible degree was the sense of being “dumb”. As I wrote code in Rust, the code quality felt poor, my designs felt clumsy, and I felt like I’d lost all my abilities to write code. What bothered me was why?
read more
Zippers 2: Building a Rose Tree Zipper
As a follow up to my post about Zippers for lists and binary trees, I wanted to create a zipper for a slightly more complex data structure. The Rose Tree is a tree structure where the number of branches a node may have is variable. An example of a rose tree would be the directory structure on your computer: each directory may contain 0 or more sub directories which, in turn, may contain addition subdirectories.
read more