Jamon Profile picture
Founder @infinite_red, US-based React Native experts (hire us!) ⚛️ @ReactNativeRdio ⚛️ @ChainReactConf 🥅 Goalie ✝️ Lutheran 👨 Dad x 4
Sep 22 35 tweets 8 min read
Bun wildly simplifies my stack.

I’m rebuilding an internal web app that we’ve had since 2016. So far, I have a grand total of 1 npm runtime dependencies (jwt-token).

Our previous version of this tool, using Next, had 826 (!!!) NPM dependencies.

I also have zero build steps. Just ship the files directly to the server.

I’m using:

- Bun as a JS runtime
- Bun as a package manager
- Bun.serve as a webserver
- Bun’s websocket server for realtime
- TypeScript on server side
- JSDoc on the client side
- REMEMBER: no build steps!
- not even TypeScript in the deps
- HTML via template strings
- CSS
- Hosted on DigitalOcean droplet
- In-memory state (just a JS object)
- JSON file for persistence
- JS’s setInterval for scheduled tasks
- git to deploy
- Cursor to generate and edit code

I’ll talk more about each of these below.Image - Bun as a runtime

Bun replaces Node, of course, and brings a ton of speed as a runtime.

I just install Bun and then run it

bun run ./src/index.ts

This is also how I run it on the server.
Feb 12 12 tweets 4 min read
One time I pulled down a new client’s repo and found this commit from the previous dev
Image OK by popular demand, I found more details.

First -- here's the document . 😅

Secondly, now that I know the client name, I for sure know why this dev got screwed. I have a lot of stories about Don. README-ASSHOLES.md
Image
Jul 15, 2023 9 tweets 4 min read
My experience raising 4 kids, in a thread:

* First years are a lot of physical work, but I can still remember that freshly bathed baby smell as they lay sleeping on my chest. One of my fondest memories and times of my life.

(She’s now 15!) https://t.co/LeCPjJUShH
Image * Elementary years are pretty good. Some running around but we had more time where they were out at school and they also are learning to do more themselves. The introduction of more of a more rigid schedule was a big adjustment, and we had to plan trips more. Image
Apr 15, 2023 15 tweets 3 min read
Want to know how easy it is to grab API keys out of a compiled iPhone app?

Buckle up. 👇 DISCLAIMER: This is for security research only. Responsibly disclose vulnerabilities you find to the relevant developers! I MEAN THIS. Don't be a tool.
Apr 14, 2023 7 tweets 2 min read
I once again am asking mobile devs to not ship their API keys in their app bundles.

(No, compiling it into native code won’t make it any more secure. I could extract it from native code in 5 minutes, and that’s not an exaggeration.)

