<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Công nghệ · Sonng9800</title>
    <link>https://sonnguyen9800.com/vi/dev/</link>
    <description>Blog của Sơn</description>
    <generator>Hugo</generator>
    <language>vi-vn</language>
    <lastBuildDate>Mon, 10 Mar 2025 00:20:00 +0700</lastBuildDate>
    <atom:link href="https://sonnguyen9800.com/vi/dev/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Basic on Csharp delegates, and more ...</title>
      <link>https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/</link>
      <pubDate>Mon, 10 Mar 2025 00:20:00 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/thumbnail_hu_ec031c780312fa3b.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/thumbnail_hu_6a4a5c8869b2fed2.webp 640w, https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/thumbnail_hu_4843b34caeb6c053.webp 960w, https://sonnguyen9800.com/dev/csharp-delegate-func-and-action/thumbnail_hu_ec031c780312fa3b.webp 1440w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;5688&#34; height=&#34;3713&#34; alt=&#34;Thumbnail 1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Csharp is crazy powerful, however, I have trouble in understanding its &lt;code&gt;delegate&lt;/code&gt; and delegates&amp;rsquo;s implementation, including &lt;code&gt;Action&lt;/code&gt;, &lt;code&gt;EventHandler&lt;/code&gt;, &lt;code&gt;Func&lt;/code&gt;. Therefore, this post is written to summarized all of these. I would give each the definition and some analysis.&lt;/p&gt;&#xA;&lt;h5 id=&#34;a-delegate&#34;&gt;A. Delegate&lt;/h5&gt;&#xA;&lt;p&gt;&lt;code&gt;Delegate&lt;/code&gt; is simply a reference to a method. The example that gives the best illustration on the application of &lt;code&gt;delegate&lt;/code&gt; is a UI Button. Whatever framework, engine or libraries you use, the &lt;code&gt;UIButton&lt;/code&gt; you create must have the ability to trigger callback method.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I Stop Worrying and Love Data-Oriented Programming!</title>
      <link>https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/</link>
      <pubDate>Sat, 08 Mar 2025 14:00:00 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/thumbnail_hu_ec031c780312fa3b.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/thumbnail_hu_6a4a5c8869b2fed2.webp 640w, https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/thumbnail_hu_4843b34caeb6c053.webp 960w, https://sonnguyen9800.com/dev/how-i-stop-worrying-and-love-data-oriented-programming/thumbnail_hu_ec031c780312fa3b.webp 1440w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;5688&#34; height=&#34;3713&#34; alt=&#34;alt text&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Game development should be full of cheerfulness, making game should not be a hassle. But every developer in this field know that game architecture should never be underestimated. Coding new features, build one mechanics upon older mechanic means letting one foot down to the &lt;em&gt;River of Styx&lt;/em&gt;!&lt;/p&gt;&#xA;&lt;p&gt;“&lt;em&gt;Code should be extensible but not easy to modify&lt;/em&gt;” - one said (this is one of pillars of &lt;strong&gt;SOLID&lt;/strong&gt; principle), but it’s easier said than done. Code scaling is a nightmare, like an old &lt;em&gt;Lovecraftian&lt;/em&gt; novel where at first they are just ugly creatures, which appear shadowy, blurry and obscured, yet every one dare to go one step further into abyss immediately recognize the figures to be an old god: messy, chaotic, armed with tentacles and leaves an impression of a &lt;em&gt;chthonic being&lt;/em&gt;!&lt;/p&gt;</description>
    </item>
    <item>
      <title>On Csharp - Covariance and Contravariance</title>
      <link>https://sonnguyen9800.com/dev/on-csharp---covariance-and-contravariance/</link>
      <pubDate>Wed, 12 Jun 2024 21:53:30 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/on-csharp---covariance-and-contravariance/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/on-csharp---covariance-and-contravariance/Capture_hu_d0d13acc8b440691.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/on-csharp---covariance-and-contravariance/Capture_hu_d0d13acc8b440691.webp 640w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;680&#34; height=&#34;329&#34; alt=&#34;alt text&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Recently I decided to teach myself some &lt;strong&gt;C#&lt;/strong&gt; knowledge that I found my self lacking, including but not limited to &lt;code&gt;Task&lt;/code&gt; (&lt;code&gt;Concurrency&lt;/code&gt;), &lt;code&gt;delegates&lt;/code&gt; and some &lt;em&gt;Design Patterns&lt;/em&gt;. While reading books, I encountered two concepts that sound pretty weird. They are &lt;em&gt;Covariance&lt;/em&gt; and &lt;em&gt;Contravariance&lt;/em&gt;. What are these?&lt;/p&gt;&#xA;&lt;h5 id=&#34;problem&#34;&gt;Problem&lt;/h5&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I didn&amp;rsquo;t find any good translation to Vietnamese of these two concepts.&lt;/li&gt;&#xA;&lt;li&gt;The first result from Google indicates that Covariance is related to statistic?&lt;/li&gt;&#xA;&lt;li&gt;So, what are they?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h5 id=&#34;definition&#34;&gt;Definition&lt;/h5&gt;&#xA;&lt;p&gt;Below here &lt;em&gt;my own&lt;/em&gt; definition for some keywords:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Self-hosting Immich – A Google Photo Alternative or an Erotic journey to the Abyss?</title>
      <link>https://sonnguyen9800.com/dev/self-hosting-immich-a-heroic-adventure-or-an-erotic-dark-tale/</link>
      <pubDate>Thu, 26 Oct 2023 01:08:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/self-hosting-immich-a-heroic-adventure-or-an-erotic-dark-tale/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/self-hosting-immich-a-heroic-adventure-or-an-erotic-dark-tale/image-1_hu_3920633604ad3c8c.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/self-hosting-immich-a-heroic-adventure-or-an-erotic-dark-tale/image-1_hu_62e29ffb656a47ff.webp 640w, https://sonnguyen9800.com/dev/self-hosting-immich-a-heroic-adventure-or-an-erotic-dark-tale/image-1_hu_3920633604ad3c8c.webp 960w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;1024&#34; height=&#34;1024&#34; alt=&#34;Alt text&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once upon a time, there was a man who believed in the power of authority and unity. This man sold his soul to &lt;em&gt;the-god-whose-name-should-not-be-spoken&lt;/em&gt;, in favor of a small gift: the power of &lt;em&gt;The Great Knowledge&lt;/em&gt; – in which the man now can have his own Book Library, that can be compared to the great &lt;em&gt;Library of Alexandria&lt;/em&gt;, which had been burned not once, not twice, but at least three times. Granted the power of wisdom and knowledge, but the man wants more. He asked God for more power. The Lord said:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setup a Calibre Server on VPS</title>
      <link>https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/</link>
      <pubDate>Mon, 15 May 2023 14:24:56 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/</guid>
      <description>&lt;p&gt;&lt;figure&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/thumbnail_hu_7a92f87450fc9d15.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/thumbnail_hu_dd57a6b0d4839373.webp 640w, https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/thumbnail_hu_b2c038b150c84f84.webp 960w, https://sonnguyen9800.com/dev/setup-a-calibre-server-on-vps/thumbnail_hu_7a92f87450fc9d15.webp 1440w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;1588&#34; height=&#34;507&#34; alt=&#34;My Library&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;figcaption&gt;Library&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ebook collecting became my recent hobby for recent months. For most of the time until last week, I simply stored my books in a OneDrive account and managed the books through calibre client. However, some issues on Linux machine caused a small inconvenience in my book database &amp;amp; onedrive synchronicity. Thus, it was a must to come up with a more elegant design that can fulfill my requirements. Although the online library works great at the moment, the actual development &amp;amp; deployment was a very long, complicated process that inflated into many sub-steps and rabbit holes which cost all of my weekends. Hence, I decided to write down all of these steps I took in the hope that this note will be helpful for everyone interested in this topic and me-in-the-future as well.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make your own Android Retro handheld device!</title>
      <link>https://sonnguyen9800.com/dev/make-your-own-android-retro-handheld-device/</link>
      <pubDate>Sat, 06 May 2023 15:03:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/make-your-own-android-retro-handheld-device/</guid>
      <description>&lt;p&gt;Having a job that involves 8 hours of sitting in front of the computer screen sometimes makes you tired of doing anything related to the PC, even gaming. In addition, getting mature means that our brains sometimes tricks us into the memories of some good old days, despite of the fact that these “good days” were very likely illusions produced by the mind and nothing more than desperate, tragic wishes. Although such wishes and forgotten pasts can be annoying and haunting, I strongly believe that a deep look into the past can reveal valuable insight into history, culture and even humanity as a whole.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making Deep Game - A Book Review</title>
      <link>https://sonnguyen9800.com/dev/making-deep-game---a-book-review/</link>
      <pubDate>Mon, 24 Apr 2023 23:50:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/making-deep-game---a-book-review/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/making-deep-game---a-book-review/book_cover_hu_5a37af0a42aeab8a.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/making-deep-game---a-book-review/book_cover_hu_5a37af0a42aeab8a.webp 640w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;667&#34; height=&#34;1000&#34; alt=&#34;Cover&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;What can constitute a “&lt;strong&gt;deep game&lt;/strong&gt;”? Could a game reproduce or invoke experiences or feelings that are so unique, so compromising, and thoughtful that changes the player’s perspective on life? &lt;strong&gt;Doris C. Rusch&lt;/strong&gt;, a Sweden professor on game design believes video games can be much more than simple entertainment. In 2017, she wrote “&lt;strong&gt;Making Deep Games&lt;/strong&gt;”, a manual book for designers to craft meaningful games. Below is a short review and analysis of the book.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploy a Unity Webgl Build to a Local Server</title>
      <link>https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/</link>
      <pubDate>Tue, 05 Apr 2022 23:54:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/thumbnail_hu_ec031c780312fa3b.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/thumbnail_hu_6a4a5c8869b2fed2.webp 640w, https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/thumbnail_hu_4843b34caeb6c053.webp 960w, https://sonnguyen9800.com/dev/deploy-a-unity-webgl-build-to-a-local-server/thumbnail_hu_ec031c780312fa3b.webp 1440w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;5688&#34; height=&#34;3713&#34; alt=&#34;Thumbnail 1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Some colleagues of mine, who, despite of their degrees, don’t know how to deploy a &lt;strong&gt;WebGL&lt;/strong&gt; build to a local server. Thus, I suggested he use a small add-on on &lt;strong&gt;Google Chrome&lt;/strong&gt;. However, as a programmer myself, I quite dislike this solution (it is not nerdy, requires no programming and sometimes the add-on is lagged or broken). Furthermore, it turns out that there is not so many topics and tutorial about this on the internet. Hence, I made this post to list all solutions I knew that work for me to deploy WebGL Game to the local server. Hopefully, this will help some game developers in the future.&lt;/p&gt;</description>
    </item>
    <item>
      <title>When Your Unity Component Mysteriously Disappeared</title>
      <link>https://sonnguyen9800.com/dev/when-your-unity-component-mysteriously-disappeared/</link>
      <pubDate>Mon, 13 Dec 2021 01:28:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/when-your-unity-component-mysteriously-disappeared/</guid>
      <description>&lt;p&gt;Recently, I encountered a tricky, mysterious bug occurring in my company’s game project. “&lt;strong&gt;That’s just an animation bug&lt;/strong&gt;” so I thought, in fact, the bug is far more trickier than it should have been. Thus, I wrote down this small article to explain the problem and hope every Unity developers be aware of it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://sonnguyen9800.com/dev/when-your-unity-component-mysteriously-disappeared/image1_hu_eb7b622c173c83af.webp&#34; srcset=&#34;https://sonnguyen9800.com/dev/when-your-unity-component-mysteriously-disappeared/image1_hu_cb8815d2b9d4b9ac.webp 640w, https://sonnguyen9800.com/dev/when-your-unity-component-mysteriously-disappeared/image1_hu_eb7b622c173c83af.webp 960w&#34; sizes=&#34;(max-width: 760px) 100vw, 720px&#34; width=&#34;1171&#34; height=&#34;780&#34; alt=&#34;Image 1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;background&#34;&gt;Background&lt;/h4&gt;&#xA;&lt;p&gt;It is a must to have some assumptions and background information on the issue I encountered.&#xA;Subject: The object where the bug occurs is a normal game object, which has many child objects inside of it. For now, we refer to it as &lt;strong&gt;Object A&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Export tilemap into PNG format in Unity</title>
      <link>https://sonnguyen9800.com/dev/from-tiles-to-images/</link>
      <pubDate>Fri, 15 Oct 2021 00:19:50 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/from-tiles-to-images/</guid>
      <description>&lt;p&gt;This post is a re-up from my new &lt;em&gt;Github repository&lt;/em&gt;. Long story short, I started my own game in Unity 2D but when doing the development, I want to export &lt;strong&gt;tilemap&lt;/strong&gt; into seperate &lt;strong&gt;Image&lt;/strong&gt; file to create prefab used in later purpose.&lt;/p&gt;&#xA;&lt;p&gt;However, Not many useful topic &amp;amp; discussion regarding on this problem is good enough. Hence, I decided to create my own package to achieve this task, this one is named as &lt;strong&gt;FromTiles2Image&lt;/strong&gt;. The link to the repository and the &lt;strong&gt;.unitypackage&lt;/strong&gt; file can be visited &lt;a href=&#34;https://github.com/sonnguyen9800/FromTiles2Images&#34;&gt;here&lt;/a&gt;. Below are the content from &lt;em&gt;README&lt;/em&gt; file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Display Post Preview on Facebook by Hugo</title>
      <link>https://sonnguyen9800.com/dev/display-post-preview-on-facebook-by-hugo/</link>
      <pubDate>Sat, 24 Jul 2021 23:14:52 +0700</pubDate>
      <guid>https://sonnguyen9800.com/dev/display-post-preview-on-facebook-by-hugo/</guid>
      <description>&lt;p&gt;I launched my own personal website since this month, in August or late June, 2021. Although the platform support a lot of default template with easy installing and samples, I prefer creating my own and the experience appears to me quite confusing at the beginning but more relieved as the project went on.&lt;/p&gt;&#xA;&lt;p&gt;However, one thing troubles me lot is that when I shared my post to Facebook, which is the only social platform that I use, is that the post when I shared display incorrectly. It shows my avatar, followed by the title but incorrect description of the post. Hence, I spent 2 days reseaching about this problem. So, how to fix? It turns out that the Facebook implements a protocol to make shared links to be more organized and interesting when they be posted to their media. You can find the link &lt;a href=&#34;https://ogp.me/&#34;&gt;Here&lt;/a&gt; to read more about this.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
