<?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: Samandar Hodiev</title>
    <description>The latest articles on DEV Community by Samandar Hodiev (@samandarhodiev).</description>
    <link>https://dev.to/samandarhodiev</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%2F1669400%2Fce902a53-fff1-4fb0-824e-f9ddca2fcba5.jpg</url>
      <title>DEV Community: Samandar Hodiev</title>
      <link>https://dev.to/samandarhodiev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samandarhodiev"/>
    <language>en</language>
    <item>
      <title>UX/UI Typography</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Tue, 10 Feb 2026 18:18:46 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/uxui-typography-51je</link>
      <guid>https://dev.to/samandarhodiev/uxui-typography-51je</guid>
      <description>&lt;p&gt;&lt;strong&gt;Typography deganda nimani tushunamiz?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Typography bu:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;qaysi shrift ishlatiladi&lt;/li&gt;
&lt;li&gt;qaysi joyda qanchalik katta bo‘ladi&lt;/li&gt;
&lt;li&gt;qanchalik qalin bo‘ladi&lt;/li&gt;
&lt;li&gt;qatorlar orasidagi masofa&lt;/li&gt;
&lt;li&gt;rang va kontrast&lt;/li&gt;
&lt;li&gt;matnlar o‘rtasidagi iyerarxiya&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Ya’ni foydalanuvchi sahifani ochganda:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nimani birinchi ko‘radi&lt;/li&gt;
&lt;li&gt;nimani keyin o‘qiydi&lt;/li&gt;
&lt;li&gt;nimani umuman o‘qimaydi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Shularning hammasini typography hal qiladi.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Nega typography UX uchun muhim?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chunki foydalanuvchi o‘qish uchun keladi&lt;/em&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;mahsulot nomini&lt;/li&gt;
&lt;li&gt;tugma yozuvini&lt;/li&gt;
&lt;li&gt;xabarini&lt;/li&gt;
&lt;li&gt;narxni&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Agar o‘qish qiyin bo‘lsa, dizayn chiroyli bo‘lishining foydasi yo‘q.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;UX’da bir qoida bor:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“O‘qib bo‘lmasa, ishlamaydi.”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Font tanlash: kamroq — yaxshiroq &lt;/li&gt;
&lt;li&gt;Yangi dizaynerlarning eng katta xatosi — ko‘p font ishlatish.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Aslida:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;_ 1 ta asosiy font  1 ta yordamchi font yetarli_&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;UX/UI’da eng ko‘p ishlatiladigan fontlar:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inter&lt;/li&gt;
&lt;li&gt;Roboto&lt;/li&gt;
&lt;li&gt;SF Pro&lt;/li&gt;
&lt;li&gt;Poppins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Sababi oddiy&lt;/strong&gt;: ular ekranda yaxshi o‘qiladi. Chiroyli bo‘lgani uchun emas, qulay bo‘lgani uchun.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Typography’ning yuragi — iyerarxiya.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Agar:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sarlavha&lt;/li&gt;
&lt;li&gt;matn&lt;/li&gt;
&lt;li&gt;yordamchi text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;BUlar bir xil ko‘rinsa, foydalanuvchi chalgiydi.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Oddiy misol:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heading - kattaroq, qalinroq&lt;/li&gt;
&lt;li&gt;Body text - oddiy, tinch&lt;/li&gt;
&lt;li&gt;Secondary text -  kichikroq, rangsizroq&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hamma joyni bold qilish bu "best practise" va yaxshi dizayn emas&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Line-height va spacing: ko‘rinmaydi, lekin seziladi&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ko‘pchilik e’tibor bermaydigan joy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Juda zich matn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;professional ko‘rinmaydi&lt;/li&gt;
&lt;li&gt;o‘qishni qiyinlashtiradi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Body text uchun:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;line-height odatda 140–160%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Bu matnga “nafislik” beradi.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Rang va typography&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;asosiy text juda qora bo‘lmasligi kerak&lt;/li&gt;
&lt;li&gt;secondary text haddan tashqari xira bo‘lmasligi kerak&lt;/li&gt;
&lt;li&gt;kontrast yetarli bo‘lishi shart
&lt;em&gt;Chiroyli, lekin o‘qilmaydigan matn — bu dizayn xatosi.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;UX’da ranglar o‘qilishgaham  xizmat qiladi faqat bezakka emas.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Button va UI elementlardagi typography&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Button ichidagi matn:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;aniq&lt;/li&gt;
&lt;li&gt;qisqa&lt;/li&gt;
&lt;li&gt;tushunarli&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Shuning uchun:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;juda kichik bo‘lmasligi kerak&lt;/li&gt;
&lt;li&gt;juda yengil weight bo‘lmasligi kerak&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Foydalanuvchi nima bosayotganini aniq bilishi shart.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Typography system: professional bosqich&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real loyihalarda typography tasodifiy bo‘lmaydi.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heading styles&lt;/li&gt;
&lt;li&gt;Body styles&lt;/li&gt;
&lt;li&gt;Caption styles&lt;/li&gt;
&lt;li&gt;Button text styles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;oldindan belgilanadi va dizayn davomida o‘zgarmaydi.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bu:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dizaynni bir xil qiladi&lt;/li&gt;
&lt;li&gt;developer uchun tushunarli bo‘ladi&lt;/li&gt;
&lt;li&gt;product o‘sayotganda muammo chiqarmaydi&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Xulosa&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;UX/UI’da typography:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bezak emas&lt;/li&gt;
&lt;li&gt;ikkinchi darajali narsa emas&lt;/li&gt;
&lt;li&gt;“keyin tuzatamiz” qilinadigan detal emas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Yomon typography bilan:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;yaxshi layout ham yomon ko‘rinadi&lt;/li&gt;
&lt;li&gt;foydalanuvchi charchaydi&lt;/li&gt;
&lt;li&gt;mahsulot ishonchsiz tuyuladi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Yaxshi typography esa:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dizaynni tushunarli bo'ladi&lt;/li&gt;
&lt;li&gt;foydalanuvchini majburlamaydi&lt;/li&gt;
&lt;li&gt;professional taassurot qoldiradi&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>design</category>
      <category>ui</category>
      <category>ux</category>
    </item>
    <item>
      <title>UI dizaynda Shadow turlari va ularning vazifasi</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Thu, 05 Feb 2026 16:40:53 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/ui-dizaynda-shadow-turlari-va-ularning-vazifasi-13pg</link>
      <guid>https://dev.to/samandarhodiev/ui-dizaynda-shadow-turlari-va-ularning-vazifasi-13pg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Drop Shadow (Eng klassik va eng ko‘p ishlatiladigan)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Element ostiga tushadigan oddiy soya. Go‘yoki element fon ustida turibdi.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qayerda ishlatiladi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Card&lt;/li&gt;
