Chats

  • The Gibs Reflective cycle for ADHD

    The Gibs Reflective cycle for ADHD

    Missed a deadline. Again.

    Instead of the usual “I’m useless” spiral, use the Gibbs Reflective Cycle.

    1. Description — What happened?
    “I planned to finish the presentation Friday. I started late and missed the deadline.”

    2. Feelings — What was going on internally?
    “I felt overwhelmed, avoided opening the file, then panicked.”

    3. Evaluation — What worked and what did not?
    “Research was solid. But I waited for the perfect mood to start.”

    4. Analysis — Why did it happen?
    “The task was vague and too big. No first step, no calendar block, phone nearby.”

    5. Conclusion — What could I do differently?
    “Define the first 15-minute action: open slides and write three headings.”

    6. Action plan — What happens next time?
    “Book a 9:00–9:15 start block, put the phone away, and send a rough draft early.”

    Reflection is not self-criticism.
    It is turning a failure into a better operating system.

  • 5 ADHD techniques reducing friction and building momentum

    5 ADHD techniques reducing friction and building momentum

    1. Validate emotions
      “You’re not lazy. Starting this task feels heavy because your brain sees too many steps.”
    2. Use open questions
      “What makes you want to do this now—and what keeps pulling you away from it?”
    3. Set goals together
      Not: “Work out five times this week.”
      Try: “Can you commit to putting on gym clothes twice this week?”
    4. Break down tasks
      “Do taxes” is overwhelming.
      Open laptop → find login → upload one document. Start there.
    5. Stay flexible
      If a detailed planner fails, switch to a three-task daily list. The system serves the person—not the other way around.

    Progress is rarely about trying harder. It is about making the next action small enough to begin.

  • Senior front end interview questions

    2. API boundaries and caching strategy

    I would organize API access around business domains: subscriptions, devices, alerts and billing. Components should consume domain-specific hooks rather than call endpoints directly, which keeps transport details outside the presentation layer.

    Cache policy should reflect the volatility and sensitivity of each resource. Subscription details can tolerate a longer stale time, while security alerts and device status require more frequent refreshes or push-based updates. Billing information needs explicit invalidation after payment-related actions.

    Query keys should include the authenticated user and relevant parameters, such as ['devices', userId]. After a mutation, I would update or invalidate only affected queries instead of refetching the entire dashboard.

    For security-sensitive data, I would prefer in-memory caching over persistent browser storage and clear query caches on logout or account switching. I would also prevent sensitive responses from being cached by shared infrastructure using appropriate HTTP cache headers.

    3. Authentication, token storage and session expiry

    For a security-focused product, I would prefer a backend-for-frontend or server-managed session, using HttpOnly, Secure cookies and an appropriate SameSite setting. JavaScript should not have access to long-lived refresh tokens.

    Because cookies are attached automatically, I would also implement CSRF protection where necessary. HttpOnly reduces token theft through JavaScript, but it does not prevent XSS itself, so CSP, output escaping and dependency hygiene remain necessary.

    When an API request returns 401, I would trigger a single shared refresh operation, queue or await other failed requests, and retry them once after refresh succeeds. If refresh fails, I would clear sensitive cached data and redirect to login.

    Across browser tabs, I would synchronize authentication changes using BroadcastChannel. Preventing simultaneous refresh attempts across tabs requires an actual coordination mechanism, such as Web Locks, or server-side refresh handling—not just broadcasting messages.

    Authentication proves who the user is; authorization determines what the user can access. The frontend can hide unauthorized actions, but the backend must enforce permissions.

    4. Rendering choice: CSR, SSR or hybrid

    I would use hybrid rendering. Public marketing pages benefit from SSR or static generation because SEO and first-load performance matter. The authenticated dashboard benefits from server-rendering its initial shell and essential data when that improves perceived performance, followed by client-side interactivity and targeted refetching.

    Frequently changing sections, such as device status or security alerts, should update on the client using polling or push-based communication. Server rendering every update would add unnecessary load without improving the experience.

    Sensitive authenticated content must never be accidentally cached or shared between users. I would explicitly control caching and make sure user-specific responses are not stored in public CDN caches.

    I would choose rendering boundaries based on product requirements, not ideology: SEO needs, personalization, latency, security, infrastructure cost and interaction patterns.

    Follow-up: “When would you choose pure CSR for the dashboard?”

    When SEO is irrelevant, the application is highly interactive, most data changes after login, and SSR adds operational complexity without measurable gains. I would verify that decision against metrics such as initial load time, interaction responsiveness and user experience on slower devices.

    5. Error handling, retries and degraded networks

    I would classify failures before deciding how the UI responds.

    Network failures, timeouts, 429 responses and temporary server errors may warrant retries with exponential backoff and jitter. Validation errors, permission failures and most other 4xx responses should not be retried automatically.

    Dashboard sections should fail independently. If billing fails but device data loads, the user should still see and manage their devices. React error boundaries handle rendering failures; query-level error states handle request failures.

    For degraded networks, I would preserve previously loaded data and clearly mark it as stale. Important actions require explicit pending, success and failure states so users know whether a request completed.

    Retrying mutations requires more care than retrying reads. Revoking a device or creating a payment should use idempotency keys where appropriate to avoid repeating side effects.

    Follow-up: “How do you avoid showing stale security information?”

    I would display when the data was last refreshed and distinguish cached information from confirmed current state. For critical actions, I would verify against the server immediately before execution and avoid presenting stale security status as authoritative.

    6. Preventing sensitive data leaks

    I would first identify sensitive data: access tokens, personal information, billing details, device identifiers, IP addresses and security events. Then I would minimize what reaches the browser in the first place.

    Authentication tokens should not be stored in localStorage when a secure server-managed session is practical. Sensitive application data should stay in memory rather than persist in browser storage or service-worker caches.

    Logs, analytics and error-monitoring tools should use allowlists and redaction rules. I would avoid sending raw request payloads, authorization headers, full URLs with sensitive query parameters or user-identifying metadata to third-party tools.

    At the transport and browser level, I would enforce HTTPS, configure CSP, avoid unsafe HTML injection, and control response caching with appropriate headers. Private user data should never be stored in publicly shared caches.

    Finally, I would treat frontend protections as defense in depth: the backend must enforce authorization, redact responses appropriately and keep audit logs for sensitive actions.

    Follow-up: “What is dangerous about putting tokens in URL query parameters?”

    URLs can appear in browser history, server logs, monitoring platforms and sometimes referrer headers. Secrets belong in secure cookies or authorization headers, not query strings.

    7. Testing, observability and gradual rollout

    I would test at multiple levels. Unit tests cover pure transformations and permission logic. Integration tests verify dashboard behavior against mocked API responses, including expired sessions, partial failures and optimistic-update rollback. End-to-end tests cover critical journeys such as logging in, viewing subscriptions and revoking devices.

    I would prioritize contract testing where frontend and backend teams evolve independently. That reduces the chance of shipping a dashboard that compiles successfully but breaks because an API response changed.

    For observability, I would track Core Web Vitals, JavaScript errors, failed requests and business outcomes such as device-revocation success rate. Metrics should be segmented by browser, region, release version and device capability, while avoiding sensitive user data.

    New functionality should launch behind feature flags, initially to internal users or a small percentage of customers. I would monitor technical and business metrics, expand gradually and maintain a clear rollback or kill-switch path.

    A feature is not finished when the code ships. It is finished when production metrics confirm that it works reliably and does not harm users.

    Follow-up: “What would trigger an immediate rollback?”

    Any increase in authentication failures, cross-account data exposure, sensitive-data leakage, failed security actions or a significant regression in critical user journeys. For a cybersecurity company, confidentiality failures override feature-delivery targets.

    What happens when two tabs refresh an expired token simultaneously?

    Without coordination, both tabs receive 401 responses and attempt to refresh the session. If refresh-token rotation is enabled, the first request may invalidate the token before the second request uses it. Depending on server policy, the second request can fail or be interpreted as token reuse, potentially invalidating the session.

    A senior-level solution has two layers:

    1. Within one tab: Deduplicate refresh requests using one shared promise.
    2. Across tabs: Use the Web Locks API so only one tab performs the refresh. After acquiring the lock, recheck whether another tab already refreshed the session. Use BroadcastChannel to propagate authentication changes.
    let refreshPromise: Promise<void> | null = null;
    
    async function refreshSession(): Promise<void> {
      if (refreshPromise) {
        return refreshPromise;
      }
    
      refreshPromise = navigator.locks
        .request("auth-refresh", async () => {
          // Another tab might have refreshed while this tab waited.
          const session = await fetch("/api/session", {
            credentials: "include",
          });
    
          if (session.ok) {
            return;
          }
    
          const response = await fetch("/api/auth/refresh", {
            method: "POST",
            credentials: "include",
          });
    
          if (!response.ok) {
            throw new Error("Session refresh failed");
          }
        })
        .finally(() => {
          refreshPromise = null;
        });
    
      return refreshPromise;
    }
    
    async function authenticatedFetch(
      input: RequestInfo | URL,
      init?: RequestInit,
    ): Promise<Response> {
      const response = await fetch(input, {
        ...init,
        credentials: "include",
      });
    
      if (response.status !== 401) {
        return response;
      }
    
      await refreshSession();
    
      // Retry once. Never create an infinite refresh loop.
      return fetch(input, {
        ...init,
        credentials: "include",
      });
    }

    Interview phrasing:

    I would deduplicate refresh operations inside each tab and coordinate across tabs using a browser lock. Once the lock is acquired, I would recheck session validity because another tab may already have refreshed it. Failed refresh clears sensitive state and redirects to login. Each original request retries once.

    How does the UI remain consistent after an optimistic update fails?

    For example, a user revokes a connected device:

    1. Cancel active device-list queries so they do not overwrite the optimistic change.
    2. Snapshot the current device list.
    3. Remove the device immediately from the cached list.
    4. Send the revoke request.
    5. If it fails, restore the snapshot and notify the user.
    6. Refetch afterward to reconcile with the server.
    type Device = {
      id: string;
      name: string;
    };
    
    const devicesKey = ["devices", userId] as const;
    
    const revokeDevice = useMutation({
      mutationFn: async (deviceId: string) => {
        const response = await fetch(`/api/devices/${deviceId}`, {
          method: "DELETE",
          credentials: "include",
        });
    
        if (!response.ok) {
          throw new Error("Could not revoke device");
        }
      },
    
      onMutate: async (deviceId) => {
        await queryClient.cancelQueries({
          queryKey: devicesKey,
        });
    
        const previousDevices =
          queryClient.getQueryData<Device[]>(devicesKey);
    
        queryClient.setQueryData<Device[]>(
          devicesKey,
          (devices = []) =>
            devices.filter((device) => device.id !== deviceId),
        );
    
        return { previousDevices };
      },
    
      onError: (_error, _deviceId, context) => {
        if (context?.previousDevices) {
          queryClient.setQueryData(
            devicesKey,
            context.previousDevices,
          );
        }
    
        toast.error("Device revocation failed");
      },
    
      onSettled: () => {
        queryClient.invalidateQueries({
          queryKey: devicesKey,
        });
      },
    });

    Critical security nuance: For revoking a device, displaying immediate removal might falsely imply the device has already lost access. A safer design is to keep the device visible with a “Revoking…” status until the backend confirms success. Optimistic updates are appropriate only when a temporary incorrect state does not create a security or business risk.

  • Code


    This codebase will outlive you. Every shortcut you take becomes
    someone else’s burden. Every hack compounds into technical debt
    that slows the whole team down.

    You are not just writing code. You are shaping the future of this
    project. The patterns you establish will be copied. The corners
    you cut will be cut again.

    Fight entropy. Leave the codebase better than you found it.

    Tips for Ralph Wiggum loop engineering
  • ADHD 6 -coaching

    ADHD 6 -coaching

    ADHD coaching is not about telling people to “try harder.”

    That strategy has been tested. Repeatedly. Usually right after someone loses their keys while holding them.

    ADHD support changes with age:

    A young child needs structure, visuals, movement, and fast feedback.

    A teenager needs ownership, short-term wins, and goals that actually matter to them—not a lecture about their future from 2047.

    An adult needs systems that survive real life: work pressure, inbox chaos, relationships, bills, sleep, and 37 browser tabs that all felt urgent yesterday.

    The rule is simple:
    Don’t coach the person you wish they were. Coach the person in front of you.

    Action items:

    • Pick one daily friction point: mornings, homework, task starting, time blindness, or emotional blowups.
    • Make the next step visible and tiny. “Open the document” beats “finish the project.”
    • Use external support: calendar blocks, alarms, checklists, body doubling, accountability.
    • Give immediate feedback. ADHD brains do not run well on distant rewards and vague hope.
    • For kids: praise the exact behavior. “You started without arguing” is better than “good job.”
    • For teens: connect habits to freedom, friends, sport, money, gaming, driving, or confidence.
    • For adults: reduce decisions. One calendar. One task list. Fewer promises. More buffers.
    • Review weekly: what worked, what failed, what needs redesign—not self-punishment.

    The goal is not perfect discipline.

    The goal is a support system strong enough that progress does not depend on having a magically productive Tuesday.

  • FrontEnd

    FrontEnd

    Backend is what makes sure it actually works.

    The frontend gets the applause:

    ✅ Clean UI
    ✅ Nice UX, where you find everything easy
    ✅ Polished experience and simple way to show complex things.

    The backend handles the quiet chaos:

    ✅ APIs
    ✅ databases
    ✅ authentication
    ✅ security
    ✅ business logic
    ✅ server performance

    Users see the swan and it is super important, but once you get into thousands, millions of users and connect to different platforms, backend is where the real gurus are.

    Developers know there is a whole machine underwater trying not to catch fire.

    Both matter.

    A beautiful UI without a reliable backend is just a very attractive loading screen.

    Build the experience.

    Respect the engine.

  • Protected: Enter in 3 tranches

    Protected: Enter in 3 tranches

    This content is password-protected. To view it, please enter the password below.

  • Kodėl ADHD žmonės pamiršta raktus ir daiktus? 

    Kodėl ADHD žmonės pamiršta raktus ir daiktus? 

    ADHD (dėmesio deficito ir hiperaktyvumo sutrikimas) tiesiogiai paveikia darbinę atmintį ir vykdomąsias funkcijas smegenyse. Tai reiškia:

    • Darbinė atmintis yra sumažėjusi – žmogus tiesiog negali vienu metu išlaikyti galvoje tiek informacijos, kiek neurotipiški žmonės. Raktas, telefonas, piniginė – tai „foniniai” daiktai, kurie iškrenta iš dėmesio, kai smegenys persijungia prie kitos minties.
    • Automatiniai įpročiai sunkiau susiformuoja – neurotipiškam žmogui „raktai-kišenė-durys” tampa automatiniu veiksmu. ADHD žmogui šis automatizmas formuojasi žymiai sunkiau arba nuolat „lūžta” dėl dėmesio perjungimų.
    • Hiperfokusas ir dėmesio šuoliai – smegenys nuolat šokinėja tarp stimulų, todėl veiksmas „padėti raktus į vietą” gali būti pertrauktas bet kokios kitos minties ar dirgiklio.

    Tai neurologinis mechanizmas, ne tingumas, abejingumas ar nepagarba kitiems.

    Ar pykti ir priekaistauti yra teisinga? 

    Trumpai: ne. Štai kodėl:

    1. Žmogus jau pats save bara. ADHD žmonės dažniausiai jaučia didelę gėdą ir nusivylimą savimi. Išorinis priekaištas prideda kaltės ant jau esamos kaltės – tai didina stresą, o stresas dar labiau blogina darbinę atmintį. Gaunasi užburtas ratas.
    2. Priekaištai neišsprendžia problemos. Jei žmogus galėtų tiesiog „labiau pasistengti” nepamiršti – jis tai jau darytų. Tai panašu kaip pykti ant trumparegiu žmogaus, kad jis neskaito be akinių.
    3. Pyktis griauna santykį. Ilgainiui nuolatiniai priekaištai sukuria dinamiką, kur vienas žmogus jaučiasi „tėvu/policininku”, o kitas – „probleminiu vaiku”. Tai kenkia abiem.

    Kas padeda vietoj pykčio? 

    • Sistemos, ne valia. Rakčių kabykla prie durų, indelis telefonui, krepšelis prie įėjimo – konkreti vieta, kur daiktai „gyvena”. Kuo mažiau sprendimų reikia priimti, tuo geriau.
    • Vizualūs priminimai. Užrašai ant durų, kontroliniai sąrašai prieš išeinant.
    • Technologijos. „AirTag” ar panašūs ieškikliai raktams, telefonui – sumažina pasekmių svorį.
    • Kantrybė ir humoras. Vietoj „vėl pamiršai?!” – „ei, raktai ant stalo laukia tavęs.” Tai sumažina gėdą ir padeda žmogui jaustis saugiai.
    • Bendras požiūris: tai ne charakterio trūkumas, o smegenų veikimo ypatybė, su kuria galima išmokti gyventi – bet reikia palaikymo, ne kritikos.

    Svarbiausia suprasti: ADHD žmogus nepamiršta daiktų dėl to, kad jam nerūpi. Jam rūpi – kartais net per daug. Tiesiog smegenys veikia kitaip.

  • BTC and ETH whales wallets

    #LabelAddressBTC
    1Unknown (largest unidentified)‎⁠bc1qd4ysezhmypwty5dnw7c8nqy5h5nxg0xqsvaefd0qn5kq32vwnwqqgv4rzr⁠92K
    2Unknown (zero outflows)‎⁠bc1q8yj0herd4r4yxszw3nkfvt53433thk0f5qst4g⁠78K
    3“Mr.100” (actively trading)‎⁠1Ay8vMC7R1UbyCCZRVULMV7iQpHSAbguJP⁠74K
    4Unknown (+2K in 30d)‎⁠bc1q0ymzksy046tv4z88ts5nmu7s574umnwmdev3rt⁠63K
    5Unknown (dormant since 2014)‎⁠1LdRcdxfbSnmCYYNdeYpUnztiYzVfBEQeC⁠54K
    6Unknown (zero outflows)‎⁠1AC4fMwgY8j9onSbXEWeH6Zan8QGMSdmtA⁠52K
    7Unknown (zero outflows)‎⁠1LruNZjwamWJXThX2Y8C2d47QqhAkkc5os⁠44K
    8Unknown (new Mar 2026, +23K in 30d)‎⁠bc1q0j55cut9nd2c88tnnsfultdx696c8lt6n4n0su⁠43K
    9Unknown (distributing, -520 in 7d)‎⁠bc1qws342rlkhszh58rtn35zrw7w076puz83gkcufy⁠41K
    10Unknown (+6K in 30d)‎⁠bc1qy3uw2kk45uj9vsy52rjfhydm2tnd6hreu8vha3⁠37K
    11Unknown (+1.4K in 7d)‎⁠bc1qukw69mjxwp30adfqddv6gcyva26laxz562rhlk⁠30K
  • Strategy

    Strategy

    🏦 “BitVac” — How Michael Saylor’s Company Secretly Became a Bitcoin Machine 

    💡 The big picture: Last week, everyone panicked because Saylor’s company “Strategy” (formerly MicroStrategy) stopped buying Bitcoin. But here’s the twist — they weren’t retreating. They were reloading. 🔄

    🤔 So what did they actually do?
    Instead of buying more Bitcoin, they spent $1.38 billion to buy back their OWN debt at a discount — basically paying $0.92 for every $1 they owed. That’s a cool $120 million saved 💰, and it protects existing shareholders from getting diluted.

    ⚙️ How the “BitVac” machine works (3 steps):

    1. 🫁 Breathe in — Raise cash by selling special high-yield shares (STRC, paying 11.5% returns)
    2. ⏸️ Hold breath — Use that cash to buy back their own debt at a discount, cleaning up the balance sheet
    3. 💨 Breathe out — Dump whatever’s left into buying Bitcoin on the open market

    Last week’s “pause” was just step 2. The machine is charging up for the next big Bitcoin buy. 🔋

    📊 Why this is wild:
    The company doesn’t even measure success by profit anymore. They use “BTC Yield” — basically how much Bitcoin they earn per share. It’s at 12.6% this year. Traditional stock metrics? Useless here. 🗑️

    ⚠️ The risk nobody’s talking about:
    The SEC has no rulebook for what this company is doing. If regulators decide to classify them as an unregistered investment fund, the entire operation could be shut down overnight. 😬

    🎯 Bottom line: Stop watching daily Bitcoin ETF flows. The real action is hiding in Strategy’s financial reports — watch when they switch from “debt destruction” mode to “Bitcoin buying” mode. That’s the signal. 📡