
software engineer @bloomberg | cs + engineering
London, UK
Joined August 2017
- Tweets5.9K
- Following720
- Followers6.1K
- Likes10.8K
i think before you shard you have to consider your use cases: “what operations should be possible without leaving a shard?” and “what are the most important queries and access patterns?”
related data that is frequently accessed or modified together should ideally be on the same shard. for instance, if an application is heavily centered around user relationships, you could use user_id as the shard/partition key so that data belonging to a particular user is on the same shard/partition.
if the application still has use cases that require querying data across multiple shards, one approach is to just denormalize the data.
Replying to @TayCode
And on sharding, this is another place Mongo makes sense.
Sharding relational data is not just “split the rows across servers”. You now have to worry about foreign keys, constraints, migrations, joins and transactions across shards.
What happens when data on shard B points to data on shard A? What if a new shard misses a migration? What if related data gets split across shards?
With Mongo, the data is usually self-contained documents. Pick a good shard key, keep related data together, and you remove a lot of that cross-shard headache entirely.
That’s a much cleaner model for data you already know will need to scale horizontally.
you can’t build where there’s no market fit
Uber has left Nigeria.
The drivers are still here.
The cars are still here.
The passengers are still here.
What left is the app connecting them.
So, why can’t some smart Nigerian entrepreneurs build another platform and take over the market?
The infrastructure is already here. The market is already here.
Good business opportunity!
this is why skilled programmers will always be in demand.
Google researcher @lauriewired warns the shift from C++ to Python in universities is creating programmers who don't understand how computers actually work:
"When I was in college getting my CS degree, my year was one of the last years that was using C++ as the core language for teaching students. Actually they were switching over to Python of all languages."
"One of the biggest issues that I have is that a lot of these higher level languages are really abstracting away what is happening under the hood. If you're not aware of how the computers work in general, then you're gonna have problems when it comes to debugging."
"Starting with a language like C++ gives you the ability to do these really high level abstractions, but it also gives you the ability to customize your memory management and get really close to the underlying machine. Especially if you're trying to work in high performance computing, game development, or high frequency trading."
"At C++ conferences, there's almost this fundamental anger response when it comes to mentioning something like C or C++. People start complaining about the complexity of it."
@Google




