&lt;li&gt;Modal&lt;/li&gt;
&lt;li&gt;Button&lt;/li&gt;
&lt;li&gt;Navbar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nima beradi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Depth (chuqurlik)&lt;/li&gt;
&lt;li&gt;Element “bosiladigan” ekanini bildiradi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Misol (mantiqan):&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Card fon ustida suzib turgandek&lt;/li&gt;
&lt;li&gt;Button bosishga tayyor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;Drop shadow = “bu element fon emas, alohida obyekt”&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Drop shadov&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fherlv7bbnlkf4fuhvnwv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fherlv7bbnlkf4fuhvnwv.png" alt="Drop shadov" width="509" height="494"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Inner Shadow (Ichkariga botgan effekt)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Soya tashqariga emas, ichkariga tushadi.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qayerda ishlatiladi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input field&lt;/li&gt;
&lt;li&gt;Textarea&lt;/li&gt;
&lt;li&gt;Ba’zan neumorphism dizaynida&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nima beradi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element ichiga botgandek ko‘rinadi&lt;/li&gt;
&lt;li&gt;“Bu joyga yoziladi” degan signal&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Inner shadow&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh988q8dttouirm3bt9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh988q8dttouirm3bt9v.png" alt="Inner shadow" width="493" height="330"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Soft Shadow (Yumshoq, noaniq)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blur katta, opacity past bo‘lgan soya.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qayerda ishlatiladi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zamonaviy web UI&lt;/li&gt;
&lt;li&gt;Minimal dizayn&lt;/li&gt;
&lt;li&gt;Katta card’lar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nima beradi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elegant ko‘rinish&lt;/li&gt;
&lt;li&gt;Ko‘zga urilmaydi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agar shadow sezilib tursa — demak u haddan oshgan&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Soft shadov&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8w715lq4b5x9asn6wpy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8w715lq4b5x9asn6wpy.png" alt="Soft shadov" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Hard Shadow (Qattiq, aniq)&lt;br&gt;
Nima?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blur kam, chetlari aniq bo‘lgan soya.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qayerda ishlatiladi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Material Design&lt;/li&gt;
&lt;li&gt;Illustrativ UI&lt;/li&gt;
&lt;li&gt;Retro yoki bold dizaynlar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nima beradi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kuchli urg‘u&lt;/li&gt;
&lt;li&gt;Elementni ajratib ko‘rsatadi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Xavfi:&lt;/p&gt;

