00:15 - The right way to prompt Claude
33:21—What makes Claude act dumber in your code
01:33:39 - How Anthropic uses Claude every day
02:50:56 - A fix that makes Claude way smarter - This
The 4-hour Anthropic free course replaces about 10 paid engineering courses.
Watch it today, then bookmark it for later.
I'm a senior frontend developer.
I want to give you an idea of the kind of work I do.
A React component I had to create for one of the tasks last week:
(Would you be able to implement it?)
Create a "days slider" with the following requirements:
1. Must have 5 different marks, with an option to easily add more.
2. The marks are for 30 days, 60 days, 120 days, 1 year, and 3 years.
3. Each mark must be equally spaced on the slider, regardless of the difference in actual days between them.
4. The slider should allow the user to select any number of days within the specified range (30 days - 3 years)
5. The steps between each mark on the slider should be consistent (25 steps).
6. The component should be reusable and easily extensible to accommodate more marks.
👇Code in the comments below👇
Database Replication Lag can make your users really angry.
Imagine updating your social media profile with some new shiny details.
But when you press save, you don’t see your updates reflected on the page.
That’s horrible!
Those updates seem to have simply vanished from the face of the Earth.
And for a moment, you feel the frustration of going through all that effort for nothing.
What’s the reason for this mess?
Replication Lag!
While your updates were successful on the leader node, the subsequent view (or the read) request went to a lagging replica.
Here’s what happens (see the illustration for more clarity):
- User A updates the profile on the primary or leader node.
- User A wants to immediately read the contents of the profile. But the request goes to a replica that has not yet received the updates.
- The user sees stale data and feels they have been robbed.
- Eventually, the async replication does its job and the replica gets the updates.
So, how can systems get around this issue?
By providing read-after-write consistency also known as read-your-writes consistency.
Basically, it’s a guarantee that if a user makes some updates, they will always see those updates when they view the information.
This reassures the user that their own input has been saved correctly even though replication might still be happening in the background.
So - how do you implement this guarantee?
There are several ways to implement a read-after-write guarantee:
👉 When reading something that the user has modified, read it from the leader. Otherwise, read it from the follower. This is ideal for cases such as profile information that can only be editable by the owner of the profile.
👉 The client keeps track of the timestamp for the most recent write. The system ensures that the replica serving any reads for that user has the updates until that timestamp.
👉 Monitor the replication lag on followers and prevent queries on any followers or replicas that are more than one or two minutes behind the leader.
👉 Databases (such as DynamoDB) and Object Storage (such as S3) have started providing read-after-write as an option.
===
That’s all for now!
If you enjoyed this post, don’t forget to:
- Destroy the LIKE button so that there is no replication lag
- REPOST so that everyone can implement read-after-write guarantees
- BOOKMARK for future reference
- Follow me for more posts like this.
This is amazing → https://t.co/PgCBx2jqPE
An AI emoji generator, built by @pondorasti using @nextjs, @replicate, and @vercel ▲
100% free & open-source too 🤩
Our resident FE magician @paul_dijou created this absolutely gorgeous animating tooltip for our insights graphs. So good. And nostalgic. Takes me back to my Flash days 🥹.
Introducing the new and improved https://t.co/7lv0YYHLLm
It's a database of 1M+ available one-word domain names for your next startup idea 💡
Fun fact: I found @dubdotsh's name on here 😄
And... we've launched!!! 🚀
Our @fireship_dev course on @supabase is here!
This is he hardest thing I've ever done as a dev, and I'm super proud of the result!
Course: https://t.co/mFfpT3zzSK
The site you'll build: https://t.co/M3sWbp7Dio
Coupon: SUPASHIP for 50% off now!!
Wondering about cmp-first architectures in @angular? Nx core member @FerryColum shares his thoughts in our latest blog post:
→ standalone cmps
→ bootstrapping apps
→ routing & state mgmnt?
..
And in particular, how Nx can help!
https://t.co/W34jkwIsAY
#angular#architecture