<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PU JIE</title>
    <description>The latest articles on DEV Community by PU JIE (@pujes).</description>
    <link>https://dev.to/pujes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4089606%2Feaee5038-0a6a-4699-b0b4-c7ee181f6a50.png</url>
      <title>DEV Community: PU JIE</title>
      <link>https://dev.to/pujes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pujes"/>
    <language>en</language>
    <item>
      <title>I built a location-to-station finder for China’s high-speed rail</title>
      <dc:creator>PU JIE</dc:creator>
      <pubDate>Tue, 01 Sep 2026 15:13:55 +0000</pubDate>
      <link>https://dev.to/pujes/i-built-a-location-to-station-finder-for-chinas-high-speed-rail-5beg</link>
      <guid>https://dev.to/pujes/i-built-a-location-to-station-finder-for-chinas-high-speed-rail-5beg</guid>
      <description>&lt;p&gt;China’s high-speed rail network is easy to admire and surprisingly easy to use once you know the correct station. The difficult part for many first-time visitors happens earlier: a single city can have several major stations, and a traveler often starts with a hotel, airport, attraction, or street address—not a station name.&lt;/p&gt;

&lt;p&gt;I initially wanted to build a practical transport tool for foreign visitors in China. After reading travel questions, the recurring problem was not simply “how do I buy a train ticket?” It was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which station should I depart from?&lt;/li&gt;
&lt;li&gt;Is Shanghai Hongqiao the same place as Shanghai Station?&lt;/li&gt;
&lt;li&gt;Which English station name matches the Chinese name shown in the booking app?&lt;/li&gt;
&lt;li&gt;Is the nearest station actually useful for my destination?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built a small station-finding workflow instead of another static railway map.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow
&lt;/h2&gt;

&lt;p&gt;The user enters two real places:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;where they are starting from, such as a hotel or airport;&lt;/li&gt;
&lt;li&gt;where they are going, such as another hotel, city center, or attraction.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The page then shows candidate departure and arrival stations side by side, with both English and Chinese station names. After the user selects a pair, the tool prepares the exact station names for an official Railway 12306 check.&lt;/p&gt;

&lt;p&gt;You can try the current version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://askcn.asia/guides/china-train-travel-guide/" rel="noopener noreferrer"&gt;China high-speed rail station finder&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I did not turn it into a ticket seller
&lt;/h2&gt;

&lt;p&gt;Railway schedules, ticket availability, fares, and passenger rules are official-service data. I do not want a travel helper to imply that a route exists merely because two stations are geographically close.&lt;/p&gt;

&lt;p&gt;The boundary is therefore deliberate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask-China helps turn real places into candidate stations.&lt;/li&gt;
&lt;li&gt;It shows bilingual names so travelers can recognize the correct station.&lt;/li&gt;
&lt;li&gt;Railway 12306 remains the final place to verify the journey and book.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also keeps failure states honest. If place search or route estimation is unavailable, the page should say that instead of inventing a confident answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The implementation decisions that mattered
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Treat a city and a station as different entities
&lt;/h3&gt;

&lt;p&gt;A city name is not enough. “Shanghai” may refer to Shanghai Station, Shanghai Hongqiao, Shanghai South, or another station. The UI keeps the traveler’s place, the candidate station, and the official railway identity separate.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Use a controlled station directory
&lt;/h3&gt;

&lt;p&gt;Place-search providers may return landmarks, metro stops, or similarly named POIs. Candidate stations are matched against a controlled Railway 12306 station directory before they are shown as official rail stations.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Preserve bilingual names
&lt;/h3&gt;

&lt;p&gt;The English name helps the traveler understand the result. The Chinese name helps them match signs, taxis, maps, and Chinese booking screens. Showing only one language creates avoidable mistakes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Make the final handoff explicit
&lt;/h3&gt;

&lt;p&gt;The result is guidance, not a live timetable. The last step is an official 12306 verification, with the selected station names kept visible so the traveler can notice a mismatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am testing next
&lt;/h2&gt;

&lt;p&gt;I am looking for cases where the “nearest” station is not the best practical station, especially in cities with several large hubs. I also want to learn whether visitors understand the difference between station selection and live train availability without reading a long explanation.&lt;/p&gt;

&lt;p&gt;If you have traveled by train in China, I would appreciate examples where a city’s station names confused you—or where a geographically close station was the wrong choice.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I used AI to help edit this post. The product problem, implementation decisions, and boundaries described here are mine.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>I built a bilingual railway station finder for foreign travelers in China</title>
      <dc:creator>PU JIE</dc:creator>
      <pubDate>Sat, 22 Aug 2026 11:24:19 +0000</pubDate>
      <link>https://dev.to/pujes/i-built-a-bilingual-railway-station-finder-for-foreign-travelers-in-china-5o4</link>
      <guid>https://dev.to/pujes/i-built-a-bilingual-railway-station-finder-for-foreign-travelers-in-china-5o4</guid>
      <description>&lt;p&gt;When I first started working on Ask-China, I wanted to solve a broad problem: intercity travel is much harder when you do not speak the local language.&lt;/p&gt;

