<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Puujee on Medium]]></title>
        <description><![CDATA[Stories by Puujee on Medium]]></description>
        <link>https://medium.com/@tspuujee?source=rss-efe127798d38------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dGPEgk9l5ogo65Xi34r8Sg.jpeg</url>
            <title>Stories by Puujee on Medium</title>
            <link>https://medium.com/@tspuujee?source=rss-efe127798d38------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:15:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tspuujee/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Clean code — Цэвэр код Part-II]]></title>
            <link>https://medium.com/@tspuujee/clean-code-%D1%86%D1%8D%D0%B2%D1%8D%D1%80-%D0%BA%D0%BE%D0%B4-part-ii-84b79b894d4c?source=rss-efe127798d38------2</link>
            <guid isPermaLink="false">https://medium.com/p/84b79b894d4c</guid>
            <dc:creator><![CDATA[Puujee]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 01:54:29 GMT</pubDate>
            <atom:updated>2026-09-02T01:54:29.317Z</atom:updated>
            <content:encoded><![CDATA[<p>Цэвэрхэн код дээр баримталдаг түгээмэл зарчимууд:</p><p><strong>DRY </strong>(Don’t Repeat Yourself): Функц эсвэл классуудыг жижиглэх замаар нийтлэг дахин ашиглагдахуйц функц эсвэл классуудыг үүсгэж ашиглах хэрэгтэй. Нэг логик болон нэг кодыг бүү давт.<br>Жишээ нь:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cc6628ff713bc0e34bea1816f6c4e6b/href">https://medium.com/media/6cc6628ff713bc0e34bea1816f6c4e6b/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe3c3e86f5028471981f775a4cf9f91a/href">https://medium.com/media/fe3c3e86f5028471981f775a4cf9f91a/href</a></iframe><p>Дээрхи кодонд <strong>Vehicle</strong> гэсэн үндсэн class нэмсэн бөгөөд энэ нь <strong>Car</strong> болон <strong>Truck</strong> нийтлэг шинж чанар, гишүүн функцүүдийг агуулдаг. <strong>Truck,</strong> <strong>Car</strong> class-ууд нь <strong>Vehicle </strong>class-c удамшсан бөгөөд кодын давхардлыг арилгаж, DRY зарчмыг мөрдсөн.</p><p><strong>KISS</strong> (Keep It Simple, Stupid): Энгийн байдал бол гол зүйл юм. Шууд бөгөөд ойлгоход хялбар код бич. Шаардлагагүй төвөгтэй байдал, ээдрээтэй шийдлүүдээс зайлсхий. Ирээдүйд хийх үйлдлээ бүү бод.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7008919900dd4b670a6e7c3fa5cb4f3e/href">https://medium.com/media/7008919900dd4b670a6e7c3fa5cb4f3e/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f191783abcbfebc1c780319cccbe775/href">https://medium.com/media/3f191783abcbfebc1c780319cccbe775/href</a></iframe><p>Дээрхи кодонд шаардлагагүй getter функцүүдийг устгаж, class-г өөрчилсөн. Энэ нь кодыг энгийн, уншихад хялбар, засвар үйлчилгээ хийхэд хялбар байлгах замаар KISS зарчмыг мөрдсөн.</p><p><strong>SOLID</strong> : These are a set of five principles for designing maintainable and understandable software:</p><ul><li>Single Responsibility Principle (SRP): A class should have only one reason to change.</li><li>Open/Closed Principle (OCP): Software entities should be open for extension but closed for modification.</li><li>Liskov Substitution Principle (LSP): Subtypes must be substitutable for their base types.</li><li>Interface Segregation Principle (ISP): Clients should not be forced to depend on interfaces they do not use.</li><li>Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules. Both should depend on abstractions</li></ul><p><strong>YAGNI</strong> (You Ain’t Gonna Need It): Only implement functionality when it’s actually needed. Avoid adding features or code that you anticipate needing in the future but don’t currently need.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84b79b894d4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The power of habits]]></title>
            <link>https://medium.com/@tspuujee/the-power-of-habits-69a860ad4407?source=rss-efe127798d38------2</link>
            <guid isPermaLink="false">https://medium.com/p/69a860ad4407</guid>
            <category><![CDATA[the-power-of-habit-book]]></category>
            <category><![CDATA[the-power-of-habit]]></category>
            <dc:creator><![CDATA[Puujee]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 07:55:01 GMT</pubDate>
            <atom:updated>2024-04-21T07:55:01.535Z</atom:updated>
            <content:encoded><![CDATA[<h3>The power of habits Book Summary</h3><h4>PART I: The Habits of individuals</h4><h4>Chapter 1: The Habit Loop — How Habits Work</h4><ul><li>Main Idea: Habits are neurological loops consisting of three parts: cue, routine, and reward. The cue triggers a craving for the reward, which reinforces the loop and makes the habit automatic.</li><li>Example: A morning coffee routine. The cue might be waking up and smelling coffee brewing. The routine is making and drinking coffee. The reward is the energy boost and pleasant taste.</li></ul><h4>Chapter 2: The Craving Brain — How to Create New Habits</h4><ul><li>Main Idea: Explains how to create new habits by focusing on the cue and reward of the habit loop. You can identify existing routines and pair them with a desired reward.</li><li>Example: Wanting to exercise after work. Pair the end of your workday (cue) with putting on gym clothes and going for a run (reward), eventually creating an exercise habit.</li></ul><h4>Chapter 3: The Golden Rule of Habit Change — Why Transformation Occurs</h4><ul><li>Main Idea: You can’t erase a habit, but you can change it. Identify the cue and reward of an unwanted habit, then keep the cue and introduce a new routine that leads to a better reward.</li><li>Example: Snacking mindlessly while watching TV. Keep the TV cue but replace snacking with a healthier routine like drinking water.</li></ul><h4>Part 2: The Habits of Successful Organizations</h4><h4>Chapter 4: Keystone Habits, or The Ballad of Paul O’Neill</h4><ul><li>Main Idea: Introduces keystone habits — small changes that have a ripple effect, positively impacting other habits.</li><li>Example: Paul O’Neill, CEO of Alcoa, focused on workplace safety as a keystone habit. This improved employee morale, productivity, and ultimately the company’s bottom line.</li></ul><h4>Chapter 5: Starbucks and the Habit of Success — When Willpower Becomes Automatic</h4><ul><li>Main Idea: Explores how companies use habits to cultivate customer loyalty. Starbucks built a culture around the “third place” — a welcoming environment beyond work and home — as a cue for the reward of a coffee break experience.</li><li>Example: The ambience, customer service, and product consistency at Starbucks all contribute to the overall reward, making customers want to return.</li></ul><h4>Chapter 6: The Power of a Crisis — How Leaders Create Habits Through Accident and Design</h4><ul><li>Main Idea: Examines how crisis can create new habits in organizations. A leader’s response to a crisis can become a defining cue for future behavior.</li><li>Example: After the space shuttle Columbia disaster, NASA revamped its safety culture, creating new habits to prevent future accidents.</li></ul><h4>Chapter 7: How Target Knows What You Want Before You Do — When Companies Predict (and Manipulate) Habits</h4><ul><li>Main Idea: Discusses how companies use data and marketing to target and influence consumer habits.</li><li>Example: Target uses customer data to anticipate buying behavior and send targeted promotions, potentially creating habits around specific products.</li></ul><h4>PART 3: The Habits of Societies</h4><h4>Chapter 8: Saddleback Church and The Montgomery bus boycoit</h4><ul><li>Main Idea: Strong and weak social ties are crucial for organizational success, fostering a sense of belonging and collective action.</li><li>Examples: The Montgomery Bus Boycott succeeded due to strong ties within the Black community and weaker ties connecting them. Saddleback Church’s success lies in nurturing both large gatherings (strong ties) and small group interactions (weak ties).</li></ul><h4>Chapter 9: Neurology of Free Will</h4><ul><li>Main Idea: Habits can influence decision-making, blurring the lines of free will, but individuals can still change ingrained habits.</li><li>Examples: Cases like Angie Bachmann’s compulsive gambling and Brian Thomas’s sleepwalking-induced actions highlight the power of habits in shaping behavior and decisions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69a860ad4407" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean code — Цэвэрхэн код Part-I]]></title>
            <link>https://medium.com/@tspuujee/clean-code-%D1%86%D1%8D%D0%B2%D1%8D%D1%80%D1%85%D1%8D%D0%BD-%D0%BA%D0%BE%D0%B4-part-i-fb5f5cfbc941?source=rss-efe127798d38------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb5f5cfbc941</guid>
            <dc:creator><![CDATA[Puujee]]></dc:creator>
            <pubDate>Sun, 03 Sep 2023 15:33:08 GMT</pubDate>
            <atom:updated>2026-09-02T01:54:55.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>Clean code — Цэвэр код Part-I</h3><blockquote><strong>Clean code (Цэвэрхэн код)</strong> гэдэг кодыг хадгалах, ажиллуулах биш харин хэрхэн бичихийг хэлдэг. Цэвэрхэн код нь засвар үйлчилгээ хийх болон шинэ боломж нэмэх хугацаа болон зардлыг хэмнэдэг. ⚡️⚡️⚡️</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*A4pz_bWWQQAd-XndRxTzYA.jpeg" /><figcaption>Clean code vs Dirty code</figcaption></figure><p><em>Ямар ч тэнэг хүн </em>компьютерын <em>ойлгох код бичиж чадна. Сайн хөгжүүлэгчид хүн ойлгох боломжтой код бичдэг. </em><a href="https://martinfowler.com/"><em>Martin Fowler</em></a></p><p><strong>Clean code (Цэвэрхэн код) </strong>нь дараах шинж чанаруудтай.</p><p><strong>1. Readability (Унших боломжтой) </strong>Цэвэрхэн код нь бусад хөгжүүлэгчид (ирээдүйн өөрийгөө оруулаад) уншиж ойлгоход хялбар байх ёстой.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/160b1a522157c8f8eba20d03f199f185/href">https://medium.com/media/160b1a522157c8f8eba20d03f199f185/href</a></iframe><p><strong>2. Simplicity (Энгийн байдал)</strong> Цэвэрхэн код нь шаардлагагүй төвөгтэй байдлаас зайлсхийдэг. Энгийн код нь тайлбарлахад хялбар бөгөөд алдаа багатай байдаг. <strong>KISS </strong>(Keep It Simple, Stupid) зарчмаас дэлгэрүүлж судалж болно.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03b5d257f27fb842304055f0059b1c98/href">https://medium.com/media/03b5d257f27fb842304055f0059b1c98/href</a></iframe><p><strong>3. Consistency (Тогтвортой байдал) </strong>Цэвэрхэн код нь төслийн туршид тууштай кодчиллын хэв маяг, нэршлийн дүрмийг баримталдаг. Энэ нь кодын жигд болгож, дагаж мөрдөхөд хялбар болгодог.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af8a8b2abe23d4bd131bdd270575a45b/href">https://medium.com/media/af8a8b2abe23d4bd131bdd270575a45b/href</a></iframe><p><strong>4. Modularity (Модульчлагдсан байдал)</strong> Цэвэрхэн код нь жижиг, дахин ашиглах боломжтой, бие даасан модулиуд эсвэл функцүүдээр зохион байгуулагдсан. Энэ нь кодыг дахин ашиглах, тест хийхэд хялбар болгодог.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89120137f7b4b928f65e6a6d015205f7/href">https://medium.com/media/89120137f7b4b928f65e6a6d015205f7/href</a></iframe><p><strong>5. Single Responsibility Principle (Нэг хариуцлагын зарчим)</strong> функц, класс нэг бүр үүрэг нэг хариуцлага эсвэл өөрчлөх шалтгаантай байх ёстой. Энэ зарчим нь кодыг засахад(maintain) хялбар болгодог.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ecf1454334fc5de5e872a2b3fcb7c441/href">https://medium.com/media/ecf1454334fc5de5e872a2b3fcb7c441/href</a></iframe><p><strong>6. Avoidance of Code Duplication (Код давхардлаас зайлсхийх)</strong> Цэвэрхэн код нь нэг кодыг олон газар давтахаас сэргийлдэг. Энэ нь нийтлэг логикийг багтааж, дахин ашиглахын тулд функц, класс, бэлэн санг (library) ашиглахыг дэмждэг.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b9d9080aba70e6788fc4e6fad560547d/href">https://medium.com/media/b9d9080aba70e6788fc4e6fad560547d/href</a></iframe><p><strong>7. Good Comments (Сайн коммент) </strong>Цэвэрхэн код нь кодыг өөрөө тайлбарлах зорилготой боловч кодын ээдрээтэй эсвэл тодорхой бус хэсгүүдийг тодруулахын тулд шаардлагатай тохиолдолд утга учиртай тайлбаруудыг агуулдаг. Коммент нь муу кодонд зориулагдаагүй. Хэрэв муу кодонд коммент бичих хэрэгтэй болвол кодоо илүү ойлгомжтой болгох хэрэгтэй.</p><p>Богино оновчтой жишээ олсонгүй <a href="https://medium.com/codex/clean-code-comments-833e11a706dc">эндээс</a> дэлгэрэнгүй уншиж болно.</p><p><strong>8. Testing (Туршилт)</strong> Цэвэрхэн код нь код нь зориулалтын дагуу ажиллаж байгаа эсэхийг шалгахын тулд автоматжуулсан тестийг ашиглахыг дэмждэг. Энэ нь хөгжүүлэлтийн явцад алдааг олж илрүүлэх, урьдчилан сэргийлэхэд тусалдаг.</p><p><strong>9. Refactoring (Дахин засварлах)</strong> Цэвэрхэн код нь refactoring-д нээлттэй бөгөөд энэ нь кодын гадаад үйл ажиллагааг өөрчлөхгүйгээр сайжруулах үйл явц юм. Refactoring нь кодыг цэвэр, тогтвортой байлгахад тусалдаг.</p><p><strong>10. Code review (Кодын хяналт)</strong> Бусадтай кодыг тогтмол хянаснаар код цэвэрхэн болдог. Мөн асуудлыг тодорхойлох, мэдлэгээ хуваалцах, кодчиллын стандартын хэрэгжилтийн шалгах, шилдэг туршлагыг дагаж мөрдөхөд тусалдаг.</p><p>Кодыг машинд биш хүнд зориулж бичицгээе. 🚀 🚀🚀🚀🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb5f5cfbc941" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>