<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Personal Essays | Attack on Life</title><link>https://en.1991421.cn/tag/personal-essays/</link><atom:link href="https://en.1991421.cn/tag/personal-essays/index.xml" rel="self" type="application/rss+xml"/><description>Personal Essays</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-US</language><lastBuildDate>Sat, 11 Mar 2023 19:46:38 +0800</lastBuildDate><image><url>https://en.1991421.cn/media/sharing.png</url><title>Personal Essays</title><link>https://en.1991421.cn/tag/personal-essays/</link></image><item><title>Registering a Marriage in Beijing</title><link>https://en.1991421.cn/2023/03/11/f5f1705/</link><pubDate>Sat, 11 Mar 2023 19:46:38 +0800</pubDate><guid>https://en.1991421.cn/2023/03/11/f5f1705/</guid><description>&lt;blockquote>
&lt;p>Today I went to register for marriage, which marks a new era for me.&lt;/p>
&lt;p>Here I also summarize the marriage registration process in Beijing. Because my situation is special—one party has a Beijing collective hukou and the other has an out-of-town collective hukou—I was worried about document issues, but everything went smoothly in the end. I summarize this here in case it helps some friends.&lt;/p>
&lt;/blockquote>
&lt;!-- more -->
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2023/2023-03-11-200853.jpeg"
alt="https://static.1991421.cn/2023/2023-03-11-200853.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h2 id="requirements">
&lt;a class="heading-anchor-link" href="#requirements">Requirements&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="requirements"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ul>
&lt;li>To get married in Beijing, at least one party must have a Beijing hukou. The exception is if you are from Hong Kong, Macao, or Taiwan—you can also register.&lt;/li>
&lt;li>If you have a Beijing collective hukou, you must register in the corresponding district. I have a Haidian collective hukou, so I chose Haidian District for registration.&lt;/li>
&lt;/ul>
&lt;h2 id="appointment">
&lt;a class="heading-anchor-link" href="#appointment">Appointment&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="appointment"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ul>
&lt;li>Search for &amp;ldquo;marriage registration&amp;rdquo; on WeChat, enter Beijing Government Services, and select &amp;ldquo;Marriage Registration Appointment&amp;rdquo;.&lt;/li>
&lt;li>You will receive SMS reminders when your appointment is successful and as the appointment date approaches.&lt;/li>
&lt;/ul>
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2023/2023-03-11-200653.jpeg"
alt="https://static.1991421.cn/2023/2023-03-11-200653.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h2 id="documents-to-bring">
&lt;a class="heading-anchor-link" href="#documents-to-bring">Documents to bring&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="documents-to-bring"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>Original ID cards of both parties&lt;/li>
&lt;li>Personal hukou page
&lt;ul>
&lt;li>For Beijing collective hukou: Provide the blue permanent resident registration card and a copy of the collective hukou front page. If you don&amp;rsquo;t have a hukou page, you need to apply for one at the talent center.&lt;/li>
&lt;li>For out-of-town collective hukou: Provide corresponding documents, such as the original permanent resident registration form.&lt;/li>
&lt;li>For non-collective hukou: Provide the original household registration book.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Marriage photos
&lt;ul>
&lt;li>2 photos with red background, white shirts, etc.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>If you are worried about document issues, be sure to go to the registration office in advance to ask. I couldn&amp;rsquo;t get through to the phone number provided online, so I went to the civil affairs bureau in person.&lt;/p>
&lt;p>The marriage registration location in Haidian is the &lt;strong>Civil Affairs Bureau Marriage Registration Sub-center of Haidian District Government Services&lt;/strong>.&lt;/p>
&lt;h2 id="registration">
&lt;a class="heading-anchor-link" href="#registration">Registration&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="registration"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>On the appointed date, bring all complete documents to register. The process is very fast—just confirm the information, sign, press your fingerprint, and you can leave.&lt;/p>
&lt;h2 id="final-thoughts">
&lt;a class="heading-anchor-link" href="#final-thoughts">Final Thoughts&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="final-thoughts"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>Marriage is the formal step to start a family, so I will work hard.&lt;/p></description></item><item><title>A Trip to Handan, Hebei</title><link>https://en.1991421.cn/2022/08/15/handan-trip/</link><pubDate>Mon, 15 Aug 2022 22:39:55 +0800</pubDate><guid>https://en.1991421.cn/2022/08/15/handan-trip/</guid><description>&lt;blockquote>
&lt;p>I went to Handan, Hebei from the 12th to the 15th, walking around and experiencing different aspects of the city. Here&amp;rsquo;s what I recorded.&lt;/p>
&lt;/blockquote>
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2022/2022-08-15-232855.jpeg"
alt="A Trip to Handan, Hebei - Figure 1"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h2 id="accommodation">
&lt;a class="heading-anchor-link" href="#accommodation">Accommodation&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="accommodation"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>I stayed at Hanting Hotel for all 3 days in the urban area. This time, I tried Hanting Premium. After checking, I found that Premium is a brand upgrade from the original Hanting Economy Hotel, but I really didn&amp;rsquo;t see much improvement—only a slight price increase.&lt;/p>
&lt;p>However, there are a few things I liked about Hanting Hotel:&lt;/p>
&lt;ol>
&lt;li>Convenient &lt;code>self-service breakfast&lt;/code>—not the most delicious, but very convenient.&lt;/li>
&lt;li>&lt;code>Self-service luggage storage&lt;/code>—directly scan your ID card to store luggage, which is very convenient and supports large items.&lt;/li>
&lt;li>Provides &lt;code>iced drinks and tea&lt;/code>; the cookies are great. It&amp;rsquo;s been really hot lately, so being able to have a lemon iced drink right when entering the hotel was wonderful. Unfortunately, not all stores have this. I happened to switch hotels and found that some have fewer offerings.&lt;/li>
&lt;li>The hotel provides a &lt;code>24-hour beverage vending service&lt;/code>, which is a godsend for people like me who love iced drinks with extra ice. A lemon cool drink at night is really great.&lt;/li>
&lt;/ol>
&lt;p>For a few hundred yuan, Hanting is still a good choice. However, the so-called membership discounts don&amp;rsquo;t feel particularly cost-effective. If you&amp;rsquo;re paying for personal consumption, the discounts available on platforms like Gaode Maps are also very good.&lt;/p>
&lt;!-- more -->
&lt;h2 id="food">
&lt;a class="heading-anchor-link" href="#food">Food&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="food"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>I visited three night markets in the urban area: &lt;code>Xinhua Night Market&lt;/code>, &lt;code>Chengnan Night Market&lt;/code>, and &lt;code>Tangren Street Night Market&lt;/code>. I also walked around the nearby roads for a long time. Overall, I found many night stalls with delicious and affordable food. I really liked the flowing heart wide noodles, sweet potato fries, and fried skewers—unhealthy, but still delicious&amp;hellip;&lt;/p>
&lt;p>During my time in Handan, I didn&amp;rsquo;t see any Nayuki&amp;rsquo;s Tea or HeyTea stores. Instead, there were more Mixue Ice Cream &amp;amp; Tea and Shanghai Ayi stores, which says something about the local average consumption level.&lt;/p>
&lt;h3 id="transportation">
&lt;a class="heading-anchor-link" href="#transportation">Transportation&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="transportation"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;ul>
&lt;li>
&lt;p>On the one hand, I was not familiar with the area; on the other hand, electric bikes were too reckless, so I only rode once in a few days—safety first. After that, I took taxis the whole time. The cost wasn&amp;rsquo;t too high, acceptable.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>I also visited Daming County under Handan City. The high-speed train from Beijing to Handan took 2 hours, but getting to Daming by bus took 1 hour, which was quite troublesome.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>When returning to Beijing at Handan East Railway Station, I found it was very crowded, and it was still Monday. So I can only draw a rough conclusion: transportation is not very convenient, so all the pressure is concentrated at Handan East Station.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="attractions">
&lt;a class="heading-anchor-link" href="#attractions">Attractions&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="attractions"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;ul>
&lt;li>I visited &lt;code>Daming Ancient City&lt;/code>/&lt;code>Guangfu Ancient City&lt;/code>. Daming Ancient City is free. These are Ming and Qing Dynasty ancient cities, and I didn&amp;rsquo;t expect them to be so well preserved. Looking at the ancient city walls, I couldn&amp;rsquo;t help but imagine those historical dramas—it was quite nice. History rolls forward; through these precious historical sites, let&amp;rsquo;s imagine the past. Recommended for history enthusiasts. The only bad impression was the overall ticket-buying experience at Guangfu Ancient City, which showed how unregulated and rogue it could be.
&lt;ul>
&lt;li>Buying tickets online through platforms like Ctrip was successful but could not be validated, so we had to buy tickets on-site. This was really rogue.&lt;/li>
&lt;li>Tickets for Guangfu Mansion can be bought online but are only valid 2 hours after purchase.&lt;/li>
&lt;li>When buying tickets for Wujia Courtyard on-site, the staff casually said that once you enter, you can&amp;rsquo;t come out and re-enter. We directly refuted by saying, &amp;ldquo;Look at the back—it says &amp;lsquo;one day&amp;rsquo; and there&amp;rsquo;s no limit on the number of entries.&amp;rdquo; The staff had nothing to say. So can staff just make up random rules without being able to justify them?&lt;/li>
&lt;li>When buying tickets for Wujia Courtyard on-site, the staff asked if we had bought the city wall ticket. If not, we could get a 5 yuan discount here. But when buying the city wall ticket, no one mentioned this. So it seems that offline prices vary in different places—everything is random.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Handan &lt;code>Meile City&lt;/code> is the largest shopping mall in the city. The night view is great, and the snacks in the supermarket are wonderful—I think they taste better than those in restaurants.&lt;/li>
&lt;li>I noticed that many places didn&amp;rsquo;t have as strict health code/mask requirements as Beijing. It gave me the feeling that others were living a normal life while I was the only clown. I hope everything opens up soon.&lt;/li>
&lt;li>&lt;code>Handan Botanical Garden&lt;/code> is quite large, but it&amp;rsquo;s a bit noisy because it&amp;rsquo;s close to the railway station.&lt;/li>
&lt;/ul>
&lt;h2 id="final-thoughts">
&lt;a class="heading-anchor-link" href="#final-thoughts">Final Thoughts&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="final-thoughts"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ul>
&lt;li>It&amp;rsquo;s been really hot lately, so I didn&amp;rsquo;t visit many outdoor attractions. But the ancient cities are still worth visiting—after all, these are real historical relics. However, you need to be mentally prepared for the unregulated aspects mentioned above.&lt;/li>
&lt;li>I saw that the night market culture in Handan is great, so there are really many delicious foods. Beijingers can only be envious of this.&lt;/li>
&lt;/ul></description></item><item><title>User Authentication with Frontend–Backend Separation</title><link>https://en.1991421.cn/2018/01/10/frontend-backend-auth/</link><pubDate>Wed, 10 Jan 2018 23:14:01 +0800</pubDate><guid>https://en.1991421.cn/2018/01/10/frontend-backend-auth/</guid><description>&lt;blockquote>
&lt;p>Modern web apps favor frontend–backend separation: frontend focuses on UX, backend on data/logic. This benefits development and maintenance, but it also raises questions about user authentication.&lt;/p>
&lt;/blockquote>
&lt;p>After several projects&amp;rsquo; architecture design and development, I have a more systematic understanding of this area. I&amp;rsquo;m summarizing it here; welcome to criticize and correct me.&lt;/p>
&lt;h1 id="how-to-authenticate-users">How to authenticate users?&lt;/h1>&lt;h2 id="traditional-session--cookie">
&lt;a class="heading-anchor-link" href="#traditional-session--cookie">Traditional: session + cookie&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="traditional-session--cookie"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/blog/2018-01-12-030402.jpg"
alt="Session&amp;#43;Cookie"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;p>HTTP is stateless, but with the enrichment of requirements, we need to know the user&amp;rsquo;s state to provide different services, which led to the existence of cookies and sessions.&lt;/p>
&lt;h3 id="what-is-a-cookie">
&lt;a class="heading-anchor-link" href="#what-is-a-cookie">What is a cookie?&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="what-is-a-cookie"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>&lt;code>Cookies are a solution for maintaining state on the client side&lt;/code>. By definition, a cookie is special information sent by the server to the client, stored as a text file on the client, and then the client brings this special information with every subsequent request to the server.&lt;/p>
&lt;h3 id="what-is-a-session">
&lt;a class="heading-anchor-link" href="#what-is-a-session">What is a session?&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="what-is-a-session"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>&lt;code>Sessions maintain state through the server&lt;/code>. Since the term &amp;ldquo;Session&amp;rdquo; has many semantic meanings, it&amp;rsquo;s necessary to clarify its meaning here. First, we usually translate Session as &amp;ldquo;会话&amp;rdquo; (huìhuà), so we can refer to a series of interactions between the client browser and the server as a Session. From this semantic perspective, we talk about the duration of a Session and what operations were performed during the Session; second, Session refers to the storage space opened by the server for the client, and the information stored in it is used to maintain state. From this semantic perspective, we refer to what content is stored in the Session and how to retrieve matching content from the Session based on key values.&lt;/p>
&lt;h3 id="using-session--cookie">
&lt;a class="heading-anchor-link" href="#using-session--cookie">Using session + cookie&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="using-session--cookie"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>When a user logs in, the server creates a session, generates a sessionId, and writes it to the frontend Cookie. In each subsequent request, the sessionId is included, and the server retrieves the corresponding user&amp;rsquo;s identity information through the sessionId.&lt;/p>
&lt;p>Of course, if we are actually developing using the Spring framework, creating a session and writing it to the response Cookie will be automatic.&lt;/p>
&lt;h2 id="a-step-forward-jwt">
&lt;a class="heading-anchor-link" href="#a-step-forward-jwt">A step forward: JWT&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="a-step-forward-jwt"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/blog/2018-01-12-030316.png"
alt="JWT"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;p>Compared to the previous session and cookie mechanism, the token mechanism is an improvement. For user authentication, the server-side session is actually unnecessary and no storage is required.
When a user logs in successfully, the backend issues a token. The user information for identity verification can be directly encrypted and encapsulated in the token. The server returns the token to the frontend, which stores it in a Cookie, while the server doesn&amp;rsquo;t need any storage.
In subsequent requests, the user carries the token in the request header. The server will decrypt the token to check if it has expired or if it is present.&lt;/p>
&lt;h3 id="why-is-this-an-improvement">
&lt;a class="heading-anchor-link" href="#why-is-this-an-improvement">Why is this an improvement?&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="why-is-this-an-improvement"
aria-label="Copy anchor link"
title="Copy anchor link"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;ol>
&lt;li>The client need not be a browser&lt;/li>
&lt;/ol>
&lt;p>When we use the traditional session + cookie scheme, we actually need to write the session into a cookie, which determines that our frontend must be a browser. In today&amp;rsquo;s popular APP era, this is too limited. For example, an APP actually uses &lt;code>SQLite&lt;/code> as its storage medium.&lt;/p>
&lt;ol start="2">
&lt;li>Auth can be an independent service&lt;/li>
&lt;/ol>
&lt;p>The traditional scheme actually binds user authentication and API services together, while JWT is just a simple token that also carries key user information, so an independent service can be created specifically for issuing tokens.
When we are doing SSO or third-party API integration, we will notice that many authorization services are independent. This is decoupling, this is progress, and this is the charm of this scheme.&lt;/p></description></item><item><title>Personal Tech Blog Launched</title><link>https://en.1991421.cn/2016/09/03/38016/</link><pubDate>Sat, 03 Sep 2016 14:31:56 +0800</pubDate><guid>https://en.1991421.cn/2016/09/03/38016/</guid><description>&lt;p>This is my first truly personal site. From now on, I’ll record thoughts and learnings here. I trust my memory, but I trust the pen more.
I graduated in July 2014. Two years flew by; I worked harder than average, comparing myself with those better than me. Abilities improved, and new problems kept appearing. Dissatisfied with the status quo, I kept learning and doing — becoming a little “cockroach” that never stops. Of course, there are always people working harder and doing better. Thanks to them, society improves day by day.
I never cultivated the habit of writing — which is a shame. “No time” is an excuse. If you truly want something, you make time. Thanks to the last two years of steady technical accumulation, this simple site is a small fruit of that effort — and I hope it’s also a seed. May it accompany my journey forward and preserve countless ideas and experiences, for myself and for the Internet from which they came.
I believe excellence is a habit.
The coder’s world is wonderfully curious.&lt;/p></description></item></channel></rss>