<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Divyamjha  on Medium]]></title>
        <description><![CDATA[Stories by Divyamjha  on Medium]]></description>
        <link>https://medium.com/@divyamjha.70055594?source=rss-4fccf7d4dedf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v5ElcmyLXVeerLI-T1sFNg.jpeg</url>
            <title>Stories by Divyamjha  on Medium</title>
            <link>https://medium.com/@divyamjha.70055594?source=rss-4fccf7d4dedf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:25:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@divyamjha.70055594/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Untrusted Code on Kubernetes: What Nobody Tells You About Isolation]]></title>
            <link>https://medium.com/@divyamjha.70055594/running-untrusted-code-on-kubernetes-what-nobody-tells-you-about-isolation-5c1320d3e76a?source=rss-4fccf7d4dedf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c1320d3e76a</guid>
            <category><![CDATA[replit]]></category>
            <category><![CDATA[kubenetes]]></category>
            <category><![CDATA[isolation-code-execution]]></category>
            <dc:creator><![CDATA[Divyamjha ]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 11:06:12 GMT</pubDate>
            <atom:updated>2026-07-20T11:06:12.431Z</atom:updated>
            <content:encoded><![CDATA[<p>Spent a whole day understanding and building the architecture for a cloud based coding editor (similar to replit or codeSandbox).</p><p>Started with a simple approach (which is my attempt 0) that users can connect to a remote machine on cloud and so when users let say wants a Nodejs enviroment, so the machine simply copy the pre-written node code template from S3 (or any storage services) and also with a Pseudo terminal running and streaming logs in real time with a ws connection.</p><p>But this approach have many scaling and security issues.</p><ul><li>Without per-user isolation they share a kernel, a filesystem, and a process table.</li><li><strong>Port collisions.</strong> Two users both run app.listen(3000). Second one crashes. You&#39;d need per-user port allocation plus a routing table, which is a worse version of what the session router does.</li><li><strong>No resource limits.</strong> One while(true), one fork bomb, one malloc loop and every other user on that machine is frozen. Nothing in the design stops it. This is what cgroups are for, and you don&#39;t get them without a container or VM boundary.</li><li><strong>users can even access the S3</strong> because the machine that you are giving access to the user have the s3 credentials.</li><li>Any many more….</li></ul><p>My first diagram was wrong in almost every interesting way. Sharing the corrections, because most K8s tutorials teach you the stateless web app model and this is not that.</p><h3>The naive version</h3><p>Here’s what I drew first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxPIydkbjuaBqqu5ri_LcQ.png" /></figure><p>One node. Two pods, each running a pseudo-terminal. A Service in front of each. An ingress controller doing wildcard subdomain routing. S3 for persistence, wired directly to the pods.</p><p>It looks reasonable. It even works — for one user, on your laptop.</p><p>Then you ask the questions that matter.</p><h3>Problem 1: A pod is not a sandbox</h3><p>This is the big one, and it’s the thing every “build your own Replit” tutorial skips.</p><p>Containers are not virtual machines. A container is a process with a fancy hat: namespaces to make it think it has its own filesystem and network, and cgroups to cap how much CPU and memory it can eat. Underneath that hat, it is calling into <strong>the same kernel as every other pod on that node</strong>, including the kubelet, including your control plane components if you were careless about scheduling.</p><p>That kernel exposes roughly 350 syscalls. Every one of them is attack surface. Historically, container escapes have come from exactly this: a kernel bug reachable from inside the namespace, and suddenly the “isolated” process is reading files on the host.</p><p>When you’re running your own code, this is a theoretical risk. When you’re running <em>arbitrary code that anonymous users paste in</em>, it is the threat model. The user is not a bug — the user is the adversary, by design.</p><p>So the first correction to the diagram is not visible in the diagram at all. It’s the runtime.</p><p><strong>Options, roughly in order of paranoia:</strong></p><ul><li><strong>runc + hardening.</strong> Default runtime, plus seccomp profiles, AppArmor/SELinux, drop all capabilities, runAsNonRoot, read-only root filesystem, no privilege escalation. This is the floor, not the ceiling. You are still one kernel CVE away from a bad afternoon.</li><li><strong>gVisor (runsc).</strong> Intercepts syscalls in a userspace kernel written in Go. The guest never talks to the host kernel directly for most operations. Costs you some syscall-heavy performance; buys you an enormous reduction in surface.</li><li><strong>Kata Containers / Firecracker.</strong> Each pod gets an actual lightweight VM with its own kernel. Hardware-enforced boundary. Startup measured in low hundreds of milliseconds rather than tens. This is what most commercial code-execution platforms converge on.</li></ul><p>Pick based on how much you’d like to keep your job. But pick <em>something</em>. “It’s in a container” is not an isolation story.</p><p><strong>And put them on their own nodes.</strong> Taint a node pool for untrusted workloads, tolerate the taint only from sandbox pods, and keep system components off it entirely. If an escape does happen, you want the blast radius to be a node full of other people’s toy projects — not your session router.</p><h3>Problem 2: Services load-balance, and sessions hate that</h3><p>Look at my first diagram again. Ingress → Service → Pod.</p><p>A Kubernetes Service is a load balancer. Its entire purpose is to spread traffic across identical, interchangeable replicas. That is a beautiful abstraction for a stateless API.</p><p>A user’s dev sandbox is the opposite of that. It has a filesystem they just modified. It has a running process they started. It has an open WebSocket carrying their terminal. It is the least interchangeable thing in your system.</p><p>If two requests from the same user land on two different pods, the user sees their files randomly time-travel. Session affinity via sessionAffinity: ClientIP is not a fix either — it&#39;s per-Service, it&#39;s coarse, and it breaks the moment users share a NAT or move between networks.</p><p>The realization: <strong>you don’t want load balancing. You want addressing.</strong> Every sandbox needs a stable, resolvable identity, and requests need to be routed to <em>that specific pod</em>, deterministically.</p><h3>Problem 3: Wildcard ingress can’t do this alone</h3><p>My first instinct was *.repl.it on the ingress controller. But an ingress controller matches host rules against a static ruleset synced from the API server. Sandboxes are created and destroyed constantly — you&#39;d be writing an Ingress object per sandbox and waiting for a reload on every single one. Your control plane will not thank you, and neither will your users watching a spinner.</p><p>So the second diagram adds a component that the first one had no concept of:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*6kUsLZR3YmZAHvHVqbynqg.png" /></figure><p>The <strong>session router</strong> is a small stateful proxy. It reads the subdomain (or a session cookie, or a JWT claim), looks up the mapping in Redis, and proxies — HTTP and WebSocket — straight to the pod’s address.</p><p>Redis holds the source of truth: pod1 → 10.4.2.17:8080, with a TTL. Sandbox scheduler writes on creation, deletes on teardown, refreshes on heartbeat. Lookups are sub-millisecond and the ingress layer stays completely static.</p><p>A few things this buys you that are easy to miss:</p><ul><li><strong>Authorization at the router.</strong> Before proxying a single byte, you can check that this user actually owns this sandbox. In the naive design, anyone who guesses a subdomain gets a terminal.</li><li><strong>Cold starts.</strong> If the lookup misses, the router can trigger a cold start and hold the connection while the pod boots, instead of returning a 404.</li><li><strong>Graceful eviction.</strong> Idle sandbox reaped? The mapping is gone, the next request rehydrates from S3. Your idle cost goes to roughly zero, which for this business model is the whole ballgame.</li></ul><h3>Problem 4: Never give the sandbox the credentials</h3><p>In my first diagram there’s an arrow from each pod directly to S3. This is the mistake I’m least proud of, because it’s the most obvious one in retrospect.</p><p>That arrow means credentials — an access key, an IRSA-assumed role, something — live inside a process that is running code written by an adversary. They will read your environment variables. They will read the mounted token. They will hit the instance metadata endpoint. This is not exotic; it is the first thing anyone tries.</p><p>The second diagram introduces a <strong>storage broker</strong>. Sandboxes hold no credentials at all. They talk to the broker over the cluster network, the broker authenticates the request against the sandbox’s identity, and it decides — per request — whether this sandbox may touch this prefix. Snapshots on write, hydration on cold start, all mediated.</p><p>The general principle, which generalizes well beyond storage: <strong>the sandbox should be able to make requests, never to hold authority.</strong> Every capability it needs goes through a broker that can say no.</p><p>While we’re here: also disable the ServiceAccount token mount (automountServiceAccountToken: false). A sandbox that can talk to the Kubernetes API is not a sandbox, it&#39;s a shell on your cluster.</p><h3>Problem 5: The network is wide open by default</h3><p>Kubernetes’ default networking model is that every pod can reach every other pod. For untrusted workloads this is indefensible.</p><p>You want a default-deny NetworkPolicy on the sandbox namespace, then allow exactly:</p><ul><li>ingress from the session router,</li><li>egress to the storage broker,</li><li>egress to DNS,</li><li>egress to the public internet, if you must, but <strong>explicitly blocking link-local (169.254.169.254) and all internal RFC1918 ranges.</strong></li></ul><p>That metadata endpoint block matters more than it looks. It is the single most reliable way an escaped workload turns a container into cloud credentials.</p><p>And if you let users run npm install, you&#39;ve handed them arbitrary outbound network access with a friendly face on it. Egress proxy with an allowlist, or accept that your platform will be used to scan the internet.</p><h3>Problem 6: Resource limits are a security control, not a tuning knob</h3><p>A pod with no memory limit will OOM the node. A pod with no CPU limit will starve its neighbours. A fork bomb with no PID limit takes down the kubelet. None of this needs an exploit — it needs a bored user and thirty seconds.</p><p>Set requests <em>and</em> limits on CPU and memory. Set pids_limit. Set ephemeral-storage limits, or someone fills the node&#39;s disk with zeros and takes out every sandbox scheduled there. Cap the number of sandboxes per node so a single node failure doesn&#39;t take out a large fraction of active sessions.</p><p>Noisy-neighbour problems and denial-of-service attacks are the same problem wearing different clothes. Solve them once, at the resource layer.</p><h3><strong>The corrected architecture:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tbjUKS7q3RcuXhzP9l5Ww.png" /></figure><p>Same boxes as before, mostly. But three things changed that don’t show up as boxes:</p><ol><li>The runtime boundary got real.</li><li>Routing became addressing instead of load balancing.</li><li>Authority moved out of the sandbox and behind a broker.</li></ol><h3>What nobody tells you</h3><p><strong>The isolation problem is not solved by Kubernetes.</strong> Kubernetes schedules and networks things. It has no opinion about whether the thing it scheduled is trying to eat the host. That’s the container runtime’s job, and the default runtime’s answer is “sort of, if the kernel is having a good day.”</p><p><strong>Statefulness is the real architectural pressure.</strong> Every clean Kubernetes pattern — replicas, load balancing, treat pods as cattle — assumes interchangeability. Sandboxes are the most pet-like workload there is. Half the design work is building an addressing layer that Kubernetes deliberately doesn’t give you.</p><p><strong>Credentials are the actual attack surface, not the kernel.</strong> Kernel escapes are rare and require real skill. Reading /proc/self/environ requires none. Most real incidents in this space are boring credential leaks, not exotic CVEs.</p><p><strong>Cost is a design constraint, not an afterthought.</strong> Idle sandboxes are the entire margin. Session-map-plus-broker isn’t just cleaner security — it’s what makes aggressive reaping and cold-start-from-S3 possible. Architecture and unit economics are the same conversation here.</p><p>The gap between diagram one and diagram two isn’t more components. It’s the moment you stop asking “how do I run this code?” and start asking “what happens when this code is trying to hurt me?”</p><p>Everything else follows from that.</p><p>&gt; Building something similar? I’d be curious how you handled cold starts — that’s the piece I’m still not happy with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c1320d3e76a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You don’t manage memory.
You manage references.]]></title>
            <link>https://medium.com/@divyamjha.70055594/you-dont-manage-memory-you-manage-references-1f89312f2cfc?source=rss-4fccf7d4dedf------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f89312f2cfc</guid>
            <category><![CDATA[computer-storage-devices]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-memories]]></category>
            <category><![CDATA[brain]]></category>
            <dc:creator><![CDATA[Divyamjha ]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 19:09:00 GMT</pubDate>
            <atom:updated>2026-06-16T19:09:00.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*3qlb2ymNqbJHJl0yyvNy-g.png" /></figure><p>As an engineer you rarely touch a byte directly. You create objects, pass them around, and let them go. Almost every memory problem you’ll actually hit — leaks, dangling references, OutOfMemoryErrors, GC pauses, data races — collapses to one question: who is still holding a reference to this object, and when does it die? This walks the working model top to bottom.</p><h3>The two regions you reason about</h3><p>The OS hands every process its own private, flat virtual address space. You can think of all of it as one giant array of bytes — but you only ever reason about two parts of it: the stack and the heap.</p><h4>Stack</h4><p>Automatic lifetime. One per thread. Each function call pushes a frame holding its parameters, local variables, and return address; the frame is destroyed the instant the call returns. Allocation is just moving a pointer, so it’s effectively free. You never free it — scope does.</p><h4>Heap</h4><p>Dynamic lifetime. Shared across threads. Lives independently of any single function call, so it’s where you put anything that must outlive the scope that created it, or whose size isn’t known up front. Something has to decide when it dies — you, or a garbage collector.</p><p>The split exists because these are two different lifetime questions. If a value’s life matches the call that made it, the stack handles it automatically and cheaply. If its life is open-ended — returned, stored in a field, shared between threads — it has to go on the heap, and now lifetime becomes a real decision instead of an automatic one. That decision is where the rest of this page lives.</p><h3>What goes where</h3><p>This is language-dependent, and the rule most people half-remember for Java is worth stating exactly: local variables live on the stack; objects live on the heap; a local that “holds an object” actually holds a reference (on the stack) to the object (on the heap). A primitive local like int n sits directly in the frame. A Point p sits in the frame too — but it’s a reference, and the Point itself is on the heap.</p><h3>References: the indirection at the center</h3><p>A reference (or pointer) is just <em>where the object lives</em> — a handle, not the thing itself. Most surprising bugs in day-to-day code come from forgetting that you’re copying handles, not contents.</p><h3>Value semantics vs reference semantics</h3><p>When you assign or pass a reference, you copy the handle. Both variables now name the same object — they’re <em>aliases</em>. Mutate through one and the other sees it, because there was only ever one object.</p><pre>Point p = new Point(1, 2);<br>Point q = p;        // copies the reference, not the Point<br>q.x = 99;             // p.x is now 99 too — same object</pre><p>This is the entire reason “I changed my copy and the original changed” happens. There was no copy. If you want an independent object you have to clone it explicitly. Value types (primitives, and record/value semantics) sidestep this because assigning them copies the contents.</p><h3>Pass-by-value, settled</h3><p>Java is always pass-by-value — there is no pass-by-reference. The confusion is that for an object, the value being passed <em>is a reference</em>. So a method can mutate the object its argument points at (visible to the caller), but reassigning the parameter to a new object does nothing to the caller’s variable. Both facts follow from one rule: the reference was copied.</p><h3>null — the billion-dollar mistake</h3><p>A reference that points at nothing is null (address zero, conceptually). Dereferencing it is the NullPointerException you’ve met a thousand times. Tony Hoare, who introduced the null reference in 1965, later called it his “billion-dollar mistake.” Modern answers: Optional&lt;T&gt; to make absence explicit in the type, Kotlin’s nullable ? types, and static null analysis. The fix is always the same idea — make “might be absent” visible instead of lurking.</p><h3>Identity vs equality</h3><p>Because a reference is an address, == on objects asks “same object?” (identity), while .equals() asks “same value?” (equality). The canonical trap is strings: literals are interned into a shared pool so == can accidentally work, but two strings built at runtime are different objects and == returns false even when the text matches. Compare value with .equals(); reserve == for identity and primitives.</p><p>classic bug</p><p>Unintended aliasing. You store a passed-in list in a field, the caller keeps mutating their copy, and your object silently changes underneath you. Defensive copying on the way in (and out) cuts the alias. Immutability removes the question entirely — you can share an immutable object freely because nobody can change it.</p><h3>Lifetime &amp; who frees it</h3><p>Heap memory has to be reclaimed, or you run out. The three strategies for deciding <em>when</em> are the main thing that separates one language’s memory story from another’s.</p><h4>Manual — C, C++</h4><p>You decide. malloc/free, new/delete. Maximum control and no runtime overhead, but every allocation is a promise to free exactly once, at the right time. Break the promise and you get leaks, double-frees, or use-after-free. C++ tames this with RAII and smart pointers (unique_ptr, shared_ptr) that tie freeing to scope.</p><h4>Automatic — Java, Go, C#, JS, Python</h4><p>The runtime decides. You allocate; a garbage collector reclaims whatever is no longer reachable. You stop thinking about freeing — and trade it for GC pauses, memory overhead, and less control over exactly when reclamation happens. The dominant model in application code today.</p><h4>Ownership — Rust</h4><p>The compiler decides, at compile time. Every value has one owner; when the owner goes out of scope the value is freed — no GC, no manual free. Borrowing and lifetimes let the compiler prove there are no dangling references or data races before the program runs. Memory safety without a runtime collector.</p><p>Notice these aren’t ranked — they’re different points on a control-vs-safety-vs-overhead triangle. Manual gives control and pays in bugs. GC gives safety and pays in pauses and footprint. Ownership gives both but pays in a stricter language you have to satisfy. Knowing which one you’re standing on tells you which bugs are even possible.</p><h3>Garbage collection, concretely</h3><p>Since you live in a GC language most of the time, it’s worth knowing how it actually decides what to keep. The whole thing rests on one definition.</p><h3>Reachability is the only rule</h3><p>An object is live if it can be reached by following references from a <em>GC root</em> — the things the program can definitely still touch: local variables on every thread’s stack, static fields, and references held by native code. Anything not reachable from a root is garbage, no matter how many other objects point to it. That last clause matters: a clump of objects all referencing each other but unreachable from any root is still collectable. Tracing GC handles cycles for free, which naive reference-counting does not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wNK9oR7CdvW5vA8jkWVicQ.png" /></figure><h3>How collectors do the work</h3><ul><li>Mark–sweep. Walk the graph from the roots marking everything reachable, then sweep the rest into the free list. Simple, but leaves the heap fragmented.</li><li>Mark–compact. Mark, then slide survivors together to one end. Defragments, but moving objects costs more.</li><li>Copying. Split the space in two; copy live objects to the empty half and flip. Allocation becomes a pointer bump and dead objects cost nothing to reclaim — you just abandon the old half.</li></ul><h3>Why generations make this cheap</h3><p>The generational hypothesis: most objects die very young. Collectors exploit it by splitting the heap into a small <em>young generation</em> (a request scope’s worth of short-lived garbage) and a larger <em>old generation</em>. New objects are born in the young gen’s Eden space; a fast, frequent minor GC copies the few survivors into a survivor space, and objects that keep surviving are eventually <em>promoted</em> to the old gen. Because most young objects are already dead by collection time, minor GC is cheap. The expensive major/full GC over the old gen runs far less often.</p><h3>The JVM memory map</h3><h4>Heap (young + old)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fF1VLeA9zCnnV2tYkJCFQ.png" /></figure><h3>The collectors you’ll meet</h3><p>G1 is the default since Java 9 — region-based, balances throughput and pause time. ZGC and Shenandoah are concurrent, low-pause collectors that keep pauses to a millisecond or less even on very large heaps by doing most work alongside your threads. The phrase that matters is <em>stop-the-world</em>: a pause where application threads are frozen so the collector can work safely. It’s why GC shows up in your tail latency — average request time looks fine while the 99th percentile spikes on a collection.</p><p>the other model</p><p>Reference counting (CPython, Swift) frees an object the moment its count hits zero — prompt and predictable, no separate collector pass. Its weakness is exactly the cycle that tracing GC shrugs off: two objects referencing each other never reach zero. Those languages add a cycle detector, or ask you to break the loop with a weak reference that doesn’t keep its target alive.</p><p>0x0040</p><h3>The bugs, by failure mode</h3><p>Each memory strategy makes a specific family of bugs possible. Knowing the catalogue means recognizing the symptom fast.</p><h3>Leaks in a garbage-collected language</h3><p>Yes, they happen — GC only frees the <em>unreachable</em>, so a leak is an object you forgot you’re still referencing. The heap grows, GC runs harder for less return, and eventually you OOM. The usual culprits are worth memorizing because they’re nearly always one of these:</p><ul><li>A static collection that only ever grows — added to, never cleared. The reference from a static field is a permanent root.</li><li>An unbounded cache — a Map used as a cache with no eviction. Use a real cache with a size bound, or soft/weak-valued entries.</li><li>A listener or callback never unregistered — the observable keeps a strong reference to the observer for the observer’s whole intended-but-not-actual lifetime.</li><li>ThreadLocal on a pooled thread — the thread outlives the request, so the thread-local value is retained indefinitely unless you remove it.</li><li>ClassLoader leaks — one lingering reference into old classes pins an entire classloader and everything it loaded; the Metaspace footprint climbs across redeploys.</li></ul><h3>Reading an OutOfMemoryError</h3><p>The message tells you which pool died, and they want different fixes. Java heap space means objects, not the JVM — find what’s retained (heap dump). Metaspace points at class/classloader growth. GC overhead limit exceeded means the collector is running almost constantly while reclaiming almost nothing — a heap that’s full of live objects, i.e. effectively a leak. Direct buffer memory is off-heap (NIO) exhaustion. Each one narrows the search before you open a single tool.</p><h3>The manual-memory family</h3><h4>Dangling pointer / use-after-free</h4><p>You freed the memory but kept a pointer and read or wrote it. The slot may already hold something else — silent corruption or a crash.</p><h4>Double free</h4><p>Freeing the same block twice corrupts the allocator’s bookkeeping. Often crashes far from the real cause.</p><h4>Uninitialized read</h4><p>Reading memory before writing it yields whatever was there — nondeterministic behavior that changes run to run.</p><h4>Leak</h4><p>Allocated, never freed, reference lost. The C/C++ leak: no GC to catch your forgetfulness.</p><h3>Overflows — where memory meets security</h3><p>A buffer overflow writes past the end of a buffer into adjacent memory. On the stack, the adjacent memory can include a function’s saved return address — overwrite it and you redirect execution, the basis of classic stack-smashing exploits. This is why memory-unsafe languages are a security category unto themselves, and why managed languages that bounds-check array access are immune to this whole class. The defenses you’ll see named — stack canaries, ASLR, NX/DEP, bounds checking — all exist to make this attack harder or impossible. Stack overflow is the benign cousin: unbounded recursion or a huge stack frame runs the thread’s stack into its guard page.</p><p>0x0050</p><h3>Concurrency &amp; the memory model</h3><p>The moment two threads share mutable memory, your intuition about “what value is in this variable” stops being reliable. This is the hardest part of memory for working engineers, and it’s pure software.</p><h3>Visibility and reordering</h3><p>A write made by one thread is not automatically visible to another, and operations don’t necessarily run in the order you wrote them — the platform is free to reorder and cache writes as long as the result still looks correct <em>to the thread doing them</em>. So one thread can set a flag and another spin forever never seeing it: not a bug in your logic, a consequence of the runtime doing exactly what it’s permitted to. Shared mutable state is the problem; everything below is a tool for taming it.</p><h3>What the Java Memory Model gives you</h3><p>The JMM defines happens-before: an ordering guarantee that, when established, means one thread’s writes are visible to another. You establish it with:</p><ul><li>synchronized — mutual exclusion plus a happens-before edge between unlock and the next lock. The all-purpose answer.</li><li>volatile — guarantees visibility and prevents reordering of that field, but <em>not</em> compound atomicity: count++ on a volatile is still read-modify-write and still races.</li><li>Atomics &amp; CAS — AtomicInteger, AtomicReference, VarHandle give lock-free atomic updates via compare-and-swap, the building block under most concurrent data structures.</li><li>final fields — safely published once the constructor finishes, so other threads always see fully-initialized immutable objects.</li></ul><p>distinction that matters</p><p>A data race (unsynchronized concurrent access, at least one a write) is undefined behavior — the JMM gives you no guarantees at all. A race condition is a logic bug where correctness depends on timing even if every access is synchronized. You can fix a data race with synchronization and still have a race condition. “Works on my machine” is the signature of both: the timing window that triggers them is narrow and machine-dependent.</p><p>The most reliable escape from all of it is to not share mutable state. Immutable objects need no synchronization because there’s nothing to race on, which is why immutability keeps reappearing as the answer — first for aliasing, now for concurrency. Confine mutable state to one thread, or make the shared parts immutable, and most of this category disappears.</p><p>0x0060</p><h3>The cost of objects</h3><p>You don’t normally count bytes, but a few object-level costs decide real things — which collection you reach for, whether you’re quietly allocating inside a loop, and when it’s worth managing memory through an API instead of leaving it to the heap.</p><h3>Objects aren’t free</h3><p>A heap object is more than the fields you put in it: every one carries runtime bookkeeping on top of your data, and every one is a separate unit of allocation and a separate thing the garbage collector has to trace. A handful of large objects is cheap; a structure built from millions of tiny ones pays that overhead millions of times and hands the collector millions of objects to walk. On a hot path the instinct that follows is to hold fewer, larger objects rather than vast clouds of small ones.</p><p>The same instinct settles the perennial ArrayList-vs-LinkedList question: an ArrayList is a single backing array, while a LinkedList allocates a separate node object for <em>every</em> element and makes you walk a reference per step. Its textbook O(1) insert almost never earns back that cost in real code. Default to ArrayList.</p><p>the boxing trap</p><p>int is a bare value; Integer is a full heap object you allocate and then reach through a reference. A List&lt;Integer&gt; of a million numbers is a million objects where an int[] is one array — far larger and slower. Autoboxing hides this in plain-looking source: a single Integer key lookup, or an accumulator you declared Long inside a loop, can allocate on every iteration. In hot paths, reach for primitive arrays and the primitive-specialized streams.</p><h3>Stepping outside the heap</h3><p>Sometimes you deliberately take memory into your own hands through an API. Direct byte buffers (ByteBuffer.allocateDirect) hold their bytes off the Java heap, so they add nothing to GC pressure and can skip a copy on I/O — the trade is a looser lifetime, since they’re reclaimed by a cleaner rather than promptly. Memory-mapped files (MappedByteBuffer from a FileChannel) make a file’s contents appear as a buffer you read and write directly, with no explicit read/write calls — the standard tool for very large datasets, zero-copy transfer, and sharing data between processes. It’s where SDK and transport code tends to end up once copying starts to dominate.</p><p>0x0070</p><h3>Managing memory in practic</h3><p>The working-engineer toolkit: sizing, diagnosing, and the handful of patterns that actually move the needle.</p><h3>Diagnosing a memory problem</h3><ul><li>Capture a heap dump — jcmd &lt;pid&gt; GC.heap_dump or jmap, automatically on OOM with -XX:+HeapDumpOnOutOfMemoryError.</li><li>Analyze it in Eclipse MAT or VisualVM. The two numbers that matter are <em>retained size</em> (how much memory frees if this object goes) and the <em>dominator tree</em> (what’s holding everything alive). A leak is whatever sits at the top retaining far more than it should.</li><li>Read GC logs (-Xlog:gc*) to separate “allocating too fast” from “retaining too much” — frequent minor GCs with a rising old gen is the leak signature.</li><li>Profile allocation with async-profiler to find the hot path manufacturing garbage, which is usually a cheaper fix than tuning the collector.</li></ul><h3>Patterns that pay off</h3><h4>Bounded caches</h4><p>Never use a plain growing Map as a cache. Use size/time eviction, or soft/weak references so the GC can reclaim entries under pressure.</p><h4>try-with-resources</h4><p>Tie native and external resources (files, sockets, off-heap buffers) to scope via AutoCloseable. Finalizers are deprecated; use the Cleaner API when you need a safety net.</p><h4>Scope tightly, null deliberately</h4><p>The shortest-lived reference is the cheapest. Let references fall out of scope; in long-lived holders, clear entries you’re done with so they stop being roots.</p><h4>Pool with skepticism</h4><p>Object pooling fights a modern GC that’s already great at short-lived objects, and adds its own bugs. Worth it for genuinely expensive resources (threads, connections), rarely for plain objects.</p><p>rules of thumb</p><p>Allocate less in hot paths before tuning the GC. Prefer immutability — it removes aliasing and concurrency bugs at once. Watch anything unbounded; that’s where leaks and OOMs come from. Close native resources explicitly. And don’t fight the garbage collector prematurely: profile first, because the bottleneck is rarely where you’d guess.</p><p>0x0080</p><h3>One object’s life, end to end</h3><p>Every thread of this page is one lifecycle. Here’s a single object walking it.</p><p>You write new Order(…). The object is allocated in Eden, and a reference to it sits in a local variable on your thread’s stack — that reference is a GC root, so the object is reachable, so it’s live. The method returns the order and you stash it in a field of a longer-lived service; the local goes away, but the field is now the thing keeping it reachable. A minor GC fires while the order is still in use: it survives, gets copied to a survivor space, and after surviving a few more it’s promoted to the old generation, where collection is rarer. Eventually the request finishes and you overwrite or clear that field. Now <em>nothing reachable from any root points at the order.</em> It is, by the only definition that matters, garbage — and on the next collection of the old gen it’s swept away and its space reused, without you ever having written a line to free it.</p><p>That’s the whole model in one arc. You never managed the memory. You held a reference, and then you let it go — and the runtime did the rest the instant nobody was holding on anymore.</p><p>0x0090 · END</p><p>A working engineer’s model of memory — stack and heap, references and reachability, the JVM’s pools, the bugs each strategy makes possible, and the concurrency rules that govern shared state. The hardware underneath is real, but this is the layer you build on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f89312f2cfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a Working Java SDK for Paladin Before Applying for the Mentorship — Here’s What I Learned]]></title>
            <link>https://medium.com/@divyamjha.70055594/i-built-a-working-java-sdk-for-paladin-before-applying-for-the-mentorship-heres-what-i-learned-d04cd9de657c?source=rss-4fccf7d4dedf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d04cd9de657c</guid>
            <dc:creator><![CDATA[Divyamjha ]]></dc:creator>
            <pubDate>Sat, 09 May 2026 01:54:26 GMT</pubDate>
            <atom:updated>2026-05-09T05:19:15.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5_d1uBQynqYfxIZGHUgHg.png" /></figure><p>Most open-source mentorship applications say the same thing: <em>“I’m interested in this project and I think I can do it.”</em></p><p>I wanted to say something different.</p><p>So instead of writing a cover letter, I spent two weeks building a working proof-of-concept Java SDK for <a href="https://www.paladinprivacy.org/">Paladin</a> — an LFDT-incubating privacy layer for EVM blockchains — and verified it end-to-end against a live devnet. This is the story of what I built, why I built it that way, and the four real bugs I only discovered because I ran it against an actual node.</p><p>The repo is live at <a href="https://github.com/divyam-jha123/paladin-java-sdk">https://github.com/divyam-jha123/paladin-java-sdk</a></p><h3>What Paladin Is (and Why a Java SDK Matters)</h3><p>Paladin is a programmable privacy solution for EVM blockchains. It lets you deploy and interact with private tokens and EVM-compatible smart contracts — think confidential atomic swaps, private token transfers, and composable on-chain privacy.</p><p>It already ships SDKs for Go and TypeScript. But Java has one of the largest enterprise developer communities on the planet, and a huge portion of the financial infrastructure that Paladin is designed for runs on Java. There’s no idiomatic way to build a Java application on top of Paladin today.</p><p><a href="https://github.com/LF-Decentralized-Trust-Mentorships/mentorship-program/issues/64">LFDT Mentorship #64</a> — mentored by Matthew Whitehead and Anna McAllister at Kaleido — exists to fix that. The deliverable: a production-quality Java SDK, published to Maven Central, with a repeatable release process and high test coverage.</p><p>Rather than apply with ambitions, I applied with a working codebase.</p><h3>The Core Discipline: Derive Everything from What Already Exists</h3><p>The rule I set for myself before writing a single line of Java: <strong>the SDK is traceable back to Paladin’s existing source, not invented from assumptions.</strong></p><p>This meant spending an evening reading three files thoroughly before touching any code:</p><ul><li><a href="https://github.com/LFDT-Paladin/paladin/blob/main/sdk/typescript/src/paladin.ts">sdk/typescript/src/paladin.ts</a> — the existing TypeScript SDK, ~1,300 lines, one file. Every method name, every parameter shape.</li><li><a href="https://github.com/LFDT-Paladin/paladin/tree/main/sdk/typescript/src/interfaces">sdk/typescript/src/interfaces/</a> — the wire types: ITransactionInput, ITransactionReceipt, IPrivacyGroupInput, IQuery.</li><li><a href="https://github.com/LFDT-Paladin/paladin/blob/main/sdk/typescript/src/websocket.ts">sdk/typescript/src/websocket.ts</a> — the WebSocket subscription protocol: ptx_subscribe / ptx_ack / reconnect logic.</li></ul><p>A few facts about Paladin’s protocol that shape everything:</p><ul><li>It’s <strong>JSON-RPC 2.0 over HTTP</strong>, not REST. Every call POSTs a {jsonrpc, id, method, params} envelope to a single endpoint.</li><li>Authentication is <strong>HTTP Basic</strong>, not Bearer tokens.</li><li>Event streams use a separate <strong>WebSocket</strong> protocol with a subscribe → notify → ack handshake.</li><li>“Tokens” map to three privacy domains — Noto, Zeto, and Pente — each with domain-specific ABIs.</li></ul><p>By the end of that evening I had nine RPC namespaces and ~80 methods to port: ptx_*, pgroup_*, keymgr_*, pstate_*, bidx_*, reg_*, transport_*, domain_*, debug_*.</p><h3>Architecture: The Decisions That Actually Mattered</h3><p>Here’s the high-level shape of what I built:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJJpDNrZxJRIKfAU2X9g7A.png" /></figure><p><strong>JsonRpcTransport is an interface, not a concrete class.</strong> This single decision has two payoffs: tests can swap in a MockWebServer-backed transport without touching module code, and the seam lets you plug in batched, retrying, or queued transports later without rewriting modules. The abstraction belongs there because modules should not know how the wire works.</p><p><strong>Records for response types, builders for inputs.</strong> Java records (TransactionReceipt, PrivacyGroup, Schema) are immutable data shapes written in one line each. But TransactionInput has eleven optional fields — a constructor with eleven parameters is unreadable, so those get a builder. The split is by role: things you <em>read</em> use records, things you <em>write</em> use builders.</p><p><strong>The JDK’s own HTTP client, nothing else.</strong> java.net.http.HttpClient (Java 11+) handles HTTP/2 and WebSocket natively. Adding OkHttp or Apache HttpClient would ship megabytes of extra classes for no functional gain. The only place OkHttp appears is in MockWebServer for tests — testImplementation scope, never reaching downstream consumers.</p><p><strong>The WebSocket client required the most care.</strong> Paladin’s subscribe-notify-ack protocol sounds simple: connect, send ptx_subscribe, receive a subscription ID, server pushes batches, client must ptx_ack each one or the stream stalls. But the Java WebSocket.Listener API uses explicit back-pressure (webSocket.request(1) after each message), and auto-reconnect needs to re-issue subscriptions while forgetting the old IDs. The solution: two ConcurrentHashMaps — one for pending subscribe requests keyed by JSON-RPC ID, one mapping server-assigned subscription IDs to client-friendly names.</p><p>All 16 unit tests pass. But unit tests would not have been enough.</p><h3>The Pivot Moment: Running Against a Real Paladin Node</h3><p>A Java SDK that only ever talks to MockWebServer is an elaborate way of asserting against your own assumptions. To submit this application with confidence, I needed to drive it against an actual Paladin devnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATxTzGfuC535wMVKXqGuAA.png" /></figure><p>Three Helm charts. A Kind cluster with eighteen port mappings (three Paladin nodes × six ports each). cert-manager. Three Besu nodes for the underlying chain. Three Paladin nodes. An operator. Contract bootstrap — Noto, Pente, and Zeto factories deploying on first boot.</p><p>After roughly three minutes of ContainerCreating, everything settled into Running and kubectl get scd showed all 30+ system contracts at Status: Success.</p><p>I ran the SDK example against <a href="http://localhost:31548.">http://localhost:31548.</a></p><p>It crashed instantly.</p><h3>Bug 1: Hex-String Block Height</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UfYzqeS-2IWLScilKi7bBw.png" /></figure><p>bidx_getConfirmedBlockHeight returns &quot;0x14&quot; — a hex string — not a JSON number. My SDK had it typed as Long.</p><p>Why does this happen? Ethereum-adjacent JSON often uses hex strings to side-step the 53-bit JSON integer limit. Block heights, gas values, and token amounts all use hex. But receipt fields right next to them (blockNumber: 18, sequence: 34) come back as plain JSON numbers. There is no consistent rule — you find out empirically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHVMY0CbwENZtwrpgNnz7A.png" /></figure><p>A test against MockWebServer would never have caught this. I&#39;d have written the mock to return 42, my SDK would have parsed 42, and I&#39;d have shipped a broken SDK with a fully green test suite.</p><h3>Bug 2: Unknown JSON Properties</h3><p>I re-ran. Further this time. Crashed on the second call:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8JV1Rs0J71EccOuNd4jE2g.png" /></figure><p>The first run had created a server-side receipt listener. The second run looked it up via ptx_getReceiptListener — and Paladin&#39;s response includes a created timestamp field I hadn&#39;t modeled.</p><p>The instinct is to add a created field to the record. The right fix is bigger:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eybUBx8lMG3ZS-Cakwgt0A.png" /></figure><p>Paladin is actively developed. Any field the team adds tomorrow should not break the SDK today. Lenient parsing is the correct default for a <em>client</em> talking to an evolving server. I made it global on the default ObjectMapper.</p><p>The principle: <strong>forward compatibility is a default, not a feature.</strong></p><h3>Bug 3: The WebSocket Port</h3><p>After fixing deserialization, all HTTP RPCs worked end-to-end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hfx6WKPJNq1ABBNE4p-4Gw.png" /></figure><p>But the WebSocket subscription went into a reconnect loop. The example was deriving the WebSocket URL like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*evakWFeZg8yuO5RUi6qfFA.png" /></figure><p>That’s the HTTP RPC port. Paladin’s WebSocket endpoint lives on a <em>different</em> port — 31549 — per the Kind configuration. Once I pointed it at the correct port, the upgrade handshake completed and ptx_subscribe returned its subscription ID on the first try.</p><p>Documentation doesn’t always mention per-protocol port splits. Reading the actual Kind config does.</p><h3>Bug 4: The Demo Wasn’t Reproducible</h3><p>Strictly speaking this is a demo design problem, not an SDK bug. But it would have torpedoed the application screenshot.</p><p>The example’s behavior depended on prior state. The first run replayed the full chain history as receipt batches. The Nth run printed “no batch within 15s” because the server-side listener had already been drained and acked. Two completely different outputs from the same command.</p><p>The fix is delete-and-recreate the listener at startup:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*y0BKbwJ635fvfZ_W1Kwphg.png" /></figure><p>Now every run replays from sequence 0. Every run produces the same shape of output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTzm5su4RnE1nowwkPMT8w.png" /></figure><p>Those 34 receipts are the chain’s contract-bootstrap history — Noto factory, Pente factory, Zeto factory, all the verifier circuits. Real receipts from a real chain through a real subscribe → push → ack loop.</p><h3>Four Takeaways Worth Carrying Forward</h3><p><strong>Mocks pretend the wire format is what you said it is.</strong> Every bug above was a wire-format detail I couldn’t have known from the spec alone: hex strings disguised as numbers, extra response fields, WebSocket on a different port. The only honest test for an SDK is driving it against the real server.</p><p><strong>Read the source, not just the docs.</strong> Paladin’s documentation is good. But the canonical truth is the existing SDK code — that’s what’s actually tested against the server in production. Every method name, type, and default in this Java SDK traces back to a specific line in paladin.ts or pldclient/.</p><p><strong>Forward compatibility is a default, not a feature.</strong> One line — FAIL_ON_UNKNOWN_PROPERTIES = false on the ObjectMapper — prevents a whole class of breakage every time the server adds a field. Client libraries for evolving servers should be lenient parsers from day one.</p><p><strong>The SDK doesn’t end at the API surface.</strong> GitHub Actions CI, Maven Central publish config (Sonatype Central Portal, GPG signing, version-driven release.yml), JaCoCo coverage, sources/javadoc jars — these are table stakes for a production SDK, not stretch goals. The mentorship deliverable explicitly calls out a <em>&quot;repeatable release process integrated with the current release pipeline&quot;</em>, and that work is already scaffolded in the repo.</p><h3>What’s Deliberately Not Done Yet</h3><p>I want the mentors to know I’ve thought about these, not that I’ve missed them:</p><p><strong>Pente / Noto / Zeto domain helpers.</strong> The TypeScript SDK ships high-level wrappers like noto.deploy(...) in domains/noto.ts. The Java SDK has all the transport and types to build them — each domain is roughly 200–500 lines of pure composition over the existing modules. This is the highest-impact first milestone of the actual mentorship.</p><p><strong>BigNumberish types.</strong> Some transaction fields accept either hex strings or plain numbers. Currently I pass them through as JsonNode. Proper typing needs a custom Jackson deserializer — straightforward but real work.</p><p><strong>Maven Central publish hasn’t actually run.</strong> The workflow is wired, GPG signing is configured, the Sonatype Central Portal repo URL is correct — but no real artifacts have been published yet. That requires a project PGP key and a Sonatype account.</p><p><strong>No retry policy on transient HTTP errors.</strong> A 503 throws immediately today. A Failsafe-based retry layer is additive and non-breaking.</p><h3>Proposed Mentorship Roadmap</h3><p>In priority order:</p><ol><li><strong>Pente / Noto / Zeto domain helpers</strong> — biggest user-facing win, zero new infrastructure. Pure composition over existing modules, mirroring paladin/sdk/typescript/src/domains/.</li><li><strong>Integration tests in CI</strong> — promote what the QuickStart example does today into JUnit-driven E2E tests with a Kind cluster inside the GitHub Actions workflow.</li><li><strong>First Maven Central release</strong> — Sonatype Central Portal account, project PGP key, trigger release.yml so consumers can write implementation &#39;io.lfdt.paladin:paladin-sdk-java:0.1.0&#39;.</li><li><strong>Upstream PR into </strong><strong>paladin/sdk/java/</strong> — adapt build.gradle to participate in Paladin&#39;s root build the way sdk/typescript/build.gradle does, then open the PR.</li></ol><h3>Closing Thought</h3><p>The mentorship application page says candidates should demonstrate relevant skills. I think the most relevant skill for building a client library isn’t knowing Java well — it’s the discipline to read the source before writing a line, run the code against the real server before calling it done, and treat every mock-passing test as a hypothesis until the wire confirms it.</p><p>The Java SDK POC is at <a href="https://github.com/btwshivam/sdk-java">github.com/btwshivam/sdk-java</a>. The existing SDKs it ports from are at <a href="https://github.com/LFDT-Paladin/paladin/tree/main/sdk">LFDT-Paladin/paladin</a>. The mentorship issue is <a href="https://github.com/LF-Decentralized-Trust-Mentorships/mentorship-program/issues/64">#64</a>.</p><blockquote>This article was written as a pre-application artifact for LFDT Mentorship #64 — Build and release a Java SDK for Paladin, mentored by Matthew Whitehead and Anna McAllister at Kaleido.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d04cd9de657c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building BrainExpo]]></title>
            <link>https://medium.com/@divyamjha.70055594/building-brainexpo-636d5ff99d4c?source=rss-4fccf7d4dedf------2</link>
            <guid isPermaLink="false">https://medium.com/p/636d5ff99d4c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[how-i-desided-to-pivot]]></category>
            <category><![CDATA[brainexpo]]></category>
            <dc:creator><![CDATA[Divyamjha ]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 08:11:36 GMT</pubDate>
            <atom:updated>2026-03-29T08:11:36.923Z</atom:updated>
            <content:encoded><![CDATA[<p>I kept saving links… and never finding them again.</p><p>Bookmarks were messy.<br>Notes were scattered.<br>And some of the most useful ideas just disappeared over time.</p><p>At some point, I realized:</p><p>Saving information is easy.<br>Using it later is the real problem.</p><p>So I decided to build my own solution.</p><p>That’s how BrainExpo was born.</p><p>BrainExpo isn’t just link storage — it’s your system to stay ahead. <br>Smart weekly updates make sure you never fall behind.</p><p>Try now 👉 <a href="https://brainexpo.me/">BrainExpo</a></p><p>The Problem</p><p>Every day, we consume a huge amount of content:<br>- Articles<br>- YouTube videos<br>- Twitter threads<br>- Tools and resources</p><p>But here’s what actually happens:<br>We save them in bookmarks<br>They pile up<br>We forget they exist</p><p>Bookmarks are not designed for thinking or learning — they’re just storage.</p><p>There’s no structure. No recall. No system.</p><p>Here’s what I used to build BrainExpo:<br>language used: TypeScript<br>Frontend: React/tailwindCss<br>Authentication: Clerk<br>Backend: nodeJs/Express<br>Db: MongoDb<br>Hosting: Vercel (frontend)+ Render(backend)</p><p>I kept the stack simple so I could focus on shipping fast instead of over-engineering.</p><p>Challenges I Faced:<br>Building BrainExpo wasn’t smooth. Some real issues I ran into:</p><p>🌐 CORS &amp; Backend Issues<br>Connecting frontend and backend securely took time.</p><p>🔐 Authentication Setup<br>Integrating Clerk properly required careful configuration.</p><p>🚀 Deployment Problems<br>Getting everything live (frontend + backend + domain) was tricky.</p><p>🤯 Overthinking Features<br>At one point, I almost delayed the launch trying to make it “perfect”.</p><p>What I Learned:</p><p>1. Ship Fast<br>Your first version doesn’t need to be perfect.</p><p>2. Solve Your Own Problem<br>If you need it, others probably do too.</p><p>3. Simplicity Wins<br>A clean, usable product beats a complex one.</p><p>4. Feedback &gt; Assumptions<br>Real users will tell you what actually matters.</p><p>What’s Next for BrainExpo:</p><p>so now I am slightly pivoting from this idea.</p><p>one day someone asked me that why will anyone pay for this because they already have free options available with ease.<br>Then i re-thought on this and i got to remember a thing from my childhood that how i used to spend hours finding that one photo of me and my brother from a gallary of 1000 photos.<br>And after so many years the exact problem still exists…</p><p>And the main problem is not with individuals, its for the agencies who have lakhs of videos ,frames, pictures, etc.<br>Finding that one frame inside the lakhs of videos and millions of frames are headache.</p><p>Hence, I desided to built Brainexpo ,a search engine for photes, videos, files, documents, anything and everything.</p><p>would Love to hear from you about this…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=636d5ff99d4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>