<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on phantuanvi.com</title>
    <link>https://phantuanvi.com/vi/posts/</link>
    <description>Recent content in Posts on phantuanvi.com</description>
    <generator>Hugo</generator>
    <language>vi</language>
    <lastBuildDate>Tue, 12 Dec 2017 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://phantuanvi.com/vi/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Blockchain là gì</title>
      <link>https://phantuanvi.com/vi/posts/0015blockchainlagi/</link>
      <pubDate>Tue, 12 Dec 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0015blockchainlagi/</guid>
      <description>&lt;p&gt;Đã có rất nhiều bàiviết về &lt;strong&gt;Blockchain&lt;/strong&gt;, nhưng mình muốn giảithích sao cho 1 họcsinh THPT cũng cóthể hiểu được. Như &lt;strong&gt;Albert Einstein&lt;/strong&gt; đã nói &amp;ldquo;&lt;em&gt;If you can&amp;rsquo;t explain it simply, you don&amp;rsquo;t understand it well enough.&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;h2 id=&#34;vấnđề-và-cách-giảiquyết&#34;&gt;Vấnđề và cách giảiquyết&lt;/h2&gt;
&lt;p&gt;Hãy xemxét 1 giaodịch chuyển tiền của &lt;strong&gt;A&lt;/strong&gt; cho &lt;strong&gt;B&lt;/strong&gt; trong cùng ngânhàng :bank:.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Có 1 vài vấnđề như sau&lt;/em&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Tiền trong tàikhoản của &lt;strong&gt;A&lt;/strong&gt; có đủ không mà đòi chuyển?&lt;/li&gt;
&lt;li&gt;Nếu đủ, thì làm sao đảmbảo chỉ với số tiền đó, &lt;strong&gt;A&lt;/strong&gt; sẽ không thamlam mà chuyển nhiều lần cho nhiều người. (vấn đề nổitiếng này là &lt;a href=&#34;https://www.google.com.vn/search?q=double-spending&#34;&gt;double-spending&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Làm sao đảmbảo người gửi tiền đúng là &lt;strong&gt;A&lt;/strong&gt; mà không phải ai khác? (Vídụ: Nhânviên ngânhàng làm bậy thì sao?)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Vaitrò giảiquyết 3 vấnđề trên đều giao cho ngânhàng :bank: (tổngquát hơn là bên-thứ-3 làm trunggian)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bitcoin được tạo ra như thế nào?</title>
      <link>https://phantuanvi.com/vi/posts/0014lichsubitcoin/</link>
      <pubDate>Fri, 08 Dec 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0014lichsubitcoin/</guid>
      <description>&lt;p&gt;Bạn cóthể google và đọc nhiều bàiviết về nó, nhưng mình có cách tiếpcận khác một chút, thúvị hơn.
Hãy cùng điềutra với mình nào.&lt;/p&gt;
&lt;h3 id=&#34;mụcđích-của-việcđiềutra-này&#34;&gt;Mụcđích của việcđiềutra này&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Tìmhiểu lịchsử rađời của &lt;strong&gt;Bitcoin&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Chứngminh, &lt;strong&gt;Satoshi&lt;/strong&gt; đã cốgắng giảiquyết vấnđề đã tồntại từ rất lâu rồi. Chứ không phải ngẫunhiên mà “một ngày đẹp trời, Satoshi ngồi nghĩ chơi chơi rồi viết ra &lt;strong&gt;Bitcoin&lt;/strong&gt;”&lt;/li&gt;
&lt;li&gt;Qua quátrình này, cũng cóthể giúp bạn tự mình tìmhiểu thêm để kiểmchứng lại.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;quátrình-điềutra&#34;&gt;Quátrình điềutra&lt;/h3&gt;
&lt;p&gt;Bắtđầu nào, google ra &lt;a href=&#34;https://en.wikipedia.org/wiki/Bitcoin&#34;&gt;wikipedia&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cài đặt Oh My Zsh và trang trí cho iTerm bằng powerlevel9k</title>
      <link>https://phantuanvi.com/vi/posts/0013itermcofigureptv/</link>
      <pubDate>Sun, 15 Oct 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0013itermcofigureptv/</guid>
      <description>&lt;p&gt;Tìnhhình HDD bị lỗi gì đó mà ko boot vào MacOS được nên mình đổi HDD luôn.
Càilại iTerm nên ghi lại đây, sau này ko mất công tìmkiếm nữa và cho những ai đang cần hehe.&lt;/p&gt;
&lt;p&gt;Khi hoànthành iTerm sẽ nhìn nhưthếnày
&lt;img loading=&#34;lazy&#34; src=&#34;http://res.cloudinary.com/vizillion/image/upload/v1507881081/0013iTerm/hinh1.png&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;bước-1---càiđặt-iterm&#34;&gt;Bước 1 - Càiđặt iTerm&lt;/h3&gt;
&lt;p&gt;Vào đây để &lt;a href=&#34;https://www.iterm2.com&#34;&gt;download&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;bước-2---càiđặt-oh-my-zsh&#34;&gt;Bước 2 - Càiđặt oh-my-zsh&lt;/h3&gt;
&lt;p&gt;Mở iTerm lên và paste dòng lệnh sau: &lt;sup id=&#39;footnote0&#39;&gt;&lt;a href=&#34;https://phantuanvi.com/vi/posts/0013itermcofigureptv/#footnote-ref0&#34;&gt;&lt;strong&gt;[0]&lt;/strong&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sh&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;c&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;bước-3---càiđặt-theme-cho-iterm&#34;&gt;Bước 3 - Càiđặt theme cho iTerm&lt;/h3&gt;
&lt;p&gt;Paste dòng lệnh sau vào iTerm: &lt;sup id=&#39;footnote1&#39;&gt;&lt;a href=&#34;https://phantuanvi.com/vi/posts/0013itermcofigureptv/#footnote-ref1&#34;&gt;&lt;strong&gt;[1]&lt;/strong&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tìm hiểu rò rỉ bộ nhớ trong closure</title>
      <link>https://phantuanvi.com/vi/posts/0012timhieuroribonhotrongclosure/</link>
      <pubDate>Mon, 13 Mar 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0012timhieuroribonhotrongclosure/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    Bài này được mình dịch &lt;a href=&#34;https://medium.com/compileswift/understanding-memory-leaks-in-closures-48207214cba#.byrdac481&#34;&gt;từ đây&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;&lt;strong&gt;Apple&lt;/strong&gt; đã có một bài báo về &lt;a href=&#34;https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html#//apple_ref/doc/uid/TP40014097-CH20-ID51&#34;&gt;&lt;em&gt;strong reference cycles&lt;/em&gt;&lt;/a&gt; trong class. Không khó hiểu sự rò rỉ bộ nhớ (&lt;em&gt;memory leak&lt;/em&gt;) là gì và làm thế nào để tránh trong trường hợp này. Tuy nhiên, đây là một tình huống khá hiếm, và dễ dàng phát hiện được. Tôi sẽ chú ý về &lt;strong&gt;closure&lt;/strong&gt; với nhiều chỗ khó hiểu hơn. Vì vậy, hãy làm rõ điều này một lần và cho sau này nữa.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sử dụng Coordinator để điều khiển App Flow trong mô hình MVVM-C</title>
      <link>https://phantuanvi.com/vi/posts/0011dieukhienluongungdungvoi-coordinators/</link>
      <pubDate>Fri, 10 Mar 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0011dieukhienluongungdungvoi-coordinators/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    Bài này được mình dịch &lt;a href=&#34;https://essays.decode.agency/coordinators-440f6ebe693d#.4brd0i682&#34;&gt;từ đây&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;Ở bài trước, chúng ta đã biết sự phức tạp và rắc rối của &lt;em&gt;controller&lt;/em&gt;, điều này giải thích vì sao &lt;strong&gt;MVC&lt;/strong&gt; lại có nickname &amp;ldquo;&lt;em&gt;Massive ViewController&lt;/em&gt;&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kiến trúc MVVM: hướng dẫn Step-by-Step</title>
      <link>https://phantuanvi.com/vi/posts/0010mo-hinh-kien-truc-mvvm-huongdantungbuoc/</link>
      <pubDate>Mon, 06 Mar 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0010mo-hinh-kien-truc-mvvm-huongdantungbuoc/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    Bài này được mình dịch &lt;a href=&#34;https://essays.decode.agency/mvvm-architecture-29373314938d#.d6rr2uqsw&#34;&gt;từ đây&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;Việc lựa chọn đúng cho mô hình kiến trúc của app là một nhiệm vụ quan trọng.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ba cách để truyền data từ Model đến Controller</title>
      <link>https://phantuanvi.com/vi/posts/0009three-ways-to-pass-data-from-model-to-controller/</link>
      <pubDate>Thu, 02 Mar 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0009three-ways-to-pass-data-from-model-to-controller/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    Bài này được mình dịch &lt;a href=&#34;https://medium.com/ios-os-x-development/ios-three-ways-to-pass-data-from-model-to-controller-b47cc72a4336#.58g9m5h64&#34;&gt;từ đây&lt;/a&gt;.
  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;div class=&#34;image-wrapper center&#34; style=&#34;max-width: 80%;&#34;&gt;
  &lt;img src=&#34;https://cdn-images-1.medium.com/max/800/1*rItHG0IlKfbHUdE-IMJK5w.png&#34; alt=&#34;Image credit: Stanford University CS193P, Fall-2010&#34; loading=&#34;lazy&#34; /&gt;&lt;p class=&#34;image-caption&#34;&gt;Image credit: Stanford University CS193P, Fall-2010&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mô hình kiến trúc iOS (phần 2)</title>
      <link>https://phantuanvi.com/vi/posts/0008ios-architecture-patterns-phan-2/</link>
      <pubDate>Mon, 27 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0008ios-architecture-patterns-phan-2/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch &lt;a href=&#34;https://medium.com/ios-os-x-development/ios-architecture-patterns-ecba4c38de52#.xo42oskm2&#34;&gt;từ đây&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài dịch &lt;a href=&#34;https://phantuanvi.com/2017/02/m%C3%B4-h%C3%ACnh-ki%E1%BA%BFn-tr%C3%BAc-ios-ph%E1%BA%A7n-1/&#34;&gt;phần 1&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;h2 id=&#34;mvvm&#34;&gt;MVVM&lt;/h2&gt;
&lt;h3 id=&#34;mới-nhất-và-tuyệt-vời-nhất-trong-mô-hình-mvx&#34;&gt;Mới nhất và tuyệt vời nhất trong mô hình MV(X)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;MVVM&lt;/strong&gt; là mới nhất trong kiểu &lt;strong&gt;MV(X)&lt;/strong&gt;, hãy hy vọng nó sẽ giải quyết được các vấn đề mà &lt;strong&gt;MV(X)&lt;/strong&gt; đối mặt trước đây.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mô hình kiến trúc iOS (phần 1)</title>
      <link>https://phantuanvi.com/vi/posts/0007ios-architecture-patterns-phan-1/</link>
      <pubDate>Fri, 24 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0007ios-architecture-patterns-phan-1/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch &lt;a href=&#34;https://medium.com/ios-os-x-development/ios-architecture-patterns-ecba4c38de52#.xo42oskm2&#34;&gt;từ đây&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài dịch &lt;a href=&#34;https://phantuanvi.com/2017/02/m%C3%B4-h%C3%ACnh-ki%E1%BA%BFn-tr%C3%BAc-ios-ph%E1%BA%A7n-2/&#34;&gt;phần 2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;Bạn có cảm thấy lạ khi thực hiện &lt;strong&gt;MVC&lt;/strong&gt; trong &lt;strong&gt;iOS&lt;/strong&gt;? Bạn có những nghi ngờ về việc chuyển sang &lt;strong&gt;MVVM&lt;/strong&gt;? Bạn có nghe nói về &lt;strong&gt;VIPER&lt;/strong&gt;, nhưng không chắc rằng nó có xứng đáng không?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Làm thế nào để trở thành iOS developer?</title>
      <link>https://phantuanvi.com/vi/posts/0006lamthenaodetrothanhiosdeveloper/</link>
      <pubDate>Mon, 20 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0006lamthenaodetrothanhiosdeveloper/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    Bài này được mình dịch &lt;a href=&#34;https://medium.com/ios-geek-community/how-to-become-an-ios-developer-bob-82944188ea7d&#34;&gt;từ đây&lt;/a&gt;.
  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;h2 id=&#34;động-lực-cá-nhân&#34;&gt;Động lực cá nhân&lt;/h2&gt;
&lt;p&gt;Tôi thường xuyên nhận được nhiều &lt;em&gt;email&lt;/em&gt; và &lt;em&gt;message&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tư duy trong ngôn ngữ Swift, Phần 4: map all the things!</title>
      <link>https://phantuanvi.com/vi/posts/0005tuduytrongngonnguswiftp4/</link>
      <pubDate>Thu, 16 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0005tuduytrongngonnguswiftp4/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch từ đây: &lt;a href=&#34;http://alisoftware.github.io/swift/2015/10/11/thinking-in-swift-4/&#34;&gt;alisoftware.github.io&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài này là 1 phần của series. Bạn có thể đọc các phần còn lại ở đây: &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-gi%E1%BA%A3i-c%E1%BB%A9u-ponies/&#34;&gt;phần 1&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-b%E1%BB%95-sung-t%E1%BB%AB-b%E1%BB%8F-ponies/&#34;&gt;phần 1 bổ sung&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-2-map-those-arrays/&#34;&gt;phần 2&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-3-struct-vs.-class/&#34;&gt;phần 3&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-4-map-all-the-things/&#34;&gt;phần 4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;h2 id=&#34;array-vs-optional&#34;&gt;Array vs. Optional&lt;/h2&gt;
&lt;p&gt;Ở phần trước, chúng ta đã học được function &lt;code&gt;map()&lt;/code&gt; và &lt;code&gt;flatmap()&lt;/code&gt; trên &lt;code&gt;Array&amp;lt;T&amp;gt;&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tư duy trong ngôn ngữ Swift, Phần 3: Struct vs. Class</title>
      <link>https://phantuanvi.com/vi/posts/0004tuduytrongngonnguswiftp3/</link>
      <pubDate>Sun, 12 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0004tuduytrongngonnguswiftp3/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch từ đây: &lt;a href=&#34;http://alisoftware.github.io/swift/2015/10/03/thinking-in-swift-3&#34;&gt;alisoftware.github.io&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài này là 1 phần của series. Bạn có thể đọc các phần còn lại ở đây: &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-gi%E1%BA%A3i-c%E1%BB%A9u-ponies/&#34;&gt;phần 1&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-b%E1%BB%95-sung-t%E1%BB%AB-b%E1%BB%8F-ponies/&#34;&gt;phần 1 bổ sung&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-2-map-those-arrays/&#34;&gt;phần 2&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-3-struct-vs.-class/&#34;&gt;phần 3&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-4-map-all-the-things/&#34;&gt;phần 4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;h2 id=&#34;nhắc-lại-phần-trước&#34;&gt;Nhắc lại phần trước&lt;/h2&gt;
&lt;p&gt;Trong phần 2, chúng ta đã biết cách sử dụng &lt;code&gt;map &lt;/code&gt; và &lt;code&gt;flatMap&lt;/code&gt; trên array để tránh các biến trung gian khi biến đổi và thay vào đó chúng ta đã sử dụng functional programming. &lt;sup id=&#39;footnote1&#39;&gt;&lt;a href=&#34;https://phantuanvi.com/vi/posts/0004tuduytrongngonnguswiftp3/#footnote-ref1&#34;&gt;&lt;strong&gt;[1]&lt;/strong&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tư duy trong ngôn ngữ Swift, Phần 2: map those arrays</title>
      <link>https://phantuanvi.com/vi/posts/0003tuduytrongngonnguswiftp2/</link>
      <pubDate>Wed, 08 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0003tuduytrongngonnguswiftp2/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch từ đây: &lt;a href=&#34;http://alisoftware.github.io/swift/2015/09/20/thinking-in-swift-2/&#34;&gt;alisoftware.github.io&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài này là 1 phần của series. Bạn có thể đọc các phần còn lại ở đây: &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-gi%E1%BA%A3i-c%E1%BB%A9u-ponies/&#34;&gt;phần 1&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-b%E1%BB%95-sung-t%E1%BB%AB-b%E1%BB%8F-ponies/&#34;&gt;phần 1 bổ sung&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-2-map-those-arrays/&#34;&gt;phần 2&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-3-struct-vs.-class/&#34;&gt;phần 3&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-4-map-all-the-things/&#34;&gt;phần 4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;Trong phần 1, ta đã biết cách làm thế nào để tránh &lt;code&gt;force-unwrapping optionals&lt;/code&gt;, để giải cứu ponies 🐴 và tránh code bị crash. Trong phần 2 này, ta sẽ chỉnh sửa code để làm nó trở nên Swift-er hơn thông qua &lt;code&gt;map()&lt;/code&gt; và &lt;code&gt;flatMap()&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tư duy trong ngôn ngữ Swift, Phần 1 bổ sung: Từ bỏ ponies</title>
      <link>https://phantuanvi.com/vi/posts/0002tuduytrongngonnguswiftp1bs/</link>
      <pubDate>Mon, 06 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0002tuduytrongngonnguswiftp1bs/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được dịch từ đây: &lt;a href=&#34;http://alisoftware.github.io/swift/2015/09/14/thinking-in-swift-1-addendum&#34;&gt;alisoftware.github.io&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài này là 1 phần của series. Bạn có thể đọc các phần còn lại ở đây: &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-gi%E1%BA%A3i-c%E1%BB%A9u-ponies/&#34;&gt;phần 1&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-b%E1%BB%95-sung-t%E1%BB%AB-b%E1%BB%8F-ponies/&#34;&gt;phần 1 bổ sung&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-2-map-those-arrays/&#34;&gt;phần 2&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-3-struct-vs.-class/&#34;&gt;phần 3&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-4-map-all-the-things/&#34;&gt;phần 4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;h2 id=&#34;đừng-bao-giờ-giết-một-pony-&#34;&gt;Đừng bao giờ giết một pony ?&lt;/h2&gt;
&lt;p&gt;Trong bài viết lần trước, tôi kêu gọi các bạn không sử dụng &lt;code&gt;!&lt;/code&gt;. Một số bạn có thể đã hiểu theo kiểu tiêu cực như là &amp;ldquo;không bao giờ sử dụng nó, đừng bao giờ&amp;rdquo;. Những gì tôi nói là trong thực tế  &amp;ldquo;mỗi khi bạn thêm một &lt;code&gt;!&lt;/code&gt; chỉ vì trình biên dịch gợi ý, bạn đang giết chết một pony 🐴 &amp;ldquo;. Nhưng chắc chắn rằng 🐴 có thể tiếp tục sống nếu bạn thực sự biết những gì bạn đang làm. Đừng làm điều đó chỉ vì trình biên dịch đề nghị, hãy suy nghĩ thật kỹ.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tư duy trong ngôn ngữ Swift, Phần 1: Giải cứu ponies</title>
      <link>https://phantuanvi.com/vi/posts/0001tuduytrongngonnguswiftp1/</link>
      <pubDate>Wed, 01 Feb 2017 00:00:00 +0000</pubDate>
      <guid>https://phantuanvi.com/vi/posts/0001tuduytrongngonnguswiftp1/</guid>
      <description>&lt;div class=&#34;alert alert-info&#34;&gt;&lt;span class=&#34;alert-icon&#34;&gt;ℹ️&lt;/span&gt;&lt;div class=&#34;alert-content&#34;&gt;
    &lt;p&gt;Bài này được mình dịch từ đây: &lt;a href=&#34;http://alisoftware.github.io/swift/2015/09/06/thinking-in-swift-1/&#34;&gt;alisoftware.github.io&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bài này là 1 phần của series. Bạn có thể đọc các phần còn lại ở đây: &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-gi%E1%BA%A3i-c%E1%BB%A9u-ponies/&#34;&gt;phần 1&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-1-b%E1%BB%95-sung-t%E1%BB%AB-b%E1%BB%8F-ponies/&#34;&gt;phần 1 bổ sung&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-2-map-those-arrays/&#34;&gt;phần 2&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-3-struct-vs.-class/&#34;&gt;phần 3&lt;/a&gt;, &lt;a href=&#34;https://phantuanvi.com/2017/02/t%C6%B0-duy-trong-ng%C3%B4n-ng%E1%BB%AF-swift-ph%E1%BA%A7n-4-map-all-the-things/&#34;&gt;phần 4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e7f3ff;
  border-color: #2196F3;
  color: #0d47a1;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #4CAF50;
  color: #1b5e20;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #FF9800;
  color: #e65100;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
  color: #b71c1c;
}

.alert-content {
  display: inline-block;
}

.alert-content p:last-child {
  margin-bottom: 0;
}
&lt;/style&gt;

&lt;p&gt;Tôi thấy rằng, những-người-mới-tìm-hiểu về Swift thường hay cố chuyển đổi code của họ từ ObjC sang Swift. Nhưng phần khó nhất để code trong Swift không phải là về cú pháp mà là cách bạn tư duy trong Swift, sử dụng những khái niệm mới trong Swift mà không có trong ObjC.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
