<?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 Hadi Tok on Medium]]></title>
        <description><![CDATA[Stories by Hadi Tok on Medium]]></description>
        <link>https://medium.com/@oshamahue?source=rss-9d967fa37eb3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yBOoErvxKPFheR0kefpXOg.jpeg</url>
            <title>Stories by Hadi Tok on Medium</title>
            <link>https://medium.com/@oshamahue?source=rss-9d967fa37eb3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:57:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oshamahue/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[Being a better developer: Self Improvement]]></title>
            <link>https://oshamahue.medium.com/being-a-better-developer-self-improvement-20ef278a4f36?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/20ef278a4f36</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Sat, 25 Dec 2021 12:44:00 GMT</pubDate>
            <atom:updated>2021-12-25T12:44:00.871Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been trying to be a better developer throughout my career. I had some idea on what that means but after joining Meta(previously Facebook), I can now better formulate some of the things. Soft skills are usually overlooked but while the scope for a developer widens soft skills become more and more important. I haven’t shared for a while and I realized I want to talk about this topic. I am doing so, starting with this post.</p><p>Some disclaimers:</p><ul><li>I am not saying if a developer doesn’t have some particular qualities they are bad. The traits I will talk about are not binary. Every developer should have some level of them as part of their jobs and personalities. Some of the things I will talk about could be contradictory. Adaptation is a really important skill I will talk about later.</li><li>I am not trying to reflect how I see myself and brag about it. For some of the skills I think I am ok, for some I am trying to get better at, but for some I have a long way to go. I had a chance to work with many great people and they inspired me with some of the qualities they have.</li><li>These are my own opinions and these may not coincide with my current and previous employers’, yours, or some well known personalities’ opinions.</li></ul><p>Now we set the ground rules so we can get started.</p><h3>Self Improvement</h3><p>As I am writing this series of posts, I am kind of implying that developers should get better with these skills, at least keep them in mind and be self aware. So it should be fair to start with “Self Improvement”.</p><p>First I thought of writing about self learning but then thought it would be half of the picture so decided to talk about “Self Improvement”. Let’s first talk about Self learning and then the difference between two.</p><h3>Self learning</h3><p>I don’t think I have to emphasize how learning is important for Software development. It is mentioned in almost all job postings, resumes and cover letters.</p><p>Pedagogy might have some terms for what I am talking but I think we can classify levels of self learning into four:</p><p><strong>Autopilot: </strong>After gaining enough competence at a role, a developer can start doing their job without putting too much effort into it. They don’t need to learn anything new to operate.</p><p><strong>Spoon feeders: </strong>At this level the developers consume the information that is readily available to them or pointed out to. This could mean they are just consuming material to onboard on a role and trying to stay afloat until onboarding is complete or leeching other people because they are simply lazy or incompetent. It may not seem fair to place these two cases into the same type but they both are not responsible from their learning journey mostly.</p><p><strong>Independent learners: </strong>They are aware of what they <strong>need</strong> to learn to do their jobs. They do not need to be told what to learn. They also have some idea what their learning plan would be like.</p><p><strong>Proactive learners: </strong>Proactive learners show an extra effort to go out of boundaries of their job requirements and also try to learn things that would help them to do their jobs <strong>better</strong> or what <strong>could</strong> be useful in the future.</p><p>A developer may change groups throughout their careers. Motivation is the biggest factor on how much they want to learn and in which group they want to be in. Self drive is not the only source of motivation. Company, project, team, role and personal life are also other sources of motivation and demotivation. There are different periods in my career I swinged in between autopilot and proactive learner. It is really important to be self aware and seek opportunities to level up.</p><h3>Self Learning vs. Self Improvement</h3><p>Rules of chess is really simple but learning the rules does not make you a grandmaster. You may argue that not everyone would want to be a grandmaster but for even being a good player in a region, you probably need to read a lot of books to<strong> learn </strong>games and techniques and practice a lot to absorb the knowledge you acquired from the books to <strong>improve</strong> your game.</p><p>Software development (or anything in life) is not different. After graduating from the university I had really low confidence. I had learned a lot of things but I had no idea how to convert them to a software product. It took me a while after landing my first job to gain confidence and say that I can survive.</p><p>Another example would be RxJava and Observer pattern and I know I am not the only one who went through this. Observer pattern sounds simple but I can say that after over using it all around the project and after realizing it wasn’t a good idea and removing it from 99% of the code base, I think I grasped it and it is now in my toolkit as a part of my developer personality.</p><p>As the aim of this post series, self improvement does not only consist of technical skills, a developer should also work on their soft skills constantly. It is important for anyone to ask themselves where they want to be in the future and decide what kind of professional personality they want to have. Being aware of the delta from what they are now and having conscious decisions for obtaining skills to close the gap is a really important process for career progression. For learning new skills, being an independent learner might be enough to have a good career but for soft skills, a developer should be more proactive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20ef278a4f36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Online soru sorma]]></title>
            <link>https://oshamahue.medium.com/online-soru-sorma-d12f047ae86f?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d12f047ae86f</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[turkish]]></category>
            <category><![CDATA[asking-for-help]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Sun, 04 Apr 2021 13:44:03 GMT</pubDate>
            <atom:updated>2021-04-25T21:36:00.539Z</atom:updated>
            <content:encoded><![CDATA[<p>Bir süredir online/offline olarak yazılım topluluklarının içerisindeyim. Elimden geldiğince bildiklerimi paylaşmaya çalışıyorum. Bunun bir yolu da Slack, Telegram gibi ortamlarda soru cevaplamaya çalışmak. Yazılım alanında tecrübe kazandıkça nasıl soru sorulması gerektiği daha çok anlaşılıyor fakat yazılıma yeni başlayanların da bu kuralları bilmeleri sorularına cevap alma şanslarını arttıracaktır. Türkçe böyle bir kaynak var mı diye bakındım fakat bulamadım. Sizin de aklınıza gelen eksik kalan yerler varsa yorum yazarsanız sevinirim.</p><h3>Soru sormadan önce</h3><p>Probleminizi Google’da aratın. Google’da arama yapabilmek bir yazılımcı için en gerekli becerilerden birisidir. Ne kadar tecrübeli olursa olsun bir insanın herşeyi bilme veya hatırlama şansı yok. Yazılım’a yeni başlıyorsanız sormak istediğiniz şey %99 daha önce sorulmuş ve cevaplanmıştır. Bu yuzden bir an önce bir probleminiz olduğunda bunu Google’dan nasıl aratacağınızı öğrenin.</p><p>Nasıl arama yapacağınızın detaylarına çok girmeyeceğim ama uygulamanız crash alıp kapanıyorsa crash ile alakalı bilgilerin yer aldığı stacktrace bir yerlere loglanıyordur. Android’de stacktrace’ler <a href="https://developer.android.com/studio/debug/am-logcat">Logcat’e</a> loglanır. Karşılaştığınız stacktrace’in ne demeye çalıştığını anlatan<a href="https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace"> bu yazıyı</a> da incelemeniz faydalı olacaktır. Stacktrace’in ne dediğini anlamak kendi kendinize sorunu bulmanızı sağlayabilir.</p><p>Bulduğunuz cevabın probleminizi çözeceğini anlamak ilk başlarda zor olabilir. Bu yüzden bir çok şeyi denemeniz gerekebilir. Stackoverflow’da daha yüksek oy almış cevapları uygulamak başarı şansınızı arttırır. Ama bazen bir problemin farklı kaynakları olabiliyor. O yüzden problem çözülene kadar farklı çözümleri deneyin. Bir cevap sorununuzu çözüdüyse oy verebiliyorsanız oy verin. Bu başkalarının da doğru cevaplara ulaşmasını sağlayacaktır.</p><p>Google’da arama yaptınız çözüm bulamadınız ya da bulduğunuz çözümler işinize yaramadı. Artık soru sormanız gereken noktaya geldiniz.</p><h3>Nerelerde sorularımı sorabilirim?</h3><p>Bu konuda ilk akla gelen yer tabiki <a href="http://stackoverflow.com/">stackoverflow.com</a>. Stackoverflow’da nasıl soru soracağınız ile alakalı <a href="https://stackoverflow.com/help/how-to-ask">bu yazıyı</a> okuyabilirsiniz. Bu yazı genel olarak nasıl soru sormanız gerektiği konusunda da yardımcı olacaktır. Stackoverflow’da soru sormak biraz daha tecrübe gerektiriyor fakat bu sizi alıkoymasın. En fazla eksi oy alırsınız ya da sorunuz cevaba kapatılır. Stackoverflow’da reputation denilen bu internet puanlarının pek bir önemi yok açıkcası. Soru sorabilme becerisini kazanmak daha önemli.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Jiyr9X3_oNVMMNFI7c7OdA.jpeg" /></figure><p>Stackoverflow dışında Android ile akla gelen türkçe soru sorabileceğiniz platformlar: <a href="http://gdg.ist/slack">GDG İstanbul slack</a>, <a href="https://t.me/androidturkey">Android Türkiye telegram</a>, <a href="https://androidistanbul.herokuapp.com/">Android İstanbul slack</a>. Diğer teknolojiler ile alakalı benzer gruplar var. Google araması ile bulabilirsiniz.</p><h3>Nasıl soru sorabilirim?</h3><p>İlk olarak şunu bilmeniz gerekiyor. Problem sizin probleminiz ve problemin çözümü için çaba göstermesi gereken kişi sizsiniz. Sizin yapmanız gereken şeyleri başkasının yapmasını beklemeniz sorduğunuz soruya cevap alma şansınızı düşürür. Sorunuzu sorarken bunu aklınızda bulundurmanızda fayda var. Yani soruyu cevaplayacakların işini ne kadar kolaylaştırabilirim diye düşünün.</p><h4>Soru sorabilir miyim?</h4><p>Online ortamlarda soru sormanın birinci kuralı budur: ‘<strong>Soru sorabilir miyim?‘ diye sormayın.</strong> Zaten soruyu soracağınız ortam muhtemelen soru sormak için kurulmuştur. Bu yüzden direkt sorunuzu sorun. Benzerbir soru kalıbı <strong>“Android’den anlayan kimse var mı?”. </strong>Bunu da sormanız çok gereksiz. Zaten sorduğunuz sorunun cevabını bilen varsa cevaplayacaktır.</p><h4>Özelden yazma</h4><p>Soruları cevaplayanlar gönüllü insanlar. Bu işi para için değil, insanlara yardım etmek ve birlikte öğrenmek için yapıyorlar. Sorduğunuz soru cevaplandığında başkaları da bu cevaptan faydalanabiliyor. Bu yüzden eğer karşı tarafı tanımıyorsanız ya da özelden sormak için olur almadıysanız özelden yazmak çok iyi karşılanmaz. Çünkü birisinde özelden yazdığınızda bu topluluk faydası olmaktan çıkıp bireysel faydaya dönüyor. Bence kişisel olarak birinden problemimizi çözmesini beklemek için alacağımız hizmetin ücretini ödememiz gerek. Sonuçta bu işten para kazanıyoruz/kazanacağız ve bizim yapmamız gereken bir işi başkasının bizim için yapmasını istiyoruz.</p><h4>Spesifik olun</h4><p>“<em>Bir chat uygulaması nasıl yazabilirim?</em>” gibi bir soruya cevap almanız çok olası değil. Bu online platformda kısa sürede açıklanabilecek bir soru değil ne yazık ki. Böyle bir uygulama yapabilmek için belki yıllarca tecrübe gerekli ve boyle bir soru sormanız böyle bir tecrübeniz olmadığının kanıtı. Sormanız gereken soru daha çok “<em>Chat uygulamasının backendi için hangi teknolojiyi tavsiye edersiniz?</em>” ya da “<em>Chat uygulaması geliştirmek için tavsiye edebileceğiniz bir kaynak ya da kaynak kod var mı?</em>” ya da “<em>Chat uygulaması geliştiriyorum, mesajlar çok geç geliyor. kodum bu adreste. Gecikmenin sebebini nasıl anlayabilirim ve çözebilirim?</em>” gibi olmalıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*BLf9UvHlf_xYb5pErz8E8g.jpeg" /></figure><h4>Soru sorma formatı</h4><p>Sorunuzu sorarken:</p><ul><li>Yazdığınız kodun ne yapmasını beklediğinizi fakat ne yaptığını</li><li>Sorunun çözümü için denediğiniz şeyleri ve aldığınız sonuçları</li><li>Kodunuzun gerekli kısımlarını</li><li>Aldığınız hata mesajlarını veya stack trace’i</li></ul><p>paylaşmanız güzel olur.</p><p>Bazen bir problemi çözmeye çalışırken başka bir problemle karşılaşırız. Bu durumda sorumuzun içerisinde asıl problemimizi de belirtmemiz faydalı olur. Denediğimiz şeyleri paylaşmamız başkalarının denediğimiz şeyi önermesini ve vakit kaybını önler.<strong> Kodumuzu veya stacktrace’i paylaşırken screenshot alıp paylaşmayın. </strong>Bu aldığımız hata mesajını ya da kodu aratıp çözüm bulmaya çalışacakların işini zorlaştırır. Paylaşmak istediğimiz kodu <a href="https://gist.github.com/">gist</a> üzerinden github hesabımız ile paylaşabiliriz.</p><h3>Soru sorduktan sonra</h3><p>Sorduğunuz soruları kimsenin cevaplama zorunluluğu yok. Bunu aklınızda bulundurun. Beklediğiniz türde cevap gelmese bile saygılı olun. Verilen cevabı anlamaya çalışın ve denemelerinizin sonuçlarını bildirin. Sorunuzu başka bir şekilde çözerseniz bile nasıl çözdüğünüzü sorduğunuz ortamlarda paylaşın.</p><p>Son olarak soru sorulan ortamların parçası olmaya çalışın. Başka insanların sorularını cevaplamaya çalışın. Bu sizin daha fazla şey öğrenmeniz için faydalı olacaktır.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d12f047ae86f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google, Rekabet Kurulu anlaşmazlığı ve Android uygulamaların geleceği II]]></title>
            <link>https://oshamahue.medium.com/google-rekabet-kurulu-anla%C5%9Fmazl%C4%B1%C4%9F%C4%B1-ve-android-uygulamalar%C4%B1n-gelece%C4%9Fi-ii-c5c943d4ff14?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5c943d4ff14</guid>
            <category><![CDATA[google-play]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[google-play-services]]></category>
            <category><![CDATA[turkey]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 09:36:47 GMT</pubDate>
            <atom:updated>2019-12-20T09:36:47.285Z</atom:updated>
            <content:encoded><![CDATA[<p>İlk yazıda Google’ın Türkiye’de satılacak telefonlara uygulama lisansı vermemesinin Türkiye’deki yazılım geliştiricileri neden ve nasıl etkileyeceğinden bahsetmiştim. Bu yazıda Android projelerde neler yapmanız gerektiğinden bahsedeceğim. Tabi Türkiye pazarını hedeflemiyorsanız bunlar gerekli değil. İlk yazıya aşağıdaki linkten erişebilirsiniz.</p><p><a href="https://medium.com/@oshamahue/google-rekabet-kurulu-anla%C5%9Fmazl%C4%B1%C4%9F%C4%B1-ve-android-uygulamalar%C4%B1n-gelece%C4%9Fi-i-c6624324a999">Google, Rekabet Kurulu anlaşmazlığı ve Android uygulamaların geleceği I</a></p><h3>Google Play Services ve Firebase Kullanımı</h3><p>İlk başta yapmanız gereken, en kısa sürede hangi Google Play Services ve Firebase Servislerini kullandığınızı belirlemeniz. Google Play Services kütüphanelerinin listesine <a href="https://developers.google.com/android/guides/setup">buradan</a> Firebase kütüphanelerinin listesine <a href="https://firebase.google.com/docs/android/setup#available-libraries">buradan</a> erişebilirsiniz. Cihazda Google Play Services’in olup olmadığını ve versiyonunu kontrol ettiğimiz isGooglePlayServicesAvailable (<a href="https://developer.android.com/reference/android/content/Context.html">Context</a> context) fonksiyonunun sonucunda ne yaptığınızı incelemek iyi bir fikir olabilir. Eğer Google Play Services cihazda yüklü değil ise uygulamayı kapatıyorsanız bu kodu gözden geçirmek zorunda kalabilirsiniz. Google Play Services’i kullanmıyorsanız o zaman şanslısınız demektir. Geriye sadece(!) uygulamanızı Google Play olmadan nasıl dağıtacağınızı düşünmek kalır.</p><p>Şunu belirteyim bir günde uygulamanız kullanılmaz hale gelmeyecek. Bu yüzden sakin davranmakta fayda var. Fakat olabileceklere karşı gerekli planlamaları yapmak önemli. Kararın değişmemesi sonucunda yeni telefonlarda Google Play olmayacak. 2020&#39;den sonra çıkan telefonların kullanımı arttıkça uygulamanızı kullanabilenlerin sayısı azalacak.</p><p>Bence bu kararın değişmeyeceğini gösterebilecek iki şey var. İlki Google uygulamalarının olmadığı telefonların piyasaya çıkması, ikincisi ise telefon üreticilerinin Türkiye pazarından çekilmesi. Hiç bir üreticinin Google uygulamaları (özellikle Google Play) olmadan telefon çıkarmaya ya da bir ülkeden çekilmeye istekli olacağını zannetmiyorum. Eğer bunlar oluyorsa artık Google ve Rekabet Kurumunun anlaşma ihtimali kalmamış demektir. Bu noktadan sonra uygulamanızın Google Play’e (Push notifications, Google Ads vs) ne kadar bağımlı olduğunu inceleyip Türkiye pazarı artık size uygun mu bunu değerlendirmeniz.</p><p>Türkiye pazarı sizin için önemli ise şimdiden kullandığınız servislerinin alternatiflerini araştırmak ve hangilerinin sizin için uygun olduğuna karar vermek faydalı olacaktır. Bu değişikliklerin uygulamalarınızı ve uygulamanızdaki akışları ne kadar değiştireceğini belirleyin. Ne kadar bir iş yükü sizi bekliyor bunu çıkarın. Böylelikle teknik tarafta ne kadar etkilendiğinizi görmüş olursunuz.</p><p>Değiştirmeyi planladığınız kütüphaneleri bir interface’in arkasına abstract etmek güzel olabilir. Bundan kasıt Google Play Services ve Firebase kütüphanelerine direk erişmektense oluşturduğunuz başka bir interface’in objesi üzerinden erişmek bu kütüphanelerin daha kolay değiştirilebilmesini sağlar. API Abstraction genel olarak iyi bir yazılım geliştirme uygulaması olmasına karşın genelde ihmal edilir. O yüzden bunu her türlü yapmanız zararınıza olmaz. Bu geliştirmeleri iş yoğunluğunuza göre planlayabilirsiniz.</p><h4>Bildirimler</h4><p>Bildirimler için özel bir başlık açmak istedim. Diğer kütüphanelerin alternatiflerini bulmanız bir şekilde mümkün. İlk yazıda belirttiğim gibi Firebase Cloud Messaging’in çalışması için sistem seviyesinde yetkiye sahip, arka planda çalışan bir uygulamanın gelen bildirimleri dinleyip gitmesi gereken uygulamalara iletmesi gerekiyor. Sistem seviyesinde yetkiye sahip olması demek kolayca bu uygulamanın yüklenemeyeceği anlamına geliyor. Bunu yüklemesi en mantıklı olan taraf cihaz üreticileri. Cihaz üreticileri kendi aralarında anlaşıp tek bir bildirim servisi üzerinde anlaşmadıkları sürece her üretici kendi bildirim servisini cihazlarına koyabilecek. Bu da bildirimlerin tek noktadan şimdiki gibi gönderilmesini zorlaştıracak. Tüm servisleri tek bir noktadan yönetebileceğimiz servisler çıkacaktır bu süreçte. Bu yüzden bildirimlere çok fazla güvenmeden uygulamanızın nasıl çalışacağını kurgulamanız önemli.</p><h3>Google Play</h3><p>Muhtemelen Google Play olmadığı durumda birden çok uygulama marketi kullanmak zorunda olacağız. Her cihaz üreticisinin ve her GSM operatorunun bir uygulama marketi var diye biliyorum. Uygulamanızın otomatik güncellenmesi için yine sistem seviyesinde yetkiye ihtiyaç olduğu cihazlarda yüklü marketlere mecbur kalacağız. Tek bir sayfadan tüm marketlere uygulamamızı yükleyebildiğimiz servisler çıkacaktır muhtemelen. Bu konuda biraz daha rahat olacağız muhtemelen.</p><h4>Ücretli uygulama ve Uygulama içi satın alma</h4><p>Ücretli uygulamalar biraz daha ücretsiz uygulamalara zorlanacaklar. Apk yönetimi dışında bir de bütün marketler üzerinden satışlarını arttırmaya çalışacaklar ve tüm marketlerden ayrı ayrı alacakları ödemeler için uğraşmaları gerekecek. Uygulama içi satın alma konusunda ise ilk aşamada muhtemelen ödemeleri kredi kartı ile alacaklar, daha sonrasında bu işleri farklı marketler için yapabilen harici uygulama içi ödeme uygulamaları ortaya çıkacaktır.</p><h4>Dynamic delivery ve App Bundle</h4><p>Dynamic delivery ile Google Play üzerinden uygulamamızın farklı kısımlarını dinamik olarak kullanıcı uygulamayı kullanırken indirebiliyoruz. App bundle ise uygulamamızı .apk’dan farklı bir formatta Google Play’e yükleyip kullanıcının cihazına uygun bir konfigürasyonda bir apk indirilebilmesini sağlıyor. Google Play mesela İngilizce xxxhdpi bir cihaza sadece ingilizce ve xxxhdpi resource’ların bulunduğu bir apk gönderebiliyor. Kimilerine göre bu Google’ın tekelci yaklaşımlarının uzantısı olarak ortak bir format olan .apk’nın yerine koymaya çalıştığı bir dosya formatı. Açık kaynak olduğu için bu bana çok olası gelmiyor. Maalesef Dynamic delivery ve App Bundle’ı kullanamayacağız ve her şeyi tek bir apk içerisinde paketlememiz gerekecek. Yakın zamanda bir uygulama marketinin açık kaynak olmasına rağmen App bundle’ı kullanacağını zannetmiyorum. Bunlar görece yeni teknolojiler oldugu için çok fazla projede kullanıldığını düşünmüyorum fakat bizi çok fazla etkilemeyecek her türlü.</p><h3>İmza kampanyası</h3><p>Bu saydığım sebeplerden ötürü çalıştığımız firmalar ve müşterilerinin Android uygulamalarda en iyi ihtimal ile kazançları düşecek ya da zarar edecekler. Ve dolayısı ile daha az Android uygulama ihtiyacı doğacak ve biz de i<strong>şlerimizi kaybetme tehlikesi ile karşı karşıya kalacağız</strong> ne yazık ki.</p><p>Bu tehlikeye karşı en azından sesimizi duyurmak amacı ile Google ve Rekabet kurumuna gönderilmek üzere iki metin hazırladık. Siz de bu metinlere imzanızı atıp destek olmak isterseniz <a href="https://forms.gle/6x2VY9BDv6yGkuyV7"><strong>bu adresten</strong></a><strong> </strong>formu doldurup sesimizi daha güçlü duyurmamıza katkıda bulunabilirsiniz. Gönderilecek metinlede <a href="https://docs.google.com/document/d/1UScQiNoyE9jPC4KB4BWe4MM2ph6uZI20BOFHTm5BJYM/edit?usp=sharing"><strong>buradan</strong></a><strong> </strong>ulaşabilirsiniz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5c943d4ff14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google, Rekabet Kurulu anlaşmazlığı ve Android uygulamaların geleceği I]]></title>
            <link>https://oshamahue.medium.com/google-rekabet-kurulu-anla%C5%9Fmazl%C4%B1%C4%9F%C4%B1-ve-android-uygulamalar%C4%B1n-gelece%C4%9Fi-i-c6624324a999?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6624324a999</guid>
            <category><![CDATA[google-play-store]]></category>
            <category><![CDATA[google-play-services]]></category>
            <category><![CDATA[turkey]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Wed, 18 Dec 2019 12:42:37 GMT</pubDate>
            <atom:updated>2019-12-20T09:38:29.211Z</atom:updated>
            <content:encoded><![CDATA[<p>Google ile Rekabet Kurumunun anlaşmazlığı sonucu Google’ın Türkiye’de satılacak telefonlar için Google uygulama lisansı vermeyecegi haberi gündeme bomba gibi düştü. Hem durum biz Android geliştiricileri ve uygulamalarımızı nasıl etkileyecek, hem de şimdi ve bu anlaşmazlığın devam etmesi durumunda nasıl bir planlama yapmamız gerektiği ile ilgili aklıma gelenleri paylaşmak istedim.</p><p>İlk başta Google uygulama lisansı ne demek ondan bahsedeyim. Android bildiğiniz üzere açık kaynak bir işletim sistemi. İsteyen herkes kaynağı alıp kendi cihazı için derleyip bu işletim sistemini kullanabilir. Bunun en bilinen örneği Amazon Fire ya da Fire OS. Amazon çıkardığı tabletlere kendi Android versiyonununu koydu. İçerisinde Google uygulamaları ve Google play yerine Amazon servislerinin uygulamaları ve Amazon AppStore var. Daha az bilinen örneği Çin malı bazı tablet ve telefonlar. Bu tablet ve telefonlar Google standartlarına uymadıkları için lisans alamıyorlar. Baya yaygın olan fakat az bilinen örneği ise fırın buzdolabı gibi akıllı aletlerde üreticiler, işletim sistemini kendi ihtiyaçları doğrultusunda değiştirip kullanıyorlar. Bu saydığım durumlarda Android kodunu kullanmak için Google’dan bir izin almaya gerek yok.</p><h4>Google Uygulamaları</h4><p>Gelelim asıl konuya; Google uygulama lisansı. Ondan önce Google uygulamaları neler onlara bakalım. Android’de Google uygulamalarını ikiye ayırabiliriz. Google Play ve diğerleri. Diğer uygulamaların çoğu aslında Google’ın webde de olan Gmail, Maps, YouTube gibi servislerin Android uygulamaları. Bunlar son kullanıcı için önemli olsa da biz geliştiriciler için asıl önemli olan kısım Google Play. Google Play bizim için iki açıdan önemli. Bunlardan ilki uygulamalarımızı Google Play üzerinden dağıtıyoruz. Bunun neden önemli olduğunu açıklamama gerek yok diye düşünüyorum. Biz Google Play console’a arada işimiz düşse de aktif geliştirme yaparken genelde kullanmıyoruz. Geliştirme yaparken kullandığımız kısım aslında Google Play Services.</p><h4>Google Play Services</h4><p>Google Play Services konusunu biraz açacak olursak Google Play Android uygulaması doğası gereği başka uygulamaları kurabilmek için normal uygulamalardan daha fazla yetki sahibi. Google Play Services’in diğer bir özelliği de diğer normal uygulamalar gibi işletim sisteminden bağımsız güncellenebilir olması. Android, iOS gibi güncellenen bir işletim sistemi değil. Güncellemelerin kararlarını cihaz üreticileri veriyor ve onlar da bu masraflı işten kaçınıyorlar. Bu yüzden Google normalden daha fazla yetkiye ihtiyaç duyan ve işletim sisteminden bağımsız güncellenmesini istediği servislerinin altyapısını Google Play Services içerisine koydu. Firebase servislerinin tamamı buna güzel bir örnek. Bunlardan en önemlisi tabi ki serverlarımızdan cihazlara veri ve bildirim göndermek için kullandığımız<strong> Firebase cloud messaging(FCM)</strong>. Eskiden bunun ismi yine Google Play Services üzerinden çalışan Google Cloud Messaging(GCM) idi. Bu servis belki de Google Play Services üzerinde çalışan tek vazgeçemeyeceğimiz servis. Tabi ki Dynamic Delivery gibi hizmetleri kullanıyorsanız bunlar da başınızı ağrıtır fakat daha kolay bir çözüm bulabilirsiniz.</p><p>Google uygulama lisansı konusuna geri dönecek olursak Google yukarıda bahsettiğimiz Google Play ve diğer uygulamaları belli şartlar altında lisanslayarak üreticilerin cihazlarına koymalarına izin veriyor. Bu şartların amaçlarını şöyle özetleyebiliriz:</p><ul><li><strong>Android’de bir standardın sağlanması</strong>: Android işletim sistemi kaynak kodu aynı olsa da donanım sürücüleri üreticilerin kontrolünde. Farklı üreticilerdeki donanım katmanının benzer şekilde çalışması gerek. Yani işletim sistemi ve sürücüler arasındaki API’a uymaları gerek. Üreticiler ayrıca ana Android kodunda da değişiklikler yapıyorlar. Bu değişikliklerin genel Android davranışlarını değiştirmemesi gerekiyor. Bu gibi durumlarda Google direk müdahale edemiyor fakat uygulama lisansları üzerinden genel bir standard zorlamaya çalışıyor.</li><li><strong>Kendi uygulamalarının kendi şartlarında kullanıldığından emin olmak: </strong>Buna iki örnek verecek olursak ilki Samsung’un kendi uygulama marketi olmasına rağmen Google play’in kullanımını kısıtlayamaması. İkinci örnek ise Microsoft’un yeni tanıttığı Surface Duo tabletinde, <a href="https://www.microsoft.com/en-us/surface/devices/surface-duo">yayınlanan görüntülere göre</a> ana sayfada kendi arama motorları Bing yerine Google search bar’a yer vermeleri. Bu gibi uygulamalar Google’ın rekabeti aleyhine kötüye kullandığı tartışmalarını gündeme getiriyor. Avrupa Birliği Google’a bu konu yüzünden <a href="https://ec.europa.eu/commission/presscorner/detail/en/IP_18_4581">büyük bir ceza kesti</a>.</li></ul><p>Toparlayacak olursak biz:</p><ul><li>Geliştirdiğimiz uygulamaların en büyük dağıtım kanalı olan <strong>Google Play’i kayıp edeceğiz</strong>.</li><li><strong>Geliştirdiğimiz uygulamalar</strong> Google Play Services üzerinden sağlanan Firebase ve <strong>Google Play services hizmetlere erişimini yitirecek</strong>.</li><li>İkame edilebilecek Google servislerinin yerine başkalarını kullanabileceğimiz servislere <strong>yapılması gereken geçişler için büyük geliştirmeler gerekecek</strong>.</li></ul><p>Bu saydığım sebeplerden ötürü çalıştığımız firmalar ve müşterilerinin Android uygulamalarda en iyi ihtimal ile kazançları düşecek ya da zarar edecekler. Ve dolayısı ile daha az Android uygulama ihtiyacı doğacak ve biz de i<strong>şlerimizi kaybetme tehlikesi ile karşı karşıya kalacağız</strong> ne yazık ki.</p><p>Bu tehlikeye karşı en azından sesimizi duyurmak amacı ile Google ve Rekabet kurumuna gönderilmek üzere iki metin hazırladık. Siz de bu metinlere imzanızı atıp destek olmak isterseniz <a href="https://forms.gle/6x2VY9BDv6yGkuyV7"><strong>bu adresten</strong></a><strong> </strong>formu doldurup sesimizi daha güçlü duyurmamıza katkıda bulunabilirsiniz. Gönderilecek metinlede <a href="https://docs.google.com/document/d/1UScQiNoyE9jPC4KB4BWe4MM2ph6uZI20BOFHTm5BJYM/edit?usp=sharing"><strong>buradan</strong></a><strong> </strong>ulaşabilirsiniz.</p><p>Konu beklediğimden uzun sürdü bu yüzden işin teknik tarafını ikinci bir yazıda anlatmaya karar verdim. İkinci yazıyı en kısa sürede tamamlayıp paylaşacağım. Bu süre içerisinde bu yazıyı ve yukarıdaki formu çevrenizdeki yazılım geliştiriciler ile paylaşabilirseniz konunun bizim açımızdan ne kadar ciddi olduğunu anlatmış oluruz ve toplu halde sesimiz daha gür çıkar. Bu sayede belki anlaşmanın sağlanması için ufak bir katkımız olur. Anlaşmanın sağlanmadığı durumu düşünmek bile istemiyorum.</p><p>Yazının ikinci bölümüne buradan erişebilirsiniz.</p><p><a href="https://medium.com/@oshamahue/google-rekabet-kurulu-anla%C5%9Fmazl%C4%B1%C4%9F%C4%B1-ve-android-uygulamalar%C4%B1n-gelece%C4%9Fi-ii-c5c943d4ff14">Google, Rekabet Kurulu anlaşmazlığı ve Android uygulamaların geleceği II</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6624324a999" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explain like I am junior III- Android Architecture Components]]></title>
            <link>https://oshamahue.medium.com/explain-like-i-am-junior-iii-android-architecture-components-7d55e4960e35?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d55e4960e35</guid>
            <category><![CDATA[android-architecture]]></category>
            <category><![CDATA[jetpack]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Mon, 08 Jul 2019 06:57:40 GMT</pubDate>
            <atom:updated>2019-07-17T15:16:29.151Z</atom:updated>
            <content:encoded><![CDATA[<p>In this series I have been talking about the problems with Android development and things we use to solve them. They were chronic problems and some of them are solved by the community. I think by the time Google was busy solving problems facing user side. Improvements on the development tools was limited. Release of Android Studio eased some of the pain but there were other problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*-yY0l4XD3kLcZz0rO1sfRA.png" /></figure><p>About two years ago Google released the first Android Architecture Component which is <strong>Lifecycle</strong>. Since then more <strong>Android Architecture Components(AAC)</strong> are released to solve different problems. I think they have easy to use, well thought api. They also work together really well. The bad thing about them is some of them shouldn’t be existed and some of them should be part of the Android OS, in the first place instead of being external libraries. They are a layer above problematic parts of the system. The problems are there but if you use the architecture components you can avoid dealing with those problems. Using AAC requires a new layer of knowledge on top of Android application development most of the time.</p><p>I think I have talked about the <strong>LiveData</strong> and <strong>ViewModel</strong> with enough detail in the <a href="https://medium.com/@oshamahue/explain-like-i-am-junior-i-f635dbcd48ed">first</a> and <a href="https://medium.com/@oshamahue/explain-me-like-i-am-junior-ii-android-architecture-5247aa1fe6c5">second</a> parts of this series so I won’t cover <strong>Lifecycle </strong>and<strong> ViewModel </strong>components<strong> </strong>in this post. Let’s see what other components we have in an order of familiarity to me:</p><h3>Navigation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*ea6tUCIFYuQXju2WyzvASg.jpeg" /></figure><p>I think navigation is my favorite. At CitizenMe we started to use navigation when we introduced new login and registration screens with magic link. The best part of it is; it prevents you to use nasty Fragment transactions if you use multiple fragments with a single activity. Fragment transactions were my nightmare on Android development. Even though I exactly know how they work there are some cases I cannot implement without going through a lot. I think I can write a whole new post about problems with fragments and fragment transactions but I will hold off for now and just advice junior devs to use this instead of trying to figure out how fragment transactions work.😞 At the moment you cannot really do it because fragment transactions are probably used in most of the current Android applications.</p><p>With Navigation Component you have enough control to do things you need without struggling with great deal of detail. You can check out the <a href="https://developer.android.com/guide/navigation">Navigation developer guide</a> for things it can do and I think it can fulfill everything it offers nicely. If you look at the benefits it provides, you can conclude the actual problems on Android navigation without using it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*aIhJwPPxZ3BnH6w1ml_9BQ.jpeg" /></figure><h3>Data Binding</h3><p>In early days of Android development to access views in an XML layout file from java code we had to use findViewById(id:Int) method for every single view. This introduced a lot of boilerplate code. Later on libraries like <a href="http://androidannotations.org/">Android Annotations</a> and <a href="http://jakewharton.github.io/butterknife/">Butterknife</a> popped up and helped us to avoid findViewById(id:Int) and use annotations to do this work. Google decided to address this problem with a different approach. With <a href="https://developer.android.com/topic/libraries/data-binding"><strong>Data Binding</strong></a> you can bind data to views from the XML definitions of the views instead of finding views. So it is opposite of finding views and setting the properties of the views.</p><p>I think the best thing about databinding is it can bind views to <strong>LiveData </strong>so when it is updated view gets updated automatically. Even though it is a cool library I am in favor of using <a href="https://kotlinlang.org/docs/tutorials/android-plugin.html#view-binding">Kotlin Android Extensions View Binding</a> because it is easier and cleaner to use.</p><h3>WorkManager</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*IP7AKVWyb22yzhtqIAHscw.jpeg" /></figure><p>In good old days we had <a href="https://developer.android.com/reference/android/app/Service.html">Service</a>(we still have) to do things in background without getting affected by activity lifecycles. Combining them with <a href="https://developer.android.com/reference/android/content/BroadcastReceiver?hl=en">BroadcastReceiver</a> and <a href="https://developer.android.com/reference/android/app/AlarmManager?hl=en">AlarmManager</a> we could schedule things to happen even the app is not working on the foreground. What can go wrong right? It turned out a lot. This allowed developers to wake up the device any time and this causes apps to drain battery and data without any restrictions. In Android API’s 19 and 23 background restrictions put in place. These restrictions caused apps not work properly and new tools introduced for background work were not backward compatible. To fix this problems <a href="https://developer.android.com/topic/libraries/architecture/workmanager"><strong>WorkManager</strong></a><strong> </strong>is introduced. WorkManager handles jobs with the tools available with the API level. It also allows developers to have constraints like connectivity and charging status to run the tasks.</p><h3>Room</h3><p><a href="https://developer.android.com/jetpack/androidx/releases/room">Room</a> is one of the components that I haven’t got chance to use but I look forward to use it. It has an api similar to <a href="http://jdbi.org/">Jdbi</a> which is one of my favorite libraries in Java. Room provides an api on top of SQlite for more robust database access. It saves us from trouble of dealing with cursors and creating Data objects. All we need to provide interfaces with functions taking query parameters with annotations providing SQlite queries. All the implementation and execution is done for us which is always great.</p><h3>Paging</h3><p>Loading huge chunks of data into memory is not ideal in a mobile device. It takes longer to fetch from a database or an API, it takes longer to deserialize data and it uses more memory. So it is a good idea to fetch enough data to show and request more when it is needed. On Android with RecyclerView this was done by listening scroll with <a href="https://developer.android.com/reference/android/support/v7/widget/RecyclerView.OnScrollListener">OnScrollListener</a> and requesting next batch of data which could be hard if you don’t know what you are doing. With Paging this is a lot easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*54nnvSv1NkN5Cb71pGifDA.jpeg" /></figure><p>As you can see it is possible to do Android development without AAC and the areas they cover are core parts of development stack. Don’t get me wrong I am not critical of the Architecture Components, they solve a lot of problems for us. But I have to say and probably I am not really fan of the out of the box Android development and thankful Architecture components for this.</p><p>Android has a really big and strong developer community which I am proud that I am a part of. Community solved some of the problems well ahead of Google. I am really happy for the constant feedback loop for the Architecture Components and I think this is the reason they are so good. We also see this interaction of Google and developers in the development of <a href="https://developer.android.com/jetpack/compose">Compose</a>. I am really hopeful that it will turn great and will see more fundamental changes like Compose in Android development.</p><p>You can find first and second part of this series here:</p><ul><li><a href="https://medium.com/@oshamahue/explain-like-i-am-junior-i-f635dbcd48ed">Explain like I am junior I</a></li><li><a href="https://medium.com/@oshamahue/explain-me-like-i-am-junior-ii-android-architecture-5247aa1fe6c5">Explain me like I am Junior II -Android Architecture</a></li></ul><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://usejournal.com/newsletter/noteworthy-in-tech/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d55e4960e35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Junior’muşum gibi açıkla III- Android Architecture Components]]></title>
            <link>https://medium.com/gdg-istanbul/juniormu%C5%9Fum-gibi-a%C3%A7%C4%B1kla-iii-android-architecture-components-f8fd216dfdfb?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8fd216dfdfb</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[jetpack]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Mon, 08 Jul 2019 06:54:17 GMT</pubDate>
            <atom:updated>2021-01-17T15:43:05.526Z</atom:updated>
            <content:encoded><![CDATA[<p>Android mimarisi ve Dependency injection hakkındaki ikinci bölüme burdan erişebilirsiniz:</p><p><a href="https://medium.com/gdg-istanbul/juniormu%C5%9Fum-gibi-a%C3%A7%C4%B1kla-ii-android-mimarisi-42e45592531">Junior’muşum gibi açıkla II -Android Mimarisi</a></p><p>Bu yazı dizisinde Android geliştirme ile alakalı problemleri ve bunları nasıl çözdüğümüzden bahsettim. Bu problemlerin bazıları yazılımcı komunitesi tarafından çözüldü. Bu sırada Google son kullanıcı tarafındaki problemleri çözmekle meşguldü. Geliştirme araçları tarafında gelişim oldukça kısıtlıydı. Android Studio’nun gelişi problemlerin bir kısmını çözdü fakat çözemediği bir çok problem vardı.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*-yY0l4XD3kLcZz0rO1sfRA.png" /></figure><p>Yaklaşık iki sene önce Google ilk Android Architecture Component olan <strong>Lifecycle’</strong>ı yayınladı. Daha sonra başka problemleri çözen başka <strong>Android Architecture Components(AAC)’</strong>lar yayınlandı. AAC kütüphaneleri kullanımı kolay, üzerinde iyi düşünülmüş ve birlikte de çok güzel çalışan kütüphaneler. Fakat aslında bunların bazılarına hiç ihtiyacımız olmaması ya da harici ve ikincil bir çözüm olmak yerine, Android işletim sisteminin bir parçası olmaları gerekiyordu. Bu kütüphaneler sistemdeki problemli alanların üzerini kapatan bir katman görevi görüyorlar. AAC kullandığınızda problemler aslında çözülmüyor fakat bu problemlerle uğraşmanıza gerek kalmıyor. Yani AAC kullanmak için genellikle iki katman derinliğinde bilgiye sahip olmak gerekebiliyor.</p><p><a href="https://medium.com/gdg-istanbul/juniormu%C5%9Fum-gibi-a%C3%A7%C4%B1kla-i-c3d4f7e35a7d">İlk</a> ve <a href="https://medium.com/gdg-istanbul/juniormu%C5%9Fum-gibi-a%C3%A7%C4%B1kla-ii-android-mimarisi-42e45592531">ikinci</a> yazılarda <strong>LiveData</strong> ve <strong>ViewModel’</strong>den yeterince bahsettiğimi düşünüyorum. Bu yüzden bunlara değinmeyeceğim. Daha aşina olduklarımdan başlayarak bakalım başka hangi AAC’lerimiz var:</p><h3>Navigation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*ea6tUCIFYuQXju2WyzvASg.jpeg" /></figure><p>Muhtemelen navigation favorim. CitizenMe’de navigation’u magic link kullandığımız yeni kayıt ve giriş ekranları için kullandık. Navigation’un en güzel yanı tek bir aktivite ile birden fazla fragment kullanırken çirkin fragment transactionlar ile uğraşmanıza gerek kalmıyor. Fragment transaction’lar benim kabusum diyebilirim. Nasıl çalıştıklarını %100 bildiğim halde istediğim şeyleri yapabilmek için baya uğraşmam gerekiyor. Bu konuda ayrı bir blog yazısı yazabilirim muhtemelen fakat şimdilik bunu yapmayıp Junior geliştiricilere fragment transactionları anlamaya çalışmak yerine navigation’u kullanmalarını öneririm. 😞 Malesef bunu şu anda yapabilmeniz çok mümkün değil çünkü piyasadaki Android uygulamalarının çoğunda fragment transaction’lar kullanılıyor.</p><p>Navigation component ile gereksiz detaylar ile uğraşmadan yeterince kontrol sahibi olarak yapmak istediğiniz şeyleri yapmanız mümkün. <a href="https://developer.android.com/guide/navigation">Navigation geliştirici klavuzun</a>u inceleyip neler yapabildiğinizi görebilirsiniz. Burda iddia edilen şeyleri yerine getirdiğini söyleyebilirim. “Benefits” kısmına bakıp aslında hangi problemleri çözdüğünü çıkartabilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*aIhJwPPxZ3BnH6w1ml_9BQ.jpeg" /></figure><h3>Data Binding</h3><p>Android’in ilk zamanlarında Java kodundan XML dosyalarında oluşturduğumuz viewlere findViewById(id:Int) ile erişirdik. Bu şimdi de kullanılabilecek bir yöntem tabi ki. Bu yöntem ingilizce boilerplate denilen aslında bir iş yapmayıp bir şey yapmanıza aracı olan fazlalık kod yazmamıza neden oluyor. <a href="http://androidannotations.org/">Android Annotations</a> ve <a href="http://jakewharton.github.io/butterknife/">Butterknife</a> gibi kütüphaneler findViewById(id:Int) kullanmadan annotasyonlar yardımı ile view’lere erişmemize yardımcı oldu. Google bu probleme farklı bir bakış açısı getirmek istedi. Databinding ile Java’dan viewlere erişmek yerine XML tarafında yaptığımız tanımlamalar ile java tarafındaki değişkenlere erişmemiz mümkün oldu. Aslında tersine bir mantık sağladı.</p><p>Databinding’in en sevdiğim yanı <strong>LiveData</strong>’ya bağlanıp LiveData her güncellendiğinde view’i güncelleyebilmesi. Her ne kadar güzel bir kütüphane olsa bile <a href="https://kotlinlang.org/docs/tutorials/android-plugin.html#view-binding">Kotlin Android Extensions View Binding</a>’i daha temiz bir kullanım sağladığı için tercih ediyorum.</p><h3>WorkManager</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*IP7AKVWyb22yzhtqIAHscw.jpeg" /></figure><p>Eski zamanlarda Activity yaşam döngüsünden etkilenmeden arka planda bir iş yapmak için <a href="https://developer.android.com/reference/android/app/Service.html">Servic</a>e kullanırdık(hala kullanabiliriz). Service’leri <a href="https://developer.android.com/reference/android/content/BroadcastReceiver?hl=en">BroadcastReceiver</a> ve <a href="https://developer.android.com/reference/android/app/AlarmManager?hl=en">AlarmManager</a> ile birleştirip uygulama ön planda ayakta değilken bile arka planda iş yapabiliyorduk. Böyle bir yaklaşımda ne yanlış gidebilir ki? Anlaşıldı ki bir çok şey. Bir kısıtlama olmadan kullanılan bu yaklaşım geliştiricilerin kafalarına göre uygulamalarını ayağa kaldırıp pili tam anlamı ile sömürmelerine sebep verdi. Android API’s 19 ve 23&#39;de arka plan kısıtlamaları başladı. Bu kısıtlamalar uygulamaların doğru çalışmamalarına sebep oldu ve Service yerine konulan yeni yapılar geriye dönük destek sağlamıyordu. Bu problemi çözmek için <a href="https://developer.android.com/topic/libraries/architecture/workmanager"><strong>WorkManager</strong></a><strong> </strong>tanıtıldı. WorkManager yapılacak işleri hangi API versiyonunda olduklarına göre uygun araçları kullanarak yapmaya olanak sağlıyor. Ayrıca geliştiricilere bağlantı ve şarj olma durumlarına göre arka planda işlemlerini yapmalarını sağlıyor.</p><h3>Room</h3><p><a href="https://developer.android.com/jetpack/androidx/releases/room">Room</a> daha önce kullanma fırsatı bulamadığım fakat kullanmak istediğim bir kütüphane. Java’da kullanmayı sevdiğim <a href="http://jdbi.org/">Jdbi</a>’a çok benzeyen bir kullanımı var. Room SQLite üzerinde kolay bir erişim sağlayan bir API’a sağlıyor. Room bizi cursorlar ile uğraşmaktan ve teker teker data objelerini oluşturmaktan kurtarıyor. Bunun için ihtiyacımız olan şey interface’lerin içerisinde SQLite sorguları ile annote edilmiş fonksiyonlar. Bu sorgu parametrelerini fonksiyonlara parametre olarak sağlayabiliyoruz. Bu interface’lerin implementasyonları ve çalışmaları bizim için hallediliyor.</p><h3>Paging</h3><p>Mobil bir cihazda hafızaya büyük veri yüklemek çok ideal olmayabilir. Veritabanından ya da bir API’dan çekip datayı deserialize etmek çok uzun sürer ve çok fazla hafızaya ihtiyaç duyulabilir. Bu durumda yeterince datayı çekip gösterdikten sonra gerektiğince datayı çekmeye devam etmek mantıklıdır. Android’de bu işlemleri RecyclerView ‘in <a href="https://developer.android.com/reference/android/support/v7/widget/RecyclerView.OnScrollListener">OnScrollListener</a>’ını dinleyip gerektiğinde sonraki datayı çekerek yapabiliyoruz. Eğer ne yaptığınızı bilmiyorsanız bu zor bir işlem olabilir. Paging bunu bizim için kolay bir şekilde hallediyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*54nnvSv1NkN5Cb71pGifDA.jpeg" /></figure><p>Gördüğünüz üzere Android’de AAC olmadan da geliştirme yapmamız mümkün, fakat bu AAC şu andaki modern Android geliştiriciliğinin ana parçalarından en büyüğü denilebilir. Aslında AAC’yi eleştiriyor gibi görünsem de AAC bizim için bir çok problemi hallediyor. Fakat söylemeliyim ki yalın ve günümüzdeki mimari elemanlar kullanılmadan yapılacak geliştirmenin de çok hayranı değilim. Bu yüzden AAC’ye minnettarım.</p><p>Android komünitesi benim de bir parçası olmaktan mutlu olduğum büyük ve güçlü bir geliştirici komünitesi. Bu komünite Android’deki problemlerin bir çoğunu Google’dan çok daha önce çözdü. AAC’deki devamlı sağlanan geribildirim çemberinden de çok memnunum. AAC’nin bu kadar başarılı olmasının ardında bu yattığını düşünüyorum. Geliştiriciler ve Google arasındaki bu ilişkiyi <a href="https://developer.android.com/jetpack/compose">Compose</a>’un da geliştirilmesinde de görüyoruz. Bu açıdan Compose’un çok iyi bir yere geleceğinden ve bu büyük mantalite değişikliğinin diğer android alanlarında da görüleceğini ümit ediyorum.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8fd216dfdfb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-istanbul/juniormu%C5%9Fum-gibi-a%C3%A7%C4%B1kla-iii-android-architecture-components-f8fd216dfdfb">Junior’muşum gibi açıkla III- Android Architecture Components</a> was originally published in <a href="https://medium.com/gdg-istanbul">GDGIstanbul</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meetup’da Katılım durumunun güncellenmesi hakkında]]></title>
            <link>https://medium.com/gdg-istanbul/meetupda-kat%C4%B1l%C4%B1m-durumunun-g%C3%BCncellenmesi-hakk%C4%B1nda-e1d1a09e045e?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1d1a09e045e</guid>
            <category><![CDATA[meetup]]></category>
            <category><![CDATA[gdg]]></category>
            <category><![CDATA[gdgistanbul]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Mon, 24 Jun 2019 07:15:53 GMT</pubDate>
            <atom:updated>2019-06-24T07:15:53.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iK_drDjfX3p7IBCZqDOsvg.png" /></figure><p>Merhabalar,</p><p>Etkinliklere katılım durumunuz değiştiğinde Meetup üzerinden de güncellemesinin önemini vurgulamak istiyoruz.</p><p>GDG İstanbul ekibi olarak düzenlediğimiz etkinliklere gösterdiğiniz yoğun katılım isteği bizi çok mutlu ediyor. Fakat şöyle bir problemimiz var; Etkinliklere “<strong>katılıyorum</strong>” olarak işaretleyip etkinliğe gelmeyen/gelemeyen katılımcılar (no-show). Bu durum, hem ekip hem de katılımcılar açısından ciddi sorunlara neden oluyor. Diğer komünitelerin de aynı problemle karşılaştıklarını sosyal medya üzerinden gördük.</p><p>Etkinliklerimiz için mümkün olduğunca büyük ve herkesin rahatça vakit geçirebileceği yerler seçmeye çalışıyoruz. Fakat bu her zaman mümkün olmayabiliyor. Kısıtlı yer olan etkinlik mekanlarında Meetup üzerinden “<strong>Katılıyorum</strong>” olarak işaretleyip gelmeyen katılımcılar yüzünden gerçekten gelmek ve o gün orada olmak isteyen GDG’ler etkinliklere katılamıyor.</p><p>Bunun yanında, etkinliklere hazırlanırken gerekecek ayarlamaları (etkinlik alanı büyüklüğü, baskı, ekip elemanı, rezervasyon, pizza! vb) katılımcı sayısına göre belirlemeye çalışıyoruz. Dolayısıyla “Katılıyorum” olarak işaretleyen GDG’lerin sayısı etkinlik günü orada olan GDG’ler ile aynı olmadığında bu planlamalar eksik ya da fazla oluyor.</p><p>Gelecek etkinlikler için sizden ricamız <strong>katılamayacağınızda durumunuzu en kısa süre içerisinde Meetup üzerinden güncellemeniz</strong>. Bu basit işlem kaynaklarımızı daha verimli kullanmamız ve sizler için daha güzel etkinlikler düzenlememize yardımcı olacak.</p><p>Katılımcılar açısından bu problemi azaltmak ve bu kültürün topluluğumuzda ve diğer topluluklarda yaygınlaşması için yeni bir karar aldık. Bu karara göre etkinliklere “<strong>katılacağım</strong>” olarak işaretleyip katılmayan GDG’leri Meetup üzerinden no-show olarak işaretleyeceğiz.</p><p>Kapasitenin dolduğu etkinliklerde<strong> no-show olarak daha önce işaretlenmemiş katılımcılara öncelik vereceğiz ve belirli bir sayı üzerinde no-show olarak işaretlenmiş katılımcıları da waitlist’e taşıyacağız</strong>. Böylelikle etkinliklerimizde mümkün olduğunca fazla katılımın olmasını sağlayıp doğru planlama yapabilmeyi hedefliyoruz.</p><p>Anlayışınız için teşekkür ederiz.</p><p>GDG İstanbul Ekibi</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1d1a09e045e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-istanbul/meetupda-kat%C4%B1l%C4%B1m-durumunun-g%C3%BCncellenmesi-hakk%C4%B1nda-e1d1a09e045e">Meetup’da Katılım durumunun güncellenmesi hakkında</a> was originally published in <a href="https://medium.com/gdg-istanbul">GDGIstanbul</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google I/O 2019: News and Announcements for Android Developers]]></title>
            <link>https://heartbeat.comet.ml/google-i-o-2019-news-and-announcements-for-android-developers-322247aeadf7?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/322247aeadf7</guid>
            <category><![CDATA[googleio]]></category>
            <category><![CDATA[jetpack]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[heartbeat]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Fri, 24 May 2019 15:51:00 GMT</pubDate>
            <atom:updated>2021-09-30T16:01:21.777Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D0km7BPBRNbiTD5soWQOow.png" /></figure><p>I attended my first I/O this year, and it was a really good experience. While there, I Tweeted about some of the announcements in real-time. You can check them out <a href="https://twitter.com/hadi_tok">on my twitter page</a>.</p><p>But I wanted to dig a bit deeper and give more detail about news related to Android development that came out of I/O. There are other developments and Android-related announcements, but here I’ll only mention one connected specifically to Android development.</p><p>Many people I spoke to think that the announcements weren’t quite as shiny as in previous years. I kind of agree with this, but at the same time I’m satisfied with them. This year the focus was mostly on privacy, security, and stability—and I’m ok with this. Here is the developer keynote if you missed it:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLoLqSbV1ELU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLoLqSbV1ELU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLoLqSbV1ELU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1bf8fc7f453e38cdfeaa4ac786030b7/href">https://medium.com/media/e1bf8fc7f453e38cdfeaa4ac786030b7/href</a></iframe><p>Without further ado, let&#39;s get started. Here’s what we’ll cover:</p><ul><li><a href="#55ee">Jetpack Compose</a></li><li><a href="#0c74">Kotlin First</a></li><li><a href="#6025">Security and Privacy</a></li><li><a href="#7386">Dark Mode</a></li><li><a href="#bf28">Gesture Navigation</a></li><li><a href="#77a9">CameraX</a></li><li><a href="#294b">ViewBindings</a></li></ul><h3>Jetpack Compose</h3><p>The most significant announcement made on the Android side was, without a doubt, Jetpack Compose. The initial impression I had was that it’s more or less a reactive DSL for creating UI, but it’s bigger than that. It’s actually Android UI reimagined.</p><p>It doesn’t use the current views like TextView and ImageView (although it can). Instead, it introduces new UI elements. I think this will be the biggest change on Android development ever. There were not any other fundamental changes announced other than <em>Fragments</em>. Architecture components are big, but they’re mostly wrappers around existing frameworks to make things easier. So I’m really excited about it (as you can probably tell). I hope this is the first step of a bigger change in the Android environment.</p><p>Jetpack Compose is at a very early stage—not even alpha yet. The Googlers I talked to think it’ll take some time to be production-ready and probably years to be adopted. Currently it’s released in AOSP as source code. If you want to try it you’d have to checkout a code that will provide a special version of Android Studio, required plugins, and the library itself (and build it). It’s only available for Linux and Mac OS for now.</p><p>You can find the information on how to get it running here:</p><p><a href="https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/README.md">Android Jetpack</a></p><p>Checking out and building the sample may sound scary, but it’s relatively easy to do and is also well-documented. If you want to talk about it or give feedback, there’s a #compose channel on Kotlin’s Slack. You can join Kotlin’s Slack group <a href="https://surveys.jetbrains.com/s3/kotlin-slack-sign-up">here</a> if you’re not a member yet. If you want to learn more about it, this is the introductory video for Compose:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVsStyq4Lzxo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVsStyq4Lzxo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVsStyq4Lzxo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f89fe78e3b84fdda9b66f07c289407a4/href">https://medium.com/media/f89fe78e3b84fdda9b66f07c289407a4/href</a></iframe><h3>Kotlin-First</h3><p>Another exciting piece of news for me is that Kotlin has become Google’s preferred and recommended language for Android development. What that means is new features in various libraries will be designed in a Kotlin-idiomatic way, and then Java will be supported later (if it can be).</p><p>My guess is that Compose won’t even be supported in Java. Also, documentation and examples will be provided in Kotlin initially. Another notable announcement was that Android Q APIs will have nullability annotations that will give errors instead of warnings for Kotlin null safety interop. All this means the Kotlin support will be well ahead of the KTX library. With this news, they also stated that Java and C++ support will continue.</p><h4>Coroutines First</h4><p>Coroutines are now the preferred method to perform async operations on Android. Yigit Boyar explicitly stated this. I think one of the most important actions taken in this new Kotlin-first shift is support for coroutines on Jetpack. Almost all of the architecture components libraries got coroutines support, and it was promised that we’ll see more. You can watch the I/O talk about the coroutines here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBOHK_w09pVA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBOHK_w09pVA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBOHK_w09pVA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ddbbcd37cd61292bacb688060cf1881/href">https://medium.com/media/4ddbbcd37cd61292bacb688060cf1881/href</a></iframe><h3>Security &amp; Privacy</h3><p><strong>Jetpack Security Library </strong>provides tools to implement security best practices. It provides encryption with performance. It makes it easy to encrypt files and shared preferences.</p><p>With<strong> location permission changes on Q, </strong>users can choose if they want to permit apps to access their locations when the app is in both the background and foreground.</p><p>Activities in the background will not be able to start other activities, except in special cases.</p><p><strong>Apps won&#39;t be able to turn on/off the WiFi on Q. </strong>Instead they’ll have to use the new system dialog that would allow users to change settings without leaving the app.</p><p><strong>SYSTEM_ALERT_WINDOW permission is deprecated on Q. </strong>It was mostly used to display floating chat bubbles over any screen, like the Facebook Messenger one. Android Q will add support for chat bubbles without SYSTEM_ALERT_WINDOW permissions.</p><h3>Dark Mode</h3><p>Android Q will improve its dark mode support even further. The <a href="https://developer.android.com/jetpack/androidx/releases/appcompat">appcompat library</a> also provides these improvements. The new <a href="https://9to5google.com/2019/05/08/android-q-beta-3-force-apps-dark-mode/">force dark mode option</a> will do a smart conversation of an existing theme to a dark one. Apps will have to opt in to allow force dark mode, and developers can test this out with an Android Q emulator.</p><h3>Gesture Navigation</h3><p>Some device manufacturers already offer gesture navigation. With Android Q, gesture navigation is now supported by Android. I think this will save developers some headaches because they won’t need to support different implementations for different device models.</p><p>Gesture navigation provides a bottom inset for home navigation and left and right insets for going back. Developers can mark areas to override insets if they have some kind of gesture like drag and drop, resize or swipe on the sides. You can watch the Android Developers video for more information:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLjtz7T8R_Hk%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLjtz7T8R_Hk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLjtz7T8R_Hk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d7fffb1e252bc36d90a3e9bfdb38cde/href">https://medium.com/media/1d7fffb1e252bc36d90a3e9bfdb38cde/href</a></iframe><h3>CameraX</h3><p>Jetpack’s <a href="https://heartbeat.comet.ml/introduction-to-camerax-on-android-6d3b4a318542">CameraX library </a>is one of my favorite announcements. Even taking a profile picture could be a big pain because of different implementations of the API from different manufacturers. This library will handle device-specific problems, so developers won’t need to handle special cases. It will also support features like Portrait, HDR, Night, and Beauty. The functionality could be expanded with add-ons. You can read more on the CameraX Android developer page:</p><p><a href="https://developer.android.com/training/camerax">CameraX overview | Android Developers</a></p><h3>ViewBindings</h3><p>ViewBindings is similar to DataBindings. If you just want to avoid findViewById(), ViewBindings will be the way to go. ViewBindings uses the Gradle plugin instead of annotation processing. Using the Gradle plugin provides two things. First, it doesn’t have an effect on build time, and second, it has compile time safety. It will be available with Android Studio 3.6. Here’s a more detailed look at this new library:</p><p><a href="https://proandroiddev.com/new-in-android-viewbindings-the-difference-from-databinding-library-bef5945baf5e">New In Android: ViewBindings. The Difference From DataBinding Library.</a></p><h3>Conclusion</h3><p>There were many other smaller announcements that didn’t make it into this post, but I think we covered the most significant ones here.</p><p>If you’re using Kotlin for development, then the primary announcements are likely enough to satisfy you. Android Q will probably released around the end of the year. So it might be worth following future developments on Q.</p><p>Compose is another topic to keep an eye on through the year. I think there’s still a lot of room to improve the Android platform. So I hope the Android team continues to make fundamental changes in the mold of Compose.</p><p>I also hope to be able to attend the I/O next yeah and feel the excitement on the scene again!</p><p><em>Editor’s Note: </em><a href="https://heartbeat.comet.ml/"><em>Heartbeat</em></a><em> is a contributor-driven online publication and community dedicated to providing premier educational resources for data science, machine learning, and deep learning practitioners. We’re committed to supporting and inspiring developers and engineers from all walks of life.</em></p><p><em>Editorially independent, Heartbeat is sponsored and published by </em><a href="http://comet.ml/?utm_campaign=heartbeat-statement&amp;utm_source=blog&amp;utm_medium=medium"><em>Comet</em></a><em>, an MLOps platform that enables data scientists &amp; ML teams to track, compare, explain, &amp; optimize their experiments. We pay our contributors, and we don’t sell ads.</em></p><p><em>If you’d like to contribute, head on over to our</em><a href="https://heartbeat.fritz.ai/call-for-contributors-october-2018-update-fee7f5b80f3e"><em> call for contributors</em></a><em>. You can also sign up to receive our weekly newsletters (</em><a href="https://www.deeplearningweekly.com/"><em>Deep Learning Weekly</em></a><em> and the </em><a href="https://info.comet.ml/newsletter-signup/"><em>Comet Newsletter</em></a><em>), join us on</em><a href="https://join.slack.com/t/fritz-ai-community/shared_invite/enQtNTY5NDM2MTQwMTgwLWU4ZDEwNTAxYWE2YjIxZDllMTcxMWE4MGFhNDk5Y2QwNTcxYzEyNWZmZWEwMzE4NTFkOWY2NTM0OGQwYjM5Y2U"><em> </em></a><a href="https://join.slack.com/t/cometml/shared_invite/zt-49v4zxxz-qHcTeyrMEzqZc5lQb9hgvw"><em>Slack</em></a><em>, and follow Comet on </em><a href="https://twitter.com/Cometml"><em>Twitter</em></a><em> and </em><a href="https://www.linkedin.com/company/comet-ml/"><em>LinkedIn</em></a><em> for resources, events, and much more that will help you build better ML models, faster.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=322247aeadf7" width="1" height="1" alt=""><hr><p><a href="https://heartbeat.comet.ml/google-i-o-2019-news-and-announcements-for-android-developers-322247aeadf7">Google I/O 2019: News and Announcements for Android Developers</a> was originally published in <a href="https://heartbeat.comet.ml/">Heartbeat</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Canlı ortamda coroutine’ler]]></title>
            <link>https://medium.com/gdg-istanbul/canl%C4%B1-ortamda-coroutineler-976d6f3fefc7?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/976d6f3fefc7</guid>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 18:38:38 GMT</pubDate>
            <atom:updated>2019-03-18T19:23:42.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*d0P__R0JpaVAc2njxVNM5A.jpeg" /></figure><p>Coroutine’ler Kotlin’de ve Android geliştirmede gündemdeki konulardan. CitizenMe Android uygulamasında coroutine’ler RxJava&#39;nın Single, Maybe ve Completable classlarının yerini aldı. Devfest istanbul’da bu konu ile alakalı yaptığım sunuma <a href="https://speakerdeck.com/oshamahue/rxjava-vs-coroutines">buradan</a> erişebilirsiniz. Bugün bu geçişten sonraki deneyimlerimizden bahsedeceğim. Başlamadan önce Channel’ları henüz kullanmaya başlamadık. Cold streaming özelliği geldiği zaman bu konuyu tekrar değerlendirmeyi düşünüyorum. Yani Channel’lar bu yazının kapsamının dışında.</p><p>Söylemeliyim ki RxJava’yı gerçekten seviyorum. <a href="https://medium.com/@oshamahue/why-to-use-reactive-programming-on-android-4f259e546cd9">Daha önceki bir yazımda</a> RxJava’nın Android’de neden kullanılması gerektiğini düşündüğümü anlatmıştım. RxJava Java dünyasında asenkron programlama için en iyi tool’lara sahip ve bence hala en iyi seçenek. CitizenMe Android uygulamasında Observable pattern için hala kullanıyoruz. Fakat coroutine’lerin Kotlin’deki en iyi seçenek olduğunu söyleyebilirim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*arX2QSo_wRtMWf1FpAV9nA.jpeg" /></figure><h4>Okunabilirlik</h4><p>Muhtemelen bu en bariz olanı fakat RxJava’dan coroutine’lere geçtikten sonra kodun ne kadar iyi yönde değiştiğini anlatamam. Coroutine kullanımı kodun takibini kolaylaştırdı. Kodda asıl iş yapan kısımlar ortaya çıktığı için problemleri fark etmek daha kolaylaştı. Coroutine başlatıcıları(async , lauch ) yerine mümkün olduğunca suspend fonksiyonları kullanmayı ilke edinmek de okunabilirliği daha da artırıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*0tnAbdkZrF1vVTEg6s7PyA.png" /></figure><h4>Unit Testing</h4><p>Corutine’lere geçmeye karar vermemizin ana sebebi unit testing olabilir. RxJava kullanılan koda unit test yazarken bazı problemler yaşadık. Bir test tamamlandıktan sonra tamamlanan testin kullandığı objeler tekrardan yaratılmalıdır ki sonraki testler temiz bir başlangıç yapabilsin. Temiz bir başlangıç ile testlerin birbirinden bağımsızlığı sağlanır ve diğer testlerden etkilenmezler. Birden fazla test içeren bir test suitlerimizde bazı RxJava operasyonlarının sızıntı yaparak sonraki testlerin sonuçlarını etkilediklerini fark ettik. Tek başlarına çalıştıklarında problem olmayan testler suit ile birlikte çalıştırdıklarında farklı sonuçlar veriyorlardı. Bu yüzden bazı yerlerde sleep() ya da timeout kullanmamız gerekti. Bunların deterministik olmadıklarını düşünürüm ve bunları kullanmak test sürelerini uzatıyor.</p><p>Coroutine’lerin kullanıldığı kodun testleri <a href="https://mockk.io/">MockK</a> ile çok basit. Coroutine&#39;leri test ederken every{} ve verify{} gibi normal fonksiyonlar yerine, runBlocking{} bloğunun içerisinde coEvery{} ve coVerify{} gibi coroutine fonksiyonları kullanmak gerekiyor. Bu yol ile sleep() ya da timeout kullanmak gerekmiyor. International Women’s Day 2019 İstanbul etkinliğinde MockK hakkında bir sunum yapacağım. Etkinlik hakkında daha fazla bilgiye <a href="https://2019.wtmistanbul.com/">buradan</a> erişebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*8jSngElJakJAp90t9utjdQ.png" /></figure><h4>Asenkron işleri birleştirme</h4><p>RxJava ile yaşadığım problemlerin birisi de aynı anda çalışan işlerin operatörler ile birleştirilmesiydi. Buradaki ana problem esasen birleştirilme işleminin debug edilmesi. Coroutine’ler “Structured Concurrency” sayesinde her bir işlemde neler olmuş görmek çok kolay. Ayrıca bunları hayata geçirmek de kolay. Görüntüde aynı anda çalışan iki işin sonuçlarını birleştirme ile bunları sıra ile çalıştırma arasında çok bir fark yok. Bu da okunabilirliği çok yüksek kılıyor. “Structured Concurrency” ile error handling de problemler yaşadım, bunları sonraki bölümde biraz daha ayrıntılı inceleyeceğim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*-wBLgufccX_u_bgE4xrkyg.png" /></figure><h4>Error handling</h4><p>Söylemeliyim ki error handling coroutine’ler ile uzmanlaşması en zor alan. try-catch bloğunuzun olduğu yerde uygulamanızın göçtüğünü gördüğünüzde kendinizi kafanızı kaşırken bulmanız olası. <a href="https://proandroiddev.com/@dmytrodanylyk">Dmytro Danylyk</a> genel olarak coroutine’ler hakkında olan fakat bu tür problemleri engelleminizi sağlayacak <a href="https://proandroiddev.com/kotlin-coroutines-patterns-anti-patterns-f9d12984c68e">postunu</a> tavsiye edebilirim.</p><p>Stacktraceler ile de problemler yaşadık. Coroutines 1.1 bu problemlerin bazılarını düzeltmiş olsa da (<a href="https://github.com/Kotlin/kotlinx.coroutines/issues/74">alakalı GitHub issue</a>) <a href="https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter">Retrofit2 coroutines adapter</a> ile benzer sorunlar devam ediyor. Bu problemlerin Retrofit’in sonraki versiyonunda <a href="https://github.com/square/retrofit/pull/2886">bu PR</a> ile kendinden coroutine desteği sağlayınca düzeleceğini ümit ediyorum.</p><p>Son olarak söz verdiğim gibi <a href="https://medium.com/@elizarov/structured-concurrency-722d765aa952">Structured Concurrency</a>… Bu aynı anda çalışan operasyonlar için kısa ve öz bir yöntem olsa bile bazı öngöremediğiniz davranışlara şahit olabilirsiniz. Bu konuda benim tavsiyem <a href="https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md">Coroutines Guide</a>’ı okuyup ayrı bir projede bunu denedikten sonra productionda kullanmanızdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*WZt8TvCjau5TcNBV1TcXLQ.gif" /></figure><p>Problemler yaşanabilse bile nihayetinde coroutine’leri kullanmak çok keyifli. Her ne kadar kullanımı kolay gibi görünse bile ne yaptığınızı bilmiyorsanız daha önceden öngöremediğiniz durumlarla karşılaşmanız olası. Doğru bir şekilde çözmeye çalıştığı problemin büyüklüğüne bakarak bunun aslında normal olduğunu söylemek adil olur bence. Coroutine’leri ilk incelediğimde ve kullanmaya başladığımda yukarıda verdiğim kaynakların nerdeyse hiçbirisi mevcut değildi. Umarım bu kaynaklar sizi bazı sorunlardan kurtarabilir.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=976d6f3fefc7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-istanbul/canl%C4%B1-ortamda-coroutineler-976d6f3fefc7">Canlı ortamda coroutine’ler</a> was originally published in <a href="https://medium.com/gdg-istanbul">GDGIstanbul</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coroutines In Production]]></title>
            <link>https://proandroiddev.com/coroutines-in-production-378e8c1c7532?source=rss-9d967fa37eb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/378e8c1c7532</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[Hadi Tok]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 07:10:33 GMT</pubDate>
            <atom:updated>2019-03-26T20:49:01.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*d0P__R0JpaVAc2njxVNM5A.jpeg" /></figure><p>Kotlin coroutines is the hot topic in the Kotlin and Android development. In CitizenMe Android app coroutines replaced usages of RxJava’s Single, Maybe and Completable classes. I gave a talk on DevFest Istanbul about it a while ago. Slides can be found <a href="https://speakerdeck.com/oshamahue/rxjava-vs-coroutines">here</a>. I will talk about the experience we had with coroutines on production in this post. We don’t use Channels yet. I am kind of waiting Cold streams to be implemented to check it out. So it is out of scope of this post.</p><p>I should state this: I am really a fan of RxJava. On one of my <a href="https://medium.com/@oshamahue/why-to-use-reactive-programming-on-android-4f259e546cd9">previous posts</a> I had talked about why it should be used in Android. RxJava provides the best tools that could be provided with Java and it is the best way to go for asynchrony in Java. I still use it for the observable pattern needs on the CitizenMe Android app. But I think coroutines is the best choice for Kotlin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*arX2QSo_wRtMWf1FpAV9nA.jpeg" /></figure><h4>Readability</h4><p>This is the obvious one but I cannot tell how much the code is changed in a good way after switching coroutines from RxJava. Coroutines made it really easy to follow the code. It surfaced the parts of the code doing actual work and made it easy to spot problems with it. It would be good to try to have suspend functions instead of having coroutine starters (async , lauch ) and context switches. Having this as rule of thumb will improve readability even further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*0tnAbdkZrF1vVTEg6s7PyA.png" /></figure><h4>Unit Testing</h4><p>The main reason I decided to switch to coroutines could be unit testing. With RxJava unit testing I had some problems. After a unit test run, objects used in testing should be recreated so the next tests would have a fresh start. With a fresh start all the tests are independent and does not affect other tests. In a test suite with multiple tests of RxJava, I found some of the RxJava async operations was leaking and affecting the next test running with my setup. If the tests runs separately, they were successful but if all the tests run in the suit some of the tests were failing. I had to use sleep() or timeouts to solve problems like this but I hate them because I feel like using sleep() is non-deterministic also it causes tests to take longer to run.</p><p>Unit testing coroutines is really easy with <a href="https://mockk.io/">MockK</a>. Instead of using regular functions like every{} and verify{}, inside a runBlocking{} block, special coroutine functions like coEvery{} and coVerify{} should be used when testing a coroutine . With this approach no sleep() or timeouts needed. I will give a talk about MockK at International Women&#39;s Day 2019 event in Istanbul. More info about the event could be found at <a href="https://2019.wtmistanbul.com/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*8jSngElJakJAp90t9utjdQ.png" /></figure><h4>Combining Async Tasks</h4><p>One of the problems I had with RxJava was combining multiple concurrent jobs and streams with operators. I think the main problem with it was hard to debug. With coroutines structured concurrency, it is really easy to see what is going on with the tasks. It is also really easy to implement. Combining results of the tasks is not really off from sequential programming and it contributes to readability dramatically. I had some problems with error handling with Structured Concurrency which I will talk next in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*-wBLgufccX_u_bgE4xrkyg.png" /></figure><h4>Error handling</h4><p>I should say error handling is the hardest thing to master with coroutines. You might find yourself scratching your head why your app is crashed even though you have try-catch block. <a href="https://proandroiddev.com/@dmytrodanylyk">Dmytro Danylyk</a> wrote a nice <a href="https://proandroiddev.com/kotlin-coroutines-patterns-anti-patterns-f9d12984c68e">post</a> about coroutines in general but also could help avoid this kind of problems.</p><p>I also had a problem with stacktraces. Coroutines 1.1 solved some of those problems (<a href="https://github.com/Kotlin/kotlinx.coroutines/issues/74">related GitHub issue</a>) but still having some issues with <a href="https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter">Retrofit2 coroutines adapter</a>. Hopefully this issue will be resolved when Retrofit itself would have support for coroutines with <a href="https://github.com/square/retrofit/pull/2886">this PR</a> made it to the next release of Retrofit.</p><p>Last thing to note is as promised <a href="https://medium.com/@elizarov/structured-concurrency-722d765aa952">Structured Concurrency</a>. Even though it is a concise way to handle concurrent operations, you might see some unexpected behavior. My advice would be reading the <a href="https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md">Coroutines Guide</a> and playing with it in a pet project before using in production to avoid these kinds of problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*WZt8TvCjau5TcNBV1TcXLQ.gif" /></figure><p>Even though we had problems is very pleasant to use coroutines. It seems pretty easy to use but you might end up unexpected situations if you don’t know what you are doing. I think it should be fair considering how big of a problem coroutines solving in a right way. Most of the resources I provided in this post was not available when I was trying out coroutines first time so I hope they would save you from some trouble.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=378e8c1c7532" width="1" height="1" alt=""><hr><p><a href="https://proandroiddev.com/coroutines-in-production-378e8c1c7532">Coroutines In Production</a> was originally published in <a href="https://proandroiddev.com/">ProAndroidDev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>