Vim in (not so) short

🔔 Prelude: Yes, You can always type :h to see help, for example, :h windows Vim in not so short Preliminaries When vim is not available, you can temporarily use cat or nano as alternatives When using a new IDE, you should first learn or configure: save copy / paste duplicate line delete word / delete line line movement navigate forward / back undo / redo page navigation (page down, page up, center to middle, etc.) indent / unindent multi-cursor search / content search input commands (Ctrl + P in VSCode, double Shift in IntelliJ, : in vim…) completion, suggestion, parameter hint, hover hint go to / peek definition, type, declaration, reference, implementation rename symbol / refactor (if available) AI controlling: toggle chat box, trigger inline chat… tabs / windows management Use the :help command to query anything you don’t understand :set option? can view current settings Windows and Tabs Buffer: Can be understood as a temporary file. Even if this file is edited, it doesn’t mean it’s written to the actual file. We can observe buffers through windows and manage them through tabs. ...

2026-09-10

Window Functions in SQL

🔔 Prelude: Boss: “I need the average sales for 7 days.” Me: “Sure! Which 7 days?” Boss: “All the 7 days!” Me: “Su…Sure…?” 🖋️ Window Functions Window functions are generally applied after aggregate functions like MAX(), MIN(), AVG() to perform calculations across a set of table rows(days before, days after) that are related to the current row(current day). Example Table 1: employees employee_id department_id salary 1 101 5000 2 101 6000 3 101 5500 4 102 7000 5 102 7200 6 102 6800 Example 1: OVER() Without Partitioning Calculate the average salary for all employees: ...

2026-09-10

CO-STAR Template for ChatGPT

🔔 Prelude: If you use ChatGPT frequently, you’ve probably encountered situations where it provides off-topic answers. Since we can’t modify the model, the better approach is to rely on accurate prompts and additional context. 🖋️ Main Let ChatGPT Answer Your Questions Accurately! First, you need to let ChatGPT know some personal information about you and how it should respond to you. Click on your profile picture at the top right corner. Select “Customize ChatGPT.” Hover over the “Custom Instructions” question mark on the right and fill in the information as guided. Use the specific CO-STAR template in a new session. Interact with ChatGPT. CO-STAR Template The CO-STAR template is a structured method that can help you communicate more clearly and effectively with ChatGPT. By providing context, objectives, style, tone, audience, and response format, you can explain exactly what you need from ChatGPT, and get replies that correspond more closely with your requirements. ...

2026-09-10