&lt;p&gt;Juda ko‘p ishlatish dizaynni xunuklashtiradi.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hard shadow &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjtds36rgogu8z8l3q1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjtds36rgogu8z8l3q1a.png" alt="Hard shadow" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Elevation Shadow (Daraja asosida)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Shadow element balandligiga qarab o‘zgaradi.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qayerda ishlatiladi?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Material Design&lt;/li&gt;
&lt;li&gt;Floating button&lt;/li&gt;
&lt;li&gt;App bar, modal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Nima beradi?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Qaysi element yuqorida, qaysi biri pastda ekanini ko‘rsatadi&lt;/p&gt;

&lt;p&gt;Misol:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modal - eng kuchli shadow&lt;/li&gt;
&lt;li&gt;Card - o‘rtacha&lt;/li&gt;
&lt;li&gt;Button - yengil&lt;/li&gt;
&lt;/ul&gt;





&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shadow turi&lt;/th&gt;
&lt;th&gt;Vazifasi&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Drop shadow&lt;/td&gt;
&lt;td&gt;Elementni fondan ajratish&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inner shadow&lt;/td&gt;
&lt;td&gt;Ichki interaction yaratish&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Soft shadow&lt;/td&gt;
&lt;td&gt;Zamonaviy va yengil effekt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hard shadow&lt;/td&gt;
&lt;td&gt;Kuchli urg‘u yaratish&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elevation&lt;/td&gt;
&lt;td&gt;Ierarxiya va depth ko‘rsatish&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>ui</category>
      <category>designsystem</category>
    </item>
    <item>
      <title>Auto Layout &amp; Responsive</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Sat, 31 Jan 2026 19:13:15 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/auto-layout-responsive-a9e</link>
      <guid>https://dev.to/samandarhodiev/auto-layout-responsive-a9e</guid>
      <description>&lt;p&gt;&lt;strong&gt;Auto Layout &amp;amp; Responsive Design: Figma’da Professional UI Yaratish Asosi&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zamonaviy UI dizayn faqat chiroyli ko‘rinish bilan o‘lchanmaydi. Dizayn moslashuvchan, barqaror va real product sharoitiga tayyor bo‘lishi kerak. Figma’da bunga erishishning eng asosiy vositasi — Auto Layout.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Auto Layout nima va nega muhim?&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Auto Layout bu elementlarni qat’iy koordinatalar bilan emas, mantiqiy tuzilma asosida joylashtirish tizimi. Ichidagi kontent o‘zgarganda, dizayn avtomatik moslashadi.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Misol:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Button ichidagi text uzunlashsa, button kengayadi&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Card ichiga yangi element qo‘shilsa, balandlik avtomatik oshadi&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bu yondashuv dizaynni statik rasm emas, tirik interfeysga aylantiradi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykoaylnxcbwqqwo6iix3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykoaylnxcbwqqwo6iix3.gif" alt="this is autolayout descriper" width="760" height="468"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Padding va Spacing&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Auto Layout’ning asosiy ustunliklaridan biri masofalarni aniq boshqarishdir.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Padding — element ichidagi kontent bilan chegaralar orasidagi masofa. Bu button, card va input’lar uchun muhim.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spacing — bir nechta elementlar orasidagi masofa. Auto Layout orqali bu qiymat doim barqaror bo‘lib qoladi.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Natijada dizayn vizual jihatdan toza va tizimli ko‘rinadi.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Vertical va Horizontal yo‘nalish&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Auto Layout yo‘nalishi layout tuzilishini belgilaydi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Vertical: elementlar yuqoridan pastga joylashadi. Listlar, card ichidagi kontent, formalar uchun ishlatiladi.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Horizontal: elementlar chapdan o‘ngga joylashadi. Navbar, button ichidagi icon + text kabi holatlar uchun mos.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To‘g‘ri yo‘nalish tanlash dizayn mantiqini aniq ko‘rsatadi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80wryiwnq4xl0k7n3oph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F80wryiwnq4xl0k7n3oph.png" alt="Vertical &amp;amp; Horizontal" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Hug, Fill va Fixed tushunchalari&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bu sozlamalar element o‘lchamining qanday boshqarilishini aniqlaydi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hug contents: element o‘lchami ichidagi kontentga moslashadi. Text o‘zgarsa, element ham o‘zgaradi.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill container: element parent bo‘sh joyini to‘ldiradi. Responsive layout’lar uchun juda muhim.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fixed: qat’iy o‘lcham. Faqat maxsus holatlarda ishlatiladi, aks holda responsive’ni buzadi.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Professional dizayn asosan Hug va Fill kombinatsiyasiga tayanadi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh144y37djxwjud4cg4rx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh144y37djxwjud4cg4rx.gif" alt=" " width="600" height="389"&gt;&lt;/a&gt;   &lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Constraints&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Constraints Auto Layout ishlatilmagan frame’larda responsive xatti-harakatni belgilaydi. Element qaysi tomonga yopishib turishini va ekran o‘lchami o‘zgarganda qanday harakat qilishini aniqlaydi.&lt;/p&gt;

