Xavier's Weblog[About]
•note

Exploring Next.js Project Structure and Sanity CMS Through a Simple Hotel Information Management System

Imagine a small hotel that needs a website to showcase its rooms infomation and update its latest offers, but the hotel team has no background in web development. How are they going to make changes on their official website. This is where a headless CMS like Sanity comes in. Compared to traditional CMS tools, Sanity doesn’t provide front-end templates out of the box. Instead, it essentially acts as a content management system that provides an interface for both developers and business users to manage content. More specifically, Sanity focuses on organizing content, the content team prepares the materials, and the developers set up the redering process. A simple Next.js project for a hotel website might look like this: hotel-directory/ ├── studio/ # CMS backend │ ├── sanity.config.ts │ ├── sanity.cli.ts │ └── schemaTypes/ │ ├── hotelType.ts │ └── index.ts │ └── frontend/ # Website ├── src/app/ │ ├── page.tsx │ └── layout.tsx │ ├── src/sanity/ │ ├── env.ts │ ├── lib/ │ │ ├── client.t...

•note

Modern Money: How Debt Creates Money, and Why Money Creation Can Put an Economy at Risk

Modern money is largely created through a system of credit and debt. Commercial banks can create new deposits when they lend, while repayment of loan principal generally destroys deposits. When borrowers default, the money previously transferred to others does not automatically disappear. Consequently, the money supply can grow even when some debts are never repaid. However, money creation does not automatically create real wealth. If the expansion of money and credit persistently outpaces productive capacity, it can contribute to inflation, asset bubbles, excessive debt, and declining confidence in the currency. The fundamental challenge for monetary policy is therefore not simply how to create money, but how to maintain a sustainable relationship between financial purchasing power and the real economy. Introduction: Where Does Money Come From? When we think about money, we often imagine that a central bank prints banknotes and distributes them to the public. This makes it seem as t...

•note

I was vibe coding my first website until the DNS screen humbled me. Here is how that stuff actually works.

If you’ve been building stuff recently in this whole "vibe coding" wave, you probably know the exact feeling I'm talking about. You sit down with your AI tool, prompt your way through building a clean little web app in an afternoon, and everything feels effortless. The code writes itself, the previews work, and you finally buy that domain name you’ve had floating in your head for three weeks. Then comes the moment you try to connect that shiny domain to your live project on Vercel or whatever host you’re using. Suddenly, the AI stops talking like a conversational collaborator and starts throwing strings of technical jargon at you: "Go to Cloudflare, add an A record with @ pointing to 76.76.21.21, then create a CNAME for www pointing to cname.vercel-dns.com." We paste it in, we wait five minutes, and miraculously it works. Ninety-nine percent of the time, nobody questions it. But if you’re like me, doing something without understanding what is happening behind the curtain feels deepl...

•quote

How hard can it be?

•note

Dictation might be a good way to learn Korean for the beginer

Since at the very begining, we feel so confused about how those character sound. Especially when we see a whole sentence, our brain will shock, and have no idea from where to decode the sentence. So first start might be a pronuciataion and ditation practice, without the need of knowing its meaning.

•note

Prompt for generating POV Stories to study language

Act as an expert language teacher and linguist who specializes in the Point-of-View (POV) and TPRS (Teaching Proficiency through Reading and Storytelling) methods. I want you to create a customized POV mini-story lesson for me based on the following parameters: Target Language: [Insert Language and Dialect, e.g., European Portuguese, Mexican Spanish, etc.] My Current Level: [Insert Level, e.g., A2 Beginner, B1 Intermediate] Topic/Context: [Insert your specific interest, e.g., A software engineer ordering coffee in Tokyo / A historical story about the samurai / Planning a camping trip in the Canadian Rockies] Specific Vocabulary/Grammar I want to practice (Optional): [e.g., Past tense, food vocabulary, subjunctive mood] Please generate the lesson following this exact structure: Part 1: The Core Vocabulary Extract the 8-10 most important vocabulary words or phrases from the story. Provide them in a list with their English translations. Part 2: The Baseline Story (Version 1) Write...

•elsewhere

Question 01

AI will not have any hesitation to reply you answer even though it doesn’t now the exact answer, while we human will hesitate if we are not sure about the answer. Is that a place that AI have already doing better than human?

•entry

Speaking Well in a Foreign Language

Tip 1: Focus on Intonation, Not Sounds. Perfecting your accent is not the most important part of speaking a language. As long as you can be understood and the person listening to you is comfortable, your pronunciation is "good enough." Instead of stressing over specific letters (like the French guttural 'R' or Spanish rolling 'R'), focus on the melody and rhythm (intonation) of the sentence. If you get the melody right, the specific vowel and consonant sounds will naturally fall into place over time. Tip 2: Focus on Words (Vocabulary) AI doesn't memorize grammar rules; it ingests massive amounts of text (corpora) and learns to predict what word comes next based on probability. Your brain works the same way. If you expose yourself to a massive amount of words, you will naturally start predicting how they connect to each other. When you are speaking, having a large "bag of words" allows you to pull out a word that works in the moment and keep the conversation going, even if the gramma...

•elsewhere

I cried when I saw this image

The picture shows Larry Guth, a highly respected mathematics professor at MIT, standing out in the hallway, peering intently through a narrow vertical window on a closed door. Inside the room, his former PhD student, Hong Wang, is giving a mathematics presentation to a packed room. Because the room was full, Guth humbly stood outside in the hall, pressing his face toward the glass just to watch her present her work....

•entry

Forgeting might be the best way to remember vocabulary

Our brains are built for high-dimensional information (rich context, multiple senses, interconnected ideas) rather than low-dimensional information (a single, isolated vocabulary word on a flashcard). In machine learning (which Kaufmann references via AI pioneer Geoffrey Hinton), words are mapped in high-dimensional vector spaces. An isolated word has very few connections, so the brain discards it to save energy. But a word encountered in a story—connected to an emotion, an image, a character, and a grammatical structure—has thousands of neural anchor points. Cognitive psychologist Robert Bjork's "New Theory of Disuse."proved that Retrieval Strength (how easily you remember a word right now) and Storage Strength (how deeply the word is wired into your brain) are different. When you forget a word (retrieval drops) and then re-encounter it later in a new context, your brain is forced to rebuild the pathway. This struggle creates a massive spike in Storage Strength, making the neural co...