Cyrus Roshan's

Internet Journal

of personal and professional content

2024(2 posts)

Building a Network Stack for our Browser Extension

This probably sounds a bit crazy. Or, you may have forgotten what a network stack is. But before you dismiss the concept of a layered protocol stack inside of a browser extension as ravings by a madman, or a concept too convoluted to bother understanding, let me provide some context. We’ll go over the background info of:
  1. What our browser extension does
  2. What the architecture of a MV2 browser extension looks like
  3. How the components of a browser extension communicate

How do you get a bimodal distribution from a uniform distribution function?

Given a uniformly distributed random-number-generating function, f(), how can you transform it into a function with a bimodal distribution, g()?
caption: A histogram of a normal distribution. Randomly sampled values are evenly weighted across the output range.
A histogram of a normal distribution. Randomly sampled values are evenly weighted across the output range.
caption: A bimodal distribution. Most values (mode) clump in two (bi) heaps, hence "bimodal".
A bimodal distribution. Most values (mode) clump in two (bi) heaps, hence "bimodal".

2023(2 posts)

My first month as an Engineer doing Product Management

Author's note: this stream-of-consciousness journal entry has not been through the editing cycle I try to apply to posts. That said, it's been a useful reference to at least one early-career PM, so I've made it public. I hope you find it helpful. I'm still an engineer, but we're trying out something new at Jam (where I work). For this 6 week engineering sprint, I'll be PM'ing the features we build. This is partly because the sprint has a highly-technical focus (our developer tools), and partly because once earlier, around a year ago, I asked to improve our developer tools. That time, I gave my case for why our devtools should be improved, and asked for just three weeks to clean up the UX to make them look and feel more like native browser devtools. I got six weeks, and the option for Jam to pay Bernat (the designer I worked with at Tandem) to do designs for us for a couple hours—an option I obviously took. That project turned out well, and Jam as a whole has been doing great in the year since. So we're at the point where our devtools yet-again have access to resources to make them even better.

2022(3 posts)

2021(4 posts)

To my teachers

Do you know how some kids want to be teachers when they grow up? Do you know why? I do. When I was in fifth grade, I was shy, short, and quiet. I had skipped two grades, and so I was two years younger than the other students. My parents had moved five times (Vermont, Pennsylvania, Indiana, New Mexico) before we had come back to Texas, and I didn't have a lot of friends. Or, for that matter, experience making them. But in the mornings, before school, every day, I would get dropped off at around 6am by my parents. I would wait with the crossing guard until my teacher came to school, and then go sit with her in the classroom and write in my journal, and do my work, until school started. I still remember her name was Mrs. Hill. In that class, I went from being a very-quiet, very-unsure, very-shy child, to being a mostly-quiet, mostly-unsure, mostly-shy kid. And, as anyone who's been in that situation can tell you, that's actually a lot of improvement. I felt proud when I could shape a spoon out of aluminum foil for our hands-on science demonstration, I felt good about writing, in a way I thought was interesting. And at Camp Tyler, an outdoor school that each 5th grade class in our public school distict visited for a week, I had fun.

Bypassing hotspot limits on iOS

My parents live in a fairly rural area of Texas. There's no cable internet, and fiber is out of the question—they're the target demographic for Starlink. When I was in high school, we used our phone landline for a very-flaky, too-expensive DSL. Nowadays we use hotspots. So if there's no hotspot, there's no internet. And when I flew in this winter to visit, my paid hotspot plan didn't activate on time. So there I was, sitting in quarantine, trying to use my laptop with no internet. But annoyingly, I already had unlimited phone data. I wondered: why can't I use my phone's LTE data to hotspot? As it turns out, it's not that you can't—-it's just that iOS doesn't want you to. Here's how I managed to get a DIY hotspot working on a regular, non-jailbroken iPhone.

2020(4 posts)

The harmful assumptions we make about tasks

Most task managers make two assumptions. Do you make them too?
  1. A task manager needs to remember all of your tasks
    (Would you buy a task manager that lost data?)
  2. All tasks can use a similar creation workflow
    (You hit the 'create issue' button, and fill in some fields. Simple, obvious, how could it be better?)
It's not obvious that they're wrong—-they actually seem useful. But both at work, and at home, making these assumptions will reduce your effectiveness. And if you have trouble context-switching, procrastinate tasks, or have an ever-growing task backlog that looms over your head, these assumptions have likely caused you unnecessary pain.

Why I built the wrong blog publishing workflow

I used to find writing for a public audience to be a taxing process. I wasn't sure why, but I thought it might be because my workflow was bad. To tackle that, I built a small project. I hoped it'd be an end to my writing troubles. This post goes over how I built that project (it is kind of a cool project). But it also goes over why it was the wrong solution.

Misdiagnosing the root issue

To decide what I "needed" to build, I started by comparing workflows: I looked at the way I wanted to write, and contrasted it to the way I did write. My previous workflow had me spend a lot of time in my text editor. Which I thought was bad for writing, because when I'd start writing, I'd try live previewing my blog, and only an hour later realize I was knee deep in minor CSS changes.

2016(3 posts)

Building an electronic banjo out of paper plates

This weekend at HackPrinceton, my teammate Benny Yan and I made a prizewinning electronic banjo. It's not an electric (amplified) banjo. The difference is when you hold down frets and strum strings, the sounds it plays are mp3 files, not amplified string vibrations.
Final software and hardware, side by side
In addition, there are LEDs under the fretboard that light up to show you where to place your fingers (in our demo, we showed chord positions, but I have a few other ideas for it that I think would be cool). We also had a nicely designed UI that you could use to show which strings and frets were being pressed down, as well as selecting chords to view and have displayed on the banjo's fretboard, and a list of songs to go through and show chords and lyrics for in realtime.

A hardware hacker's kit

So you're a beginner to either hackathons or hardware hacking, and you're not sure what to bring? Well, at HackDFW, we've got a pretty solid hardware setup, so you should have everything you need. At hackathons that aren't as focused on hardware though, here's an example list of what to bring. There's also a section on helping you figure out which board to use for a project, and some cool hardware projects to inspire you. You won't need everything on this list; you'll probably use less than a third of it for a single project, and you'll probably have projects that might need something more than what I've listed. It's always good to be prepared, though, and you can't slap on another sensor in a hardware project as easily as you can download and require another library in a software project.

What you'll want:

Basics:

Here are some things that it'd be hard to really make a hardware project without:

2015(2 posts)

Get new indie blog posts in your mailbox, personally written by me