<?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 Ersen Tekin on Medium]]></title>
        <description><![CDATA[Stories by Ersen Tekin on Medium]]></description>
        <link>https://medium.com/@ersentekin?source=rss-413127968e7d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Qd8Wxo9csx45ThKe.jpeg</url>
            <title>Stories by Ersen Tekin on Medium</title>
            <link>https://medium.com/@ersentekin?source=rss-413127968e7d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 17:39:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ersentekin/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[HTML Parsing with NSAttributedString]]></title>
            <link>https://medium.com/trendyol-tech/html-parsing-with-nsattributedstring-6a2c088ce181?source=rss-413127968e7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a2c088ce181</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[nsattributedstring]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Ersen Tekin]]></dc:creator>
            <pubDate>Tue, 28 Jul 2020 11:54:11 GMT</pubDate>
            <atom:updated>2020-07-28T11:54:11.261Z</atom:updated>
            <content:encoded><![CDATA[<p>When we decided to rewrite and redesign the orders list screen, we also wanted to use small pieces of html strings for some part of each order cell information we provide. This approach could give us little freedom to change colors, fonts, order statuses etc. dynamically. This means, we need to parse multiple html strings for every cell.</p><p>We started to face a few issues at that point, since the “every cell” is the important keyword here. As we used to configure table cells with mostly prepared data, we just pass the required data to cell classes, inside the <strong>cellForRow</strong> delegate method.</p><p>There are 3 important points to be considered, especially when parsing and displaying html data in cells.</p><h3>Initial usage of NSAttributedString</h3><p>At the very first call of <strong>NSAttributedString</strong> for parsing the html data, iOS is allocating a few threads, especially the <strong>JavaScriptCore</strong> and <strong>WebThread</strong> ones. This indicates that <strong>WebKit</strong> is just used to parse the html under the hood.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*P3l-QnsUv-rpwh89ZpKZSw.png" /></figure><p>So it means <strong>WebKit</strong> and other necessary modules are building up which takes really a good amount of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rSRFAHNpmFKvKfFilvbeUg.png" /></figure><p>Of course, the time spent for first parsing operation depends on the html string, but it can be up to <strong>1 second</strong> for a mid-sized html. Apparently, it’s not possible to avoid it but at least we can keep it in mind to avoid blocking the application flow.</p><p>Thankfully, it just takes that much time and memory, just for the first time. When you try to parse another html data with <strong>NSAttributedString</strong>, it uses some sort of internal cache for consecutive calls and takes reasonable milliseconds (around 1/10 seconds of the initial call.)</p><h3>Consecutive parsing calls</h3><p>As we mentioned, consecutive parsing operations are also not so cheap. It could take around <strong>0.02</strong> second for each mid size html data. So this means if you try to parse the html in every <strong>cellForRow</strong>, it’s very likely to see some delay on scrolling actions.</p><p>For our specific case at the orders list screen, we fetch the orders by indicating the page size and number. Then we resolved the scrolling issue by parsing the HTML beforehand, right after the fetch is completed (also a loader icon is shown at that moment). And then store the <strong>NSAttributedString</strong> objects in ViewModels.</p><h3>Main Thread is required</h3><p>Since using <strong>NSAttributedString</strong> with <strong>NSHTMLTextDocumentType</strong> requires WebKit importer and is not a thread safe operation, it just needs to be run on the main thread. This brings another thing to keep in mind that every html parsing operation requires to block the main thread, or user interactions in other words. Depending on the amount of HTML data, it would make sense to consider this delay and tackle by showing a loader, or just splitting the html data if possible in your case.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a2c088ce181" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/html-parsing-with-nsattributedstring-6a2c088ce181">HTML Parsing with NSAttributedString</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[23 Mart [Z]]]></title>
            <link>https://medium.com/z-raporu/23-mart-z-8c2d923f9f36?source=rss-413127968e7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c2d923f9f36</guid>
            <category><![CDATA[z-raporu]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[yazilim]]></category>
            <dc:creator><![CDATA[Ersen Tekin]]></dc:creator>
            <pubDate>Wed, 23 Mar 2016 16:27:14 GMT</pubDate>
            <atom:updated>2016-03-23T18:20:47.083Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Facebook Messenger’a bot yazılarak güzel işler çıkabilir gibi görünüyor. Startup’lara da ilham olabilir 🐝 (Buarada Telegram bu ve benzeri birçok developer imkanını çoktan sağladı. ama pazarı domine eden FB / Whatsapp olunca güzel habermiş izlenimi uyandırıyor haliyle)</li></ul><p><a href="http://techcrunch.com/2016/01/05/facebook-messenger-bots/">Facebook&#39;s Secret Chat SDK Lets Developers Build Messenger Bots</a></p><ul><li>Fastlane platformunu duymamış bir iOS Developer varsa diye eklemek istedim. Özellikle Twitter’ın <a href="https://github.com/KrauseFx">Krause</a>’den bu platformu satın almasından sonra birçok yerde karşınıza çıkmış olma ihtimali yüksek.</li></ul><p><a href="https://fastlane.tools/">fastlane - App automation done right</a></p><ul><li>Bugün fastlane’i paylaşma fikrini asıl doğuran link ise aşağıda. Krause ilginç bir repository açmış Github’da. Description’da da “top secret project” yazıyor. Fikir sahibi birisi varsa comment olarak yazabilir :)</li></ul><p><a href="https://github.com/KrauseFx/fasttrack">KrauseFx/fasttrack</a></p><ul><li>klasik olarak geçen birkaç kitabın aşırı kısa özetleri (iyi kalitede illüstrasyon ve mizah içeriyor 👏😁)</li></ul><p><a href="http://www.boredpanda.com/abridged-classics-books-shortened-comics-wrong-hands-john-atkinson/?utm_source=facebook&amp;utm_medium=link&amp;utm_campaign=BPFacebook">Extremely Shortened Versions of Classic Books For Lazy People</a></p><ul><li>Apple’ın iOS 9.3&#39;teki Night Shift’ine bayıldım, uzun süredir beklediğim bir özellikti. (bu işi yapan bir public iOS SDK yoktu malesef.) Flux isimli firmanın bazı platformlara çıkardığı ve hemen hemen aynı işi yapan applicationlarına göz atabilirsiniz.</li></ul><p><a href="https://justgetflux.com/">f.lux</a></p><ul><li>Bu da f.lux’ın iOS application’ı. Private API kullanma mecburiyetleri olduğu için App Store’a çıkamıyorlar. :/</li></ul><p><a href="https://justgetflux.com/ios.html">f.lux</a></p><ul><li>🎉 vee Hillary Clinton Email Archiveeee</li></ul><p><a href="https://wikileaks.org/clinton-emails/">WikiLeaks - Hillary Clinton Email Archive</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c2d923f9f36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/z-raporu/23-mart-z-8c2d923f9f36">23 Mart [Z]</a> was originally published in <a href="https://medium.com/z-raporu">Z Raporu</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[21 Mart [Z]]]></title>
            <link>https://medium.com/z-raporu/21-mart-z-183513624749?source=rss-413127968e7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/183513624749</guid>
            <category><![CDATA[z-raporu]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[dailies]]></category>
            <dc:creator><![CDATA[Ersen Tekin]]></dc:creator>
            <pubDate>Mon, 21 Mar 2016 15:30:15 GMT</pubDate>
            <atom:updated>2016-03-21T20:09:58.926Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Swift’in ortaya çıkışından sonra <strong>protocol </strong>yapısını da sık sık ön planda görür olduk. Hatta <a href="https://en.wikipedia.org/wiki/David_Abrahams_(computer_programmer)">David Abrahams</a> ‘ın Swift tanımı şu şekilde olmuş:</li></ul><blockquote>“Swift is a protocol-oriented programming language”</blockquote><p>Birkaç yıldır Objective-C tarafında da yaygın şekilde kullanılan <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel">MVVM</a> mimarisini, <strong>protocol-oriented</strong> yapısıyla birleştirmiş <a href="https://www.google.com.tr/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwi3qbWwh9LLAhXlmnIKHYkuBAQQFggdMAA&amp;url=https%3A%2F%2Ftwitter.com%2Fnatashatherobot&amp;usg=AFQjCNFCWCoSrdSXM7-huV1okvw26O7M6g&amp;sig2=ic5roU_dVQJ3ylzQI80lZg">Natasha the Robot</a> . (Buarada, <a href="http://realm.io/">Realm.io</a> ‘nun tutorial bültenine abone olmanızı tavsiye ederim. iOS Development sektöründe en yenilikçi kaynaklardan birisidir.)</p><p><a href="https://realm.io/news/doios-natasha-murashev-protocol-oriented-mvvm/?utm_campaign=This+Week+in+Swift&amp;utm_medium=email&amp;utm_source=This_Week_in_Swift_79">Introduction to Protocol-Oriented MVVM, with Natasha Murashev</a></p><ul><li>Bugün aşağıdaki Swift JIRA tasklarına denk gelmiş olma ihtimaliniz bayaca yüksek 😀 Community, <strong>Swift’e contribution</strong> yapmak isteyip nereden başlasam diyenler için ideal olduğu söylenen task’ları bir label altında toplamış . <em>StarterBug </em>ile etiketlenmiş JIRA tasklarına aşağıdan ulaşabilirsiniz.</li></ul><p><a href="https://bugs.swift.org/browse/SR-978?jql=project%20=%20SR%20AND%20status%20in%20(Open,%20&quot;In%20Progress&quot;,%20Reopened)%20AND%20labels%20=%20StarterBug">Issue Navigator - Swift</a></p><ul><li>Evde <strong>avokado yetiştirmek</strong> anladığım kadarıyla popüler ve bi nebze kolay bir işlem sanırım. Youtube search’lerinde denk geldiğim ilginç kanallar da var. Ama avokado çekirdeğinin saksıya ilk yerleşimi vs. gibi işlemlerde biraz meşakkatli kaçıyor sanırım. Kürdanlar ile dik tutulmaktan vs. bahsediliyor. (çekirdeğin dik durmasından farklı bir işlevi varsa lütfen beni de uyarın düzeltiyim 🐝) <br><strong>Avoseedo </strong>isimli bir girişim bu ilk başlangıç düzeyindeki sıkıntıları aşmanızı ve güzel bir görünüm elde etmenize olanak sağlıyor. Aşağıdaki linkten ürünü inceleyebilirsiniz. Ayrıca dünya çapında <strong>ücretsiz kargo</strong> hizmeti sunuyor :)</li></ul><p><a href="https://www.avoseedo.com/">Home - AvoSeedo - Grow your own Avocado Tree!</a></p><ul><li>Artificial Intelligence olayları/haberleri aldı başını yürüdü. AI anlamında çok simple bir iş yapan bu <strong>iPhone uygulaması</strong>nın ismi <strong>AI • Scry</strong> Real-time olarak kamerada gördüğünü neye benzetiyorsa ekrana yazıyor. (örn: A tiny pizza piece on a white plate)</li></ul><blockquote>Benim denk geldiğim örneklerden birisi de şu oldu: “A guy who is looking on a screen is wearing a black shirt”</blockquote><ul><li>Alibaba’dan e-commerce alanında VR kullanım örneği.</li></ul><p><a href="http://techcrunch.com/2016/03/17/alibaba-is-working-to-bring-virtual-reality-into-its-e-commerce-services/?utm_content=bufferb3e08&amp;utm_medium=social&amp;utm_source=twitter.com&amp;utm_campaign=buffer">Alibaba is working to bring virtual reality into its e-commerce services</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=183513624749" width="1" height="1" alt=""><hr><p><a href="https://medium.com/z-raporu/21-mart-z-183513624749">21 Mart [Z]</a> was originally published in <a href="https://medium.com/z-raporu">Z Raporu</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>