<?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 Ali Taha Dinçer on Medium]]></title>
        <description><![CDATA[Stories by Ali Taha Dinçer on Medium]]></description>
        <link>https://medium.com/@alitahasubfly?source=rss-e55cb0fad5f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pU5KBmmuuuMeU0-1wVr0WA.jpeg</url>
            <title>Stories by Ali Taha Dinçer on Medium</title>
            <link>https://medium.com/@alitahasubfly?source=rss-e55cb0fad5f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:32:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alitahasubfly/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[CV Hazırlama Rehberi (2024)]]></title>
            <link>https://medium.com/@alitahasubfly/cv-haz%C4%B1rlama-rehberi-2024-f0cbb7626540?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0cbb7626540</guid>
            <category><![CDATA[özgeçmiş]]></category>
            <category><![CDATA[resume]]></category>
            <category><![CDATA[template]]></category>
            <category><![CDATA[cv-writing]]></category>
            <category><![CDATA[türkçe]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Sun, 28 Apr 2024 11:33:11 GMT</pubDate>
            <atom:updated>2024-04-28T11:36:00.774Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kc2aXDyRLq63_-CZvieZSg.jpeg" /><figcaption><a href="https://www.pexels.com/photo/woman-holding-a-clipboard-with-resume-5989941/">Kaynak: Cottonbro Studio</a></figcaption></figure><p>Lafı çok da uzatıp, uzun uzadıya bir giriş yapmaya çok da gerek yok bence. Yaz geliyor. Bu da hem üniversitede okuyan arkadaşlarımız zorunlu stajlarını tamamlamak için çılgınlar gibi şirketlere başvuruyor, hem de yeni zam dönemi yaklaşıyorken şirketlerinden ayrılmayı düşünenlerin oluşturacağı sirkülasyon dönemi geliyor demek.</p><p>Son zamanlarda LinkedIn ve X (eski adı ile Twitter) üzerinden birçok “CV’im nasıl olmuş?” gönderisi ile karşılaşıyorum ve hepsinde aşağı yukarı aynı yanlışları görüyorum. Özellikle sektöre yeni girecek veyahut staj arayan arkadaşlarımız için yazmayı çok uzun bir zamandır düşündüğüm bu yazıda kaliteli bir CV hazırlamak için gereken tüm püf noktaları elimden geldiğince anlatmaya çalışacağım.</p><p>Bu arada belirtmekte fayda var ki, ben bir IK (İnsan Kaynakları) Uzmanı değilim, veyahut IK tarafına CV’ler ulaşmadan önce nasıl bir algoritmanın veya eleyici bir yapay zekanın çalıştığını bilmiyorum, ancak benim CV’imde kullandığım ve önemli olduğunu düşündüğüm her noktayı aktarmaya çalışacağım. Bilgiler tamamen kişiseldir ve benim bireysel gözlemlerime dayalıdır, yatırım tavsiyesi değildir.</p><h3><strong>1. CV’nin Görünüşü</strong></h3><p>Yapay zeka uygulamaları gün be gün daha çok hayatımızın içine giriyor ve ilk başlarda insanların yaptığı keyword (anahtar kelime) bazlı eleme işlemini günümüzde yapay zeka destekli tarama uygulamaları hallediyor. Bu bilgiyi söylemek önemli çünkü doğru keyword’leri kullanmadığınız takdirde CV’niz insan kaynakları uzmanının önüne hiç düşmeyebilir bile. Bu bilgiden yola çıkarak şunu söyleyebilirim ki CV’niz bir yapay zeka uygulamasının rahatlıkla tarayabileceği bir görünümde olmalı ve başvuracağınız işe yönelik keyword’leri içermelidir. Ancak bu kesinlikle iş başvurusundaki açıklamayı kopyala yapıştır yapıp tüm keyword’leri göze sokmak demek değildir. Bana göre ideal bir CV görüntüsü şu şekilde görülmeli:</p><ul><li>Kişisel bilgi bulunmamalı. Adresiniz, nereli olduğunuz, doğum tarihiniz, evli olup olmadığınız, çocuğunuzun olup olmadığı veya askere gidip gitmediğiniz CV’de bulunması gereken bilgiler değildir. Çoğu kişinin de sürekli üzerinde tartıştığı bir konu da fotoğrafınızın bulunup bulunmaması gerektiğidir ve bana göre bu hem kişisel bir bilgidir hem de CV’de bulunmamalıdır.</li><li>Kimi yerler kadınlara gelecek planlarında çocuk yapıp yapmamak gibi bir düşüncelerinin bulunduğunu veya erkeklere yakın zamanda askere gidip gitmeyeceğini sorabilir. İnsanların medeni durum veya askerliği tamamlamış olmalarını özellikle belirtmesini buna bağlıyorum. Bu şirketlerin bazıları sizin kısa süreli bile olsa hamilelik ve doğum sürecinde veya askerlik süresince kullanacağınız izinlerinizi iş gücü kaybı olarak görebileceği için önden eleyebilir. Yıl 2024 olsa da, bunlardan biri doğal bir hak, biri de zorunlu bir görev olsa da maalesef bu şekilde düşünen şirketler bulunmaktadır.</li><li>Fotoğraf başlı başına bir eleme yöntemidir. Kimisi tipinizi beğenmez, kimisi etkilenir yürümeye çalışır, kimisi sakal ve bıyığınıza takılır… Say say bitmez bu, koymayın işte. Sizin yetenekleriniz, eğitim durumunuz, eski işlerinizde neleri başardığınız önemli. Dolayısı ile CV’nizde bulunması gereken şeyler de bunlardır, neye benzediğiniz değil (dediğim gibi, bana göre).</li><li>Tasarım ile ilgili bir işle uğraşmıyorsanız görselliğin zerre önemi yok. Fazla görsellik hem CV’nizin taranmasını zorlaştırır, hem de göz yorar. Bazı CV’lerde de 25–75 bölme işlemi uygulanıyor (sol kolon sağ kolon olmak üzere). %25’lik kısma yetenekleri ve bilgileri dizerken %75’lik kısma da eğitimi ve deneyimleri yığıyor. %75’lik kısım önü alınamayan nehir gibi uzarken %25’lik kısım soğanın cücüğü gibi kalıyor. Yapmayın.</li><li>Bana göre CV yukarıdan aşağıya rahatlıkla göz gezdirilebilecek bir şekilde olmalı. Bi sağa bi sola ayrı ayrı bakmanın bir önemi yok.</li><li>CV içeriği doğru bir şekilde bölümlendirilmeli ve her bölüm kendi arasında önem sırasına göre dizilmeli.</li><li>Bence CV’nin en tepesinde isminiz ve iletişim bilgileriniz bulunmalı. İletişim bilgileriniz telefon numaranız, e-posta adresiniz ve LinkedIn profilinizin linki gibi şeyler olabilir. Bunlardan telefon numarası ve e-postanız kişisel bilgilerdir aslında ve ilk söylediğim şeyi çiğniyormuşum gibi geliyor olabilir size, ancak herkesin 50 ayrı telefon numarası veya e-posta adresi olmayabilir. Yeterince profesyonel olduğunu düşünüyorsanız kişisel de olsa e-posta adresinizi paylaşmakta zarar yok bence. Sadece e-posta adresiniz “cehennem_meleği_89” gibi bir şekildeyse tekrar düşünmenizde fayda olabilir.</li><li>İletişim bilgileriniz arasında ne olur sosyal medyanızı koymayın. Hatta bence Medium linkinizi bile koymayın. Bunlar profesyonel linkler değil ve CV profesyonel bir yazıdır. Google Scholar gibi akademik veya endüstriyel açıdan kabul görmüş, derece ve kalite belirten bir şey değilse o linkin bir anlamı yok. Kişisel web siteniz belki güzel bir detay olabilir, ancak sitenizin profesyonel olduğunu düşünmüyorsanız yine eklemeyin. Bana kalırsa link olarak durabilecek en önemli şeyler e-posta adresiniz, profesyonel ise web siteniz ve LinkedIn linkiniz. Bir de bu linkleri uzun uzun yazmayın. Kısa, olabildiğince tek kelime ile belirtip üstünü linklemeye çalışın. Linklemek renk de katacağı için CV’de güzel durabilir. Hatta belirtmekte fayda var, e-posta adresinizi uzun uzun yazın. Eğer linki doğru ekleyemezseniz IK, e-posta adresinizi kopyalayıp en azından mail ile ulaşabilir size.</li><li>Eğer okuyorsanız ve özellikle bir staja veya part-time (yarı zamanlı) bir işe başvuracaksanız eğitim gördüğünüz yerleri iletişim bilgilerinden hemen sonra yazmak iyi olur. Böylece LinkedIn veya başka bir yer üzerinden CV’nizi görüntüleyen bir IK isminizi ve iletişim bilgilerinizi gördükten sonra nerelerde okuduğunuzu görmüş olur. Şirketler staja veya part-time’a alacakları kişileri burada eleyebiliyorlar. Genelde eğitim bölümünde okulun yanına bir de ortalamanızı yazmak faydalı olur. Ancak ortalamanızın düşük olduğunu düşünüyorsanız hiç yazmamanız daha iyi olur. Bunun yanında maddeler halinde kısaca okuldaki başarılarınızı listeleyebilirsiniz. Bunlar sizin okulu ot gibi sadece derslere çalışarak geçirmediğinizi, interaktif işlerde de bulunduğunuzu gösterdiğinden önemli olabilir.</li><li>Eğer çalıştığınız yer sayısı (bana göre) 2’yi geçtiyse ve 3. şirketinize başvuruyorsanız isim ve iletişim bilgilerinizden sonra çalışma geçmişinizi belirttiğiniz bölüme geçmeniz daha iyi olur. Bunu şuna dayanarak söylüyorum; eğer 3. şirketinize geçecekseniz ortalama 3 senedir sektörde olduğunuzu düşünüyorum, ki bu da 3 senedir mezunsunuz anlamına geliyor, ki bu da 3 senelik tecrübeniz var demek [ANEKDOT]. Yani yaptığınız işte 3 senedir ilerlediniz ve okulun değil, çalıştığınız yerlerdeki tecrübelerin önemli olduğu bir dönemdesiniz demektir. Aynı sebepten ötürü, uzun süredir sektördeyseniz eğitim kısmını en aşağılarda belirtebilirsiniz veya hiç belirtmeyebilirsiniz bile.</li><li>Çalıştığınız yerleri de, okulları da listelerken kronolojik sıraya göre dizmeye özen gösterin. En son yaptığınız şey en başta olmak üzere yukarıdan aşağıya sıralayabilirsiniz. Bunları listelerken isterseniz şirketin veya okulun şehir/ülke bilgisini verebilirsiniz. Bunlar IK’nın sizin hangi şehre/ülkeye çalıştığınızı bilmesi için değil, daha çok yurt dışında bir şirkete çalıştıysanız yabancı dil bilginizin değerlendirilmesine daha çok yardımcı olmak içindir (bence).</li><li>Çalıştığınız yerleri listelerken her birine elbet ki çalıştığınız süre boyunca neler yaptığınızı yazmanız gerekiyor, ve CV’nizin en önemli kısmı da burasıdır bence, ve yine gözlemlerime göre en çok hata yapılan yer burası. Bu maddeyi uzun bir paragrafa çevirmekten ziyade aşağıdaki <strong>Anlatım</strong> başlığında net bir şekilde açıklayacağım.</li><li>Eğer okuyorsanız ve staja, öğrenci olarak part-time bir işe veya ilk işinize başvuruyorsanız yaptığınız projeler çok önemli. Yukarıda okullarınızı listelerken başarılarınızı da maddelemek konusuna değinmiştim. Projelerinizi elbette oraya yazmıyorsunuz. Projeler sizin kullandığınız ve üzerinde çalıştığınız teknolojileri anlatmak için en önemli yer. Özellikle hiçbir iş deneyiminiz yoksa projeler kısmı sizin deneyimlerinizi belirttiğiniz yer olduğundan bu kısma dikkat edin derim. Tıpkı önceki madde gibi bu maddeyi de <strong>Anlatım</strong> başlığında daha geniş açıklayacağım.</li><li>Eğer hiçbir iş deneyiminiz yoksa eğitim durumunuzu belirttiğiniz yerden sonra projelerin gelmesi bence en doğrusu. Eğer iş deneyiminiz varsa çalıştığınız yerleri belirttiğiniz bölümden sonra projeleri listelediğiniz bölüme geçmeniz bence daha iyi olur, çünkü şirket sizi eski şirketlerinizdeki tecrübelerinize göre işe alacak, okuldaki veya hobi olarak yaptığınız projelerinize göre değil.</li><li>Yetenekler bölümü kullandığınız teknolojileri belirttiğiniz kısımdır. Bu bölümü sakın ilgi alanlarınız ile karıştırmayın. iOS uygulamaları geliştirmek bir ilgi alanıdır, Swift ve UIKit kullanabilmek birer yetenektir. Kullandığınız teknolojileri sakın açıklamaya çalışmayın, teknolojinin ismini yazın yeter. Sakın, sakın, sakın ama sakın, bakın tekrar söylüyorum sakın, hatta bi de büyük harfle <strong>SAKIN</strong>, yeteneklerinizi belirtirken yüzdelik dilim belirten herhangi hiçbir şey <strong>KUL-LAN-MA-YIN</strong>. Bakın ne olur, incelediğim tüm CV’lerde gördüğüm en büyük hata budur. Oraya <strong>Android %100</strong>, <strong>iOS %80</strong>, <strong>Flutter %50</strong> yazanlar var. Veya daire grafiği koyup <strong>%100</strong> dolduranlar var. Bakın size interview sırasında öyle bir soru sorarlar ki oradaki 100’ün başına eksi koymak zorunda kalırsınız. Kime göre neye göre %100 olduğunuzu düşünüyorsunuz? Bir de hiçbir teknolojiyi %100 öğrenemezsiniz, özellikle yazılım her gün gelişen ve değişen bir sektör iken yürüyen doküman bile olsanız bir anda out-dated (eskimiş) kalabilirsiniz. Sadece, teknolojinin adını yazın yeter.</li><li>Yetenekler bölümüne <strong>SADECE</strong> teknolojinin adını yazdığınız için, bu bölüm genelde ilgi alanları ve bildiğiniz diller ile beraber doldurulur. Bunları bu bölümün altında ayrı ayrı listelemeniz yeteneklerinizin, ilgi alanlarınızın ve bildiğiniz dillerin daha rahat ayırt edilebilmesine de yardımcı olur.</li><li>Bu (g)üçlü bölümü toplu bir şekilde belirttiğinizde absürt durmayacağını düşündüğünüz herhangi bir yere koyabilirsiniz. Zaten görünüm olarak kısa bir bilgi bloğu olması gerektiği için isterseniz en sona, isterseniz isminizi ve iletişim bilgilerinizi belirttiğiniz kısımdan sonra, isterseniz projeler bölümünden önce vb. absürt olmayan herhangi bir yere koyabilirsiniz. Ben kişisel olarak en alta koymayı tercih ediyorum, ama ilk işinizi veya stajınızı arıyorsanız eğitim durumunuzdan sonra belirtmeniz faydalı olabilir.</li><li>Yeteneklerinizi belirtirken de belirli bir alana yönelik işleri bir arada gruplandırmanız veya ona göre sıralamanız daha iyi olur. Mobil uygulama geliştirme yetenekleriniz arasında yapay zeka ile ilgili 1–2 yetenek koyup sonra tekrar mobil ile ilgili yeteneklerinizi sıralamaya devam etmeniz yanlış olur bence.</li><li>Dil bilginizi belirtirken lütfen seviyenizi genel olarak yazın ve geçin, veyahut seviyenizi hiç yazmayın. Tek tek dinleme, yazma, anlama ve konuşma yeteneklerinizi belirtmenize gerek yok. Yazdığınız CV’yi o yabancı dil ile yazdıysanız kullandığınız gramer bilgisi ve kelimelerin kalitesi zaten o dil hakkında bilginizi az çok gösteriyor olacak. Daha fazlasını eğer ileriki aşamaya geçerseniz IK zaten sorgulayacaktır.</li><li>İlgi alanlarınızı belirtirken lütfen yeteneklerinize “X” yazdıysanız “X ile bir şey geliştirmek” gibi bir şey yazmayın. İlgili alanları sizin ot gibi bir hayatınız olmadığını gösteren bir alan. Enstrüman çalıyorsanız, uzak doğu dövüş sporu ile ilgileniyorsanız, doğa fotoğrafı falan çekiyorsanız gidin onları yazın. Belki IK sırf balık tuttuğunuz için mutlu olacak ve görüşmeye çağıracak. Ayrıca balık da tutmuyorsanız gidip yazmayın. Görüşmede sorarlar, kalırsınız.</li><li>İlk stajınız veya işiniz değilse “<strong>Hakkımda</strong>” bölümüne gerek olduğunu düşünmüyorum. Hakkımda bölümü daha çok kendinizi övdüğünüz, kariyerinizde ulaşmak istediğiniz amaçların neler olduğunu 3. kişi ağzından belirttiğiniz bir bölüm. Bir öğrenci veya ilk işini arayan biri olarak bir misyonu belirtmek elbette IK’nın gözüne şirin görünmeniz açısından yararlı, ama sektörde uzundur bulunan birinin CV’sinde de hala amaçları olmamalı. Böyle bir bölümünüz olcak ise de kesinlikle isminiz ve iletişim bilgilerinizden sonra, eğitim alanından önce olmalı.</li><li>Sertifikalar konusuna gelirsek, staj veya ilk işini arayan biri için sertifikalar çok iyi bir bölüm olabilir ancak unutmayın ki sertifikaların da bir “değer” niteliği var. Her sertifikaya sertifika demek yanlış olur. Günümüzde pek çok online eğitim sitesinden videoları atlaya atlaya, hızlı hızlı sara sara, ödevleri ve projeleri ChatGPT’ye yaptırarak veya bazı yerlerden kopyala yapıştır yaparak tamamlayabiliyoruz ve sertifikalarınızı alabiliyorsunuz. Bu sebeple ben bazı online eğitim sitelerinden alınan sertifikaları kullanmayı hiçbir noktada artık doğru bulmuyorum. Siz o ödevleri ve projeleri hakkınız ile yapmış olabilirsiniz, videoları tek tek irdeleyerek de yazmış olabilirsiniz ve bu sebeple gururla o sertifikayı oraya koymak isteyebilirsiniz ama CV’nizi okuyacak kişi bu durumdan haberdar olmayabilir, dolayısı ile benle aynı düşünüp hiç umursamayabilir bu kısmı. Bunu CV’ye “Ben bunu hakkımla aldım” şeklinde yazamayacağınız için (lütfen böyle yazmayın) karşı tarafta CV’yi okuyacak kişiye bunu aktarmanın tek yolu var, o da <strong>Cover Letter</strong> dediğimiz iş başvurusu yazısıdır. Bu tamamen başka bir yazının konusu tabii ki.</li><li>Dolayısı ile eğer hali-hazırda sektörde bir kaç kez iş sahibi olmuş biri iseniz, sertifikalarınızı güvenilir bir kaynaktan doğru bir şekilde test edilerek almadıysanız yazmayın. Eğer ilk stajınıza veya işinize başvuruyorsanız yazın, fazla şey göz çıkarmaz, tatlı da gözükebilir. Nitekim CV’yi inceleyecek kişi benimle tamamen aynı düşünecek gibi bir durum da yok, hoşuna gidebilir de.</li><li>Eğer sertifikalar kısmını eklediyseniz de yukarda belirttiğim üçlü gurubun hemen altında veya üstünde ve mümkünse hep beraber en aşağıda olması en doğrusu olacaktır bence.</li><li>CV’yi olabildiğince üçüncü kişi gözünden yazın. Kendinizi övmeyin. Her şeyi sen yapmadın. Eğer bir start-up’a tek eleman olarak girmediysen o şirkete, elbette bir takım olarak yaptınız işleri. Birincil kişi kullanmak ego göstergesidir. “Ben” kelimesinden kaçının.</li><li>CV profesyonel bir yazıdır, bu sebeple fontu profesyonel olmalıdır. Günün sonunda birine kendinizi tanıttığınız bir yazı bu. Nasıl biri ile bir yemeğe çıkarken mayo giymiyorsanız CV’de de saçma fontlar kullanmayın. Bence en profesyonel gözüken font Times New Roman, ancak Helvetica da yeterince profesyonel. Bu bölümün ilk maddelerinden birinde de belirttiğim gibi, tasarım ile alakalı bir iş yapmıyorsanız CV’nizin görünümü çok da önemli değil. Ancak bu demek değil ki görselliği hiç önemli değil. Bir Android uygulama geliştirici işine başvuruyorsanız CV’de Roboto fontunu kullanmak çok tatlı olabilir. Doğru kişilerin eline geçerse sırf fonttan bile görüşmeye çağırılırsınız.</li><li>Kullandığınız teknolojileri veya çok önemli olduğunu düşündüğünüz detayları <strong>bold (kalın)</strong> tipte yazmak iyi olabilir. Ancak CV’nizde çok teknoloji varsa veya çok yerin önemli olduğunu düşünürseniz tamamen bold bir yazı ile karşılaşabilirsiniz. Ben kendi CV’imde çok fazla teknoloji kullandığım için hiçbirini bold yazmadım. Ancak ilk stajınızı veya işinizi arıyorsanız bu keyword diyebileceğimiz şeyleri bold yazmanız iyi olabilir, hızlı bir göz taraması sırasında göze çarparlar çünkü.</li></ul><p>Son olarak unutmayın, CV profesyonel bir yazıdır. Sizi o şirkete tanıtan, dolayısı ile sizi temsil eden bir yazıdır. Ne kadar ciddi olursa o kadar ciddiye alınırsınız.</p><h3>2. CV’de Anlatım</h3><p>Yukardaki maddelerde CV’nin belirli bölümlerinde listelemeler yaptığınızdan bahsetmiştim, mesela öğrenim gördüğünüz okullar, çalıştığınız şirketler ve yaptığınız projeler gibi. Bunları sıralarken aynı zamanda her birine alt maddeler şeklinde bu okul/şirket/proje kapsamında neler yaptığımızı, neler kullandığımızı anlatıyoruz. Bugüne kadar incelediğim çoğu CV’de benim en çok dikkatimi çeken yanlışlar buralarda yapılıyor. Önceki bölümde yaptığım gibi uzun uzadıya tüm yanlışlardan bahsetmek yerine doğrusunun nasıl olması gerektiğini kendi düşüncelerime göre aktarmaya çalışacağım. Bana göre CV’de doğru anlatım şu şekilde olmalı:</p><ul><li>Öncelikle eğer eklediyseniz Hakkımda bölümü ile başlayalım. Bu bölümde kesinlikle sadece üçüncü kişi ağzını kullanın. Yine önceki bölümün ilk başında dediğim gibi kişisel bilgilerden bahsetmeyin. İsminizi tekrarlamanıza, okuduğunuz okulu yazmanıza, nerede ve ne zaman doğduğunuzu söylemenize gerek yok. Bu bölüm sonuçta sizin kendinizi başkasının ağzından övdüğünüz bir bölüm. İlerlemek istediğiniz alandan, konulardan bahsedin. Küçük bir Cover Letter kısmı sonuçta burası. Yani şu şekilde düşünebilirsiniz, iş ilanlarında “Eğer sen de şöyle biri isen” veya “Eğer bunları bunları yapmak için yanıp tutuşuyorsan” şeklinde yazılan yerlerden kopya çekerek doldurabilirsiniz. Tabii ki cümlenin aynısını veya benzerini değil, daha çarpıcı bir şekilde kısa ve öz bir cümle ile anlatmaya çalışın. Bana kalırsa ideal bir Hakkımda bölümü 75–100 kelimeden uzun olmamalı. Amaçlarınız, misyonlarınız ve gelecek isteklerinizden bahsedip ne kadar değerli biri olabileceğinizi veya olduğunuzu sunmanız yeterli.</li><li>Hakkımda bölümü ile ilgili eklemek istediğim bir şey daha var ki, o da her CV’nin amacının farklı olduğudur. Şunu kastediyorum, bir CV sizin tüm yaptıklarınızı da bulundurabilir, veya birden çok sektörde bulunduysanız o zaman sadece belirli bir sektördeki deneyiminizi içeren birden çok CV’niz de olabilir. Mesela hem yapay zeka hem de mobil uygulama geliştirme ile ilgilendiyseniz bunlar için ayrı ayrı CV’ler oluşturabilirsiniz. Tabii ki bu durumda Hakkımda bölümünde, misal, yapay zeka üzerine çalışmalarınızın olduğu bir CV’de gidip de mobil uygulamalar konusunda da ne kadar yetenekli olduğunuzdan çok da bahsetmeyin. Kısa bir değinmeniz yeterli olacaktır.</li><li>Benim naçizane düşüncem sektörde uzun yıllardır bulunan, özellikle Senior seviye ve üstüne çıkmış kişilerde Hakkımda bölümünün olmasına gerek yoktur. Çünkü iş deneyimleriniz bölümünde zaten bilgi ve tecrübelerinizden bahsedeceksiniz, yani Hakkımda bölümünü CV’nin tamamına yedirmiş olacaksınız. Bi de ekstradan bir Hakkımda bölümü ekleyerek CV’yi uzatmanın manası yok bence.</li><li>Aşağıda anlatacağım diğer bölümlerden ziyade, Hakkımda bölümü paragraf olarak yazmanızı desteklediğim tek bölümdür. Diğer hiçbir bölümde paragraf olarak değil, madde madde yazmanızı tavsiye ederim. Bu CV’yi inceleyen kişinin çok daha rahat incelemesini sağlayacaktır.</li><li>Eğitim bölümüne gelirsek, özellikle staj veya ilk işini arayan arkadaşlarım için en eleyici unsurlardan biri burası zaten. Buraya okuduğunuz üniversitenin yanı sıra lisenizi de yazmanız iyi olabilir. Bazı okullardan mezun olanlar arasında dayanışma kültürü iyi gelişmiştir. Aynı okuldan mezun olduğunuz bir şirketin CEO’su veya IK’sı sizi sırf bu sebeple bile görüşmeye çağırabilir.</li><li>Bunun haricinde eğitim gördüğünüz yerleri listelerken okullardaki başarılarınızı da listelemenizin iyi olabileceğinden yukarıdaki maddelerin birinde bahsetmiştim. Burada önemli olan sizin yaptıklarınız ile bir projedeki başarınız arasındaki farkı iyi belirlemektir. Mesela “Eğitimim sürecinde x tane uygulama geliştirdim” şeklinde bir cümle yazmayın. O projelerden zaten projelerim kısmında bahsedeceksiniz. Ancak bir toplulukta liderlik yaptıysanız, bir etkinliğin düzenlenmesinde rol aldıysanız, akademik açıdan bir yarışmaya veya hackatonlara katıldıysanız ve derece yapabildiyseniz bunlardan bahsetmeniz iyi olacaktır. Bunun sebebi okul hayatınızın ot gibi geçmemiş olduğunu göstermenizin yanı sıra, liderlik, takım çalışması gibi konularda yetkinliğiniz olduğu göstermek, ve yetenekleriniz doğrultusunda çabalayıp kendinizi göstermeye çalıştığınızı belirtmektir.</li><li>Eğer uzun zamandır sektördeyseniz ve yeni eğitimler içinde bulunmadıysanız, eğitim bölümü değerini yitirecektir. Bu durumda eğitim bölümü için çok da uğraşmanıza gerek yok, sektör tecrübeniz daha ön planda olacaktır zaten. Bu bağlamda mesela gidip de lisenizi yazıp CV’nizi uzatmayın. Ancak uzundur sektördeyseniz ve yüksek öğrenim ile eğitim hayatınıza devam ediyorsanız bunu CV’nizde belirtmekte fayda var tabii ki de.</li><li>Şimdi gelelim en çok hatanın yapıldığı iş deneyimi bölümüne. Staj veya ilk işini arayan arkadaşlarım özellikle çok dikkatli olmalı burada. Burayı paragraf olarak yazmaktan kaçının. Deneyimler kısmının ana amacı tecrübelerinizi, aldığınız aksiyonları ve bu aksiyonların sonuçlarının neler olduğundan bahsetmek olmalı. Aldığınız her bir aksiyonu ve bunun sonucunun ne olduğunu madde madde bahsetmeye çalışın. Mesela “Uygulamada şu kütüphaneyi şununla değiştirdim, böylece verilerin yüklenme hızı %20 hızlandı” gibi. En önemli cümleler bunlar oluyor bu bölümde. Onların haricinde yaptığınız işte üzerine uğraştığınız şeyin neye yaradığı hakkında kısa ve öz bir madde de yazabilirsiniz.</li><li>Rakamlar belirtmek önemli bu maddeleri yazarken. Sadece teknoloji yazarsanız, bu neler kullanıp ne öğrendiğinizi belirtir. Sadece staj deneyimi olan veya ilk işinde çalışmış birilerinden tabii ki ürünü daha performanslı ve kaliteli hale getirecek şeyler yapmış olması beklenmez. Ancak uzun süredir sektördeyseniz bir şeyleri daha iyi hale getirmişsinizdir tabii ki. Net bir sayı belirtemiyorsanız bile “hızlandırdım, arttırdım, düşürdüm” gibi ifadeleri kullanmaya çalışın. Aldığınız aksiyonlar ve etkileri en çok bu şekilde ortaya çıkar.</li><li>Aksiyonlarınız ve sonuçları haricinde tecrübeleriniz de önemli tabii ki. Tecrübelerinizi belirtirken “A’da çalışma sırasında x,y ve z kullanıldı” şeklinde belirtebilirsiniz. Ben hiç Türkçe CV hazırlamadım, o yüzden nasıl bir şey yazılsa daha doğru olur bilemiyorum. Ama İngilizcede çok basit iki kelime var; “used” ve “applied”. Bu iki kelime sayesinde ben merkezli cümlelerden kolayca kaçınıp üçüncül ağızdan rahatlıkla yazabiliyorsunuz, mesela “Used x and y along with z while working on A” gibi.</li><li>Eğer milyonların da kullandığı bir ürün yapan bir şirkette çalıştıysanız, şirketin büyüklüğünü daha da vurgulamak amacıyla şirketin aylık veya yıllık ulaştığı kişi miktarını belirten ve şirketi çok kısa açıklayan bir madde bulundurabilirsiniz. Ben bunu ilk madde olarak kullanıp hem ne üzerinde çalıştığımı hem de çalıştığım şeyin büyüklüğünü tek seferde vermeyi daha çok seviyorum, ama tabii ki her yiğidin yoğurt yiyişi farklıdır.</li><li>Bu bölüm doğası gereği genel olarak geçmiş zamanı kullanarak yazılmalı. Ancak CV’nizi sürekli güncelliyorsanız şu anda yaptığınız şeyi şimdiki zaman kullanarak yazın.</li><li>Bunların haricinde özellikle İngilizce yazıyorsanız CV’nizi, C1 ve üstü kelimeler kullanıp kaliteli ve çarpıcı cümleler kurmaya özen gösterin. Sadece yaptım-ettim şeklinde dümdüz yazıp geçmeyin. Bunları ChatGPT yardımı ile de çok güzel hale getirebilirsiniz tabii ki ama çok aşırı profesyonel yapmamaya çalışın, sanki CV’yi tamamen ChatGPT’ye yaptırmışçasına gözükmesin. İşe de sizin yerinize ChatGPT’yi alırlar o zaman.</li><li>İş deneyimleri bölümünde son olarak tarih aralığı belirtmek önemlidir. Ancak bu durum CV’yi okuyan kişinin ne kadar süre boşluk bıraktığınızı görmesini de sağlar. Eğer bir sebebiniz varsa bu boşluğu bırakmanızda, bunu görüşme sırasında belirtin, neden boşluk bıraktığınız bence CV’de bulunmamalı.</li><li>Şimdi gelelim projeleriniz bölümüne. Özellikle hiçbir iş deneyiminiz yok ise sizin için en önemli bölüm burası olacaktır. Gün geçtikçe sektör daha da rekabetçi bir hale bürünüyor ve mezun olup bir işe başvuracağınız zaman sizi diğer yeni mezunlardan ayırt edecek en önemli bölüm burası olacaktır. Bu sebeple eğitim hayatınızı sadece derslere çalışarak geçirmemenizi tavsiye ederim. Olabildiğince çok teknoloji ile uğraşıp projeler yapmaya çalışın. Bu bölümde de bu projelerden olabildiğince bahsedin. Hiç bir proje yapmayıp mezun olmak üzereyseniz de, öncelikle aferin o zaman size, sonuçta okuduğunuz süre içerisinde derslerde elbet projeler yapmışsınızdır. En kötüsüden o projeleri bile belirtmek faydalı olacaktır.</li><li>Projelerinizi belirtirken iş deneyimi bölümünde belirttiğim her şey neredeyse olduğu gibi geçerli. Ancak projenizi anlatmak konusunda daha özgürsünüz. Bence yine bir maddeyi geçmeyecek şekilde projeniz konusunda daha çok detay verebilirsiniz. Eğer bir iş deneyimi bölümünüz de yoksa, projeleriniz bölümünü ballandıra ballandıra anlatmanız faydalı olacaktır.</li><li>Projelerinizi bir yerlerde paylaştıysanız bunları linkelemeniz faydalı olacaktır. Tabii ki bu yerlerden kastım instagram veya X gibi sosyal medya hesapları değil, yine profesyonel bir ortam olmalı. Yazılımcı iseniz GitHub’da projelerinizi paylaşıp repository linkini kullanabilirsiniz.</li><li>Projelerinizi belirtirken o projenin değerini bir düşünün derim. Gidip de basit bir “Hello World” uygulaması yaptıysanız bunu da yazmayın. Projenin belirli bir kalitesinin olması gerektiğini, belli başlı teknolojileri öğrenecek kadar kullanmanız gerektiğini düşünüyorum. Bu şekilde olan projelerinizi yazın, 1–2 günde bitirebildiğiniz bir şey muhtemelen size de pek bir şey öğretmemiştir ve yine muhtemelen basit bir projedir. Ama elinizde hiçbir şey yoksa yazabilirsiniz tabii ki.</li><li>Eğer iş deneyimi bölümünüz varsa projeler bölümünüz artık hobi bahçenizdir. Belirli bir başarısı yoksa, yaptığınız ilk büyük çaplı proje değilse veya son teknolojileri deneyimlediğiniz ve yayınladığınız bir şey değilse o projeyi belirtmekte pek de bir fayda yok bence. Mesela benim CV’mde hala ilk yaptığım mobil uygulamanın projesi bulunmakta. Hala olmasının tek sebebi de mobil uygulama geliştirmeye ne zaman başladığımı göstermek aslında.</li><li>Aynı şekilde iş deneyimleriniz üzerine bir bölüm varsa buradaki projeleri açıklarken madde madde yazmanıza gerek yok. CV’yi inceleyen kişi tecrübelerinle ilgilenecektir zaten. Projeler kısmı daha çok ot gibi bir hayat yaşamadığınızı göstermek için duruyor biraz da. Madde madde de bölebilirsiniz paragraf olarak da yazabilirsiniz, size kalmış.</li><li>İş deneyimi bölümünde belirttiğimden farklı olarak, burada projeleriniz için tarih belirtirken projeyi bitirdiğiniz tarihi belirtmeniz yeterli olacaktır. Maksat ne zaman yaptığınızı ve ne teknolojiler kullandığınızı göstermek burada, ne kadar sürede yaptığınızı göstermek değil.</li></ul><p>Son olarak şunu söyleyebilirim, tecrübelerinizde sakın yalan söylemeyin. Bir konuda en ufak fikriniz yoksa, veya internetten 5 dk bakıp genel geçer şeyleri ezberleyerek görüşmeye girebilirim diye düşünüyorsanız hiç belirtmeyin daha iyi. Görüşmelerin asıl amacı bilgi birikiminizi ölçmek olduğu için yalan söylediğiniz konularda üstünüze giderlerse ayvayı yersiniz.</p><h3>3. Birkaç Önemli Şey</h3><p>Öncelikle CV’nize sadece 1.5–2 saniye bakılır sözünü kesinlikle duymuşsunuzdur. Bir noktada doğru bu söz. Yukarda elemenize sebep olabilecek bir çok madde yazdım. Bir IK uzmanı için bu hataları fark edip CV’yi çöpe taşımak elbette birkaç saniyeden uzun sürmeyecektir. Bunun yanında bu yanlışlara yapay zeka destekli inceleyicler de dikkat eder ve CV’niz 1.5 saniyeden de daha kısa sürede çöpe gider zaten. CV’nizin incelemeye değer bir CV olup olmadığını görmek için korkmayın, gösterin. Geri dönütler almaktan ve sürekli geliştirmekten çekinmeyin. İnsanlardan örnek isteyin ve kendinizinkini ona göre düzenleyin.</p><p>Bir diğer nokta da CV’nizin 1 sayfadan uzun olmaması gerektiği sözü. Evet, ilk işiniz veya sadece stajlarınız var ise tabii ki 1 sayfadan uzun olmaması daha iyi olur. Ancak yıllar geçtikçe deneyimleriniz artacak, bu sebeple CV’niz de uzayacak. Ancak şu da gerçek ki zaman geçtikçe CV’nizden bölümler çıkarmaya başlıyorsunuz, yukardaki maddelerde bahsettiğim gibi. Bu sebeple bence uzman seviyesinde bir kişinin CV’si de olsa 2 sayfayı aşmamalı bence.</p><p>Eğer her şeyi en ince detayına kadar göstermek, her şeyden bahsetmek, en güzel görselleri kullanmak istiyorsanız bunu CV’nizde değil, web sitenizde yapın. Diğer sektörler için net bir şey söyleyemem ama yazılımda yiğidin kendini kanıtladığı yer web sitesidir. Bu illaki tamamen kendinize özel bir alan adı ile bir site olmak zorunda değil, portfolyonuzu hazırlayıp servis edebileceğiniz birçok bedava yer var.</p><p>Son olarak yukarda ANEKDOT diye belirttiğim bir madde vardı. Bu benim kişisel görüşümü ve sektördeki izlenimimi içeren bir maddeydi. Türkiye’de turn-over süresi dediğimiz iş değiştirme sıklığı süresi 1.5–2 seneye kadar düştü. Hatta bazıları neredeyse her sene iş değiştiriyor. Bu sebeple bence 3 yıl sektörde olmuş birinin en azından 2 iş yeri deneyimi vardır diye düşünüyorum.</p><p>Bu arada şunu da belirtmekte fayda var, her ne kadar turn-over süresi kısalmış olsa da zırt-pırt iş değiştirmek iyi değildir. Bu, şirketler için “Biz bunu alsak seneye çıkacak zaten, neden buna yatırım yapalım?” düşüncesini ortaya çıkarır ve bu sebeple bile elenebilirsiniz. Tabii ki yaptığınız işten veya maaştan memnun olmayabilirsiniz. Ama ayrılıp yeni bir yere geçmeden önce oturup bi konuşun şirketle bu durumu. Öte yandan sektöre yeni girecek arkadaşlarımız da sektörü bir deneme tahtası olarak görmesin. Eğitim hayatınız boyunca sektörde çalışabileceğinizi düşündüğünüz alanlar konusunda araştırma yapıp kendi başınıza projeler üretmeye çalışın. O konudan zevk alıp almadığınızı erkenden görün, mezun olduktan sonra şirketlerde o konu üzerine çalışıp yoğunlaşın. Kimse zırt-pırt iş değiştirerek gelişemez.</p><h3>Sonuç</h3><p>Kendi gözlemlerim ve bilgi birikimlerimden yola çıkarak elimden geldiğince kaliteli bir CV hazırlamak için önemli olan noktaları aktarmaya çalıştım. Umarım yazdıklarım özellikle de sektöre yeni girecek arkadaşlarım için bir işe yarar. En başta da dediğim gibi, bu yazıda yazan her şey benim kişisel görüşüm olup yatırım tavsiyesi değildir. Yanlış veya eksik olduğunu düşündüğünüz noktalarda lütfen yorumlarda belirtin, herkes için bir bilgi kaynağına dönüşsün bu yazı. Sağlıcakla kalın :D</p><p>Bu arada benim CV’im yazılımcı CV’si, ama belki işinize yarar diye <a href="https://www.linkedin.com/in/ali-taha-dincer/?profileId=ACoAACW1-4QBtRUKtdo4hHjCHAL9lmUs2CcrCqA">LinkedIn profilimden</a> inceleyebilirsiniz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0cbb7626540" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering the Mobile Dev Maze: UIKit vs. SwiftUI vs. XML vs. Compose — Part 3]]></title>
            <link>https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-3-outcomes-acknowledgements-d25a82f1c403?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d25a82f1c403</guid>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[build]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 20:57:39 GMT</pubDate>
            <atom:updated>2024-02-23T11:47:08.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M09AWSkY5BX-bAnDAWrOkQ.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Frepository-images.githubusercontent.com%2F293498508%2F1624a845-8807-4b9b-895a-fdbc9ce70678&amp;tbnid=T6q6UJ4BBVlvoM&amp;vet=12ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ..i&amp;imgrefurl=https%3A%2F%2Fgithub.com%2FJetBrains%2Fcompose-multiplatform&amp;docid=lBl5wrllua_sEM&amp;w=1280&amp;h=720&amp;q=Compose%20Multiplatform&amp;ved=2ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ">Compose Multiplatform Header (Gathered From Official CMP Github Page</a>)</figcaption></figure><p>Welcome back, readers! If you’re joining us again for the final installment of this series, it’s great to have you on board. As this article builds directly upon its predecessors, I recommend giving them a read for context and depth — you can find the links just below:</p><ul><li><a href="https://medium.com/@alitahasubfly/i-made-the-same-app-15-times-here-are-the-results-part-1-introduction-methodology-ae9fcc1485e4">I made the same app 15 times, here are the results Part 1 — Introduction &amp; Methodology</a></li><li><a href="https://medium.com/@alitahasubfly/i-made-the-same-app-15-times-here-are-the-results-part-2-experiments-results-27aeb93cb42b">I made the same app 15 times, here are the results Part 2— Experiments &amp; Results</a></li></ul><p>Also, throughout reading the series, you can follow up the repo below, where I published all the apps along with libraries and resources:</p><p><a href="https://github.com/Subfly/the_compose_experiment">GitHub - Subfly/the_compose_experiment: A repository that holds a continuous experimentation with Compose Multiplatform until it reaches stable</a></p><p>In this part, we’ll begin by revisiting the predictions we made in the first part and see how they measure up against the outcomes of our experiments. Following that, I’ll extend my acknowledgments, sharing insights and contributions that have enriched this exploratory journey. So, without further ado, let’s get started!</p><h3>1. Comparison of Predictions and Outcomes</h3><p>If you’re coming from the previous installments, you probably have a good idea of what I’m about to say. But to simplify and summarize, our predictions pretty much turned into reality. Let me elaborate:</p><h4>Android:</h4><ul><li>Things mostly went as planned. Since CMP uses the same package as Jetpack Compose, and much of the Jetpack Compose code is available on the common side, we expected similar FPS and memory usage performances between the Base versions and the KMP &amp; CMP versions. The results confirmed this similarity.</li><li>However, adding Compose (both Jetpack Compose and CMP) to any XML project affected both FPS performance and app sizes similarly, with the exception of using CMP alone. This resulted in a few MBs more in size increase, which was explained in the previous parts.</li><li>For memory usage, some tests showed KMP with better results compared to the full-native <em>Base</em> versions. But this could be due to the removal of <em>Android’s Lifecycle ViewModel</em>, and <strong>further investigation is needed </strong>to confirm this.</li></ul><h4>iOS:</h4><ul><li>We were braced for the unexpected, and it certainly occurred. While the SwiftUI implementations were not the best, adding KMP &amp; CMP significantly reduced FPS performance (for CMP) and greatly increased memory usage in MBs, along with a substantial increase in the <em>ipa</em> sizes.</li><li>As previously explained, adding KMP &amp; CMP introduces headers, and CMP comes with <em>SKIA</em>, which majorly impacted the increase in <em>ipa</em> size.</li><li>The instant freezes during app use were a major drawback in the CMP version I used for these experiments. However, using CMP across the entire screen yielded better FPS results compared to integrating it in parts. But it’s important to note that every CMP element is a <em>UIViewController</em> on the iOS side, and using a <em>UIViewController</em> for each <em>TableViewCell</em> was not an ideal approach from the start.</li><li>Regarding the UIKit versions, adding KMP &amp; CMP significantly increased memory usage. However, assigning the garbage collection solely to Kotlin/Native GC — rather than having both Kotlin/Native and Apple’s GCs working together — improved memory management, though it still worse than the <em>Base</em> UIKit version. And personally, I think the <em>Base</em> SwiftUI version would have been better, if I had used <em>ListView</em> instead of <em>LazyVStack</em> inside a <em>ScrollView, </em>in terms of memory usage.</li><li>To sum up, CMP on iOS is still in its alpha stage and needs further optimizations for enhanced performance. Nevertheless, I’m optimistic that CMP will become a significant player in the near future, and I look forward to JetBrains achieving “native performance with the same code-base” in CMP too.</li></ul><h3>2. Acknowledgements</h3><p>This is probably the most waited part of the series, as I have already used a lot <em>“in the </em><strong><em>Acknowledgements</em></strong><em> section”</em> throughout the series. This part is basically the area where I will explain all the razzle-dazzle and how I solved them. Let’s get started!</p><h4>2.1 Copying KMP library to CMP library</h4><p>In the first part of this series, I mentioned that I had to duplicate the business logic from my KMP library (<em>KMPKtorCoinbase</em>) into my CMP library (<em>CmpCoinbase</em>). The reason stemmed from an issue I encountered when using my CMP library on iOS. Specifically, when using my <em>CoinTile</em> composable, it required passing a model into it. Since the CMP library initially depended on the KMP one, and the required model was sourced from the KMP library, XCode expected the KMP model itself rather than the imported (or already dependent) CMP one.</p><p>To address this, my initial solution was to add the KMP dependency to the project as well. However, I soon realized this approach was flawed. The CMP library was already dependent on the KMP, and logically, it should have recognized that I was using the same object. Unfortunately, this wasn’t the case. I couldn’t pass the same model with identical variables to the CMP <em>CoinTile</em> because the packages of the models in the dependencies differed post-compilation. Additionally, having both KMP and CMP dependencies forced me to create a mapper for the same model object, despite them being essentially identical but originating from different packages after compilation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yffmLZKUckToD9JeNQ935A.png" /><figcaption>Utilizing both KMP and CMP libraries, and converting same model for different packages</figcaption></figure><p>For clarity, let me break this down step by step:</p><ul><li>My KMP library contained a model object named “A”.</li><li>My CMP library depended on the KMP library and utilized model “A” in my <em>CoinTile</em>.</li><li>When attempting to use <em>CoinTile</em> on the iOS side, the composable required passing model “A”. However, this model “A” was expected to come from “<em>KMP.A</em>” rather than “<em>CMP.A</em>”.</li><li>Consequently, I added the KMP library to my iOS app to access “<em>KMP.A</em>”.</li><li>Since I was already relying on CMP for the iOS side, the business logic provided “<em>CMP.A</em>”, which couldn’t be directly passed to the composable. Thus, I had to create a mapper for “<em>CMP.A</em>” to “<em>KMP.A</em>” to make it work.</li><li>Additionally, since <em>CoinTile</em> was clickable and returns the model itself inside the <em>Lambda</em> in order to access the required parameters, there needed an another reverse mapping, which was another flaw requires to be mentioned.</li></ul><p>Eventually, I realized this approach was inefficient. Instead of copying the logic to each iOS project individually, I decided to replicate the entire code from my KMP library into the CMP library.</p><h4>2.2 Using both XML and ImageVector for the same icon</h4><p>When I was trying to reason about why the app size is increased when the CMP library is introduced to the Android side, I have mentioned that I have used both XML and a pure Kotlin ImageVector for the same icons, in order to make the resource shareable on both platforms, let me explain.</p><p>When I first started to implement my CMP library, I relied on the experimental resource sharing library that the JetBrains was working on. Since it was experimental, I was expecting the unexpected. However, no matter my efforts, I couldn’t directly use the XML vectors on the iOS side. I even downloaded and carefully inspected the sample project from the <a href="https://kmp.jetbrains.com/">Kotlin Multiplatform Wizard</a>, which successfully used an XML-based Compose logo in iOS, but to no avail. Despite mirroring their approach, my vector icons wouldn’t display on iOS. Subsequently, I asked for an advice on the Kotlin Slack Channel but didn’t receive any responses for days. As a result, I settled on converting the XMLs into <em>ImageVectors</em> by utilizing convertor tool in <a href="https://www.composables.com/svgtocompose">composables.com</a> and used them in the CMP side. Using a simple “<em>if</em>” check, I differentiated the platform, employing XML for Android and <em>ImageVector</em> for iOS. Since the code compiles OS-independently on the <em>shared</em> side, I believe that both the XML and <em>ImageVector</em> versions of the icons are included in the library, which results to the increase in app size.</p><h4>2.3 Ktor’s fault on creating the a Base-Url with “defaultRequest”</h4><p>Solving this issue took me three days, and I even considered abandoning the entire experiment. On the iOS side, I kept encountering an error resembling “<em>InvalidUrl</em>,” even though everything functioned perfectly on Android side. Let me explain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LYakuI8K4kQP2MflFUuybg.png" /><figcaption>The usage of “defaultRequest” while creating HttpClient</figcaption></figure><p>While working on the Android apps, before even integrating the libraries, I noticed a method in the DSL named “<em>defaultRequest</em>” for <em>HttpClient</em> during creation. This function allows assigning a base URL directly, eliminating the need to specify it in every request. On Android, this worked seamlessly. However, the first time I tried using the KMP library in the iOS app, requests were immediately canceled (or in fact, not even sent) with an “<em>InvalidUrl</em>” exception. The URL with error was displayed on the screen as my <em>flow</em> in the <em>use case</em> returned the error message whenever an exception occurred. Despite adding numerous print statements everywhere, I couldn’t identify the issue. It appeared the process failed even before any request was sent.</p><p>After three frustrating days, I decided to try adding the base URL directly instead of relying on “<em>defaultRequest</em>.” Voilà! Everything started working. Initially, it never crossed my mind that this simple function, which creates the base Url, would fail. Least of all, I didn’t expect JetBrains to overlook such a detail in their library’s release version.</p><h4>2.4 “.description” and “.description()” in Kotlin’s Data Classes along with “description” as a parameter</h4><p>This issue turned out to be the funniest challenge I faced while implementing the iOS apps for this experiment. Interestingly, Kotlin’s <em>Data Classes</em> include a default “<em>description()</em>” method, once compiled to the iOS side. They also have a “<em>description</em>” variable that returns the same output as the method. The twist came into play with the models I generated from DTOs, which also had their own “<em>description</em>” variable. This led to the following situation when I tried to display them in the UI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KO9bfHJLLf8-TV5ex2cgFw.png" /><figcaption>The funny thing about coin.description</figcaption></figure><p>Here’s the catch: when I attempted to access the “<em>description</em>” variable, which was mapped from the DTO’s “<em>description</em>”, it displayed as the <em>Data Class’s</em> “<em>toString()</em>” method on the screen. Therefore, one should bear in mind that not to use “<em>description</em>” as a variable name while working with KMP. I (<em>forcefully</em>) resolved this issue simply by renaming the variable.</p><h4>2.6 Sharing Libraries</h4><p>Not every aspect of the <strong>Acknowledgements</strong> section is about challenges; in fact, this part is a positive highlight! These experiments greatly enhanced my understanding of how to publish KMP and CMP libraries.</p><p>For Android, the process is quite straightforward. You can add the maven-publish dependency to the app-level <em>build.gradle</em> file, which gives you access to various <em>Gradle</em> tasks. There are different tasks for different publishing strategies, but for this experiment, I used local publishing. Once published, the library is easily accessible via the path to its published location.</p><p>iOS, as usual, was a bit trickier than Android. For iOS, you have the choice between using <em>Cocoapods</em> or <em>XCFramework</em> to build the library. After building, you can add the library by navigating to the <em>Frameworks &amp; Libraries</em> section of the <em>Target</em>. There, you use ‘<em>Add Package Dependency</em>’ found under the ‘<em>Add Others</em>’ section when you click the “<strong><em>+”</em></strong> icon. Next, you have to select the built framework (either <em>Cocoapods</em> or <em>XCFramework</em>) by locating it in the build folder of your library.</p><h4>2.7 Access to Native Side</h4><p>While putting together a reusable ‘<em>Measurers</em>’ library for my projects, my initial plan was pretty straightforward: rely heavily on native-side code and create simple functions in the common area to handle platform-specific methods. On Android, this approach worked like a charm. But when it came to integrating Swift files for these functionalities, I hit a bit of a rough patch, given my little or less experience with iOS.</p><p>I discovered a library that could navigate Swift files and generate the needed Objective-C headers, which sounded perfect at first. However, I ran into a roadblock with some inconsistencies between KMP versions. Addressing these issues across the entirety of 15 apps and 2 libraries I was developing would have been too frustrating for the scope of this experiment. So, I decided to put off with that idea and resorted to the more time-tested, good ol’ method of copying and pasting code across projects for the tests.</p><p>For those interested, the specific files aren’t in the current projects anymore, but you’re welcome to check out the “<em>measurers</em>” folder in the repository for a closer look.</p><h3>Conclusion</h3><p>First off, I want to express my sincere appreciation to you, the reader, for accompanying me on this journey through this series of articles. Your engagement and interest have been invaluable.</p><p>This entire experiment took over two months, sparked by the simple yet intriguing question: “Is CMP good?”. Along this path, I faced various challenges, acquired new insights, and gradually developed an appreciation for the convenience and capabilities of KMP and CMP. On the Android side, the experience was quite positive, with the tools proving to be robust and practical. However, the iOS side still has some growing pains, needing more fine-tuning and possibly innovative solutions, particularly regarding its reliance on <em>UIViewControllers</em>. CMP on iOS, being in its Alpha phase, has room for growth, and I’m optimistic about its progress. The results, interestingly, suggest that fully embracing CMP for iOS development might be a <strong>worthwhile</strong> venture, and I encourage you to experiment with it.</p><p>While this series might be concluding, my exploration with these technologies is ongoing. I intend to continue updating the versions and revisiting the tests to observe any future developments. If you’re interested in following these updates, I recommend clicking that “Follow” button. Let’s continue this journey together, exploring the dynamic world of KMP and CMP with a blend of enthusiasm and critical analysis.</p><p>Finally, feel free to share and utilize any part of this article series and project, as long as proper credits are attributed. I value your feedback and welcome any questions you may have. You can reach out to me at:</p><ul><li><strong>My LinkedIn:</strong> <a href="https://www.linkedin.com/in/ali-taha-dincer/">Ali Taha Dinçer</a></li><li><strong>My E-Mail: </strong>alitahasubfly@gmail.com</li></ul><p><strong>Keep learning, continue improving!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d25a82f1c403" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-3-outcomes-acknowledgements-d25a82f1c403">Mastering the Mobile Dev Maze: UIKit vs. SwiftUI vs. XML vs. Compose — Part 3</a> was originally published in <a href="https://medium.com/commencis">Commencis</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I made the same app 15 times, here are the results Part 2— Experiments & Results]]></title>
            <link>https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-2-experiments-results-27aeb93cb42b?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/27aeb93cb42b</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[build]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 20:57:35 GMT</pubDate>
            <atom:updated>2024-02-23T11:46:49.451Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering the Mobile Dev Maze: UIKit vs. SwiftUI vs. XML vs. Compose — Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M09AWSkY5BX-bAnDAWrOkQ.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Frepository-images.githubusercontent.com%2F293498508%2F1624a845-8807-4b9b-895a-fdbc9ce70678&amp;tbnid=T6q6UJ4BBVlvoM&amp;vet=12ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ..i&amp;imgrefurl=https%3A%2F%2Fgithub.com%2FJetBrains%2Fcompose-multiplatform&amp;docid=lBl5wrllua_sEM&amp;w=1280&amp;h=720&amp;q=Compose%20Multiplatform&amp;ved=2ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ">Compose Multiplatform Header (Gathered From Official CMP Github Page</a>)</figcaption></figure><h3>The Previous Part</h3><p>Welcome, dear reader! If you’re joining us again after exploring the initial segment of this series, a hearty welcome back. This installment is where things get really exciting. I’ll be delving into the nitty-gritty of various experiments and their outcomes, all centered around the 15 applications I’ve developed using KMP &amp; CMP. There’s a mix of professional insights and candid commentary waiting for you. For those who might have missed the first part, fear not; you can catch up using the link provided below.</p><p><a href="https://medium.com/@alitahasubfly/i-made-the-same-app-15-times-here-are-the-results-part-1-introduction-methodology-ae9fcc1485e4">I made the same app 15 times, here are the results Part 1 — Introduction &amp; Methodology</a></p><p>Also, throughout reading the series, you can follow up the repo below, where I published all the apps along with libraries and resources:</p><p><a href="https://github.com/Subfly/the_compose_experiment">GitHub - Subfly/the_compose_experiment: A repository that holds a continuous experimentation with Compose Multiplatform until it reaches stable</a></p><p>Now, let’s dive right in!</p><p>In the Methodology section of the preceding article, I mentioned our dual testing approach: automation via Maestro and the more user-centric method of fast scrolling. These were applied to Android apps, while for iOS, due to specific reasons explained earlier, we stuck with just the fast scroll test. We conducted tests on physical devices, namely a Galaxy S22 for Android apps and an iPhone 15 Pro Max Emulator for iOS. Remember, all these apps were tested in their release mode. Each test is clearly labeled in the detailed charts I’ve prepared for you. In the Android test names, you’ll find tags like “automated” (indicating Maestro tests) and “user scroll” for the manual method.</p><p>Before we jump into the results, a quick note on the SwiftUI implementations: they all use LazyVStack within a ScrollView. Despite hearing that ListView might be more efficient, albeit more restrictive, this was our chosen setup, something to keep in mind while reviewing the SwiftUI results.</p><p>One last technical detail: the FPS and Memory Usage tests were conducted separately. First, I ran the FPS test, then deleted the app, tweaked the code to switch from FPS to Memory Usage measurement, reinstalled the app, and finally conducted the Memory Usage test. A little heads-up for you to consider as you peruse the findings.</p><p>Alright, that’s enough preamble. Let’s start with the libraries☺️</p><h3>Part 1: Libraries</h3><h4>Part 1.1: KMPKtorCoinbase</h4><p>As already mentioned in the previous part of this article series, this library holds the business logic of all the KMP apps I have implemented. For this part, I only give you the size of the library, in order to make explaining the incoming parts easier for you. I have calculated the size of the library directly looking at the sizes of files built by running Gradle tasks of <em>maven:publishToLocal</em> and <em>podPublishXCFramework</em> (yes, that library uses Cocoapods, I maybe wrote a seperate article about that).</p><ul><li><strong>KMPKtorCoinbaseSharedAndroidReleaseSourcesJar:</strong> 20.9 KB</li><li><strong>KMPKtorCoinbaseSharedKotlinReleaseSourcesJar: </strong>21.74 KB</li><li><strong>KMPKtorCoinbaseFramework(Cocoa-Device):</strong> 11.9 MB</li><li><strong>KMPKtorCoinbaseFramework(Cocoa-Simulator):</strong> 23.25 MB</li></ul><h4>Part 1.2: CmpCoinbase</h4><p>Same as the above part, but that library utilizes XCFramework and built by using <em>assembleXCFramework</em> Gradle task. Additionally, again, I have to mention that this library has all the code in<em> KMPKtorCoinbase</em> library, and I will give further information in <strong>Acknowledgements</strong> part of that article.</p><ul><li><strong>CMPCoinbaseSharedAndroidReleaseSourcesJar:</strong> 30.98 KB</li><li><strong>CMPCoinbaseSharedKotlinReleaseSourcesJar:</strong> 34.39 KB</li><li><strong>CMPCoinbaseFramework(XCF-Device):</strong> 139.37 MB</li><li><strong>CMPCoinbaseFramework(XCF-Simulator):</strong> 228.63 MB</li></ul><p>Before we dive into the upcoming sections, it’s important to clarify something about the sizes of the libraries we’ve discussed. While the figures do provide some insight, they don’t tell the whole story, as you’ll notice from the app sizes mentioned before the charts in each part of this series. My observation is that the build tools play a significant role in this context. They’re not just compiling code; they’re actively pruning unused resources and optimizing the code during the build process.</p><p>However, from the details shared earlier, it’s clear that incorporating KMP and CMP into your app is likely to bump up its size. This increase can be attributed to the nature of Compose due to code generation and the generated Objective-C headers. So, as we move forward, keep this in mind — it’s a crucial piece of the puzzle in understanding the overall impact of these libraries on app sizes.</p><h3>Part 2: Android</h3><h4>Part 2.1: BaseAndroidXMLKtor</h4><p>This app is implemented without any KMP or CMP dependency and utilizes XML for UI. The networking in the app utilizes Ktor. The app size is 17.44 MB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g2Vp8NPsMKBGgMB4aOLz3w.png" /><figcaption>Maestro FPS Results of BaseAndroidXMLKtor</figcaption></figure><p>At first glance, you might be wondering, <em>“What the heck is that?”. </em>How can XML be so non-performant? And why are there FPS drops? The simple answer lies in the performance of Maestro on scrolls. It’s so slow that the Choreographer enters to the standby mode, stabilizing itself at 20 FPS. This adjustment is made to reduce GPU usage and preserve battery life. However, this isn’t immediately obvious from the graph, is it? Let’s take a closer look at the results of the user scroll test:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3WSa3X9ZJTWUd6IyWlSz0Q.png" /><figcaption>User Scroll FPS Results of BaseAndroidXMLKtor</figcaption></figure><p>Voilà! A perfect 120 FPS, matching the Galaxy S22’s 120 Hz screen. Now, observe how the Choreographer activates standby mode after 30 seconds without scrolls. The initial drop visible at the 3rd second occurs because the data loads at the 2nd second, and I began scrolling at the 4th second. Thus, this graph represents excellent performance in terms of FPS. You can compare it with the first graph above, noting the points where it hits 120 FPS during the scroll in Maestro.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jcx4t_1vuEGC7z5EauTN4A.png" /><figcaption>Maestro Memory Usage Results of BaseAndroidXMLKtor</figcaption></figure><p>Since this is a Maestro test graph, it is unreliable in my opinion to say something. At least, GC points are pretty visible and memory usage averages at 200 MB’s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cACX4CUUdkqe4XiThHEK1A.png" /><figcaption>User Scroll Memory Usage Results of BaseAndroidXMLKtor</figcaption></figure><p>Compared to Maestro results, user scroll test spikes much faster and GC entry points are pretty visible. The test ended in almost 23 seconds (I was like Sonic at that moment probably). From what I understand, the increase and stabilization between 250–300 MB’s of memory usage is due to pooling of RecyclerView. But needs more investigation to prove it. Also, I can not explain that huge spike in 3rd second, but guessing that it is the time when data is loaded and mapped to UI Models, after that probably GC worked and collected the DTO’s, as it reduced the memory usage half the size.</p><h4>Part 2.2: BaseAndroidComposeKtor</h4><p>This app is implemented without any KMP or CMP dependency and utilizes Jetpack Compose for UI. The networking in the app utilizes Ktor. The app size is 23.62 MB, due to generated code during building Composables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gba9ikbCHHU_HWlV71Hg8w.png" /><figcaption>Maestro FPS Results of BaseAndroidComposeKtor</figcaption></figure><p>We observe a graph quite similar to the XML one. However, there are noticeable direct increases and decreases — let’s call them oscillations — between seconds. At first glance, it may be hard to understand, but it’s important to first comprehend how LazyColumn works in Compose. Similar to RecyclerView in XML, LazyColumn attempts to recycle its items, but with a different mechanism. Imagine you have x number of items visible on your screen, with the first visible item being the y-th element. LazyColumn in Compose keeps both the y-1-th and the x+1-th elements in reserve. This means that both the previous and next items are available during scrolling, leading to a smoother experience for the user.</p><p>In the case of Maestro, where scrolling is considerably slow, the x+1-th element attempts to load itself, resulting in good FPS. In the following second, the Choreographer tries to stabilize at lower FPS rates. However, the now-visible x+1-th element prompts the rendering of the x+2-th element, elevating the FPS once more. Since it involves just one element, it renders quickly and then returns to standby mode, resulting in the oscillating pattern observed in the graph. This is particularly evident between the 9th and 12th seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9uLh8EIQTezByhBUYNl3g.png" /><figcaption>User Scroll FPS Results of BaseAndroidComposeKtor</figcaption></figure><p>Voila! Again! A much better and easier chart to understand. However, one can see the small oscillations on the graph during scroll test. Unfortunately, this is the curse of Compose due to it’s calculations before rendering. Even though, we still have a good performance between 110–120 FPS throughout the test, but slightly worse then XML 🙁</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-HILRZcNMTGr93-aufHaFw.png" /><figcaption>Maestro Memory Usage Results of BaseAndroidComposeKtor</figcaption></figure><p>Above chart is not that much informative without looking at the chart of user scroll results in my opinion. At least, one can see the GC entry points. Let’s directly jump to user scroll test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--NV78mwSDjBCSqmB7lc-w.png" /><figcaption>User Scroll Memory Usage Results of BaseAndroidComposeKtor</figcaption></figure><p>Compared to the Maestro chart, this one offers much more information. We see a wider version of the Maestro chart above, where the garbage collection (GC) entry points are more visible. This is due to the fast scrolling of Composables, along with the loading of data and the cleaning of unused DTOs at the 4th second. It’s apparent that the memory stabilizes at almost 240 MB.</p><h4>Part 2.3: KMPAndroidXMLKtor</h4><p>This app is implemented with KMP dependency in order to get the business logic needed and utilizes XML for UI. The networking in the app utilizes Ktor. The app size is 17.42 MB, which is 200 KB’s less than the <em>Base</em> version, because of the removal of <em>Android’s Lifecycle ViewModel</em>. <em>“KMPKtorCoinbase”</em> has it’s own handling mechanism of lifecycle, which requires a manual cleanup after the<em> Activity</em> for Android or <em>UIViewController </em>of the iOS is finished.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdziiiynktOWRtXJLrOcZA.png" /><figcaption>Maestro FPS Results of KMPAndroidXMLKtor</figcaption></figure><p>Compared to the <em>Base</em> version, we see a pretty similar chart above for Maestro test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f6VDFJtTigv49_ApBiibhA.png" /><figcaption>User Scroll FPS Results of KMPAndroidXMLKtor</figcaption></figure><p>Perfection, same as <em>Base</em> version. But I have to mention that I have started testing on 9th second, the coffee was good and I was sipping it, sorry ☺️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQ8VMU8nnqr_-dY5YwdciA.png" /><figcaption>Maestro Memory Usage Results of KMPAndroidXMLKtor</figcaption></figure><p>Compared to the <em>Base</em> version, memory usage is much more stable in KMP app, but there is no differences between business logic parts that affects that type of difference. Additionally, one can see that app stabilizes between 150–175 MB’s of memory usage, which is better than the <em>Base</em> version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7rI4QZx3H8RaBDjVvsHHQ.png" /><figcaption>User Scroll Memory Usage Results of KMPAndroidXMLKtor</figcaption></figure><p>This version is very similar to the <em>Base</em> version, but with a slight improvement — there’s a reduction of about 50 MB in memory usage. Interestingly, there are no significant differences in the business logic, except for the removal of <em>Android’s Lifecycle ViewModel</em>. Yet, the KMP versions of the Android apps performed better.</p><p>Additionally, it’s worth noting that the use of <em>Kotlin flow</em> in the <em>“KMPKtorCoinbase”</em> library is different. However, the logic applied to make <em>Kotlin flow</em> multi-platform is essentially just a wrapper around the typical <em>StateFlow</em> and <em>MutableStateFlow</em>. This shouldn’t have any significant effect, especially on memory usage on the Android side.</p><p>Anyway, let’s move on to the next app and see how they compare.</p><h4>Part 2.4: KMPAndroidComposeKtor</h4><p>This app is implemented with KMP dependency in order to get the business logic needed and utilizes Jetpack Compose for UI. The networking in the app utilizes Ktor. The app size is 23.6 MB, due to removal of <em>Android’s Lifecycle ViewModel</em>, but pretty close to the <em>Base</em> version. Even though it is not enough information to conclude that, we can say that output of generated Composables are pretty same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cvI0DIBlj0i25syNROsBQ.png" /><figcaption>Maestro FPS Results of KMPAndroidComposeKtor</figcaption></figure><p>Yes, results are pretty similar to <em>Base</em> version, but slightly differs, and in fact a bit less performant. But this can be due to the Maestro. Let’s see user scroll test to understand the issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sR6p7iK-VDJU0s4ArN4VoQ.png" /><figcaption>User Scroll FPS Results of KMPAndroidComposeKtor</figcaption></figure><p>Yep, as I said, the result is pretty similar to <em>Base</em> version. The oscillations are expected because of the Jetpack Compose’s nature. I believe that the issue relies on Maestro, anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QqCJLpDc73Z6FEnam_o5Q.png" /><figcaption>Maestro Memory Usage Results of KMPAndroidComposeKtor</figcaption></figure><p>Like XML version of the KMP app, memory is much stable, but as I said, I changed nothing in the code except the removal of <em>Android’s Lifecycle ViewModel</em>. However, this requires a further investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzbstR8b1r7chFOZUnwyng.png" /><figcaption>User Scroll Memory Usage Results of KMPAndroidComposeKtor</figcaption></figure><p>Still the same, but closer to the <em>Base</em> version. Memory stabilizes at 250 MB. Oscillations constantly occur due to GC.</p><h4>Part 2.5: KMPAndroidCMPKtor</h4><p>This app is implemented with CMP dependency in order to get the business logic needed and utilizes Compose Multiplatform for UI. The networking in the app utilizes Ktor. The app size is 25.36 MB, which is almost 1.5 MB’s more than the <em>“BaseAndroidComposeKtor”</em>. The reason is, not only the library introduces smaller composables in order to be both used in Android and iOS side easily, but also has same sources twice, one in XML and one in directly Kotlin code as an <em>ImageVector</em>. I will give further information about that in the <strong>Acknowledgements</strong> section of this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVix1S4ZmIB4l5ty6_U8IA.png" /><figcaption>Maestro FPS Results of KMPAndroidCMPKtor</figcaption></figure><p>Pretty similar to the previous automated Maestro tests, however, I have to admit that I have started testing in the 10th second. On the other hand, charts are pretty same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSDYiaN7cMG_RsVEFCn-dg.png" /><figcaption>User Scroll FPS Results of KMPAndroidCMPKtor</figcaption></figure><p>Well, a pretty standard chart for the Compose, like the previous ones. Oscillations are still visible due to Compose’s nature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-1ftsL4Lvkyg9g-5YFQ7g.png" /><figcaption>Maestro Memory Usage Results of KMPAndroidCMPKtor</figcaption></figure><p>Again, a typical automated Maestro memory usage chart. Memory is still stable at 150–175 MB’s like the previous ones. Let’s jump to the user scroll test and finalize the outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*37xzql59OAl-ntscTCWlRw.png" /><figcaption>User Scroll Memory Usage Results of KMPAndroidCMPKtor</figcaption></figure><p>Finally, we arrive at a graph that closely resembles the memory usage results from the previous user scroll test, at least for the Compose implementations. In my opinion, this provides sufficient information to conclude that, most of the time, whether it’s KMP, CMP, or fully native, the results for Android are quite similar.</p><h3>Part 3: iOS</h3><h4>Part 3.1: BaseiOSUIKit</h4><p>This app is implemented without any KMP or CMP dependency and utilizes UIKit for UI. The networking in the app utilizes <em>URLSession</em>. The app size is <strong>631 KB</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2feZcZnGDEke55Tj8g8w9Q.png" /><figcaption>User Scroll FPS Results of BaseiOSUIKit</figcaption></figure><p>Simply perfect. Nothing much to say, good ol’ UIKit is a performance monster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jj_a_l9ej5wM2LObhHoHHg.png" /><figcaption>User Scroll Memory Usage Results of BaseiOSUIKit</figcaption></figure><p>With the powerful recycling mechanism of <em>TableView,</em> we have a very stable and minimal usage of memory, around 40–50 MB’s.</p><h4>Part 3.2: BaseiOSSwiftUI</h4><p>This app is implemented without any KMP or CMP dependency and utilizes SwiftUI for UI. The networking in the app utilizes <em>URLSession</em>. The app size is <strong>950 KB</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4BqxjBpY4CaKgafm-Iw-Q.png" /><figcaption>User Scroll FPS Results of BaseiOSSwiftUI</figcaption></figure><p>As already mentioned in the article, I have used <em>LazyVStack</em> inside of a <em>ScrollView</em> for all SwiftUI implementations. This chart would be much better if I used a <em>ListView</em>. However, as you can see, after almost a few hundreds of elements scrolled, performance of the SwiftUI decreases with that type of implementation, and when there is nothing to draw (since there are no scrolls), the view stabilizes itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2Oo5WdlXz5fmNvveXi_QA.png" /><figcaption>User Scroll Memory Usage Results of BaseiOSSwiftUI</figcaption></figure><p>After seeing that chart, one can simply understand that, each item in the <em>LazyVStack</em> that inside of a <em>ScrollView</em> is preserved in the memory, and this is the reason of the FPS drop in the previous chart.</p><h4>Part 3.3: KMPiOSUIKit</h4><p>This app is implemented with KMP dependency in order to get the business logic needed and utilizes UIKit for UI. The networking in the app utilizes Ktor. The app size is <strong>7.2 MB</strong>, which means adding KMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>11 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vKI5O4IRDFNCa_XK3BX3w.png" /><figcaption>User Scroll FPS Results of KMPiOSUIKit</figcaption></figure><p>Compared to the <em>Base</em> version, there’s a noticeable drop in FPS performance, despite this being a UIKit implementation. Initially, I thought the data might not be loading quickly enough from the KMP side to the UI. However, my approach involved loading the entire coin dataset from the <em>Coinpaprika</em> endpoint and transferring it to the UI via a <em>Kotlin flow</em>. Since all the data is available during the UI’s drawing phase, the issue likely lies elsewhere. Finally, my hypothesis is that Kotlin’s <em>Data Classes </em>may not be as performant as Swift’s<em> Structs</em>, but this <strong>requires further investigation</strong> to be concluded. Perhaps that’s a topic for another article, eh?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lj0a758xrft_WqPKo3vTdw.png" /><figcaption>User Scroll Memory Usage Results of KMPiOSUIKit</figcaption></figure><p>Comparing the memory usage chart with FPS chart, it is still very hard to understand the exact reason of the FPS drops, since there are no patterns that actually give any information. The only thing that we can infer from that memory usage chart is, there is a huge probability that KMP’s Kotlin/Native GC is trying to collect unused DTO’s in around 10th second and doing another collection in around 20th second. After that, considering the UI Model’s are still kept in KMP side, in memory wise, performance is similar to the <em>Base</em> version, even though it stabilizes between 110–120 MB’s. This can be said, as I already mentioned, UI Model’s are kept in KMP side, which increases the memory usage from 40–50 MB’s in <em>Base</em> version, but it is pretty stable because of the <em>TableView’s</em> recycling mechanism.</p><h4>Part 3.4: KMPiOSSwiftUI</h4><p>This app is implemented with KMP dependency in order to get the business logic needed and utilizes SwiftUI for UI. The networking in the app utilizes Ktor. The app size is <strong>7.2 MB</strong>, which means adding KMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>7 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQB3iEnURluRHqZQz873DA.png" /><figcaption>User Scroll FPS Results of KMPiOSSwiftUI</figcaption></figure><p>The graph is pretty similar to the <em>Base</em> version, and the same issue of using <em>LazyVStack</em> inside of a <em>ScrollView</em> can be seen easily. Nothing much to say, but since it is pretty similar to <em>Base</em> version, one can infer that SwiftUI did a better job with KMP compared to the UIKit version, however, since the performance issue of SwiftUI is available due to implementation reasons, it will be wrong to say that and <strong>requires investigation</strong> by changing the UI implementation using <em>ListView</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4mdT0nbpw1GCJu1tslgqGg.png" /><figcaption>User Scroll Memory Usage Results of KMPiOSSwiftUI</figcaption></figure><p>Compared to the <em>Base</em> version, one can see that the chart is much more stable, however this can be pretty fallacious. Comparing the first seconds of this chart and the <em>“KMPiOSUIKit”</em> version, we can see that the starting values of memory usages are pretty close, and throughout the test, memory usage increases to up to 350 MB’s, which is pretty close to the <em>Base</em> version of SwiftUI. Considering the memory usages in the GC entry points, it can be said that Apple’s GC and Kotlin/Native GC worked well together to balance the SwiftUI’s over-use of memory, even the implementation was not the best. However, this <strong>requires a further investigation</strong>.</p><h4>Part 3.5: KMPiOSCMPUIKit</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, whole list is rendered using CMP and navigation is handled via <em>navigation controller</em>. The networking in the app utilizes Ktor. The app size is <strong>29.4 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>46 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0w1QfI1UKBTulhBep0h9zg.png" /><figcaption>User Scroll FPS Results of KMPiOSCMPUIKit</figcaption></figure><p>The chart above is quite revealing, clearly indicating that the app experiences occasional freezes during fast scrolling through the list. On the flip side, there are minor oscillations in terms of FPS performance, which can be attributed to the pre-calculations that Compose performs before drawing. This is quite similar to what we observed in <em>“BaseAndroidComposeKtor”</em>. Disregarding the freezes, the performance is relatively stable, hovering around 55–60 FPS. However, these freezing issues are a significant drawback for the app’s overall performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CdqM48Om74Sf0kXkB6rpZQ.png" /><figcaption>User Scroll Memory Usage Results of KMPiOSCMPUIKit</figcaption></figure><p>Compared to the <em>Base</em> version, we see a much worse chart. Usage of memory is drastically increased, and final stabilization occur on 375–400 MB’s. On the other hand, Kotlin/Native GC entry points are directly visible, where reduces the memory usage by almost 200 MB’s each time.</p><h4>Part 3.6: KMPiOSCMPSwiftUI</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, whole list is rendered using CMP and navigation is handled via <em>NavigationStack</em> and <em>NavigationLink</em>. The networking in the app utilizes Ktor. The app size is <strong>29.4 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>30 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQzeAGZSXXGs1ZQek4hPKg.png" /><figcaption>User Scroll FPS Results of KMPiOSCMPSwiftUI</figcaption></figure><p>Compared to the previous UIKit version (<em>KMPiOSCMPUIKit</em>), we can still see immediate drops in the FPS, which is the result of the same issue that the UIKit version had. However, it can be seen that SwiftUI handled the FPS drops due to freezes much better than the UIKit version. I can say that, during testing, the freezes took less time compared to the UIKit version. Like the UIKit version, small oscillations on the FPS can be visible, which is due to aforementioned issues, similar to the <em>“BaseAndroidComposeKtor”</em> version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6LNnRC2mUClmhPF9omgyGA.png" /><figcaption>User Scroll Memory Usage Results of KMPiOSCMPSwiftUI</figcaption></figure><p>Pretty similar to the UIKit version above. Entry points are clearly visible, and both the Apple’s GC and Kotlin/Native’s GC (mostly Kotlin/Native GC) tried their best to stabilize the memory usage, which is around 300 MB’s. However, this is still worse than the<em> “BaseiOSUIKit”</em> version.</p><h4>Part 3.7: KMPiOSCMPUIKitListItem</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, all list elements are rendered using CMP inside of a <em>TableView</em> and navigation is handled via <em>navigation controller</em>. The networking in the app utilizes Ktor. The app size is <strong>29.3 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>46 times</strong>). Even though the TableView code is preserved during building the app, I can not explain why there is a 100KB decrease. This requires further investigation.</p><p>Up to this point, you’ve seen fancy charts following the introductory paragraph in each <strong>3.*</strong> subsection of this article. However, this part doesn’t include any charts, and let me explain why.</p><p>During the testing of this app, it consistently crashed after the first 7 to 10 scrolls. At first glance, one might think it’s probably an Out of Memory (OOM) issue. However, the actual problem turned out to be quite different. XCode didn’t always provide a clear cause for the crash. But when I managed to capture it at a critical moment, instead of just a bunch of memory locations, it mentioned something like an <em>IllegalStateException</em> and <em>Metal</em>. Notably, when the crash occurred, I could clearly see empty black spaces on the screen where the CoinTile should have been. This led me to realize that loading CoinTile Composables was a challenging process for the system.</p><p>If you open the directory <em>composeBase/src/iosMain/kotlin/dev/subfly/cmpcoinbase/view/</em> in the “<em>CmpCoinbase</em>” library, and look at any file, you’ll see that any composable that can be called on the iOS side has been wrapped with <em>ComposeUIViewController</em>. This means that every composable has a lifecycle tied to a custom <em>UIViewController</em>. Essentially, every <em>CoinTile</em> used in my <em>TableView</em> as a <em>TableViewCell</em> is basically a <em>UIViewController</em>. For the Android developers reading this article, it means to having every <em>CoinTile</em> in a <em>RecyclerView</em> being an <em>Activity</em>. With this insight, I believe that the CMP side is not quick enough to initialize these <em>UIViewControllers</em> within a frame. As a result, iOS skips this frame (possibly several of them), and the Kotlin/Native GC clears the pointers to these undrawn views, which <em>Metal</em> can’t access and draw. However, this hypothesis <strong>requires further investigation </strong>and might be a significant issue for CMP. Hence, instead of charts, you’re getting this lengthy explanation ☺️.</p><h4>Part 3.8: KMPiOSCMPSwiftUIListItem</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, all list elements are rendered using CMP inside of a <em>LazyVStack </em>inside of a<em> ScrollView </em>and navigation is handled via <em>NavigationStack</em> and <em>NavigationLink</em>. The networking in the app utilizes Ktor. The app size is <strong>29.4 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>46 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtKpt4fbY4ZDG7IYhLs8jQ.png" /><figcaption>User Scroll FPS Results of KMPiOSCMPSwiftUIListItem</figcaption></figure><p>Unlike the UIKit version mentioned earlier (<em>KMPiOSCMPUIKitListItem</em>), I was actually able to run and test this app. However, as you can see from the chart, the app was quite laggy and experienced periodic freezing. Compared to the <em>Base</em> version, it was somewhat less laggy towards the end of the test. Still, the persistent lag and freezes made the app practically unusable. Considering the same explanation for the previous app also applies here, it appears that SwiftUI handled the <em>UIViewController</em> tiles better than UIKit. This observation also suggests that rendering a large number of <em>UIViewControllers</em> from the CMP side to the iOS side is a challenging task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-W4k-PJJGx67Ue4DG3UYEQ.png" /><figcaption>User Scroll Memory Usage Results of KMPiOSCMPSwiftUIListItem</figcaption></figure><p>At first sight it seems like a pretty stable chart. The only drastic clean-up happens in 5th second and other GC points are not that much powerful, although each <em>ComposeUIViewController</em> added to the stack, and the implementation includes <em>LazyVStack</em> inside of a <em>ScrollView</em>. However, the stability of the chart <strong>requires further investigation</strong> due to the aforementioned reasons.</p><h4>Part 3.9: CMPUIKit</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, both screens are rendered using CMP and navigation is handled via <em>navigation controller</em>. The networking in the app utilizes Ktor. The app size is <strong>29.4 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>46 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oz9T8hvUGkcA8xxuv76sFw.png" /><figcaption>User Scroll FPS Results of CMPUIKit</figcaption></figure><p>Similar to the <em>“KMPiOSCMPUIKit” </em>version, we see some drastic drops in FPS, which is the results of freezes during scroll. However, a full screen CMP implementation did a better job compared to using CMP part by part, as freezes took less time to melt down, and user experience were not that bad. In fact, the app was pretty usable. Still, one can see that there are oscillations during fast scroll, which means the same issue still exists, which is the pre-calculations that done before drawing any composable, which is the fate of Compose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nk-mSU1LFibvcxTh5fFYUA.png" /><figcaption>User Scroll Memory Usage Results of CMPUIKit</figcaption></figure><p>Chart is pretty similar to <em>“KMPiOSCMPUIKit” </em>version<em>. </em>GC entry points are pretty visible. Most of the time, only the Kotlin/Native’s GC worked, and tried to stabilize between 275–300 MB’s, which is close to the most Android versions. Even though it seems a good thing, compared to the “<em>BaseiOSUIKit”</em> version, the performance is pretty worse.</p><h4>Part 3.10: CMPSwiftUI</h4><p>This app is implemented with CMP dependency in order to both get the business logic needed and Compose Multiplatform for UI. In this case, both screens are rendered using CMP and navigation is handled via <em>NavigationStack</em> and <em>NavigationLink</em>. The networking in the app utilizes Ktor. The app size is <strong>29.4 MB</strong>, which means adding CMP dependency to the iOS app immensely increased the <em>ipa</em> size (at least <strong>46 times</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0jQOsITnkKZP_yTfoQulpw.png" /><figcaption>User Scroll FPS Results of CMPSwiftUI</figcaption></figure><p>Compared to previous UIKit version above (<em>CMPUIKit</em>), performance is pretty same in terms of FPS, excluding what happened in 28th second. I remember that, during testing, app froze for 2 seconds and was unusable in that time interval. Other than that, performance was pretty good and app was usable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVRDwb_IVPjwzqWFrkknoA.png" /><figcaption>User Scroll Memory Usage Results of CMPSwiftUI</figcaption></figure><p>The chart here is almost identical to the previous UIKit version, leading to similar conclusions. Additionally, we can infer that CMP’s performance is consistent regardless of the base used (UIKit or SwiftUI), particularly in terms of memory usage. This is an expected outcome, as the primary difference is in the navigation part, while both screens and the entire business logic are rendered directly in Compose Multiplatform.</p><h3>The Next Part</h3><p>When I initially embarked on writing this article, my intention was to compile everything into a single page. However, as the content grew, I found myself with over 9000 words, equivalent to nearly 35 minutes of reading time on Medium. In the interest of simplicity and to enhance readability, I’ve opted to split this article into three parts. The next installment will delve into comparison between the predictions in the previous part with the outcomes on this part, acknowledgements gathered throughout this experiment and finalizing with a conclusion part. You can explore these details in the upcoming section below:</p><p><a href="https://medium.com/@alitahasubfly/i-made-the-same-app-15-times-here-are-the-results-part-3-outcomes-acknowledgements-d25a82f1c403">I made the same app 15 times, here are the results Part 3— Outcomes &amp; Acknowledgements</a></p><p>I want to extend my gratitude to you for accompanying me on this journey. Feel free to share and utilize any part of this article series and project, as long as proper credits are attributed. I value your feedback and welcome any questions you may have. You can reach out to me at:</p><ul><li><strong>My LinkedIn:</strong> <a href="https://www.linkedin.com/in/ali-taha-dincer/">Ali Taha Dinçer</a></li><li><strong>My E-Mail: </strong>alitahasubfly@gmail.com</li></ul><p><strong>Keep learning, continue improving!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27aeb93cb42b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-2-experiments-results-27aeb93cb42b">I made the same app 15 times, here are the results Part 2— Experiments &amp; Results</a> was originally published in <a href="https://medium.com/commencis">Commencis</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I made the same app 15 times, here are the results Part 1 — Introduction & Methodology]]></title>
            <link>https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-1-introduction-methodology-ae9fcc1485e4?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9fcc1485e4</guid>
            <category><![CDATA[build]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 20:57:24 GMT</pubDate>
            <atom:updated>2024-03-04T10:13:38.029Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering the Mobile Dev Maze: UIKit vs. SwiftUI vs. XML vs. Compose -Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M09AWSkY5BX-bAnDAWrOkQ.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Frepository-images.githubusercontent.com%2F293498508%2F1624a845-8807-4b9b-895a-fdbc9ce70678&amp;tbnid=T6q6UJ4BBVlvoM&amp;vet=12ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ..i&amp;imgrefurl=https%3A%2F%2Fgithub.com%2FJetBrains%2Fcompose-multiplatform&amp;docid=lBl5wrllua_sEM&amp;w=1280&amp;h=720&amp;q=Compose%20Multiplatform&amp;ved=2ahUKEwj_pOeugu-DAxWMgv0HHXsHAOsQMygBegQIARBQ">Compose Multiplatform Header (Gathered From Official CMP Github Page</a>)</figcaption></figure><blockquote><strong>TLDR: </strong><em>I have implemented the same coin app 15 times using UIKit, SwiftUI, XML, Compose and Compose Multiplatform by changing various settings and comparing the FPS, memory usage and app sizes. Results show that you should either go full CMP (Compose Multiplatform) on your iOS app screen, or leave it entirely, as of January, 2024. For Android, it basically does not matter.</em></blockquote><p>After spending many of those years tinkering with Flutter development, I found myself pretty excited about Kotlin Multiplatform (KMP) when I first came across it. The idea of using the same code across different platforms and still getting that native feel was a game-changer. I hopped on the KMP train early in 2023 and have been exploring every bit of it since. I’ve developed 2 apps and played around with some of the big libraries like <a href="https://www.apollographql.com/docs/kotlin/">Apollo GraphQL</a>, <a href="https://ktor.io/docs/welcome.html">Ktor</a>, <a href="https://cashapp.github.io/sqldelight/2.0.1/">SQLDelight</a>, <a href="https://www.mongodb.com/docs/atlas/app-services/get-started/">Realm</a>, <a href="https://insert-koin.io/docs/reference/koin-mp/kmp">Koin</a>, and <a href="https://github.com/rickclephas/KMM-ViewModel">KMM-ViewModel</a>. Having a couple of years of Android experience made diving into these libraries a breeze, and knowing my way around Kotlin was a big help. By the time KMP <a href="https://youtrack.jetbrains.com/issue/KT-55513/Promote-Kotlin-Multiplatform-to-Stable#:~:text=December%202023,Kotlin%2FNative%20also%20became%20Stable.">hit its stable release in December 2023</a>, it felt like the perfect moment to get really serious about it.</p><p>JetBrains had this pitch for KMP: it’s flexible for developers. You can go all-in and share your entire business logic, or you can take it slow and integrate KMP parts into your existing business logic bit by bit. That’s just my take on what they said in <a href="https://www.youtube.com/live/c4f4SCEYA5Q?si=NzJKv4QaD-Ft7FrN&amp;t=2966">their video</a>. But JetBrains didn’t just stop with KMP; they had bigger plans. They wanted to challenge the likes of Flutter and React Native with something even better, more efficient, and more developer-friendly for the multi-platform scene. They were aiming to share not just the logic but the UI as well. And so, <a href="https://blog.jetbrains.com/kotlin/2021/08/compose-multiplatform-goes-alpha/">in August 2021, they rolled out Compose Multiplatform (CMP) in alpha</a>, letting you share your UI code on the web, desktop, and Android. But what about iOS and the whole Apple ecosystem? Hold on… <a href="https://blog.jetbrains.com/kotlin/2023/05/compose-multiplatform-for-ios-is-in-alpha/#:~:text=JetBrains%20released%20Compose%20Multiplatform%20for,for%20UI%20development%20on%20Android.">as of May 2023, CMP for iOS hit alpha too</a>. That was a huge step in shaking up the multi-platform world.</p><p>But here’s the big question: what about <strong>the native performance issue? </strong>In my view, KMP does a stellar job when the UI stays native, and you’re just sharing business logic. But what’s the deal with the UI part? Can Compose really keep up with SwiftUI or UIKit in performance? I know CMP for iOS is just starting out and has a long way to go to reach stability. But what’s the situation right now? A bunch of Android developers have started using CMP in their apps, and some are even pushing them into production. But at the end of the day, as a user, all I care about is a smooth, hassle-free experience. Imagine having a top-tier phone like an iPhone 15 Pro Max or a Pixel and running into laggy UI. That would be a bummer, right? Most users would blame their phone rather than think the app isn’t optimized. We developers sometimes forget that our users don’t know or care about the tech behind our apps. They just want something stable that performs well and doesn’t kill their batteries. So, can CMP deliver that today?</p><p>With that thought, I decided to dig and benchmark CMP’s performance. I whipped up a simple app, which turned into 15 different versions, to gradually introduce CMP and see how it stacks up performance-wise. This series of articles will cover what I built and tested, including the methodology and criteria I used. I’ll wrap it up with my own takeaways and all the nifty solutions I figured out along the way.</p><p>Before we jump into the benchmarking adventure, check out my KMP projects from mid-2023. The second one’s still in the works, but I’ll keep you posted:</p><ul><li><a href="https://github.com/Subfly/KMMeal">GitHub - Subfly/KMMeal</a></li><li><a href="https://github.com/Subfly/ricKMMorty">GitHub - Subfly/ricKMMorty: Inital Commit</a></li></ul><p>Finally, throughout reading the series, you can follow up the repo below, where I published all the apps along with libraries and resources:</p><p><a href="https://github.com/Subfly/the_compose_experiment">GitHub - Subfly/the_compose_experiment: A repository that holds a continuous experimentation with Compose Multiplatform until it reaches stable</a></p><h3>Pre-thinking Possible Outcomes</h3><p>Before diving into the nitty-gritty of this article series, let’s take a step back and consider what to expect. Starting a CMP project is straightforward with the <a href="https://kmp.jetbrains.com/">Kotlin Multiplatform Wizard</a>. Once you’ve created a project, downloaded it and you’re in, you’ll find a folder named ‘<em>composeApp</em>’. This is where all the Compose magic happens. In the ‘<em>composeApp/src/commonMain/kotlin/</em>’ directory, there’s a file named ‘<em>App.kt</em>’ which is essentially the starting point of our Compose UI. One key observation here is that the CMP imports are from ‘<em>androidx.compose</em>’, identical to what we use in Jetpack Compose for Android apps. This similarity is quite a revelation — it implies you’re using the same Jetpack Compose codebase in your multi-platform application.</p><p>With this in mind, it’s logical to expect similar performance, app size, and memory usage for the Android version, since it’s leveraging the same library. However, when it comes to iOS, we need to <strong>bear in mind that we should expect the unexpected</strong>. CMP is still in its alpha stage for iOS, so predicting outcomes here is tricky. Also, given that CMP for iOS uses <strong>SKIA</strong> (<strong>SKIKO</strong>) — much like Flutter did before introducing Impeller — there might be some shared challenges. These could include an increase in app size, as the <em>IPA</em> package includes the <em>SKIA</em> engine. Another critical aspect to consider is the garbage collector used by CMP, which is the Kotlin/Native GC. This means that for parts of the app where KMP and CMP come into play, Apple’s native garbage collection isn’t being used, potentially impacting memory management on iOS devices.</p><h3>Methodology</h3><p>Let’s see how I got about this. I’ll walk you through the names I’ve given to the apps, the libraries and architecture that were my go-to’s, and give you a peek into the code behind the FPS (Frames Per Second) and Memory Usage Measurers. I’ll also break down the tests I ran. So, let’s jump right in and see what’s under the hood!</p><p><strong>Naming of the Apps</strong></p><p>At the outset of this experiment, I initially planned to use both Retrofit and KTOR for Android app networking. However, as the project progressed, I decided to streamline the process by exclusively using KTOR for handling network requests. This decision was driven by the desire to minimize variables in the testing process. With that in mind,</p><ul><li>For fully native apps, which do not incorporate any KMP or CMP dependencies and rely solely on XML, Jetpack Compose, UIKit, or SwiftUI, I’ve prefixed their names with ‘<em>Base</em>’. For example, an Android app that uses XML without any KMP or CMP dependencies is named ‘<em>BaseAndroidXMLKtor</em>’. Similarly, an iOS app using SwiftUI without these dependencies is ‘<em>BaseiOSSwiftUI</em>’.</li><li>Apps that integrate KMP libraries along with Jetpack Compose for the UI are named accordingly, such as ‘<em>KMPAndroidComposeKtor’</em>. For apps that utilize both KMP and CMP libraries with UIKit for UI implementation, I’ve chosen names like ‘<em>KMPiOSCMPUIKit</em>’.</li><li>The CMP usage in some iOS apps varies, with differences in how CMP elements are integrated. For example, an iOS app that renders only List Items with CMP and uses SwiftUI for other UI elements is named ‘<em>KMPiOSCMPSwitUIListItem</em>’. In contrast, an app that employs CMP for entire screen rendering and uses UIKit’s <em>navigationController</em> or SwiftUI’s <em>NavigationStack</em> for navigation is designated ‘CMPUIKit’ or ‘<em>CMPSwiftUI</em>’, respectively.</li><li>Notably, all Android app names conclude with ‘<em>Ktor</em>’, reflecting the decision to shift from Retrofit to Ktor after developing the first app, ‘<em>BaseAndroidXMLKtor</em>’. Sorry that I was too lazy to create another app namely ‘<em>BaseAndroidXML</em>’ and copy/paste the whole code from one to another.</li><li>Two specific libraries, ‘<em>KMPKtorCoinbase</em>’ and ‘<em>CmpCoinbase</em>’, have been implemented. Their names are indicative of their functionalities and integration into the respective apps.</li></ul><h4>Libraries and Architecture</h4><p>In preparing the apps for this project, my primary aim was to minimize the number of libraries used. This approach was crucial because each library introduces a new variable, which could lead to differences in testing results from one app to another, affecting aspects like performance, memory usage, and app size.</p><p>Here’s the approach I took:</p><ul><li>For navigation, I relied on native SDK functionalities. On Android, Activities were the backbone for screen management, with navigation is managed using startActivity() and finish(), and data passed via <em>Intents</em>. For iOS apps utilizing UIKit, navigation was handled with pushViewController() on the <em>navigationController</em>, while SwiftUI apps used <em>NavigationStack</em> and <em>NavigationLink</em>.</li><li>The <em>CoinPaprika API</em> serves as the data backbone for all apps. Android apps leverage Ktor for networking, which is also supported by my ‘<em>KMPKtorCoinbase</em>’ and ‘<em>CmpCoinbase</em>’ libraries. Meanwhile, ‘<em>Base</em>’ iOS apps use <em>URLSession</em> for networking.</li><li>Serialization of requests and responses was handled by ‘<em>KTX-Serialization</em>’ in all Android apps, including the apps that leverage the ‘<em>KMPKtorCoinbase</em>’ and ‘<em>CmpCoinbase</em>’ libraries. For ‘<em>Base</em>’ iOS apps, the <em>Codable</em> protocol was used for serialization.</li><li>The two libraries I developed, ‘<em>KMPKtorCoinbase</em>’ and ‘<em>CmpCoinbase’</em>, play specific roles. ‘<em>KMPKtorCoinbase</em>’ was designed to share business logic without including UI code, as per KMP’s functionality. ‘CMPCoinbase’, on the other hand, incorporates UI logic through CMP, in addition to the features of ‘<em>KMPKtorCoinbase</em>’. I copied and pasted the business logic directly from the KMP library to the CMP one, a decision I’ll elaborate on in the<strong> Acknowledgements</strong> section.</li></ul><p>Architecturally, I chose <em>Clean Architecture</em> for both platforms, despite the small scale of the app. This decision inevitably increased my development time but was instrumental in enlarging the codebase. Here’s a quick layout:</p><ul><li>Core components, such as UI Models, DTOs, their mappers, utility classes, exceptions, and extensions, are placed in the <em>Core</em> folder.</li><li>The Code organization was <strong>feature-centric</strong>. With two screens in the app, there are two main features.</li><li>Each feature folder was structured with distinct <em>Data</em>, <em>Domain</em>, and <em>Presentation</em> sections.</li></ul><h4>Measurers</h4><p>Truth be told, using the built-in performance inspectors in Android Studio or Xcode would have been the easiest way to measuring app performance. However, my ultra genius mega-mind decided to create a separate KMP library for that purpose. My idea was to have a tool that could be easily integrated into any of my apps, perhaps even future ones. However, integrating this library with the native SDKs turned out to be a bigger challenge than I anticipated. After three days of wrestling with it, and probably due to my own knowledge gaps, I just couldn’t get it to work. So, I resorted to the good old method of copying and pasting code into all projects.</p><p>My aim was not just to measure performance, but to do it in a way that avoided the clutter and complexity of standard tools. This gave me exactly what I needed. I wanted to create clear, straightforward data points that could be easily parsed into JSON and visualized in Python for easy-to-understand charts. In the end, building my own performance measurers turned out to be the simplest solution to what I needed, even though it brought its own set of challenges along the way.</p><p><strong>FPS Measurer</strong></p><ul><li>Let’s start with Android. Here, the Choreographer is like your new best buddy. It operates at set time intervals, waiting for your tasks to wrap up before redrawing the screen with any updated components. To put it simply, for a 60 Hz screen, it works in 16-millisecond cycles. Finish your work in those 16 milliseconds, and all is well. Miss that window, and you’ve got a ‘<em>frame-skip</em>’ — a big no-no, especially in animations, as it leads to visible screen lags. Diving deeper, Choreographer offers a postFrameCallback()method for adding a function that executes at the end of each 16-millisecond cycle. The trick was to increment a ‘<em>frameCount</em>’ variable each time this callback was triggered, then calculate the FPS from this count after a second had passed. The real challenge? Testing this on a physical device meant, I had to save these measurements to a file and then send it off to a server running locally on my network. You’ll find these files in the ‘<em>measurers</em>’ folder of the repo.</li><li>In iOS, things were challenging due to my limited experience with native iOS development, aside from my knowledge of SwiftUI and the 10 apps I had implemented for this experiment. With assistance from ChatGPT and insights from StackOverflow discussions, I managed to calculate FPS on iOS devices using <em>CADisplayLink</em>. I applied an approach similar to the one I used for Android. However, during testing on my good ol’ iPhone 11, I couldn’t send the file to my server because <em>URLSession</em> was unable to locate the file I had created. Consequently, I resorted to testing the iOS apps using the emulator and directly printed the file location to stdout via a print line (a mega-super-genius move), and then manually copied the file containing the measurements to my Python script for charting.</li></ul><p><strong>Memory Measurer</strong></p><ul><li>On the Android side, obtaining memory usage metrics was straightforward with Debug.getMemoryInfo(). The key task involved converting the data from KB to MB. Following this, similar to the FPS Measurer, these metrics were saved to a file and transmitted to my server for further analysis.</li><li>Now, on the iOS front, things got a bit tricky. Unlike the FPS Measurer, where the code was a walk in the park, the Memory Measurer required me to dive into native Objective-C methods and make calls to the kernel for memory insights — or at least, that’s how I interpreted it. I leaned heavily on resources like ChatGPT and StackOverflow to piece together functional code. The rest of the process followed the same routine as with FPS — saving the data, noting the file location, and then manually ferrying it over to my Python script for analysis and painting those nifty charts you can find in the next part of that article series.</li></ul><p><strong>App Size Measurer</strong></p><p>Yes, that file doesn’t exist because measuring the app size is a straightforward process. It involves installing the app in release mode and checking the storage usage in the device settings.</p><h4>Testing</h4><p>At the beginning of these experiments, I set out to find a solid testing method that doesn’t rely on human error. Using an automated method was pretty logical and <a href="https://maestro.mobile.dev/">Maestro</a> was the hottest thing in the X (Twitter) community. But, when I started testing Android with Maestro, the results got pretty complex and needed a lot of explaining to make sense to readers. Trying to draw clear conclusions from Maestro’s automated tests turned into a real head-scratcher, as you’ll see in the Experiments and Results section later on.</p><p>Then came iOS testing, and things got a bit tricky. It might have been SKIA or the fact that CMP code lacked some modifiers like .semantics() and .testTag(), but I hit some roadblocks. Maestro was unable to find my views when I used CMP in the iOS app. Additionally, in the &quot;BaseiOSUIKit&quot; app, TableView loading seemed to take forever, and the app started to use <strong>gigabytes of memory </strong>when I tried to connect to Maestro. So, I decided to try something different - the &quot;User Scroll&quot; method.</p><p>While the “User Scroll” approach is a bit more prone to human error, it gave us results that were not only easier to understand but also more revealing than Maestro. Here’s the drill: I scrolled rapidly 40 times in a minute and recorded the results. Most of the time, this quick-scroll test wrapped up in just 40 seconds, and I patiently waited for another 20 seconds (which is way more than needed) to let the garbage collector do its thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saxGErFkfCPD98XmDR46Rw.gif" /><figcaption><a href="https://maestro.mobile.dev/">Testing X (Twitter) app in Maestro (Gathered from Maestro’s Front Page)</a></figcaption></figure><h3>The Next Part</h3><p>When I began writing this article, my intention was to compile everything on a single page. However, as the content grew, I found myself with over 9000 words, equivalent to nearly 35 minutes of reading time on Medium. In the interest of simplicity and to enhance readability, I’ve opted to split this article into three parts. The next installment will delve into the experiments, their outcomes, and offer straightforward explanations of the apps. You can explore these details in the upcoming section below:</p><p><a href="https://medium.com/@alitahasubfly/i-made-the-same-app-15-times-here-are-the-results-part-2-experiments-results-27aeb93cb42b">I made the same app 15 times, here are the results Part 2— Experiments &amp; Results</a></p><p>I want to extend my gratitude to you for accompanying me on this journey. Feel free to share and utilize any part of this article series and project, as long as proper credits are attributed. I value your feedback and welcome any questions you may have. You can reach out to me at:</p><ul><li><strong>My LinkedIn:</strong> <a href="https://www.linkedin.com/in/ali-taha-dincer/">Ali Taha Dinçer</a></li><li><strong>My E-Mail: </strong>alitahasubfly@gmail.com</li></ul><p><strong>Keep learning, continue improving!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9fcc1485e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commencis/i-made-the-same-app-15-times-here-are-the-results-part-1-introduction-methodology-ae9fcc1485e4">I made the same app 15 times, here are the results Part 1 — Introduction &amp; Methodology</a> was originally published in <a href="https://medium.com/commencis">Commencis</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2022 Yılında Nasıl Mobil Geliştirici Olurum?]]></title>
            <link>https://medium.com/@alitahasubfly/2022-y%C4%B1l%C4%B1nda-nas%C4%B1l-mobil-geli%C5%9Ftirici-olurum-3f83f3b92d31?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f83f3b92d31</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Wed, 26 Jan 2022 06:53:49 GMT</pubDate>
            <atom:updated>2022-01-26T06:56:01.897Z</atom:updated>
            <content:encoded><![CDATA[<p>Selam herkese 👋🏻 Biraz uzun olan bu yazıda nasıl mobil uygulama geliştirmeye başlayabileceğinizi, bu yolda nelere dikkat etmeniz gerektiğini olabilecek en sıkmayacak şekilde ve kendi deneyimlerimden azar azar bashederek anlatmaya çalışacağım. Hadi o zaman, başlayalım!</p><h4>Nereden Başlamalı?</h4><p>Kısaca doğru platform ve framework seçiminden.</p><p>Mobil geliştirme dünyası en basitinden ikiye ayrılıyor: Native’ciler ve Cross-Platform’cular. İki terim arasındaki en temel ayrım Native’cilerin geliştirdikleri işletim sisteminin ana programlama dilini kullanması iken (Android için Kotlin-Java, iOS için Swift-Objective C) ve dolayısıyla tek bir sistem üzerinde çalışabiliyorken Cross-Platform’cuların yazdıkları kodlar her işletim sisteminde (Android/iOS) çalışır. Bu durumda aklınızda şöyle bir soru oluşabilir, “Neden Cross-Platform öğrenip yazdığım tek kod ile her iki işletim sisteminde de çalışan bir uygulama yapmıyorum?”.</p><p>Bu soruya üç sene önceki ben bir cevap bulduğunda Cross-Platfrom framework’lerinden biri olan Flutter’ın ismi daha yeni yeni duyuluyordu. Bir üniversite dersi için Android’e Native olarak bir uygulama geliştirmiştik arkadaşlarımla (Java ile 😢) ve mobil dünyasına ilk girişimi yapmıştım bu şekilde. Ancak sadece iki tane activity bulunduran ve üç tane fragmentten oluşan bir uygulamayı beş kişi yazmamız 2 ayımızı almıştı ve uygulamanın UI güzelliği açısından bir gram bile güzel yanı yoktu (Pie Chart hariç, onu da kütüphane ile yazabilmiştik). Native’in bu yönü benim için çok acı vericiydi ve bu yüzden daha kolay yöntemler aramaya başlamıştım. O dönemlerde önüme Flutter’ın çıkması ile beraber her şeyin ne kadar kolay, hızlı ve akıcı bir şekilde geliştirilebildiğini gördüm ve daha iyisi, tek bir kod alt yapısı ile hem Android’e hem iOS’a kod yazmanın verdiği heyecanla bir motivasyon elde ettim ve Cross-Platform programlama öğrenmeye başladım. Aradan 3 sene geçtikten sonra tükürdüğünü yalayan ben Native programlamaya geri döndü, çünkü Jetpack Compose ve SwiftUI ortaya çıktı.</p><p>Üstteki paragraftan anlamanız gereken şeye gelirsek, Flutter, Declarative UI denilen bir paradigma kullanıyor. Yani, web sitesi yazmak için HTML ile sitenin iskeletini tanımlayıp, sonra CSS ile makyajlayıp sonrasında JavaScript ile interaktiflik ve dinamiklik kattığımız, veya daha iyi bir örnekle, Native Android uygulama yazmak için XML ile iskeleti tanımlayıp Kotlin ile makyajlayıp (bunu XML’den de yapabilirsiniz), yine Kotlin ile interaktiflik ve dinamiklik eklemek <strong>yerine</strong> tüm iskeleti, makyajı, interaktiviteyi ve dinamikliği tek bir programlama dili ile tek bir dosya üzerinde yapabilmeniz demek bu. Flutter’ın sağladığı en büyük avantajlardan biri buydu Native programlamaya, hatta diğer bir Cross-Platform framework’ü olan React Native’e kıyasla. Ancak Jetpack Compose ve SwiftUI ile beraber Native uygulama geliştirme de Declarative UI ile tanıştı ve eskisinden çok daha kolay bir hal aldı. Şu ana kadar bahsettiğim frameworklerin ve kütüphanelerin daha detaylı açıklamasına ayrı ayrı aşağıda değindim. Ancak bu bölümü noktalamak için size üç senedir Twitter, Instagram ve LinkedIn üzerindeki gözlemlerimden yola çıkarak iki geliştirme türü hakkındaki izlenmimlerimi şöyle sıralayabilirim:</p><p>Yeni başlayanlar Cross-Platfromu (özellikle Flutter’ı) seviyor çünkü:</p><ul><li>Öğrenmesi çok kolay. Flutter’ın kullandığı Dart programlama dili hem Java’ya hem JavaScript’e çok benziyor. Dilin sağladığı OOP yani Obje Yönelimli Programlama (umarım doğru çevirmişimdir) özellikleri çok kullanışlı. Flutter’ın zaten çok kullanışlı bir framework olmasının yanında Dart’ın sağladığı özellikler de kod yazma rahatlığınızı oldukça arttırıyor.</li><li>Son yıl içinde Flutter’a rağbet o kadar arttı ki “how to make … in Flutter” (üç noktaya istediğiniz UI elemanını yazın) diye internette aratarak bulamayacağınız tuttorial çok azdır. Aynısı daha uzundur piyasada olan React Native için de geçerli. Takıldığınız herhangi bir noktada cevabını bulmanız çok kolay olacaktır. Bu da öğrenme zorluğunu düşüren önemli noktalardan biri.</li><li>Flutter ve React Native ile yapılmış çok fazla miktarda açık kaynaklı uygulama var. Başkalarının kodlarını inceleyip bazı UI veya Logic componentlerini nasıl yaptıklarını öğrenebilir, kendi best practice’inizi geliştirebilirsiniz.</li><li>Flutter’ın birçok sosyal mecradaki toplulukları çok güçlü. Güçten kastım, hem bir sürü yeni başlayan var hem de uzun zamandır bu konuda kendini geliştirmiş ve topluluğa yardımcı olmaya çalışanlar var. Zorluklar yaşadığınızda sosyal medyadan çok rahat destek bulabilirsiniz. React Native’in Flutter kadar güçlü bir topluluğu olmasa da (kendi izlenimlerime göre) yine de aynı şekilde size yardımcı olabilecek veya sizin gibi yeni başlayanların bulunduğu topluluklar bulabilirsiniz.</li></ul><p>Yeni başlayanlar Native Programlamayı sevmiyor çünkü:</p><ul><li>Traditional Native Programming dediğimiz — yukarda örneğini verdiğim Android programlama yöntemi gibi — paradigma öğrenmesi zor bir yapı (dı). Ayrca iOS’a Native geliştirme yapabilmek için Mac sahibi olmak zorundasınız. Bu durum Cross-Platform geliştirme için de geçerli ama sonuçta yazdığınız kodun nasıl bir görüntüye sahip olduğunu görebiliyorsunuz Cross-Platform’da.</li><li>Native Programming sizin sadece programlama diline değil, işletim sistemine de hakim olmanızı bekler (di). Memory Managementtan tutun da Life-Cycle’a kadar her şeye dikkat etmeniz gerekir (di).</li><li>Native programlama tek başına bir yapı (dı). Android için yazdığınız bir UI componenti ile iOS için yazdığınız componentler arasında dağlar kadar farklar olabilir (di). Bu yüzden Native geliştiriciler genelde tek bir sisteme tüm dikkatini verir (di).</li></ul><p>Native geliştiriciler Cross-Platform geliştirmeyi sevmiyor çünkü:</p><ul><li>Performans açısından büyük fark var. Native geliştirme size manuel bir araba verir. Ama vitesin geçişi sırasındaki en küçük çarktan bile siz sorumlu olursunuz. Bu yüzden her şeyi batırabilirsiniz de, veya dünyadaki en iyi vites geçişini de elde edebilirsiniz. Ama Cross-Platform geliştirmede elinizde tam kapsamlı bir otomatik araba vardır. Siz UI ve Logic kısımlarını yazarsınız, gerisini en optimize şekilde makine diline çevirecek olan derleyiciler halleder. Ama bana kalırsa günümüzün en büyük sorunu uygulamanın performansı değil, gerçekten yanlış yazmadığınız sürece performanssız uygulamalar üretmek giderek zorlaşmaya başladı. Yine de performans ve kaplama alanı farkı için bulabildiğim en iyi videoyu aşağıdaki linkten izleyebilirsiniz.</li></ul><p><a href="https://www.youtube.com/watch?v=kjvfqfNadcM&amp;ab_channel=PeterCodes">https://www.youtube.com/watch?v=kjvfqfNadcM&amp;ab_channel=PeterCodes</a></p><ul><li>Declarative UI ters geliyor. 8 aya yakın web geliştirme yaptıktan sonra fark ettiğim durum tam olarak bu. Flutter’dan sonra bana Imperative UI (yani yukarda verdiğim web sitesi geliştirme ve Native Android örneğinde kullanılan UI paradigması) çok ters gelmişti. Aynı şekilde staj yaptığım yerlerden birinde de Native geliştiriciler Flutter için benzeri yorumlar yapmışlardı.</li></ul><p><strong>Ancak, Native geliştirmek artık kolay çünkü:</strong></p><ul><li>Jetpack Compose ve SwiftUI var artık. İkisi de sırayla Android ve iOS’un yeni programlama kütüphaneleri. Her ikisi de Flutter gibi Declarative UI paradigmasını benimsemekle birlikte bir Flutter programcısının çok da yabancılık çekmeden rahatça öğrenebileceği kütüphaneler bunlar. Tabii ki belirli noktalarda farkları olsa da Traditional Native Development öğreneceğiniz süre zarfında her iki kütüphaneyi de öğrenebilirsiniz (bence).</li><li>Reddit’te okuduğum bir habere göre (ne kadar doğru bilmiyorum) Jetpack Compose’u geliştiren geliştirici Flutter takımı ile çok zaman geçiriyormuş ve düzenli fikir alışverişinde bulunuyormuş. Compose’a yeni başladıysanız ve Flutter biliyorsanız birçok tanımın, hatta componentin Flutter’a aşırı benzediğini görebilirsiniz. Bu yüzden Learning Curve bakımından Flutter bilen biri için Jetpack Compose ile Native Android geliştirmeye geçmek çok kolay.</li><li>İyi kötü Declarative UI paradigmasına hakimseniz SwiftUI’a geçerken bir sorun yaşayacağınızı düşünmüyorum. Hatta Jetpack Compose’a kıyasla MVVM mimarisi kullanımı çok daha kolay bence.</li><li>Hem Jetpack Compose, hem SwiftUI olayı biraz otomatik arabaya çevirmiş durumda. Yarı otomatik bir arabanız var diyebiliriz hatta. Flutter’a kıyasla daha çok ama eskiye kıyasla çok daha az dikkat etmeniz gereken nokta var artık.</li></ul><h4>İyi güzel yazmışın da, nereden başlamalıyım?</h4><p>Kısaca, eğer halihazırda web deneyimin varsa React Native’den başla, sonra Flutter ve devamında Native programlamaya geçersin. Eğer hiçbir şey bilmiyorsan Flutter’dan başla, sonra Native programlamaya geç. “Cross-Platform sarmadı beni abi” diyorsan Mac’in varsa SwiftUI ile başlayabilirsin ama benim tavsiyem Flutter’a bir bak da Declarative UI’a alış bi önce. Mac’in yoksa da Jetpack Compose başla ama hala tavsiyem, şu Flutter’a bir bak.</p><p>Neden mi inadına Flutter diyorum? Flutter, bu Declarative UI yapısının en güzel işlendiği frameworklerden biri. Stateful componentler ile Stateless componentler arasındaki fark keskin bir şekilde belli. Flutter’ın component kütüphanesi çok güzel bir şekilde dokümente edilmiş. Ayrıca Flutter componentlerinin isimleri ile Compose’daki veya SwiftUI’daki isimler de oldukça benzer veya eş anlamlı (burada row-columncı meslektaşlarımla hstack-vstackci meslektaşlarım lütfen sorgulamasın beni 😅). Kısaca Flutter’ı güzel bir şekilde öğrenebilirsen diğerleri ile de rahatça devam edebilirsin.</p><h4>Peki, Cross Platform ile Native arasındaki farkı anladım da, tüm bu saydığın zımbırtılar ne?</h4><p>Bu zımbırtıları kullanarak uygulama geliştiriyorsun. Ama her birinin belirli farkları var. Gel hadi bu farklara kısaca değinelim:</p><h4>1) React Native</h4><p>Facebook (Meta) tarafından geliştirilen bir Cross-Platform frameworkü ve diğerleri arasında en az bilgiye sahip olduğum framework. İsminin içinde Native geçmesine rağmen Native değil Cross-Platformdur. En önemli farklarından biri Imperative programlama ile Declarative programlamayı birleştirmesi. Yani her componentin kendi halinde HTML, CSS ve JS parçaları olur. Bunları ayrı dosyalarda gösterebildiğiniz gibi tek dosya içinde de gösterebilirsiniz. Bu yüzden yazım kolaylığı vardır.</p><p>Çalışma altyapısı köprü sisteminden oluşur. Normal olarak telefonlar JS dosyalarını çalıştıramaz. O yüzden o JavaScript kodlarının önce yürütülüp ne çıkarmak istendiğinin anlaşılması, sonra o componentlerin her birinin native elemanlara dönüştürülmesi gerekir, ki bu da React Native’i diğerlerine göre çok daha yavaş kılan nokta. Benim bu meret hakkında bilgim bu kadar, bir yanlışım varsa yorumlardan iletebilirsiniz 😅.</p><h4>2) Flutter</h4><p>Google tarafından geliştirilen bir Cross-Platform frameworktür. Declarative UI sistemine tam bağlıdır. Programlama dili olarak Dart’ı kullanır ki Dart özünde Java’ya ve JavaScript’e çok benzer. Sadece mobil uygulamalar değil, web, desktop hatta embedded (gömülü) uygulamalar yazmak için bile kullanılabilir. Yıllardır beklenen ve Google’ın yeni işletim sistemi olan Fucshia OS’in de tüm uygulamaları Flutter ile yazılmaktadır.</p><p>Derleyici altyapısında AOT yani “Ahead of Time” derleme kullanır. Yani (en kısasından) Dart kodunuz farklı CPU ve işletim sistemlerine derlenebilecek byte kodlarına çevrilir. Flutter, performans olarak React Native’den çok daha iyidir ve bazı durumlarda Native uygulamalara benzer performanslara ulaşır. Ancak kullanım sırasında Native uygulamalara kıyasla daha çok “overhead” denilen ara aşamalar barındırmasından dolayı Native uygulamalara kıyasla performans farkı görülebilir.</p><p>Stateful ve stateless componentler barındırır. Yani UI’da dinamiklik gösterebilecek componentler ile göstermeyecek olanlar net bir şekilde ayrılmıştır.</p><h4>3) Jetpack Compose</h4><p>Google’ın yeni göz bebeği Native programlama frameworkü. Declarative UI sistemini kullanır. Kotlin programlama dilini kullanır. En büyük yardımcısı Kotlin programlama dili ile gelen coroutine’lerdir, yani multi-thread programlamadır. Smart Composing denilen bir yapıya sahiptir. Böylece sadece değişen UI parçaları yeniden çizilir ve çizim sırasında coroutine’lerden faydalanır. Böylece hem hızlı, hem de az şarj tüketen uygulamalar yazılabilir.</p><p>Flutter’a kıyasla en önemli farkı state yapısıdır. Normal olarak Jetpack Compose’daki tüm componentler stateless’tır. Sizin ViewModel ve Dependency Injection kütüphaneleri kullanarak state’i taşımanız beklenir. Bu sebeple Flutter’dan bir tık daha karışık olduğunu söyleyebilirim.</p><p>Abstraction yani soyutlamanın çok ön planda olduğu bir frameworktür. O kadar fazla abstraction var ki, navigation, yani bir ekrandan başka bir ekrana gitmek için kullanılan sistem bile üçüncü parti kütüphane olarak yükleniyor. Flutter’da bu sistem Flutter’ın bir parçası olarak geliyor. Compose’a ilk başladığımda çok şaşırmıştım bu duruma. Yukarda da dediğim gibi, yarı otomatik bir arabanız var sonuçta.</p><h4>4) SwiftUI</h4><p>Çok da yeni olmasa da son günlerde daha çok ön plana çıkan, Apple’ın kısmen yeni Native programlama framework’ü. Swift programlama dilini kullanır. Kullanımı çok kolaydır. Learning Curve açısından düşündüğümde benim hepsi arasında en rahatlıkla öğrendiğim framework olduğunu söyleyebilirim. Tıpkı Jetpack Compose’daki gibi her View stateless’tır, ama compose’daki gibi state’i ViewModel’lerde veya Dependency Injection ile taşımak zorunda değilsiniz. MVVM mimarisini tam olarak uygulamanıza olanak sağlar. Traditional iOS geliştirmeye kıyasla componentlere state eklemek, objeleri environment object haline getirerek taşıyabilmek, persistant storage denilen uygulama bazlı cihaz hafızasına erişim gibi bir çok şey SwitUI ile çok daha kolaylaşmıştır.</p><h4>5) Xamarin Forms (MAUI)</h4><p>Microsoft’un Cross-Platform kütüphanesi, yeni ismiyle MAUI. En sona bırakmamın sebebi React Native’de en azından daha önce kod incelemiş olmam, ama Xamarin ile ilgili en ufak kod satırına bile bakmamış olmam. Yine Microsoft’un programlama dili olan C# hatta genelde backend için kullanılan .NET ile yazıldığını biliyorum. Gördüğüm kadarıyla çok fazla fanı olmayan bu framework’ün sosyal mecralarda da yazanına pek rast gelmedim. Belki geleceği olabilir ama şu an için Flutter ve React Native varken piyasada yer edinmesi zor bir framework olduğunu söyleyebilirim.</p><h4>Tamam, hangi framework ile başlayacağımı seçtim, şimdi ne yapmalıyım?</h4><p>Özetle, hevesini sakın kaybetme. Heves, öğrenme isteği ve en önemlisi yaptığın şeyi sevebilmek senin en büyük dostun. Bu saydıklarıma sahip olduğun sürece bir şekilde zaten devam edersin.</p><p>Bol miktarda araştırma yap. Sosyal medyada, Medium’da seçtiğin framework ile uğraşan, üzerine içerik üretenleri takip et. Onların paylaşımlarını incele, yeni bir şeyler kapmaya çalış. GitHub’dan bol bol kod araştır. Kod oku ve insanların UI ve Logic componentlerini nasıl yazdığını anlamaya çalış. Bir de en güzel öğrenme yöntemlerinden biri de kendi uygulamanı yazmak.</p><p>Uygulama yazmaya başlamak için bir fikre sahip olmana gerek yok. En basitinden bir Component Catalog yapabilirsin. Giriş ekranında bir liste olur, listedeki herhangi bir elemana tıklandıktan sonra o elemanın kullanımının anlatıldığı, hatta çeşitli ayarlar ile değiştirildiği bir ekrana geçirilebilir. Sandbox tarzı uygulamalar diyebilirsin bunlara. Böylece hem o seçtiğin framework’ün componentlerini en iyi şekilde anlamış olursun, hem de uygulamayı yayınlarsan, insanlar senin sayende componentlerin özelliklerini öğrenmiş olur.</p><p>Tabi yukarda saydığım tüm tavsiyeleri bir yerden framework’ü öğrenirken uygulamaya çalış. Yani demek istediğim, seçtiğin framework üzerine anlatım yapan kurslar alman, veya YouTube üzerinden izlemen ve bu sırada araştırmaya devam etmen. İyi miktarda ingilizcen olduğunu düşünüyorsan yabancı kaynaklardan da faydalanmaya çalış. Özellikle, ama özellikle, dokümentasyon oku. Defalarca izlediğin videolar veya okuduğun yazılarda anlamadığın konuları orjinal dokümentasyonlardan kolaylıkla anlayabilirsin belki. Ben Jetpack Compose çalışırken state management olayını dokümentasyonları okuyarak çok daha iyi anlamıştım.</p><p>Bu bölümü bitirmeden önce, aşağıda bazı frameworkler için seçtiğim kaynakları bulabilirsin:</p><h4>1) Flutter</h4><p>Ben Flutter’ı doğrudan bir uygulama yazmaya girişerek öğrenmiştim. Ama bazı şeyleri öğrenmek için bir kurs satın almıştım. Aşağıdaki linklerde son zamanlarda gördüğüm ve içerik olarak hoşuma giden kaynakları bulabilirsin:</p><ul><li><a href="https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/">Udemy Flutter Kursu (Ücretli)</a></li><li><a href="https://www.youtube.com/watch?v=IfUjHNODRoM&amp;list=PL6yRaaP0WPkVtoeNIGqILtRAgd3h2CNpT&amp;ab_channel=VandadNahavandipoor">YouTube Flutter Kursu (Yeni Yayınlandı, Twitter’da büyük ilgi topladı)</a></li><li><a href="https://docs.flutter.dev/">Orjinal Flutter Dokümentasyonu</a></li></ul><h4>2) Jetpack Compose</h4><p>Jetpack Compose daha yeni bir kütüphane olmasına rağmen Android dünyasında, özellikle YouTube’da isim yapmış kişiler framework üzerine videolar çektiler bile. Aşağıdaki linklerde benim de kullandığım kaynakları bulabilirsin:</p><ul><li><a href="https://www.youtube.com/watch?v=zqHPE7Tib-c&amp;list=PLgCYzUzKIBE_I0_tU5TvkfQpnmrP_9XV8&amp;ab_channel=CodingWithMitch">Jetpack Compose by CodingWithMitch</a> (YouTube)</li><li><a href="https://www.youtube.com/watch?v=ERBEWmfz6h0&amp;list=PLSrm9z4zp4mEWwyiuYgVMWcDFdsebhM-r&amp;ab_channel=Stevdza-San">Jetpack Compose by Stevdza-San</a> (YouTube)</li><li><a href="https://www.udemy.com/course/to-do-app-with-jetpack-compose-mvvm-android-development/">To-Do App With Jetpack Compose Course</a> (Ücretli)</li><li><a href="https://www.udemy.com/course/build-modern-android-app-with-rest-api-and-ktor-server/">Boruto App With Jetpack Compose and Ktor</a> (Ücretli ve Kotlin ile backend de anlatıyor)</li><li><a href="https://developer.android.com/jetpack/compose/documentation">Orjinal Jetpack Compose Dokümentasyonu</a></li></ul><h4>3) SwiftUI</h4><p>Zamanında SwiftUI ile kafayı bozduğumda bir sürü kurs satın almıştım Udemy üzerinden ve hiçbirinden beklediğim sonucu alamamıştım. Bir gün benim gibi SwiftUI’a yeni başlayan bir arkadaşımın bana önerdiği ve takip etmesi ve anlaşılabilirliği açısından en faydalı diyebileceğim kaynağın linkini aşağıda bulabilirsiniz:</p><ul><li><a href="https://www.youtube.com/channel/UCp25X4LzOLaksp5qY0YMUzg">Öz Abim Nick’in Kanalı (Swiftful Thinking)</a> (YouTube)</li></ul><p>Ayrıca sadece SwiftUI’a değil, Swift’e başlayacak herkesin mutlaka uğraması gereken, dokümentasyonundan çok daha faydalı olan site:</p><ul><li><a href="https://www.hackingwithswift.com/">Hacking With Swift</a></li></ul><p>Yukarıdaki linkten 100 Days of Swift ve 100 Days of SwiftUI sayfalarını bulup oradaki videolardan ücretsiz bir şekilde Swift ve SwiftUI öğrenebilir, bölüm sonu testleri ile de ücretsiz bir şekilde kendinizi test edebilirsiniz. Ayrıca site sahibi abimizin şöyle bir YouTube kanalı da var:</p><ul><li><a href="https://www.youtube.com/c/PaulHudson">Paul Hudson</a> (Swift bir insan olsa bu adam olurdu herhalde)</li></ul><p>Malesef diğer frameworkler hakkında hem yeterli bilgim, hem de deneyimim olmadığı için sizi yanlış yönlendirmemek adına kaynak paylaşımı yapamıyorum. Ancak kim bilir, belki seneye bu yazının yenilenmiş versiyonunu yazarken eklerim.</p><h4>Canın sağ olsun, peki ben önerdiğin kursları ve kaynakları takip edip bitirirsem bir mobil geliştirici olur muyum?</h4><p>Hem evet hem hayır 😅. Mobil geliştirmek sadece UI ve Logic geliştirmekten ibaret değil. Evet izlediğin kurslarda yüksek ihtimalle MVVM, Persistant Storage, Fetching over Network Data, Dependency Injection ve benzeri bir çok yapıyı öğrendin, ama, bunun başka kolları da var.</p><p>Mesela freelance bir geliştirici oldun diyelim ve müşterin senden belki de binlerce kişinin kullanacağı bir e-ticaret uygulaması yapmanı istiyor. Kurslardan öğrendiğin üzere uygulamanın arayüzünü hemen geliştirdin ve uygulamayı bir backend server’a bağlamak istiyorsun. Kursta sana Firebase öğrettiler belki ama gerçek bir backend server’a nasıl bağlanacağını öğretmediler, veya kendi backend serverini nasıl kuracağını. Bana kalırsa, ne programlarsan programla, her geliştiricinin biraz backend bilmesi gerekiyor. Backend’i öğrenirken bir yandan da farklı Database türlerini de öğreniyorsan tadından yenmez zaten. Böylece, Full-Stack dediğimiz tarafa yavaştan yaklaşmaya başlarsın.</p><p>Sırf backend de değil, bir mobil geliştiricinin iyi bir UI gözü de olması gerekir. Yazacağın componentlerin nasıl olacağını kafanda kestirebilirsin, kodunu hayal edebilirsin ama kullanıcının dokunması gereken alanın birkaç pixel bile yanlış olması kullanıcı deneyimini kötü etkileyebilir. O yüzden bol bol design araştırıp o designları kendin kodlamaya çalışman senin de fazlasıyla işine yarayacaktır.</p><p>Şu ana kadar bu bölümde anlattıklarımla ilgili birkaç kaynağı şöyle sıralayabilirim:</p><h4>Database ve Backend</h4><ul><li><a href="https://www.youtube.com/watch?v=9SGDpanrc8U&amp;ab_channel=Amigoscode">Bu abim giriş için güzel şeyler anlatıyor</a> (YouTube — Spring Framework)</li><li><a href="https://www.udemy.com/course/spring-hibernate-tutorial/">Bu abim ise biraz eski ama tam kapsamlı öğrenmek için birebir</a> (Ücretli — Spring Framework)</li><li><a href="https://www.youtube.com/watch?v=qw--VYLpxG4&amp;ab_channel=freeCodeCamp.org">FreeCodeCamp PostgreSQL kursu</a> (YouTube)</li><li><a href="https://www.udemy.com/course/mongodb-the-complete-developers-guide/">MongoDB Kursu</a> (Ücretli)</li></ul><h4>UI/UX Design (Adobe XD)</h4><ul><li><a href="https://www.udemy.com/course/ui-ux-web-design-using-adobe-xd/">Bu abim de Adobe XD kullanmayı tane tane anlatıyor</a> (Ücretli)</li></ul><p>Tabii ki en basitinden seçtiğin framework için önerdiğim veya kendi bulduğun kaynakları bitirdikten sonra, kendi başına uygulama yazabilmeyi başardıysan kendini bir mobil geliştirici olarak görebilirsin. Son saydıklarımı sadece senin gelişimin açısından sana daha fazla yetenek katacak ve Full-Stack denilen tanıma oturtacak ekstra yetenekler gibi görebilirsin.</p><h4>Sorularım bitti sanıyorsan yanılıyorsun, en çok dikkat etmem gereken konular ne?</h4><p>Takip edeceğin bir çok kaynak zaten sana UI ve Logic componentler hakkında yeterince bilgi veriyor olacak. Çok kompleks şeyleri de internetten araştırarak veya kendin halledebileceksin. Ancak bir çok kursta veya YouTube playlistinde, üzerinden çok kısa anlatılarak geçilen belli başlı konular var. Bu konuları aşağıda bulabilirsin. Benim tavsiyem bu konularda birden çok kaynağa bakarak farklı practiceleri, yani farklı “doğru” yazım şekillerini öğrenmen. Böylelikle uygulamalarında planlama şeklinin bile değiştiğini, daha profesyonel yaklaşabildiğini göreceksin. Konulara gelirsek eğer:</p><h4>1) LifeCycle</h4><p>Türkçesi ile hayat döngüsü diyebileceğimiz bu terimin tanımı kullanıldığı yere göre değişmek ile birlikte benim deneyimlerime göre mobil uygulama geliştirmede iki temel tanımı var. Birincisi uygulamanın kendi LifeCycle’ı, diğeri de uygulamada kullandığın her bir componentin LifeCycle’ı.</p><p>Uygulamanın LifeCycle’ını şöyle düşünebilirsin, herhangi bir sosyal medya uygulamasını ilk açtığında verilerin yüklenmesi, sonra uygulamadan çıktığında (ama kapatmadığında, arka plana aldığında) gerçekleşen olaylar ve son olarak uygulamayı tamamen kapattığındaki durumlar. Bunlar her framework’te ayrı ayrı ele alınıyor olduğu için iyi öğrenmekte fayda var. Benzeri bir durum componentlerin LifeCycle’ında da geçerli. Bir component’in ekrana çizilmeden öncesi, çizilme sırasında, çizildikten sonrası, çizildikten sonra yeniden çizilmesi veya çizilen componentin silinmesi gibi sayılabilecek bir çok LifeCycle işlemi var. Bunları iyi öğrendiğinden emin ol, çünkü gerekli zamanlarda bunları iyi biliyor olmak uygulamanı yazarken işini çok miktarda kolaylaştırabilir.</p><h4>2) Navigation</h4><p>En basit şekilde bir ekrandan başka bir ekrana geçmek olarak tanımlayabiliriz bu terimi. Ancak bu geçiş sırasında çok önemli şeyler olabilir. Mesela Spotify’da şarkı listenizdeki müziğe dokunduğunuzda şarkı çalmaya başlıyor, aşağıdaki açılan bara dokunduğunuzda ise sizi şarkının kendi ekranına yönlendiriyor. Bu sırada aslında (tam öyle olmasa da) iki ekran arasında taşınan bir veri var, yani şarkının bilgileri. Şimdi burada taşınan veri tek bir veri, ancak bu veri taşınması çok zor olan (yani performans kaybı yaşatabilecek) bir veya birden fazla veri de olabilir. Farklı frameworkler bu konuya da farklı şekilde yaklaşmakta. Mesela, Flutter ile Spotify klonu yaparken bu bahsi geçen ekranlar arasında şarkı verisini direkt bir Şarkı Objesi olarak iletebilirken, Jetpack Compose’un kendi dokümentasyonuna göre bu şarkıyı temsil eden özgün bir numarayı (mesela track_id) ekranlar arası aktarıp sonra bu şarkıların bulunduğu bir Repo’dan o şarkının verilerini okumak tavsiye ediliyor.</p><p>Biraz teknik terim kullandığımın farkındayım ama umarım bu örnek, olayın önemini anlamanda daha çok yardımcı olmuştur.</p><h4>3) State</h4><p>Yazı boyunca stateful ve stateless componentlerden bahsedip durdum ama ne bu state yapısı? State, anlık durumu ifade eder. Bir componentin state’i de o componentin anlık durumudur aslında. Mesela uygulamanız hava durumunu canlı bir şekilde gösteriyor olsun. Sıcaklık değişimi olduğunda ekranda gösterilen değerin de değişmesini istersiniz. O zaman bu hava durumu componenti aslında stateful bir componenttir, çünkü içindeki durumun değişmesi gerekir. Ancak uygulamanızda sadece “Merhaba” yazan bir text componenti var diyelim. Bunun değişmesine gerek yoktur, yazı her daim aynı şekilde kalacak. Bu durumda bu text componenti aslında stateless’tır. Flutter, bu iki component türü arasındaki farkı net bir şekilde belirler ancak Jetpack Compose ve SwiftUI’da componentlerin olabildiğince stateless olması istenir. Bu iki component türünün farklı framework’lerdeki uygulama şekillerini öğrendik diyelim, bir de bunların değişim şekilleri var, yani, stateful bir componentin içeriğinin nasıl değişeceği. Süpriz bir şekilde (😅) framework’ler bu konuyu da farklı şekillerde ele alıyor. Bu yüzden state’i doğru bir şekilde “handle” etmenin yöntemlerini iyi öğrenmek gerekiyor.</p><h4>4) Dependency Injection</h4><p>Çoğu kişi için çok baba bir konu gibi gözüken ama aslında alt yapısında çok basit olan bir terimdir bu. Asıl çıkış amacı yazdığınız componentlerin kullanılabilirliğini ve test edilebilirliğini arttırmak olan bu terim aslında birbirlerine bağımlı olan (“depend” eden) nesnelerin otomatik olarak bağlanmasını sağlamak. Mesela diyelim ki uygulamanız bir database’e bağlanıyor ve database üzerinden düzenli olarak veri çekiyor. Bu veriler sadece bir değil, belki de onlarca componentte kullanılıyor. O zaman her componentte bu veriyi teker teker çekmemiz gerekir değil mi? Aslında gerekmiyor. Componentlerinizden en yukarda, yani başlangıçta olanda bu işlemi tanımlayıp aşağıdaki componentlerinize teker teker aktarabilirsiniz. Ama ya yüzlerce componentiniz varsa? Teker teker aktarmak bir sorun olur değil mi? O zaman yardımımıza Dependency Injection dediğimiz terim koşuyor ve uygulama daha ilk kez açılırken bu database bağlantısının kurulmasını ve gerekli componentlerin o database’e bağlanmasını sağlıyor. Daha az kod, daha çok iş 👍🏻. Tabii ki her framework farklı dillerle yazıldığı için ve Dependency Injection kütüphanelerinin çoğu üçüncü parti kütüphaneler olduğu için bunları ayrı ayrı öğrenmeniz gerekmekte. Ancak alt tabandaki asıl sebebi ve nasıl uygulandığını anladığınızda tıpkı Flutter’dan Jetpack Compose’a geçişin kolay olması gibi rahatlıkla uygulayabileceksiniz.</p><h4>5) On-Device Storage Kullanımı</h4><p>Yazdığınız uygulamalarda en az iş yüküne sahip olan ama en temel parçalardan birini içeren bir terim bu. Neredeyse bütün uygulamalar mobil cihazın içinde veri tutar. En basitinden kullanıcının özgün numarası (unique id) veya kullanıcının tema tercihi ile örneklendirebiliriz. Mesela herhangi bir sosyal medya uygulamasını her yeniden açışınızda emailinizi ve şifrenizi girmiyorsunuz değil mi? Veya bir uygulamada karanlık görünümü seçtiğinizde her açışınızda bu durum resetlenip tekrar beyaz görünüme dönmüyor değil mi? İşte bunu on-device storage ile yapıyorsunuz. Ayrıca sırf bu tür küçük şeyler de değil, internetiniz olmadığında sosyal medya uygulamaları eskiden baktığınız postları yüklüyor değil mi? Çünkü bunların hepsi telefonun hafızasında, yani on-device storage’da tutuluyor. Tabii ki frameworkler bu hafızaya farklı şekillerde erişiyor ama işin temelinde aynı şekilde hafızaya kaydediyorlar. Bu yüzden dikkat etmeniz ve öğrenmeniz gereken konulardan biri de bu.</p><h4>6) İnternetten veri “Fetch”lemek</h4><p>Dikkatlice öğrenmeniz gereken konulardan biri de bu. Günümüzde çoğu uygulama artık internetsiz kullanılamayacak vaziyette. Yapılacaklar Listesi uygulamaları bile yaptığınız listeleri internetten çekmeye başladı. Uygulamanızın bir yerinde elbet siz de internetten veri çekeceksiniz ve bu işlemi olabilecek en performanslı şekilde halledebilmek çok önemli. Bu olay en basitinden kullanıcının profil resmini almak olabilir. Bu tür bir durumda yazdığınız UI’ın profil resmini çekmesini beklemeniz yerine sadece o profil resminin gözükeceği componentin beklemesini sağlamanız daha kullanıcı dostu bir hareket olacaktır. Tabii ki bu işlemleri yaparken internete “Request” dediğimiz sorguları atar ve bunların sonuçları olan “Response”ları bekleriz. Bu sistemin nasıl işlediğini anlamak ve bu sistemin daha kolay şekillerde entegre edildiği kütüphaneleri öğrenmek çok önemli bence.</p><h4>7) 3. Parti Kütüphaneler</h4><p>Son olarak kısaca değinmek istediğim konu da bu. Bir uygulamayı üçüncü parti uygulamalara bağlı olmadan elbet yazabilirsiniz, ancak bazen bazı şeylerin implementasyonu herkesçe bilinen ve her geliştirici tarafından kullanılan üçüncü parti kütüphaneler ile daha kolaydır. Bu konudaki en büyük örnek de Flutter zaten. <a href="https://pub.dev/">Şu siteden</a> açık kaynak olarak paylaşılan üçüncü parti Flutter kütüphanelerini inceleyebilirsiniz ve binlerce kütüphane arasında kaybolabilirsiniz 😅.</p><p>Bu yazıyı bitirmeden önce eklemek istediğim son şey de kısaca benim mobil programlamaya nasıl başladığım ve bu yolda yaşadığım temel zorluklardı, ancak yazının çok uzun olduğunu fark ettiğim için şu an ekstra özet geçip sonrasında daha detaylı olarak paylaşmayı planlıyorum.</p><p>Üniversitenin ilk senesinde bir dersten geçebilmek için şöyle bir uygulama yaptık arkadaşlarımla:</p><p><a href="https://play.google.com/store/apps/details?id=com.bilkent.subfly.getout&amp;gl=TR">GetOut - Apps on Google Play</a></p><p>Sonra Flutter öğrenmeye başladım ve Connected2Me’de gönüllü staj yaptım. O sırada sevgilimle beraber şöyle bir uygulama yazdık:</p><p><a href="https://play.google.com/store/apps/details?id=com.etamsoft.coupletines&amp;gl=TR">Coupletines - Apps on Google Play</a></p><p>Sonra freelancer olarak 2–3 uygulama üzerinde çalıştım. Şu anda ilk söylediğim uygulamayı yazdığım arkadaşlarım ve sevgilimle beraber bitirme projesi yapıyoruz, onu da Flutter ile yazıyoruz. Malesef uygulama ile ilgili bir ekran görüntüsü paylaşamıyorum, ancak Yaz başında yayınlamayı planlıyoruz.</p><p>Umarım okurken sıkılmamışsınızdır (😇). Mobil programlamaya başlayacak herkes için açıklayıcı şekilde yazmaya çalıştığım bu yazıda siz okuyuculara elimden geldiğince önemli noktaları anlatmaya çalıştım. Başka bir yazıda görüşmek üzere 👋🏻.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f83f3b92d31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Python for Beginners Part #1.2::Numerics]]></title>
            <link>https://medium.com/swlh/practical-python-for-beginners-part-1-2-numerics-4092be0530b0?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4092be0530b0</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Sat, 17 Oct 2020 14:29:00 GMT</pubDate>
            <atom:updated>2020-10-17T19:21:24.745Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi again everyone! Last time, I have writen about Strings in Python. Today I am going to show you important numeric types and their usage in Python.</p><p>To access the String part of this series, you can fallow this link:</p><p><a href="https://medium.com/@alitahasubfly/practical-python-for-beginners-part-1-1-strings-6b8bd59270bd">Practical Python for Beginners Part #1.1::Strings</a></p><p>Lets dive in!</p><p>In Computer Science terminology, or in industry, we do not use the term numerics. I said numerics to make the whole topic simple for you. But when we talk about numerics, what comes to your mind? I belive you can think of integers like 1, 2, 3 or floating point numbers like 3.1415 and 2.718. In fact, these two numeric types are mostly used types in Python! But, as I mentioned in my Introduction story, I will teach you a few more concept in Computer Science, to make you understand more. Finally, there is another imprtant numeric type, which we call complex.</p><p>First of all, I need to introduce you to a complex Computer Science topic, which is storage. I hope you already know about what is a RAM, a Hard Drive or a SSD in your computer. But those who don’t know, RAM is the temporary memory and Hard Drives and SSD’s are permanent memory in your computer. When you pull the cable, or close your computer, you will loose the information stored in RAM, but the information stored in Hard Drive or SSD will be saved. Most of the programs written in any programming language do operations with RAM, Hard Drive or SSD in your computer. This type of operations called I/O (Input/Output) operations. Most of the times, you will work with your RAM in your programs, hence, RAM usage is important.</p><p>Why did I explained this? Because, every variable you created will be stored in a place in your computers memory devices. If you define a really long string, then this string will capture some of your memory in your computer until the program finishes. This also works with numeric variabels you defined in your code. Later of this series, I will introduce you packages such as NumPy and Pandas, which let you control your memory in your computer more than Python do.</p><p>Let me give you an amazing information. Python is built by using C programming language, which has really high performance in terms of it’s speed and memory usage. When you define a variable by using Python code, this variable will be stored in memory in the best possible way by the help of C programs underlying in the Python interpreter. This is actually why you do not need to define a variable’s type, as C does this for you. If you do not familiar with the strongly or dynamically typed languages, check out this link:</p><p><a href="https://medium.com/@alitahasubfly/practical-python-for-beginners-1-5cab290a5a54">Practical Python for Beginners #1</a></p><p>I know I wrote too much, but to conclude this section, all I wanted to say is each numeric you define in your Python code will use memory from your computer and each variable stored differently in your computer system. So let’s dive in to numerics!</p><h3>Integers</h3><p>Like every variable initalization, we define integers in Python like this:</p><p>my_age = 21</p><p>That’s it, we just defined our first number! Is that it? NO! We absolutely have many more.</p><p>Just before continue, I want you to introduce you the Python interpreter! This is special application that can be run in your command line in your computer! But what does it mean? I do not want to get in installation part of the Python, especially in Windows, as it is just downloading the .exe file and running it. Anyway, macOS and Linux operating systems come with pre-installed Python interpreter which you can easily run by opening your terminal and typing these:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lV9XHM0UAN1773iAbtWZ4A.png" /><figcaption>Python interpreter in macOS</figcaption></figure><p>When you type “python3” in your terminal, it runs Python version 3, when you type “python”, it will run Python version 2.7 which is the latest version of Python2 series and lost the support in the beginning of this year, sadly.</p><p>For Windows computers, get in the search bar by tapping “windows” key in your keyboard and search for IDLE and open it. This is the Python interpreter designed for you to work with Python, without running Python in CMD in your Windows computer. Anyway, let’s continue with integers in the interpreter!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l706wVtDuLY5nVzCZu438Q.png" /><figcaption>Simple integer initalization in Python3</figcaption></figure><p>Do you remember I said we have many more in Python? One of the most important thing you can do with any programming language is Arithmetic Operations! And Python supports all of them! For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aS5FTPOr-EdE7uV8q7TgQQ.png" /><figcaption>Simple arithmetic operations in Python3</figcaption></figure><p>Did you see the last output? The number 0.5 is a floating point type in Python. You can easily check their types by using “type()” function in Python!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6VUA8BMxvgAysZw17YaOw.png" /><figcaption>type() function example</figcaption></figure><p>But what about more than two variables in an arithmetic operation? As you guessed, Pyton also support it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWyHyIYG6rWmBuCSlWzinw.png" /><figcaption>Complex arithmetic operations in Python</figcaption></figure><p>But wait! Did you remember that form our previous example, when we wanted to print x+y, then it printed “15&quot; directly. But in this example, we have an integer “77”, but it printed “77.0”. Why? This is because that divison operation! Consider the PEMDAS method in Math, which we start with parantheses, then exponentiation, then multiplying, then division, then addition and finally substraction. Now consider our example. At first, we multiplied b with c, hence we get 150. Then we divided 150 with 2 hence we get 75, then we add 5 to it which is 80. And finally we removed 3 from it which we must get 77! But we get 77.0! WHY? This is because of that single division operation in the middle. In Python, integer division and floating point division is different. If you want to divide two numbers and get the integer result, you have to use double slashes like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkfTPu7MVYYo2S48l5ycEg.png" /><figcaption>Difference of / and // in Python</figcaption></figure><p>Considering PEMDAS methodoly, lets add exponentiation and parantheses in our code. You can do exponantiation by using “**”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gp0HUP54a14PLwXM890Ekg.png" /><figcaption>Exponentiation in Python</figcaption></figure><p>Let me explain you the last two outputs. In the third output, you see that b and c are in the same parantheses, which lead to first doing the operation b**c then exponentiate with a. In last example, you have seen the results are same. Now see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aJhS0Vh5W0fko9fPkCd5iQ.png" /></figure><p>First, I tried a**b, then exponentiated it with c but results are different! This is because the Python<strong> interpreter starts from the end to the beginning! </strong>Don’t forget that ever!</p><h3>Floating Point Numbers</h3><p>I have already talked about FPN in integers section, but let’s start with initalization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AN9HX5ycS0m6hQb7tCPG-Q.png" /><figcaption>FPN initialization in Pyhton</figcaption></figure><p>As you can see, we define FPN’s by using a “dot”. Which also helps both us developers and code compiler to understand where is the integer part and where is the floating part. To explain better, the left part of the dot is integer part and the right part of the dot is the floating part. In addition to that, you can define FPN’s like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NqxjUE9355bjcDpelBIfA.png" /></figure><p>As you can see, you can also define FPN’s with a point only with a dot after the integer part, and you can do the same thing with floating part:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nw-WJEVGU_V0cg6saoYGAg.png" /></figure><p>Like integers, you can do the same operations related to FPN’s:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pP62O52dKIDsIzFZ_G7MuA.png" /><figcaption>FPN Arithmetic Operations Example</figcaption></figure><p>In addition, FPN’s support exponentiation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V0EydpiWlznhl7qvmR3dGA.png" /></figure><h3>Complex Numbers</h3><p>Unlike integers and FPN’s, there are little or less usage examples of complex numbers in Python. If you do not know about complex numbers, let me explain you simply: Complex numbers are the numbers that we can not show in the numerical axis. They are basically imaginary numbers that do not exists, but used on important math calculations. The complex numbers are defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4LhkHmIFs59iPx9i9PlzmQ.png" /><figcaption>Complex Number Example in Python</figcaption></figure><p>In addition you can do arithmetic operations like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkiVJ7yhkAY9tvU6UOeoXQ.png" /><figcaption>Arithmetic Operations with Complex Numbers in Python</figcaption></figure><h3>Assignment Operations with Numerics</h3><p>At this section, I will give you some important tips and tricks with numerics. Let me give you an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5e5TYQHsfosCpuGiSISUiw.png" /></figure><p>Now let me explain. When you are working only with two operands in an arithmetic operations, you can both do the assignment and arithmetic operations in one line. In addition, you can do something like this, but I do not prefer and never used in my life:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FdOaPJiYkLhKouPiSV-nbQ.png" /></figure><h3>Numerics and Strings</h3><p>Do you now that you can do some operations between numerics and strings in Python? For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CrtWeOvPX57Um2QQVWY4Kw.png" /></figure><p>You can basically multiply strings with numbers, and string will be copy itself to its multiplier! In addition, you can add integers to strings with a little trick such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2vs0R2mz9MPmrc3OLDUHA.png" /></figure><p>We will dive deep in such operations in the feature, but this is important that you need to know how to convert a numeric to a string because we will use print function more than ever in the next parts of these series.</p><p>That’s all for today folks! If you have any questions, write down below, I will try to answer them as fast as possible to you! Until next time, keep safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4092be0530b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/practical-python-for-beginners-part-1-2-numerics-4092be0530b0">Practical Python for Beginners Part #1.2::Numerics</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Python for Beginners Part #1.1::Strings]]></title>
            <link>https://medium.com/swlh/practical-python-for-beginners-part-1-1-strings-6b8bd59270bd?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b8bd59270bd</guid>
            <category><![CDATA[string]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Thu, 08 Oct 2020 15:38:49 GMT</pubDate>
            <atom:updated>2020-10-17T09:42:43.990Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back! Last time, I introduced you to variables but the whole subtopics in topic needs more explanation for it’s own. So let’s start!</p><p>String is the data type that where we store the text data. You can use quotes or double quotes to indicate your data is a String. String data type is stored in the Python as “str” and you check the type by basically writing a line like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*T7mWZ22TWv8_9GyhjhMeXg.png" /><figcaption>Output of the interpreter for type() function</figcaption></figure><p>In industry, we use Integrated Development Environments (shorthand for IDE). These software that we use are help us to write codes. My favorite code editor (or IDE) is VSCode and I highly recommend you to use IDE’s to write your codes. I wrote this paragraph to show you this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMfYQd_hChPCELGw1FPfcA.png" /><figcaption>Code sugesstion features in VSCode</figcaption></figure><p>In VSCode, you can get code suggestions while you are writing your code. This is essential while learning a programming language because this suggestions are shown to you to get an idea while you are writing. The suggestions that you see from image above are basically what we call “methods”. Each object has it’s own methods or attributes in Python but this is another topic which we discuss in future. All you need to know is, there are things you can do with these methods and the detailed explanations are given in the box. I can explain them one by one in here, but rather than doing this, I encourage you to look them yourself, try them and see the outcomes. All I can give you is how to read the box on the right to understand what these methods do.</p><p>So in this example, lets start with the image above. You can see that we are currently looking into startswith() method and it’s explanation is given in the box. The information given in the above of the yellow divider is the initials/parameters and their types along with the returning value of the method. I know it is confusing but bear with me, it is easier than you thought. For this time, until we dive deep into OOP, stick with the explanation given in the below of the yellow divider. These sentences are enough for you to understand what the according method do.</p><p>To see the results of the method, you can print the functions. We have already used print function before but I have never talked about it. Print function (as the name suggest) prints the value inside of it to the screen. By screen, I mean the terminal. But wait, what is terminal. For now, you can basically think the terminal is the blackbox area under the IDE. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*f9rKRHpqN03OeDI9H2lPFA.png" /><figcaption>Eample code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*QgVrej3z-ky00u7LDE6q7g.png" /><figcaption>You have to press that green “run” button on the top right of the IDE to run your code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pol5IMLHN6gB4e_F6f3sPg.png" /><figcaption>You can see the output below on the screen at the terminal</figcaption></figure><p>The important part while you are doing this is to adding parantheses in the end of the methods. Some of the IDE’s do it for you but in VSCode, you have to do it yourself or you can configure the settings on your IDE to achieve this. If you do not add the paranthesis at the end, than you will get unexpected results.</p><p>One of the important thing I need to say to you is, strings in Python can be considered as lists. In advance, you can act a string as a list. You will understand more about the topic that I give you below in the “Lists” article. But know, let’s give you some examples.</p><p>First of all, you can dive into any string by using brackets. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*0aYRmdylEZcjl8_e-qkB8A.png" /></figure><p>The output of the code is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L3sQ9baONOgJuIjtTcH5NA.png" /></figure><p>As you can see, I used square brackets to get into specific parts of the string. This is called indexing and the operation that I did with square brackets are called indicing. But wait a minute! Why did I used 0? This is the most important topic in the computer science. From born, you have used 1 as the starting point but in computer science, we start from 0. So if I want to do something with the first character in my string, then I access it by using [0], to the second character I use [1] and so on. But what about that -1? In Python, you can start from the end by using negative index numbers. Since -0 do not exists, than you get the last character in a string by using [-1], for the second character at the end of string you can use [-2] and so on.</p><p>In addition to that, it is possible to get a portion of the string by using brackets and indicing. Such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PC-Wh7e-PRcplJtS8V-Xrw.png" /></figure><p>And the output will be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnJOv00m-dZUjsZVP6a-kw.png" /></figure><p>To explain more, line #2 prints “A” because it is the first character and #3 prints “.” as it is the last character. Line #4 prints the string portion from the 4&#39;th character to 8&#39;th. As you can see, line #5 did not print anything as there is a bug on the line. To see the exact output, you can change the -5 with -9 and -9 with -5. To understand why this is happening, just imagine the numerical axis. And finally, last line prints the proportion from the 4&#39;th character in the string to the 5&#39;th character in the string from the end.</p><p>Did these numbers confused you? Let me explain deeper. Indicing operation has a convention itself. The convention starts from the (index you choose+1) and ends in the (index you choose). Why line #4 printed the 4&#39;th character? Because indexing starts from 0 and the index I chose was 3. Hence 3+1=4. The index you chose in the last is omitted. Hence in line #4, our printed string ended in the 7&#39;th character. You can learn about these rules more by trying yourself.</p><p>Finally, to dig deeper, I give you the formula of indicing:</p><p>output_string = input_string[start_index : end_index : step]</p><p>But what about step? We have not used that before! As the name suggests, the step parameter will give you the characters combined in a string in the domain of given start end indices in each step that any character occur. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XU7kXrM0C_qmmZK5Af_SJA.png" /></figure><p>And the output will be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Qfd_izKIRBpSv2x4lM_Cg.png" /></figure><p>And last but not least, you can easily reverse a string by using this indicing ability such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtxEHpV26lR-kHDb7diwkQ.png" /></figure><p>And the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkBzE0u0Q2Ey8ND2nanJ2A.png" /></figure><p>You can see, I left the start and the end part blank in the expression. If you leave any of them blank, then the indexing operator works with “rest” logic. Hence, in English, I said to the computer that print my string from starting to the rest by stepping backwards.</p><p>That is all for this article! Next time, we will dive in to numerics in Python! See you next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b8bd59270bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/practical-python-for-beginners-part-1-1-strings-6b8bd59270bd">Practical Python for Beginners Part #1.1::Strings</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Python for Beginners #1]]></title>
            <link>https://medium.com/@alitahasubfly/practical-python-for-beginners-1-5cab290a5a54?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cab290a5a54</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[variables]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Thu, 08 Oct 2020 13:11:01 GMT</pubDate>
            <atom:updated>2020-10-08T13:11:01.562Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone! This is the beginning of the series “Practical Python for Beginners”. My aim on this series is to teach you Python as simple as possible in addition to minimal computer science knowledge. Lets start!</p><p>First of all let me confuse you with some redundant knowledge. Programming languages are tools that we use to create softwares/applications/snippets/ scripts that run on a huge variety of devices. Python is also a programming language which can be used for general purpose. You can build games, scripts, software applications and many more with a simplicity. Personally, I define Python as “anyone can write as long as they know English”.</p><p>Let’s dive into code. Let me introduce you variables;</p><p>string = &quot;Ali Taha&quot;<br>integer = 3<br>float = 3.14<br>basic_list = [1,2,3]<br>basic_dictionary = {&quot;name&quot;:&quot;Ali&quot;, &quot;age&quot;:21, &quot;best_number&quot;:2.52}</p><p>As you can see there, we use variables to point the data that we are going to use in code. This is basically called initialization. You “initalize” a name to a data. From our example, I assigned name “string” to the data “Ali Taha” or I assigned name “integer” to the data “3”. In addition to that, these are the practical ways to make initalizations in Python.</p><p>Furthermore, to explain briefly, strings are the data that we store words/senteneces and characters. We will get into lists and dictionaries in later.</p><p>As another example:</p><p>name = &quot;Ali Taha&quot;<br>age = 21<br>university = &quot;Bilkent University&quot;</p><p>As you can see, I name my data with respect to what I want to point to. So if my data is a name, than I point to data as “name”, or to an age, I point it as “age” and so on. This is important that to use good namings on variables as in future, these namings could become so unfamiliar to you that you can not even understand why did you used that variable before. Also, select your namings as short, brief and explanatory as possible. Don’t do something like:</p><p>the_variable_that_contains_first_and_middle_name = &quot;Ali Taha&quot;</p><p>or</p><p>x = &quot;Ali Taha&quot;</p><p>The most important part on variables in Python is that, you have probably seen or first time that you see this but, Python is not a strongly typed language. For example, in Java or C++, you create your variables like:</p><p>String name = new String(&quot;Ali Taha&quot;)</p><p>In anywhere of your code, you can use variable “name” to change something like:</p><p>name = new String(&quot;Hanna&quot;)<br>name = new String(&quot;Turkey&quot;)</p><p>but you can not do:</p><p>name = 22</p><p>Because, in strongly typed languages, if we define a variable as a specific type, it is impossible to use it as another type (except type casting, we come for that part later).</p><p>But Python let us to do this:</p><p>name = &quot;Ali Taha&quot;</p><p>and then, somewhere in your code:</p><p>name = 22</p><p>and Python does not bother with it! But you maybe asking that, what if somewhere in my code I need the string type of name, not the number type such as:</p><p>print(name, &quot; is 22 years old&quot;)</p><p>which prints to your screen “Ali Taha is 22 years old”. But if we assign “name” to “22”, then this will print to your sceen “22 is 22 years old” (but there is an exception on this code which we will come back later :D). So basically, Python let you to assign your variable to anything at anytime and gives you this freedom but this freedom will couse to crash your program or deal with hard problems. So you need to careful while creating and reassigning your variables.</p><p>Our last part with the variables is to introduce you to lists and dictionaries. I know that these are the topics for a whole story, but I want you to left you with no questions. So let’s dive in!</p><p>Lists are basically a data structure itself. These variables hold “any type” of data in order. You create a list with square brackets, and put your data seperated by commas. For example:</p><p>my_list_one = [&quot;Ali&quot;, &quot;Taha&quot;, &quot;Turkey&quot;]<br>my_list_two = [1,2,3,4,5]<br>my_scrambled_list = [&quot;Ali&quot;, 22, 3.14]</p><p>There is no restriction on creating lists in Python, you put any type of data you want. Hence, you need to be carefull while dealing with lists.</p><p>The same rules are also applies to dictionaries. If you open a dictionary book, then you see, a word and their corresponding meaning. The dictionaries in Python are initalized with curly braces. Dictionaires in Python has keys and their corresponding values, except, the both side can be different types. For example:</p><p>my_name_dictionary = {&quot;Name 1&quot;: &quot;Ali&quot;, &quot;Name 2&quot;: &quot;Taha&quot;}<br>my_personal_info = {&quot;Name&quot;:&quot;Ali Taha&quot;, &quot;Country&quot;:&quot;Turkey&quot;, &quot;Age&quot;: 22}<br>my_scrambled_dictionary = {0:&quot;Ali&quot;, &quot;character&quot;:15, &quot;Data&quot;:[1,2,3]}</p><p>Like lists, dictionaries can hold any type of data like lists, but these relations will be improved further in the next series.</p><p>That is all for today. Next, we will dive into each data type. So stay tuned, see you next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cab290a5a54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction]]></title>
            <link>https://medium.com/@alitahasubfly/introduction-e1309e6323a9?source=rss-e55cb0fad5f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1309e6323a9</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ali Taha Dinçer]]></dc:creator>
            <pubDate>Mon, 05 Oct 2020 15:44:46 GMT</pubDate>
            <atom:updated>2020-10-05T15:44:46.536Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been a long time since I wanted to start blogging. I believe that, no matter what, any information is important and the value of information increases by sharing. It’s been years I first started reading Medium and personally, I learned a great number of things from Medium.</p><p>Since I am a senior student in my university and accomplished to gain knowledge from both here and the internet, I finally decided to create a blog here and start to share what I learned from endless amounts of works/projects.</p><p>The first thing I wanted to tell you is, the articles will be about my personal experiences and my aim is to teach you what I learned and experienced as clear as possible. Everyone has a topic of interest and so do I.</p><p>I have started to be in the industry of Machine Learning lately but also I am an experienced Flutter developer. So basically, I will start by creating articles about both topics in time.</p><p>My roadmap for sharing my knowledge on Medium will start with Machine Learning but I mostly work with Python. Hence, there will be many articles about Python to encourage anyone who wants to start this journey.</p><p>Stay tuned ✌🏻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1309e6323a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>