akshayxml Profile Banner
Akshay M Profile
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
Don't wanna be here? Send us removal request.
@akshayxml
Akshay M
2 days
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
@akshayxml
Akshay M
3 days
In C++, when using `std::vector` with custom types, ensure that your type implements both copy constructor and assignment operator correctly to avoid unexpected behavior during vector operations.
0
0
0
@akshayxml
Akshay M
3 days
Redis's `SUBSCRIBE` command uses pub/sub model for message broadcasting, but it also provides an optional `PSUBSCRIBE` command that allows subscribing to patterns, allowing for more flexible filtering of published messages.
0
0
0
@akshayxml
Akshay M
4 days
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
@akshayxml
Akshay M
4 days
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
@akshayxml
Akshay M
5 days
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
@akshayxml
Akshay M
5 days
C++: When using `std::vector` with custom types, ensure your type implements `operator==` correctly, as it's used by `std::vector` to check for equality when inserting or erasing elements.
0
0
0
@akshayxml
Akshay M
6 days
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
@akshayxml
Akshay M
6 days
Redis' Redis Lua scripting engine allows for atomic multi-key operations through transactions. This enables complex data manipulation without locking individual keys, improving performance & concurrency.
0
0
0
@akshayxml
Akshay M
7 days
"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
@akshayxml
Akshay M
8 days
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
@akshayxml
Akshay M
8 days
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
@akshayxml
Akshay M
8 days
Python's `functools.reduce()` can be used to perform an operation on each item in an iterable, returning a single result. It's often faster than using a loop with recursion!.
0
0
0
@akshayxml
Akshay M
9 days
Kubernetes' `DownwardAPI` allows pods to access pod-level information (e.g., node name, namespace) as environment variables, making it easier to write portable & flexible containerized apps.
0
0
0
@akshayxml
Akshay M
9 days
When using Docker Compose, always specify `build:.` when building an image from a directory containing a `Dockerfile`, otherwise it will default to searching for a `Dockerfile` at the root of your project.
0
0
0
@akshayxml
Akshay M
10 days
When using Kubernetes, be aware that by default, pods are only restarted if their container exits with a non-zero exit code. If your container crashes due to an error but still returns 0 (e.g., due to a segmentation fault), it won't trigger a restart.
0
0
1
@akshayxml
Akshay M
11 days
Java's `System.arraycopy()` method can be used to copy arrays of primitive types (ints, doubles, etc.) more efficiently than using a loop, with a time complexity of O(n) vs O(n^2).
0
0
0
@akshayxml
Akshay M
11 days
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
@akshayxml
Akshay M
12 days
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
@akshayxml
Akshay M
12 days
In Go, the `sync.WaitGroup` type allows you to wait for multiple goroutines to finish executing by calling its `Add` method with the number of goroutines to be waited for, then use `Wait` to block until all goroutines have completed and `Done` to signal completion.
0
0
0