3 - Project Progress! Solo Support! Humble Hono!
Did you know that the Japanese word for flame is "hono": H-O-N-O? Did you know that Hono is also the name of a pretty neat piece of software? Stick around to learn more.
Ian:Hello, and welcome to the third episode of High Low Piccolo with Ian Steyn, where I share with you a success, a challenge, and something interesting I learned in the past week or so. In this episode, it's or so because we're talking about the past two weeks.
Ian:I am the titular Ian Steyn, a curious guy and computer science student doing a summer co-op at Transistor FM, the company that hosts and distributes this very podcast.
Ian:It's just me this week, but shout out to my friend Noah who is lending me his nice Blue Yeti Blackout mic for the summer. So, hopefully, audio quality will be a little better on this one and in following guest episodes. Okay. Let's jump right in.
Ian:HIGH.
Ian:Huge progress on the coding project. So my high and low are kind of switched. Last time, my low was the wild goose chase of my integration project. This time, my high is all the progress I've made since.
Ian:If you're just joining us, I am working on a little development project, which is creating an integration that will allow us to quickly create tickets in our project management software from our customer support software. Last Friday, I finally got through the setup slog. I fixed and updated my homebrew installation. I used it to install ngrok. I verified my GitHub credentials on my machine and started coding in a Git repo. I installed Node Package Manager (or npm) and Node itself.
Ian:If you don't know what those things are, don't worry. Basically, it's a bunch of stuff that I had to do to set up my workspace, install tools, and start actually coding. And this week, I've had a bunch of time on my hands, and I got a lot of momentum going on this. But the success here is twofold.
Ian:One is that I feel like I'm actually making progress When I have my local server running and ngrok exposes it to a live URL, I can go into Crisp, click a button, and a Shortcut story is created with a link to the Crisp conversation, and it has the customer's account and their email. And then that link, that Shortcut link is posted back into Crisp as a private note. Crisp is our customer support software. Shortcut is our project management software. So there's, like, a tangible version of the project now, of the product now, and that feels good.
Ian:The second part of the high is just the amount of stuff that I'm learning. I finally feel like I am starting to understand REST APIs. I have a solid grip on the architecture of this thing. I feel like I understand why I'm using the tools that I'm using. More on that later.
Ian:I just I love this project because, you know, even though it's very safe for Transistor to give this to me in the sense that it can't directly affect their actual product, I am getting real hands-on experience with so many things that I've seen in job descriptions before that I've heard about in the industry. And there's just a there's a real difference between being able to say, "yeah, I looked at a PowerPoint slide about HTTP methods in my web programming class," and "yeah, I have written out curl commands and JavaScript code to make requests using the right HTTP methods." Like, I've actually done the thing.
Ian:There's a bunch of other stuff that's new to me: writing back-end JavaScript, doing so in the Node ecosystem, keeping secrets safe using dot env environment variables, authenticating incoming requests with HMAC verification, authorizing outgoing requests using the Basic authentication scheme. So these are all concrete technical ways that I'm able to practice my software engineering patterns and architectural thinking. This project is forcing me to think about readability, security, the order of operations and, like, asynchronous programming, minimizing dependencies, and making my test code portable for when I move it to Cloudflare later.
Ian:So, yeah, it's just awesome. I'm learning a lot of stuff.
Ian:LOW.
Ian:I was on my own last week, kind of. I should clarify. My, mentor who was on last episode, Michael, he was off on vacation last week, so I was the main support person during the daytime. I did miss Michael, but this was actually quite fun.
Ian:I had to really dig into some more complex issues from customers that I might have just kind of left for him before. I guided a few customers through onboarding in a more involved way. I definitely had to ask for some more help from the engineering team, I would say.
Ian:But the trickiest thing about this was that I had pretty much no time for other projects. I was only able to release episode two and its bonus clips towards the end of last week even though I had recorded a whole week before. And my original self-set deadline for the integration project was June 4, which we are now past, and there's lots to do still.
Ian:I'm not too upset about that. I mean, I made lots of good progress this week as I just told you. I think just overall, last week was like a good next step up, kind of a next level of challenge for me that I was ready to face both in terms of complexity of tickets and time management. And I came through on the other end of it alive and with lots of happy customers.
Ian:PICCOLO.
Ian:Hono? More like, Ho-yes! I'm sorry, you guys don't have the framework to understand that joke yet.
Ian:Okay. So for my coding project, one of the things I need to be able to do is to receive an incoming request from Crisp, the customer support software. That means I need a server tied to a domain, which executes some code once it receives a request to a particular root on that domain. Eventually, my code will live on a Cloudflare worker which will receive the requests. But right now, using Node as my back-end JavaScript runtime environment.
Ian:I tried to set up a server using Node's built in http package, and I got it to run, but I had a lot of trouble figuring out how to actually do something with a request once I received it. See, I've only started learning JavaScript in the last few years, which means that I'm familiar with the Fetch API for handling requests and responses, which is built into JavaScript these days, and it's an open web standard. So that's, like, a great way to learn about requests and responses.
Ian:But Node has existed since before the Fetch API was a native part of JavaScript. So they have their own way to handle requests and responses. It's pretty complex. It's verbose. My feeling was, I already know how to work with Response and Request - capital R, as in, like, the objects that are part of the Fetch API. Just let me use those.
Ian:Enter Hono.
Ian:Hono is a very small, very fast JavaScript framework for web apps. And besides the obvious benefits of it being very small and very fast, it has two things really going for it that made it perfect for me. One, it's built on web standards. And two, it runs on pretty much any JavaScript runtime.
Ian:So number one, it is super duper easy to set up a route and run a little web server with Hono. For example, if I want to say, "here's what you do when a POST request comes to the root of this domain." All I have to do is initialize my Hono app, write app.post( , and then the string which defines what your route is. In this case, if it's the root of the domain, it's just '/'. And then you attach a function that contains any code that you want to execute when a request comes to that route.
Ian:It uses the JavaScript Fetch API, and there's very little extra abstraction for reading requests and responses with Hono. It feels very familiar. Anything else that is there is there for quality of life.
Ian:And number two, it runs on pretty much any JavaScript runtime, including Bun, Vercel, Deno, AWS. And in fact, it was originally written for Cloudflare workers in particular, which is exactly what I'm gonna be using.
Ian:So in looking for something that felt right to use, something that was familiar but modern, sturdy, not bloated, I actually stumbled into a tool that made my software portable as well. If I had stuck with the pure Node server or used an older Node framework like Express, I would have had a much harder time moving to a Cloudflare worker later, or I would have had to add, like, an additional layer of complexity by enabling a Node layer in Cloudflare. Instead, pretty much everything is portable, even down to how I call my environment variables, which I think is so cool.
Ian:I'm sure there's lots that you can do with Hono that I don't know about. I just think it's a neat little bit of software, and I appreciate what they're doing over there. And I'm proud of myself for choosing what seems like the right tool for the job. Although, I will let you know if it turns out that that is not the case.
Ian:This has been High Low Piccolo with Ian Steyn. Thanks for listening and tune in next time to hear about more interesting stuff that I am learning.