<?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 Onur Genes on Medium]]></title>
        <description><![CDATA[Stories by Onur Genes on Medium]]></description>
        <link>https://medium.com/@onurgenes?source=rss-325b32bfdf2e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gi7mWMS3pAfG1Izj6cJPFQ@2x.jpeg</url>
            <title>Stories by Onur Genes on Medium</title>
            <link>https://medium.com/@onurgenes?source=rss-325b32bfdf2e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:31:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@onurgenes/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[M1 Mac Setup Guide]]></title>
            <link>https://medium.com/@onurgenes/m1-mac-setup-guide-1a8baecdab70?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a8baecdab70</guid>
            <category><![CDATA[m1]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Tue, 19 Jan 2021 14:58:00 GMT</pubDate>
            <atom:updated>2021-09-10T05:35:19.443Z</atom:updated>
            <content:encoded><![CDATA[<p>So you have bought the shiny new M1 Macbook Pro, Macbook Air or Mac Mini. What now? It is a different architecture for CPU wise. It is not a regular Intel CPU. Not every app or program you are using is compatible. Rosetta 2 is working fine. Most of the you can’t tell the difference but sometimes things can get trickier.</p><p>Let’s start from the moment you have bought it.</p><p>Before touch into anything, there will be updates depending on the date you have bought. For me, it has updates for MacOS and app updates as well.</p><p>So, hold your horses and go to <strong>System Preferences &gt; Software Update</strong>. Start update. It might take a while depending your internet connection but still, you have to do it.</p><p>Done already? Let’s continue.</p><p>You should start changing internal apps settings.</p><h3>Safari</h3><p>If you are a developer you might want to open Developer tools. Maybe you were using an ad blocker <em>(you should)</em> go and download it from App Store. I recommend <a href="https://apps.apple.com/us/app/wipr/id1320666476?mt=12">Wipr</a> because it is really lightweight and easy to use. Of course I am also using <a href="https://pi-hole.net/">Pi-Hole</a>.</p><p>If you are interested you can check <a href="https://devgenes.com/posts/Being-a-Privacy-Activist-as-a-Developer/">my other post</a>.</p><h3>Email</h3><p>Personally I don’t like using Apple Mail. I am using <a href="https://sparkmailapp.com/">Spark</a> but I will change it soon probably. It might be a good time to try Apple Mail again. But if you use custom mail app, go to <strong>Mail.app &gt; Settings</strong> and you will see the default mail app. Change it.</p><h3>System Preferences</h3><p>Change the Keyboard, Trackpad and Mouse settings. If you used everything in default until today, you should try playing around with settings. For example, <strong>Key Repeat</strong> and <strong>Delay Until Repeat</strong> is must be at the top for me. Otherwise it feels so slow.</p><p>Also if you are a bilingual like me, add new <strong>Input Types</strong> as well. <strong>You can switch between languages using ⌘ + ⌥ + Space</strong>.</p><h3>Xcode</h3><p>You should start everything with installing Xcode. You can download it from App Store but also from <a href="https://developer.apple.com/">Apple Developer Website</a></p><h3>iTerm</h3><p>I am using <a href="https://iterm2.com/">iTerm</a>. It is a really good Terminal app. It is supporting custom fonts and also M1 supported out of the box. Go for it.</p><h3>Command Line Tools</h3><p>Don’t forget to install Command Line Tools. You can install it with xcode-select --install. It will take a while but it is better to have it before hand.</p><h3>oh-my-zsh</h3><p>MacOS using zsh as default. If you want to customize it easily you can use . Which is my favourite.</p><h3>powerlevel10k</h3><p>I was a long time user of <a href="https://github.com/Powerlevel9k/powerlevel9k">powerlevel9k</a> but it is deprecated but luckily we have <a href="https://github.com/romkatv/powerlevel10k">powerlevel10k</a>. Which is more powerful and fast, as the name suggests.</p><p>Also it is much more easier to install because it install everything by itself. Just follow the instructions. Also you will have a fancy Terminal. Cool!</p><h3>zsh-autosuggestions and zsh-syntax-highlighting</h3><p>These are the best plugins for the oh-my-zsh. Using them will give you super powers! Well, sort of. If you are forgetting commands all the time, yes they will give you super powers.</p><h3>zsh-nvm (if you are using NodeJS)</h3><p>Of course everyone uses NodeJS. Go and install . It will do everything necessary for you. And you will have nvm. It is supercool. We will need this.</p><p>After installing nvm, install NodeJS. But beware, it will compile everything from source. Beacuse at the time I have written this post, there were no pre-built binaries for arm64 on nvm.</p><p>It will take time but you have to do it anyway.</p><h3>Homebrew</h3><p>You were waiting for this, don’t you? Here we are.</p><p>I have followed <a href="https://soffes.blog/homebrew-on-apple-silicon">Sam Soffes’s Blog</a> for the tutorial but I will give you a shorter version.</p><p>Just copy the commands below:</p><p>and then open your .zshrc file with nano ~/.zshrc (yes, I am using nano).</p><p>Last thing is adding following lines at the end of the .zshrc file:</p><p>You can change ibrew to brew_old_and_slow_intel or whatever. It is your decision to how to praise your lovely <strong><em>M1 Macbook Pro</em></strong>.</p><h3>VS Code</h3><p>Every developer needs a slow, feature bloated and (too much) customizable Text Editor, right? We will use <a href="https://code.visualstudio.com/insiders/">VSCode Insiders</a> because it has <strong>native M1 support</strong>. Lovely!</p><p>Go <a href="https://code.visualstudio.com/insiders/">here</a> and click that sooo small ARM64 link.</p><p>Also funny side effect, Activity Monitor shows VSCode as iOS app. I wish it was true!</p><h3>The Others</h3><p>I will not guide you through all the tools I am using but putting a little list below.</p><ul><li><a href="https://polypane.app/">Polypane</a> — This is one of the best Web Developer tools.</li><li><a href="https://insomnia.rest/">Insomnia</a> — Light weight HTTP Rest app. Better than Postman.</li><li><a href="https://www.alfredapp.com/">Alfred</a> — Are you still using Spotlight? What a shame!</li><li><a href="https://folivora.ai/">BetterTouchTool</a> — Especially if you are using a Macbook Pro with a <strong>beautiful Touch Bar</strong>.</li><li><a href="https://proxyman.io/">Proxyman</a> — Charles Proxy alternative. It is a native Mac App and supports M1 out of the box!</li><li><a href="https://www.mozilla.org/en-US/firefox/developer/">Firefox Developer Edition</a></li><li><a href="https://www.termius.com/">Termius</a> — If you are using AWS or using so many different SSH Keys, you should consider this.</li></ul><p>If you are using a Mac, you should use Native Mac Apps. Not Adobe stuff.</p><p>They are lighter, faster, better, stronger and . Go to <a href="https://affinity.serif.com/en-gb/">Affinity Website</a> and buy everything. Seriously. They are really good.</p><p>Probably we have forgotten so many things but still, having this kind of list is handy.</p><p>Thanks for reading.</p><p><em>Originally published at </em><a href="https://devgenes.com/posts/m1-mac-setup-guide/"><em>https://devgenes.com</em></a><em> on January 19, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a8baecdab70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being a Privacy Activist (also as a Developer)]]></title>
            <link>https://medium.com/@onurgenes/being-a-privacy-activist-also-as-a-developer-55e39bbeffd2?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/55e39bbeffd2</guid>
            <category><![CDATA[activist]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Sun, 01 Nov 2020 08:02:00 GMT</pubDate>
            <atom:updated>2021-09-10T05:36:24.793Z</atom:updated>
            <content:encoded><![CDATA[<p>We are living in a digital age. I know this is a cliché but is the truth. We are constantly surfing on the web, using mobile apps, sharing our personal data… But we are also sharing our privacy with big companies without even realizing. This is a cute way to say it but at the end we are giving so many details about us on digital platforms. As a developer, we have so many things to do. Writing the code, managing the requirements etc. But also being a developer means you have to somehow respect your users privacy. Of course this applies if you have any ethical concerns. This shouldn’t be like this but today we are here. This doesn’t mean we don’t have any way to protect ourselves. In this article, I will share some ways to avoid this kind of situation.</p><h3>Let’s Start</h3><p>Let’s start with basics.</p><h3>AdBlockers</h3><p>As a MacBook user, or Apple user in general, I really like to use Safari. It is really fast, easy to use, seamless synchronization and so many other useful stuff. But it is not easy to find a good AdBlocker for MacOS or Safari.</p><p>I am using <a href="https://apps.apple.com/us/app/wipr/id1320666476?mt=12">Wipr</a>. It is a really good adblocker and it is really light weight. It is paid. Which is a good thing because if something is free, you should be afraid.</p><h3>Pi-Hole</h3><p><a href="https://pi-hole.net/">Pi-Hole</a> is the best use for <a href="https://www.raspberrypi.org/">Raspberry Pi</a>. If you have on and laying somewhere in the house (This is what we do when we see a new Raspberry Pi. Buy it. Never use it.) use it as a content and tracking blocker. It can act as a AdBlocker but with steroids.</p><p>You can check out the official <a href="https://pi-hole.net/">Pi-Hole</a> website for information and installation steps. <a href="https://docs.pi-hole.net/guides/unbound/"><strong>Also don’t forget to add unbound to Pi-Hole.</strong></a></p><p>We can talk about privacy and effects on marketing for hours but at the end this an ethical topic and we and up nowhere. I will just show you few ways to be more privacy friendly and if you agree with me please use this tools.</p><h3>Simple Analytics</h3><p><a href="https://referral.simpleanalytics.com/onur-genes">Simple Analytics</a> is a tool for analytics. I have recently encountered and fell in love with it because it is totally, %100, perfect way to use analytics and respect user privacy.</p><p>It is GDPR, CalOPPA, and every other privacy protecting law compliant, little bit pricey (if you live in anywhere outside of the Europe or USA) but perfect tool. You can use it without hesitation because if you use this tool, <a href="https://docs.simpleanalytics.com/your-privacy-policy"><strong><em>you don’t have to add anything to your privacy policy.</em></strong></a></p><p>Also this website is using <a href="https://referral.simpleanalytics.com/onur-genes">Simple Analytics</a> and I am really proud of it.</p><p><em>Originally published at </em><a href="https://devgenes.com/posts/Being-a-Privacy-Activist-as-a-Developer/"><em>https://devgenes.com</em></a><em> on November 1, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55e39bbeffd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use SwiftLint?]]></title>
            <link>https://medium.com/@onurgenes/how-to-use-swiftlint-da8b983f6163?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/da8b983f6163</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swiftlint]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Sun, 18 Aug 2019 14:10:00 GMT</pubDate>
            <atom:updated>2019-08-18T14:10:00.308Z</atom:updated>
            <content:encoded><![CDATA[<p>“How to use SwiftLint for making your code clean and avoid bugs?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VqUO8jO8BdMWdRRU" /><figcaption>Photo by <a href="https://unsplash.com/@grohsfabian?utm_source=medium&amp;utm_medium=referral">Fabian Grohs</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>How to Use SwiftLint?</strong></h3><p>SwiftLint is a tool for making your code clean and maybe avoid bugs. Basically this is a code styling tool. Which is not going to make you a <strong>“10x Developer”</strong> but anyway…</p><blockquote>Please consider reading this article from my own website: <a href="https://devgenes.com/">https://devgenes.com</a></blockquote><h3><strong>Getting Started</strong></h3><p>First of all we need to get “SwiftLint” for “linting” our codebase.</p><p>There are couple ways to do that:</p><p>1. Download with [HomeBrew](https://brew.sh/).</p><p>2. Use CocoaPods.</p><p>3. Using [Mint](https://github.com/yonaskolb/mint) etc.</p><p>But in this tutorial we will use HomeBrew.</p><p>It is really easy to install with HomeBrew:</p><blockquote>brew install swiftlint</blockquote><h3><strong>How to use?</strong></h3><p>Well, there are 2 ways to use.</p><p><strong>- Go to root directory of your project and run</strong></p><blockquote>swiftlint</blockquote><p><strong>- The other and recommended way is adding a `Run Script Phase` to Xcode:</strong></p><p>- On “<strong>Project Navigator</strong>” click on the blue project icon</p><p>- Go to “<strong>Build Phases”</strong> and <strong>click “+</strong>”</p><p>- Select “<strong>New Run Script Phase”</strong></p><p>- Add paste the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2d67b04d4c0e5b73b7b381a2afefc7f/href">https://medium.com/media/f2d67b04d4c0e5b73b7b381a2afefc7f/href</a></iframe><p>Now every time you build your project, SwiftLint will run and check for warnings and errors.</p><h3><strong>Basic rules</strong></h3><p>With default settings of SwiftLint, you can get many errors even on a basic project. Also it will check files which in `CocoaPods`or `Carthage`folders.</p><p>To avoid that we have to use a file called `.swiftlint.yml`.</p><p>You can check out all rules on terminal with</p><blockquote>swiftlint rules</blockquote><p>I am giving you a basic yml rules for excluding unnecessary rules. It is working for me but you may have to change it a little bit:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/113d628527a18266c6762eb0dbce2542/href">https://medium.com/media/113d628527a18266c6762eb0dbce2542/href</a></iframe><p>You can play around with them to fit your project styling.</p><h3><strong>Conclusion</strong></h3><p><a href="https://github.com/realm/SwiftLint">SwiftLint</a> is a really great rule for keeping consistent styled code base. Also you can customize freely for your own rules.</p><p>Try to implement it right away and if you have any questions, feel free to reach me out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da8b983f6163" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moya as Networking Layer with Codable]]></title>
            <link>https://medium.com/@onurgenes/moya-as-networking-layer-with-codable-63b61eb494f6?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/63b61eb494f6</guid>
            <category><![CDATA[delegation]]></category>
            <category><![CDATA[moya]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Fri, 08 Mar 2019 13:42:50 GMT</pubDate>
            <atom:updated>2019-03-08T13:43:44.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yCc3C4lmJQ8dyLz2" /><figcaption>Photo by <a href="https://unsplash.com/@cgower?utm_source=medium&amp;utm_medium=referral">Christopher Gower</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>What is Moya? And Why?</strong></h3><p><em>Moya is that we want some network abstraction layer that sufficiently encapsulates actually calling Alamofire directly. It should be simple enough that common things are easy, but comprehensive enough that complicated things are also easy.</em></p><h4><strong>Moya’s awesome features:</strong></h4><ol><li>Compile-time checking for correct API endpoint accesses.</li><li>Lets you define a clear usage of different endpoints with associated enum values.</li><li>Treats test stubs as first-class citizens so unit testing is super-easy.</li></ol><h4><strong>Installation</strong></h4><p>Installation part is described really well on <a href="https://github.com/Moya/Moya/">Moya’s Github Page</a>.</p><h4><strong>The API</strong></h4><p>We will use <a href="https://jsonplaceholder.typicode.com/">JSONPlaceholder</a> as our API.</p><h4><strong>Let’s Start With Models</strong></h4><p>We will use <strong><em>typealias Codable = Encodable &amp; Decodable</em></strong> for out model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9da6ce11e2ce5ea73be45bd63f4e97a9/href">https://medium.com/media/9da6ce11e2ce5ea73be45bd63f4e97a9/href</a></iframe><p><strong>Create API Enum with TargetType</strong></p><p>For keeping the post as easy as possible we will just use 1 POST and 2 GET route.</p><p>Let’s create API Enum:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09de9fcd518e5c2081dee5d3be3007ea/href">https://medium.com/media/09de9fcd518e5c2081dee5d3be3007ea/href</a></iframe><p>And add Moya’s necessary extensions on top of it:</p><p>First, <strong>baseURL</strong>. This is used for our API’s base URL:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e451e025cd3c1016242bfbfd45b54e1/href">https://medium.com/media/1e451e025cd3c1016242bfbfd45b54e1/href</a></iframe><p>Next, <strong>path</strong>. We are using this for defining different routes (e.g. <strong><em>/posts</em></strong>, <strong><em>/comments</em></strong> etc.):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79695878fe38dd44f409f86ff45a0965/href">https://medium.com/media/79695878fe38dd44f409f86ff45a0965/href</a></iframe><p>Next, <strong>method</strong>. We can define different methods for different <strong>func</strong>s:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29a5e14722ea769f84d378089913b572/href">https://medium.com/media/29a5e14722ea769f84d378089913b572/href</a></iframe><p>Next, we need sample <strong>Data</strong> for testing. We will not cover this on that post. So, let’s give it a simple <strong><em>Data()</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/371a2dfeb81e98d93081e922a36393d3/href">https://medium.com/media/371a2dfeb81e98d93081e922a36393d3/href</a></iframe><p>Next, we need to define our <strong>task</strong>s.</p><ul><li>We need <strong>.requestPlain</strong> for getting all <strong><em>Post</em></strong>s.</li><li><strong>.requestParameters</strong> for getting specific <strong><em>Post</em></strong>.</li><li>Lastly, <strong>.requestJSONEncodable</strong> for creating a <strong><em>Post</em></strong> with our <strong><em>Codable</em></strong> object.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49affecbeb067e9bb711ae94cabc2db8/href">https://medium.com/media/49affecbeb067e9bb711ae94cabc2db8/href</a></iframe><p>Last, we need <strong>headers</strong>. This will be sent with all of our requests:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f62ce7f307c999a2bee3e3700944e70/href">https://medium.com/media/6f62ce7f307c999a2bee3e3700944e70/href</a></iframe><h4><strong>Create our Networkable Delegate</strong></h4><p>Our <strong>NetworkManager</strong> will need to conform to <strong><em>Networkable</em></strong>. We will create our protocol like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3985ca78c5c882c3f1d7740ac0443bb8/href">https://medium.com/media/3985ca78c5c882c3f1d7740ac0443bb8/href</a></iframe><h3><strong>Now, NetworkManager</strong></h3><p>We will create a <strong>NetworkManager</strong> object for <a href="https://www.swiftbysundell.com/posts/different-flavors-of-dependency-injection-in-swift">Dependency Injection</a>. Let’s create:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1d1dd87cabe606d73ab3c5eee14df03/href">https://medium.com/media/a1d1dd87cabe606d73ab3c5eee14df03/href</a></iframe><p><strong><em>TL;DR</em></strong>: We have created a NetworkManager with necessary request `func`s and now we can create an object of that class and use it for requesting.</p><h4>Note:</h4><p>I am using a <em>Moya plugin</em> for showing all requests and responses on console in that line:</p><p><strong><em>var provider = MoyaProvider&lt;JSONPlaceHolderAPI&gt;(plugins: [NetworkLoggerPlugin(verbose: true)])</em></strong></p><p>This is not necessary on production.</p><h3><strong>Let’s Test Our Code</strong></h3><p>We can use our <strong><em>NetworkManager</em></strong> like this, (without <em>Dependency Injection</em>):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11fb2318ef5df1298077f403a86d6b32/href">https://medium.com/media/11fb2318ef5df1298077f403a86d6b32/href</a></iframe><p>Note: With <strong><em>dump</em></strong> you can get more stylized version of <strong><em>print</em></strong>.</p><h3><strong>That’s It!</strong></h3><p>Now you can use <strong><em>Moya</em></strong>.</p><h3>You can read this story at my own blog:</h3><p><a href="https://devgenes.com/posts/moya-as-network-layer-with-codable">https://devgenes.com/posts/moya-as-network-layer-with-codable</a></p><blockquote>If you want to get in touch, maybe just for saying “HEY”, you can use the links below.</blockquote><blockquote>Thanks.</blockquote><blockquote><a href="http://twitter.com/onurgenes">Twitter</a> — <a href="/service/mailto:onur@onurgenes.com">Mail</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63b61eb494f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Hero Transition Library with Xcode 9.4 and Swift 4.1]]></title>
            <link>https://medium.com/@onurgenes/using-hero-transition-library-with-xcode-9-4-and-swift-4-1-fd77f347f86b?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd77f347f86b</guid>
            <category><![CDATA[transitions]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Fri, 29 Jun 2018 14:55:03 GMT</pubDate>
            <atom:updated>2018-12-30T23:27:50.370Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>You can read this story from my <a href="https://devgenes.com/">website</a>:</blockquote><blockquote><a href="https://devgenes.com/posts/hero-transitions-with-xcode-10-swift-4-2/">https://devgenes.com/posts/hero-transitions-with-xcode-10-swift-4-2/</a></blockquote><blockquote>“Hero is a library for building iOS view controller transitions. It provides a declarative layer on top of the UIKit’s cumbersome transition APIs — making custom transitions an easy task for developers.” says Hero’s GitHub library.</blockquote><p>I’ve tried searching on Google so many times but couldn’t find any up to date tutorial. I’ve decided to make my own tutorial. So, here we go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*99gZXaiGwiSTUghA" /><figcaption>Photo by <a href="https://unsplash.com/@just_radovan?utm_source=medium&amp;utm_medium=referral">Radovan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Let’s Start</h3><p>I am passing the installation stuff because it’s really well explained on the Hero’s documentation pages. Insted we will start with code. I am saying code because I am not using Storyboards for almost a year. (Thanks to <a href="https://twitter.com/buildthatapp"><strong>@</strong>buildthatapp</a>)</p><h4>Creating Simple UI (Without Storyboard)</h4><p>After the “pod install” and “open myapp.xcworkspace” first thing we will do is deleting “Main.storyboard” from Targets -&gt; General -&gt; Deployment Info -&gt; Main Interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*2nG7sUQfO7ZW2spNjZtb9A.png" /><figcaption>Deleted Main Interface field.</figcaption></figure><p>If we run the app, it will show black screen. Because we don’t have UIWindow yet. (Actually it is ‘nil’ now.)</p><p>So let’s figure that out.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eeb1edde733c8349cb9a83eef9a497b7/href">https://medium.com/media/eeb1edde733c8349cb9a83eef9a497b7/href</a></iframe><ol><li>Simply, we created <strong>UIWindow</strong> and made it main screen.</li><li>Created <strong>viewController</strong>’s instance.</li><li>Created a <strong>navigationController</strong> because we will need that later.</li><li><strong>navigationController</strong>’s hero is enabled. (I will explain that later.)</li><li>Last but not least, from now on, our rootViewController is <strong>navigationController</strong></li></ol><h3>Creating First ViewController</h3><p>We will create a <strong>UIView</strong> with <strong>UIColor.green</strong> backgroundColor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90cbe25ad8fd0cec83bdf71d93059697/href">https://medium.com/media/90cbe25ad8fd0cec83bdf71d93059697/href</a></iframe><p>We will enable hero on <strong>ViewController()</strong>:</p><pre>self.hero.isEnabled = true</pre><p>Next, give our <strong>greenView, hero.id:</strong></p><pre>greenView.hero.id = &quot;greenView&quot;</pre><p>Let’s say we want to use <strong>UINavigationController</strong>. We need to enable <strong>hero</strong> on <strong>navigationController</strong> too (did you remember the <strong>AppDelegate.swift</strong>?):</p><pre>// AppDelegate.swift</pre><pre>navigationController.hero.isEnabled = true</pre><p>And lastly, added <strong>UITapGestureRecognizer</strong> for <strong>push</strong>’ing <strong>UIViewController</strong> to <strong>UINavigationController</strong>.</p><p>Currently I am using “<a href="https://github.com/freshOS/Stevia">SteviaLayout</a>” for AutoLayout. It’s worth checking out.</p><p>Our ViewController class looking like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ba4a43728eaf18afa4a75bf55b4a04e/href">https://medium.com/media/5ba4a43728eaf18afa4a75bf55b4a04e/href</a></iframe><p>Next, we will create SecondViewController very similarly;</p><ol><li>Create a new <strong>greenView</strong></li><li>Give a <strong>hero.id</strong></li><li>We will enable hero with <strong>self.hero.isEnabled = true</strong></li><li>Add <strong>UITapGestureRecognizer</strong> for <strong>pop</strong>’ing <strong>UIViewController</strong> from <strong>UINavigationController</strong></li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f2f156fecea36721c7eb679a59100fe/href">https://medium.com/media/6f2f156fecea36721c7eb679a59100fe/href</a></iframe><p>And we’re done.</p><h3>Let’s Run, Finally</h3><p>Let’s run the app and see our final result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Hvf349kQktbKegMcgexEgA.gif" /><figcaption>Final Result</figcaption></figure><p>And we are done.</p><p>Please le tme know what you think.</p><blockquote>If you want to get in touch, maybe just for saying “Hi”, you can use the links below.</blockquote><blockquote>Thanks.</blockquote><blockquote><a href="http://twitter.com/onurgenes">Twitter</a> — <a href="/service/mailto:onur@onurgenes.com">Mail</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd77f347f86b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning ile Öğrenci Yönlendirme Projesi]]></title>
            <link>https://medium.com/@onurgenes/machine-learning-ile-%C3%B6%C4%9Frenci-y%C3%B6nlendirme-projesi-15ae9b7e628?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/15ae9b7e628</guid>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[machine]]></category>
            <category><![CDATA[onurgenes]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Mon, 09 Oct 2017 12:23:07 GMT</pubDate>
            <atom:updated>2017-10-09T12:23:07.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*xA8rhR_UM7cZCmZgMJQvsQ.jpeg" /></figure><p>Machine Learning’in kullanım alanlarına baktığımızda pek çok proje ve fikirle karşılaşıyoruz. Bir konuyu öğrenmek için en iyi yöntemin, konuyu pratik hayatta kullanmak olduğuna inanıyorum. Bunun için de kendime bir peoje seçtim.</p><p>Öğrenim gördüğüm alan olan Elektrik-Elektronik Mühendisliği’nin pek çok alt dalı bulunmakta. Gerek kendi arkadaşlarım, gerekse benden sonra bu bölüme başlayan <strong>öğrencilerin en çok yardıma ihtiyaç duyduğu konulardan birisi de bu alt dallardan hangisini seçeceği. </strong>Bu konuya çözüm bulmak istemem rağmen mantıklı bir çözüm yolu bulamamıştım. <strong>Machine Learning</strong> ile tanışana kadar.</p><p>Aklıma gelen fikir; öğrencilerin ilgi alanlarına, ders notlarına, sosyal hayattaki seçimleri dikkate alınarak; Machine Learning teknikleri kullanılarak Elektrik ve Elektronik Mühendisliği’nin alt dallarından en uygun olanı bulup öğrencilere alan seçimi konusunda yardımcı olmak amacıyla yapılan bir proje.</p><p>Başta çok zorlanacağıma emin olsam da bu konunun arkasını bırakmak istemedim.</p><p>Mesela zorlanacağım konulardan ilki, sistemi eğitmek için gereken veriyi nereden bulacağımı bilmiyor olmam. Buna çözüm olarak “dummy” veri kullanmaya karar verdim.</p><p>Proje henüz sözlü aşamada fakat ayrıntılar netleştikçe sizlerle de paylaşıyor olacağım.</p><blockquote>Eğer yazıyı beğendiyseniz ya da sadece “merhaba” demek istiyorsanız aşağıdaki linklerden benimle iletişime geçebilirsiniz.</blockquote><blockquote>Teşekkürler.</blockquote><blockquote><a href="http://twitter.com/onurgenes">Twitter</a> - <a href="/service/mailto:onur@onurgenes.com">Mail</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15ae9b7e628" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raspberry Pi Zero Wireless — Headless Kurulum]]></title>
            <link>https://medium.com/@onurgenes/raspberry-pi-zero-wireless-headless-kurulum-60338ae99c8a?source=rss-325b32bfdf2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/60338ae99c8a</guid>
            <category><![CDATA[raspberry-pi-zero]]></category>
            <category><![CDATA[raspberry]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[headless]]></category>
            <dc:creator><![CDATA[Onur Genes]]></dc:creator>
            <pubDate>Sat, 04 Mar 2017 20:22:33 GMT</pubDate>
            <atom:updated>2017-03-04T20:22:33.356Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*rsEY8NBbLEYT8i6nqy2Ibg.jpeg" /><figcaption>Dünyanın en “sevimli” bilgisayarı(?)</figcaption></figure><p>Çocukluğumdan beri bir şeylerin minyatürü ya da ufak hali hep daha sempatik gelmiştir. Kullanışlı olduğundan mı yoksa daha sempatik göründüğünden mi, bilmiyorum. Raspberry Pi ile ilk muhataplığımız bu durum sayesinde diyebiliriz. Bir yerlerde okuduğum “Kredi Kartı Boyutundaki Bilgisayar Artık Daha Güçlü!” tarzında bir haberden sonra ne olduğunu merak ederek ve ilk kez ikinci versiyonunu alarak tanışmış olduk bu aile ile.</p><p>Kullandığım ilk Raspberry Pi, Pi 2 Model B idi. Birinci modelden haberim yoktu fakat ikincisi artık “daha hızlı” olduğu için ilgimi çekmişti. Sanki yenisi çıkmayacak gibi özenle ama sürekli bir şeyler deneyerek “özenli eziyet ettiğim” RasPi 2 ile aramız, RasPi 3 çkınca açıldı. Çünkü artık “çok çok daha hızlı” bir üyesi vardı ailenin.</p><p>Daha sonra 2015 sonlarında, kelimenin tam anlamıyla, en küçük RasPi tanıtıldı. “Zero”. Fakat ben sınırlı sayıdaki bu miniklerden almayı başaramadım ve ekipte ikinci eksiğimizi de vermiş olduk. Derken Şubat ayının sonunda, Raspberry Pi’ın 5. doğum gününün (29 Şubat 2012) bir gün öncesinde 28 Şubat’ta “Zero Wireless” tanıtıldı. Bu sefer şanslıydım ve aldım.</p><p>Bu ufaklığa koca bir monitör takarak haksızlık etmek yerine headless(monitörsüz) kullanmaya karar verdim. Nasıl yaptığımı anlatmaya başlamadan önce <a href="http://www.samm.com/tr/blog/raspberry-pi-3-ilk-kurulumu.html"><strong>burada anlatıldığı gibi</strong></a><strong> </strong>(3. adımı yapmaya gerek yok)<strong> </strong>Raspbian kurulumunu yaptığınızı ve hafıza kartını tekrar bilgisayara bağladığınızı varsayıyorum.</p><p>Gerekenler:</p><ul><li>Raspberry Pi Zero ya da Zero W</li><li>Micro USB data kablosu</li><li>Raspbian yüklü bir hafıza kartı ve bu kart için bir kart okuyucu</li></ul><p>Hepsi bu! Ethernet kablosu ya da güç adaptörüne ihtiyacınız yok. Bu ufaklıkların üzerindeki Micro USB girişleri güç girişi olarak da kullanılabiliyor.</p><p>Şimdi kuruluma başlıyoruz:</p><ul><li><a href="http://www.samm.com/tr/blog/raspberry-pi-3-ilk-kurulumu.html"><strong>Raspbian kurulumu yapılmış</strong></a><strong> </strong>hafıza kartımızı kart okuyucu ile bilgisayara bağlıyoruz.</li><li>Hafıza kartının içindeki “config.txt” dosyasını standart text editor’lar dışında bir editor ile (<a href="https://www.sublimetext.com/">Sublime Text</a>’i tavsiye ederim) açıyoruz.</li><li>Dosyanın en alt satırına kadar inip, bir alt satıra geçerek “ dtoverlay=dwc2” komutunu ekliyoruz(<em>tabii ki tırnak işaretleri olmadan</em>). Sonrasında dosyayı kaydedip kapatıyoruz.</li></ul><p>En dikkatli olmamız gerek kısıma geldik:</p><ul><li>Hafıza kartındaki “cmdline.txt” dosyasını harici bir text editor ile açıyoruz. Açar açmaz dosyanın tamamının uzun tek satırdan oluştuğunu fark edeceksiniz. Bu yapıyı bozmamamız gerekiyor. Satırın ortalarında “rootwait” şeklinde bir komut göreceğiz. Bu komuttan sonra bir boşluk bırakarak “ modules-load=dwc2,g_ether” komutunu ekliyoruz(<em>tırnak işaretleri olmadan kopyalayıp yapıştırın</em>). Dosyayı kaydedip çıkabiliriz.</li><li>Tekrar hafıza kartındaki ana klasöre dönüyoruz. Burada “ssh” adında uzantısı olmayan bir dosya oluşturmamız gerekiyor.(<em>Mac kullananlar terminal’den hafıza kartının olduğu dizine gelip “touch ssh” yazarak dosyayı oluşturabilirler.</em>)</li></ul><p>İşte hepsi bu kadar! Şimdi en zevkli adımlara geldik:</p><ul><li>Micro USB kablomuz ile RasPi’mizi bilgisayara bağlıyoruz.</li><li>Bir dakika kadar bekledikten sonra Mac için terminal kullanarak Windows için Putty kullanarak bağlanmamız gerekiyor.</li><li>Terminal’i açtıktan sonra “ssh pi@raspberrypi.local” yazarak bağlantıyı sağlıyoruz. Sonrasında bize şifre sorulacak. İlk şifre her zaman “raspberry”dir. Şifremizi de yazdıktan sonra, içerdeyiz!</li></ul><p>Artık headless çalışan bir RasPi ZeroW’miz var!</p><p><em>Yazımın yardımcı olacağına inandığınız birileri varsa paylaşmaktan çekinmeyin!</em></p><p><em>Teşekkürler!</em></p><p><em>twitter:</em><strong><em> </em></strong><a href="https://twitter.com/OnurGenes"><strong><em>@onurgenes</em></strong></a><strong><em>, </em></strong><em>instagram:</em><strong><em> </em></strong><a href="https://www.instagram.com/onurgenes/"><strong><em>@onurgenes</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60338ae99c8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>