<?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: winchell cao</title>
    <description>The latest articles on DEV Community by winchell cao (@miss_you_3000).</description>
    <link>https://dev.to/miss_you_3000</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1605022%2F322153b5-850d-452d-baf0-c032737e77b0.jpg</url>
      <title>DEV Community: winchell cao</title>
      <link>https://dev.to/miss_you_3000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miss_you_3000"/>
    <language>en</language>
    <item>
      <title>快速理解业务</title>
      <dc:creator>winchell cao</dc:creator>
      <pubDate>Tue, 11 Feb 2025 15:18:20 +0000</pubDate>
      <link>https://dev.to/miss_you_3000/kuai-su-li-jie-ye-wu-de-bu-zou-2k9k</link>
      <guid>https://dev.to/miss_you_3000/kuai-su-li-jie-ye-wu-de-bu-zou-2k9k</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;第一步：理解业务整体背景&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;了解公司定位和行业背景&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;公司概况&lt;/strong&gt;：了解公司在行业中的地位、主要产品和服务、目标用户群体等。可以通过公司官网、年报、公开的行业分析等了解这些信息。&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;行业动态&lt;/strong&gt;：对所在行业的市场需求、趋势和挑战有所了解，理解行业的整体运行模式。你可以通过相关的行业报告、新闻、同行公司等进行了解。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;业务目标与痛点&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;与业务相关的负责人（如产品经理、业务分析师等）沟通，了解公司的业务目标是什么、现在面临的痛点和挑战有哪些。试图从宏观层面理解公司业务的核心需求。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第二步：熟悉产品和服务&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;产品功能和目标用户&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;研究公司产品的具体功能及其目标用户，理解产品如何解决用户的实际问题。通过公司内部的产品文档、用户手册等资料获取这些信息。&lt;/li&gt;
&lt;li&gt;如果有产品演示或使用文档，亲自体验产品，感受不同功能模块是如何工作的。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;查看竞争对手和行业趋势&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;了解一下竞争对手的产品、他们的技术解决方案和市场反应。这不仅能帮助你理解自己公司产品的定位，还能从技术层面更好地理解业务需求。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第三步：深入了解业务流程和逻辑&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;查看业务流程图和文档&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;如果有业务流程图、用例图、业务文档等，先通读一遍，理解产品的业务流程和模块划分。每个模块的功能、数据流向以及如何支撑公司目标的都要有所了解。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;与业务人员讨论细节&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;进行面对面的业务沟通，向产品经理或业务分析师请教具体的业务需求和逻辑，确保自己能理解每个模块的目的和作用。&lt;/li&gt;
&lt;li&gt;通过理解业务文档，特别是需求文档和用户故事，找到技术实现和业务需求之间的关系。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第四步：快速理解现有系统架构&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;熟悉系统架构和模块划分&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;查阅现有的系统架构图，理解系统中各个模块如何协同工作。例如，前端如何与后端交互，数据库如何存储和处理业务数据，业务逻辑层如何支撑需求等。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;查看历史代码和模块功能&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;阅读与业务相关的核心代码，特别是业务逻辑处理的部分。了解每个功能模块是如何实现的，特别是和产品需求、流程相关的部分。通过代码走读可以帮助你理解业务与代码的映射关系。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第五步：实践和测试&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;自己动手测试功能&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;在测试环境中亲自操作系统，模拟不同的使用场景，看看业务系统如何反应。特别是常见的用户操作流程，看看系统如何处理这些请求。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;解决实际问题&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;在实践过程中，如果遇到问题，先分析背后的业务逻辑，判断问题出在哪个环节，寻找解决方案。这一过程中，你不仅能更好地理解业务，还能培养快速定位问题和解决问题的能力。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第六步：持续沟通与反馈&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;与团队保持沟通&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;参与团队会议，了解其他同事对业务的理解，分享你的观点和疑问。通过讨论，你能加深对业务的理解并发现自己可能忽略的细节。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;定期跟踪业务变动&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;业务需求是不断变化的，要时刻关注业务方面的变化和更新。与产品经理或业务人员保持定期沟通，确保自己对业务的理解与需求保持同步。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;第七步：提升跨领域能力&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;积累行业经验&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;通过参加行业相关的研讨会、培训课程等，提升你对业务的敏感度和洞察力，理解如何将技术与业务结合，创造更有价值的解决方案。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;向更多业务专家请教&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;如果公司有更资深的业务专家，可以向他们请教如何更高效地理解和应对业务挑战。这不仅可以加速你对业务的理解，还能帮助你建立跨部门的工作关系。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;通过以上步骤，你将从基础的业务背景理解，逐步深入到产品、流程和架构的细节。每个步骤都是循序渐进的，确保你对业务的理解越来越全面。你可以根据项目的实际情况适时调整这些步骤的顺序，灵活应对。&lt;/p&gt;