&lt;p&gt;Masalan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Left + Right → element ekran bilan birga kengayadi&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Center → har doim markazda qoladi&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;&lt;code&gt;Responsive dizayn va Auto Layout aloqasi&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Responsive dizayn degani interfeys har xil ekran o‘lchamlarida mantiqan va vizual jihatdan to‘g‘ri ishlashi. Figma’da bunga erishishning eng ishonchli yo‘li — Auto Layout’ni to‘g‘ri qurish.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Auto Layout ishlatilgan dizayn:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;kontent o‘zgarishiga tayyor bo‘ladi&lt;br&gt;
developer uchun tushunarli bo‘ladi&lt;br&gt;
real product’da kamroq muammo keltirib chiqaradi&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Xulosa&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Auto Layout bu Figma’dagi qo‘shimcha funksiya emas, balki professional UI dizaynning asosi. Padding, spacing, yo‘nalish, Hug/Fill va Constraints birgalikda ishlaganda dizayn haqiqatan ham moslashuvchan va ishonchli bo‘ladi.&lt;/p&gt;

&lt;p&gt;Agar dizayn Auto Layout’siz bo‘lsa, u faqat chiroyli rasm. Auto Layout bilan esa u real interfeysga aylanadi.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>ui</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Shakllar va Matn Bilan Ishlash</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Fri, 30 Jan 2026 21:29:46 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/shakllar-va-matn-bilan-ishlash-3803</link>
      <guid>https://dev.to/samandarhodiev/shakllar-va-matn-bilan-ishlash-3803</guid>
      <description>&lt;p&gt;&lt;code&gt;Figma Asoslari:&lt;/code&gt; Shakl Chizish va Matn Bilan Ishlash&lt;/p&gt;

&lt;p&gt;Figma’da dizayn boshlash uchun shakllar va matn bilan ishlashni bilish juda muhim. Quyida asosiy tushunchalar va amaliy yo‘llar keltirilgan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;01)&lt;code&gt;Frame&lt;/code&gt; va &lt;code&gt;Rectangle&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frame&lt;/strong&gt; – bu konteyner. Ichiga boshqa elementlarni (&lt;u&gt;text&lt;/u&gt;, &lt;u&gt;image&lt;/u&gt;, &lt;u&gt;rectangle&lt;/u&gt;) joylashtirish mumkin. Frame bilan ichidagi elementlarni birga boshqarish oson.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rectangle&lt;/strong&gt; – oddiy dizayn elementi. &lt;u&gt;Fon&lt;/u&gt;, &lt;u&gt;tugma&lt;/u&gt; yoki &lt;u&gt;kardning&lt;/u&gt; shakli sifatida ishlatiladi. &lt;/p&gt;



&lt;p&gt;&lt;strong&gt;02)&lt;code&gt;Text layer&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text layer&lt;/strong&gt; - matn qo‘shish uchun ishlatiladi (T tugmasi bilan).&lt;/p&gt;

&lt;p&gt;Siz &lt;u&gt;font&lt;/u&gt;, &lt;u&gt;o‘lcham&lt;/u&gt;, &lt;u&gt;rang&lt;/u&gt;, &lt;u&gt;line height&lt;/u&gt; va &lt;u&gt;alignment&lt;/u&gt;’ni sozlashingiz mumkin.&lt;/p&gt;

&lt;p&gt;Text element &lt;em&gt;frame&lt;/em&gt; ichida bo‘lsa, frame bilan birga harakatlanadi.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;03)&lt;code&gt;Fill&lt;/code&gt;&lt;/strong&gt; va &lt;strong&gt;&lt;code&gt;Stroke&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fill&lt;/strong&gt; – layer ichki rangi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stroke&lt;/strong&gt; – layer chegarasi, qalinligi va rangini sozlash mumkin.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;04)&lt;code&gt;Corner Radius&lt;/code&gt;&lt;/strong&gt; va &lt;strong&gt;&lt;code&gt;Gradient&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corner radius&lt;/strong&gt; – layer burchaklarini yumaloqlashtiradi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gradient&lt;/strong&gt; – rang o‘zgarishini beradi (linear, radial, angular). Tugmalar, kartalar va fonlarda ishlatiladi.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;05)&lt;code&gt;Shadow&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Shadow elementga chuqurlik beradi va dizaynni jonli qiladi.&lt;/p&gt;

