138 karma · joined Dec 30, 2021 (4y ago) · 45 submissions
comment 3y ago · link · parent
Comparing Reddit and Wikipedia is like comparing a motorcycle to a bicycle. They are different, with specific strengths and weaknesses. Both design/engineering paradigms have a place, imo.
comment 3y ago · link · parent
It feels like the "learned helplessness" experiments where researchers randomly shocked animals, who could not stop or do anything about the shocks.
I wonder if we are all traumatized by what we have seen over the years on Reddit, Twitter, etc.
There is an incredible recent song "Oh No" by Wet Leg that captures some of this. Here are the lyrics (sorry about the formatting):
I went home All alone Checked my phone Oh no Oh my God Life is hard Credit card Oh no You're so woke Diet Coke I feel gross Oh no I went home All alone I checked my phone And now I'm inside it
On my phone All alone In the zone Oh no Hours pass Pizza rat I like that Oh no 3 AM I feel Zen Fucking Zen Oh no Suck the life From my eyes It feels nice I'm scrolling, I'm scrolling, ah
If you're going to the party I heard there's gonna be some arty People talking 'bout themselves Or whatever it is that you always talk about, ah
I went home All alone I checked my phone Oh no I went home All alone I checked my phone And now I'm inside it
comment 3y ago · link · parent
If you simply want to feel better and remain functional, I recommend cardio (pick your favorite) plus yoga/stretching/full-body core work. Your goal simply is to feel good, which means (1) most days, stretch thoroughly enough to relieve aches and pains, (2) go for runs to alleviate stress and anxiety. Focusing on feeling good also gets you doing low-effort, high-benefit activities like simply standing up regularly and doing a sun salutation or two.
Or you could do 12 sets of biceps a week and eat 30 grams of protein every three hours.
I will also add: I think the oft-repeated advice about "go do big lifts at gym" is bad for most people. Yes, it makes you stronger. However, those exercises are likely to cause injury at some point if done regularly for decades. They also do not really matter irl, unless you fantasize about deadlifting a car off someone in a moment of crisis or something.
comment 3y ago · link · parent
1. Be clear. Write down your complicated thoughts, then simplify them until anyone could understand them. (Hopefully you already do this with your code!) 2. Learn from the best sources. Warren Buffett has spoken highly of Dale Carnegie's public speaking course. I would start there.
comment 4y ago · link · parent
comment 4y ago · link · parent
- The monorepo tooling I prefer at startup scale (NX) does have a learning curve, but it has been pretty easy to maintain using automation (good linting, good build/test pipeline, etc.). For me, learning and leveraging the right monorepo tooling is way easier than having to enforce consistency across large numbers of repos with a small team or watch a low-tooling monolith decay into tightly-coupled spaghetti. I am also in a particular situation where the need for eventual scale is obvious, will come very quickly (clients are big), and the thought of having to rush a scale-inexperienced team (management and devs!) through a monolith-to-microservice migration on a tightly coupled codebase while meeting SLAs is so unpleasant that it makes me a bit sick to my stomach to think about it.
- The monorepo framework/tooling matters a lot. For instance, NX is small-scale friendly and largely can be overseen by senior Typescript devs. Bazel, on the other hand, requires a hefty context switch and has a very steep learning curve.
- You are right that releasing all services together does not scale past a certain point. My point is that microservice monorepos let you pivot quickly between all-together (monolithic) releases and individual app releases as appropriate for your scale. With good caching and parallel blue/green deployments, adding new services to an all-at-once build/deploy pipeline just uses a bit more compute for the pipeline without meaningfully impacting the pipeline run times.
- Having to release services serially in a certain order obviously indicates something is seriously wrong under the hood.
- You are very right about monorepo tooling/best practices, but I would extend that to any project that eventually will need to scale. Someone has to take ownership and enforce good practices. Spaghetti code can be harder to prevent in a feature-heavy monolith and certainly is harder to deal with for me if it is in many different repos (i.e., several monoliths).
- You can have more than one monorepo for teams that are very different or have specific needs (i.e., different languages, mobile apps, etc.).
- I wish I were in a situation where my team could commit to avoiding breaking API changes, but it just is not so because of aggressive development timelines. (I am sure this will change in the future as we scale.) All-together versioning/releasing helps deal with (planned, intentional) breaking API changes very efficiently, because (as long as you can tolerate a failed API call once in a while as a blue/green deployment switches traffic) you're basically performing the deployment as if it is a monolith.
Add: 1000% agree about db access. That is very easy to enforce at the architecture/team level.
comment 4y ago · link · parent
If you put microservices in a monorepo with a good build tool (like NX), put the common auth/logging/types/dtos/etc. functions in reusable libs, and version/release all the apps together, you get the best of both worlds.
At a small scale, you can deploy your whole containerized stack on two big HA instances (monolithic infrastructure, so much easier). You can leverage common libraries without versioning hell/cross-repo coordination. If you have mediocre developers on the team and very aggressive development timelines, the monorepo structure helps enforce modular organization. If you are a good developer, your workflow gets very, very fast, and you can manage a lot of complexity.
Add: additionally, if you have ever-changing requirements and some are obviously bolt-on one-offs that aren't going anywhere, you can limit damage to the code quality by splitting those features into a separate microservices (making it much easier to safely deprecate/remove them in the future).
comment 4y ago · link · parent
For instance, we have an internal library that helps us create and perform common operations on concurrency-safe maps. Being able to pass and return arbitrary structs to/from those functions has made our codebase much cleaner and easier to work with.
Please take my response with a grain of salt, as we have not benchmarked or otherwise compared (via escape analysis, etc.) those generic functions against any non-generic equivalents.
comment 4y ago · link · parent
comment 4y ago · link · parent
At the same time, I have been using NX for a larger (though not huge) Javascript monorepo. Javascript is my strongest language, so take this with a grain of salt, but at my org's scale I vastly prefer the NX experience over Bazel. I think the reason is that NX feels like an optimized, natural extension of normal Javascript build tooling, while Bazel requires an entirely separate set of knowledge.
comment 4y ago · link · parent
By the way, echoing some discussion above, we migrated from Express to NestJS, and it was an excellent decision.
comment 4y ago · link · parent