&lt;p&gt;China's high-speed rail network is extensive, but the first problem is often not the train. It is choosing the correct station.&lt;/p&gt;

&lt;h2&gt;
  
  
  A city is not a station
&lt;/h2&gt;

&lt;p&gt;A traveler may know the name of a hotel, landmark, or neighborhood, but a booking service normally asks for a railway station. Large cities such as Beijing and Shanghai have several major stations, and they can be far apart.&lt;/p&gt;

&lt;p&gt;That creates a small but expensive decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which station is convenient from my current location?&lt;/li&gt;
&lt;li&gt;What is its Chinese name?&lt;/li&gt;
&lt;li&gt;Does the station pair have a suitable train on my travel date?&lt;/li&gt;
&lt;li&gt;What should I enter in the official booking service?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built a free station finder around that gap:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://askcn.asia/guides/china-train-travel-guide/#station-finder" rel="noopener noreferrer"&gt;Try the China railway station finder&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The flow starts with places travelers already know
&lt;/h2&gt;

&lt;p&gt;Instead of asking users to select a station immediately, the tool asks for two real places: a starting point and a destination.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter a hotel or landmark in Shanghai.&lt;/li&gt;
&lt;li&gt;Enter a hotel or landmark in Beijing.&lt;/li&gt;
&lt;li&gt;Compare nearby railway-station candidates for both places.&lt;/li&gt;
&lt;li&gt;Select the departure and arrival stations.&lt;/li&gt;
&lt;li&gt;Copy the English and Chinese station names.&lt;/li&gt;
&lt;li&gt;Continue to the official 12306 service to check the actual trains.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The main interface is built in React. Place search runs through a server-side endpoint, while the railway candidates are matched against a controlled station registry. This lets the UI show readable English place information without treating every map result as a valid passenger station.&lt;/p&gt;

&lt;h2&gt;
  
  
  “Nearest” does not mean “best”
&lt;/h2&gt;

&lt;p&gt;This was the most important product decision.&lt;/p&gt;

&lt;p&gt;Distance can help a traveler understand the local journey to a station, but it cannot determine whether that station has the best train for a particular date. A slightly farther station may have a direct service, a better departure time, or more availability.&lt;/p&gt;

&lt;p&gt;So the tool presents several candidates instead of silently choosing one. It separates two questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local access:&lt;/strong&gt; Which stations are reasonably close to the place?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rail suitability:&lt;/strong&gt; Which station pair has the right train for this date?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask-China helps with the first question. Official 12306 remains the source for the second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bilingual station names are part of the interface
&lt;/h2&gt;

&lt;p&gt;English names help travelers understand the choice, but Chinese station names are often what they need when using a local app, showing a driver where they are going, or confirming that a ticket uses the intended station.&lt;/p&gt;

&lt;p&gt;Each candidate therefore includes both forms, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shanghai Hongqiao / 上海虹桥&lt;/li&gt;
&lt;li&gt;Beijing South / 北京南&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The selected pair is kept together so it can be copied and checked without translating it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I did not build another ticket-booking layer
&lt;/h2&gt;

&lt;p&gt;The tool does not sell tickets, collect passport details, display live seat availability, or claim a partnership with China Railway.&lt;/p&gt;

&lt;p&gt;Those functions belong to official 12306. The handoff is deliberate: Ask-China translates a traveler's real-world locations into station choices, then 12306 handles trains, dates, fares, availability, ticketing, and railway rules.&lt;/p&gt;

&lt;p&gt;On desktop, the website can prepare a station-and-date query for the 12306 website. Mobile apps are less predictable, so the interface also keeps a copy-and-search fallback rather than claiming that every app handoff will be prefilled.&lt;/p&gt;

&lt;h2&gt;
  
  
  The map is an enhancement, not the answer
&lt;/h2&gt;

&lt;p&gt;I initially treated the map as a central part of the page. In practice, that made the product feel like a rail-network visualization instead of a tool for completing a task.&lt;/p&gt;

&lt;p&gt;The current hierarchy is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search two places.&lt;/li&gt;
&lt;li&gt;Compare station candidates.&lt;/li&gt;
&lt;li&gt;Select the bilingual station pair.&lt;/li&gt;
&lt;li&gt;Check the actual journey on 12306.&lt;/li&gt;
&lt;li&gt;Use the local map only when it helps explain station access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the optional map cannot load, the station comparison and official handoff should remain understandable. This also forced me to design explicit loading, empty, slow-service, retry, and fallback states.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would like feedback on
&lt;/h2&gt;

&lt;p&gt;I would especially value feedback on three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the difference between “nearby station” and “best train” clear enough?&lt;/li&gt;
&lt;li&gt;Does comparing both ends of the trip in one interface reduce confusion?&lt;/li&gt;
&lt;li&gt;On mobile, is copying the bilingual pair before opening 12306 an acceptable fallback?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can test the current version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://askcn.asia/guides/china-train-travel-guide/#station-finder" rel="noopener noreferrer"&gt;China High-Speed Rail Map &amp;amp; Nearby Station Finder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you try it, please tell me the two places you searched and where the flow became unclear. That will be much more useful than a general rating.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>react</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