&lt;p&gt;Figma’da Drop shadow (tashqi) va Inner shadow (ichki) mavjud.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;07)&lt;code&gt;Align&lt;/code&gt;&lt;/strong&gt; &amp;amp; &lt;strong&gt;&lt;code&gt;Distribute&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Align&lt;/strong&gt; – layer’larni bir tekisga joylashtirish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimpudviunpcmojokzfqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimpudviunpcmojokzfqq.png" alt="Align" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Distribute&lt;/strong&gt; – bir nechta layer’larni teng masofada taqsimlash.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlo49j94i3bsouzo0ay5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlo49j94i3bsouzo0ay5.png" alt="Distribute" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figma’da shakl va matn bilan ishlashni o‘rganish dizayningizni tez va samarali qilishga yordam beradi. Frame va rectangle farqlarini, text, fill, stroke, shadow va gradientlarni bilish sizgaa professional dizayn ishlabchiqich uchun  mustahkam poydevor bo'ladi.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>ui</category>
      <category>design</category>
      <category>designsystem</category>
    </item>
    <item>
      <title>Figma - Asosiy tushunchalar va tez boshlash qo‘llanmasi</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Fri, 30 Jan 2026 18:18:07 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/figma-asosiy-tushunchalar-va-tez-boshlash-qollanmasi-2668</link>
      <guid>https://dev.to/samandarhodiev/figma-asosiy-tushunchalar-va-tez-boshlash-qollanmasi-2668</guid>
      <description>&lt;p&gt;Figma bugungi kunda UI/UX dizaynerlar va front-end dasturchilar uchun eng samarali vositalardan biri. Shu maqolada Figma interfeysini tez tushunish va samarali ishlash uchun kerakli asosiy tushunchalarni ko‘rib chiqamiz.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Figma account va yangi fayl&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Figma.com’da bepul account yaratib, “New File” tugmasi orqali loyihaga start berish mumkin. Har bir yangi fayl – sizning ish canvasingiz bo‘lib, unga ekranning har qanday elementlarini joylashtirishingiz mumkin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Page vs Frame&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Page&lt;/code&gt; – loyihaning katta bo‘limi (misol: Homepage, Dashboard).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Frame&lt;/code&gt; – individual ekran yoki UI blok, ichida boshqa elementlar va frame’lar bo‘lishi mumkin.&lt;/p&gt;

&lt;p&gt;Figma’da hamma narsa Frame ichida joylashadi. Shu sababli Frame bilan ishlash dizayner uchun asosiy ko‘nikma hisoblanadi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Canvas, Move va Scale&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Canvas&lt;/code&gt; – ishlash maydoni, unda elementlarni joylashtirasiz va tekshirasiz.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Move&lt;/code&gt; – elementni pan orqali ko‘chirish.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Scale&lt;/code&gt; – elementning o‘lchamini kattalashtirish yoki kichiklashtirish (Shift + Drag nisbatni saqlaydi).&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Tez harakatlanish uchu&lt;/u&gt;n:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zoom: Ctrl / Cmd + Scroll&lt;/li&gt;
&lt;li&gt;Pan: Space + Drag&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Layers panel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Layers panel har bir elementni tartiblaydi, yashirish, lock qilish va guruhlash imkonini beradi. Katta loyihalarda elementni topish va tuzatish uchun layers paneldan foydalanish samara beradi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Shortcut’lar va samaradorlik&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Asosiy shortcut’lar:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;R – Rectangle&lt;/li&gt;
&lt;li&gt;O – Circle&lt;/li&gt;
&lt;li&gt;T – Text&lt;/li&gt;
&lt;li&gt;Ctrl / Cmd + D – Duplicate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shortcut’larni bilish ish jarayonini tezlashtiradi va samaradorlikni oshiradi.&lt;/p&gt;


 

&lt;p&gt;&lt;code&gt;Menu, Canvas, Layers, ...&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbfp7uoywhmbcda85gmc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbfp7uoywhmbcda85gmc.png" alt="Canvas, Layers, ..." width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;u&gt;Xulosa&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Figma bilan ishlashni boshlash uchun bu asosiy tushunchalarni bilish yetarli. Page va Frame farqi, layers panel, Move/Scale va shortcut’larni o‘rganish sizga erkin dizayn yaratish imkonini beradi. Ushbu poydevor sizni murakkab interfeyslar va prototiplarga tayyorlaydi.&lt;/p&gt;

</description>
      <category>figma</category>
      <category>ux</category>
      <category>ui</category>
    </item>
    <item>
      <title>Node.js path Module</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Wed, 23 Apr 2025 21:04:54 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/nodejs-path-module-4h6m</link>
      <guid>https://dev.to/samandarhodiev/nodejs-path-module-4h6m</guid>
      <description>&lt;h1&gt;
  
  
  💻 Node.js path Module
