When coding, I have at least 4 audiences:
1. My team
2. The compiler
3. Me in the future
4. The team in the future (who will lack our current context)
So I:
✅ Break problems into small pieces
✅ Name things clearly
✅ Add comments when necessary to explain *why* I’m doing something.
Please, for the love of all that's holy, just DON'T use Jest in 2024. Uninstall, migrate to something modern. Jest is an excruciating butchery of the platform that proves to fail over and over. Jest is also (unofficially) dead. Please move away. Please.
@shakedko Pretty much. We can’t afford best practices anymore. We need to ship stuff and get value. We spend too much time and money “doing the right thing” and not enough time shipping.
Firing devs (and support positions like product) because you're low on money is like firing the cooks and keeping on the wait staff because they're paid less. If you want to save money, eliminate the waste in your process. Improve how people do their work.
Half of the time when people say they like a language they mean that they like all of the code provided for free by others that they can use to staple an application together quickly in said language.
The arguments are:
1. With mocks, you don’t test your real code, you test your tests instead.
2. Mocks will make the code more difficult to work with, decreasing onboarding and delivery times.
3. Stuff like file writes and DB queries can be perfectly unit tested without mocks.
4. You can refactor your code into smaller pure functions between service calls and test them.
5. You should have proper E2E testing and it’ll test your real runtime dependencies anyway, so there’s no need to mock.
For more details, I can recommend reading “Invert your mocks” by @mattoflambda
https://t.co/gIB058tskz
And “Why mocking is a bad idea” by @kerckhove_ts
https://t.co/55ky50UFF4
I've said this before, but could we all please drop the idea that software development is an Engineering discipline? I just don't see it, and there's a huge amount if dysfunction that stems from that thinking. What we do literally has no overlap with any true engineering discipline. (And no, don't start on straw men like "creativity". If that's a common ground, then dance is an engineering discipline.) What we do involves essentially no mathematical analysis of anything. We are not doing math.
If you're building a system that requires math, then the math is part of the _domain_, not the development process.
e2e tests continue to be underrated. Yes, they are slower to run than unit tests, and usually take longer to write, but a good e2e test lasts forever, no matter how often you change the implementation. It's the only kind of test I want to write anymore. It's worth the extra work.
There has been a recent trend where people see one incident of a slow Vite app and start dismissing the whole bundle-less dev setup as "bad".
Vite is being downloaded over 30M times per month at this point. If the model doesn't work in practice, surely hype alone shouldn't be getting us this many users and this kind of growth.
We've all seen webpack builds that range from reasonably fast to unimaginably slow. We know it heavily depends on the config, plugins, and project peculiars. You can draw very different conclusions about bundling based on how you cherry-pick your data points.
We've also heard many stories about someone tuning a webpack config to make it build significantly faster, and I'm sure we can do that for some of the slow Vite apps out there too.
The bottom line is that we should approach such discourses with nuance. Don't make blanket claims without comprehensive and publicly verifiable data.
Sorry, but if you're implementing the Scrum framework, the odds of you being Agile are next to nothing. Where's the agility in a rigid process used by every team marching in lockstep? Ofc, the Scrum trainers lament that fact, and talk about Scrum Theatre and Faux Agile and how none of that is actually Agile, and how you have to do Scrum *right*, but nobody (including their students) seem to pay much attention to that. SAFe is much much worse. The good news is that I've seen more and more products (not projects) built without Scrum in an agile way.
Should managers attend retrospectives? IMO, If you have so little psychological safety that you want to exclude _anybody_, that's the first and only item for your retro. How can mgmt help solve mgmt-related problems if they don't know about them? IMO, collaboration is always useful, and it's best for everybody who is part of a problem to be present. Agility is impossible if you're at war with your mgmt.
I'd like to congratulate the Pixel 8 and Android 14 teams for creating the first phone/OS combo that was so enragingly bad I returned the entire phone. My previous phone is 5 years old, runs Android 9, and cost ~$250 brand new, yet was a better experience in almost every way.
@SergiiKirianov I learned this from my manager. If you put it on the right side, then your code doesn’t move when you open and close it. It’s better on the right.
Controversial opinion (that is actually obvious) about the move of some JS tools to Rust and/or Golang:
If you just cut out (skip, cache, parallelize, etc) the slow parts, it doesn't much matter how fast you do the fast parts, or what language you do them in.