<?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 Gonzalo Birrueta-Martinez on Medium]]></title>
        <description><![CDATA[Stories by Gonzalo Birrueta-Martinez on Medium]]></description>
        <link>https://medium.com/@gnzox?source=rss-f94e6cfdd04d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rEvgr6mnxgNz9EOAxahNYA.png</url>
            <title>Stories by Gonzalo Birrueta-Martinez on Medium</title>
            <link>https://medium.com/@gnzox?source=rss-f94e6cfdd04d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:51:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gnzox/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[Stacks and Queues in Swift]]></title>
            <link>https://medium.com/@gnzox/stacks-and-queues-in-swift-e4884d31a101?source=rss-f94e6cfdd04d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4884d31a101</guid>
            <dc:creator><![CDATA[Gonzalo Birrueta-Martinez]]></dc:creator>
            <pubDate>Sat, 16 May 2020 05:31:29 GMT</pubDate>
            <atom:updated>2020-05-16T05:31:29.505Z</atom:updated>
            <content:encoded><![CDATA[<p>As developers, we’ve all had that moment where the only thing that could possibly save us from our mistakes was the savior of all keyboard shortcuts<strong>😉</strong> → <strong>ctrl+z/</strong>⌘<strong>+z.</strong><em> </em>And sometimes (usually when sleep-deprived at 3 am) we tend to get a bad case of what I like to call “undo mania”, which leads to over-undoing very important pieces of code😓. But thankfully we have → <strong>ctrl+y/</strong>⌘<strong>+y </strong>to fall upon!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*2nqiZUjP9lKezWsnDViovQ.jpeg" /></figure><p>But does anyone know how these simple but impactful shortcuts work? Well, we owe it all to a <strong>programming</strong> <strong>data structure</strong> called a <strong>stack</strong>🥞.</p><p>We see the concept of this data structure in everyday life. Here are some examples:</p><ul><li><strong>A deck of cards🃏</strong></li><li><strong>A tube of pringles😋</strong></li><li><strong>A stack of dirty dishes😷</strong></li><li><strong>A stack of pancakes🥞</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xH78buhxuSww_y7Xz468tw.png" /><figcaption>Common examples of real-world stacks🌎</figcaption></figure><p>We also see these data structures being used in the apps/programs we most use and love today:</p><ul><li><strong>undo/redo on almost everything😓</strong></li><li><strong>go back/forward on music apps or browsers🎧</strong></li><li><strong>sorting results from the newest → oldest (reversing a stack)🔄</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*JsjlkBC6msOaFXWN1d2RlQ.jpeg" /><figcaption>back/forward feature (Spotify)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/0*RUC7niTSIb3zl2Rg.png" /><figcaption>undo/redo feature 99.9% of all programs integrate (Microsoft word)</figcaption></figure><p>A <strong>stack</strong> is an <strong>abstract</strong> data type opposed to a <strong>concrete</strong> data type. A stack could be implemented with either a <strong>linked list</strong> or <strong>array</strong>. A stack consists of 1 pointer, at the top of the stack.</p><p>The way the stack operates is always the same, it uses the <strong>LIFO</strong> logic which means <strong>last in, first out. </strong>A good way to visualize is imagining a tube of pringles — the first chip that went inside the tube is eventually the last one to come out.</p><p>Here are the methods that are most common with a stack:</p><ul><li><strong>Push</strong>: Adds item to the top of the stack</li><li><strong>Pop</strong>: Removes the last item that was put on the stack</li><li><strong>Peek</strong>: Lets you view the top item on the stack</li><li><strong>isEmpty</strong>: Returns whether the stack is empty or not</li></ul><p>Time complexities for these methods are:</p><ul><li><strong>Push: O(1)</strong> — Only deals with the top of the stack</li><li><strong>Pop: O(1)</strong> — Again, only deals with top of this data structure</li><li><strong>Peek: O(1)</strong> — We only care about viewing the top of the stack</li><li><strong>isEmpty: O(1) </strong>— Constant time only checks if there&#39;s values in the stack or not.</li></ul><h4>Implementation</h4><p>Here is a basic implementation of a stack with an array of strings in the programming language <strong>Swift, </strong>used to develop iOS applications:</p><pre>struct Stack {<br>  var array: [String] = []<br>}</pre><p>Now that we have created an empty stack, let&#39;s create some methods in order to manipulate the data!</p><p>Push implementation:</p><pre>func push(_ item: String) {<br>  array.append(item)<br>}</pre><p>Pop implementation:</p><pre>func pop() -&gt; String? {<br>  return array.popLast()<br>}</pre><p>Peek implementation:</p><pre>func peek() -&gt; String? {<br>  return array.last<br>}</pre><p>And finally, the is_empty implementation:</p><pre>var isEmpty: Bool {<br>  return array.isEmpty<br>}</pre><p>If you would like a more detailed explanation, please refer to <a href="https://www.raywenderlich.com/800-swift-algorithm-club-swift-stack-data-structure">https://www.raywenderlich.com/800-swift-algorithm-club-swift-stack-data-structure</a></p><h3>Queues</h3><p>Have you ever wondered how your favorite music players allow you to pick songs to add to the queue? Well, it’s pretty self-explanatory that we use the <strong>Queue</strong> data structure to do this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*gNpdIXK3jFrp8jyO5QWnNw.jpeg" /><figcaption>Queue feature (Spotify)</figcaption></figure><p>We see examples of queues in everyday life, here are a few examples:</p><ul><li>The line for checkout at the grocery store</li><li>Printer queue, when multiple people send in print requests</li><li>Traffic</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/0*efIbXWtlTFWfId51.jpg" /><figcaption>Checkout lines (<a href="https://ixtenso.com/media/story_section_image/4992/image.jpg">https://ixtenso.com/media/story_section_image/4992/image.jpg</a>)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/0*B8oLVuEnXixAQ-jM.jpg" /><figcaption>Traffic Jams (<a href="https://www.incimages.com/uploaded_files/image/970x450/getty_523821065_98040.jpg">https://www.incimages.com/uploaded_files/image/970x450/getty_523821065_98040.jpg</a>)</figcaption></figure><p>In most iOS apps, a queue is also used in order to save memory when not displaying content to the user on a UITableView. A UITableView is used when scrolling through Instagram, Youtube, etc.</p><p>A <strong>queue</strong> is an <strong>abstract</strong> data type opposed to a <strong>concrete</strong> data type. A queue could be implemented with either a <strong>linked list, array, or even stack</strong>. A queue consists of 2 pointers, one at the start of the queue and one at the end of the queue.</p><p>The way the queue operates is always the same, it uses the <strong>FIFO</strong> logic which means <strong>first in, first out. </strong>A good way to visualize is imagining a line at a local grocery store, the first lined up is always the first one out.</p><p>Here are the methods that are most common with a queue:</p><ul><li><strong>Enqueue</strong>: Add an item to the queue</li><li><strong>Dequeue</strong>: Returns the first item in the queue</li><li><strong>Peek</strong>: Lets you view the first item in the queue</li><li><strong>isEmpty</strong>: Returns whether the stack is empty or not</li></ul><p>Time complexities for these methods are:</p><ul><li><strong>Enqueue: O(1)</strong> — Only deals with adding to the back</li><li><strong>Dequeue: O(1)</strong> — Only deals with returning the front of this data structure</li><li><strong>Peek: O(1)</strong> — We only care about viewing the front of the queue</li><li><strong>isEmpty: O(1) </strong>— Constant time only checks if there’s values in the queue or not.</li></ul><p>Here is a graphic representation of the queue data structure and its methods:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h5ZlrrkynRgfFU7R.png" /><figcaption>A basic representation of a Queue data structure (<a href="https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/Queues">https://en.wikibooks.org/wiki/A-level_Computing/AQA/Paper_1/Fundamentals_of_data_structures/Queues</a>)</figcaption></figure><h4>Implementation</h4><p>Here is a basic implementation of a queue with a linked list of integers, along with the enqueue and dequeue methods:</p><pre>public struct Queue {<br>  fileprivate var list = LinkedList&lt;Int&gt;()<br><br>  public mutating func enqueue(_ element: Int) {<br>    list.append(element)<br>  }</pre><pre>  public mutating func dequeue() -&gt; Int? {<br>    guard !list.isEmpty, let element = list.first else { return nil      }<br><br>    list.remove(element)<br>    return element.value<br>  }</pre><pre>}</pre><p>Here is an implementation of the peak and isEmpty methods:</p><pre>public func peek() -&gt; Int? {<br>  return list.first?.value<br>}</pre><pre>public var isEmpty: Bool {<br>  return list.isEmpty<br>}</pre><p>And that’s it! If you would like a detailed explanation please refer to <a href="https://www.raywenderlich.com/848-swift-algorithm-club-swift-queue-data-structure">https://www.raywenderlich.com/848-swift-algorithm-club-swift-queue-data-structure</a></p><h3>Final Words</h3><p>Main takeaways are that Stacks and Queues are pretty much inevitable in the programming world, and are simple but very important data structures to learn and implement into future projects. The main difference between the two is that Stacks follow LIFO, while queues follow FIFO, resulting in very different scenarios they could be used in!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4884d31a101" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Development in Photography]]></title>
            <link>https://medium.com/@gnzox/software-development-in-photography-ec3983e8be44?source=rss-f94e6cfdd04d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec3983e8be44</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[photography]]></category>
            <dc:creator><![CDATA[Gonzalo Birrueta-Martinez]]></dc:creator>
            <pubDate>Sat, 12 Oct 2019 23:06:32 GMT</pubDate>
            <atom:updated>2019-10-12T23:06:32.132Z</atom:updated>
            <content:encoded><![CDATA[<p>For many years growing up, I’ve been really interested in photography. Although I didn’t get my first camera until I was in high school, I was really intrigued by others who captured memories with the device. I created abundant memories with friends. Many times you would find us heading out on skateboards and bikes on sunsets after school to shoot anything “Instagram worthy”. Keep in mind, my town was so small the population was under 10,000. What we noticed after some time was that there were a lot of great places to go shooting in my small town, but none were really being exposed to social media or review sites. This meant people were almost unaware that these little “easter egg” places existed.</p><blockquote>I believe photographers are some of the most creative individuals there is. Mostly due to the fact that they go through the process of picking the “perfect” location to shoot hundreds of shots until they get one shot that satisfies their needs, to then opening Adobe suite to edit the final shot and creating the image they envision.</blockquote><p>There’s one big problem in photography: More than often if the place you want to shoot at is a national point of interest, good luck getting a shot with not many people in it. You’ll probably end up like this stock photographer trying to get a picture of the <a href="https://www.capbridge.com/">Capilano Suspension Bridge</a> in Vancouver, BC:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*yKwEA-IClx80o6uLiF23FQ.jpeg" /></figure><p>But what if I told you not all beautiful places aren’t well-known points of interest? Well — if you’ve been a photographer for any amount of time, you would’ve already known that there are many beautiful “Instagram worthy” spots all around, but they are pretty hard to find unless you go out looking for them specifically or see them in some sort of blog or article.</p><p>Now wouldn’t it be awesome if there was an app ran by photographers — for photographers? An app where photographers and adventurists could view all the “low key” and “Instagram worthy” places in the city, tagged along with reviews and pictures from users who either discovered the location or visited it before. This social platform would target all photogenic spots, not just the top 10 Yelp results;)</p><p>But before anything, we have to understand and analyze the current market for apps in this area. I’ll start with the PEST analysis in the photography app industry.</p><h3>PEST Analysis</h3><p><strong><em>Political:</em></strong></p><p>App developers can be affected by many aspects of government policy. Any app developers must also consider the impact of any forthcoming legislation on their operations.</p><p><strong><em>Economical:</em></strong></p><p>Collectively, the photography/arts industry is responsible for adding around $763.6 billion for the US economy. This app will run under the “Subscription” business model. You can try the app for free for 2 weeks, and pay $2.99/month after the free trial expires.</p><p><strong><em>Sociological:</em></strong></p><p>Sociological factors in this domain are that photography is a form of art in the 21st century. Wherever you are, whoever you are, you have the ability to document a story with pictures. These pictures could convey what situation you are currently going through or have gone through the past.</p><p><strong><em>Technological:</em></strong></p><p>Today we live in a great moment for photography, our cameras on our phones are more powerful than ever. This means that you don’t need photography gear worth thousands, instead, you could use the camera you have in your pocket to capture art.</p><blockquote>The best camera, is the one you always have with you! -Chase Jarvis</blockquote><h3>Competitive Analysis</h3><p>Currently, there are several websites and apps that are used to find shooting spots, but none really achieve what the mission for my app is.</p><ul><li>Yelp (app/website): Helps you find places, but only top spots that are usually crowded in cities. It’s a good way to get profile pics that 1000s of others have, but not the best way to explore unique spots.</li><li>Spots (app): Does a good job of pinpointing spots on the map, but all the spots are hard-coded in and there&#39;s no reviews or comments available for the spots. There is also a scarcity of spots, for a big city like San Francisco, there are only ~15 locations. Nice UI but little functionality.</li><li>Google Maps (app/website): A lot of information to find locations, but very time-consuming.</li><li>Explorest(app): Similar to Spots app, but with more functionality but once again, very little locations and almost all “basic” tourist locations.</li></ul><p>So, why are we better than the listed above? In our app, you’re allowed to comment on different locations as well as post your own pictures on the location. Also, the locations are coordinate-based so you get the exact location every time.</p><h3><strong>User Interviews</strong></h3><p>The best way to get feedback on an idea is to run user interviews — so that’s exactly what I did. I interviewed a total of 4 potential users, these are some of the simple yet insightful questions I asked:</p><ul><li>Do you like photography/exploring?</li><li>How do you usually go about finding places to photograph or explore? (Any online communities/websites/or apps?)</li><li>Do you wish there was a more centralized place like an app where the community of photographers would pinpoint areas they found to be good or interesting for others to explore?</li></ul><p>I chose my potential users carefully, so all the responses to the first question were along the lines of “Yes, I love photography and/or exploring.”</p><p><strong>How do you usually go about finding places to photograph or explore? (Any online communities/websites/or apps)?</strong></p><p>Student at School: <em>“I’ve lived in the bay my whole life so I have been around so many locations.”</em></p><p>A middle-aged man carrying a camera at Union Square: <em>“I have a lot of photographer friends here in the bay so we usually all just find places by scrolling through google searches. As well as word of mouth.”</em></p><p>A college student with a tripod set up on California street: <em>“I usually find places by going on Reddit communities like r/photography, and yelp sometimes when I’m in a new city.”</em></p><p>Random vsco girl in a mall: <em>“I go on Instagram and look at the top posts at the location I’m at.”</em></p><p><strong>Do you wish there was a more centralized place like an app where the community of photographers/explorers would pinpoint areas they found to be good or interesting for others to explore?</strong></p><p>Student at School: <em>“Yes that sounds awesome.”</em></p><p>A middle-aged man carrying a camera at Union Square: <em>“I’ve thought about something like this before but I have never seen anything close to it yet. Great idea, someone needs to act on it.”</em></p><p>A college student with a tripod set up on California street: <em>“Yes, especially nowadays in cities where the actual gems get hidden by super popular locations. Sounds like nobody has really hit this market yet. If you ever try looking for places on Yelp all you get are places that are supersaturated and always crowded.”</em></p><p>Random vsco girl in a mall: <em>“This sounds so cool, it would be a great tool for newcomers and people in this market, having everything in one place would make it so much easier!”</em></p><h3>User Stories</h3><p>User stories help visualize a scenario where my product would be used. These scenarios are made up, but paint a picture for a better understanding of the products’ main purpose and target audience.</p><h4>User Story 1:</h4><blockquote>Michael the photographer just moved to the bay area, but can’t seem to find nice places to shoot besides the Golden Gate Bridge, Palace of Fine Arts, The Ferry Building, etc. He wants something more hidden and less crowded to shoot at. He looked online for a website with locations but stumbled on an app that let him upload locations with coordinates, view and comment on locations all over the city.</blockquote><h4>User Story 2:</h4><blockquote>Crystal wants to find aesthetically pleasing backgrounds that match with her outfits, to then post on Instagram and get all the likes. She doesn’t know where to look until she downloads this app and sees that theres an abundant amount of aesthetically pleasing locations that fit her vsco girl needs.</blockquote><h3>Wireframes</h3><p>A wireframe is basically an initial sketch of the app views, this makes it easier to make design mistakes upfront and change them a lot faster, it also allows you to get user feedback alot faster. These are my wireframes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTRA3fpUHWfapOoWsuQHKA.jpeg" /></figure><h3>Wrap Up</h3><p>In closing, I have gone through the initial process of software development. I brainstormed ideas, which challenged me to be creative and think outside of the box. I chose a niche market, and analyzed competitors in this sector and saw what they were missing. I then drew wireframes and conducted user interviews to see if I was headed in the right direction so far.</p><p>Anyways, if you read this thank you so much for your valuable time. And if you enjoyed any of my first blog post here on Medium, please make sure to leave some claps!:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec3983e8be44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>