&lt;/h1&gt;

&lt;p&gt;In Node.js, working with file paths can get tricky, especially when you're developing cross-platform applications. Fortunately, the built-in path module is here to simplify things and ensure that your paths are handled properly, no matter if you're on Windows or Unix.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why Use the path Module?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Cross-platform compatibility — handles paths in a consistent way across different operating systems.&lt;/li&gt;
&lt;li&gt;Simplifies working with file paths — easy to manipulate and resolve paths.&lt;/li&gt;
&lt;li&gt;No need to install — it’s built into Node.js!&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  💻 Common path Methods
&lt;/h1&gt;

&lt;p&gt;1 &lt;code&gt;path.basename(path)&lt;/code&gt;&lt;br&gt;
Gets the last portion of a path, i.e., the file name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const path = require('path');
console.log(path.basename('/users/samandar/app.js')); // app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2 &lt;code&gt;path.dirname(path)&lt;/code&gt;&lt;br&gt;
Returns the directory name of the given path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(path.dirname('/users/samandar/app.js')); // /users/samandar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3 &lt;code&gt;path.extname(path)&lt;/code&gt;&lt;br&gt;
Returns the extension of the given file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(path.extname('/users/samandar/app.js')); // .js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4 &lt;code&gt;path.parse(path)&lt;/code&gt;&lt;br&gt;
Returns an object containing the root, dir, base, ext, and name of the path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(path.parse('/users/samandar/app.js'));


