For a while now, I’ve been intrigued by ast-grep, “a fast and polyglot tool for code structural search, lint, rewriting at large scale”. Specifically, I’m interested in how ast-grep may be used to do rewrites of code with its awareness of the abstract syntax tree (AST). I’m happy to share that I was finally able to make my first good use of the tool, and it was as cool as I thought in my head!
Backstory We use Sentry to monitor our application for crashes and thrown exceptions. There was one error that stood out: UnhandledRejection: Non-Error promise rejection captured with value: undefined. We would get dozens of the error per day, yet we didn’t receive complaints about the application breaking in a similar frequency from our users at all. Regardless, it was still important to fix as the rate of this error appearing ate up our Sentry limits quickly, which might cause us to miss a more important error.
I chose Electron to create an invoicing app for my partner because I wanted to store customer data locally so that I didn’t have to worry about doing authentication to protect the data when trying to access it over the internet. Initially, I used Tauri because I’m keen to become more proficient with the Rust programming language. With Tauri, I could easily use my current favoured frontend technology Svelte (more specifically using SvelteKit) as they provide simple setup instructions for using the two together.

i18n CSV <-> JSON

- 6 mins read
I recently worked with the internationalisation library i18next to add multiple language support to an app. In the process, I found myself needing to convert data between two different formats: JSON key-value pairs used by i18next to match keys to their respective translations. Spreadsheet data with matching translations to their english counterparts (essentially CSV). Example JSON data: { "foo": "Translated Foo", "bar": { "baz": "Translated Baz" } } Corresponding example CSV data:
Finding my passion for software engineering late (in this case meaning a few years after college) meant that my first real taste of a programming language was with JavaScript. I went through a career transition like many others with a bootcamp, which focused on teaching us skills that could be immediately applied to real jobs, i.e. JavaScript (also React, but it really is just part of JavaScript). However, I wasn’t satisfied with what I was learning; I wanted more; I wanted to learn what goes on in the layers below that have been abstracted away from us.

Teleterm Chat Part 1

- 11 mins read

Series: Teleterm Chat

The first thing I learnt from this project has nothing to do with software. It’s that asking the right questions can make a huge difference to how I feel and how I approach the problem at hand. I eventually landed on figuring out how to call C code from Rust as the first problem to solve. Asking better questions Having no experience creating command-line applications, I was at a loss for where to start.

Teleterm Chat - Part 0

- 3 mins read

Series: Teleterm Chat

I want to build a terminal application for myself to solve a use case that I have. (I’m also using this use-case as an excuse for me to learn and write more Rust!) However, instead of just building it, I want to try something new. Going with my theme for 2024, I want to try writing about my process of building the app as well. More creating, so I’ll code AND write!
At the end of 2023, I left the company that first kickstarted my journey as a software engineer due to my disagreements with the company’s culture. I learnt plenty from my first stint, picking up skills and technologies far beyond what my bootcamp and personal learnings had taught. Docker, microservices, Expo, and React Native were some of the additional technologies that I picked up within the first month just to be able to make useful contributions to my team.

Theme for 2024

- 2 mins read
More less; less more. That is my theme for 2024. For the past few years in my life, I have been focusing on more of everything. More learning; more reading; more coding; more working; more consuming; more creating; more knowledge gathering. This is in large part due to my current position in life. I recently switched careers to be a software engineer, and while I love it, I also realised how far behind I was compared to my peers, especially those who have been developing software since they were young.
Introduction Setting up a debugger was not easy or straightforward for me. Nothing works out of the box as compared to common IDEs, such as VS Code, so there was plenty of learning needed to get me to my current point. I wrote this piece in hopes that it might help someone else understand a little bit more about debuggers through trying to set one up for their own Neovim configurations too.