<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Zayee</title><description>blog</description><link>https://zheyi.in/</link><language>en</language><item><title>On My Way</title><link>https://zheyi.in/posts/lab/on-my-way/</link><guid isPermaLink="true">https://zheyi.in/posts/lab/on-my-way/</guid><pubDate>Fri, 06 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Test: Try to write a short poem&lt;/h1&gt;
&lt;h2&gt;I&apos;m on my way&lt;/h2&gt;
&lt;p&gt;Testify my ability.&lt;/p&gt;
&lt;p&gt;Show my parents that I have been out of their expect.&lt;/p&gt;
&lt;p&gt;Prove myself worth it.&lt;/p&gt;
&lt;p&gt;Find my upper realm.&lt;/p&gt;
&lt;p&gt;I also used to be young. Full of ambition.&lt;/p&gt;
&lt;p&gt;Imagine myself mantled the golden light. Illuminating everyone nearby me.&lt;/p&gt;
&lt;h2&gt;I&apos;m on my way to run away&lt;/h2&gt;
&lt;p&gt;I have been too tired.&lt;/p&gt;
&lt;p&gt;Drag my lag trotting through the dark route.&lt;/p&gt;
&lt;p&gt;Moonlight cast behind me. Try to navigate me back, rather running away.&lt;/p&gt;
&lt;p&gt;But I have been too tired.&lt;/p&gt;
&lt;p&gt;My flesh was teared. My consciousness was destroyed.&lt;/p&gt;
&lt;p&gt;So, I run away.&lt;/p&gt;
&lt;h2&gt;Why I&apos;m back to my way?&lt;/h2&gt;
&lt;p&gt;Am I a maniac, or a idiot?&lt;/p&gt;
&lt;p&gt;I will be teared again, knocked down again.&lt;/p&gt;
&lt;p&gt;But I&apos;m back.&lt;/p&gt;
&lt;p&gt;Because I&apos;m a maniac, and a idiot?&lt;/p&gt;
&lt;p&gt;I don&apos;t know.&lt;/p&gt;
&lt;p&gt;A maniac can&apos;t analyze with logic.&lt;/p&gt;
&lt;p&gt;A idiot don&apos;t know which is better, back ot forward.&lt;/p&gt;
&lt;p&gt;So, yes I am.&lt;/p&gt;
&lt;p&gt;After all, I&apos;m crawling on my way.&lt;/p&gt;
</content:encoded></item><item><title>24-26, Computer Major, and Thoughts on AI Era</title><link>https://zheyi.in/posts/misc/summary-and-future-schedule/</link><guid isPermaLink="true">https://zheyi.in/posts/misc/summary-and-future-schedule/</guid><description>Sharing my own experience and plans. Hope you get some ideas from it.</description><pubDate>Sat, 25 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my first English blog post. Even though I&apos;m Chinese, I am planning to write in English from now on. Here are the reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To practice my English&lt;/li&gt;
&lt;li&gt;To prepare for studying abroad (so that I can share it with my future foreign friends)&lt;/li&gt;
&lt;li&gt;Because it&apos;s cool&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Usually, people don&apos;t share their plans with others on their blogs, I guess... Anyway, it&apos;s such a private thing. But I&apos;m an open-minded guy who doesn&apos;t care too much.&lt;/p&gt;
&lt;p&gt;Nowadays, I find that a lot of my juniors are confused and anxious about their future plans, overwhelmed by employment pressure (mostly driven by the rise of AI tech). For the purpose of helping latecomers and getting some advice from wiser people on my own plans, I wrote this post. You might know that I am someone who always dares to dream big. So my schedule is just like a daydream. Please, experts, give me suggestions about my plan if you have any constructive ideas.&lt;/p&gt;
&lt;h1&gt;Choosing college preferences —— decide to learn Computer Major —— 24.7 - 24.9&lt;/h1&gt;
&lt;p&gt;At the start of choosing my major and college after the Chinese National College Entrance Examination (Gaokao), I spent some time deciding what major I wanted to study and work in (and also earn a lot of money from). It turned out to be Computer Science.&lt;/p&gt;
&lt;p&gt;After that, I began to search for information about colleges I was capable of applying to. After more than ten days of deep research, I decided to apply to Zhejiang University of Technology (ZJUT, where I currently study), even though my Gaokao score was barely enough to get me into an unpopular degree program (which certainly excluded Computer Science). So, it was highly unlikely for me to get into it directly.&lt;/p&gt;
&lt;p&gt;If you are familiar with me, you should know that I successfully went through a Change of Major. Yes, in fact, back when I was submitting my college preferences, I had already researched the feasibility of it by reading posts on Baidu Tieba, talking with seniors in ZJUT freshmen group chats, and reading relevant official documents. I&apos;m totally a daydreamer (lol).&lt;/p&gt;
&lt;p&gt;So, days after submitting the college preference form, just as I had &quot;hoped,&quot; I got an offer for the chemistry program, and eventually successfully changed my major at the end of the first academic year (I also wrote a blog post about it).&lt;/p&gt;
&lt;p&gt;By the way, during that vacation, I spent two months learning C++ and some algorithms. One reason was certainly for my future Major Change Exam; the other was that I was considering preparing for the ACM Contest at the time.&lt;/p&gt;
&lt;h1&gt;Adapting to college life, and laying foundations for future choices —— 24.9 - 25.2&lt;/h1&gt;
&lt;p&gt;September 2024 (&lt;strong&gt;24.9&lt;/strong&gt;) marked the end of the summer vacation before formally stepping into college. At that point, I encountered &lt;a href=&quot;https://github.com/zjutjh&quot;&gt;zjutjh&lt;/a&gt;, a club at ZJUT consisting of many high-tech computer lovers. There, I was introduced to the job of a website/software developer, met lots of ambitious and distinctive people, and stumbled upon my possible future —— being a &lt;strong&gt;front-end&lt;/strong&gt; developer.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-9/image.png&quot; alt=&quot;alt text&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I haven&apos;t mentioned yet that I&apos;m not a local in Hangzhou, where ZJUT is located. So coming here felt like a tour to me. I experienced a colorful life here, but that&apos;s not today&apos;s topic.&lt;/p&gt;
&lt;p&gt;Oh, don&apos;t forget, I was still a chemistry student at that time. So while taking chemistry courses, I was also learning front-end development. But I wasn&apos;t too busy because most engineering programs share a similar course schedule at my school, usually consisting of Advanced Mathematics, a programming language (mostly C++ or Python), College English, and so on.&lt;/p&gt;
&lt;p&gt;At that time, I learned how to develop the front-end of a website in just two weeks and produced my first website (as a sort of entrance exam), although it was really ugly and hard to use. I had my first teamwork development project with others (who are my friends right now). I built my blog (yeah, the one you&apos;re surfing right now). I also took part in the development of an official online project (named &lt;a href=&quot;https://github.com/zjutjh/WeJH-Taro&quot;&gt;WeJH&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;As we all know, in China, college students usually have four post-graduation pathways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Taking the National Postgraduate Entrance Examination (requires you to study hard in the last two years of college)&lt;/li&gt;
&lt;li&gt;Postgraduate recommendation (a standard policy in Chinese colleges, requiring you to work hard your entire college life to compete with others for limited spots)&lt;/li&gt;
&lt;li&gt;Studying abroad (usually costs a large amount of money)&lt;/li&gt;
&lt;li&gt;Direct employment&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;At that period, I thought there was a &lt;code&gt;60%&lt;/code&gt; chance for me to directly get employed, &lt;code&gt;30%&lt;/code&gt; to take the postgraduate entrance exam, and &lt;code&gt;10%&lt;/code&gt; for the remaining two.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OK, remember this percentage distribution, my readers. After a period, it will change a lot. This reveals how my considerations for my future plans shifted during different periods.&lt;/p&gt;
&lt;h1&gt;Make a rough decision to work as a developer —— 25.2 - 25.9&lt;/h1&gt;
&lt;p&gt;As my experience and skills in front-end development grew, working as a front-end developer became a clear, viable pathway for me. I figured I would probably choose this path. It was a stable route back then, after all (when the IT industry hadn&apos;t been heavily disrupted by AI yet).&lt;/p&gt;
&lt;p&gt;Repeat again, I am totally a daydreamer. I wish I could earn more money than my parents. And please don&apos;t laugh at me for this &quot;stupid&quot; wish. It&apos;s not easy for me to achieve that. And I deliberately aimed for it when choosing my school and major. It&apos;s well-known that being a coder in a large-scale company usually earns a lot, although, in my view, that &quot;a lot&quot; doesn&apos;t always seem to be enough.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The paragraphs above were written on 2026-05-20, and the paragraphs below are written on 2026-07-25. Well, maybe just because I&apos;m a little busy, also lazy...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, I have totally forgotten the context of this post... Let me just casually write down whatever comes to my mind.&lt;/p&gt;
&lt;p&gt;After all, I went through a lazy term from 25.2 to 25.6. Nothing specific happened. Just normally working on some projects, committing some code, and preparing for my Major Change Exam. The result of that exam? A success, certainly.&lt;/p&gt;
&lt;p&gt;From 25.6 to 25.9 was the summer holiday. At that time, I spent most of my time in the club —— zjutjh, as management-level staff (In fact, most work was still about website and software projects, not management).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;At that period, &lt;code&gt;70%&lt;/code&gt; for directly getting employed, &lt;code&gt;20%&lt;/code&gt; to take the postgraduate entrance exam, and &lt;code&gt;10%&lt;/code&gt; for the others.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;AI technology was already quite strong at that time. But I wasn&apos;t too worried about future unemployment because the seniors seemed to &quot;succeed&quot; with such jobs. This is how the environment influences an individual—gradually and unconsciously. You probably won&apos;t even notice that your way of thinking has changed, becoming quite different from how you used to be.&lt;/p&gt;
&lt;h1&gt;Crush? Break down? Wake up? - 25.9 - 26.2&lt;/h1&gt;
&lt;p&gt;You might notice that I mostly divide sections by school terms. Yes, you&apos;re right. It&apos;s for my own convenience to write such an article in English. SO HARD! There might be better ways to structure it, but I just want to finish this post, which has dragged on for 2 months.&lt;/p&gt;
&lt;h2&gt;Bet on Embodied Intelligence&lt;/h2&gt;
&lt;p&gt;Back to context.&lt;/p&gt;
&lt;p&gt;It&apos;s usually hard for an individual to suddenly change their future plans unless something big happens.&lt;/p&gt;
&lt;p&gt;There were two events that contributed to my reconsideration about my future, I guess:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I started to truly feel the impact of AI coding tools myself.&lt;/li&gt;
&lt;li&gt;In October 2025, my family hosted a banquet to celebrate achieving a small financial goal.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the first one, I experienced how strong AI was on my own. Also, I searched for and watched serious AI-related videos, including talks from various &quot;professors&quot; across different fields (some are just internet keyboard warriors, so I add quotation marks), and some interviews with Elon Musk.&lt;/p&gt;
&lt;p&gt;I started to re-evaluate my understanding of AI technology&apos;s development, and even the world&apos;s.&lt;/p&gt;
&lt;p&gt;Here was my basic idea of AI:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is the Fourth Industrial Revolution. The world will be fundamentally changed over the next few decades, just as it was after the invention of the Steam Engine and humanity&apos;s mastery of Electricity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don&apos;t want to over-explain this. I just believe the entire industrial structure of society will be completely transformed in the coming years.&lt;/p&gt;
&lt;p&gt;So, this led to a question —— will programmers become unemployed?&lt;/p&gt;
&lt;p&gt;Hah, I&apos;m not sure. But I just believe that traditional path won&apos;t be the one I want to take.&lt;/p&gt;
&lt;p&gt;At first, I just considered becoming a postgraduate student in AI. But finally, my eyes were caught by a new phrase —— embodied intelligence.&lt;/p&gt;
&lt;p&gt;If you are totally unfamiliar with that term, you can just think of it as &quot;Robots.&quot;&lt;/p&gt;
&lt;p&gt;Here is my opinion (translated by AI. In fact, my original intention for this passage was to show exactly this):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;From a macro perspective: software-level applications like agent development are ultimately restricted by two carriers —— network and computer. AI, as the highly possible core tech of the forth Industrial Revolution, is the core of productivity reform in our new era. This technology will bring contemporary people a shock and a huge leap in productivity, which totally surpasses what steam engine did to the manual era, electrical devices to the steam era, and Internet to the electrical era. And obviously, such a leap couldn&apos;t just be achieved inside a tiny computer or behind a single screen. Technology needs to be landed into the real physical world, and AI needs a pair of hands to work. Just like steam engine needs a locomotive to run thousands of miles, electricity needs various electric devices to bring us the electrical era and needs light bulbs to light up the earth, and the Internet needs to enter thousands of households&apos; computers and cellphones to truly change people&apos;s lives. Embodied Intelligence —— is exactly the way how AI, this infinite energy source, changes the world.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Consider studying abroad&lt;/h2&gt;
&lt;p&gt;The banquet hosted by my family made me aware of our real financial situation. Also, at that time, two coincidences happened.&lt;/p&gt;
&lt;p&gt;First, my father asked me to contact a relative who had earned a considerable amount of money in Denmark.&lt;/p&gt;
&lt;p&gt;Second, one of my seniors was considering studying abroad.&lt;/p&gt;
&lt;p&gt;I started to formally consider studying abroad.&lt;/p&gt;
&lt;p&gt;After contacting relevant organizations both online and offline, and spending dozens of hours searching and organizing information on the Internet, I found a reasonably feasible path.&lt;/p&gt;
&lt;p&gt;I knew that studying abroad (without a massive budget prepared) could be a challenge. But deep down, I wanted to experience new cultures and a new lifestyle. Rationally thinking, such a challenge would make me grow a lot.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Now &lt;code&gt;50%&lt;/code&gt; for studying abroad, &lt;code&gt;30%&lt;/code&gt; for getting employed directly, and &lt;code&gt;20%&lt;/code&gt; for taking the postgraduate entrance exam.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, this doesn&apos;t mean I will give up on finding internships or other ways to earn money and hone my skills during the last two and a half years of my college life.&lt;/p&gt;
&lt;p&gt;On the contrary, I must prove myself by showing my ability to earn money, so that I can get my family&apos;s support to study abroad. Plus, it&apos;s a great way to challenge myself.&lt;/p&gt;
&lt;h1&gt;END&lt;/h1&gt;
&lt;p&gt;It is July 2026 (26.7) right now. But I am a bit reluctant to write another paragraph about my experience during the recent term.&lt;/p&gt;
&lt;p&gt;That&apos;s all.&lt;/p&gt;
</content:encoded></item><item><title>From a 2.3 to a 3.6 GPA: What I Did</title><link>https://zheyi.in/posts/misc/semester2term1-final-exam/</link><guid isPermaLink="true">https://zheyi.in/posts/misc/semester2term1-final-exam/</guid><description>A clickbait title, plus some thoughts after my first-semester final exams in year two.</description><pubDate>Thu, 05 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;p&gt;This post has not been polished by AI. If there are typos or awkward sentences, I may fix them when I feel like it.&lt;/p&gt;
&lt;h1&gt;Some Random Thoughts&lt;/h1&gt;
&lt;p&gt;The title is clickbait, as the subtitle says, but it is true. My &lt;code&gt;2.3&lt;/code&gt; was the GPA from the second semester of my first year. I had just transferred majors, got a little carried away, and thought I would never need my GPA, so I did not take several classes or finals seriously. My &lt;code&gt;3.6&lt;/code&gt; is from this semester, the first semester of my second year. &lt;s&gt;It still missed my target by a lot.&lt;/s&gt;&lt;/p&gt;
&lt;p&gt;I wanted to prove that, if I really wanted something, I could achieve it—even earn a postgraduate recommendation if I chose that path. I hoped for extremely high scores this term, but two or three courses I studied seriously for let me down.&lt;/p&gt;
&lt;p&gt;Still, this was the hardest I have worked academically in more than a year of university. I want to record this small moment of glory, and share a few study methods.&lt;/p&gt;
&lt;p&gt;There are plenty of university students with GPAs above 4.0, so there is little here to show off. But few people who score well actively share their methods; fewer write those methods into a post, and they may not even be in your major. Besides, although I did poorly in some subjects, I also did well in others. If we ignore the bad ones, every course went great!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/Screenshot_20260207_095825.webp&quot; alt=&quot;Grades&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I will not explain how to improve participation grades, nor how to make a physically present body sit in class while the real person is elsewhere.&lt;/p&gt;
&lt;h1&gt;General Study Method&lt;/h1&gt;
&lt;p&gt;I do not think I have special talent for studying. If people spend as much time as I did and use it well, they can probably score well too. I had ten finals because transferring majors added three make-up courses: C Programming Fundamentals, Discrete Mathematics, and Linear Algebra. Students taking fewer courses naturally have more review time per subject.&lt;/p&gt;
&lt;p&gt;I cannot learn everything instantly, so I started preparing in &lt;strong&gt;week 14&lt;/strong&gt;, even for material that had not finished being taught. I printed two collections of past papers and eventually completed about half of them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/81be1bb4daf97d2e5df91261f7154243.webp&quot; alt=&quot;One paper collection&quot; /&gt;&lt;/p&gt;
&lt;p&gt;You can find papers in several places:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Teachers&apos; DingTalk, QQ, or WeChat groups.&lt;/li&gt;
&lt;li&gt;Course materials on the school learning platform.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/zjutjh/zjut-icicles&quot;&gt;ZJUT Course Strategy Sharing Project&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Senior students.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For every subject except some ideological-and-political courses, try to get several papers. Senior students are normally happy to help: they were helped by their seniors too.&lt;/p&gt;
&lt;p&gt;Unless a review outline genuinely limits the scope of an exam, I do not think it matters much. Online review materials can do the same job. Ideally, finish learning all subjects and reserve a whole week for papers. I only had half a week left because I underestimated how long the &lt;strong&gt;Data Structures&lt;/strong&gt; and &lt;strong&gt;Computer Networks&lt;/strong&gt; course projects would take. Several subjects became one- or two-day cramming sessions, so I did badly in them.&lt;/p&gt;
&lt;p&gt;For some science and engineering courses, I self-studied with Gemini, textbooks, and Bilibili videos. My overall review process, apart from two political courses, was:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Do papers, find what I cannot do -&amp;gt; ask Gemini or search Bilibili to learn it -&amp;gt; do related questions again.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Courses Scoring 85 or Above&lt;/h1&gt;
&lt;p&gt;I will go from highest score to lowest. I personally do not think anything below 90 is truly good, so treat these mainly as study ideas.&lt;/p&gt;
&lt;h2&gt;C Programming&lt;/h2&gt;
&lt;p&gt;I will skip this one. I only took it as a make-up course after changing majors. For a second-year student, this result was normal—mainly because I barely studied it.&lt;/p&gt;
&lt;h2&gt;Data Structures — 91&lt;/h2&gt;
&lt;p&gt;I was surprised by this score, not because I studied badly, but because the exam was genuinely difficult. The teacher&apos;s mock paper was rather easy; the real paper had roughly twice as many questions. I wrote from the moment I received it until the end, mostly drawing diagrams and handwriting code. I nearly forgot to transfer the multiple-choice answers to the answer sheet, then used all my Gaokao-trained emergency speed to scribble them down. I left with shaking legs and no energy to cycle back to my dorm.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Anyway, here is how I studied it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Weeks 1–5: Labs Only&lt;/h3&gt;
&lt;p&gt;I only followed the labs and did not study separately. Writing data-structure labs yourself is useful because it is real code practice. I spent about &lt;code&gt;9h&lt;/code&gt;, usually one or two hours per lab.&lt;/p&gt;
&lt;h3&gt;Weeks 6–8: Midterm Preparation&lt;/h3&gt;
&lt;p&gt;I studied seriously and got 86 in the midterm. A good midterm is the foundation for a good final: a bad one loses marks, hurts confidence, and creates more review work. I self-studied with the textbook, asked Gemini questions, and practised from Wangdao&apos;s Data Structures book. This took about &lt;code&gt;9h&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Weeks 9–13&lt;/h3&gt;
&lt;p&gt;I barely studied except for labs, and did not even write one or two labs myself. Less than &lt;code&gt;7h&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Weeks 14–16: Final Review&lt;/h3&gt;
&lt;p&gt;Finishing the remaining textbook material took around &lt;code&gt;9h&lt;/code&gt;. I used the textbook plus Gemini for questions, and Bilibili videos.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/Pastedimage20260204211706.webp&quot; alt=&quot;Recommended data-structure videos&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This series is useful because you can learn one knowledge point at a time rather than watching from start to finish, and the animations make data structures easy to understand.&lt;/p&gt;
&lt;p&gt;Look at classic examples for each data structure. You do not need to solve every one, but you need to have seen them: problems use technical terms and may ask for something you cannot understand without context. Once you know the required structures and algorithms and have seen examples, the result largely depends on coding ability. Many diagram and code questions can be derived in the exam room. Papers plus review took around &lt;code&gt;5h&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can use Wangdao&apos;s postgraduate Data Structures book for the whole review.&lt;/p&gt;
&lt;h2&gt;University Physics II B — 89&lt;/h2&gt;
&lt;p&gt;This was the only course where consistently listening in class and working hard paid off exactly as expected. Data Structures above was a self-study result. I also listened seriously in Discrete Mathematics and Linear Algebra B, but got only 82 and 79, which made me furious at first.&lt;/p&gt;
&lt;p&gt;After calming down, the reason was clear: listening in class completed the first step, learning knowledge; it did not complete the second, learning how to solve problems. I had little homework in those subjects, did only one paper for each final, and never reviewed systematically. Knowing something is not the same as being able to score well on it.&lt;/p&gt;
&lt;p&gt;Physics had enough regular workbook questions, which made review easy. I had completed one pass by around week 15 and another before the exam. A good plan is to put 80% of your practice into the required workbook, then review it thoroughly. If you cannot solve a question during the term, Gemini 2.5 Pro-level AI can explain it clearly. If you never did the workbook during the term, do papers directly in finals: many workbook questions are difficult or not tested.&lt;/p&gt;
&lt;p&gt;Physics is not particularly convenient to self-study. If you must do it, read the book, ask AI, then find matching question types in past papers. At my school, the papers are public and my teacher posted enough on the learning platform. Also, some difficult material from class is not included in the final. In many chapters, only a few core formulas matter; for de Broglie waves, for instance, $\lambda = \frac{h}{p}$ may be enough.&lt;/p&gt;
&lt;h2&gt;Java Programming — 88&lt;/h2&gt;
&lt;p&gt;This was a real last-minute breakthrough. ZJUT&apos;s Java exam permits one open-book page. You do not need extremely deep Java knowledge: go through the syllabus or slides, copy what you do not know onto the sheet, then do two papers.&lt;/p&gt;
&lt;p&gt;The night before the exam, I studied and made the sheet from 20:00 to 1:30, then read two papers. Final review took &lt;code&gt;6h&lt;/code&gt;, and I had spent about &lt;code&gt;10h&lt;/code&gt; studying during the term.&lt;/p&gt;
&lt;p&gt;Handwritten programming questions, especially threads and GUI, are troublesome. Record code patterns for the major question types. My second open-book page covered threads, GUI, and streams/files. Please do not share these pages around if you use them as reference; it is embarrassing when people quote my blog in a live senior presentation.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/f132bfb981e37422970b923d4d5c4f70.webp&quot; alt=&quot;Java open-book page one&quot; /&gt;
&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/IMG_20260120_014221.webp&quot; alt=&quot;Java open-book page two&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This year&apos;s programming questions happened to be all handwritten types, with no GUI, so some preparation was unused. That does not mean those topics will not appear next year; past papers show that GUI and threads appear often.&lt;/p&gt;
&lt;h2&gt;Computer Networks and Data Structures Course Projects&lt;/h2&gt;
&lt;p&gt;Computer Networks project: &lt;strong&gt;88&lt;/strong&gt;. Data Structures project: &lt;strong&gt;Excellent (95)&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;These two projects were hell.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My biggest scheduling failure was not realizing how much time they would consume. Each took nearly two days, enough time to review Java twice. If you read this before finals, allocate time for projects carefully.&lt;/p&gt;
&lt;p&gt;For Computer Networks, I built a simulated school campus network in Packet Tracer.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/Pastedimage20260205082231.webp&quot; alt=&quot;Packet Tracer design&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The difficult parts were external/internal connectivity and port mapping. I used &lt;strong&gt;NAT&lt;/strong&gt;, a &lt;strong&gt;web browser&lt;/strong&gt;, &lt;strong&gt;port forwarding&lt;/strong&gt;, &lt;strong&gt;DNS&lt;/strong&gt;, and &lt;strong&gt;OSPF&lt;/strong&gt;, which I thought might earn bonus points. During assessment I explained the design for seven or eight minutes and passed easily. I asked for an Excellent grade, but got 88, probably because my report was weak. If you want a high report score, find a senior&apos;s past report with 95 or above.&lt;/p&gt;
&lt;p&gt;For Data Structures, I wrote an AVL-tree library-management system, like more than 90% of the class. The important part is having a distinctive idea that your teacher notices. Mine was multi-level tree comparison—&lt;strong&gt;category, then author, then title&lt;/strong&gt;. Books in the same category and by the same author become naturally adjacent in the data structure without manual sorting. The teacher seemed to like that small innovation.&lt;/p&gt;
&lt;h2&gt;Mao Zedong Thought and the Theoretical System of Socialism with Chinese Characteristics — 87&lt;/h2&gt;
&lt;p&gt;The key here is not doing papers. If you can recite the material, you can earn points. Memorize the focus points the teacher gives; they are usually what will appear. You may find many materials from older cohorts, but one or two supplementary sets are enough. All teachers for my cohort marked ten textbook focus points and three extended points, and they covered around 95% of the exam. For this kind of course, listening in class does not feel very useful for raising scores; the material has to be memorized.&lt;/p&gt;
&lt;h1&gt;Courses Below 85&lt;/h1&gt;
&lt;h2&gt;Marxist Theory — 84&lt;/h2&gt;
&lt;p&gt;The exam score was probably fine, but my participation score was terrible. One more absence and I would have been barred from the final. I even taught an unprepared roommate to a score in the seventies on the night before the exam, so I think I understood it reasonably well.&lt;/p&gt;
&lt;p&gt;Unlike the previous political course, this one is hard to cram. My teacher did not give focus points, and the content forms a connected system rather than isolated facts. You need to understand every chapter that can be examined, then remember it. It requires less pure memorization than other political courses; once you understand it, you mostly know it.&lt;/p&gt;
&lt;p&gt;If you cannot bear reading the textbook, try this series:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.bilibili.com/video/BV148izYpEMf/?share_source=copy_web&amp;amp;vd_source=e970904627a47198d9fad46da04134b7&quot;&gt;{An Exhaustive Production} Marxist Philosophy in One Go&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That link is only the philosophy section; the creator also has videos on the other parts. My cohort&apos;s exam was entirely long-answer questions, so do not waste time drilling multiple-choice questions that will not appear.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;I will skip PE, Probability Theory, and the courses where I did too badly to discuss them.&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Computer Networks — 82&lt;/h2&gt;
&lt;p&gt;This was probably the hardest course and there was genuinely a lot to learn, so I have little right to complain. There are two common Bilibili choices:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.bilibili.com/video/BV1NT411g7n6/?spm_id_from=333.1387.favlist.content.click&amp;amp;vd_source=90a1fb599bb5f5caeab5f4192ae1e503&quot;&gt;Computer Networks Made Easy&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.bilibili.com/video/BV1JV411t7ow/?vd_source=90a1fb599bb5f5caeab5f4192ae1e503&quot;&gt;USTC Computer Networking, Top-Down Approach, 7th Edition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Watch the first if you only want a good exam score; watch the second if you want to learn more networking knowledge. I watched the second and spent a lot of time on untested material, but I learned plenty and do not regret it.&lt;/p&gt;
&lt;h1&gt;Getting Through Final-Exam Weeks&lt;/h1&gt;
&lt;p&gt;I can only explain how I got through them. For two weeks, I sat at my dorm computer and studied from close to morning until night, though the intensity was moderate. I am a serious homebody and did not even want to leave the dorm to study.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/91c80dcc3c4b6a35ac237bab27fcf0da.webp&quot; alt=&quot;Studying in my dorm&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Two things helped me persist:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Chocolate.&lt;/li&gt;
&lt;li&gt;Friends&apos; company.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the first, substitute any light snack you love. I ate over 200g of chocolate in two weeks. I normally avoid buying it because I cannot stop eating it, but I temporarily unlocked chocolate as stress relief and somehow did not gain weight.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/image.webp&quot; alt=&quot;Chocolate&quot; /&gt;&lt;/p&gt;
&lt;p&gt;For the second, my friends and I used NetEase Cloud Music&apos;s Listen Together feature. Thinking of it now still feels warm.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-8%20S2T1FE/Screenshot_20260113_172535.webp&quot; alt=&quot;Listening together&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;Ending&lt;/h1&gt;
&lt;p&gt;The strongest feeling I had after finals was:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Young people&apos;s brains work so well!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is great that I am not old yet. My brain still works, and I can learn many things. I learned ten courses in three weeks; even maintaining 80% of that intensity would be incredible.&lt;/p&gt;
&lt;p&gt;So during winter break, I restarted &lt;code&gt;Japanese study&lt;/code&gt; and began learning &lt;code&gt;food nutrition&lt;/code&gt;. The first is for fun and the second is for a healthy life. After the storm of final-exam month, learning these things feels like only a gentle rain. I have more to say about both, but they do not belong in this already long post, and writing a blog is tiring too. I will stop here.&lt;/p&gt;
</content:encoded></item><item><title>SSR Part 1: From Rendering Patterns to Simple SSR Problems</title><link>https://zheyi.in/posts/frontend/ssr1/</link><guid isPermaLink="true">https://zheyi.in/posts/frontend/ssr1/</guid><description>I finally made time for a blog post. There will probably be an SSR Part 2 and Part 3 later.</description><pubDate>Sun, 09 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;h3&gt;A Little Rambling&lt;/h3&gt;
&lt;p&gt;In my previous post, from late September, I ran into a problem while using &lt;code&gt;localStorage&lt;/code&gt; in Nuxt. At first I thought my code design was wrong, but it turned out to be a hydration problem that needs to be avoided.&lt;/p&gt;
&lt;p&gt;I wanted to write about it then. Real life was busy, my knowledge was limited, and SSR is deep water. I needed to do quite a lot of research before I could write even a short post, so it took me until now.&lt;/p&gt;
&lt;p&gt;At first, I thought I only needed to explain hydration and list a few situations that trigger hydration issues. But hydration is shared by &lt;code&gt;SSR&lt;/code&gt; (Server-Side Rendering) and &lt;code&gt;SSG&lt;/code&gt; (Static Site Generation), so I also had to understand SSR and SSG. To understand them, I first had to understand rendering patterns in general. You can see why this got delayed.&lt;/p&gt;
&lt;p&gt;Please forgive me for taking so long to finish such a short article.&lt;/p&gt;
&lt;p&gt;That said, I realized that I have already worked with three projects involving SSR, including this blog. Astro uses island rendering, and I have modified parts of this blog as well. Maybe that gives me enough confidence to write about it.&lt;/p&gt;
&lt;h1&gt;Introducing the Ideas&lt;/h1&gt;
&lt;p&gt;The knowledge builds layer by layer: first rendering patterns, then SSR, then hydration.&lt;/p&gt;
&lt;p&gt;It is a long road, so I will begin with a broad explanation of a few key terms: &lt;strong&gt;rendering patterns&lt;/strong&gt; and &lt;strong&gt;SSR&lt;/strong&gt;. Then I will use simple examples to build an intuitive understanding of SSR and hydration, including a few straightforward SSR errors. A deeper discussion can wait for later.&lt;/p&gt;
&lt;h2&gt;Start with Rendering&lt;/h2&gt;
&lt;p&gt;Rendering is the process that turns the usual front-end trio of HTML, CSS, and JavaScript into an actual page. I do not completely master the theory, so here is an explanation image from Gemini. The main thing to understand is that rendering takes time and has a cost. That is why different rendering patterns exist.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-7%20ssr1/Snipaste_2026-03-04_14-33-23.webp&quot; alt=&quot;Rendering explanation&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SSR&lt;/code&gt; means &lt;strong&gt;Server-Side Rendering&lt;/strong&gt;. A rendering pattern describes how the browser turns front-end code into a web page. Here are two patterns that you have probably used even if you did not know their names.&lt;/p&gt;
&lt;h3&gt;Static Rendering&lt;/h3&gt;
&lt;p&gt;If you write a &lt;code&gt;Hello.html&lt;/code&gt; file and serve it directly, that is a static website. Nothing special happens: the browser receives &lt;code&gt;Hello.html&lt;/code&gt; and renders it.&lt;/p&gt;
&lt;p&gt;If you want multiple pages, you access different files in the URL, such as &lt;code&gt;/page1.html&lt;/code&gt; and &lt;code&gt;/page2.html&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Client-Side Rendering&lt;/h3&gt;
&lt;p&gt;If you create a new Vue project with &lt;code&gt;npm create vue@latest&lt;/code&gt;, its default pattern is &lt;code&gt;CSR&lt;/code&gt;, or &lt;strong&gt;Client-Side Rendering&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In a CSR project, the server initially returns an almost empty HTML shell. JavaScript later generates the content inside that shell. Vue, for example, starts with &lt;code&gt;&amp;lt;div id=&quot;app&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;. Your &lt;code&gt;.vue&lt;/code&gt; files use JavaScript to mount content into that &lt;code&gt;app&lt;/code&gt; element. In this model, the JavaScript and final HTML are produced together in the browser.&lt;/p&gt;
&lt;h1&gt;Server-Side Rendering&lt;/h1&gt;
&lt;p&gt;Now we can get to the main topic: &lt;strong&gt;SSR&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;People who customize their blogs may already know that blogs often use SSR. Hexo is purely static, for comparison. In SSR, the server renders a page into a complete HTML string before sending it to the browser. JavaScript is then attached to that already-rendered HTML, which effectively takes over the existing DOM nodes.&lt;/p&gt;
&lt;p&gt;In a CSR blog, the server sends the user an empty shell, and the browser runs the downloaded JavaScript to fill it. With SSR, the server sends the complete pre-rendered blog homepage as an HTML file with content already inside it. The user does not have to wait for the browser to render the initial content.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;That is why &lt;strong&gt;first-screen loading&lt;/strong&gt; can be fast. In a food analogy, SSR gives you a prepared meal, while CSR still has to cook it after delivery.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Before Step One: Rendering on the Server&lt;/h2&gt;
&lt;p&gt;From the user&apos;s perspective this is not really the first step, because the server often prepares the HTML and JavaScript before the user arrives. The client only waits to receive them.&lt;/p&gt;
&lt;p&gt;It is important that HTML and JavaScript are separate here. As I said above, JavaScript will be attached later through &lt;strong&gt;client hydration&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The server environment and the browser environment are different. Unlike CSR, SSR evaluates some application code on the server. That difference is the reason SSR code can easily produce certain errors, which I will show later.&lt;/p&gt;
&lt;h2&gt;Step One: Get the Static Files&lt;/h2&gt;
&lt;p&gt;The client receives the HTML and JavaScript files prepared by the server and uses the HTML to fill the browser page. The user quickly sees a static page, which is one of SSR&apos;s core advantages.&lt;/p&gt;
&lt;p&gt;The JavaScript file has not done its job yet. It matters in the next step.&lt;/p&gt;
&lt;h2&gt;Step Two: Client Hydration&lt;/h2&gt;
&lt;p&gt;This is SSR&apos;s most distinctive and difficult-to-understand step. The JavaScript file that was not used in step one needs to be connected to the HTML that is already displaying a static page. Only after they are connected do we have a complete, interactive front-end page.&lt;/p&gt;
&lt;p&gt;For example, imagine a login page. The server HTML can show a login button, but without JavaScript it is only an empty shell and cannot log anyone in. We need to attach &lt;code&gt;@click=&quot;login()&quot;&lt;/code&gt; and the &lt;code&gt;login&lt;/code&gt; function itself. Connecting those pieces of JavaScript to the matching HTML elements is called &lt;strong&gt;hydration&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In short, hydration reconnects the HTML and JavaScript that should have been one page, but were separated during the server-rendering stage.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Step Three: Normal Client-Side Operation&lt;/h2&gt;
&lt;p&gt;After hydration, the complete front end runs in the browser normally, just like a CSR application.&lt;/p&gt;
&lt;h1&gt;Common Problems&lt;/h1&gt;
&lt;p&gt;Here are a few problems that can happen when using SSR.&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;localStorage&lt;/code&gt; Cannot Be Used on the Server&lt;/h2&gt;
&lt;p&gt;Assume a browser has a &lt;code&gt;localStorage&lt;/code&gt; entry named &lt;code&gt;API_KEY&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script setup lang=&quot;ts&quot;&amp;gt;
const key = localStorage.getItem(&quot;API_KEY&quot;);
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Will this work during SSR? No. You will get an error like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-7%20ssr1/image.png&quot; alt=&quot;localStorage SSR error&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The problem happens in the pre-rendering step: the server does not have the &lt;code&gt;localStorage&lt;/code&gt; API. It is a browser API for browser storage.&lt;/p&gt;
&lt;p&gt;Moving the code into an imported helper does not solve it either:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { getKey } from &quot;~/use-key.ts&quot;;

const key = getKey();

export const getKey = () =&amp;gt; {
  const key = localStorage.getItem(&quot;API_KEY&quot;);
  return key;
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An &lt;code&gt;import&lt;/code&gt; is still evaluated during server rendering, so it can still call browser-only APIs.&lt;/p&gt;
&lt;p&gt;The basic safe shape is to access it only after mounting in the browser:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function getKey() {
  return localStorage.getItem(&quot;API_KEY&quot;);
}

onMounted(() =&amp;gt; {
  getKey();
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;onMounted&lt;/code&gt; runs in step three, after the page has mounted in the client. That is why this version does not try to use &lt;code&gt;localStorage&lt;/code&gt; on the server.&lt;/p&gt;
&lt;h2&gt;Some Requests Should Not Run on the Server&lt;/h2&gt;
&lt;p&gt;It is common to write logic like &quot;send a request when entering this page.&quot; But some requests should not be sent during SSR.&lt;/p&gt;
&lt;p&gt;For example, a request may require user-submitted data or authentication information such as a token. When server rendering runs, that user-specific browser state is not available, so sending the request is meaningless.&lt;/p&gt;
&lt;p&gt;Nuxt provides &lt;code&gt;&amp;lt;client-only&amp;gt;&lt;/code&gt; for this kind of situation:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;client-only&amp;gt;
  &amp;lt;!-- Content --&amp;gt;
&amp;lt;/client-only&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can wrap the part that sends the request in a component and put it inside &lt;code&gt;&amp;lt;client-only&amp;gt;&lt;/code&gt;. It only renders during normal client-side operation, so the server does not make that request.&lt;/p&gt;
&lt;h2&gt;Errors During Client Hydration&lt;/h2&gt;
&lt;p&gt;The example I wrote about in the previous post is a hydration problem. It is complicated enough that it deserved its own article.&lt;/p&gt;
&lt;p&gt;Although that post is dated September, I rewrote its core solution after finishing this &lt;code&gt;SSR Part 1&lt;/code&gt;, and revised the rest as well. You can read it here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/posts/frontend/yibu/&quot;&gt;Fixing a Hydration Problem I Ran Into&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Closing Thoughts&lt;/h1&gt;
&lt;p&gt;There are still many things I want to write about, including this mysterious pattern from my Astro blog:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
// This component is called ConfigCarrier.astro. It is mounted in layout.astro,
// which means it exists on every page.
import { siteConfig } from &quot;../config&quot;;
---

&amp;lt;div
  id=&quot;config-carrier&quot;
  data-hue={siteConfig.themeColor.hue}
  data-lightDarkMode={siteConfig.lightDarkMode.defaultMode}
&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;config&lt;/code&gt; file contains this blog&apos;s settings, and &lt;code&gt;siteConfig&lt;/code&gt; is the exported constant that stores them. Other files read this component with DOM operations to obtain the configuration values.&lt;/p&gt;
&lt;p&gt;Why not simply import &lt;code&gt;siteConfig&lt;/code&gt; wherever it is needed?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My &lt;strong&gt;current&lt;/strong&gt; understanding is that the config file is not sent to the client as part of SSR, so it cannot simply be imported there.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I will research this further. If that guess is wrong, I will not silently edit this article; I will explain it properly in the next SSR post.&lt;/p&gt;
&lt;p&gt;For now, time and length make this a good place to stop. I hope you will see &lt;code&gt;SSR Part 2&lt;/code&gt; soon.&lt;/p&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=Dkx5ydvtpCA&quot;&gt;Video: 10 Rendering Patterns for Web Apps&lt;/a&gt; - the categories are broad, but it covers a lot.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.saeloun.com/2021/12/16/hydration/&quot;&gt;Article: Understanding Hydration in React applications (SSR)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bing search, ChatGPT, my project code, and my own brain.&lt;/p&gt;
</content:encoded></item><item><title>Fixing a Hydration Problem I Ran Into</title><link>https://zheyi.in/posts/frontend/yibu/</link><guid isPermaLink="true">https://zheyi.in/posts/frontend/yibu/</guid><description>I ran into an initialization timing problem in development. I first thought it was a design issue, but a senior developer helped me identify it as an SSR hydration problem.</description><pubDate>Sun, 21 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;This article was confused when I first wrote it, and I did not manage to fix it quickly. After publishing &lt;a href=&quot;https://zheyi.in/posts/frontend/ssr1/&quot;&gt;SSR Part 1: From Rendering Patterns to Simple SSR Problems&lt;/a&gt; on &lt;code&gt;2025-11-09&lt;/code&gt;, I rewrote the second half. You can now read this as a concrete hydration-problem fix.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;The Scenario&lt;/h1&gt;
&lt;p&gt;I was building a login page, though the project did not have a real back-end login endpoint. It had no accounts at all: requests were authorized by putting a key in their headers.&lt;/p&gt;
&lt;p&gt;So the login page only needed one field for the key.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-6%20yibuDesign/image-1.png&quot; alt=&quot;Login page&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Feature Design&lt;/h2&gt;
&lt;p&gt;I wanted two features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Save the key locally and automatically fill the input with it. If someone visits the login page again, they can click Log in without typing it again.&lt;/li&gt;
&lt;li&gt;Disable the login button when the input is empty.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I used &lt;code&gt;&amp;lt;el-button&amp;gt;&lt;/code&gt;, so the disabled state came from its &lt;code&gt;:disabled&lt;/code&gt; prop.&lt;/p&gt;
&lt;h1&gt;The First Design&lt;/h1&gt;
&lt;p&gt;Since the key needed local persistence, the obvious approach was &lt;code&gt;localStorage&lt;/code&gt;. Calling it directly everywhere did not feel elegant, so the project had a &lt;code&gt;use-api-key.ts&lt;/code&gt; composable to manage this one piece of storage:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// use-api-key.ts
import { useStorage } from &quot;@vueuse/core&quot;;

export const API_KEY_STORAGE_KEY = &quot;xxxxxxxxxxxxxxxxx&quot;;

export const useApiKey = () =&amp;gt; {
  const apiKey = useStorage(API_KEY_STORAGE_KEY, &quot;&quot;);
  return apiKey;
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;useStorage&lt;/code&gt; is a VueUse helper that creates a &lt;code&gt;localStorage&lt;/code&gt; entry named &lt;code&gt;API_KEY_STORAGE_KEY&lt;/code&gt;. The login page could then stay pleasantly small:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- login.vue --&amp;gt;
&amp;lt;template&amp;gt;
  &amp;lt;el-input v-model=&quot;apiKey&quot; /&amp;gt;
  &amp;lt;el-button :disabled=&quot;apiKey.length &amp;lt;= 0&quot; @click=&quot;handleConfirmAPIKey&quot;&amp;gt;
    Log in
  &amp;lt;/el-button&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script setup lang=&quot;ts&quot;&amp;gt;
const apiKey = useApiKey();
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Any page that needed the key could call the same &lt;strong&gt;composable&lt;/strong&gt; and get a tidy &lt;code&gt;apiKey&lt;/code&gt; variable.&lt;/p&gt;
&lt;h2&gt;The Problem&lt;/h2&gt;
&lt;p&gt;Of course, the first design had a problem. Its advantages were clear: little code and a comfortable API. But the &lt;code&gt;&amp;lt;el-button&amp;gt;&lt;/code&gt; &lt;code&gt;:disabled&lt;/code&gt; prop did not update as I expected.&lt;/p&gt;
&lt;p&gt;When I entered the page with an existing cached &lt;code&gt;apiKey&lt;/code&gt;, or refreshed it, the input contained text but the button was still disabled.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-6%20yibuDesign/image-2.png&quot; alt=&quot;Disabled button despite a saved key&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;The Fix&lt;/h1&gt;
&lt;p&gt;At first, I used a simple and brute-force solution.&lt;/p&gt;
&lt;h2&gt;The Brute-Force Solution&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- login.vue --&amp;gt;
&amp;lt;template&amp;gt;
  &amp;lt;el-input v-model=&quot;apiKey&quot; /&amp;gt;
  &amp;lt;el-button :disabled=&quot;isDisabled&quot; @click=&quot;handleConfirmAPIKey&quot;&amp;gt;
    Log in
  &amp;lt;/el-button&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script setup lang=&quot;ts&quot;&amp;gt;
const apiKey = useApiKey();
const isDisabled = ref();

onMounted(() =&amp;gt; {
  isDisabled.value = apiKey.value.length &amp;lt;= 0;
});

watch(apiKey, () =&amp;gt; {
  isDisabled.value = apiKey.value.length &amp;lt;= 0;
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I manually repaired the state that was not refreshing. &lt;code&gt;onMounted&lt;/code&gt; runs after &lt;code&gt;apiKey&lt;/code&gt; initialization, and &lt;code&gt;watch&lt;/code&gt; kept &lt;code&gt;isDisabled&lt;/code&gt; synchronized with &lt;code&gt;apiKey&lt;/code&gt; afterwards.&lt;/p&gt;
&lt;h2&gt;The Actual Fix, Written on 2025-11-11&lt;/h2&gt;
&lt;p&gt;After a senior developer pointed it out, I opened the console and saw this error:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-6%20yibuDesign/image.png&quot; alt=&quot;Hydration error&quot; /&gt;&lt;/p&gt;
&lt;p&gt;It was a &lt;strong&gt;hydration problem&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;During &lt;strong&gt;server-side rendering&lt;/strong&gt;, the button was rendered as &lt;code&gt;disabled=true&lt;/code&gt;, because the server could not read the browser&apos;s saved key. When the browser ran the application, it saw the cached key and rendered &lt;code&gt;disabled=false&lt;/code&gt;. The server and client results did not match, so Vue reported a hydration error.&lt;/p&gt;
&lt;p&gt;I modified the code to verify that theory:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// use-api-key.ts
import { useStorage } from &quot;@vueuse/core&quot;;

export const useApiKey = () =&amp;gt; {
  const apiKey = useStorage&amp;lt;string&amp;gt;(API_KEY_STORAGE_KEY, &quot;&quot;, undefined);
  console.log(&quot;Rendering useApiKey&quot;, apiKey.value ? &quot;apiKey has a value&quot; : &quot;apiKey is empty&quot;);
  return apiKey;
};
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- login.vue; template omitted --&amp;gt;
&amp;lt;script setup&amp;gt;
import { useApiKey } from &quot;~/composables/use-api-key&quot;;

const apiKey = useApiKey();

onMounted(() =&amp;gt; {
  console.log(&quot;login onMounted&quot;, apiKey.value ? &quot;apiKey has a value&quot; : &quot;apiKey is empty&quot;);
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-6%20yibuDesign/image-3.png&quot; alt=&quot;Logging the rendering order&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This makes the situation clear: the SSR stage cannot read the key from &lt;code&gt;localStorage&lt;/code&gt;, while the client can. The order is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Server render -&amp;gt; client render -&amp;gt; page mounted (&lt;code&gt;onMounted&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;VueUse provides the &lt;code&gt;initOnMounted&lt;/code&gt; option for this situation. Let us add &lt;code&gt;initOnMounted: true&lt;/code&gt; to &lt;code&gt;useStorage&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// use-api-key.ts
import { useStorage } from &quot;@vueuse/core&quot;;

export const useApiKey = () =&amp;gt; {
  const apiKey = useStorage&amp;lt;string&amp;gt;(API_KEY_STORAGE_KEY, &quot;&quot;, undefined, {
    initOnMounted: true,
  });
  console.log(&quot;Rendering useApiKey&quot;, apiKey.value ? &quot;apiKey has a value&quot; : &quot;apiKey is empty&quot;);
  return apiKey;
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-6%20yibuDesign/image-4.png&quot; alt=&quot;Deferring the storage read&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Now the client also does not read &lt;code&gt;apiKey&lt;/code&gt; during its initial render. This option delays the storage read until the component is mounted.&lt;/p&gt;
&lt;p&gt;As a result, both the server render and the initial client render see an empty string. Both render &lt;code&gt;:disabled&lt;/code&gt; as &lt;code&gt;true&lt;/code&gt;, so there is no hydration mismatch. After mounting, the code checks whether &lt;code&gt;localStorage&lt;/code&gt; has a key and enables the button when it does.&lt;/p&gt;
&lt;p&gt;The logic is clear, the code is still tidy, and everything works.&lt;/p&gt;
</content:encoded></item><item><title>ZJUT Major Transfer (Computer Science) Experience Sharing | A Guide(?</title><link>https://zheyi.in/posts/misc/degree-programme-change/</link><guid isPermaLink="true">https://zheyi.in/posts/misc/degree-programme-change/</guid><description>Class of 24, transferred in the second semester of freshman year. No grade drop. Wrote this little piece for my juniors since I researched this a lot over the past year.</description><pubDate>Wed, 04 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This Passage is translated by AI from zh version&lt;/h1&gt;
&lt;p&gt;If you are reading this blog right after stepping onto campus, I highly recommend you come back and read it again later.&lt;/p&gt;
&lt;p&gt;Because my main purpose for writing this post is to help you build your whole freshman year plan with &quot;transferring majors&quot; as a core theme.&lt;/p&gt;
&lt;p&gt;It would be awesome if this helps you out.&lt;/p&gt;
&lt;h1&gt;My Situation&lt;/h1&gt;
&lt;p&gt;First of all, I transferred to &lt;code&gt;Computer Science (Software Engineering)&lt;/code&gt;.
If you are transferring to other categories, you can still use the non-coding-exam parts as a solid reference.&lt;/p&gt;
&lt;p&gt;My original major was Chemical Engineering. During my first semester, I considered participating in the ACM contest and had been doing some front-end development on the side. Since I had a decent amount of coding experience, I barely passed the coding exam without much specific preparation.&lt;/p&gt;
&lt;p&gt;As for the interview, I did have some front-end projects, but I felt the most crucial factor was my &lt;code&gt;Regional 3rd Prize in the China Collegiate Computing Competition (Service Outsourcing)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, even with my background, passing wasn&apos;t a breeze (mainly because I got roasted for only solving 3 out of 5 problems in the coding exam).
Even if you are an ACM guy, you still need to pay attention to the coding exam (we actually had an ACMer who failed the exam this year).&lt;/p&gt;
&lt;p&gt;So, if you want to transfer majors, don&apos;t procrastinate! You have to start planning the moment you enter college. Otherwise, you might easily face a grade demotion (having to repeat a year) or just fail outright.&lt;/p&gt;
&lt;h1&gt;Timeline / Difficulty Description&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;You have three chances: Freshman Spring, Sophomore Fall, and Sophomore Spring.&lt;/li&gt;
&lt;li&gt;I&apos;ll generally assume you, my reader, are doing it in Freshman Spring.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;Freshman Fall: Grind your GPA, meet specific course grade requirements → Freshman Spring: Self-add courses (Minor) → Transfer Exam: (Coding Exam → Interview)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I&apos;ve seen people fail at every single step. Read carefully.
The difficulty varies from person to person. If your academic performance is great, your GPA won&apos;t be an issue. On the flip side, I&apos;ve seen guys get kicked out immediately just because their Advanced Math score didn&apos;t reach 70.&lt;/p&gt;
&lt;p&gt;Let me describe the difficulty of the coding exam and interview using passing rates.
The numbers are approximate, maybe off by 1 or 2 people.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;(Class of 25) SE takes 20, CS takes 18, Cyber Security takes 6.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Coding Exam: 130 → 34.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;First Choice Interview: 34 → SE 12, CS 13 (Total 25), Network Eng 2, Digital Media 5.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the interview numbers are just for the first round, and neither reached their max recruitment quota! So transferring majors is more about meeting the standard than just competing with others.
Here is a picture (a list of people who passed their first choice in the Class of 24) (it&apos;s public on the official website anyway).
As you can see, the grade demotion rate is still quite high.
&lt;img src=&quot;/source-of-blog/blog-4%20zzy/9aa0b3b49ea34e89c4f99487bc0ac0b.jpg&quot; alt=&quot;alt text&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;Materials to Find &amp;amp; Info to Notice&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Transfer Standards and Details&lt;/strong&gt;
Look for your year&apos;s &lt;code&gt;Major Transfer Standards&lt;/code&gt; and something like &lt;code&gt;ZJUT 2024 Undergraduate Major Transfer Implementation Details Summary&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Curriculum of Your Target Major&lt;/strong&gt;
First, you need this to figure out what courses you need to catch up on and what you don&apos;t need to take.
Second, interviewers might ask you: &quot;Have you read our curriculum? What classes on it do you like?&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Admission Quota&lt;/strong&gt;
Check how many people CS or SE will recruit in your year.
In my year, CS took 18, SE 20, and the others combined took about 13. This helps you fill out your preference form.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application Timeline&lt;/strong&gt;
Normally, exams start in the &lt;code&gt;12th week&lt;/code&gt; of the semester. So, &lt;code&gt;once the 12th week approaches&lt;/code&gt;, keep a close eye on when applications open (don&apos;t forget to apply for it, lol).&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Preparations on Your Abilities&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Taking courses in advance independently&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you don&apos;t take CS courses in advance and miss too many core classes, you will get a grade demotion (usually missing 4 means demotion; I missed 3, so I barely stayed in my grade).&lt;/p&gt;
&lt;p&gt;It&apos;s highly unlikely you can manually adjust your schedule in Freshman Fall. If you have the tricks to get the academic office to add classes for you early, you are a god.
The better way is to apply for a &lt;code&gt;Minor Course&lt;/code&gt; at the end of Fall when choosing Spring courses (apply early, they get full quickly). I minored in C++.&lt;/p&gt;
&lt;p&gt;Then, in Freshman Spring, you can try to drop non-CS professional courses (for example, I dropped Engineering Drawing). Methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Secretly don&apos;t select the course during course selection (this worked for me). Your academic office probably won&apos;t notice, or they might just be too lazy to care.&lt;/li&gt;
&lt;li&gt;If it&apos;s already selected, try begging the academic office to drop it (very hard to succeed).&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;GPA / Specific Course Standards&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Class of 24 Requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;College Physics 70 (if applicable)&lt;/li&gt;
&lt;li&gt;Math courses (like Adv. Math) 70 &lt;code&gt;(Needs the hardest studying)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;College English 70 &lt;code&gt;(Needs the most praying)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Programming (like Python, C) 70 &lt;code&gt;(The easiest)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Be super careful with Math and College English! Grab all the usual performance points you can get, otherwise, waiting for the final scores to come out will be pure torture (personal experience).&lt;/p&gt;
&lt;p&gt;As for GPA, mine was a bit over 3.0. Generally speaking, staying above 3.0 is totally fine. Having a higher GPA just means the interviewers might praise you a bit. You can grind it or not, but it should at least be around 3.0. Too low just looks bad.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Coding Exam&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;5 problems in total. You must solve 3 to pass.&lt;/li&gt;
&lt;li&gt;This is the biggest filter and where the main difficulty lies.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Programming Language&lt;/strong&gt;:
Only C/C++ is allowed!
Zhejiang students who took IT in Gaokao, stop yelling about how much you love Python. Just honestly learn C++.
Practice using &lt;code&gt;Dev-C++&lt;/code&gt;, because it&apos;s the only guaranteed IDE on the exam computers.
For you &lt;code&gt;VSCode&lt;/code&gt; lovers, you are in for a treat —— force yourself to practice hard on Dev-C++.&lt;/p&gt;
&lt;p&gt;For the coding exam, I highly recommend using C++ with the &lt;code&gt;&amp;lt;bits/stdc++.h&amp;gt;&lt;/code&gt; library. It&apos;s so smooth.
I won&apos;t teach C++ basics here; figure it out yourself. You don&apos;t even need to learn pointers or classes, as long as you can solve algorithmic problems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Practice&lt;/strong&gt;:
The exam OJ (Online Judge): [http://acm.zjut.edu.cn/onlinejudge/] &lt;em&gt;(Campus network required)&lt;/em&gt;
There are lots of basic clearance test problems here. But the transfer exam is harder than those. Train until you can &lt;strong&gt;stably AC (Accept) a clearance test set within 40 minutes&lt;/strong&gt;.
Also, get familiar with this OJ&apos;s quirks, like being strict on trailing spaces but lenient on trailing newlines.
Know what Presentation Error, WA (Wrong Answer), and Runtime Error mean in the logs.&lt;/p&gt;
&lt;p&gt;There are also past exam questions. I recorded the ones I took this time, but I won&apos;t post them publicly since the school forbids leaking them (so if you DM me privately, I might tell you roughly how they looked, cough cough).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Competitions / Projects&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I mentioned several projects during the interview, but the teachers didn&apos;t seem to care much. I guess projects have limited impact.&lt;/p&gt;
&lt;p&gt;Competitions are highly recommended, even if it&apos;s just for participation. When you mention a contest during the interview, the teachers will acknowledge your interest in CS, which is a huge plus.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recommended Contests&lt;/strong&gt;:
Only CS-related ones are recommended. Others might not be useful.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Our school&apos;s ACM Freshman Contest / ACM School Contest&lt;/strong&gt; are highly recognized and act as a perfect exam simulation (getting used to the environment; the actual transfer exam is definitely easier).&lt;/li&gt;
&lt;li&gt;Other school-level CS contests (like &lt;code&gt;HanRuan&lt;/code&gt;), see if you can grab an easy award.&lt;/li&gt;
&lt;li&gt;Highly recognized national CS-related contests (like the &lt;code&gt;China Collegiate Computing Competition&lt;/code&gt;). These are hard to get, but winning one helps tremendously.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Filling Out Preferences&lt;/h1&gt;
&lt;p&gt;Normally, you just choose between &lt;code&gt;Computer Science and Technology (CS)&lt;/code&gt; and &lt;code&gt;Software Engineering (SE)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I&apos;m not familiar with the others, so I won&apos;t discuss them here. Besides CS and SE, the other branches take up a very small percentage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First Choice / Second Choice Mechanism&lt;/strong&gt;:
The specific mechanism depends on your year&apos;s rules (for example, a few years before me, &lt;code&gt;you could take the coding exam twice&lt;/code&gt;). But I feel like future rules will at most be as harsh as mine.&lt;/p&gt;
&lt;p&gt;In my year, there was only one coding exam. First choice and second choice just meant two separate interviews.
This means about a week after passing the coding exam, you take the first choice interview.
The day after that interview, the passing list is usually published. If you failed, you then participate in the second choice interview.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Differences Between Branches&lt;/strong&gt;:
CS is definitely the ace major, followed by SE. For the others, if you apply for non-matching jobs later (like a Cyber Security major applying for front-end dev), your resume might look a bit awkward.
CS courses are harder; for example, you have to study circuits and stuff.
SE is relatively easier.&lt;/p&gt;
&lt;p&gt;Also, if you want postgraduate recommendation (Baoyan), choosing SE is definitely easier. The internal competition (like raising Gu bugs) in CS is fierce.&lt;/p&gt;
&lt;h1&gt;My Coding Exam + Interview Experience&lt;/h1&gt;
&lt;h2&gt;Coding Exam&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;90 mins&lt;/strong&gt;, &lt;strong&gt;5 problems&lt;/strong&gt;, solve &lt;strong&gt;3 or more&lt;/strong&gt; to pass and enter the interview stage.&lt;/li&gt;
&lt;li&gt;They only look at the number of solved problems, no time penalties.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For past data, you can check the contest section on [http://acm.zjut.edu.cn/onlinejudge/]. The leaderboards for past transfer exams are public.&lt;/p&gt;
&lt;p&gt;In Freshman Spring for the Class of 24 (my time), 18 people solved 3 problems, and 16 people solved 4~5 problems.&lt;/p&gt;
&lt;p&gt;Here is how my exam went:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10 min: Set up the computer (used Dev-C++), passed Q1.
20+ min: Stuck on Q2 (trapped by a detail: the problem asked me to output two numbers per line. I just printed them, but after the exam, I realized I needed to compare them and swap their order).
40 min: Solved Q3, didn&apos;t fall into any detail traps.
55 min: Finished coding Q4, but got stuck because I forgot 0 and 1 are not prime numbers.
55~77 min: The most stressful 20 minutes of my life. Kept searching for where I was stuck in Q2 and Q4.
77 min: Found the detail error in Q4 and solved it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The last 30 minutes were incredibly tense. Honestly, it felt like I only had 60 minutes of effective problem-solving time (my skills weren&apos;t enough, sigh).
If your C++ is decent, you&apos;ll mainly be battling detail issues. The overall difficulty is around &lt;code&gt;Luogu Beginner ~ Normal-&lt;/code&gt;, but they will intentionally set traps in the details.&lt;/p&gt;
&lt;h2&gt;Interview&lt;/h2&gt;
&lt;p&gt;My rules this time:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lasts &lt;strong&gt;5 mins&lt;/strong&gt;, they won&apos;t intentionally make things hard for you. Includes self-intro + Q&amp;amp;A.&lt;/li&gt;
&lt;li&gt;The interviewee stands on the podium. Teachers sit in the first two rows.&lt;/li&gt;
&lt;li&gt;One main interviewer keeps asking you questions, while the others discuss like they are in a wet market.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Questions:&lt;/strong&gt;
Most questions are based on what you said in your &lt;code&gt;Self-intro&lt;/code&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Self-intro&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Figure this out yourself. I just talked about my projects and contest experiences.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;What have you learned on your own?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Me: Front-end development. (But I felt those teachers didn&apos;t understand it; they just listened and stayed quiet).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;How many missing courses do you have?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Me: Currently missing three (Discrete Math, C Programming, Linear Algebra). I can easily pass C Programming (self-taught), and I minored in C++.
&lt;em&gt;(If they ask this, you basically passed. They are just evaluating whether you need a grade demotion. If you miss 4+ courses here, get ready to be demoted).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Have you read our curriculum? Are there any classes you particularly like?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Me: Web dev, Java, Computer Networks, etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Why transfer to SE instead of CS?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Me: CS requires studying circuits and stuff, which is too hard for me. (Actually, I was just too lazy to spend that much time studying).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Afterward, the teachers discussed whether to demote me for a while. But I was super lucky during my interview:
The teacher who taught my C++ minor class happened to be one of the interviewers! He spoke up for me down there, saying he didn&apos;t want me to get demoted.&lt;/p&gt;
&lt;p&gt;So, moral of the story: do NOT offend any CS college teachers during your freshman year. For example, if you sleep in a teacher&apos;s class, and they end up interviewing you... you can basically pack your bags (tears).&lt;/p&gt;
</content:encoded></item><item><title>Is Element UI Really That Good? Notes from Using It</title><link>https://zheyi.in/posts/frontend/elmui/</link><guid isPermaLink="true">https://zheyi.in/posts/frontend/elmui/</guid><description>I had used Element UI before, but building a Vue project alone with many of its components made me appreciate it much more.</description><pubDate>Mon, 28 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;h1&gt;Introducing Element UI&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;This is for newer developers who have never used it. Experienced developers can probably skip it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;First, links for the great Element UI:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://element-plus.org/en-US/&quot;&gt;Element Plus&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://element-plus.org/en-US/component/overview.html&quot;&gt;Component library&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Its latest version is called Element Plus. In the official words, it is a component library based on Vue 3 for designers and developers.&lt;/p&gt;
&lt;p&gt;For example, instead of building a login button from scratch, you can use a ready-made component in your front-end project.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image.png&quot; alt=&quot;Login button&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;el-button type=&quot;primary&quot;&amp;gt;Log in&amp;lt;/el-button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Components&lt;/h1&gt;
&lt;h2&gt;Content Components&lt;/h2&gt;
&lt;p&gt;Components such as &lt;code&gt;Card&lt;/code&gt;, &lt;code&gt;Button&lt;/code&gt;, &lt;code&gt;Input&lt;/code&gt;, and &lt;code&gt;Icon&lt;/code&gt; are used as part of a page layout. The best part is how much time they save: open the package and use it.&lt;/p&gt;
&lt;p&gt;They are also reasonably extensible. Take &lt;code&gt;Input&lt;/code&gt; as an example:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-1.png&quot; alt=&quot;Input examples&quot; /&gt;&lt;/p&gt;
&lt;p&gt;As shown on the left, an email input can include a &lt;strong&gt;Send verification code&lt;/strong&gt; button inside it. The one at the upper right is a larger text area for writing a semester summary.&lt;/p&gt;
&lt;h2&gt;Layout and Feedback Components&lt;/h2&gt;
&lt;p&gt;Components such as &lt;code&gt;el-dialog&lt;/code&gt; for modal dialogs, &lt;code&gt;el-alert&lt;/code&gt; for notices, and &lt;code&gt;el-message&lt;/code&gt; for feedback feel even more generally useful than a simple &lt;code&gt;Button&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Anyone can make a button, even if we are lazy. Building a reliable modal dialog from scratch is much more annoying.&lt;/p&gt;
&lt;p&gt;When I first used &lt;code&gt;el-dialog&lt;/code&gt;, it made me realize how easily a library can create this kind of layout.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-2.png&quot; alt=&quot;An el-dialog example&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I ended up using nearly ten dialogs in my project. Compared with only navigating between pages, the application felt a level more polished.&lt;/p&gt;
&lt;h2&gt;A Drawback&lt;/h2&gt;
&lt;p&gt;Because Element UI is used for layout, it brings its own visual style. It is great for personal projects, but in a formal team project the requested UI design may not be compatible with Element&apos;s style.&lt;/p&gt;
&lt;p&gt;So it is useful, but do not become too dependent on it.&lt;/p&gt;
&lt;h1&gt;Other Notes&lt;/h1&gt;
&lt;h2&gt;Bugs&lt;/h2&gt;
&lt;h3&gt;Accidentally Reusing an Element Class Name&lt;/h3&gt;
&lt;p&gt;Element UI has built-in class names and styles. Do not casually create a class name that overlaps with one of them.&lt;/p&gt;
&lt;p&gt;For example, I added &lt;code&gt;class=&quot;el-upload&quot;&lt;/code&gt; to the outer element of an &lt;code&gt;&amp;lt;el-upload /&amp;gt;&lt;/code&gt; component. Element&apos;s built-in styles then leaked into my wrapper:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-class.png&quot; alt=&quot;Class conflict&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Its &lt;code&gt;display: inline-flex&lt;/code&gt; turned that area into a flex layout and caused the bug below.&lt;/p&gt;
&lt;p&gt;Normal:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-4.png&quot; alt=&quot;Normal upload&quot; /&gt;&lt;/p&gt;
&lt;p&gt;With an extra &lt;code&gt;class=&quot;el-upload&quot;&lt;/code&gt; wrapper:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-3.png&quot; alt=&quot;Unexpected flex wrapper&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Adding &lt;code&gt;scoped&lt;/code&gt; While Overriding Component Styles&lt;/h3&gt;
&lt;p&gt;You normally do not edit Element&apos;s source code. If you just want to adjust a component&apos;s color or size, write CSS for it in your own &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block.&lt;/p&gt;
&lt;p&gt;Use DevTools to find the class for the exact layer you want. Element components often have several nested layers, so make sure you have selected the right one.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-5.png&quot; alt=&quot;Inspecting the component&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you usually add &lt;code&gt;scoped&lt;/code&gt; to every Vue style block, create a separate unscoped &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; block for this override, or wrap the selector in &lt;code&gt;:global()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-6.png&quot; alt=&quot;Global style override&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;scoped&lt;/code&gt; attribute limits styles to the current component file, while Element&apos;s generated DOM belongs elsewhere. Remember not to scope the override.&lt;/p&gt;
&lt;h2&gt;A Shortcut for Throwaway Projects&lt;/h2&gt;
&lt;p&gt;Element UI is well-known enough that &lt;strong&gt;AI&lt;/strong&gt; tools understand it. When you are building with Element components, you can ask for something like &lt;code&gt;Generate an ElMessageBox with an account and password field&lt;/code&gt; and get a quick starting point.&lt;/p&gt;
&lt;p&gt;It is very convenient. But if you keep doing that and never review the result properly, the project will probably become a mess.&lt;/p&gt;
&lt;h2&gt;Overall Impression&lt;/h2&gt;
&lt;p&gt;Element UI is obviously not a universal solution, but it is practical and versatile. It also helped me recognize standard UI patterns, such as a switch component.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-3%20elmUI/image-7.png&quot; alt=&quot;Switch component&quot; /&gt;&lt;/p&gt;
&lt;p&gt;HTML does not have every one of these components built in, but developers tend to use the same names and roughly the same interaction patterns.&lt;/p&gt;
&lt;p&gt;If you have not used Element UI, I recommend trying it in a personal project. It improves both speed and understanding. Read the official documentation linked above, or search for Element Plus directly.&lt;/p&gt;
</content:encoded></item><item><title>My First Experience on a Proper Team Project</title><link>https://zheyi.in/posts/frontend/zgkf/</link><guid isPermaLink="true">https://zheyi.in/posts/frontend/zgkf/</guid><description>A few thoughts on the struggles of joining a more formal development team for the first time.</description><pubDate>Sun, 29 Dec 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;h1&gt;Some Random Thoughts&lt;/h1&gt;
&lt;p&gt;It has been a while since I last updated this blog. I have been learning too many unrelated things recently, so let me write a non-technical post first and get some feelings out of my system. Maybe I will write more technical posts when I have time.&lt;/p&gt;
&lt;h1&gt;What It Felt Like to Work in a Team&lt;/h1&gt;
&lt;p&gt;For each feature, our team opens a small group chat. There are back-end developers, a front-end developer (me), and senior members who review our work.&lt;/p&gt;
&lt;p&gt;The main struggle is simply that my skills are still limited. From time to time, the seniors give my work a serious review, and I temporarily lose confidence in my technical ability. &lt;code&gt;:(&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Before this, I was used to very casual development. In a team, every decision needs a reason. You have to keep thinking about what a feature should actually do. That takes some getting used to.&lt;/p&gt;
&lt;p&gt;So if you are about to join your first development team, try to manage both your wording and your mental state. Do not let one review completely break you.&lt;/p&gt;
&lt;h1&gt;What Coding Felt Like&lt;/h1&gt;
&lt;h2&gt;The Pain&lt;/h2&gt;
&lt;p&gt;I was assigned to an &lt;strong&gt;unfamiliar&lt;/strong&gt; team project. At the beginning, I could not understand anything because I was not capable enough yet. I kept browsing folders, searching for unfamiliar things, and wondering whether my code was conventional, fast enough, and readable enough.&lt;/p&gt;
&lt;p&gt;It was painful, honestly. I hope that one day I will become experienced enough to review beginners myself.&lt;/p&gt;
&lt;h2&gt;Tips for an Unfamiliar Project&lt;/h2&gt;
&lt;p&gt;Start with the layout inside the &lt;code&gt;src&lt;/code&gt; folder and compare it with front-end project structures you already know. That usually gives you a rough idea of where things live. For a folder you have never seen before, search what it is for, assuming the project uses sensible names.&lt;/p&gt;
&lt;p&gt;It also helps to run the project while you explore it. Matching actual pages to the folder structure makes the project feel much more concrete.&lt;/p&gt;
&lt;p&gt;If you have investigated and still cannot understand something, ask a senior developer. You might not explain the question perfectly and get corrected a little, but mental resilience is part of the job.&lt;/p&gt;
&lt;p&gt;In a standardized project, variables and functions are often wrapped in a module and connected through &lt;code&gt;export&lt;/code&gt; and &lt;code&gt;import&lt;/code&gt; before they reach the file you are looking at. Use search, such as VS Code&apos;s global search, to look up a variable name. You can usually find its types, store, definition, and usages, which tells you where it came from and where it goes. It is also useful for finding leftover &lt;code&gt;console.log()&lt;/code&gt; calls.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-2/Snipaste_2024-12-30_22-49-32.png&quot; alt=&quot;Search&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;I Give Up&lt;/h1&gt;
&lt;p&gt;I surrender. Front-end development has defeated me.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-2/124646799_p4_master1200.jpg&quot; alt=&quot;Crying&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;Postscript&lt;/h1&gt;
&lt;p&gt;This is so embarrassing to reread at the end of 2025.&lt;/p&gt;
</content:encoded></item><item><title>A Quick Introduction to Front-End Project Folders</title><link>https://zheyi.in/posts/frontend/filestore/</link><guid isPermaLink="true">https://zheyi.in/posts/frontend/filestore/</guid><description>A beginner-friendly and non-professional look at the structure of a front-end project.</description><pubDate>Sun, 27 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;This article was translated by AI from the Chinese version.&lt;/h1&gt;
&lt;h3&gt;A Disclaimer&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;This post is for front-end beginners and is meant to be easy to follow.
I will only explain a few folders: beginners do not need to know everything yet, and I do not know everything either.
Please point out anything I describe incorrectly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;The Overall Structure&lt;/h1&gt;
&lt;p&gt;Let us first look at the file structure of a basic &lt;code&gt;Vue&lt;/code&gt; project.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-1/Snipaste_2024-11-20_10-55-27.png&quot; alt=&quot;Vue folders&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Categories&lt;/h2&gt;
&lt;p&gt;As a beginner, you mainly need to know which files you will use and which you can ignore for now. I roughly split them into these categories:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;src&lt;/code&gt; folder: where your source code lives and where most of your work happens.&lt;/li&gt;
&lt;li&gt;Configuration files: for example, &lt;code&gt;vite.config&lt;/code&gt;; you use them when the project needs configuration.&lt;/li&gt;
&lt;li&gt;Other files: for example, &lt;code&gt;README.md&lt;/code&gt;, which introduces the project to people on GitHub. You will rarely touch these.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In practice, you will spend most of your time in &lt;code&gt;src&lt;/code&gt; and occasionally configure something in a file such as &lt;code&gt;xxx.js&lt;/code&gt; or &lt;code&gt;xxx.json&lt;/code&gt;. For example, in a Vue project, &lt;code&gt;vite.config&lt;/code&gt; can configure a proxy, which is a simple way to point the front end at your back-end service.&lt;/p&gt;
&lt;h2&gt;The &lt;code&gt;src&lt;/code&gt; Folder&lt;/h2&gt;
&lt;p&gt;Now let us look more closely at &lt;code&gt;src&lt;/code&gt;. Recognizing its structure makes writing code much more comfortable. Please do not become the person who throws files anywhere.&lt;/p&gt;
&lt;p&gt;Here is the structure of my blog project, which is an &lt;code&gt;Astro&lt;/code&gt; project.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-1/Snipaste_2024-11-20_21-42-17.png&quot; alt=&quot;My blog folders&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Different project types have different files in &lt;code&gt;src&lt;/code&gt;, but first learn the common ones:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;pages&lt;/code&gt; (&lt;code&gt;views&lt;/code&gt; in Vue): page files such as &lt;code&gt;login.vue&lt;/code&gt; and &lt;code&gt;register.vue&lt;/code&gt;. Each one maps to a real page in the project.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;assets&lt;/code&gt;: static resources such as images that are rendered in the front end.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;components&lt;/code&gt;: reusable UI pieces. For example, the navigation bar at the top of this blog is a component. Every page uses it, but there is only one copy of its code. Components are one of the core ideas in front-end projects, and this folder is often further divided by purpose.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These are the basics that almost every project has. Here is another &lt;code&gt;src&lt;/code&gt; structure from a Vue project.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/source-of-blog/blog-1/Snipaste_2024-11-20_21-43-06.png&quot; alt=&quot;Vue src folders&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;router&lt;/code&gt;: where Vue router configuration lives. Search for Vue Router if you want to learn the details.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;layout&lt;/code&gt;: this leads to the idea of nested layouts. You can write a large reusable template, such as &lt;code&gt;layout.astro&lt;/code&gt; or &lt;code&gt;layout.vue&lt;/code&gt;, for the general structure of pages. Then individual pages import that template and put their own content inside it.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Finally&lt;/h3&gt;
&lt;p&gt;There are many folders I have not mentioned. Some may be important, but I do not know enough about them yet. A useful first step is to translate or search the folder name; most of the time, that tells you its purpose.&lt;/p&gt;
&lt;p&gt;You may have noticed that many folders correspond to a large area of front-end knowledge. You can learn piece by piece from your own project structure, or from someone else&apos;s project.&lt;/p&gt;
</content:encoded></item></channel></rss>