{
  root: '/',
  dir: '/users/samandar',
  base: 'app.js',
  ext: '.js',
  name: 'app'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5&lt;code&gt;path.join(...paths)&lt;/code&gt;&lt;br&gt;
Joins multiple path segments together.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(path.join('/users', 'samandar', 'app.js')); // /users/samandar/app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Handles platform-specific separators (/ on Unix, \ on Windows).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;6 &lt;code&gt;path.resolve(...paths)&lt;/code&gt;&lt;br&gt;
Resolves a sequence of paths into an absolute path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(path.resolve('samandar', 'app.js'));
// /current/working/dir/samandar/app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  💻 Practical Example
&lt;/h1&gt;

&lt;p&gt;Imagine you’re building a file upload feature and you want to ensure your app handles paths properly across all environments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const path = require('path');
const uploadPath = path.join(__dirname, 'uploads', 'file.json');
console.log(uploadPath);
// /absolute/path/to/current/working/directory/uploads/file.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures your paths are absolute and platform-agnostic.&lt;/p&gt;

&lt;p&gt;🧑‍💻 Wrapping Up&lt;br&gt;
The path module is an essential tool in Node.js for handling file paths safely and efficiently. It’s simple to use, yet it helps you avoid many common pitfalls when working with file systems.&lt;/p&gt;

&lt;p&gt;💥 Catch up on the full Node.js Learning Series&lt;/p&gt;

&lt;p&gt;Global Object in Node.js&lt;/p&gt;

&lt;p&gt;Node.js Modules&lt;/p&gt;

&lt;p&gt;🔗 Follow me to stay updated on future posts in the Node.js series.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Modules in Node.js</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Wed, 23 Apr 2025 20:39:32 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/modules-in-nodejs-1b2f</link>
      <guid>https://dev.to/samandarhodiev/modules-in-nodejs-1b2f</guid>
      <description>&lt;h1&gt;
  
  
  💻 Mastering Modules in Node.js — A Complete Beginner’s Guide
&lt;/h1&gt;

&lt;p&gt;When building apps in Node.js, one of the most fundamental concepts is modules.&lt;br&gt;
But what exactly are modules? And how do require() and module.exports actually work?&lt;/p&gt;

&lt;p&gt;Let’s break it down. 👇&lt;/p&gt;
&lt;h1&gt;
  
  
  💻 What Is a Module?
&lt;/h1&gt;

&lt;p&gt;In Node.js, each JavaScript file is treated as a separate module.&lt;br&gt;
This modular system allows you to split your code into reusable, isolated pieces — making it more maintainable and easier to manage.&lt;/p&gt;
&lt;h5&gt;
  
  
  // math.js
&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add(a, b) {
  return a + b;
}

module.exports = add;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h5&gt;
  
  
  // app.js
&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const add = require('./math');
console.log(add(2, 3)); // 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  💻 How It Works Behind the Scenes
&lt;/h1&gt;

&lt;p&gt;When you run require('./math'), Node.js does several things:&lt;/p&gt;

&lt;p&gt;1 Resolves the path (math.js)&lt;br&gt;
2 Wraps the code inside a function like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(function(exports, require, module, __filename, __dirname) {
  // your module code
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3 Executes the function&lt;/p&gt;

&lt;p&gt;4 Returns &lt;code&gt;module.exports&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This wrapping is what gives each file access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;require&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exports&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__filename&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__dirname&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  💻 module.exports vs exports
&lt;/h1&gt;

&lt;p&gt;Here’s where many beginners get confused.&lt;/p&gt;

&lt;p&gt;// ✅ Correct&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  name: 'Samandar',
  greet() {
    console.log('Hello');
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ❌ Won’t work as expected
exports = {
  name: 'Samandar'
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;exports&lt;/code&gt; is just a shortcut to &lt;code&gt;module.exports&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;If you overwrite &lt;code&gt;exports&lt;/code&gt;, you lose the reference to the real &lt;code&gt;module.exports&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when in doubt — always use module.exports.&lt;/p&gt;

&lt;h1&gt;
  
  
  💻 Built-in Modules
&lt;/h1&gt;

&lt;p&gt;Node.js also comes with built-in modules like &lt;code&gt;fs&lt;/code&gt;, &lt;code&gt;path&lt;/code&gt;, &lt;code&gt;http&lt;/code&gt;, etc...&lt;br&gt;
No installation required!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fs = require('fs');
const path = require('path');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  💻 Why Modules Matter
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Code reusability ♻️&lt;/li&gt;
&lt;li&gt;Cleaner folder structure 📁&lt;/li&gt;
&lt;li&gt;Easier to test and debug 🧪&lt;/li&gt;
&lt;li&gt;Foundation for modern frameworks like Express.js&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  💻 Too Long; Didn't Read
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Every file in Node.js is a module&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;module.exports&lt;/code&gt; to share code&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;require()&lt;/code&gt; to import code&lt;/li&gt;
&lt;li&gt;Built-in modules come preloaded&lt;/li&gt;
&lt;li&gt;Don't override &lt;code&gt;exports&lt;/code&gt; directly&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💬 Whether you're building a CLI tool or a full web app — mastering modules is essential for writing clean, scalable Node.js code. What’s your favorite module trick or tip? Let me know in the comments!
&lt;/h2&gt;

</description>
    </item>
    <item>
      <title>Global Object in Node.js</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Wed, 23 Apr 2025 20:10:23 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/global-object-in-nodejs-2ghg</link>
      <guid>https://dev.to/samandarhodiev/global-object-in-nodejs-2ghg</guid>
      <description>&lt;h1&gt;
  
  
  💻 Understanding the Global Object in Node.js
&lt;/h1&gt;

&lt;p&gt;When working in Node.js, one of the most important things to understand is the global object. Unlike browsers where the global scope is attached to the window object, in Node.js it's slightly different — and more powerful in some ways.&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;

&lt;h1&gt;
  
  
  💻 What Is the Global Object?
&lt;/h1&gt;

&lt;p&gt;In Node.js, the global object is named global. It provides a set of built-in modules, functions, and values that are available from anywhere in your application — no need to import or require them.&lt;/p&gt;

&lt;p&gt;It is similar to window in the browser, but it's more tailored to server-side needs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(global); // Outputs the entire global object
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  💻 Common Global Variables
&lt;/h1&gt;

&lt;p&gt;Here are some of the most used global values in Node.js:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;__dirname&lt;/td&gt;
&lt;td&gt;Absolute path of the folder containing the current file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;__filename&lt;/td&gt;
&lt;td&gt;Absolute path of the current file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;global&lt;/td&gt;
&lt;td&gt;The global object itself&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;module&lt;/td&gt;
&lt;td&gt;Info about the current module&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;exports&lt;/td&gt;
&lt;td&gt;Shortcut to module.exports&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;require()&lt;/td&gt;
&lt;td&gt;Function to import modules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;setTimeout()&lt;/td&gt;
&lt;td&gt;Delays code execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;setInterval()&lt;/td&gt;
&lt;td&gt;Repeats code at intervals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;console&lt;/td&gt;
&lt;td&gt;Standard logging interface&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  💻 Example: Using Global Values
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(__dirname);  // Prints the folder path
console.log(__filename); // Prints the full file path

setTimeout(() =&amp;gt; {
  console.log("Executed after 2 seconds");
}, 2000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don’t need to import anything for these to work — they are available globally.&lt;/p&gt;

&lt;h1&gt;
  
  
  ⚠️ Note on Scope
&lt;/h1&gt;

&lt;p&gt;Unlike in the browser, variables defined in a Node.js file are not added to the global object by default. Each file is a separate module, so the variables are scoped locally unless you explicitly assign them to global.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name = "NodeJs";
console.log(global.name); // undefined

global.name = "NodeJs";
console.log(global.name); // "NodeJs"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  🚫 Don’t Overuse global
&lt;/h1&gt;

&lt;p&gt;While global can be helpful, overusing it is considered bad practice. It can lead to conflicts and unpredictable behavior in larger applications.&lt;/p&gt;

&lt;p&gt;Use it only when a value truly needs to be shared across all files, like configuration data or utility functions.&lt;/p&gt;

&lt;h1&gt;
  
  
  ✅ In Summary
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;global is to Node.js what window is to browsers.&lt;/li&gt;
&lt;li&gt;It contains many helpful built-in tools.&lt;/li&gt;
&lt;li&gt;Use with care — prefer module exports for sharing logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  💬 Have you used the global object in your Node.js projects? What use cases have you found most useful? Drop a comment and let’s discuss!
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>NodeJS Intro..</title>
      <dc:creator>Samandar Hodiev</dc:creator>
      <pubDate>Wed, 23 Apr 2025 12:30:31 +0000</pubDate>
      <link>https://dev.to/samandarhodiev/what-is-nodejs-download-nodejsuse-nodejs-in-terminalnode-package-manager-4c5e</link>
      <guid>https://dev.to/samandarhodiev/what-is-nodejs-download-nodejsuse-nodejs-in-terminalnode-package-manager-4c5e</guid>
      <description>&lt;h1&gt;
  
  
  💻 What is Node.js.?
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Node.js&lt;/em&gt; is a JavaScript runtime environment that allows you to run JavaScript code outside of the browser. Unlike traditional JavaScript, which is executed in the browser, Node.js runs on the server-side, making it possible to write server-side applications with JavaScript.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key features of Node.js:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Non-blocking, event-driven architecture: Node.js is designed to handle multiple connections at once. This makes it great for building real-time applications (e.g., chat apps, live updates).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Single-threaded: It uses a single thread for handling requests, which is efficient due to its asynchronous nature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built on V8 Engine: Node.js uses Google's V8 JavaScript engine, the same engine used in Chrome, making it fast and reliable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  💻 How to Install Node.js
&lt;/h1&gt;

&lt;p&gt;To get started with Node.js, you need to install it on your system.&lt;/p&gt;

&lt;h5&gt;
  
  
  Steps:
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to the official Node.js website:&lt;br&gt;
&lt;a href="https://nodejs.org" rel="noopener noreferrer"&gt;https://nodejs.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download the latest stable version:&lt;br&gt;
You will see two versions available for download:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;LTS (Long-Term Support): Recommended for most users.&lt;/li&gt;
&lt;li&gt;Current: The latest features, but may not be as stable as LTS.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Install the downloaded package:
Follow the installation wizard for your operating system (Windows, macOS, or Linux). The installation will include both Node.js and npm (Node Package Manager).&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  💻 Using Node.js in the Terminal
&lt;/h1&gt;

&lt;p&gt;Once Node.js is installed, you can start using it directly from your terminal or command prompt.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to check if Node.js is installed:
&lt;/h4&gt;

&lt;p&gt;Open your terminal (Command Prompt on Windows or Terminal on macOS/Linux).&lt;/p&gt;

&lt;p&gt;Type the following command and press enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This will display the installed version of Node.js.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  How to run a simple Node.js script:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Create a new file called &lt;code&gt;app.js.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open it and write a simple JavaScript code:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("Hello, Node.js!");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Save the file and go to your terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the script with the command:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the output:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hello, Node.js!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  💻 What is npm?
&lt;/h1&gt;

&lt;p&gt;npm stands for Node Package Manager, and it is a tool that allows you to manage and install libraries (packages) that you can use in your Node.js projects. It comes bundled with Node.js, so you don’t need to install it separately.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key features of npm:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Install packages: Easily install packages and libraries to add new features to your project.&lt;/li&gt;
&lt;li&gt;Manage dependencies: Automatically manage versions of libraries and dependencies.&lt;/li&gt;
&lt;li&gt;Run scripts: Define and run custom scripts in your project.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Example of using npm:
&lt;/h4&gt;

&lt;p&gt;1.Initialize a new Node.js project: In your project folder, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This will create a &lt;code&gt;package.json&lt;/code&gt; file that holds your project metadata and dependencies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2.Install a package: To install a package, such as Express (a popular Node.js framework), run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install express
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This will add Express to your &lt;code&gt;node_modules&lt;/code&gt; folder and update package.json.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;Node.js is a powerful tool for building server-side applications using JavaScript. With the help of npm, you can easily manage your project dependencies and libraries. Whether you're building simple scripts or complex applications, Node.js provides the flexibility and speed to make your development process faster and more efficient.&lt;/p&gt;

</description>
      <category>node</category>
      <category>express</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