&lt;p&gt;如果你现在已经有了一些具体的项目或模块，可以告诉我，我可以为你提供更具体的建议！&lt;/p&gt;

</description>
    </item>
    <item>
      <title>MySQL Master-Slave Configuration</title>
      <dc:creator>winchell cao</dc:creator>
      <pubDate>Mon, 29 Jul 2024 13:58:05 +0000</pubDate>
      <link>https://dev.to/miss_you_3000/mysql-master-slave-configuration-4gmg</link>
      <guid>https://dev.to/miss_you_3000/mysql-master-slave-configuration-4gmg</guid>
      <description>&lt;p&gt;Configuring MySQL master-slave replication can enhance the availability and performance of your database. Here are the steps to set up MySQL master-slave replication:&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Two servers (master and slave), each with MySQL installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure that the MySQL versions on both servers are the same.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure network connectivity between the two servers.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Install mysql8 in docker
&lt;/h2&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 3306:3306  --restart=always --privileged=true -v /var/lib/mysql:/var/lib/mysql -v /etc/mysql/my.cnf:/etc/mysql/my.cnf -e MYSQL_ROOT_PASSWORD=your_password  --name mysql mysql:8.0.37
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Master Server Configuration
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE USER 'replica_user'@'%' IDENTIFIED BY 'your_password';
GRANT REPLICATION SLAVE ON *.* TO 'replica_user'@'%';
ALTER USER 'replica_user'@'%' IDENTIFIED WITH mysql_native_password BY 'your_password';
FLUSH PRIVILEGES;
SELECT user, host, plugin FROM mysql.user;
SHOW MASTER STATUS;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Slave Server Configuration
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CHANGE MASTER TO MASTER_HOST='host_name',MASTER_USER='replica_user',MASTER_PASSWORD='your_password',MASTER_LOG_FILE='mysql-bin.000003',MASTER_LOG_POS=1138;
start slave;
show slave status \G;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Test Replication
&lt;/h2&gt;

&lt;p&gt;Create a new database or table on the master server and check if the same changes appear on the slave server.&lt;br&gt;
By following these steps, you have successfully configured MySQL master-slave replication.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.Reset slave service
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RESET SLAVE;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Initial configuration for newly installed Ubuntu</title>
      <dc:creator>winchell cao</dc:creator>
      <pubDate>Mon, 29 Jul 2024 13:46:12 +0000</pubDate>
      <link>https://dev.to/miss_you_3000/initial-configuration-for-newly-installed-ubuntu-19d1</link>
      <guid>https://dev.to/miss_you_3000/initial-configuration-for-newly-installed-ubuntu-19d1</guid>
      <description>&lt;p&gt;A newly installed Ubuntu system requires some basic initial configuration to ensure security, performance, and usability. Here is a basic initialization guide:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Update the System
&lt;/h2&gt;

&lt;p&gt;First, make sure your system packages are up to date.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Set a password for the root user
&lt;/h2&gt;

&lt;p&gt;Open a terminal and execute the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo passwd root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable Root Login (if necessary)&lt;br&gt;
By default, root login is often disabled in Ubuntu for security reasons. If you need to enable root login, you can edit the SSH configuration file. Open the file using a text editor like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vi /etc/ssh/sshd_config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find the following line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PermitRootLogin prohibit-password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change it to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PermitRootLogin yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and close the file. Then restart the SSH service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Configure Time and Locale Settings
&lt;/h2&gt;

&lt;p&gt;Set the system timezone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo timedatectl set-timezone Asia/Shanghai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. install Docker
&lt;/h2&gt;

&lt;p&gt;To install Docker on your Ubuntu system, follow these steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Check and uninstall the old version of docker
apt-get remove docker docker-engine docker.io containerd runc
# install Docker dependencies
apt-get install ca-certificates curl gnupg lsb-release
# Add the Docker official GPG key
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Add Docker software source
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Install Docker
apt-get install docker-ce docker-ce-cli containerd.io
# Start Docker and add it to the startup items
systemctl start docker
systemctl enable docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Docker version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;install Docker Compose&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo curl -L "https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
cd /usr/local/bin/
chmod 777 docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check docker-compose version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modify daemon.json&lt;br&gt;
Open the file using a text editor like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vi  /etc/docker/daemon.json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding a mirror repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "registry-mirrors": [
    "https://docker.m.daocloud.io",
    "https://dockerproxy.com",
    "https://docker.mirrors.ustc.edu.cn",
    "https://docker.nju.edu.cn"
  ],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "50m",
    "max-file": "7"
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Docker&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#sudo systemctl daemon-reload
sudo systemctl restart docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. install trash
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt -y install trash-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;设置别名 (Alias)：&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 打开你的Shell配置文件（例如 .bashrc）
vim ~/.bashrc

# 在文件末尾添加以下行
alias rm='trash-put'

# 保存并退出，然后使配置生效
source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
