<?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 Andrew Kouri on Medium]]></title>
        <description><![CDATA[Stories by Andrew Kouri on Medium]]></description>
        <link>https://medium.com/@andrewkouri?source=rss-dae13c0e9333------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ox2tDix5qf4tSnBPcUc59g.png</url>
            <title>Stories by Andrew Kouri on Medium</title>
            <link>https://medium.com/@andrewkouri?source=rss-dae13c0e9333------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:41:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrewkouri/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[Introducing Crowdsourced Pavement Quality Maps]]></title>
            <link>https://medium.com/@andrewkouri/introducing-crowdsourced-pavement-quality-maps-8ddafd15a903?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ddafd15a903</guid>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[construction]]></category>
            <category><![CDATA[government]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 14:01:01 GMT</pubDate>
            <atom:updated>2019-01-10T17:01:17.697Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Lvl5 Releases List of States with Best and Worst Road Quality Based on 5 Million Miles of Payver Driver Data</strong></p><p><em>tl;dr: Michigan has the worst roads in the U.S. while Florida has the best. You can contribute to the ranking database by using the free dashcam app, </em><a href="http://payver.com/"><em>Payver</em></a><em>.</em></p><p>October 30, 2018 — San Francisco, CA — <a href="https://lvl5.ai/">Lvl5</a>, a company that creates HD maps for self-driving cars, today released a list of states with the best and worst road quality. The company captured and analyzed five million miles of driving on U.S. roads and found that Michigan has the worst roads in the country while Florida has the best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*c3NxkzzxvD66AW2ile8uBQ.png" /><figcaption>lvl5 Road Quality By County (Red=Worst; Blue=Best — Note: Some counties did not have enough Payver data to make a significant measurement)</figcaption></figure><p>State and federal governments spend <a href="https://www.bidnet.com/resources/business-insights/us-government-spending-highway-infrastructure-en.jsp">over $400 billion</a> on maintaining and building new roads each year. As US infrastructure deteriorates by the day, taxpayers are left wondering if initiatives such as the White House’s proposed <a href="https://www.washingtonpost.com/news/wonk/wp/2018/03/29/trump-promised-1-5-trillion-in-infrastructure-spending-hes-1-percent-of-the-way-there/?utm_term=.f920e4edbe70">$1.5 trillion infrastructure spending</a> will be used efficiently to bring relief.</p><p>One of the major obstacles cities face in maintaining their roads is that their data is out of date. Cities contract out to firms to map their roads using LiDAR, which is both expensive and slow. Many cities, including Los Angeles, only receive this data once per year, meaning the city depends on months-old data to fix roads today. Lvl5 aims to help cities more efficiently maintain their roads by giving them up-to-date data that enables them to quickly identify road problems (e.g. crack in a road) before they become larger and more expensive issues (e.g. a pothole).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rotIOXlLxc1kINyl1a2dbQ.png" /></figure><p>Lvl5 captures hundreds of thousands of miles of video data every month through their iPhone dashcam app, <a href="https://www.getpayver.com/">Payver</a>. The app pays users up to $0.05 per mile to record their driving using their cell phone. The company is already working with many Uber and Lyft drivers across the US who run the dashcam app throughout the day. As cars are driving around, they are “vacuuming” up data about the roads. The company then uses its computer vision algorithm to translate that crowdsourced footage into maps which rate road quality and show cities where problems exist.</p><p><strong>Methodology</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*t1agF5Bm55JCNXQtSvazOQ.gif" /><figcaption>lvl5’s deep learning algorithm assigns pavement condition scores for every image captured</figcaption></figure><p>The country-wide dataset spans over five million miles of Payver driving data from the last year. The methodology for ranking these videos included randomly selecting video frames from the videos (in total, 15 million frames sampled), and excluding all but the surface of the road from predictions by a neural network. Their neural network measures quality in four distinct areas: road paint fading, pavement cracking, potholes, and surface flatness. The data was normalized by frame density, and filtered to remove areas with not enough data.</p><p>The company also analyzed if higher gasoline taxes or higher spending on construction impacted road quality, and found no correlation for either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B5f57ZqG7bUEr5rq" /><figcaption>State Gasoline Tax vs. Road Quality (No Correlation)</figcaption></figure><h4>How to Obtain Road Quality Data For Your City</h4><p>Please contact lvl5 sales: sales@lvl5.ai, lvl5 is happy to demo the technology in your area.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ddafd15a903" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing lvl5 RoadDelta: “git diff for maps”]]></title>
            <link>https://medium.com/@andrewkouri/introducing-lvl5-roaddelta-git-diff-for-maps-168b4c429a16?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/168b4c429a16</guid>
            <category><![CDATA[vision]]></category>
            <category><![CDATA[cartography]]></category>
            <category><![CDATA[smart-cities]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Fri, 03 Aug 2018 18:07:47 GMT</pubDate>
            <atom:updated>2018-08-03T18:07:47.871Z</atom:updated>
            <content:encoded><![CDATA[<p>When Christopher Columbus set sail August 3rd, 1492, he did so with a map that incorrectly assumed a much smaller circumference of the earth. As he landed in the Bahamas from Spain, he was likely convinced that Japan was not much farther east. We know now that his map was incomplete; no maps of the day had yet incorporated the American landmass. To the world’s surprise, Columbus was a continent and an ocean away from reaching the riches of the Far East.</p><p>Today, exactly five hundred and twenty six years later, cartographers are still largely solving the same two problems: First, <strong>mapping undiscovered places</strong>, and second, <strong>keeping maps of those places updated</strong>.</p><p>Thanks to technological progress since the Nina, Pinta, and Santa Maria, we can confidently say that there are no longer any landmasses that have been left unmapped on earth; however, map coverage with centimeter precision is still nascent. <a href="http://www.lvl5.ai/">lvl5</a> has pioneered computer vision technology that allows anybody to help map out roads to decimeter resolution. Today, lvl5 has the largest vectorized centimeter map coverage of any map company worldwide, with over 500,000 miles of mapped roads.</p><p>The second challenge mapmakers face is keeping their works updated. Landmasses might not change too quickly, but on today’s urban roads <strong>the</strong> <strong>environment is changing every minute of every hour </strong>— construction cones are deployed, traffic signs are toppled, and bike lanes are added.</p><p>Today, lvl5 is releasing RoadDelta, the world’s first API for tracking these surface-level road changes in near real-time. <strong>RoadDelta allows engineers and data scientists to monitor specific areas of the world for changes in the environment with unparalleled decimeter accuracy.</strong> One can draw a bounding box, and lvl5 will fire a callback when any of these events happens:</p><ul><li>Sign added / removed</li><li>Traffic light added / removed</li><li>Lane line repainted</li><li>Road resurfaced</li><li>Construction Cone Deployed</li><li>Construction Equipment Deployed</li><li>Drivable space modification</li><li>Road closures</li></ul><p>Lvl5 RoadDelta is backed by a fleet of over 10,000 <a href="http://www.getpayver.com/">Payver</a> drivers. Combined with proprietary deep learning algorithms to reduce false positive detections, lvl5 automatically detects the changes in the environment from video footage. This allows lvl5 to offer the world’s first “git diff for maps” service at reasonable costs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*C1itoXAMqJ3O22YRlubJ9Q.png" /></figure><p><a href="http://docs.lvl5.ai/">API</a> usage is billed per square meter, per day. Developers may request callbacks on new changes or view historical changes using the <a href="http://docs.lvl5.ai/">REST endpoints</a>, supplying a polygonal region of interest (GeoJSON).</p><p>Currently the service is available in San Francisco, and US-101 between San Francisco and San Jose. As the Payver fleet expands, lvl5 will be quickly adding more coverage areas.</p><p>lvl5 is opening up early access to RoadDelta for any companies interested in trying the product. <a href="https://lvl5.typeform.com/to/kh6arB">Submit this form to get an API key</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=168b4c429a16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where Self-Driving Cars Fall Short, and How We Can Make Them Safer]]></title>
            <link>https://medium.com/lvl5/where-self-driving-cars-fall-short-and-how-we-can-make-them-safer-aa59dc84a624?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa59dc84a624</guid>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[autonomous-cars]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[mapping]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Fri, 13 Apr 2018 13:01:01 GMT</pubDate>
            <atom:updated>2018-04-19T18:28:41.696Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*cdsG_p2fWdc9Jlym5qWuFg.gif" /><figcaption>lvl5 deep-learned lane detection (blue), combined with “virtual lanes” from our HD map + localization (green) on 101S in Mountain View</figcaption></figure><p>Recent fatalities involving autonomous vehicles demonstrate that we, as an industry, still have work to do to make self-driving safe. It is debatable whether or not autonomous vehicles currently cause fewer fatalities per mile than human drivers. Regardless, we are insisting that the bar be set higher: Unlike human drivers, electronic systems can benefit from sensor redundancy, which should make these systems safer — yet few companies are taking full advantage of this opportunity. Redundancy is critical in any system where the driver isn’t in full control of the vehicle, and HD maps are one of the best forms of sensor redundancy available today. We believe that one day autonomous vehicles have the potential to be orders of magnitude safer than human drivers. We want to expedite the arrival of that day.</p><p>In a semi-autonomous vehicle crash in Mountain View last month, we found that it is possible the vehicle could have misinterpreted the right lane line (of the diverging lane) as the left lane and steered itself into the barrier. In Tempe, AZ, where an Uber autonomous vehicle struck and killed a pedestrian, better maps integration would have allowed the vehicle to accurately filter the pedestrian from random sensor noise. In both cases, tight integration with an accurate map would have certainly prevented or mitigated the severity of these tragedies.</p><p>After investigating the site of the Mountain View crash, we found that there are a number of particularly challenging factors that might confound an autonomous vehicle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDh5riiqifE-PAyk7g7l5g.png" /><figcaption><a href="http://getpayver.com/">Payver</a> footage — Lane paint near crash site in August, 2017</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfuKzVXtUjbLYt84_qHcwA.png" /><figcaption><a href="http://getpayver.com/">Payver</a> footage — Lane paint 1 week before crash in March, 2018</figcaption></figure><p>First, the faded lane markings are problematic for any system that relies heavily on real-time detection of the lane markings. As you can see from the video at the top of this page, even our own deep-learned, real-time lane line detection is flaky at this point, which could be the case for OEMs as well. We have been collecting video data near the crash site for over a year, and have over 1,000 video traces of the area collected throughout time. Change detection on the video footage has shown that the markings are subject to extreme wear and fading — and even though the markings are occasionally repainted, they quickly wear down.</p><p>Second, we found that Caltrans placed a temporary barrier in front of the crash attenuator two days before the March 23rd accident. In our map, both the “bumble bee” hazard placard on the crash attenuator and the temporary traffic control barrier are present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sdSWhrRUp0VMtSo-sK7TdQ.png" /><figcaption><a href="http://getpayver.com/">Payver</a> — March 21, ’18 — Plastic Temporary Traffic Barrier occludes metal “bumble bee” hazard placard.</figcaption></figure><p>Matching these objects from the map with what the vehicle sees from its sensors in real time allows the vehicle to determine what is an abnormality. Sensors including RADAR and cameras are prone to false positive detections (seeing something when indeed nothing relevant is present), which necessitates car manufacturers tuning down their response actuations (otherwise the car would be slamming on the brakes all the time). <strong>With an up-to-date HD map, these common false positive areas can be filtered and the response actuation threshold can remain high.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x_Es6ajWMhluqBqoG3JK-g.gif" /></figure><p>You can see that the objects around the crash site changed on a day-to-day basis; the attenuator was in tact March 10, crumpled on March 12, cones and a temporary traffic control barrier were placed before March 21, and the accordion was restored sometime before the 26th. <strong>These changes highlight the importance of a daily, if not hourly, refresh rate on the map</strong>. Simplistically, if an out-of-date map clues the radar to expect a bright metal placard, but a plastic traffic control barrier attenuates that radar signal, the vehicle may believe that the path ahead is clear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRpu4Rux4xNAr0n3AYUm1g.png" /><figcaption>Noisy GPS Data from Payver Trips on the 101S-85 interchange</figcaption></figure><p>Finally, because the HOV interchange where the crash occurred is a relatively complex area, unfiltered GPS traces show a high level of ambiguity, meaning OEMs cannot rely on GPS alone when following a map. To properly utilize an HD map, the vehicle must localize itself using other locally static features in the environment. Our system, for example, uses features including signs, barriers, and other lanes to perform localization. As the road environment changes, these features need to be updated in the map. This is why we place such a high value on collecting data on a daily basis.</p><p>Once localized in a map, self-driving algorithms can see “virtual lane lines” that are used to sanity-check the real-time detections and provide more confidence for the autonomous vehicle to brake in an anomalous situation. These <strong>virtual lane lines are available during rainy, dark, or otherwise low-visibility situations where a camera-based system would fail </strong>— including when the paint on the road wears.</p><p>Relative to the cost of hardware such as LiDAR, maps are incredibly inexpensive. They can also be <strong>deployed to fleets via over-the-air</strong> software updates so <strong>we don’t need to wait</strong> years to have them implemented in our vehicles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*oOMbFuW10QYmHszf3Qkh7A.gif" /><figcaption>lvl5 computer vision (without camera fine-tuning) detects the pedestrian and her bicycle. Our semantic segmentation dataset spans millions of miles of diverse driving conditions.</figcaption></figure><p>We also have over 5 million miles of <a href="https://lvl5.ai/data.html">semantically labeled data</a> for pedestrians, lanes, roads, barriers and medians from around the world. We believe that this dataset can help improve existing computer-vision-based object detection algorithms. Our goal is to make incremental improvements, deploying our technology in autonomous vehicles as soon as it can enhance the driving experience. We can help reduce the number of fatal accidents today — not in 3 years. You can read more about our mission <a href="https://lvl5.ai/our-mission.html">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa59dc84a624" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lvl5/where-self-driving-cars-fall-short-and-how-we-can-make-them-safer-aa59dc84a624">Where Self-Driving Cars Fall Short, and How We Can Make Them Safer</a> was originally published in <a href="https://medium.com/lvl5">lvl5</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Startups Aren’t Hiring You]]></title>
            <link>https://medium.com/@andrewkouri/why-startups-arent-hiring-you-822b2932d1c2?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/822b2932d1c2</guid>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Sat, 30 Dec 2017 20:13:55 GMT</pubDate>
            <atom:updated>2017-12-30T20:17:53.245Z</atom:updated>
            <content:encoded><![CDATA[<p>As a fresh college grad searching for a software engineering role, I quickly became disheartened with all the rejection I was receiving interviewing at tons of companies while all my peers already received offers from “top” firms in Silicon Valley.</p><p>I probably applied to 100+ companies: Most I received no response from, some had phone screens which went nowhere, and some had coding challenges that I failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*_VI9uWouG3GpgQVS38xoXA.jpeg" /></figure><p>I wish I knew then what I know now about how job applications and interviews work at these small companies.</p><p>Over the last six months, I’ve interviewed hundreds of candidates for engineering roles at <a href="http://www.lvl5.ai/">lvl5</a>. In this article, I’m going to share what I’ve learned from being on the other side of the interviewing table. I will also reveal what happens behind the scenes at a small company when you submit a resume (and sometimes never hear back). After reading this post you will know what it takes to nail the interview process at most tech companies in Silicon Valley.</p><h4>The Application Process</h4><p>Most interviews start with a phone screen or a small coding challenge. At lvl5, we require all candidates to take a fairly lightweight coding challenge. This saves both the candidate and us time because candidates who cannot solve our “fizzbuzz”-type coding challenge simply aren’t qualified for the much harder technical problems we have to solve on a daily basis.</p><p>If you are struggling to pass these timed coding challenges, the only remedy is more experience. Take up projects outside of work/class and find a forgiving language, like Python, that you can master. This post won’t help you improve technically.</p><p>The next step in the application process is typically a short conversation on the phone — a “phone screen.” I’m generally a pretty easy-going guy so <strong>I thought I was naturally an ace and obviously didn’t need to prepare.</strong></p><p>Don’t fall into this trap like I did! At lvl5 we weed out the most candidates at this stage. Typically only 1 in 4 candidates pass the phone screen.</p><h4>The Phone Screen</h4><p>The interviewer in a phone screen typically has 15 minutes to decide whether or not you’d be a fit at the company. Even though it’s such a short call, you need to spend time preparing — <em>for each company</em>.</p><p>Here are the <strong>three most-common mistakes</strong> I see candidates making during phone screens.</p><blockquote>1. Not knowing what the company does</blockquote><blockquote>2. Not being excited about joining the team</blockquote><blockquote>3. Failing to craft a compelling pitch demonstrating how you would help achieve the company’s mission.</blockquote><p><strong>The first mistake</strong> isn’t as obvious as it may seem. For example, most candidates know that lvl5 “builds maps for self-driving cars,” but don’t know why or what these maps are used for. <strong>You should know everything you can about the product. </strong>Who buys it? Why do they buy it? How is it made? What competition exists? How is it different from the competition’s offering? What is it typically used for? What technologies are likely used to build it? What other products could the company build next?</p><p>Don’t just read about the company on their website; look at press coverage, talk to people in the industry, read about the company mission, try out the product… I promise it won’t take that long.</p><p><strong>The second mistake</strong>, not being excited about joining the team, isn’t something you can fake. After interviewing hundreds of candidates, most professional interviewers realize that everybody has a different communication style. Some people are vivacious and energetic, while others are just naturally monotonic. We can see through this to understand real excitement about our vision and team.</p><p>When I ask most people why they want to work at lvl5, they say, “idk, I think the self-driving industry is really cool.” Great, but <em>who doesn’t!? </em>Also there are plenty of companies working on different parts of the self-driving stack, so what in particular compels you to work on our team?</p><p>Consider this — do you want the role so badly that you would actually take a pay cut to join? Don’t waste time spraying hundreds of applications to many companies that you don’t care about; find a few that you’re really passionate about and <em>persist</em>.</p><p><strong>The third mistake</strong> you <em>can</em> fix by spending a little time preparing. A phone screen isn’t just an opportunity for the company to hear you restate what’s already on your resume. You need to spend time crafting your pitch (which should be semi-bespoke for each company to which you apply). Here’s why:</p><p>As pitiless as it sounds, the boolean condition determining whether or not you get (and stay) hired is: <strong>Accounting for all risks and costs, will this candidate make the company money?</strong></p><p>“Risks” come in different forms — for example, if your prior experience isn’t totally relevant to what the company is currently working on, what is the risk that you won’t be effective or qualified to getting your work done on time. Or, given your employment history, how likely are you to bounce from the company during a critical moment?</p><p>Your job during the phone screen is to convince the interviewer that you have the skills necessary to build a product that makes (or saves) the company money. The most surefire way to do this is to talk about <em>relevant </em>skills you’ve gained by experience on previous projects.</p><p>Put yourself in the shoes of someone who is already working there. What challenges does this company have? How are you equipped to fix them? What relevant problems have you solved before that would help solve these?</p><p>Find a way to answer these three questions and the conversation will drive itself naturally.</p><p>These aren’t gimmicks guaranteed to land you a dream job — just tips to differentiate yourself, especially at the top of the hiring funnel. I hope they help you find a great career.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=822b2932d1c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Manage Your Context Switches to be More Productive]]></title>
            <link>https://medium.com/andrewkouri/manage-your-context-switches-to-be-more-productive-7cbbe8d6ae69?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cbbe8d6ae69</guid>
            <category><![CDATA[thoughts]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Wed, 17 May 2017 17:21:33 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:29.218Z</atom:updated>
            <content:encoded><![CDATA[<p>You’re in the middle of patching a bug, and a colleague taps you on the shoulder asking for your opinion on something. We’ve all been in this position. Whether or not you’re a programmer, this situation happens all the time — a phone call interrupts our planning session, a push notification distracts you from finishing your report — and it’s highly destructive to your throughput as a worker.</p><p>I decided to share some techniques I’ve started to employ that have really worked for me. I’ll start with ways to avoid distractions in the first place, and then go over what to do in the event that a context switch is inevitable.</p><p><strong>1. Turn off all non-essential push notifications</strong><br>What is an essential push notification? It depends on your engagement level with the rest of the world, but for me it’s limited to just SMS messages. Instagram, GMail, Snapchat, FB messenger (which I don’t use)… shut ’em all off.</p><p><strong>2. Batch tasks (like email) into pre-defined chunks</strong></p><p>For mindless tasks like email, I typically tend to reserve a part of my least productive hour: 4–5pm. I only check and respond to email during this allotment. Only coding gets my precious morning hours, when I’m most alert. Make sure your pre-defined time allotment has a end time. Set a countdown timer. You can even use Siri:</p><p>“Hey Siri, set a countdown timer for 30 minutes.”<br> “Okay, 30 minutes and counting!”</p><p>Great — now you have a defined end to a task that used to interweave itself into your whole day.</p><p><strong>2. Work in DND (Do not Disturb) for at least 4 hours each day</strong></p><p>Both your Mac and iPhone can be configured to run in DND mode. It doesn’t necessarily have to be 4 hours, but try experimenting for what works best for you. For me, I set a goal of a number of tickets I want to accomplish before allowing myself to be “disturbed.”</p><p><strong>3. Be choosy about the music you listen to while working</strong><br>Everybody is different, but we share about 99.9% of the same DNA. And study after study has shown that music with lyrics is distracting for human beings who are doing cognitively intensive tasks such as coding. For me, headphones are often necessary to escape the sounds of workplace like the clacking of keyboards and sniffling, but instead of listening to music, often I choose the ambient <a href="http://coffitivity.com/">sound of a coffee shop</a>. To the Spotify/Pandora streamers out there: Pay for the darn subscription plan so you aren’t subject to distracting ads.</p><p><strong>4. Buy a pen &amp; paper notepad<br></strong>They can be purchased at any office store for $0.99. Use this as your scratch buffer for things that need to be done throughout the day. Never do something as soon as it comes up. Here’s an example: let’s say I think of a new feature that needs to be implemented…. rather than signing into Jira and filing the tickets right away, I just put a 5-word reminder on my scratchpad which I can then reference when I go to do Jira tickets in batch at the end of the day. Same thing with email — don’t send that email right away… put a note on the scratchpad and wait until your dedicated email batch time allotment to write the full draft.</p><p><strong>5. Don’t get dragged into non-problems<br></strong>Engineers in particular love to solve everybody else’s problems but their own. I’m no exception. I hear about some intern using a c4.8xlarge to run a webserver, and I immediately stop what I’m doing to optimize our EC2 allocations. That tangent then turns into a sweeping overhaul of the company’s AWS spot-pricing and IAM strategy.</p><p>In part 2/2 I’ll go over how to save your state in the event that you have to switch contexts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cbbe8d6ae69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/manage-your-context-switches-to-be-more-productive-7cbbe8d6ae69">Manage Your Context Switches to be More Productive</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift 3 Extension to UIImage to quickly retrieve image from a URL]]></title>
            <link>https://medium.com/andrewkouri/swift-3-extension-to-uiimage-to-quickly-retrieve-image-from-a-url-280a041199e1?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/280a041199e1</guid>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Fri, 03 Feb 2017 18:55:34 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:27.234Z</atom:updated>
            <content:encoded><![CDATA[<p>I spent too long looking for a quick, non-deprecated solution to this simple problem this morning. Here’s what I came up with. Maybe it will save you a few minutes of searching. This is valid for Swift 3.</p><p>Since I have tableViewCells that need to set images from a URL string, I figured it would be best to make an extension that could be called on the cell configuration:</p><p>The extension:</p><pre>extension UIImageView {<br>    public func image(fromUrl urlString: String) {<br>        guard let url = URL(string: urlString) else {<br>            log.warning(&quot;Couldn&#39;t create URL from \(urlString)&quot;)<br>            return<br>        }<br>        let theTask = URLSession.shared.dataTask(with: url) {<br>            data, response, error in<br>            if let response = data {<br>                DispatchQueue.main.async {<br>                    self.image = UIImage(data: response)<br>                }<br>            }<br>        }<br>        theTask.resume()<br>    }<br>}</pre><p>Usage is a one-liner</p><pre>cell.productImage.image(fromUrl: order.product.imageUrl)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=280a041199e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/swift-3-extension-to-uiimage-to-quickly-retrieve-image-from-a-url-280a041199e1">Swift 3 Extension to UIImage to quickly retrieve image from a URL</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turn off iMessage link previews in iOS 10+]]></title>
            <link>https://medium.com/andrewkouri/turn-off-imessage-link-previews-in-ios-10-190feac51969?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/190feac51969</guid>
            <category><![CDATA[thoughts]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Sun, 02 Oct 2016 15:51:44 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:29.207Z</atom:updated>
            <content:encoded><![CDATA[<p>There is currently no way to turn off link previews in iOS 10. This “feature” is a half-baked attempt to add slack-like features, where GIFs, YouTube links, pictures, etc show up in-line in your iMessage conversation thread. I really wish Apple would have added a way to turn this off because it slows down the interface on my older iPhone 6, and also presents a <a href="https://protoxin.net/imessage-preview-forging-research-update-1/">security</a>/privacy risk. If I don’t accept the privacy policy of a website, I used to have the choice to not click on the link go to that website. Further, by going to that site, I reveal all sorts of information including my IP (and possibly even my location). With iOS 10, the messages app does this automatically, whether you wanted to load an image (on cell data) or not.</p><p>There is a way that you can turn off this “feature” when you’re sending links to people: Don’t put the link as the first thing in the message… I use the “.” character to disable this on links that I send. You can (and should) also send a <a href="http://www.apple.com/feedback/iphone.html">feedback report</a> to Apple asking them to add in a user setting to disable the “feature.”</p><p>I did:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=190feac51969" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/turn-off-imessage-link-previews-in-ios-10-190feac51969">Turn off iMessage link previews in iOS 10+</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging MongoDB’s 2dsphere geoIndex]]></title>
            <link>https://medium.com/andrewkouri/debugging-mongodbs-2dsphere-geoindex-d38a8f716d89?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/d38a8f716d89</guid>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Tue, 29 Sep 2015 17:53:57 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:37.352Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first learned about MongoDB’s geospatial capabilities similar to PostGIS, I was beyond excited because it meant I would not have to write helper functions to find data along geohash borders. Currently my data is indexed by geohash, which has great ordering properties, but is a little unwieldy for the “find me x near y”-type queries.</p><p>Unfortunately, it seems as though the 2dsphere index doesn’t cover geoWithin queries. As my collection of geoJSON documents grew from GBs to TBs, I noticed my tools taking extraordinary amounts of time to perform <em>find</em> queries, which caused me to investigate what was happening under the hood.</p><p>First, I double-checked that my geospatial index was present:</p><pre>mongos&gt; db.my_collection.getIndexes()<br>[<br>	{<br>		&quot;v&quot; : 1,<br>		&quot;key&quot; : {<br>			&quot;_id&quot; : 1<br>		},<br>		&quot;name&quot; : &quot;_id_&quot;,<br>		&quot;ns&quot; : &quot;telemetry.********&quot;<br>	},<br>	{<br>		&quot;v&quot; : 1,<br>		&quot;key&quot; : {<br>			&quot;value.avg_location&quot; : &quot;2dsphere&quot;<br>		},<br>		&quot;name&quot; : &quot;geoindex&quot;,<br>		&quot;ns&quot; : &quot;telemetry.*******&quot;,<br>		&quot;2dsphereIndexVersion&quot; : 2<br>	}<br>]</pre><p>So, the index was clearly there. I also verified that its size was appropriate — it was around 50mb, which seemed fine for this amount of test data.</p><p>Next, I ran .explain() on a query to see if it was hitting the index:</p><pre>var query = {<br>    &quot;value.avg_location&quot;: {<br>        &quot;$geoWithin&quot;: {<br>            &quot;$polygon&quot;: [<br>                [-122.07496047019957,<br>                    37.65882781135178<br>                ],<br>                [-122.07496047019957,<br>                    37.663906822384874<br>                ],<br>                [-122.0871913433075,<br>                    37.663906822384874<br>                ],<br>                [-122.0871913433075,<br>                    37.65882781135178<br>                ],<br>                [-122.07496047019957,<br>                    37.65882781135178<br>                ]<br>            ]<br>        }<br>    }<br>};<br>db.my_collection.find(query).explain(&quot;executionStats&quot;);</pre><p>Nope:</p><pre>&quot;winningPlan&quot; : {<br>	&quot;stage&quot; : &quot;COLLSCAN&quot;,<br>	&quot;filter&quot; : {<br>		&quot;value.avg_location&quot; : {<br>			&quot;$geoWithin&quot; : {<br>				&quot;$polygon&quot; : [<br>					[<br>						-122.07496047019957,<br>						37.65882781135178<br>					],<br>					[<br>						-122.07496047019957,<br>						37.663906822384874<br>					],<br>					[<br>						-122.0871913433075,<br>						37.663906822384874<br>					],<br>					[<br>						-122.0871913433075,<br>						37.65882781135178<br>					],<br>					[<br>						-122.07496047019957,<br>						37.65882781135178<br>					]<br>				]<br>			}<br>		}<br>	},<br>	&quot;direction&quot; : &quot;forward&quot;<br>},<br>&quot;rejectedPlans&quot; : [ ]</pre><pre>&quot;executionStats&quot; : {<br>	&quot;nReturned&quot; : 164,<br>	&quot;executionTimeMillis&quot; : 341340,<br>	&quot;totalKeysExamined&quot; : 0,<br>	&quot;totalDocsExamined&quot; : 10760184,<br>	&quot;executionStages&quot; : {<br>		&quot;stage&quot; : &quot;SINGLE_SHARD&quot;,<br>		&quot;nReturned&quot; : 164,<br>		&quot;executionTimeMillis&quot; : 341340,<br>		&quot;totalKeysExamined&quot; : 0,<br>		&quot;totalDocsExamined&quot; : 10760184,<br>		&quot;totalChildMillis&quot; : NumberLong(341334),<br>		&quot;shards&quot; : [<br>			{<br>				&quot;shardName&quot; : &quot;rs0&quot;,<br>				&quot;executionSuccess&quot; : true,<br>				&quot;executionStages&quot; : {<br>					&quot;stage&quot; : &quot;COLLSCAN&quot;,<br>					&quot;filter&quot; : {<br>                                           ....<br>					},<br>					&quot;nReturned&quot; : 164,<br>					&quot;executionTimeMillisEstimate&quot; : 334786,<br>					&quot;works&quot; : 10760186,<br>					&quot;advanced&quot; : 164,<br>					&quot;needTime&quot; : 10760021,<br>					&quot;needFetch&quot; : 0,<br>					&quot;saveState&quot; : 84076,<br>					&quot;restoreState&quot; : 84076,<br>					&quot;isEOF&quot; : 1,<br>					&quot;invalidates&quot; : 0,<br>					&quot;direction&quot; : &quot;forward&quot;,<br>					&quot;docsExamined&quot; : 10760184<br>				}<br>			}<br>		]<br>	}<br>},<br>&quot;ok&quot; : 1</pre><p>So, from the “stage” param COLLSCAN, we can clearly see it’s doing a collection scan to find the documents. We want it to say something like “IXSCAN” to indicate that it’s using the index.</p><p>I tried deleting and rebuilding the index:</p><pre>mongos&gt; db.mycoll.dropIndex(&quot;geoindex&quot;)<br>true<br>mongos&gt; db.mycoll.createIndex({&quot;value.avg_location&quot; : &quot;2dsphere&quot; }, {name: &quot;geoindex&quot;});<br>mongos&gt;</pre><p>Still, <em>no dice</em>!</p><p>Okay, well Mongo’s docs says that the most efficient queries will query on AND return only the indexed fields. So, I tried limiting (“projecting” in Mongo-parlance) the query to just return the “value.avg_location” field, but we ended up still doing a “COLLSCAN.”</p><p><strong>UPDATE: I ended up fixing this by re-structuring the query. It turns out the original syntax I used for the polygon query is the older syntax, which doesn’t hit the index. The newer syntax looks like this:</strong></p><pre>{<br>  &quot;location&quot;: {<br>    $geoWithin: {<br>      $geometry: {<br>        type: &quot;Polygon&quot;,<br>        coordinates: [ [ &lt;the coords&gt; ] ]<br>      }<br>    }<br>  }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d38a8f716d89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/debugging-mongodbs-2dsphere-geoindex-d38a8f716d89">Debugging MongoDB’s 2dsphere geoIndex</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift 1.2 and Facebook’s New Login SDK]]></title>
            <link>https://medium.com/andrewkouri/swift-1-2-and-facebooks-new-login-sdk-bc4f161108a1?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc4f161108a1</guid>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Wed, 20 May 2015 14:51:52 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:33.148Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve had the pleasure of working with Apple’s new Swift over the last few months, and recently ran into some problems integrating Facebook’s API with an iOS 8 app I’m building.</p><p>The problem I was having is that, immediately after login, I couldn’t seem to get the user’s access token.</p><pre>FBSDKAccessToken.currentAccessToken()</pre><p>was always returning nil, even with the user logged in.</p><p>You need to get this token so that you can send it to your Rails app (or whatever you’re using on the back end) and perform Facebook authentication on behalf of your user up there.</p><p>My viewDidLoad looked like this:</p><pre>override func viewDidLoad() {<br>    super.viewDidLoad()<br>    // Do any additional setup after loading the view, typically from a nib.<br>    println(FBSDKAccessToken.currentAccessToken()) //prints nil</pre><pre>if (FBSDKAccessToken.currentAccessToken() != nil)<br>    {<br>        // User is already logged in, do work such as go to next view controller.<br>        println(&quot;this never prints&quot;)<br>        self.generateAPILoginDetails()<br>    }<br>    else<br>    {<br>        let loginView : FBSDKLoginButton = FBSDKLoginButton()<br>        self.view.addSubview(loginView)<br>        loginView.center = self.view.center<br>        loginView.readPermissions = [&quot;public_profile&quot;, &quot;email&quot;, &quot;user_friends&quot;]<br>        loginView.delegate = self<br>    }<br>}<br>I used Brian Coleman&#39;s helpful tutorial to get started, but it must not be updated for the latest SDK, because I followed it to a T and was definitely not getting the token.  Here&#39;s what I needed to change:</pre><pre>//added the following line in my viewDidLoad <br>FBSDKProfile.enableUpdatesOnAccessTokenChange(true)</pre><pre>Created a callback function to handle the updating of the FBSDKAccessToken state:</pre><pre>// in a LoginViewController.swift<br>    func onTokenUpdated(notification: NSNotification) {<br>        println(FBSDKProfile.currentProfile().name)<br>        if ((FBSDKAccessToken.currentAccessToken()) != nil) {<br>            println(&quot;token is not nil &quot;)<br>        } else {<br>            println(&quot;token is nil&quot;)<br>        }<br>    }</pre><pre>finally, in my viewDidLoad function, I added:</pre><pre>NSNotificationCenter.defaultCenter().addObserver(self, selector: &quot;onProfileUpdated:&quot;, name:FBSDKAccessTokenDidChangeNotification, object: nil)</pre><pre>And this did it! Hope this helps you! Leave a comment if you have any questions.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc4f161108a1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/swift-1-2-and-facebooks-new-login-sdk-bc4f161108a1">Swift 1.2 and Facebook’s New Login SDK</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project: Automated Lawn Room]]></title>
            <link>https://medium.com/andrewkouri/project-automated-lawn-room-ac07ae340475?source=rss-dae13c0e9333------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac07ae340475</guid>
            <category><![CDATA[webwork]]></category>
            <category><![CDATA[adventure]]></category>
            <dc:creator><![CDATA[Andrew Kouri]]></dc:creator>
            <pubDate>Wed, 13 Nov 2013 05:08:22 GMT</pubDate>
            <atom:updated>2017-12-29T05:10:22.241Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently finished creating a <a href="http://www.andrewkouri.com/fortyfour/live/Users">3D-printed, Raspberry-Pi-powered, Twilio-backed lock</a> for one of the oldest rooms in Charlottesville. The goal? To allow my friends anytime access to my space on <a href="http://en.wikipedia.org/wiki/The_Lawn">the Lawn</a> while simultaneously staying secure.</p><p>I was originally going to grant access to all of my Facebook friends (the Raspberry Pi would use Facebook’s API to check who my friends were), but thought that it might be less chaotic to design my own registration system, so that I can easily control when individual users are permitted to enter my room.</p><p>Challenges:</p><ol><li>Not destroying a UNESCO World Heritage Site</li><li>Designing/Printing a container and transmission to adapt a servo motor to the existing door lock.</li><li>No existing “Instructables” for this project (or pieces of it therein)</li><li>Learning how to make the Arduino talk to the Raspberry Pi</li><li>Getting through the University’s draconian firewall to Twilio. (ended up using a few servers as mirrors to get there)</li><li>Allowing manual override for maintenance workers who occasionally let themselves in.</li></ol><p>Here’s a video I submitted to the Engineering Student Council as part of a contest. (The second half shows how it works)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FStftE33rQd0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DStftE33rQd0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FStftE33rQd0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccd412ee824d954f7b634a87c34add64/href">https://medium.com/media/ccd412ee824d954f7b634a87c34add64/href</a></iframe><p>Update: Some new features!</p><p>I’ve been working on a few new features to make my room more intelligent. One of the features will save electricity by turning lights on only when there are people in the room, and turning them off automatically when the visitors leave. Another new feature sends me a text with a picture of the visitor who entered the room. Finally, I’ve created a lockdown mode so that I can go on vacation without worrying about what will happen to my room when I’m out of town for a weekend.</p><p>[caption id=”attachment_516&quot; align=”aligncenter” width=”300&quot;]</p><p>Calling a method I wrote to control the lights in my room via DMX protocol by way of the Raspberry Pi.[/caption]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac07ae340475" width="1" height="1" alt=""><hr><p><a href="https://medium.com/andrewkouri/project-automated-lawn-room-ac07ae340475">Project: Automated Lawn Room</a> was originally published in <a href="https://medium.com/andrewkouri">andrewkouri</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>