(No, putting it in react-native-env etc won’t… twitter.com/i/web/status/1… How do you store the API key, then?

Same way you would in a website. Store it server-side, have the app authenticate the user, send them a user-specific token, and then they can use that to ask your server to ask the API something for them.

Only thing exposed is that specific… twitter.com/i/web/status/1…
Aug 11, 2022 28 tweets 8 min read
Leaving aside solutions like React Query, I'll talk a bit more about React state management libraries and why I dislike selectors. I'll take a few popular state management libraries and contrast them to MobX (or MST). So let's do a tiny component that shows Bears, Beets, and Battlestar Galacticas. It'll show the bears and beets, but not the BSGs, so we can measure if the component is rerendering when it shouldn't. Image
Jun 13, 2022 20 tweets 4 min read
As a leader, you’ve probably felt like you had to sometimes pass on minor complaints about a team member to them, keeping the complainer anonymous.

Don’t do this.*

(*Caveat: if it’s harassment-related, sexual or otherwise, follow your internal policy!) For purposes of this thread I’ll say person A is complaining about person B.
Jan 29, 2022 24 tweets 5 min read
A junior dev asked me in DMs what advice I’d give them for their first 30 days on their first coding job. I ran this past a group of other very experienced senior devs and got the thumbs up from them.

Here we go…. 1. Ask questions in public Slack channels, not private DMs.

It’s tempting to just DM questions to a friendly senior dev. It feels safe and not as intimidating. But you will get better advice when you have a number of people looking at the questions and weighing in.
Jan 28, 2022 4 tweets 3 min read
I am *very* last-minute with this announcement, but @Danny_H_W will be joining me on stream to talk about and do some live coding with React Native @storybookjs!! Can’t wait! Starts at 10am PT (in 40 minutes). @Danny_H_W @storybookjs I'll be multistreaming to both Twitch and YouTube (which is what I usually do, so pick your fav).

Jan 27, 2022 5 tweets 3 min read
If you missed my stream with @mazenchami yesterday and are a React Native developer, I would highly recommend you check it out. There's a lot of super juicy content on the challenges and opportunities of localization/internationalization in React Native. @mazenchami Here's the link to the YouTube video:

Jan 27, 2022 5 tweets 1 min read
I complain a lot about Twitter devs who post “junior bait” that isn’t even good advice, just engagement trolling. Some juniors have asked me where they could find solid, useful advice on Twitter. It’s a good question, and I’ve been mulling it over. A friend of mine suggested a hashtag that is curated by senior devs. Something that focuses on real, solid, senior-vetted advice. Not by some junior devrel who wants to inflate their follower counts and hasn’t shipped any real software.
Oct 23, 2021 8 tweets 2 min read
Every time one of these compromises happens, I wonder how many others are going undetected. Especially lessor-known packages.

It appears that macOS wasn’t affected, but who knows. Going to be digging into it more today. From what I can tell, the compromised version only lived from Oct 22 21 14:15 CET to Oct 22 21 18:16 CET.
Aug 5, 2021 5 tweets 1 min read
My approach to open source is this:

1. Be kind, to everyone
2. If you control something (releases, etc) then try to set reasonable expectations and communicate when you can't meet those or recruit others to help you do so 3. For issues/tech support, ask the other person to do a reasonable amount of due diligence. Asking them to create a minimal repro is more than reasonable
Aug 4, 2021 23 tweets 2 min read
I need a warning system for people I follow when I see obvious engagement grift. Like a “three strikes and you’re out” system. I mean, you can find some of those tweets by me back in the day, maybe. But they weren’t formulaic like today. People recognized what works and just go through the playbook now.
Aug 3, 2021 13 tweets 2 min read
We recently did a React Native Windows project. While I'm under NDA and can't say what the app is, I do have some general observations about React Native Windows.

(This is part of our #ReactNativeAllPlatforms push!) This project had to support iOS, Android, and Windows. It primarily was intended to work on small laptops and tablets, although we did end up supporting phones too later on.

It did not have to support web.
Jul 16, 2021 44 tweets 12 min read
Tonight's "coding for fun" task is to figure out why we're running into a bit of a perf problem with MobX-State-Tree and MobX-React-Lite in a specific large data set situation.

I'm first going to try to replicate the conditions in a bare React Native app.

Live-tweet it? First, I'm spinning up a new RN app.

`npx react-native init MSTPerf`

I could have used the TypeScript template project, but decided to add it myself using the instructions here.

reactnative.dev/docs/typescript
Jul 13, 2021 4 tweets 1 min read
Twitter is boring these days. Which is a good thing for my productivity I guess.
Feb 16, 2021 30 tweets 21 min read
@mattlanham @imjakechapman At Infinite Red, we used Redux for several years, and it worked fine. We used redux-saga for side effects and made a few helper libraries to make it better.

1/
@mattlanham @imjakechapman It wasn't quite working for us, so we started looking for something new.



2/
Nov 30, 2020 5 tweets 1 min read
Life is ultimately calmer when one faces their problems head-on instead of avoiding them. You can avoid problems for quite a while, but in my 30s I had to face many of them. They eventually will catch up to you. But don't do hard things alone.

Get a counselor, therapist, doctor, pastor, or life coach (depending on the situation). Or even just a close friend.* Have someone on your side.

(*Don't expect too much from friends. They're friends, not taking the place of trained pros.)
Mar 3, 2020 8 tweets 2 min read
One of the things I’ve noticed about junior-level developers is they tend to optimize for the wrong things.

For example, they will get so nervous about taking too long that they won’t properly test their changes before submitting the PR. This results in a lot more of the reviewer’s time to be spent testing and providing feedback. Which is fine here and there when you’re starting, but if it becomes a pattern, the reviewer can start to become impatient and lose trust.
Jan 6, 2020 15 tweets 4 min read
Last week, I got an email from a new consultancy founder asking some really good questions about running a consultancy. I answered her questions in detail in the email, but I'll also share some of the answers here.

1/
1. How do you manage the drought periods (those periods when no projects come in but you still have to keep the lights on)?

This is one of the toughest parts of having a development shop. Developers are _expensive_. Having them "on the bench" (as we say in this business) is

2/