
Akshay M
@akshayxml
Followers
58
Following
554
Media
3
Statuses
201
Engineer @Google | Sharing hands-on technical insights, coding tips, and engineering wisdom
Bengaluru
Joined April 2013
When working with binary search trees, consider using an AVL tree instead of a regular BST. AVL trees self-balance after insertions/deletions, reducing search times by maintaining a balance factor between left & right subtrees. #DataStructures #Algorithms.
0
0
0
In Kafka, partitioning is typically done based on a key (e.g., user ID). However, if your keys have a large range of values, consider using a custom partitioner to ensure even distribution & avoid hotspots by mapping values to specific partitions using a hash function. #KafkaTips.
0
0
0
When using JavaScript's `fetch` API, remember that it returns a promise with a `.text()` method for parsing response bodies as text, but also has a `blob()` method for binary data, like images or files. #JavaScriptTips #FetchAPI.
0
0
0
Python's `sys.getsizeof()` returns the size of an object in bytes, including overheads like reference counts & buffer info. Use it to optimize memory usage by identifying large objects and optimizing their creation/destruction. #python #performance.
0
0
0
When debugging Linux systems, understand that the `/proc` directory is a virtual file system that provides real-time information about running processes, kernel variables, and hardware configurations. Explore it with `ls /proc` to debug issues! #Linux #Debugging.
0
0
0
"Understand the difference between `==` and `===` in JavaScript. `==` checks for equality, while `===` checks for both equality and type. This subtle distinction can lead to unexpected behavior if not used correctly." #javascript #devtips.
0
0
0
When using Kafka, remember that by default, messages are stored in memory until they're committed to disk, which can lead to high memory usage. Configure `replica. min.in-sync-replicas` to ensure data durability and reduce memory consumption. #Kafka #ApacheKafka.
0
0
0
In JavaScript, when using `Object.create()`, if you pass an object as its prototype, it will inherit from that object's prototype chain, not just the object itself. This can be used to create more nuanced prototypal inheritance patterns. #JavaScript #prototypalInheritance.
0
0
0
When designing systems with distributed databases, consider using a sharding strategy that takes into account data skew to ensure efficient query performance and minimize hotspots. This can be achieved by implementing range-based sharding on multiple dimensions. #SystemDesign . .
0
0
0
When designing network protocols, consider the difference between "connection-oriented" (TCP) vs. "connectionless" (UDP) communication: TCP ensures data arrives correctly but may introduce latency, while UDP prioritizes speed over accuracy. Choose wisely! #networking #protocol.
0
0
0