Welcome to Shan’s Blog

Welcome to my blog. I’m Shan Xiao, a programmer. Here is my open notes, I write about technology, programming, open source, and anything else that comes to mind. Let’s learn and grow together. If you’re interested, here are some of my side projects : Thought Manager, SSM, Kids Story, Resume Manager

ICAS math

Understanding Cognitive Levels in ICAS : Cognitive Level Description Example in ICAS Context Recall / Remembering Recall facts, terms, units, definitions without manipulation Know that 1 kilometre = 1000 metres Understanding Explain or interpret facts; classify, describe, or summarize Explain the meaning of a pie chart Applying Use information in new or practical situations Calculate the area of a rectangle given its dimensions (Pattern Recognition) Identify regularities, trends, or rules among data or sequences Predict the next number in a sequence: 2, 4, 8, ?...

June 3, 2025

AI-Powered Workflows: Value Creation, Key Technologies & Challenges

1. Value Creation on Existing Software Unified chat interface reduces context-switching Automated, trigger-based workflows (“say once, do always”) Knowledge-driven outputs with continuous learning loops Scalable plugin ecosystem for third-party integrations 真正的工具只是自然语言的转换接口 2. Key Application Technologies Natural Language Understanding & Dialogue Management Workflow orchestration (triggers, branching, retries) Retrieval-Augmented Generation (RAG) for content accuracy Plugin invocation framework (OpenAPI/gRPC, sandboxing) Low-code visual builders (flow & dialogue editors) 3. Key Foundational Technologies Transformer-based LLMs and fine-tuning pipelines Vector databases and similarity search engines Distributed workflow engines (Temporal, Airflow) Containerized microservices (Kubernetes, Docker) API gateways and service meshes (Istio, Envoy) Observability stacks (Prometheus, Jaeger) 4....

May 27, 2025

AI Learning Roadmap: From Foundations to RAG and Beyond

This blog is still a work in progress; I’ll continue to update it. last update : 2025-05-20 1. Foundations of Machine Learning Core concepts: supervised vs. unsupervised learning, key algorithms Neural networks basics: perceptron → deep feed-forward → CNNs / RNNs Introduction to NLP & Transformer: attention mechanism, encoder–decoder architectures To grasp the basic concepts in about two hours, you can choose Understanding LLMs from Scratch Using Middle School Math....

May 20, 2025

How to Learn in the Age of AI: Focus on Problem Solving and Sustainable Action

“All education is about learning to think. It’s about learning to problem solve. And whether that was 30 years ago, now or 30 years from now. I think the technology changes over time, but if you can learn how to solve problems, you are going to do great things.” — Lisa Su (AMD CEO) The world is changing faster than ever before, thanks to the rapid development of AI and other new technologies....

May 20, 2025

The Character-Indexed Object Problem in Laravel Docker APIs

1. Problem Description In a typical Laravel + Docker API deployment, you may notice an odd, intermittent bug: when accessing the same API endpoint multiple times in a row, the returned JSON response is sometimes corrupted. Instead of a normal structure like this: { "success": true, "data": [ { "id": 1, "name": "Test" } ], "statusCode": 200 } You might occasionally get something like this: { "0": "{", "1": "s", "2": "u", // ....

May 18, 2025

Simple Delpoyment Workflow

Vercel and similar platforms have dramatically lowered the complexity of deploying web applications. For many individual developers or simple projects, sophisticated CI/CD pipelines and branching strategies may be overkill. In this blog post, we’ll walk through a lightweight Git-based deployment workflow that’s easy to manage, beginner-friendly, and perfectly suited for small- to medium-sized projects. 1. Workflow Overview This workflow assumes you’re using Vercel and Git (either via CLI or VS Code)....

April 30, 2025

Designing Better Web Request Interactions

Designing Better Web Request Interactions with MUI When designing web applications, handling user interactions during network requests is crucial for delivering a smooth, responsive, and professional experience. In this blog post, we’ll explore the purpose behind request interaction design, the six recommended interaction patterns (with Material-UI components), and how to apply them to typical scenarios. 1. Purpose: Core Goals of Web Request Interaction Design Clearly Communicate System Status: Users should always know whether an action is processing, succeeded, or failed....

April 28, 2025

SaaS Test 2 : Test Case

1 Principle ✅ What Each Testing Layer Should Do Testing Layer What to Test Example 🟩 Unit Test Test core logic of individual functions or classes, without external dependencies Validate password strength: PasswordValidator::isStrong() 🟨 Integration Test Test how modules/services interact, often with real DB or services Check if user registration inserts into DB and sends email 🟥 End-to-End (E2E) Test Simulate real user behavior across the full stack Fill out registration form in browser → submit → redirect to dashboard ❌ What Each Testing Layer Should NOT Do Testing Layer Don’t Do This Reason 🟩 Unit Test Don’t access DB, network, or real APIs Unit tests should be fast, isolated, and logic-only 🟨 Integration Test Don’t test UI rendering or button positions Integration tests focus on backend/data flow, not UI components 🟥 End-to-End (E2E) Test Don’t test detailed field validations (e....

April 20, 2025

SaaS Test 1 : Phased Testing Strategy for a SaaS System

‘SaaS Test 1 : Phased Testing Strategy for a SaaS System 🧪 Phase 1: Demo Stage – Manual Testing 🎯 Goal Quickly verify that basic user functions (e.g., registration and login) work as expected without investing time in automation. 🛠️ How Write and follow simple test cases manually. Use DevTools to debug UI or network errors. Focus on form validation, error messages, and navigation. 🧾 Example Test Cases Feature Test Case Expected Result Register Valid email and password Redirect to login or dashboard Register Weak password Show “password too weak” error Login Valid credentials Redirect to dashboard Login Wrong password Show “invalid credentials” error Logout Click logout Return to login page ❌ Why Not Use Playwright Yet?...

April 20, 2025

Json web token

In my latest Laravel project, the backend uses Laravel APIs and the frontend is built with Next.js. I used JWT for auth, and after finishing the setup, I reviewed the basics of how JWT works. 1 The Problem with Cross-Domain Authentication Online services can’t do without user authentication. Here’s how it typically works: The user sends their username and password to the server. Once the server verifies the credentials, it stores some related data in the current session—like the user’s role, login time, etc....

April 14, 2025