<?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 Omer Cagri Sayir on Medium]]></title>
        <description><![CDATA[Stories by Omer Cagri Sayir on Medium]]></description>
        <link>https://medium.com/@omercs?source=rss-e3a97b7c0d7b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b12-msLXTXRQuyxicJjWcQ.jpeg</url>
            <title>Stories by Omer Cagri Sayir on Medium</title>
            <link>https://medium.com/@omercs?source=rss-e3a97b7c0d7b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:47:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omercs/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[LazyHStack and LazyVStack]]></title>
            <link>https://omercs.medium.com/lazyhstack-and-lazyvstack-3f8f1c886d5e?source=rss-e3a97b7c0d7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f8f1c886d5e</guid>
            <category><![CDATA[views]]></category>
            <category><![CDATA[hstack]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[vstack]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Omer Cagri Sayir]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 11:22:17 GMT</pubDate>
            <atom:updated>2023-12-28T18:19:27.195Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone. Long time, no see. I have never written a Medium article in English before. I hope you will like it. Enjoy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vyp-9UhWwR3jsfs2" /><figcaption>Photo by <a href="https://unsplash.com/@safarslife?utm_source=medium&amp;utm_medium=referral">Safar Safarov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong><em>LazyHStack</em></strong> and <strong><em>LazyVStack</em></strong> are components used in SwiftUI. They are similar to HStack and VStack which align children horizontally and vertically, respectively.</p><p>However, these “<strong>Lazy” </strong>versions of the stacks have a specific behavior: they do not build any of their views that are not visible. In other words, they load their children on demand, which can be more efficient when dealing with a large number of views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJ-caoEI4SNU6oQ9wjvCjQ.png" /><figcaption>Generated by DALL-E</figcaption></figure><p>In addition to these, they do not take up all the space offered to them, even if they have flexible views (stacks, spacers, etc.) inside. You’d use these when you have a stack that is in ScrollView.</p><p>Also, there is one important layout difference: lazy stacks always take up as much space as is available in our layouts, whereas regular stacks take up only as much space as is needed. It stops lazy stacks from having to adjust their size if a new view is loaded that wants more space.</p><p>LazyVStack is suitable for vertical lists like feeds or long forms.</p><pre>ScrollView {<br>  LazyVStack {<br>    ForEach(1...100, id: \.self) { index in <br>      Text(&quot;Item \(index)&quot;)<br>    }<br>  }<br>}</pre><p><em>In this example, we have a vertical list of 100 text elements. The “LazyVStack” loads elements as the user scrolls down, making it efficient for displaying a large number of views.</em></p><p>LazyHStack is ideal for horizontal scrolling lists or carousels.</p><pre>ScrollView(.horizontal) {<br>    LazyHStack {<br>        ForEach(1...100, id: \.self) { index in<br>            Text(&quot;Item \(index)&quot;)<br>        }<br>    }<br>}</pre><p><em>This example creates a horizontally scrollable view with 100 text elements. The &quot;LazyHStack&quot; ensures that only the elements visible on the screen are rendered, saving memory and improving performance.</em></p><h3>Key Points</h3><ul><li>Both “<strong><em>LazyVStack</em></strong>” and “<strong><em>LazyHStack</em></strong>” are beneficial for improving performance in large collections.</li><li>They differ from “HStack” and “VStack” mainly in their on-demand loading behavior.</li></ul><p>By using these components, you can create efficient and responsive layouts in your iOS apps, which is crucial when dealing with dynamic or extensive data sets.</p><p>Thank you for your time. I hope this article is useful for you. See you next time!</p><p>[1]: <em>Stanford | CS193p — </em><a href="https://cs193p.sites.stanford.edu/2023"><em>Developing apps for iOS</em></a><em>, Lecture 6 (2023)</em></p><p>[2]:<a href="https://www.hackingwithswift.com/books/ios-swiftui"> Hacking with iOS — SwiftUI Edition</a> (02/03/2022), <em>Paul Hudson</em></p><p>[3]: <a href="https://openai.com/chatgpt">ChatGPT</a> <em>by OpenAI, 2023.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ50w5MD6Rvg-e333pvkSA.png" /><figcaption>Generated by DALL-E</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f8f1c886d5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python’da Fonksiyonlar]]></title>
            <link>https://omercs.medium.com/pythonda-fonksiyonlar-3c83d821da37?source=rss-e3a97b7c0d7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c83d821da37</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[türkçe]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[fonksiyonlar]]></category>
            <dc:creator><![CDATA[Omer Cagri Sayir]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 04:55:36 GMT</pubDate>
            <atom:updated>2020-06-21T04:57:26.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Merhaba, bugün Python’da Fonksiyonları anlatacağım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*PszSmyEM4qjoVPfgCdXuDg.jpeg" /></figure><p>Python’da fonksiyonlar def ile tanımlanır ve fonksiyon ismi yazılır. Daha sonra parantez içerisinde varsa parametreler yazılır. Python’da diğer diller gibi (örneğin C++) dönüş değeri (int, string, void gibi) belirtmemize gerek yoktur.</p><p>Parametresiz, çıktıyı yazdıran bir örnek yapalım.</p><pre>def selamla():<br>    print(&quot;Merhabalar&quot;)</pre><h3><strong>Fonksiyon Parametreleri</strong></h3><p>Fonksiyonlar parantez içinde parametre alarak, o değer ile de istediğimizi yapmamıza olanak sağlar.</p><pre>def karesini_al(deger):<br>    yeni_deger= deger**2<br>    print(yeni_deger)</pre><h3>Return</h3><p>Bir fonksiyonu print ile yazdırdığımız zaman o fonksiyonu bir değişkene atayamayız çünkü bir değer döndürmez. Fonksiyonumuzun bir değer döndürmesini istiyorsak return ‘ü kullanırız.</p><pre>def karesini_al(deger):<br>    yeni_deger= deger**2<br>    return yeni_deger</pre><pre>sayi = karesini_al(4)<br>print(sayi)</pre><pre>&gt;&gt;&gt; 16 </pre><h3>Docstrings</h3><p>Docstrings fonksiyonumuzun ne yaptığını tarif eder. Fonksiyonumuzun dokumantasyonudur. Fonksiyon başlığından sonra bulunur ve üç adet tırnak(“””) arasına yazılır.</p><pre>def karesini_al(deger):<br>    &quot;&quot;&quot;<br>    İçine verdiğimiz değerin karesini döndürür.<br>    &quot;&quot;&quot;<br>    yeni_deger= deger** 2<br>    return yeni_deger</pre><h3>Çoklu parametreler ve parametrelerde default arguman</h3><p>Fonksiyonlarda birden çok parametre bulunabilir. Ve bu parametrelere bir ön değer atayarak kullanıcının tüm parametreleri girmesinin zorunlu olmadığını belirtebiliriz.</p><pre>def ussunu_al(sayi1, sayi2=1):<br>    &quot;&quot;&quot;<br>    Arguman aldığı birinci sayinin 2.sayı kadar kuvvetini alır   <br>    &quot;&quot;&quot;<br>    new_value = sayi1** sayi2<br>    return new_value</pre><pre>ussunu_al(9, 2)</pre><pre>&gt;&gt;&gt; 81</pre><pre>ussunu_al(9)</pre><pre>&gt;&gt;&gt; 9</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c83d821da37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Programlamaya Giriş]]></title>
            <link>https://omercs.medium.com/python-programlamaya-giri%C5%9F-12f05dc4cad1?source=rss-e3a97b7c0d7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/12f05dc4cad1</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[türkçe]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Omer Cagri Sayir]]></dc:creator>
            <pubDate>Fri, 05 Jun 2020 14:50:57 GMT</pubDate>
            <atom:updated>2020-06-05T15:14:23.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*eAttbpbUDI6pmixo5l4tJg.jpeg" /><figcaption>Python Programlama Dili</figcaption></figure><p>Herkese merhaba. Bugün Python Programlamaya giriş yapacağız. Bu yazımda bazı değişken tiplerini, değişken tanımlamayı, print() ve type() fonksiyonlarını ve yorum satırlarını anlatacağım.</p><p>Python, nesne yönelimli, yorumlamalı, birimsel ve etkileşimli yüksek seviyeli bir programlama dilidir (Wikipedia). Google, 2006 yılından beri Python’u birçok platformuna ve uygulamasına entegre etti ve dokümanları üretti.</p><h3>Değişken Tanımlama ve değişkenler</h3><p>Python’da değişken tanımlarken sayı ve noktalama işaretleri ile başlanmaz. Eğer noktalama işareti kullanılacaksa sadece “_” işareti kullanılır.</p><p>Örneğin;</p><pre>_sayi = 3</pre><pre>isim_soyisim = “Omer Cagri Sayir”</pre><pre># .omer = “omer” # HATA doner</pre><p>Python değişken tanımlamada büyük küçük harfe duyarlıdır. Yani Omer`eşit değildir omer’e</p><p>Python’da değişken tanımlarken diğer yazılım dillerindeki gibi tipini belirtmemize gerek yoktur.</p><p>Örneğin sayiadında integer bir değişkeni şöyle tanımlayabiliriz:</p><pre>sayi = 5</pre><p>Yukarıda hiçbir tip belirtmeyerek 5 sayısını integer olarak tanımlamış olduk. Peki gerçekten integer olarak tanımlayıp tanımlamadığımızı nereden bileceğiz? Hadi ilk fonksiyonumuzu kullanalım. type()fonksiyonu içine aldığı değişkenin tipini döndürür. sayideğişkeninin tipine bakalım.</p><pre>type(sayi)</pre><pre>&gt;&gt;&gt; int</pre><p>Şimdi ondalık sayılara bakalım. pideğişkenine 3.14 sayısını atayıp tipine bakalım.</p><pre>pi = 3.14</pre><pre>type(pi)</pre><pre>&gt;&gt;&gt; float</pre><p>NOT: Türkçe dilinde kesirli sayılarda virgül kullanılır. Ancak Python’da kesirli sayılar için nokta (.) kullanılır. Kesinlikle virgül (,) kullanılmaz.</p><p>Diğer bir değişken türü ise string‘lerdir. Python’da tırnak işartleri (“ “) arasına yazdıklarımızı String olarak adlandırılır. Tek tırnak (‘ ‘) arasına da yazılabilir.</p><pre>isim = “Omer Cagri”</pre><pre>soyisim = ‘Sayir’</pre><pre>type(isim)</pre><pre>&gt;&gt;&gt; str</pre><p>Görüldüğü gibi str döndü.</p><p>Stringlerle ilgili bir not paylaşmak istiyorum. Eğer tırnak içine yazdığımız cümlede kesme işareti kullanıyorsak dışarıda çift tırnak, içeride tek tırnak kullanmalıyız.</p><pre>print(“Türkiye’nin başkenti Ankara’dır.”)</pre><p>Tanıtmak istediğim son veri tipi boolean. Boolean’lar True (doğru) ve False (yanlış) olabilir.</p><pre>dogru_mu = True # False’ da olabilir.</pre><pre>type(dogru_mu)</pre><pre>&gt;&gt;&gt; bool</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*5-qm6S5Cs986hRqWH991QA.jpeg" /></figure><h3>print() fonksiyonu</h3><p>Şimdi yukarıda tanımladığım isim ve soyisim değişkenlerini birleştirerek adımı yazdıralım.</p><p>Python’da kullanıcının görmesini istediğimiz şeyleri bastırmak için print() fonksiyonu kullanılır.print() fonksiyonuna istediğimiz kadar girdi ekleyebiliriz. Bu girdiler virgül ile ayrılır. print() fonksiyonu otomatik olarak bu girdiler arasına bir boşluk bırakır. Bunu sepparametresine atama yaparak değiştirebiliriz.</p><pre>print(isim, soyisim)</pre><pre>&gt;&gt;&gt; Omer Cagri Sayir</pre><pre>print(isim, soyisim, sep=”*”)</pre><pre>&gt;&gt;&gt; Omer Cagri*Sayir</pre><h3>Yorum Satırları</h3><p>Yukarıdaki örneklerde # şeklinde başlanan satırları Python okumaz. Bu satırlara yorum satırı denir. Aynı zamanda üç adet çift tırnak arasına alınan yazılar da yorum satırıdır ve program tarafından okunmaz.</p><pre># Bu bir yorum satırıdır</pre><pre>&quot;&quot;&quot;</pre><pre>Burası da yorum satırıdır</pre><pre>&quot;&quot;&quot;</pre><p>Bugün anlatacaklarım bu kadar. Umarım sizlere yararlı olmuştur. Bu benim ilk yazımdı umarım beğenilmiştir. Diğer yazılarımda görüşmek üzere. Herkese iyi çalışmalar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12f05dc4cad1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>