Herding Bits Documentation

website·Indexed 31 days ago

https://herdingbits.com/

A personal knowledge base and technical guide covering software development tools and configurations. Includes tutorials and snippets for VS Code, Git, Vim, Docker, AWS (Serverless, Lambda, CloudFront), MySQL, Bash, and TypeScript, as well as system configuration for macOS and Windows.

Tokens
20.3K
Snippets
103
Records
163
Agent score
57%

What's inside Herding Bits

  1. Overview of AWS static website hosting architecture

    This solution allows for hosting commercial static websites and Single Page Applications (SPAs) built with frameworks like Next.js, React, or Docusaurus. It provides a serverless, scalable architecture with low latency and end-to-end encryption. Key features include automatic HTTPS redirection, custom domain support, and affordable running costs for moderate traffic.
  2. Overview of the Trailhead micro-frontend framework

    Trailhead is a lightweight application shell (approx. 21 KB) designed to orchestrate multiple independent single-page applications (SPAs) within a shared SaaS layout. Unlike complex micro-frontend implementations, it relies on the browser's native module system and window APIs rather than Webpack Module Federation or shared CDN runtimes. It is framework-agnostic, allowing different modules to use React, Vue, Svelte, or vanilla JavaScript independently.
  3. Professional Git skill requirements for developers

    Professional Git usage extends beyond basic commits. Hiring engineers expect developers to be proficient in organizing code changes for review, patching, and reasoning. Key professional competencies include command-line proficiency, managing temporary changes via stashing, understanding the difference between merging and rebasing, and the ability to reorganize commits for cleaner pull requests.
  4. Understand Git merge conflicts and three-way merging

    A merge conflict occurs when Git cannot automatically determine which version of a file is correct because the same lines of text were edited in two different versions of the same file.

    To resolve this, Git uses a 'three-way merge,' which compares three versions of the file:

    1. The common ancestor (the base file at the time the two copies were originally branched).
    2. The first edited copy.
    3. The second edited copy.

    Comparing the two edited copies against the common ancestor allows Git (and the user) to determine if a line was added or removed, rather than simply seeing that two lines are different.

  5. Use Beyond Compare as a diff and merge tool

    Beyond Compare is a cross-platform diff and merge tool available for Windows, Linux, and macOS. It requires a paid, non-subscription license that is not tied to a specific platform, making it a viable option for resolving complex merge conflicts across different operating systems.
  6. Extend the Trailhead shell for production use

    The core Trailhead shell is implemented in TypeScript and can be extended to support production-grade requirements. To move from a proof-of-concept to a production system, the shell should be augmented with the following capabilities:

    • Communication: Implement an event bus or shared state for cross-app communication.
    • Observability: Add advanced error handling, performance monitoring, and analytics.
    • Security: Integrate authentication and authorization logic.
    • Control: Implement feature flags to manage rollout and availability.
  7. AWS Serverless Lambda Boilerplate Features

    The Lambda boilerplate provides a development environment with the following capabilities:

    • TypeScript support for writing code
    • Built-in debugger support
    • Unit testing capabilities with AWS SDK mocking
    • Local execution and deployment via the Serverless Framework
    • Automatic documentation generation using JSDoc
    • Code sharing via Yarn Workspaces
  8. Understand Vim's Mode paradigm

    Vim uses different modes to optimize the UI for different tasks, which is a paradigm that can be integrated into most major IDEs via plugins. The primary modes are:

    • Normal Mode: Used for navigating the document and making small, efficient changes.
    • Insert Mode: Used for writing new code or making significant text changes (similar to how standard IDEs or Nano operate).
    • Console Mode: A command-line interface used for system-level functions like loading files, saving, and quitting.
  9. Host JS applications on AWS using CloudFront and S3

    For a low-budget, high-availability setup to host JavaScript applications on AWS, use a combination of CloudFront and S3. A full video tutorial and detailed article are available to guide the implementation of this architecture.

    Video Tutorial: https://youtu.be/Pb23xfcLMJc Detailed Article: /docs/AWS/CloudFront/host%5Fstatic%5Fsite

  10. Understand architectural tradeoffs of the Trailhead shell pattern

    Implementing a micro-frontend architecture via a shared shell and page reloads involves specific technical tradeoffs.

    Gains:

    • Elimination of complex webpack configurations.
    • Zero runtime cost for internationalization (i18n).
    • Independent deployment of apps without inter-app URL rewrites.
    • Strong isolation between apps via browser refreshes.

    Losses:

    • UI Transitions: Loss of fancy route transitions (e.g., fades or slides) between apps.
    • State Persistence: Scroll position is not preserved across app transitions.
    • Performance: Slight increase in navigation time (approx. 15ms) and increased bundle size (approx. 67 KB per app) because React is bundled per app rather than shared as a single runtime.
  11. Prepare a high-quality pull request for review

    To ensure a pull request is easy for peers to reason about and provides maximum learning value, follow this pre-submission checklist:

    • Context: Provide a description that explains what the code does from the end-user's perspective.
    • Clarity: Explain the reasoning behind non-obvious approaches and why obvious alternatives were avoided.
    • Inquiry: Ask specific questions regarding areas of uncertainty to prompt targeted feedback.
    • Size Management: Consider splitting the PR if it contains more than 250 lines of functional code (excluding boilerplate, comments, or styling).
    • Cohesion: Ensure the code is technically related and focused on a specific feature.
    • Commit History: Squash commits so they represent related code changes.
  12. New Zealand Nature Itinerary Overview (Nov 8–15, 2025)

    An 8-day itinerary focusing on geothermal, volcanic, and ancient forest nature. Total driving is approximately 480 km with a maximum of 3 hours of driving per day. The trip utilizes a mix of 4 freedom camps and 3 serviced campgrounds. Recommended weather gear includes layers, rain jackets, and sturdy boots for temperatures between 16–21°C.