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.
@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 One of our devs found MobX and MobX-State-Tree. MobX was a little too free-form for us, but MST fit the bill -- it had little boilerplate and also came with MobX-React which gave superior performance on state changes.
3/
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.)
Build your conflict resolution skills! So many of my problems came about because I didn't know how to resolve conflicts effectively.
I see this in my friends. They suffer for weeks because they don't want to have one hard conversation. Or make commitments they can't keep.
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.
Luckily, this isn’t too hard to fix.
Create a “PR checklist” that you use for each PR and check off the various things.
[ ] Works on Edge
[ ] Works in different screen sizes
[ ] Includes tests
[ ] Includes documentation
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/
...super difficult and can set you back months. Missing one week isn't just replaced by one week. If you have a 20% profit, that means every week missed is 4 weeks to make up the 80% cost, using each week's 20% profit.
3/