<?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 Isaac Casanova on Medium]]></title>
        <description><![CDATA[Stories by Isaac Casanova on Medium]]></description>
        <link>https://medium.com/@isaacacasanova?source=rss-b0674fb099fb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*j8opx1SE5teFS_zzqZFeWQ.jpeg</url>
            <title>Stories by Isaac Casanova on Medium</title>
            <link>https://medium.com/@isaacacasanova?source=rss-b0674fb099fb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:51:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isaacacasanova/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[How to establish yourself in a new city.]]></title>
            <link>https://medium.com/@isaacacasanova/how-to-establish-yourself-in-a-new-city-f6d29749cc1c?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6d29749cc1c</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[moving]]></category>
            <category><![CDATA[brooklyn]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Thu, 09 Apr 2020 23:06:48 GMT</pubDate>
            <atom:updated>2020-04-10T12:56:18.857Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Sref0Tk85_mZPZ6HYmTB4A.jpeg" /><figcaption><a href="https://www.brooklynbridgepark.org/">Brooklyn Bridge Park</a>.</figcaption></figure><p>It’s been over 2 and a half years since my last <a href="https://medium.com/@isaacacasanova/computer-science-for-everyone-part-iii-791c2f7102d0">blog post</a>. During that time, I moved from <a href="https://en.wikipedia.org/wiki/Bridgeport,_Connecticut#Performing_arts">Bridgeport, CT</a> to Brooklyn, NY, to work at <a href="https://joor.com/">JOOR</a>. I’ve finally acclimated myself to my new surroundings. It wasn’t easy, and at times I thought I made the wrong decision. There were lots of missed trains, late arrivals to <a href="https://en.wikipedia.org/wiki/Stand-up_meeting#Software_development">standup</a>, and late nights while trying to find my footing. Overall, I’d say the move was a success! There are things I wish I knew going into the process — I’ll share the most important ones to me. Hopefully, these tips will make your transition a success as well!</p><h3>Transitioning from Bridgeport to Brooklyn.</h3><p>The first thing I did when deciding to move was determine what I wanted out of a new city. I chose to move to New York because of the opportunity and variety of things to do! I was excited by the pace, the hustle, and the range of individuals who lived there. Also, jobs for a software engineer come in all shapes and sizes, from scrappy startups to big corporations, and in a variety of business verticals, like healthcare, finance, fashion, education, and more. If one line of business isn’t the right fit, you can take the same technical skills you developed at one job and apply them while working in a whole new domain.</p><p>I then decided to see what the city looked like in person. I took a couple of trips to see shows on Broadway, went bar-hopping a few weekends in Manhattan, and attended a concert in Brooklyn. I got a feel for how traveling in the city would be like, and the general vibe of the people there. Those experiences helped a ton when I was choosing my first apartment.</p><p>Not that it needs to be said, but apartment hunting in New York is insane, there are startups dedicated solely to making the process easier (looking at you <a href="https://streeteasy.com/">StreetEasy</a>). When I moved, I decided to move to Brooklyn because it is <em>much</em> quieter and less cramped compared to Manhattan, and rent is noticeably cheaper (Here are the average costs of living in <a href="https://www.rentcafe.com/average-rent-market-trends/us/ny/manhattan/">Manhattan</a> and <a href="https://www.rentcafe.com/average-rent-market-trends/us/ny/brooklyn/">Brooklyn</a>). You get more space for your money.</p><p>Realistically, you have to set your budget a lot higher than you would if you come from a lower-cost of living area. It sounds crazy, but my cost considerations were from $1700 to $2500 a month for an apartment. Once you factor in the higher taxes, outstanding loans, monthly metro card expense and extracurriculars, it’s easy to understand why so many people choose to get roommates or to live in a smaller place. Most salaries are inflated to account for the hike in price of living, so when accepting offers, beware. That $100,000 salary you get will end up as $65,000 after taxes, and renting here is around 300% higher than the median U.S. rent of $1,500. Don’t take a job just for an uptick in pay compared to your current area — make sure you factor in any equity, room for career growth and surrounding opportunity.</p><h3>Rebuilding your network from scratch.</h3><p>As we get older, it gets more and more difficult to establish true friendships and professional relationships. Most of us develop our main group of friends between our late-teens and mid-twenties. That’s because proximity and the passage of time naturally makes relationships special.</p><p>Creating true friendships away from home took more work, and a lot more time. I’d say for every friend I’m in touch with now, we met up at least four or five times before we both decided we shared enough in common. I used <a href="https://meetup.com/">Meetup</a> in order to find people that shared a common interest of mine. That allowed me to be in the same space with others who were there for a similar reason, so it made conversations flow more naturally.</p><p>I also met people at work. Working at a startup helped because a lot of my closest coworkers were a few years removed from college. It was easy to go bar-hopping on a Thursday night and still show up to work on Friday!</p><p>Outside of work, finding a home to relate in my career took a bit of searching, so when I was referred to <a href="https://www.devcolor.org/">/dev/color</a>, I decided to give it a shot. I’m currently a Squad Facilitator, which means I host and run meetings designed to support Black software engineers navigating both personal and professional challenges. This has been a great experience so far, and another way I’ve made connections in the city.</p><p>As a general rule of thumb, the first time you meet someone and connect, they’re most likely not going to give you any contact other than their LinkedIn or email. Don’t take offense to it, many people use it as a way to filter one-off interactions from true relationships. Exchange information in the appropriate way, and offer to meet for a quick coffee, or walk outside depending on the weather. Over time, some relationships will fade, and others will grow stronger, it’s all a part of the process of getting established!</p><h3>Say yes.</h3><p>Say yes to everything (OK, not <em>everything</em>, but you get the idea). What I mean is if someone asks to check out a museum, a play, or to listen to some live music, shrug aside the after-work dip in energy and go hang out! The first year after you move is when you’ll have the most energy in terms of exploration. Once you get into a routine, you’ll find it more difficult to find the motivation to “go all the way over there”. I had some of my most sleepless nights the first year I moved, but I went to so many different areas that I now know by heart. Use the new surroundings to your advantage! Natives of the city are generally excited to share places to go and things to do, so talk it up as much as you can while you’re exploring. There are also lots of people in the same position as you —it’s better to go through this period of adjustment with others than just alone.</p><h3>Don’t forget about home!</h3><p>Make an effort to check in with your relatives and friends at least a couple of times a month. It’s best to keep consistent contact so you’ll be aware of any events where you can reconnect with multiple friends at once. While your friends are happy you’re in the area, you’re also only one person; don’t burn yourself out by trying to meet with everyone separately!</p><h3>Bringing it all together.</h3><p>To give the best chance of making your transition a success, visit the area, do your research on cost of living, network, be open to trying new things, and keep in touch with the folks back home. In no time, you’ll get used to your surroundings, and sooner than you think, you’ll be giving directions to other newcomers and tourists!</p><p><strong>Are there any other tips or suggestions that have helped you adjust to moving to a new area? Share them in the comments below!</strong></p><h3>About Me</h3><p><em>Isaac Casanova is a Senior Software Engineer at </em><a href="https://joor.com/"><strong><em>JOOR</em></strong></a><strong><em>, </em></strong><em>where he works on native iOS applications in a full-stack role. He’s also a part of the </em><a href="https://www.devcolor.org/astar"><strong><em>A* program</em></strong></a><em>, a growing network of Black software engineers who raise the bar in their networks and communities. Follow me on Twitter at </em><a href="https://twitter.com/@Casanovacane"><strong><em>@Casanovacane</em></strong></a><em> (shoutout to </em><a href="https://open.spotify.com/album/3RYdEXhGHojkTILUdtnRVJ"><em>Frank Ocean</em></a><em>!), or connect with me on </em><a href="https://www.linkedin.com/in/isaacacasanova/"><strong><em>LinkedIn</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6d29749cc1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Computer Science for Everyone — Part III.]]></title>
            <link>https://medium.com/@isaacacasanova/computer-science-for-everyone-part-iii-791c2f7102d0?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/791c2f7102d0</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[minorities]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Sat, 14 Oct 2017 20:07:11 GMT</pubDate>
            <atom:updated>2017-10-18T03:06:34.093Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the final post in my series on Computer Science for Everyone, which began </em><a href="https://medium.com/@isaacacasanova/computer-science-for-everyone-part-i-a27f5e77cde5"><em>here</em></a><em>.</em></p><p>We’re gonna talk about some pretty cool stuff today. And by stuff, I mean just a taste of why Google Search is lightning fast, how Netflix streams video so smoothly, and how LinkedIn suggests new connections for you.</p><p>O.K., so we’re not gonna discuss <em>exactly </em>how these concepts are implemented — there are P.H.D.’s hired at these companies that work those low-level details out. But the commonality in these approaches to software is that they are implemented in terms of an <strong>algorithm.</strong></p><p>An <strong>algorithm </strong>is a sequence of steps executed to solve a problem. Algorithms don’t have to be related to computers — there are plenty of everyday tasks that can be described in terms of an algorithm. For example, here’s my morning routine.</p><ol><li>I wake up, stretch, and clean up in the restroom.</li><li>I go back in my room, and iron my clothes.</li><li>I get dressed, and if I made my lunch, I pack my lunch. Otherwise, I’ll be spending money on lunch that day!</li><li>If I have time, I make breakfast, otherwise, I buy breakfast.</li><li>If I’m not working from home, I grab my keys, lunch, laptop, and drive to work. Otherwise, I open my laptop and get started!</li></ol><p>Each of these steps follows logically, one after another, and includes branches, depending on conditional occurrences. Any algorithm can be described with a <a href="https://en.wikipedia.org/wiki/Flowchart">flowchart</a>, which I introduced in the previous article in the series. A flowchart is a nice way to see how an algorithm works visually, but a better way is to study how an algorithm performs in practice.</p><p>Let’s get right into solving a problem. Assume we work for an amazing software company, say Google, and our task is to test whether or not an email is taken. Let’s also assume that the list of universal email addresses can fit in our tiny example — in reality, Google handles billions of emails, and the input wouldn’t fit in memory on any single machine.</p><p>We don’t want multiple users to register the same Gmail address, as that would open up a <a href="http://mentalfloss.com/article/31039/how-did-term-open-can-worms-originate">can of worms</a>. So, the algorithm in principle is simple.</p><ol><li>Accept a valid email as input from the user (You’re not concerned with this step, but this is where everything starts).</li><li>Check to make sure that email isn’t already registered, against the list of registered email addresses.</li><li>If the email isn’t registered, allow the user to proceed with registration. This is most commonly hinted at by a green check mark in the UI (user interface).</li><li>If the email is registered, then display a prompt telling the user that the email address they’re attempting to use is taken, and optionally, offer up alternatives.</li></ol><p>The meat and potatoes of the algorithm lie in step 2, where you have to check if the email is registered or not. The most straightforward way to do this would be to iterate through the list one at a time, and at each email found check against the input email. If no match is found, you’re all set, and the user can use that email! Otherwise, they can’t, and you need to instruct them on how to fix the problem.</p><p>The <a href="https://en.wikipedia.org/wiki/Pseudocode">pseudocode</a> for this algorithm is not much different from the explanation above:</p><pre>isEmailRegistered(value, A[0...N-1]) {<br>    for element in A {<br>        if (value == element)<br>            return true<br>    }<br>    return false<br>}</pre><p>The actual code would look something like this (in Swift):</p><pre>func isEmailRegistered(input: String, addresses: [String]) -&gt; Bool {<br>    for emailAddress in addresses {<br>        if input == emailAddress {<br>            return true<br>        }<br>    }<br>    return false<br>}</pre><p>This code would work, but remember, we “work” at Google here. Let’s remove the assumption that our problem fits within the memory on one machine. There are thousands of email addresses getting inserted a minute, and so this code won’t stand up to system load. What we’re doing is checking against <em>every </em>email address to see whether or not it exists in the system, but this isn’t necessary at all. If your email starts with a “z”, it’s unnecessary to check any email that starts with a “!”, “a”, or “b”.</p><p>So, what can we do to remedy this solution, and how can we tell that our solution is too slow right off the bat? The answer lies in how we analyze the <strong>performance characteristics</strong> of our algorithms. Software engineers analyze the efficiency of their algorithms, commonly known as the <strong>asymptotic running time, </strong>through the use of <a href="https://en.wikipedia.org/wiki/Discrete_mathematics">discrete math</a><strong> </strong>and <a href="https://en.wikipedia.org/wiki/Big_O_notation">Big O</a> notation.</p><p>We label the input <strong>N</strong>, representing any arbitrary number, and characterize the running time as a <strong>function </strong>of <strong>N</strong>. Common running times are displayed below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*leuidehqYrPSmoBRRjG8zA.png" /><figcaption>Common asymptotic running times.</figcaption></figure><p>The graph above describes the running time as the number of elements that can be processed <strong>per </strong>operation of the algorithm. The more operations required to process an element, the <strong>slower </strong>the running time of the algorithm, and the <strong>more </strong>time it will take to process on any given machine.</p><p>So, knowing the above information, let’s analyze the running time of our algorithm, reproduced below for convenience:</p><pre>func isEmailRegistered(input: String, addresses: [String]) -&gt; Bool {<br>    for emailAddress in addresses {<br>        if input == emailAddress {<br>            return true<br>        }<br>    }<br>    return false<br>}</pre><p>For <strong>each</strong> iteration of the for loop, we process a <strong>single</strong> email to check whether it matches the input or not. So, for 100,000 email addresses, this algorithm will perform 100,000 checks against the input. Since the operations match the elements 1:1, this algorithm runs in <strong>linear </strong>time, or in <strong>Big O </strong>terms<strong>, O(N).</strong></p><p>You can find the behavior of an <strong>O(N) </strong>algorithm in the chart above (the lime green line). The running time is actually pretty good, but we can do even better. Let’s improve the running time of our algorithm!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Ns7BmmjCCHbqWgbvzLNT4A.jpeg" /><figcaption>Morpheus has a revelation!</figcaption></figure><p>If the registered email addresses are pre-sorted, then we can improve the running time of our algorithm. That means email addresses that start with “a” will appear before email addresses that start with “b”, and etc, and any email addresses that begin with special characters are also sorted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*abN82kY8L6q_HYB5Q4FejA.png" /><figcaption>Example of a sorted list.</figcaption></figure><p>The trick here is that you can turn the solution into a two-way decision. If you start in the middle of the list, starting with email addresses that begin with “m”, you can then check to see if you need to go lower or higher in the list. Then, you either go down one or up one, re-compute the center of that sub-list, and pose the question again until you arrive at the result. This algorithm is known as <strong>binary search</strong>. The pseudocode of binary search is as follows:</p><pre>// initially low = 0, high = N - 1<br>BinarySearch(A[0...N-1], value, low, high) {</pre><pre>    if (high &lt; low) <br>        return not_found</pre><pre>    mid = (low + high) / 2</pre><pre>    if (A[mid] &gt; value)<br>        return BinarySearch(A, value, low, mid - 1)</pre><pre>    else if (A[mid] &lt; value)<br>        return BinarySearch(A, value, low + 1, mid)</pre><pre>    else<br>        return mid<br>}</pre><p>Let’s Swift it up! Here it is:</p><pre>func isEmailRegistered(input: String, <br>                       addresses: [String], <br>                       low: Int, high: Int) -&gt; Bool {</pre><pre>    if high &lt; low { return false }</pre><pre>    mid = (low + high) / 2</pre><pre>    if addresses[mid] &gt; input {<br>        return isEmailRegistered(input, addresses, low, mid - 1)<br>    } else if addresses[mid] &lt; input {<br>        return isEmailRegistered(input, addresses, low + 1, mid)<br>    } else {<br>        return true<br>    }<br>}</pre><p>You can see the real difference in an example animation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*4poxx4vMDQfGEq3HeswJoA.gif" /><figcaption>Binary versus sequential search in action! Credit to <a href="https://penjee.com/">penjee</a>.</figcaption></figure><p>Let’s analyze the running time of Binary Search. For any given input, you first start at the middle. Each time you process an operation, you divide the remaining sub-list by 2, and start at the middle of that sublist again. Once you choose a path, left or right, you effectively <strong>eliminate </strong>the other half of the list, throwing choices away. This is the key here!</p><p>For an input of size 32, you will need a maximum of <strong>5 </strong>steps, since <strong>32/2</strong> = 16, <strong>16/2</strong> = 8, <strong>8/2</strong> = 4, and <strong>4/2</strong> = 1. That means for any given input, the number of operations will be the <strong>inverse </strong>of the power relation between <strong>2 </strong>and the input. Clarifying, since 2⁵ = 32, that means <strong>log(32)= 5</strong>, and therefore, the running time of the algorithm described in terms of <strong>N </strong>is <strong>O(logN). </strong>(This is a very elementary proof, but I’m trying to stick to basics here!).</p><p>This algorithm is <em>much faster </em>than its linear counterpart. How much faster? This algorithm can process 7 billion elements in about <strong>33 operations </strong>(granted, the input wouldn’t fit entirely in memory, but that’s not the point here). The sequential algorithm would probably fail over the servers, and would not be a happy delight to experience.</p><p>Well, that’s all I have for this series. I apologize for the extremely long delay between posts, I will be more diligent on sticking to a schedule in the future, as I have lots of upcoming content planned. Thanks SO MUCH for reading, and please, any comments or feedback (positive or negative) is appreciated.</p><p>‘Till next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=791c2f7102d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thank you WWDC 2017.]]></title>
            <link>https://medium.com/@isaacacasanova/thank-you-wwdc-2017-4b316272561?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b316272561</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[wwdc-2017]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Fri, 07 Jul 2017 02:33:48 GMT</pubDate>
            <atom:updated>2017-07-07T02:33:48.448Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve never been one to win any kind of sweepstakes. When I completed my application for the WWDC 2017 lottery, it was more of a shot in the dark than anything. Of course I wasn’t going to win, but it would be nice to try, and to once again spend the late hours of the night watching the sessions, trying out the new APIs, and imagining what it would be like to be there.</p><p>For those of you who don’t know, <a href="https://en.wikipedia.org/wiki/Apple_Worldwide_Developers_Conference">WWDC</a> is short for World Wide Developer Conference. The Apple World Wide Developer Conference (also known as “dub-dub”) is a conference where Apple announces upcoming software (and sometimes hardware) updates for the tvOS, iOS, macOS and watchOS platforms. This includes iOS 11, the major upgrade for iPhones and iPads that’s open for public preview now, and official release in the fall. WWDC runs a full week, and this year it was from June 5th — 9th.</p><p>WWDC is so popular that Apple hosts a <a href="https://developer.apple.com/wwdc/register/">lottery</a> to get in. All you need to do is apply with an active Apple Developer account and input your credit card information. If you’re selected, you’ll be notified by e-mail, and be down about $1600 in the bank for the ticket. This year, the conference was held at the McEnery Convention Center in San Jose, CA for the first time in 13 years. The lottery closes on March 31st, with the winners being notified starting April 1st. There was lots of excitement around WWDC this year, given the lukewarm feeling toward Apple’s updates from last year. To get in this year, you’d have to get pretty lucky.</p><p>So I roll into work on April 1st, trim through the usual emails, not really paying <em>too </em>much attention to the subject lines. Problem here, feature needed there, random offer from some website here — archive, prioritize, delete. It was the usual, the ordinary, just another day. I ran my Python script which pulls from all the remote repositories I contribute to, and then opens all of the common applications I use, e.g. Xcode.</p><p>So I open up Xcode, then Microsoft Outlook, scroll down my email chain once more, and another email <em>just </em>comes through the top of my receipt chain. It’s from Apple, and it reads: “See you at WWDC”.</p><p>Well, shucks. Here I was, planning to miss out on another year of WWDC, except there was one problem this year — <strong>I got in</strong>. This was going to be my first time in California, and all by myself as well. I could not explain how excited I was when I realized what had just happened — I just remember staring at my monitor, and then going for a walk across the street to process what had just occurred. <strong>I got in</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*pnaR2_V7SmDgdjt9j_59jg.png" /><figcaption>WWDC 2017 promotional poster.</figcaption></figure><p>Fast forward to June 4th, and it was finally time to board my flight from JFK-PHX, then PHX-SJC, on the Sunday preceding WWDC. Of course, according to Murphy’s law, I <em>had </em>to miss my connecting flight, which put me on the next flight leaving to SJC. That was around 1:30 P.M. PDT, when almost everyone boarding the flight had Apple t-shirts, Apple watches, WWDC 2016 gear, and iPhone 7’s. I guess <em>these </em>were the developers chosen to attend, and I missed the memo about being draped in Apple products from head-to-toe. In fact, there were so many people trying to board, American Airlines offered $900 travel vouchers to anyone willing to wait until the next flight, which was at 8:00 P.M. PDT. I seriously considered the offer, but since I had waited since 10 A.M. to board, I wasn’t in the mood to wait any longer, and so I walked past the Group 5 line (I had a Group 6 ticket) and was processed onto the flight.</p><p>I was tired, maybe a bit frustrated, but I was above all just happy to be there. When I <em>finally</em> rolled into San Jose and got to the McEnery Convention Center, my mind was blown. I was greeted by Apple employees, live music, snacks, and a Levi jacket with “WWDC 2017” imprinted on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ahC_UJ6KTk55B205dohg7g.jpeg" /><figcaption>My first picture in front of the McEnery Convention Center.</figcaption></figure><p>Watching the <a href="https://www.youtube.com/watch?v=oaqHdULqet0">WWDC keynote</a> live in person was nothing short of amazing. Seeing Tim Cook walk up to the stage, the <a href="https://www.youtube.com/watch?v=FC0pT9xg1oI&amp;cid=wwa-us-kwgo-features---slid-&amp;mnid=sC1Z7Z3MQ-dc_mtid_20925e1t39169_pcrid_198748183178_&amp;muid=C225E930-37BA-4DBA-9919-87B22A894717&amp;mtid=20925e1t39169&amp;aosid=p238">Appocalypse video</a>, and hearing about the improvements coming to the Apple platforms <em>while</em> they were being announced was out of this world. <a href="https://www.youtube.com/watch?v=8sLv3xmgGYc">The talk with Michelle Obama</a> the next morning wasn’t half-bad, either! WWDC was a great mix of technical innovation and personal inspiration from the amazing individuals that took the time to speak to us lowly engineers.</p><p>My favorite sessions had to do with the newly announced <a href="https://developer.apple.com/documentation/coreml">CoreML</a> and <a href="https://developer.apple.com/arkit/">ARKit</a> frameworks. Seeing Apple put some stock into opening up these technologies to us as developers is pretty awesome. A lot of people were giving Apple flack for taking a while to hop on the Machine Learning and Virtual Reality gravy trains, but I give them credit for taking their time and releasing quality native frameworks. It’s especially cool to be able to translate a Machine Learning model into a CoreML model, bundle it into your app and ship it with your binary! I can only imagine how many networking resources go into talking to remote ML models that live on a company’s backend infrastructure.</p><p>Other notable events that happened were the lunch-and-learns. If you were lucky enough to grab lunch when it first came out, you could either eat your lunch outside, or take it with you and hear from one of a few inspiring individuals. I was lucky enough to attend the <a href="https://developer.apple.com/videos/play/wwdc2017/106/">Christine Darden</a> and <a href="https://developer.apple.com/videos/play/wwdc2017/110/">Todd Stablefeldt</a> talks, but I heard the Miral Kotb talk was amazing as well. The full list of Guest Speakers is <a href="https://developer.apple.com/wwdc/guest-speakers/">here</a>. Being able to hear their stories inspired me to not accept anything but the best moving forward. It really puts life into perspective when you hear how a man who can’t feel his limbs strings jokes together about his physical condition. It delivers the point home that a lot of the stress we face is self-inflicted, that sometimes we need to realize how lucky we are, and not take for granted what we have.</p><p>Every night there were events hosted via the <a href="https://itunes.apple.com/us/app/parties-for-wwdc/id879924066?mt=8">WWDC parties</a> app. You chose an event hosted by companies like <a href="https://developer.usebutton.com/">Button</a>, Google, and more. Each event is roughly the same — an all night happy hour with free gear, games and networking. It was pretty insane to see the amount of liquor and food devoured at these events, but it was nonetheless a break from the ordinary for most people there!</p><p>All throughout the conference, I took the time to truly appreciate what I was experiencing. WWDC changed me in a way — it crushed some biases I held about software engineering, exposed me to different viewpoints and cultures, and overall, was a ton of fun. If you ever get the chance to attend, do everything in your power to get there — I met people crashing at $30 a night Airbnb’s, because San Jose isn’t cheap!</p><p>That’s it for today! It was a ton of fun recapping what was an amazing week for me in San Jose, CA. The daze of WWDC is still slowly wearing off as I adjust back into my normal workflow. As a result, I should be getting back to finishing up a few articles, so keep a lookout for those.</p><p>‘Till next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b316272561" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Computer Science for Everyone — Part II.]]></title>
            <link>https://medium.com/@isaacacasanova/computer-science-for-everyone-part-ii-4b1a6b3671a9?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b1a6b3671a9</guid>
            <category><![CDATA[minorities]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Fri, 02 Jun 2017 19:57:41 GMT</pubDate>
            <atom:updated>2017-06-09T01:13:43.041Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a continuation of my series on Computer Science for Everyone, which began </em><a href="https://medium.com/@isaacacasanova/computer-science-for-everyone-part-i-a27f5e77cde5"><em>here</em></a><em>. Credit goes to Wikipedia for all quotes in this article.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*UwZy8rDCXxaE0bGJhWafYQ.jpeg" /><figcaption>A collage of words to describe Computer Science. <a href="http://www.mkmx.com/images/computer-programming.jpg">Image Credit</a>.</figcaption></figure><p>Let’s get right into it — the way a Computer Scientist thinks is with a programming language. And he/she uses that programming language to solve problems in a systematic way. We’ll cover the basics that apply generally to programming languages, but of course we must choose one to demonstrate examples with. The language of today is <a href="https://www.python.org/">Python</a> (which if you know me, is currently my favorite programming language to use).</p><p>In my opinion, there are 3 aspects of programming languages that apply across the board. They are <strong>variables, data structures</strong>, and <strong>control flow</strong>. Understanding these constructs allows computer scientists (or basically anyone that writes code) to switch between programming languages without much effort.</p><h3><strong>Variables</strong></h3><blockquote>In <a href="https://en.wikipedia.org/wiki/Computer_programming">computer programming</a>, a <strong>variable</strong> or <strong>scalar</strong> is a <a href="https://en.wikipedia.org/wiki/Memory_location">storage location</a> paired with an associated <a href="https://en.wikipedia.org/wiki/Symbol">symbolic name</a> (an <a href="https://en.wikipedia.org/wiki/Identifier_(computer_programming)">identifier</a>), which contains some known or unknown quantity of information referred to as a <a href="https://en.wikipedia.org/wiki/Value_(computer_science)">value</a>.</blockquote><p>An example of a variable in Python is the following:</p><pre>a = 3</pre><p>This takes the <strong>value </strong>3 and stores it in its <strong>symbolic name, </strong>which in this example is the letter <strong>a</strong>. From here on, the value 3 can be accessed just by entering a in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*cdNZbqgGO8ZLI810f9VMvA.gif" /><figcaption>Creating a variable in Python.</figcaption></figure><p>When you assign a variable, a right-to-left association is made. That is, the value on the right is stored in the symbolic name on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*WDsXmZTQL_tBPqwSrrQ-AQ.png" /><figcaption>Variable assignment of 3 to the letter a.</figcaption></figure><p>You’re not just limited to storing numbers. You can store all kinds of <a href="https://en.wikipedia.org/wiki/Data_type">data types</a>, such as decimals, character strings, or <strong>data structures</strong>.</p><h3><strong>Data Structures</strong></h3><blockquote>In <a href="https://en.wikipedia.org/wiki/Computer_science">computer science</a>, a <strong>data structure</strong> is a particular way of organizing <a href="https://en.wikipedia.org/wiki/Data_(computing)">data</a> in a computer so that it can be used <a href="https://en.wikipedia.org/wiki/Algorithmic_efficiency">efficiently</a>.</blockquote><p>In order to do useful computation with the values stored at variables, we use data structures in order to organize data in a way that’s fast and easy to use. For example, you could create a variable for every item in your shopping list. That would work, but it would be tedious to create an individual variable for every item, never mind keeping track of the symbolic names of those variables further on in your program. An easier way to represent a shopping list would be with a data structure called an <strong>array</strong>, or <strong>list</strong>, in Python terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*XLJWhfLmSQCAET4SUV6W4w.png" /><figcaption>Example of a list in Python.</figcaption></figure><p>Lists start out indexed at (counting from) zero, meaning 0 is the slot of the first element, 1 for the second, and so on. In Python, you can also access lists in reverse order using negative numbers. In order to access element N in the list, you could access index -1, and to access element O, you could access index -2, and so on. Lists allow you to store several variables and access them by an index, which is easier than keeping track of several variables in different symbolic names.</p><p>You create a list in Python like this:</p><pre>python_list = [‘P’, ‘Y’, ‘T’, ‘H’, ‘O’, ‘N’]</pre><p>You access the variable ‘P’ as follows:</p><pre>a = python_list[0]</pre><p>The variable <strong>a</strong> now contains the value <strong>‘P’</strong>. You can see how using a compact data structure makes dealing with data easier — the data is all in one place. Lists are just a simple example of many common data structures that computer scientists use in order to efficiently manage data. Other popular examples include <a href="https://en.wikipedia.org/wiki/Associative_array">dictionaries</a>, <a href="https://en.wikipedia.org/wiki/Tree_(data_structure)">trees</a> and <a href="https://en.wikipedia.org/wiki/Graph_(abstract_data_type)">graphs</a>.</p><h3>Control Flow</h3><blockquote>In <a href="https://en.wikipedia.org/wiki/Computer_science">computer science</a>, <strong>control flow</strong> (or <strong>flow of control</strong>) is the order in which individual <a href="https://en.wikipedia.org/wiki/Statement_(computer_science)">statements</a>, <a href="https://en.wikipedia.org/wiki/Instruction_(computer_science)">instructions</a> or <a href="https://en.wikipedia.org/wiki/Function_call">function calls</a> of an imperative <a href="https://en.wikipedia.org/wiki/Computer_program">program</a> are <a href="https://en.wikipedia.org/wiki/Execution_(computing)">executed</a> or evaluated.</blockquote><p>You can think of control flow as the logic that runs your application. For example, if you have eggs, then eat them, otherwise, print that you’re out of eggs. The <strong>if-then</strong> clause of that statement can be represented using an <strong>if-else </strong>statement in Python.</p><pre>if eggs &gt; 0:<br>    print(&#39;I have eggs&#39;)<br>else:<br>    print(&#39;I don&#39;t have eggs! To the store NOW!&#39;)</pre><p>The first line, if eggs &gt; 0<strong>,</strong> tests the variable <strong>eggs</strong> using the <strong>greater than</strong> <strong>relational operator</strong> (‘<strong>&gt;</strong>’). The statement is true if the value stored in the variable eggs is greater than zero. In that case, the program will print <strong>‘I have eggs’</strong> to the console. The <strong>else </strong>statement is executed <strong>only if</strong> the matching if statement is false. In this case, the else statement will execute if the value stored at eggs is less than or equal to (‘<strong>≤</strong>’) zero.</p><p>The logical flow of an application can be modeled using a <strong>flowchart</strong>. A flowchart is a diagram that represents the possible outcomes of a program that depends on control flow. An example flowchart modeled after our eggs program is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*10Jg8bamjmEcoSQ4fl0k-g.png" /><figcaption>Flowchart example.</figcaption></figure><p>With knowledge of variables, data structures and control flow under your belt, you can get lots of interesting work done with a computer. However, the most interesting aspect of being a computer scientist is verifying the speed and correctness of our programs, which will come up next. That means math! Who doesn’t love a bit of good ‘ol CS math?</p><p>Thanks for reading! I’ll be heading out to <a href="https://developer.apple.com/wwdc/">WWDC</a> this upcoming week, so that means the next (and last) installment will be a bit delayed — sorry about that. Otherwise, thanks for sticking around!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b1a6b3671a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Computer Science for Everyone — Part I.]]></title>
            <link>https://medium.com/@isaacacasanova/computer-science-for-everyone-part-i-a27f5e77cde5?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a27f5e77cde5</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Sat, 06 May 2017 18:28:31 GMT</pubDate>
            <atom:updated>2017-05-31T03:27:49.985Z</atom:updated>
            <content:encoded><![CDATA[<p>Many of you have heard of Computer Science. You’ve probably wondered at some point, what makes someone who studies Computer Science different from someone who’s good with computers? What exactly does a Computer Scientist or Software Engineer do? What does Computer Science mean anyway?</p><p>Through a series of articles, I’ll clarify what Computer Science is and how it relates to our everyday lives. Before I go into the details, it will serve us well to establish what a computer program is.</p><blockquote>A <strong>computer program</strong> is a collection of <a href="https://en.wikipedia.org/wiki/Instruction_set">instructions</a><a href="https://en.wikipedia.org/wiki/Computer_program#cite_note-aup-ch4-p132-1">[1]</a> that performs a specific task when <a href="https://en.wikipedia.org/wiki/Execution_(computing)">executed</a> by a <a href="https://en.wikipedia.org/wiki/Computer">computer</a>. A computer requires programs to function and typically executes the program’s instructions in a <a href="https://en.wikipedia.org/wiki/Central_processing_unit">central processing unit</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*tU6-Bw5flkEb_LtsGrBKcw.jpeg" /><figcaption>CS education is critical for today’s changing world. <a href="http://www.huffingtonpost.com/acm-the-association-for-computing-machinery/computer-science-educatio_1_b_9373808.html">Image Credit</a>.</figcaption></figure><p>Examples of computer programs range from Facebook Live Video and Google Search to how your microwave makes that “beeping” sound when it’s done heating. Our lives are surrounded by computer programs, and they execute silently in many places we may not realize.</p><p>In order to complete tasks, computers receive instructions via the programming language the program is written in. A <strong>programming language </strong>is a formal grammar that defines instructions for the computer, represented by the alphabetical symbols of human language. A computer uses a programming language to perform calculations that may or may not be seen by an end user.</p><p>Consider this fully-fledged program:</p><pre>print &#39;hello, world!&#39;</pre><p>That’s a valid computer program, written in the <a href="https://www.python.org/">Python programming language</a>. It calls the <strong>print </strong>function, passing in the text <strong>“hello, world!”</strong>. To execute a Python program, you create a text file and name it <strong>“</strong>hello.<strong>py”, </strong>for example. The <strong>“.py</strong>”<strong> </strong>in the extension tells the computer to interpret the text as a Python program. You then pass the text into the Python <strong>interpreter, </strong>or<strong> compiler, </strong>by running<strong> “python hello.py”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ofJc9UIGkEElYMqrcWk0zg.gif" /><figcaption>An example of running Python code in macOS Terminal.</figcaption></figure><p>The<strong> </strong>interpreter<strong> </strong>translates Python’s formal grammar into low-level machine code. The computer then executes the translated machine code, resulting in “hello, world!” printing on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*lf1TnNF-TWm-vhi9I40XaA.png" /><figcaption>The process of executing a computer program.</figcaption></figure><p>Computer programs are written in different programming languages depending on the intended audience. For example, I would write my <a href="https://www.android.com/">Android</a> app in <a href="https://en.wikipedia.org/wiki/Java_(programming_language)">Java</a>, my <a href="https://www.apple.com/ios/ios-10/">iOS</a> app in <a href="https://developer.apple.com/swift/">Swift</a>, and my website would be written with <a href="https://www.javascript.com/">JavaScript</a>. The reason why we use different programming languages is why an auto-mechanic uses several different tools. As a computer scientist, you choose the right tool for the job.</p><p>To sum up what’s been covered so far, a computer program is a text file containing lines of text that the computer interprets in order to perform it’s work. The text inside the program is written in a programming language, which is passed to a compiler or interpreter. The compiler or interpreter generates low-level machine instructions, and the computer executes them.</p><h3>A Computer Scientist’s Job</h3><p>The job of a <strong>Computer Scientist</strong> is to continuously improve how these programs work through studying their mathematical behavior. The definition from the Wikipedia article on <a href="https://en.wikipedia.org/wiki/Computer_science">Computer Science</a> is as follows:</p><blockquote><strong>Computer science</strong> is the study of the theory, experimentation, and engineering that form the basis for the design and use of <a href="https://en.wikipedia.org/wiki/Computer">computers</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*UP4jiFf6yBVc5jTdgFhv5A.jpeg" /><figcaption>An example of the confusion around Computer Science.</figcaption></figure><p>Computer Science deals with the <strong>mathematical foundations</strong> that the computer is based on. There are many sub-fields within Computer Science, which can be theoretical, practical, or a combination of both.</p><p>An example of a practical application of Computer Science is Mobile Development, which is the process of creating mobile applications on the iPhone, Android, and other mobile operating systems. This is how mobile applications like Instagram, Snapchat, and <a href="https://www.quora.com/">Quora</a> are built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*U-f9XzwkVHO5-ZdskdgQvA.jpeg" /><figcaption>Mobile applications provide an advanced interface for dealing with information.</figcaption></figure><p>An example of a theoretical field within Computer Science is <a href="https://en.wikipedia.org/wiki/Computational_complexity_theory">Computational Complexity Theory</a>. In short, this consists of grouping classes of problems against what a machine can or can’t do. We achieve this by studying a series of mathematical representations of a computer, namely the <a href="https://en.wikipedia.org/wiki/Turing_machine">Turing Machine</a>, named after Alan Turing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*gAB49FlNGy7DmvKfQXmsFg.jpeg" /><figcaption>The different classes of problems that computers face.</figcaption></figure><p>An example of a field that lies “in-between” is <a href="https://en.wikipedia.org/wiki/Machine_learning">Machine Learning</a>. Machine Learning is the process of a computer program changing output in response to a flow of data. Machine Learning programs can be supervised, adjusting in the wake of learning from previous input, or unsupervised, acting upon data collected from different sources at once. An example of machine learning lies in your own Facebook Feed, which changes and adjusts based on the input you give it. In effect, the feed algorithm is personalized for your experience because it learns from the data that you give it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*0u_i4QoeTqqh5YO1uhWkOA.png" /><figcaption>The Facebook feed learns by studying your data.</figcaption></figure><p>In reality, every “practical” field of Computer Science stands on the shoulders of its theoretical foundation. A good computer scientist is well-versed in both the theoretical and practical foundations in their area of expertise.</p><h3>Pushing the Limit</h3><p>So, what are some things that Computer Scientists <strong><em>aren’t</em></strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*u5KYX8w6me55vJctt3Vrcw.jpeg" /><figcaption>I can.. but not all of us want to!</figcaption></figure><p>For the most part, Computer Scientists don’t fix computers. That’s not to say that they don’t know how to troubleshoot malware or slow startup issues with your machine, but that’s not where their main skillset lies. The main skill of a Computer Scientist is to solve problems using a computer in the most efficient way possible.</p><p>Secondly, not all Computer Scientists are efficient at multiple programming areas. A very skilled backend engineer using <a href="http://rubyonrails.org/">Ruby on Rails</a> may not be the best Android engineer. Likewise, an iOS engineer may or may not be good at building websites. Much like you wouldn’t want a cook installing tires on your car, Computer Scientists tend to stick with a subset of practical fields and gain depth there. Of course, there are the unicorns, the <a href="http://andyshora.com/full-stack-developers.html">Full Stack Developers</a>, but they truthfully are few and far in between, and tend to be more experienced.</p><p>I hope that I’ve cleared up some confusion around what a Computer Scientist is. If not, be sure to let me know in the comments! In the next post, I’ll show some of the basics of computer programming. That way, you’ll get a better feel for how Computer Scientists think.</p><p>Thanks for reading, and as always, feedback is greatly appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a27f5e77cde5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Having Fun with Turtles in Python.]]></title>
            <link>https://medium.com/@isaacacasanova/having-fun-with-turtles-in-python-5eb7a13b32cf?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5eb7a13b32cf</guid>
            <category><![CDATA[turtles]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Thu, 06 Apr 2017 21:37:47 GMT</pubDate>
            <atom:updated>2017-05-06T17:58:07.331Z</atom:updated>
            <content:encoded><![CDATA[<p>Programming has its challenges, but like any other skill, it starts with the first step. Recently I was invited to speak at an after school program about what I do. I struggled to find a topic to talk about, as there are so many areas within programming, I didn’t know where to start. I needed to demonstrate a language that was simple, yet powerful, so the kids stayed engaged during my presentation. I’ve been learning <a href="https://en.wikipedia.org/wiki/Python_(programming_language)">Python</a> for the past several months now, and it was very easy for me to pick up and use. So I thought, why not demonstrate the power of drawing on the screen with Python? To do so, I used Python’s <a href="https://opentechschool.github.io/python-beginners/en/simple_drawing.html">turtle</a> module. For my friends on Windows machines, you may have to install Python <a href="https://www.python.org/downloads/windows/">first</a> in order to follow the steps in this tutorial.</p><p>Getting started with the turtle module is easy. To spin up a Python environment, all you have to do is hold ⌘ (Command), then press the spacebar and type in “IDLE” (case-insensitive). That will spin up a version of the <strong>I</strong>ntegrated <strong>D</strong>evelopment and <strong>L</strong>earning <strong>E</strong>nvironment for Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*3cmAmmAnou5EGZBRvUBPcQ.gif" /><figcaption>Opening IDLE. ( The snapping of my window is done by <a href="https://www.boastr.net/">BetterTouchTool</a>.)</figcaption></figure><p>With IDLE, you’re all setup to write the code shown in this article. So please, feel free to follow along, I encourage you to do so. Without further ado, let’s get to drawing!</p><p>The first thing you need to do is tell Python to import the turtle module. After that, tell the turtle to draw a line moving forward by a distance of 100.</p><pre>import turtle</pre><pre>turtle.forward(100)</pre><p>You’ll see a window come up, and a pointer will draw a line to the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*RCm71ZVBBAzc5Z0gba9_dA.gif" /><figcaption>The turtle moves forward!</figcaption></figure><p>That’s nice, but it would be even nicer if the cursor actually <em>looked</em> like a turtle. Fortunately, that’s easy. First, reset the turtle so it’s in it’s original position. Then, tell the turtle to change its shape into.. well, a turtle.</p><pre>turtle.reset()</pre><pre>turtle.shape(&#39;turtle&#39;)</pre><p>With that, your turtle should look much better. Now, let’s get to drawing some shapes. First, a circle. It’s as simple as just telling the turtle to draw a circle, and putting in what you want the radius to be.</p><pre>turtle.circle(50)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*6Y6Sot--xF9WGn74wwFbTg.gif" /><figcaption>Turtle circle time!</figcaption></figure><p>Next, let’s draw a square, then a triangle, and finish up with some more interesting shapes. Here’s how to draw a square.</p><pre>turtle.forward(100)<br>turtle.left(90)<br>turtle.forward(100)<br>turtle.left(90)<br>turtle.forward(100)<br>turtle.left(90)<br>turtle.forward(100)</pre><p>Now that’s great and all, but we see some repetition here. That can be cleaned up using a <a href="https://wiki.python.org/moin/ForLoop">for loop</a>. We just set the counter to the number of sides in a square, and tell the turtle to move forward and to the left.</p><pre>numberOfSquareSides = 4</pre><pre>for i in range(numberOfSquareSides):<br>    turtle.forward(100)<br>    turtle.left(90)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*9mvufxXyEfx4ACl3mboZlQ.gif" /><figcaption>Turtle takes on the square!</figcaption></figure><p>Similarly, a triangle can be drawn with little effort.</p><pre>numberOfTriangleSides = 3</pre><pre>for i in range(numberOfTriangleSides):<br>    turtle.forward(100)<br>    turtle.left(120)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*r0UhPTo_QI_FXmZfyWbWhw.gif" /><figcaption>Turtle draws a triangle.</figcaption></figure><p>These shapes are cool, but with the turtle module, you can draw some pretty complicated shapes with just a bit of code. Here’s how to draw a star.</p><pre>def drawStar():<br>    turtle.color(&#39;red&#39;, &#39;yellow&#39;)<br>    turtle.begin_fill()<br>    while True:<br>        turtle.forward(200)<br>        turtle.left(170)<br>        if abs(turtle.pos()) &lt; 1:<br>            break<br>    turtle.end_fill()</pre><p>There’s a couple of newer things here. One is that you can set the color of the turtle’s pen with the turtle’s color() method. The turtle’s begin_fill() and end_fill() methods tell the turtle when to fill in the current shape it’s drawing. The <a href="https://www.tutorialspoint.com/python/python_while_loop.htm">while loop</a> tells the turtle to draw as long as the indented conditions are met. Here, as long as the turtle is far enough from where it started, it will draw the star in a circle by moving forward and then to the left. With the drawStar() method defined, call it by typing “drawStar()”, hit enter and watch the turtle draw away!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Zrf4veITFrxa_evqSvMmMg.gif" /><figcaption>Turtle earning a star!</figcaption></figure><p>Lastly, let’s roll up our sleeves a bit, and draw the Olympic logo. Sounds pretty complicated, but it’s just a series of circles interleaved together. The trick here is to tell the turtle to move its pen up and down, so it ends drawing at one spot and picks up at the other. That way, we avoid the situation where the turtle draws all of the circles on the same line.</p><p>There are two things we need to figure out. One is how to draw the circle, the other is where to draw the circle.</p><pre>def drawOlympicCircle(x, y, <br>                      color, <br>                      radius):<br>    turtle.pensize(10)<br>    turtle.penup()<br>    turtle.setposition(x, y)<br>    turtle.pendown()<br>    turtle.color(color)<br>    turtle.circle(radius)</pre><p>The method drawOlympicCircle() takes as arguments the x position, y position, color, and radius to draw the circle at.</p><pre>def drawOlympicLogo(radius):<br>    positions = <br>    [(60, 0, &#39;blue&#39;), <br>     (-60, 0, &#39;purple&#39;),<br>     (120, 60, &#39;red&#39;), <br>     (0, 60, &#39;yellow&#39;), <br>     (-120, 60, &#39;green&#39;)]</pre><pre>for position in positions:<br>    drawOlympicCircle(position[0], <br>                      position[1], <br>                      position[2], <br>                      radius)</pre><p>On the other hand, drawOlympicLogo() takes as an argument the radius, builds a list of tuples, called positions, and passes them to the drawOlympicCircle() method to be drawn. The result is pretty awesome!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*S_x4j1pzv-bSG-kpIRD2BA.gif" /><figcaption>Turtle’s ready to carry the torch!</figcaption></figure><p>I think that’s pretty cool! The best part is, this is just the tip of the iceberg. Check out the <a href="https://docs.python.org/2/library/turtle.html">turtle module</a> and experiment for yourself. Feel free to share anything you draw up!</p><p>That’s it for today! As always, feedback is greatly appreciated. For convenience, a Python file containing all of the shapes drawn can be downloaded from Github <a href="https://github.com/IsaacACasanova/turtle-python">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5eb7a13b32cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apple rolls back Rollout.io.]]></title>
            <link>https://medium.com/@isaacacasanova/apple-rolls-back-rollout-io-6a9a6cd9702f?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a9a6cd9702f</guid>
            <category><![CDATA[rollout]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[app-store-review]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Tue, 14 Mar 2017 17:43:32 GMT</pubDate>
            <atom:updated>2017-05-06T19:48:33.930Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A swift removal of hundreds of apps by Apple brings forth a discussion of the App Store review guidelines.</em></p><p>On March 7th, 2017, Apple removed a plethora of apps from the App Store with the following <a href="https://rollout.io/blog/apple-guideline-email/">explanation</a>, summarized below:</p><blockquote>“Dear Developer,</blockquote><blockquote>Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with section 3.3.2 of the Apple Developer Program License Agreement and App Store Review Guideline 2.5.2. This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store.</blockquote><blockquote>This includes any code which passes arbitrary parameters to dynamic methods such as dlopen(), dlsym(), <strong>respondsToSelector:, performSelector</strong>:, method_exchangeImplementations(), and running remote scripts in order to change app behavior or call SPI, based on the contents of the downloaded script. Even if the remote resource is not intentionally malicious, it could easily be hijacked via a Man In The Middle (MiTM) attack, which can pose a serious security vulnerability to users of your app.”</blockquote><p>In layman terms, Apple states that frameworks that can apply hot-patches to live, running apps are in violation of the Apple Developer Program License Agreement. A “hot-patch” is a fix to a crash that usually has to go through the App Store approval process, but instead is downloaded through a remote service to users’ devices. This removal affects all apps that use SDKs like <a href="https://rollout.io/blog/rollout-statement-on-apple-guidelines/">Rollout.io</a>, <a href="https://github.com/bang590/JSPatch">JSPatch</a>, and any SDK that depends on those SDKs internally.</p><p>I agree with Apple’s baseline reason for the rejections. Any app that uses a service like this can be hijacked via a <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">MiTM</a> attack. For example, if Rollout’s system was compromised by a hacker or legally issued government court order, then that entity could pose as Rollout and push live code updates to apps <strong>without</strong> the developer’s knowledge. Just imagine code being pushed to your phone without the developer’s knowledge or consent — pretty scary stuff.</p><p>But why would developers risk rejection by linking to these services in the first place? The answer lies in the approval process. An example of how the process works for most apps is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ev17joZx9COdQdFfYp3Arw.png" /><figcaption>The standard iOS / MacOS approval process.</figcaption></figure><p>If you’ve ever used an app, and it crashed, you were probably upset. If you summoned up the energy to review the app, chances are you went there to express frustration with the app not working. That results in a downward spiral in the app’s overall App Store rating, which is one of the worst experiences for engineers! Believe it or not, we want to build good, stable apps. We take pride in our work!</p><p>The dilemma here is that it could take <strong><em>days</em></strong><em> </em>for a simple patch to get through the approval process, even longer if your app receives the infamous <a href="https://developer.apple.com/app-store/review/rejections/">Rejected</a> status from Apple. Here’s a good estimate of the average review time to submit an app <a href="http://appreviewtimes.com/">here</a>. On average, review times are around 1–3 days. That’s longer than it took for the AWS S3 <a href="https://aws.amazon.com/message/41926/">outage</a> to come back online! In my opinion, it’s <strong><em>insane</em></strong> that it could take what could be a one-line fix that long to get approved, never mind installed on devices. Keep in mind it will take even longer for some users to manually check and download the latest version of your app.</p><p>To remedy this flaw in the approval process, services like Rollout give developers a way to fix issues live in production. They do so through the use of the native <a href="http://nshipster.com/javascriptcore/">JavascriptCore</a> framework based in Objective-C. Here’s a simplified diagram of how Rollout’s service works (credit to <a href="https://rollout.io/">Rollout.io</a> for the content):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McPn5jL3EEmZdQ8jivmEPw.png" /><figcaption>The Rollout SDK patch process.</figcaption></figure><p>The diagram models the standard service, which is vulnerable to a MiTM attack because there’s no authentication of the patch on the developer’s servers before the distribution to devices. However, there is a version of the service that transfers authentication to the developer’s server, eliminating the risk of a MiTM attack.</p><p>To the defense of developers, the majority of changes are not intended to introduce new features rather than fix mission critical crashes. This begs an important question, because I’m pretty sure Apple wouldn’t mind developers fixing user-visible crashes remotely. The one problem (and the reason why Apple seems to be rejecting these services outright) is it means Apple has to trust the developer to do the right thing.</p><p>So what should be done about the situation? It seems as if both the developers and Apple are in a constant legal tug-of-war, with Apple obviously winning. Apple has the final word on what can and cannot be distributed to end users’ devices. However, there’s a fatal flaw with their approach. In using these services, developers are for the most part <strong>improving<em> </em></strong>the quality of their apps. By removing apps that fix crashes through the use of these SDKs, Apple is effectively lowering the quality of apps in the App Store.</p><p>There’s also some ambiguity in the way they’re enforcing the rules here. Does this mean my app can’t rely on a timer set by a remote service? That’s tuning app behavior remotely, while the app is live. What about feature toggles? What about apps written in React Native, that are written entirely in JavaScript? Many mobile apps use their server backends for configuration of settings, A/B testing, and live content delivery of images or documents. Are these not allowed either? In light of this wave of rejection from Apple, not much is clear.</p><h3>My personal suggestion on the matter.</h3><p>I think Apple should implement this kind of patch-update service themselves. For example, they could generate an expiring token every time you want to submit a fix. When you want to submit a patch, Apple would allow you to do so via a simple dashboard, and require your submission of the token for authentication. That token would be valid for a one-time use, so you couldn’t use the same token for the same binary, you’d have to resubmit. The only way that could be compromised were if Apple’s servers were compromised, which I wouldn’t bet on happening any time soon. They could even charge for it, and rack up the price each time developers opt to submit an emergency fix.</p><p>Whatever happens, something has to change. At times, it feels like you’re walking on ice when developing an iOS application. The approval process often gets in the way of innovation — you don’t want to refactor or change <em>too </em>much of your app, you could.. <strong>break things, </strong>and the fix could take days to get approved<strong>.</strong></p><p>Let me know if you have any suggestions on what, if anything, needs to be done. It will be interesting to see Rollout’s response to Apple’s crackdown, since the rejection is based on the point of their entire offering. Rollout did note that a new and improved service is previewing in April, so I’ll keep an eye out for that.</p><p>That’s it for today! Thanks for reading, and as always, feedback is greatly appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a9a6cd9702f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello World App in Swift]]></title>
            <link>https://medium.com/@isaacacasanova/hello-world-app-in-swift-49c946e58ef5?source=rss-b0674fb099fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c946e58ef5</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Isaac Casanova]]></dc:creator>
            <pubDate>Mon, 02 Jan 2017 23:24:38 GMT</pubDate>
            <atom:updated>2017-05-06T19:49:10.065Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A short and sweet introduction to iOS Development.</em></p><p><a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/">Swift</a> is a general-purpose programming language created by Apple. It can be used to write iOS, macOS, tvOS, watchOS and website applications. It is meant as a replacement for <a href="https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html">Objective-C</a>. In this tutorial, I’ll show you how to create a simple iOS app in Swift. It will feature a button, and when pressed will print “Hello World!” to the console. Don’t worry, no experience with programming is necessary to complete the tutorial! However, in order to complete the tutorial in full, you’ll need to use a computer running OS X or (the rebranded) macOS. If you’re using Windows, you can compile only the Swift code I show you using <a href="https://swiftforwindows.codeplex.com/">these instructions</a>.</p><p>First, download <a href="https://itunes.apple.com/us/app/xcode/id497799835?mt=12">Xcode</a>. It’s a big download, weighing in at about 5 GB, so make sure you have plenty of space on your hard drive so that the download process runs smoothly. Once downloaded, it may prompt you to install additional components it requires. If prompted, accept and download those components. When you first open Xcode, you’ll see a view much like this one, minus the open projects on the right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*_x2v9Oc_w4YhRNpMht9xVQ.png" /><figcaption>Xcode Welcome Screen.</figcaption></figure><p>Select “Create a new Xcode project”, and you will see this result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*4bsPOcnabABri1KR5JO29Q.png" /></figure><p>Select “Single View Application”, click “Next”, and you will see a screen where you enter the details of your app. I’ve included an example below for reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*mBWjke0e-r_4G36AxDWKLw.png" /></figure><p>Let’s go through the options one at a time:</p><p>. <strong>Product Name</strong>: Here is where you enter the user-facing name of your app. So, Instagram would have “Instagram” as its Product Name.</p><p>. <strong>Team</strong>: Your team name from the Apple Developer center goes here. You use this field when you’re working towards publishing an app in the App Store.</p><p>. <strong>Organization Name: </strong>The name of the company you work for, or your name if you’re developing the app by yourself. Sometimes, this field is populated with an individual’s LLC if they are a contractor.</p><p>. <strong>Organization Identifier</strong>: A reverse DNS-style name separated by periods. Your company’s reverse identifier usually goes here. Whenever I’m building an app for educational purposes, I usually use <strong>com.education.self</strong>, but you can name it something different if you want.</p><p>. <strong>Bundle Identifier: </strong>A reverse DNS-style name separated by periods, a combination of your Organization Identifier and Product Name. This is required to uniquely identify your app by Apple. Any additional capabilities your app needs, like Apple Push Notifications, would be tied to this identifier.</p><p>. <strong>Language: </strong>The programming language you want to develop the app in. As of this article, the dropdown lets you select Objective-C or Swift. You can also write your app in <a href="http://stackoverflow.com/questions/3684112/what-is-objective-c">Objective-C++</a> if you want. Lastly, there are a myriad of different ways to write apps in scripting languages like Ruby and JavaScript, from <a href="http://j2objc.org/">Java to Objective-C</a>, and many, many more not listed here. For simplicity’s sake, we’ll stick with Swift, since that’s the language Apple is backing the most moving forward.</p><p>. <strong>Devices: </strong>Universal, which means both iPhone and iPad. You can also choose to develop your app for just the iPhone or just the iPad, although Xcode’s Interface Builder tool makes it easier to build one UI for all form factors.</p><p><strong>. Use Core Data: </strong>This is if you want to establish persistence in your app using Apple’s Core Data framework. That won’t be covered in this tutorial.</p><p>. <strong>Include Unit Tests:</strong> Unit tests are used in order to verify the correctness of the logic of your app. Depending upon the purpose of your app, <a href="https://en.wikipedia.org/wiki/Unit_testing">unit testing</a> can play an important part in the maintained success of your app from release to release. This will be covered in-depth in a future tutorial, but not here.</p><p>. <strong>Include UI Tests:</strong> Similar to unit tests, UI Tests verify the correctness of the user interface of your app. For example, you could have a UI Test to verify that a button turns a certain color when pressed. This will also be covered in-depth in a future tutorial.</p><p>Now that you have an understanding of the menu items, let’s move on to creating the app!</p><p>With Xcode open, select <strong>Main.storyboard</strong> underneath the folder <strong>MyFirstApp</strong>. Click anywhere on the white rectangle in front of you. That rectangle represents the iPhone Xcode has currently chosen for preview purposes. My current view previews as an iPhone 7. Select the rectangle, and you’ll see a blue outline around the preview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-fVSPAtwXJOSQNMJIulIBg.png" /></figure><p>With the preview selected, click the Assistant Editor to open the <strong>ViewController.swift</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Dzl2Dbp6SlVtBWdlukexMA.gif" /><figcaption>Opening the Assistant Editor Pane.</figcaption></figure><p>With the Assistant Editor open, drag a <strong>UIButton </strong>from the <strong>Object Editor </strong>onto the canvas and add constraints so that it stays in place when rotating the device. Then attach an action from the button to the <strong>ViewController.swift </strong>file to the right. Then, double click inside the <strong>UIButton </strong>and change the text from “Button” to “Hello, World”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*6JVrHFIR1mt0hpmihopcDA.gif" /><figcaption>Adding a button to the UI canvas.</figcaption></figure><p>One final step before building and running the app — place this code in the <strong>helloWorldAction</strong> of your <strong>ViewController.swift</strong> file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2078f0ec01217125033d148a1351dc12/href">https://medium.com/media/2078f0ec01217125033d148a1351dc12/href</a></iframe><p>Select the “Play” Button in the upper left corner, which will make Xcode compile and build your app. Then, the iOS Simulator will launch with your button in the center. Make sure the debug window is open, so you can see the console output when you press the button!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*JK_Ay2bVsmMwN-rG76ybXQ.gif" /></figure><p>Press the button, and you will see the console output “Hello, World!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*YqgSFvf2m7k5oQlUmrm-2Q.gif" /><figcaption>Hello, World!</figcaption></figure><p>Congrats, you’ve just built your first iOS application!</p><p>The completed code can be found <a href="https://github.com/IsaacACasanova/medium-MyFirstApp">here</a> on GitHub.</p><p>If you enjoyed this tutorial, let me know in the comments section! Any and all feedback is highly appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c946e58ef5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>