{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "Bitfield Lab",
  "home_page_url": "https://labs.nohup.dev",
  "feed_url": "https://labs.nohup.dev/feed.json",
  "description": "Bitfield Lab is an evolving research blog that starts with coding practice and grows toward Data Mesh, real-time analytics, system design, quantum computing, and much more.",
  "items": [
    {
      "id": "https://labs.nohup.dev/notes/ds-algo/",
      "url": "https://labs.nohup.dev/notes/ds-algo/",
      "title": "DS And Algorithms",
      "summary": "Data structures and algorithms practice, with Java solutions, reusable patterns, and notes from solved problems.",
      "content_text": "# DS And Algorithms\n\n## Goals\n\n- Build reliable problem-solving patterns.\n- Practice Java implementations.\n- Track mistakes and revisit weak areas.\n\n## Core Tracks\n\n| Track | Topics |\n| --- | --- |\n| Foundations | Big-O, arrays, strings, hashing, sorting |\n| Linear structures | stacks, queues, linked lists, monotonic structures |\n| Trees and graphs | binary trees, BSTs, BFS, DFS, shortest paths |\n| Recursion and DP | backtracking, memoization, tabulation |\n| Advanced patterns | intervals, heaps, union-find, tries, sliding window |\n\n## Files\n\n- patterns.md - reusable problem-solving patterns.\n- problems.md - solved problem index.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Practice Lab"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/ds-algo/3sum/",
      "url": "https://labs.nohup.dev/notes/ds-algo/3sum/",
      "title": "3Sum",
      "summary": "Given an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that:",
      "content_text": "# 3Sum\n\n## Problem\n\nGiven an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that:\n\n- i, j, and k are distinct\n- nums[i] + nums[j] + nums[k] == 0\n\n## Why The Brute Force TLEs\n\nThe direct approach checks every triple:\n\nfor i\n  for j\n    for k\n\n\nThat is O(n^3). It can pass many test cases, but it times out near the upper limits.\n\nUsing a Set<List<Integer>> also adds overhead:\n\n- each valid triplet creates a list\n- each list is sorted\n- each list is hashed\n- final result is streamed again\n\nThe main issue is still O(n^3), but the object creation makes it slower.\n\n## Optimized Idea\n\nSort the array first.\n\nThen fix one number nums[i] and solve the remaining two-number problem using two pointers:\n\n- left = i + 1\n- right = n - 1\n- target is -nums[i]\n\nIf the sum is too small, move left.\nIf the sum is too large, move right.\nIf the sum matches, record the triplet and skip duplicates.\n\n## Complexity\n\n| Approach | Time | Space |\n| --- | --- | --- |\n| Brute force triples | O(n^3) | O(number of answers) |\n| Sort + two pointers | O(n^2) | O(1) extra, excluding output |\n\n## Java Solution\n\nimport java.util.;\n\nclass Solution {\n    public List<List<Integer>> threeSum(int[] nums) {\n        Arrays.sort(nums);\n\n        List<List<Integer>> result = new ArrayList<>();\n        int n = nums.length;\n\n        for (int i = 0; i < n - 2; i++) {\n            if (i > 0 && nums[i] == nums[i - 1]) {\n                continue;\n            }\n\n            if (nums[i] > 0) {\n                break;\n            }\n\n            int left = i + 1;\n            int right = n - 1;\n\n            while (left < right) {\n                int sum = nums[i] + nums[left] + nums[right];\n\n                if (sum == 0) {\n                    result.add(Arrays.asList(nums[i], nums[left], nums[right]));\n\n                    while (left < right && nums[left] == nums[left + 1]) {\n                        left++;\n                    }\n                    while (left < right && nums[right] == nums[right - 1]) {\n                        right--;\n                    }\n\n                    left++;\n                    right--;\n                } else if (sum < 0) {\n                    left++;\n                } else {\n                    right--;\n                }\n            }\n        }\n\n        return result;\n    }\n}\n\n\n## Duplicate Rules\n\nSkip duplicate fixed values:\n\nif (i > 0 && nums[i] == nums[i - 1]) continue;\n\n\nAfter finding a valid triplet, skip duplicate left and right values before moving both pointers.\n\n## Key Pattern\n\nWhen a problem asks for unique pairs or triplets and order does not matter:\n\n1. Sort first.\n2. Fix one value if needed.\n3. Use two pointers for the remaining pair.\n4. Skip duplicates at the same decision level.\n\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Practice Lab"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/ds-algo/patterns/",
      "url": "https://labs.nohup.dev/notes/ds-algo/patterns/",
      "title": "Problem Solving Patterns",
      "summary": "A compact index of problem-solving patterns: two pointers, sliding window, hashing, graph traversal, and dynamic programming.",
      "content_text": "# Problem Solving Patterns\n\n| Pattern | Signal | Typical Complexity | Notes |\n| --- | --- | --- | --- |\n| Two pointers | Sorted array, pair search, partitioning | O(n) after sorting or per fixed index | Watch pointer movement invariants and duplicate skipping. |\n| Sort + fixed index + two pointers | Unique triplets, 3Sum-style pair search after choosing one value | O(n^2) | Sort, skip duplicate fixed values, then move inward based on sum. |\n| Sliding window | Contiguous subarray or substring | O(n) | Track what makes a window valid. |\n| Hash map counting | Frequency, lookup, deduplication | O(n) | Clarify collision and memory trade-offs if asked. |\n| BFS | Shortest path in unweighted graph | O(V + E) | Use queue and visited set. |\n| DFS | Traversal, components, recursion | O(V + E) | Watch recursion depth. |\n| Dynamic programming | Overlapping subproblems | Varies | Define state, transition, base cases. |\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Practice Lab"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/ds-algo/problems/",
      "url": "https://labs.nohup.dev/notes/ds-algo/problems/",
      "title": "Solved Problems",
      "summary": "An index of solved coding problems, patterns used, language choices, and lessons to revisit.",
      "content_text": "# Solved Problems\n\n| Problem | Pattern | Language | Difficulty | Status | Notes |\n| --- | --- | --- | --- | --- | --- |\n| 3Sum | Sort + two pointers | Java | Medium | Solved after TLE analysis | Brute force O(n^3) timed out; optimized to O(n^2). See 3sum.md. |\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Practice Lab"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/data-engineering/",
      "url": "https://labs.nohup.dev/notes/data-engineering/",
      "title": "Data Engineering",
      "summary": "Data engineering notes covering Spark, MapReduce, Data Mesh, Real-time Analytics, streaming, batch pipelines, and reliability.",
      "content_text": "# Data Engineering\n\n## Focus Areas\n\n- Spark architecture and execution\n- MapReduce fundamentals\n- Data Mesh and domain-owned data products\n- Real-time Analytics and event-driven decision systems\n- Batch pipelines\n- Streaming pipelines\n- Partitioning, shuffling, joins, and skew\n- File formats and table formats\n- Orchestration and reliability\n\n## Key Questions\n\n- Where does data enter and leave the system?\n- What are the latency, correctness, and cost requirements?\n- How are failures retried and observed?\n- What happens when data is late, duplicated, or malformed?\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Data Systems"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/data-engineering/data-mesh/",
      "url": "https://labs.nohup.dev/notes/data-engineering/data-mesh/",
      "title": "Data Mesh",
      "summary": "Data Mesh is a way to think about analytical data ownership. Instead of one central team trying to understand every dataset, domain teams own data products that other teams can...",
      "content_text": "# Data Mesh\n\nData Mesh is a way to think about analytical data ownership. Instead of one central team trying to understand every dataset, domain teams own data products that other teams can trust and use.\n\n## Why This Matters\n\nAs systems grow, data problems become ownership problems. A central platform can provide tools, standards, and governance, but the meaning of the data usually lives closest to the domain.\n\n## Core Idea\n\n- Domains own their data products.\n- Data products have clear contracts.\n- A self-serve platform makes publishing and consuming data easier.\n- Governance is federated, not ignored.\n\n## System Architecture\n\nflowchart LR\n  Platform[Self-serve data platform] --> Orders[Orders data product]\n  Platform --> Payments[Payments data product]\n  Platform --> Search[Search data product]\n  Orders --> Analytics[Analytics consumers]\n  Payments --> Analytics\n  Search --> Analytics\n  Governance[Federated governance] -. standards .-> Orders\n  Governance -. standards .-> Payments\n  Governance -. standards .-> Search\n\n\n## What To Watch\n\n- schema contracts\n- data quality ownership\n- discoverability\n- lineage\n- access control\n- product thinking for datasets\n\n## Takeaways\n\n- Data Mesh is less about tools and more about ownership.\n- Platform teams still matter, but they enable domains instead of owning every dataset.\n- The hard part is balancing autonomy with shared standards.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Data Systems"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/data-engineering/real-time-analytics/",
      "url": "https://labs.nohup.dev/notes/data-engineering/real-time-analytics/",
      "title": "Real-time Analytics",
      "summary": "Real-time Analytics is about turning fresh events into decisions while they still matter. It connects streaming data, fast processing, OLAP serving, dashboards, alerts, and...",
      "content_text": "# Real-time Analytics\n\nReal-time Analytics is about turning fresh events into decisions while they still matter. It connects streaming data, fast processing, OLAP serving, dashboards, alerts, and user-facing product experiences.\n\n## Why This Matters\n\nMany systems cannot wait for the next batch job. Fraud detection, operational dashboards, experimentation, observability, personalization, and logistics all need low-latency signals.\n\n## Data Flow\n\nflowchart LR\n  Events[Application events] --> Kafka[Event stream]\n  Kafka --> Stream[Stream processing]\n  Stream --> OLAP[Real-time OLAP store]\n  OLAP --> Dashboards[Dashboards]\n  OLAP --> Alerts[Alerts]\n  OLAP --> Products[User-facing product features]\n\n\n## Common Design Questions\n\n- What latency does the business actually need?\n- What happens when events arrive late?\n- How are duplicates handled?\n- Is the serving layer optimized for filters, aggregations, or joins?\n- What needs batch correction later?\n\n## Takeaways\n\n- Real-time does not always mean instant; define the latency target.\n- Streaming systems need correctness stories, not just fast ingestion.\n- OLAP serving systems are often where product expectations meet infrastructure limits.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Data Systems"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/data-infra/",
      "url": "https://labs.nohup.dev/notes/data-infra/",
      "title": "Data Infrastructure",
      "summary": "Data infrastructure notes on OLAP systems, Druid, ClickHouse, storage engines, ingestion, and query execution.",
      "content_text": "# Data Infrastructure\n\n## Focus Areas\n\n- OLAP systems\n- Apache Druid\n- ClickHouse\n- Columnar storage\n- Indexing and compression\n- Query planning and execution\n- Ingestion architecture\n\n## Comparison Habit\n\nFor each system, track:\n\n| Dimension | Notes |\n| --- | --- |\n| Storage model | TBD |\n| Ingestion path | TBD |\n| Query strengths | TBD |\n| Scaling model | TBD |\n| Operational risks | TBD |\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Data Systems"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/java/",
      "url": "https://labs.nohup.dev/notes/java/",
      "title": "Java",
      "summary": "Use Java as the default language for DS and algorithm implementations.",
      "content_text": "# Java\n\n## Focus Areas\n\n- Core language and OOP\n- Collections and generics\n- JVM memory model\n- Concurrency\n- Streams and functional style\n- Interview coding fluency\n\n## Practice Rule\n\nUse Java as the default language for DS and algorithm implementations.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Java"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/scala/",
      "url": "https://labs.nohup.dev/notes/scala/",
      "title": "Scala",
      "summary": "Use Scala especially when practicing Spark, data transformations, or functional modeling.",
      "content_text": "# Scala\n\n## Focus Areas\n\n- Syntax and type system\n- Collections\n- Pattern matching\n- Functional programming basics\n- Futures and concurrency\n- Spark-oriented Scala\n\n## Practice Rule\n\nUse Scala especially when practicing Spark, data transformations, or functional modeling.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Scala"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/system-design/",
      "url": "https://labs.nohup.dev/notes/system-design/",
      "title": "System Design",
      "summary": "A senior system design framework with requirements, scale, APIs, data models, architecture, reliability, observability, and trade-offs.",
      "content_text": "# System Design\n\n## Senior-Level Answer Framework\n\n1. Requirements and non-goals\n2. Scale estimates\n3. API design\n4. Data model\n5. High-level architecture\n6. Deep dives\n7. Reliability and failure handling\n8. Consistency and correctness\n9. Observability\n10. Trade-offs and evolution\n\n## System Architecture\n\nUse Mermaid diagrams when the system has multiple services, ownership boundaries, event streams, or data stores.\n\nflowchart LR\n  Client[Client] --> API[API layer]\n  API --> Service[Domain service]\n  Service --> Events[Event stream]\n  Events --> Analytics[Real-time analytics]\n  Analytics --> OLAP[OLAP store]\n  OLAP --> Dashboard[Dashboard]\n\n\n## Practice Areas\n\n- Feeds and timelines\n- Messaging and chat\n- Search\n- Analytics and metrics\n- Distributed queues\n- Rate limiting\n- Data platforms\n- Multi-tenant SaaS systems\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "System Design"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/web-infra/",
      "url": "https://labs.nohup.dev/notes/web-infra/",
      "title": "Web Infrastructure",
      "summary": "Web infrastructure notes for DNS, hosting, email routing, analytics, discovery, and deployment workflows.",
      "content_text": "# Web Infrastructure\n\nOperational notes for domains, DNS, hosting, email routing, analytics, discovery, and deployment workflows.\n\n## Notes\n\n- How to Route Google Workspace Email to a Subdomain on Squarespace\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Web Infra"
      ]
    },
    {
      "id": "https://labs.nohup.dev/notes/web-infra/google-workspace-subdomain-email/",
      "url": "https://labs.nohup.dev/notes/web-infra/google-workspace-subdomain-email/",
      "title": "How to Route Google Workspace Email to a Subdomain on Squarespace",
      "summary": "A step-by-step lab report for routing Google Workspace email to a Squarespace-managed subdomain while hosting the site on Netlify.",
      "content_text": "# How to Route Google Workspace Email to a Subdomain on Squarespace\n\nWhen a website lives on Netlify and email lives in Google Workspace, the root domain path is usually boring in a good way. Add a domain, copy the DNS records, wait for propagation, done.\n\nSubdomains are less forgiving. If the site is labs.nohup.dev, the mail records also need to target labs.nohup.dev. The easy mistake is using @ for the MX host, which routes mail for the root domain instead of the lab subdomain. That makes the setup look correct while mail stays quietly broken.\n\nThis lab report walks through the exact setup: Squarespace DNS for the site, Google Workspace for mail, Netlify for hosting, and labs.nohup.dev as the working subdomain example.\n\n## Lab Setup\n\nGoal:\n\n- Host the technical blog on Netlify at labs.nohup.dev.\n- Route email for the same subdomain through Google Workspace.\n- Keep the root domain DNS untouched unless it is intentionally part of the setup.\n\nTools:\n\n- Squarespace domain DNS\n- Netlify site hosting\n- Google Workspace Admin Console\n- A subdomain such as labs.nohup.dev\n\n## Step 1: Add The Subdomain In Google Workspace\n\nOpen the Google Admin Console and add labs.nohup.dev as either a secondary domain or a domain alias.\n\nUse secondary domain when the subdomain should have its own users or a separate identity boundary.\n\nUse domain alias when the subdomain should behave as another address for existing users.\n\nThe path in Google Admin is typically:\n\nAdmin Console -> Account -> Domains -> Manage domains -> Add a domain\n\n\nEnter:\n\nlabs.nohup.dev\n\n\nGoogle may ask for domain verification. Follow the verification prompt and add the provided TXT record in Squarespace DNS if needed. Do not activate Gmail yet. The DNS records need to exist first.\n\n## Step 2: Connect The Site To Netlify\n\nIn Squarespace, open the DNS settings for the root domain. Add an A record that points the labs host to Netlify.\n\nExample DNS record:\n\nType: A\nHost: labs\nData: 75.2.60.5\n\n\nThis record makes labs.nohup.dev resolve to the Netlify site. In Netlify, the matching custom domain should be configured as:\n\nlabs.nohup.dev\n\n\nIf Netlify gives you a different IP or recommends another DNS pattern for your account, use Netlify's current value. The important part for this setup is the host: labs.\n\n## Step 3: Add The MX Record Secret\n\nThis is the part that usually breaks subdomain email.\n\nFor a root domain, many DNS guides use @ as the host. For labs.nohup.dev, the host must be labs, not @.\n\nAdd this MX record in Squarespace:\n\nType: MX\nHost: labs\nPriority: 1\nData: smtp.google.com\n\n\nRead it as:\n\nmail for labs.nohup.dev -> Google Workspace\n\n\nIf the host is set to @, the record applies to the root domain instead:\n\nmail for nohup.dev -> Google Workspace\n\n\nThat is a different target. The UI may look valid, but email for labs.nohup.dev will not be routed correctly.\n\n## Step 4: Activate Gmail\n\nReturn to the Google Admin panel for labs.nohup.dev.\n\nClick Activate Gmail.\n\nGoogle checks the MX record. If the record is visible, Gmail activation should complete. If Google cannot see it yet, wait for DNS propagation and try again.\n\nUseful checks:\n\ndig MX labs.nohup.dev\n\n\nExpected shape:\n\nlabs.nohup.dev.  MX  1 smtp.google.com.\n\n\nYou can also check with:\n\nnslookup -type=mx labs.nohup.dev\n\n\nDNS propagation is usually quick, but it can take longer depending on cache, registrar behavior, and previous records.\n\n## Final DNS Shape\n\nThe minimal working setup looks like this:\n\nType: A\nHost: labs\nData: 75.2.60.5\n\nType: MX\nHost: labs\nPriority: 1\nData: smtp.google.com\n\n\nThe key is consistency. The website and the mail route both attach to the same DNS host: labs.\n\n## Takeaways\n\n- Subdomain email is not the same as root-domain email.\n- In Squarespace DNS, @ means the root domain.\n- For labs.nohup.dev, use labs as the MX host.\n- Add the Netlify A record before testing the site.\n- Add the Google Workspace MX record before clicking Activate Gmail.\n- Verify with dig MX labs.nohup.dev before debugging Google Workspace itself.\n\nSmall DNS mistakes can feel mysterious because every dashboard says something slightly different. The rule here is simple: if the address ends in labs.nohup.dev, the DNS host should be labs.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Web Infra"
      ]
    },
    {
      "id": "https://labs.nohup.dev/about/",
      "url": "https://labs.nohup.dev/about/",
      "title": "About This Lab",
      "summary": "Bitfield Lab is a learning and research notebook for technical problem solving.",
      "content_text": "# About This Lab\n\nBitfield Lab is a learning and research notebook for technical problem solving.\n\nIt starts with coding practice, Java, Scala, data engineering, and system design. Over time, it grows into deeper notes on Data Mesh, real-time analytics, OLAP systems, quantum computing, space systems, and other technical patterns worth understanding.\n\n## Current Direction\n\n- Strengthen problem-solving fundamentals through code.\n- Explore system design through clear architecture notes.\n- Study modern data infrastructure, from streaming to OLAP.\n- Follow research threads into frontier computing and space systems.\n\n## Note Style\n\nNotes are concise, structured, and lab-style: useful enough to revisit, simple enough to follow, and technical enough to build on.\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Lab"
      ]
    },
    {
      "id": "https://labs.nohup.dev/now/",
      "url": "https://labs.nohup.dev/now/",
      "title": "Now",
      "summary": "Current research focus across coding practice, Data Mesh, Real-time Analytics, OLAP, Spark, and senior system design.",
      "content_text": "# Now\n\nCurrent focus:\n\n- DS and algorithm practice in Java\n- Scala for data engineering fluency\n- Spark and MapReduce foundations\n- Data Mesh patterns for domain-owned data products\n- Real-time Analytics patterns for event-driven decisions\n- OLAP systems, especially Apache Druid and ClickHouse\n- Senior system design interview preparation\n\nNext frontier tracks:\n\n- quantum computing\n- space exploration systems\n- simulation, telemetry, and scientific data platforms\n",
      "date_modified": "2026-05-02T07:54:45.084Z",
      "tags": [
        "Lab"
      ]
    }
  ]
}