this is still the best guide on Claude Code I've seen that covers basically how you should (and shouldn't) use it. comprehensive, practical, and to-the-point.
https://t.co/1P847kkROo
I'm Boris and I created Claude Code. Lots of people have asked how I use Claude Code, so I wanted to show off my setup a bit.
My setup might be surprisingly vanilla! Claude Code works great out of the box, so I personally don't customize it much. There is no one correct way to use Claude Code: we intentionally build it in a way that you can use it, customize it, and hack it however you like. Each person on the Claude Code team uses it very differently.
So, here goes.
Data structures are hard!
Using the right data structure makes a world of difference.
Take a trivial exercise like detecting if a collection contains duplicates.
I'm sure you can come up with a few ways to find the solution.
A brute force solution would be comparing each element to the remaining elements in the list. This takes O(N^2) time complexity.
But what's the most efficient data structure for a job like this?
The humble HashSet in C# stores only unique values.
You can go through the collection while adding elements to the HashSet.
You've found the solution as soon as you run into a duplicate.
This takes O(N) time complexity and costs a bit of memory.
P.S. If you liked this, consider joining The .NET Weekly - my newsletter with 41,000+ engineers that teaches you how to improve at .NET and software architecture.
Subscribe here → https://t.co/zVBFd2uo25
What's your favorite data structure?
How a book written in 1910 could teach you calculus better than several books of today
[Calculus Made Easy, by Silvanus P. Thompson, 1910: https://t.co/HJDxFqZNJf]
Key Concepts to Understand Database Sharding
Database sharding refers to splitting data across multiple database servers and is commonly used for scaling. However, sharding introduces major operational and infrastructure complexity that should be avoided unless absolutely necessary.
Approaches to postpone sharding
Vertical Scaling: Use more powerful single database servers - more CPUs, memory, storage and I/O bandwidth. Much simpler to manage than sharding while allowing sizable expansion.
SQL Optimization: Tune SQL queries and database schema to maximize performance on a single server. Requires proper indexes, efficient SQL, etc.
Caching: Use in-memory caches like Redis to reduce database load by avoiding hitting it for every common query.
Read Replicas + Load Balancer: Adds horizontal read scaleability without full complexity of sharding. Directs reads across replicas.
These optimization approaches should be exhausted before sharding given the complexity.
Horizontal vs Vertical Sharding
There are two high-level approaches:
Vertical Sharding: Split database into columnar tables or sections vs rows. For example, having one table for names and another table for emails.
Horizontal Sharding: Split database into row partitions distributed evenly across multiple servers.
Some horizontal sharding methods:
1. Range Based: Segment rows based on range values like age groups. Can cause uneven data distribution and hot spots.
2. Directory Based: Use a lookup directory to locate rows. Allows flexibility but single point of failure risk.
3. Hash Based: Apply hash functions to spread rows uniformly across shards. Harder to rebalance.
When sharding, use the simplest approach that meets requirements to minimize complexity. Seek to avoid until necessary.
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/kNfv0DVDdf
6 SECRET REMOTE JOBS YOUR EMPLOYER DOESN'T WANT YOU TO KNOW ABOUT
1. AMAZON REVIEWER
($35 PER HOUR)
• Get $750/month to test products
• Provide a detailed review for each product you got
• Keep everything after you reviewed it
2. AMERICAN EXPRESS VISUAL SPECIALIST
($22 PER HOUR)
• Answer customer questions in a live chat
•No degree or experience needed
•Pay goes up as you go
3. APPLE SOCIAL MEDIA SPECIALIST
($27 PER HOUR)
•Perfect for social media lovers
•Fully remote
•All you need is a laptop or phone
4. YOUTUBE AUTOMATION
(UNLIMITED EARNING LIMIT)
Post viral videos on YouTube
• Get paid through ads
•Never show your face
•Work from anywhere
5. YELP CONTENT MODERATOR
($30 PER HOUR)
•Moderate reviews on Yelp
•Get a bonus for deleting more content
•Fully remote
6. NETFLIX TAGGER
($32 PER HOUR)
•Get paid to watch Netflix
•Tag shows/movies in the right category so people can find them in search
•Fully remote
Bookmark it and Follow @Rana_kamran43 for more content