<?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>Swift on phantuanvi.com</title>
    <link>https://phantuanvi.com/vi/tags/swift/</link>
    <description>Recent content in Swift on phantuanvi.com</description>
    <generator>Hugo</generator>
    <language>vi</language>
    <lastBuildDate>Mon, 13 Mar 2017 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://phantuanvi.com/vi/tags/swift/index.xml" rel="self" type="application/rss+xml" />
    <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>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>
