<?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[Tech and the City - Medium]]></title>
        <description><![CDATA[Hacking it in my hometown of Los Angeles. From urban planner to software developer. From Brooklyn to Downtown LA. Getting real nerdy with it. - Medium]]></description>
        <link>https://medium.com/tech-and-the-city?source=rss----84528ac18e88---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Tech and the City - Medium</title>
            <link>https://medium.com/tech-and-the-city?source=rss----84528ac18e88---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:48:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/tech-and-the-city" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Pairing Diaries: Week 4]]></title>
            <link>https://medium.com/tech-and-the-city/the-pairing-diaries-week-4-8ddfa982df1d?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ddfa982df1d</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Sun, 12 Feb 2017 19:04:40 GMT</pubDate>
            <atom:updated>2017-02-12T19:04:29.183Z</atom:updated>
            <content:encoded><![CDATA[<h4>Ending where it all began.</h4><h4>Monday, February 6</h4><p>On this cold and rainy day, I continued reading “Grokking Algorithms” and I wrote a blog post about <a href="https://medium.com/tech-and-the-city/car-free-in-a-car-culture-be410b23d459#.1p4iifuln">Dijkstra’s algorithm</a>.</p><h4>Tuesday, February 7</h4><p>Today, I paired with Jayden at a client site. We primarily worked on writing integration tests for GraphQL’s error handling, but also reviewed a client written for an API and tried identifying an issue in a database record. I still felt that there was so much to learn about the ecosystem, despite being at the site a few times. There were new things I learned (e.g. const in ES6 still allows you to mutate objects and arrays) and things that served as a refresher (e.g. Apache Benchmark).</p><p>Despite some things being over my head, I really value my time pairing with Jayden since I have so much to learn from him. Despite not fully understanding the codebase or task, I always tried to reiterate the task at-hand aloud. I need to be more attentive because I felt like I kept making small mistakes. Jayden gave me advice on how to navigate consulting and entertained general questions I had. I feel like we operate in the same way: close all unnecessary tabs, delete all extraneous lines, and be consistent with your syntax. All in all, it was nice to switch gears between talking about the code, consulting, 8th Light, and life. My single most embarrassing moment was writing an error message that read: “The price isn’t rice” (I meant to write “right”).</p><h4>Wednesday, February 8</h4><p>I paired with Byron today. We were getting up to speed with C#, which is an object-oriented, statically-typed language. It also resembles Java, but I didn’t get too deep into it to differentiate between the two. We used a JetBrains IDE and it was seriously bugging out. There were times when it wouldn’t detect that a variable was being used, and you had to delete it and rewrite it (<em>what?!!</em>). The setup for the IDE seemed very involved and was a bit confusing at first, but we learned about language-specific quirks and started working on tic-tac-toe. I finally understood how to use <a href="https://vimium.github.io/">Vimium</a> (even though Jayden had recommended this before) and it made navigating without a mouse *amazing*. I also learned that Byron likes similar indie music and his alias is Luke Cage.</p><h4>Thursday, February 9</h4><p>I paired with, well, nobody. But I got to pet Gatsby (dog), drink nitrogen-infused cold brew, read “Grokking Algorithms,” and write a <a href="https://medium.com/tech-and-the-city/everyday-algorithm-c76d873ee358">final blog post</a> on the book.</p><h4>Friday, February 10</h4><p>In the morning, I paired with Tom. I learned a lot! We paired on Conway’s Game of Life in Ruby. We did that for an hour and then added the constraint of not using naked primitives. The purpose, he explained, was not to program the entire game but to rethink our approach about how we program. Tom also warned me that because of it, constraints would not lead us to write good code. The second half of our pairing was spent on learning how an Operating System works and writing assembly code! I thought this was really cool, and piqued my interest… as developers, we should know at a rudimentary level how all of this works.</p><p>In the afternoon, Matt and I decided to pair outside in the rain. Contrary to what you may think, it was actually nice! We decided to use the <a href="http://www.exercism.io/">Exercism</a> platform to write in Go. I was really proud of how we managed to clean up our code for the leap year exercise, repurposing certain methods and reducing each method to a single purpose and single line. Since you “publish” your responses on the platform, you’re able to view others’ solution and give feedback — which we definitely did!</p><p>I also got my challenges 😱 The end!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ddfa982df1d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/the-pairing-diaries-week-4-8ddfa982df1d">The Pairing Diaries: Week 4</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everyday Algorithm]]></title>
            <link>https://medium.com/tech-and-the-city/everyday-algorithm-c76d873ee358?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/c76d873ee358</guid>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 10 Feb 2017 03:33:18 GMT</pubDate>
            <atom:updated>2017-02-10T03:33:11.357Z</atom:updated>
            <content:encoded><![CDATA[<p>I am fascinated by — and curious about — the application of technology in our everyday lives. This is why I was originally interested in programming. On a daily basis, we interact with apps that integrate various types of algorithm into its core or peripheral service. And it is amazing to see what the outcome is.</p><p>Even more amazing is uncovering the logic (or magic!) powering apps. This is why I decided to start reading “Grokking Algorithms.” It was such an accessible read! There are so many topics that I could summarize in detail. All in all, there are ten algorithms discussed, as well topics such as binary tree search, dynamic and linear programming, MapReduce, etc. I thought I’d provide a more topical overview of interesting algorithms belying current and relevant technologies.</p><h4><strong>The Fourier Transform</strong></h4><p>First of all, what a cool name (!). And a lot of use cases, too. Its potency is analogized as having the ability to know the ingredients of a smoothie (I’m assuming smoothie is a good analogy since its output is <em>very </em>different from its input). An app like Shazam, which guesses what song is currently playing, leverages the Fourier transform, which has the ability to separate a song into its individual frequencies. If a song can be separated into frequencies, the bass can be boosted and the treble, hidden. You can then match songs based on their bass! It is also used for compressing music by breaking an audio file down into its notes. The Fourier transform can discern which notes contribute to the overall song and get rid of any notes that aren’t significant.</p><h4><strong>SHAs</strong></h4><p>This is definitely one type of algorithm that has far-reaching influence (I even used the algorithm for my Java server). A secure hash algorithm generates a (very long) string for every string, and can be used to differentiate between files. Every git commit has a unique SHA, which you can use to jump back to a very specific time. The concept of hashing is also important for password storage. When building apps with user authentication, passwords are *never* stored in a database as is in case of security violations. Instead, passwords are *hashed* and then stored; every time you enter your password, it is hashed and compared to the stored value.</p><p>The beauty of SHA is that it is a one-way hashing, so a hacker with the encrypted string cannot figure out the *actual* password. I was introduced to the term locality insensitive, meaning that changing of a character can dramatically transform the hash rather than make a tweak in one character. This helps in safeguarding sensitive information, like passwords, in the even that the data falls in the wrong hands.</p><h4><strong>K-Nearest Neighbor</strong></h4><p>When trying to understand where a user falls in terms of category, k-nearest neighbor (KNN) helps determine classification. If a user has more neighbors that are more into horror movies than romance movies, then the user can be classified as a horror moviegoer. That’s right — we’re talking about Netflix’s recommendations. We can think about it as if users are plotted by similarity. Find the <em>n</em> closest neighbors of Person X and if they like a certain movie, it’s most likely Person X is a fan as well. So, if Person X likes a certain movie and is adjacent to Person Y, then their respective favorite movies can be recommended to each other!</p><p>Of course, there is more complexity to this as we have to discern the similarities between users. The users can be plotted on our graph by determining coordinates (e.g. how much they <em>like </em>certain genres). Then, their ratings on individual movies can help determine whether other people who are similar to them would like the movie as well. So really, the more you rate, the more information is used to help compare you with others and thereby determine your recommended movies.</p><h4><strong>Optical character recognition</strong></h4><p>Machine learning always struck me as <em>beyond me</em>. In its simplest definition, machine learning is about making your computer smarter. More and more, we’re seeing how Google can filter spam emails or how Facebook can recognize faces to automatically tag people in photos. (Carina Zona also has an amazing talk about how detrimental and discriminatory such algorithms can be).</p><p>For instance, let’s say that we want numbers to be recognized in images. The steps of OCR would include going through many images of numbers and extract their features; this stage is called training. The algorithm would measure lines, point, and curves and associate them with a certain value. This makes sense — machine-learning algorithms must have a training step before unleashing it to the world and applying it in whatever app or technology. Spam filters use another algorithm, the Naive Bayes classifier, which is trained and breaks sentences into words. For each word, the algorithm determines the probability for a certain word to show up in a spam email (e.g. “million” may show up in spam in the form of a financial scam). Pretty nifty.</p><p>While this is a primer in technology and their algorithms, reading this book has given me rudimentary understanding of how they work. Breaking down these complex tasks is exactly what it means to be a programmer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c76d873ee358" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/everyday-algorithm-c76d873ee358">Everyday Algorithm</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Car-free in a Car Culture]]></title>
            <link>https://medium.com/tech-and-the-city/car-free-in-a-car-culture-be410b23d459?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/be410b23d459</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Tue, 07 Feb 2017 05:16:51 GMT</pubDate>
            <atom:updated>2017-02-18T00:35:14.176Z</atom:updated>
            <content:encoded><![CDATA[<h4>Taking Transit with Dijkstra’s Algorithm</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*EG2xWW6qVTYwXsqAeZbp3w.jpeg" /></figure><p>Before getting started, here are some terms I’ll be using:</p><ul><li><strong>Graph:</strong> models a set of connections (e.g. Person A → Person B; Person C → Person B, etc.)</li><li><strong>Neighbor:</strong> a direct connection (e.g. A is a neighbor of B, and vice versa)</li><li><strong>Edge:</strong> the relationship between two neighbors (e.g. that arrow → which may or may not have a weight or value associated with it)</li><li><strong>Parent:</strong> the node from the left side of the arrow (e.g. If my diagram shows Person A → Person B, then A is considered the parent of B)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q6eihNKjhnLpvmJki0V-_Q.png" /><figcaption>The inspiration for my example.</figcaption></figure><p>As a transit rider, I have to make all sorts of decisions about how to get from point A (let’s use the Central Library in Downtown LA) to point B (Annenberg Space for Photography in Century City). Through a <a href="https://www.wikiwand.com/en/Breadth-first_search">breadth-first </a>search, I can ask myself the following questions:</p><ul><li>Is there a path from my origin to destination?</li><li>What is the shortest path from my origin to destination?</li></ul><p>Ideally, I’d like the least number of transfers and the fewest number of buses and trains. However, the limitation of a breadth-first search is that it will provide the shortest path (based on number of segments), but does not account for the <em>duration</em> of those bus and train trips. What if one bus ride is longer than two bus rides? Or a train is longer than walking and riding a train? There are multiple scenarios in which fewer segments could actually take a longer period of time.</p><p>Here is a graph demonstrating the trip from Central Library to The Annenberg Space. The bus lines or nodes are indicated in black font; the arrows are the edges; and the yellow number represent the minutes spent for the segment of the trip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U1BSzYEUuOGyyXo6_2VTog.png" /></figure><p>To better understand which path to take, the solution is to use Dijkstra’s algorithm. The algorithm provides more insight to the preferred route based on the <em>fastest</em> path as determined by the weight of an edge. First things first, let’s create hashtables that represent the graph, costs, and parents. I like to think of the graph hashtable as mapping all of the relationships between nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hqyInQTnOqOS3gNDqatjEw.png" /></figure><p>As you can imagine, the hashtable for the first chart would look something like this (hashtables within hashtables).</p><pre>graph = { “Central Library”=&gt;{“431”=&gt;2, “14”=&gt;0, “910”=&gt;3},<br>          “431”=&gt;{“3”=&gt;45},<br>          “3”=&gt;{“Annenberg”=&gt;5},<br>          “14”=&gt;{“28”=&gt;30},<br>          “28”=&gt;{“Annenberg”=&gt;30},<br>          “910”=&gt;{“28”=&gt;45},<br>          “Annenberg”=&gt;{}}</pre><p>And we’ll have two more hashes called costs and parents, which will be referenced in the code below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/18c982177538ef5b868641a3965e6229/href">https://medium.com/media/18c982177538ef5b868641a3965e6229/href</a></iframe><p>There are four steps to Dijkstra’s algorithm:</p><ol><li><strong>Find the cheapest node </strong>(line 4; see code for method at the bottom)<br>“Cheapest” node refers to the node that will get you there in the least amount of time. We’ll start off with the first segment of the trip. The start is Central Library; the end is The Annenberg Space for Photography. The cheapest node would be the 14 bus, since the cost is 0 minutes. You can’t get any lower than zero (if dealing with negative weight, you’d have to use the Bellman-Ford algorithm).</li><li><strong>Update the costs of the neighbors of the node</strong> (lines 13–16)<strong><br></strong>The 28 bus is the only neighbor of 14, and the cost would be 0 + 30 = 30 minutes. Since 30 is not greater than 30, there is nothing to update.</li><li><strong>Repeat this for every node in the graph</strong> (lines 10 &amp; 20)<strong><br></strong>After we’ve checked the node and its neighbor, we store the node’s value into an array. Next, we’ll check the next-cheapest node, which is the Commuter Express 431 with a cost of 2 minutes and neighbor of 3 with a cost of 45 minutes. The last node is 910 with a cost of 3 minutes.</li><li><strong>Calculate the final path. </strong>Naturally, this would get more complex if there are more bus lines and more possibilities. By returning the parents hashtable, we’ll see what’s the final path. By tracing backward, we can see that to get to The Annenberg, we’d take the 3 and in order to get the 3, we’d catch the 431 from the Central Library.</li></ol><pre>{“431”=&gt;”Central Library”, <br> “3”=&gt;”431&quot;, <br> “14”=&gt;”Central Library”, <br> “28”=&gt;”14&quot;, <br> “910”=&gt;”Central Library”, <br> “Annenberg”=&gt;”3&quot;}</pre><p>FYI, here’s how we’ll find the lowest/cheapest node. We set the lowest cost to be infinity and the lowest node to be empty. We’ll iterate through the costs hashtable. The bus line represents the key; the duration in minutes, the value. Since we aren’t sure how long it will take to The Annenberg, we set this value to infinity.</p><pre>costs = {“431”=&gt;2, <br>         “14”=&gt;0, <br>         “910”=&gt;3, <br>         “Annenberg”=&gt;Float::INFINITY, <br>         “3”=&gt;45, <br>         “28”=&gt;30}</pre><p>We’re essentially looking through this collection to see which one has the lowest value. Once we’ve processed the node, we’ll include it in our processed array so it won’t be processed again. Our return value is the node, or in this case, the bus line.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d98733031854f98b2315343ced3f074/href">https://medium.com/media/4d98733031854f98b2315343ced3f074/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be410b23d459" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/car-free-in-a-car-culture-be410b23d459">Car-free in a Car Culture</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Pairing Diaries: Week 3]]></title>
            <link>https://medium.com/tech-and-the-city/the-pairing-diaries-week-3-d5a97eec6d18?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/d5a97eec6d18</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 03 Feb 2017 19:49:59 GMT</pubDate>
            <atom:updated>2017-02-04T07:05:15.262Z</atom:updated>
            <content:encoded><![CDATA[<h4>The official tour begins</h4><h4>Monday, January 30</h4><p>Today marks the first day of my <strong><em>real</em></strong> pairing tour (<a href="https://www.youtube.com/watch?v=_JZom_gVfuw">“it was all a dream!”</a>). Richard and I switched between working on setting up Raspberry Pis (RPs) and writing tic-tac-toe in Clojure. It’s cool because I get to ask Richard a bunch of questions about RPs, which I’ve been meaning to learn, but <em>ya know</em>, <em>just haven’t</em>. I also re-asked him questions that I had asked him before but have since then forgotten the answer to. I have the RP 2, which is a bit slower than the 3 and doesn’t have WiFi. TIL about:</p><ul><li>Different components of a RP</li><li>That 5G really refers to two channels that are 2.4 GHz each (and not supported by RPs) — incidentally, I was the one who proposed that the reason why we weren’t connecting to the WiFi network could be because we were on the 5G network ¯\_(ツ)_/¯ who would’ve thunk, amirite?</li><li>How to connect RP to a router, how to SSH into one remotely, and how to write a super simple program in C</li></ul><p>Everyone writes their tic-tac-toe game differently, and it’s always interesting to see how people approach it. Richard and I worked on refactoring unit tests, importing a math library as a dependency, and rewriting methods to be more idiomatic. I made suggestions where I thought the code and/or tests could be improved and Richard was super down to hear me out and he encouraged me to ask as many questions as I liked, which I appreciated. All in all, it was a good day and I felt like it was a good balance of learning and teaching.</p><h4>Tuesday, February 1</h4><p>I ventured to a client site to pair with Sylwia today. I told her I was “hanging out” with her for the day, which meant that we were pairing, chatting about both the apprenticeship and work at-hand, laughing, and eating snacks.</p><p>To keep this at a high-level, we worked on load testing which was completely new to me. We used a tool called Jmeter to configure the number of users and requests on our cluster, and looked at the output. There were various scenarios we had to vet: clusters that were hosted or not hosted by AWS, geo-filtering, etc, and we used both the terminal and GUI to run these load tests. There was a moment when we had to figure out why we were getting a 503 status code after sending several requests, and it seemed related to the Jmeter GUI overloading and the load balancer attempting to build up a new instance.</p><p>What I’ve enjoyed thus far is being able to immerse myself in other people’s workplaces. I get to participate in stand-up and join people in their meetings. I get to listen in on conversations and understand the various roles and functions of different team members. I get to unabashedly ask questions and no question is too simplistic or dumb to ask, as Jayden says.</p><h4>Wednesday, February 2</h4><p>Today, I paired with Tony at a client site. His team is starting on their product site’s makeover, which I remembered from previously pairing with him. I learned about NuclearJS, which helps store immutable data, and the use of access tokens from OAuth to retrieve user information. We tried to do some troubleshooting with a test that was invoking an action we weren’t expecting, but moved on from that since we weren’t really moving forward. I revisited some concepts from my Ember days, like two-data binding, and resolved to dig deeper into things I don’t have a crystal clear understanding on, such as promises.</p><p>I found it really helpful to take notes on issues and tasks at hand so that I could revisit and reference them later, say, after lunch or a meeting. (Diagramming is also helpful in providing a concrete reference). Speaking of meetings, I got to join Tony on several meetings. Despite not having too much context, I thought it was still important to be there (albeit as a fly on the wall) and consider how developers approach the process. I think I understood about 40% of what was going on, tbh.</p><p>Also, I wrote my first React component! Our task was to render some of the user’s information, which was coming through the access token. I found that, all in all, I understood what was going on and the issues that were arising, even if I didn’t necessarily know how to go about solving. Restating what I’m trying to achieve was very helpful.</p><h4>Thursday, February 3</h4><p>I read “<a href="https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230">Grokking Algorithms</a>” by Aditya Bhargava and recapped my learnings in <a href="https://medium.com/tech-and-the-city/algorithms-101-searching-sorting-d5f20468b491#.p4t3h12sp">this blog post</a>. Learned about different sorting and searching algorithms, and finally got around to learning about Big O notation.</p><h4>Friday, February 4</h4><p>In the morning, I paired with Tony on the same story that we worked on two days ago. It was more of like impromptu pairing, initiated by Tony who asked me if I knew how to do CSS. My response was along the lines of: “Meh, not really, but I could try.” Honestly, most of the time, I feel like I experiment with CSS to figure out what could work. My solution tends to be to wrap a div around things and control how they are positioned or how they flow. After some time, we were able to properly line up the various elements on the page; some of them had inherited or pre-set position values, which made them act weirdly, so we had to remove them. I got to see more JSX syntax, which was interesting; for instance, you can store HTML tags and SASS variables in a constant — <em>say what?! </em>Anyway, we got it to a good place and it now looks as good as, if not better than, the mockup.</p><p>In the afternoon, Cat and I worked on a D3.js project she had built. The app was multifaceted, and we worked on a page that displayed a Google Map of Chicago with an overlay of neighborhoods. In the short amount of time that we had, we worked on documenting how to run the app and making the map responsive. There was some setup stuff we had to figure out (e.g. setting up AWS-related environment variables) and some style tweaking. With half an hour to go, we also recorded a standup video (a roundup of updates from each person) that was inspired by <a href="https://www.youtube.com/watch?v=IAhF8tPqafQ&amp;t=50s)">this SNL skit</a>.</p><p>Team work makes the dream work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a97eec6d18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/the-pairing-diaries-week-3-d5a97eec6d18">The Pairing Diaries: Week 3</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorithms 101: Searching & Sorting]]></title>
            <link>https://medium.com/tech-and-the-city/algorithms-101-searching-sorting-d5f20468b491?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/d5f20468b491</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 03 Feb 2017 19:25:35 GMT</pubDate>
            <atom:updated>2017-02-03T19:24:06.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*BM0rLP-g5Qq4wdqq6jq32w.png" /></figure><p>When I was watching my favorite show, <a href="http://www.cwtv.com/shows/jane-the-virgin/">Jane the Virgin</a>, I was excited when Xiomara had a back-and-forth with Rogelio. He claimed that he was compatible with someone based on a matchmaking algorithm. She accused him of not even <em>knowing</em> what an algorithm is. Hah!</p><p>Well, Rogelio, an algorithm is a set of instructions for accomplishing a task. There are algorithms that are well-known patterns or are fast or solve interesting problems. For instance, weren’t you really fascinated when I wrote (and talked about) the algorithm for an unbeatable AI in tic-tac-toe?</p><p>I’ve started reading Aditya Y. Bhargava’s book, “Grokking Algorithms,” whose book includes many diagrams (visual learner FTW), memorable examples and analogies, and easy-to-read language. I was delighted by the prerequisite to reading the book: basic algebra. I love algebra so much I took the class twice (once during the summer, where I constantly competed with my older sister, and again during the school year). Geometry is another story.</p><p>Anyway, without further ado, here is an overview of what I’ve learned so far. I’ll try to recap a handful of main concepts at one time. (Also, these examples are from the book!):</p><h4>Big O notation</h4><ul><li><strong>Definition:</strong> A special notation that tells you how fast an algorithm is, given that running times will grow at different rates and provides a worst-case scenario.</li><li><strong>Example: </strong>Let’s say it takes one second to check one element. With simple search, if there are 100 elements, it will take 100 seconds. With binary search, it will take 7 seconds to run since log2 (or log base 2) 100 is equal to about 7 (in other words, it takes 2 multiplied 7 times to roughly equal 100). If we were looking at 1 billion elements, simple search results in 1 billion seconds whereas binary search results in about 30 seconds. At 100 seconds, 33 Simple search and binary search do not grow at the same rate.</li></ul><h4>Simple search</h4><ul><li><strong>Definition: </strong>Looking at each element of a collection in order.</li><li><strong>Example:</strong> You have a dictionary and you’re looking for “peacock.” You start from the beginning, checking each word until you find the word “peacock.”</li><li><strong>Big O run time:</strong> O(n), also known as linear time.</li></ul><h4><strong>Binary search</strong></h4><ul><li><strong>Definition:</strong><em> </em>Select the middle number and eliminate half of the remaining numbers every time. Binary search runs in logarithmic time (e.g. if there is a list of 100 items, it will take at most 7 guesses to get the answer).</li><li><strong>Example: </strong>Person A chooses a number between 1 to 100 (24). Person B has to guess A’s number and does by starting at the middle (50). A says 50 is too high so B halves that number and guesses 25, and so forth and so forth.</li><li><strong>Big O run time:</strong> O(log n), also known as log time.</li></ul><h4>Quicksort</h4><ul><li><strong>Definition: </strong>A sorting algorithm that uses “divide and conquer.”</li><li><strong>Example: </strong>If sorting numbers in an array, choose a pivot (an element to compare with the rest of the elements). Find all of the elements that are lower and all of the elements that are higher and partition them into sub-arrays. Sort those subarrays in the same way (e.g. choosing a pivot and arranging elements based on whether they’re lower or higher than the pivot) until every element is sorted.</li><li><strong>Big O run time:</strong> O(n * log n)</li></ul><h4>Selection sort</h4><ul><li><strong>Definition:</strong> A comparison-based algorithm in which there is a list is divided into two parts: the sorted part and the unsorted part. Initially, the sorted part is empty and the unsorted part is the entire list.</li><li><strong>Example: </strong>Based on a list of artists and numbers representing how many times you have played their songs, you decide to rank them based on their play count. You go through the list the first time and find the most-played artist and add it to a new list while removing it from the original list. You go through the list a second time and find the second most-played artist, and so forth until you have no more artists in the original list. You now have a new list that is sorted based on play count!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5f20468b491" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/algorithms-101-searching-sorting-d5f20468b491">Algorithms 101: Searching &amp; Sorting</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Pairing Diaries: Week 2]]></title>
            <link>https://medium.com/tech-and-the-city/the-pairing-diaries-week-2-baafbfc55b4b?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/baafbfc55b4b</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 27 Jan 2017 19:22:27 GMT</pubDate>
            <atom:updated>2017-01-28T04:38:20.208Z</atom:updated>
            <content:encoded><![CDATA[<h4>Two down, two more to go.</h4><h4>Monday, January 23rd</h4><p>Paired with Tony, who incidentally matched with me that day (we were both rockin’ the same water-resistant North Face black hoodie). This was my first pairing session at a client site! Tony told me a bit about how React’s component, props, and state work and how Reflux is used to store global variables. We paired with another developer — yet another mob programming session!— where we worked on error message output for a billing form. There was verification that took place both on the front-end and back-end, but there were bugs that occurred (the error message wasn’t appearing as it should). Their team seemed really solid and collaborative, and it was overall good vibes. It was nice to recap the day with Tony, who gave me more insight around expectations of a software crafter.</p><h4>Tuesday, January 24th</h4><p>Paired with Jayden, which was super cool because he basically downloaded a huge amount of knowledge. I was unfamiliar with how his team operates and their tools, but I did know JavaScript and can recognize ES6 so there was that. Jayden basically defined and explained a bunch of the software and terms for me, such as GraphQL, POC, Terraform, Jenkins, Swagger, mutation, elastic search, auto-scaling, etc. We paired on writing unit tests for SQL’ing and fixing display dates. It was particularly useful to watch how Jayden debugs!</p><p>Other highlights included drinking some nitrogen-infused cold brew in the morning and eating Mexican food for lunch. I stepped out for a brief while to talk logistics with 8LA’ers who were going to <a href="https://www.lamayor.org/TechFairLA-About">TechFair LA</a>; my phone died on me within five seconds of that call. Damn you, Apple Watch.</p><h4>Wednesday, January 25th</h4><p>Paired with Sylwia and another team member #moblife. Sylwia gave me an overview of the various APIs and microservices that her team works on. I like having context! I understood <em>some </em>things (at the most superficial level) from pairing with Jayden the day before. She was tasked with having the search engine point to a new elastic search bucket by re-writing those queries. Again, I felt like a fish out of water. It’s hard not being able to contribute and I felt like most of the time I was just asking questions to reaffirm the task at hand. Sylwia made sure that I had the opportunity to drive, which made me uncomfortable, but I appreciated that.</p><h4>Thursday, January 26th</h4><p>TechFair LA was located at The Reef, this creative design-y monolith of a building just south of the 10 freeway. It was a stone’s throw away from my favorite community college, LATTC, and there is a huge chair in the middle of their parking lot. The fair was apparently the largest tech fair in LA; there was an upward of 10,000 attendees and the line to get in wrapped around the building. There were also extremely long lines to talk with Tesla and SpaceX representatives, which made me re-think whether job fairs are really effective (because I don’t think they are). Despite being wedged in a corner, we had tons of people talking to us and doing our coding challenge or tweeting at us to enter a raffle for a Raspberry Pi. I had my 30-second pitch down pat. It was fun and we got our name out there, but also tiring.</p><p>My favorite part was working with people through the coding challenge. There were a few memorable people, including this guy who hadn’t written Python since college (but was still down for the challenge!) and a woman named Fox who refused to use loops. I love seeing the way people approach problems. I also reunited with a long lost friend from college who had no idea I was back in LA! ‘Twas dope. And I met a cool vendor who was interested in our services and gave me a vase of yellow flowers to take home.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2uCUR2oDq31OanAkT07lZg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baafbfc55b4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/the-pairing-diaries-week-2-baafbfc55b4b">The Pairing Diaries: Week 2</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Changing a Super Old Git Commit History]]></title>
            <link>https://medium.com/tech-and-the-city/changing-a-super-old-git-commit-history-20346f709ca9?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/20346f709ca9</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 17:33:07 GMT</pubDate>
            <atom:updated>2017-01-27T18:07:25.229Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*UJhBACoeEKH3lxXUpNx6MA.jpeg" /><figcaption>It used to be so simple.</figcaption></figure><p>I’d like to share a dilemma — and a strange solution.</p><p>Over 50+ commits ago, I had a “WIP” commit message that I never changed. The most straightforward solution it seems would be to get the SHA of that commit and run git rebase -i &lt;SHA&gt;.</p><p>Reword it? Not a problem.</p><p>Except.</p><p>Merge conflicts galore. The first few times, it was not a problem. I would fix the conflicts, add them, and git rebase --continue.</p><p>Until.</p><p>It kept escalating.</p><p>It wasn’t even a linear process, which made it even more confusing. It was unclear which version I should use most of the time. <em>Plus,</em> why am I even doing this? I’ve resolved these issues in the past. Why is changing the name of a commit message having these side effects?</p><p>While I cannot say that I have a resolution, I did <a href="http://stackoverflow.com/questions/22993597/git-changing-an-old-commit-message-without-creating-conflicts">find this solution</a> (god bless Stack Overflow). I adapted the steps and did the following:</p><ul><li>Went into/usr/local/bin (this could’ve been any usr directory)</li><li>Created a file called git-reword-commit (this could’ve been called anything so long as it starts with git). In that file, I added the following, based on the SO post (truthfully, I still need to decipher it):</li></ul><pre>#! /bin/bash<br>REV=$1<br>MESSAGE=$2<br>FILTER=&quot;test $(echo &#39;$GIT_COMMIT&#39;) = $(git rev-parse $REV) &amp;&amp; echo $MESSAGE || cat&quot;<br>git filter-branch --msg-filter &quot;$FILTER&quot; -- --all</pre><ul><li>The SO post doesn’t say this, but you have to make sure the file is executable. Run chmod +x git-reword-commit</li><li>Returned to my repository and ran git reword-commit &lt;SHA&gt; &quot;&lt;MESSAGE&quot;</li><li>git push -f</li></ul><p>It 👏🏽 finally 👏🏽 worked 👏🏽 ! 🙌🏽</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20346f709ca9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/changing-a-super-old-git-commit-history-20346f709ca9">Changing a Super Old Git Commit History</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Pairing Diaries: Week 1]]></title>
            <link>https://medium.com/tech-and-the-city/the-pairing-diaries-week-1-3bdf14c29e36?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/3bdf14c29e36</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 17:12:49 GMT</pubDate>
            <atom:updated>2017-01-20T17:12:39.843Z</atom:updated>
            <content:encoded><![CDATA[<h4>Four weeks. One tour.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9q84Fdme9ZAJkKxa_I8G_w.jpeg" /><figcaption>Credit: #WOCinTech Chat</figcaption></figure><p>This is the first of week of pairing with software crafters from the 8th Light LA office. A recap of my experiences thus far:</p><h4><strong>Monday, January 16th</strong></h4><p>Mob programmed with Matthew and Rob on a Java/Spring project. We’ve done this before with a Scala project so I felt comfortable with the dynamic. I liked how they first provided business context (white-boarding is helpful!) and then the purpose behind their story/task. It was probably the largest, most complex codebase I’ve ever seen. At a higher level, they were writing tests and editing a function such that any updates to the database required the creation of another database record. There were times that my head hurt. I think I could’ve been more verbal, but it was nice that I was able to contribute in some ways.</p><h4>Tuesday, January 17th</h4><p>Paired with Kirby on a Rails project. We worked on various tasks, including modifying the type of data we’re sending from the view to the controller, editing and saving text input from a custom field, and creating a modal for updating data for all users. We also talked through refactoring and troubleshooting when a custom integration test failed.</p><p>I have more first-hand experience with their app since I have QA’d a story of theirs. It was nice to be briefly back in the Rails world, to work on front and back-end issues, and just overall to pair with Kirby who is delightful. (I also learned about <a href="http://vimawesome.com/">Vim Awesome</a>).</p><h4>Wednesday, January 18th</h4><p>Took a break to finish reading “Extreme Programming Explained.” Wrote some blog posts (<a href="https://medium.com/tech-and-the-city/the-simplest-design-12a2c44ebc5a#.s9b9zdqqm">here</a> and <a href="https://medium.com/tech-and-the-city/lifecycle-of-an-xp-project-aea2bc510f8d#.27duhwft9">here</a>).</p><h4>Thursday, January 19th</h4><p>Mob programmed with Kirby and Byron on the same Rails project! We worked on rebasing various branches and refactoring in both Ruby and JavaScript. Despite their assertions that it would be boring since they weren’t adding new features, it wasn’t. It felt good to be able to contribute throughout the day, and I was able to follow along just fine. 😁 They also did a good job with clarifying their intent. I learned tons of git tricks from these guys.</p><h4>Friday, January 20th</h4><p>(TBD). In the morning, I plan to pairing with Richard on his Clojure tic-tac-toe game. In the afternoon, I’ll be working with Byron on his JavaScript idea.</p><p>This past week, I was focused on being a better pairing partner, one who is helpful and attentive, inquisitive yet respectful. I’m clearly getting a lot of meaningful experiences from pairing with people. I am learning about how people think programmatically, how they approach issues, how they use their tools and Git, etc. It has been helpful for both parties when I actively pay close attention, ask questions, and follow up for clarification (even if to reiterate what your pair has said).</p><p>It’s been challenging oscillating between the larger picture and the smaller task at hand, especially if there is a lot of complexity. Also, I’m acutely aware of how frequent I drink water and need to use the restroom. 😳</p><p>I’ve also been having a better idea of what pairing <em>is</em> and what it <em>isn’t</em>. And while it may seem evident, it surely wasn’t for me. The experience, coupled with reading more about pair programming from “Extreme Programming,” made me realize that the conversation is the crux of communication.</p><blockquote>“Pair programming is a dialog between two people trying to simultaneously program (and analyze and design and test) and understand together how to program better. It is a conversation at many levels, assisted by and focused on a computer.”</blockquote><p>I am highly interested in the dynamics between partners. One of the things that I was anticipating was feeling very inexperienced (and what’s great is that this fear of ____ was addressed by Beck as well). We’re all afraid of embarrassing ourselves, feeling inadequate, and not doing a good job. But this is natural, he insists. I am sure that my next three weeks of pairing will be varied based on the communication style and working style of my partner. I anticipate that personal energy levels throughout the day and external conditions such as deadlines will contribute to the session. But I will do my best to work through them.</p><p>With that in mind, Beck talks about the dynamic between two people from different experience levels. At first, it may seem like a tutoring session with the junior person asking a lot of question and typing not that much. (Sounds about right). However, the junior person will catch little mistakes; the senior person will notice the help. And over time, the junior partner will start to pick up larger patterns and give more substantive feedback. This generalized anecdote provided some semblance of comfort, as it may be the situation that I find myself in; this is what I hope to achieve, either over time or throughout the day.</p><p>Coding is often described as a language, a mechanism to communicate with computers. But I think the opportunity provided by pair programming helps humanize the software development process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bdf14c29e36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/the-pairing-diaries-week-1-3bdf14c29e36">The Pairing Diaries: Week 1</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lifecycle of an XP Project ]]></title>
            <link>https://medium.com/tech-and-the-city/lifecycle-of-an-xp-project-aea2bc510f8d?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/aea2bc510f8d</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 06:45:01 GMT</pubDate>
            <atom:updated>2017-01-20T06:46:10.650Z</atom:updated>
            <content:encoded><![CDATA[<p>As one of the last blog posts on extreme programming, there is so much to unpack about the underlying philosophies behind this methodology. I stand by my previous statement, about how <a href="https://medium.com/tech-and-the-city/on-courage-and-throwing-away-code-c2caef1ab217#.p8ggavxc6">extreme programming strikes me as sensible and human-focused</a>. (Did anyone else find the appendix extremely interesting?).</p><p>To focus less on its controversy and criticism, which is quite abundant on its Wikipedia page, I wanted to recap Kent Beck’s outline of the various stages comprising an XP project. It’s a useful guideline (equipped with emojis) for future projects and will provide you with a sense of your project’s current stage.</p><h3>1. Exploration (Few Weeks — Few Months)</h3><p><strong>Overview:</strong></p><ul><li>The pre-production stage should not be a “comfortable” or “natural” state. After all, you’re not making money!</li><li>To go into production, you have to have enough confidence in your tools and the ability to run the code everyday</li><li>Team members need to trust each other 👯</li><li>Team members need to have or must learn the skills needed 🔨</li></ul><p><strong>Activity:</strong></p><ul><li>Spend a week or two building a system like what will be eventually built, but in 3–4 different ways. Pairs can try the system in different ways and compare.</li><li>Experiment with the performance limits of a technology</li><li>Experiment with architectural ideas</li><li>Customer is writing stories (and expect to give feedback!)</li></ul><p>You’re know when you’re done when the customer is confident there are enough stories to make a good first release and developers are confident they can’t estimate any better.</p><h3>2. Planning (2–6 Months)</h3><p>The purpose of the planning phase is for the customers and programmers to confidently agree on a date by which the smallest, most valuable set of stories will be done.</p><h3>3. Iterations Leading Up to First Release</h3><ul><li>Schedule should be broken into 1 to 4 week iterations (customer/client will produce a set of functional test cases)</li><li>First few stories for the first iteration will require building a skeletal form of the system</li><li>Customer gets to decide stories for subsequent iterations</li><li>Detect deviations from the plan and add/remove stories or change the scope</li></ul><h3>4. Production</h3><ul><li>Conduct one-week iterations</li><li>Do daily standups</li><li>Create a process for certifying the software is ready to go into production</li><li>Apply parallel testing</li><li>Throw a party when the software goes into production 🎉</li></ul><h3>5. Maintenance (Forever, Almost)</h3><p>This should be seen as the “normal” state of an XP project, where you’re working to support new functionality, keep the system running, and handle any incoming/outgoing staff transition.</p><ul><li>Major refactoring, new technology, migrate to newer versions, experiment with architectural ideas, new stories altogether</li><li>Requires more caution given live data and production interruption</li><li>Rotate programmers through various positions to deal with production</li><li>With new team members, 2 to 3 iterations should be dedicated to asking questions, acting as a pairing partner, and reading tests and code before allowing them to take responsibility for a few programming tasks</li></ul><h3>6. Death</h3><ul><li>Customer is happy and does not plan on any new feature 😀</li><li>System is not delivering; customer needs features and they can’t be added economically 😫</li><li>Should be handled with transparency, as in the current team should be aware of the economics of the situation</li><li>End with a fond farewell. Throw a party for everyone who has been involved in the project 🎉</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aea2bc510f8d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/lifecycle-of-an-xp-project-aea2bc510f8d">Lifecycle of an XP Project 🙃</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Simplest Design]]></title>
            <link>https://medium.com/tech-and-the-city/the-simplest-design-12a2c44ebc5a?source=rss----84528ac18e88---4</link>
            <guid isPermaLink="false">https://medium.com/p/12a2c44ebc5a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Malina Tran]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 06:30:54 GMT</pubDate>
            <atom:updated>2017-01-20T06:30:46.590Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>The definition of the best design is the simplest design that runs all the test cases.</blockquote><blockquote>-Kent Beck</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fDsRXNdgdGGZSX7SPFFtMg.jpeg" /><figcaption>A photograph by yours truly.</figcaption></figure><p>While reading “Extreme Programming,” I’m reminded by the concept of the simplest design for a codebase. Thinking about code in this sense — minimalism — is a useful endeavor. I’m a pretty minimalist person (not in the sense that I own exactly 150 items or anything like that). After moving across the country twice, you can bet that I’ve discarded just about everything that <a href="http://tidyingup.com/">does not bring me joy</a>. If you step into my apartment, you’ll notice that nothing is seemingly out of place. Each object belongs in its respective home. During the times when things go haywire, I resume order at the end of the day. In other words, simplicity and purposefulness make sense to me.</p><p>I’m typically interested in conceptual paradigms — in this case, Beck design the design as a “communication medium” wherein the objects and methods represent important concepts. The purpose of the design is to communicate our intent as programmers and to store the logic of the system, which will have many components that will work together. Beck outlines the following constraints in priority order.</p><ol><li>The system, which includes the code and tests, must communicate everything that you want to communicate. (A bit vague).</li><li>The system does not contain duplication. 😳</li><li>The system should have the fewest possible classes.</li><li>The system should have the fewest possible methods.</li></ol><p>This reminds me of previous readings that I have encouraged us to use dependency injection to only communicate what needs to be known. Or to encourage reusability of methods within the code. Removing duplication is not easy — most of the time, I only streamline certain parts of the code when I find myself writing the same thing over and over again. It’s part of the process. You identify the duplication, you eliminate it, and you write code that can be repurposed.</p><blockquote>“You delete everything that doesn’t have a purpose — either a communication purpose or a computational purpose.”</blockquote><p>Also, Beck encourages us to just delete it. This is similar to the notion that we should unabashedly write and eliminate code if it’s not working or non-ideal. But he also bids us to delete things that are utterly useless and think of this process as erasure. For my hosted tic-tac-toe project, I found myself with two extraneous endpoints and logic that either 1) ultimately served no purpose, or 2) could be coupled with logic elsewhere. Perhaps the process of thinking about them and writing out their perceived roles and responsibilities was a helpful exercise in realizing that less is more.</p><p>Codebases get complex — and quickly, too. But may we always remember to be as focused on the beauty of simplicity as much as possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12a2c44ebc5a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-and-the-city/the-simplest-design-12a2c44ebc5a">The Simplest Design</a> was originally published in <a href="https://medium.com/tech-and-the-city">Tech and the City</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>