<?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 Heather Arthur on Medium]]></title>
        <description><![CDATA[Stories by Heather Arthur on Medium]]></description>
        <link>https://medium.com/@heathermoor?source=rss-9525fc61191f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4EXBNz_mLpShoFiRUMOU7Q.png</url>
            <title>Stories by Heather Arthur on Medium</title>
            <link>https://medium.com/@heathermoor?source=rss-9525fc61191f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:33:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@heathermoor/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[NYPFL]]></title>
            <link>https://heathermoor.medium.com/nypfl-f3cf238498c5?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3cf238498c5</guid>
            <category><![CDATA[postpartum]]></category>
            <category><![CDATA[maternity-leave]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 00:37:07 GMT</pubDate>
            <atom:updated>2026-08-25T13:05:44.257Z</atom:updated>
            <content:encoded><![CDATA[<h4>A maternity leave story</h4><p>I’m coming up on the end of my maternity leave. 4.5 months of hauling our huge baby around our tiny NYC apartment all day, from the end of summer one fine Labor Day weekend, to the sharpest icicle point of winter, our baby’s nose peaking out of a cloud of polyester in his stroller.</p><p>One month after the birth of our baby, my partner went back to work. That first week was the longest week of my life. We hadn’t yet figured out that sometimes when the baby was screaming, it was because he was tired, not because he was hungry/thirsty. So, he spent a good part of the day screaming at the bottle in his face, and with me feeling really bad for him.</p><p>At the first baby meetup I went to, though, he lounged around peacefully in my lap as the wind from the East River rustled his little yellow sun hat. The other moms exclaimed what a calm and chill baby I had! Not wanting to make them genuinely jealous, I tried explaining our scream-eating sessions to them.</p><p>Previously, a watch of Fleichman is in Trouble had made me anxious about neighborhood mom groups (even more anxious than I already would have been). The protagonist had been in a new-mom group, perhaps from a prenatal yoga class, and one day she encounters the other moms strolling together in Central Park without her, casting her aside.</p><p>When I contemplated parenthood, I worried about how out of place I would feel. I’m nerdy and introverted. It seemed like all the parents I knew were confident and maybe I would say “normie”? (but I don’t say that in a disparaging way). To think about it gave me a shrinking feeling, so similar to what I felt being a girl walking into a full computer science lecture hall in college.</p><p>But, talking to other new parents is easy. It’s hard to run out of things to talk about.</p><p>The things to talk about can be mundane. My baby and I spent most of our days doing the same things. He went from only sleeping and eating, to spending a few minutes on the floor, to spending a full hour wiggling and shouting under the canopy of his Wild Wiggles play gym.</p><p>He went from unfocused eyes and grunts to smiles and symphonies of unreproducible noises.</p><p>I found myself counting down until 5pm most days. It wasn’t that I didn’t want to hang out with the baby anymore, it was that it was manageable when Daddy was there too.</p><p>Daddy could hold the baby without too much trouble. The placenta stole my muscles in pregnancy, when I could no longer eat much to keep up with the requirements. That, plus a C-section, meant that lifting the baby was hard.</p><p>I was mostly confined to our walkup apartment. My notion of bounding around the neighborhood wearing the baby never came to fruition. Instead, I tried to make the best of our space. I put the baby in his bouncer to watch me wash bottles, and took him over to the window to look out and to let the sun fall on his face.</p><p>The isolation of maternity leave is incredible. The weekly outing to the neighborhood mom group, what I was so scared of, buoyed me.</p><p>Taking care of a baby on your own is relentless. But, we made it! I’m feeling relief, but also sadness. I’ll never have this much time alone with my baby again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3cf238498c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Dataflow Model]]></title>
            <link>https://heathermoor.medium.com/the-dataflow-model-520f486a56bf?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/520f486a56bf</guid>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Sat, 17 Jan 2026 20:55:32 GMT</pubDate>
            <atom:updated>2026-01-17T20:55:32.606Z</atom:updated>
            <content:encoded><![CDATA[<h4>PAPER REVIEW 📄</h4><p>Doing aggregations on streaming, out-of-order data is hard. <a href="https://storage.googleapis.com/pub-tools-public-publication-data/pdf/43864.pdf">The Dataflow Model</a> is a 2015 paper by Google on their approach to this in their software, Dataflow, which is a Google Cloud Platform product.</p><h4><strong>Audience</strong></h4><p>The audience for this paper is people who’ve encountered the problem of performing time-based aggregations on unbounded data before. I don’t think this paper will be tractable otherwise.</p><h4>Things this paper does not want you to do</h4><ul><li>This paper does not want you to use the words “streaming” and “batch” to describe the kind of data you’re dealing with. Use “bounded” and “unbounded” instead. They convinced me!</li><li>It also doesn’t want you to get the notion that you can know when you’ve seen all your data. Don’t kid yourself.</li></ul><blockquote>We as a field must stop trying to groom unbounded datasets into finite pools of information that eventually become complete, and instead live and breathe under the assumption that <strong>we will never know if or when we have seen all of our data</strong>, only that new data will arrive, old data may be retracted, and the only way to make this problem tractable is via principled abstractions that allow the practitioner the choice of appropriate tradeoffs along the axes of interest: correctness, latency, and cost.</blockquote><h4><strong>Why I wanted to read it</strong></h4><p>I wanted to read this paper due to a stubborn interest in a problem I “solved” years ago. I created a Lambda Architecture, an architecture mentioned in the paper a few times, to perform summations on unbounded data. In the intervening years, I wondered how it could have been built better, especially as streaming frameworks started hitting the scene.</p><p>I encountered Apache Beam on my journey, and I heard about this paper in reference to Beam a couple years ago.</p><h4>Language</h4><p>This paper is big into language recommendations. One really interesting language choice they make is here:</p><blockquote>– <strong>Where</strong> in event time they are being computed.<br>– <strong>When</strong> in processing time they are materialized.</blockquote><p>It’s that <em>where</em> vs <em>when</em>,<em> </em>both with respect to time. <a href="https://nightlies.apache.org/flink/flink-docs-release-1.8/dev/event_time.html">Event time vs processing time</a> is an important concept in this space.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=520f486a56bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cornwall and Devon Diaries Pt III — Dartmoor]]></title>
            <link>https://heathermoor.medium.com/cornwall-and-devon-diaries-pt-iii-dartmoor-c65fa92193d9?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c65fa92193d9</guid>
            <category><![CDATA[dartmoor]]></category>
            <category><![CDATA[devon]]></category>
            <category><![CDATA[solo-travel]]></category>
            <category><![CDATA[traveldiaries]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 01:26:07 GMT</pubDate>
            <atom:updated>2025-03-03T01:38:29.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cornwall and Devon Diaries Pt III — Dartmoor</h3><h4>Tors, fellow solo travelers, and real cream tea</h4><p>After too many <a href="https://heathermoor.medium.com/cornwall-diaries-pt-ii-rosemergy-to-ding-dong-mine-385133bfdd76">dangerous encounters in Cornwall</a>, I drove to the neighboring county, Devon, to see <a href="https://www.nationalparks.uk/park/dartmoor/">Dartmoor National Park</a>.</p><p>As I was driving through the park to my homestay, it became apparent that this park was different than national parks in the US. The park had an odd landscape that was mostly rough shrubs and hills, but lacking the dramatic formations of a park like Death Valley. There were cattle, sheep and horses idling in the roads.</p><figure><img alt="A sheep in the middle of a road" src="https://cdn-images-1.medium.com/max/1024/1*cuCih7u5Jndoeg7RLpTYYQ.jpeg" /></figure><p>Pulling down a gravel road to the home I would be staying, I noticed a ginger cat perched nearby. The homestay was with a middle-aged woman who’d moved to the village from the coast of Ireland (“too windy”), but was English herself. The first thing she offered was tea, her favorite, Taylor’s Yorkshire Tea. It was a preference I picked up from that stay.</p><p>Also joining for tea was the other person staying that holiday weekend, a Londoner from Finland, Liisa. Liisa had walked all the way to the house from a bus stop 12 miles away. This whole trip I’d been thinking if I were to do it again, I’d take trains and buses everywhere instead of driving, but hearing this made me reconsider. (There’s a bus through the park now, though!).</p><p>The cat was named Harry, after the host’s longtime and much younger crush, Prince Harry. I tried to lure him into my room when I was heading for bed, but he went to his own personal room, instead. It was cold that night, so I sorted out the hot water bottle that I was supplied, and slipped that into the bed. It was my first time putting together a hot water bottle myself. I felt deeply resourceful.</p><figure><img alt="A white and orange cat stands atop a mound and stares confidently at the viewer." src="https://cdn-images-1.medium.com/max/1024/1*HTW1kWHmsFWWT_aqhDhwiQ.jpeg" /><figcaption>Harry, the Devonshire country cat</figcaption></figure><p>The next morning I set out to find the forest I’d seen on Instagram, Wistman’s Wood. I drove to an inn, parked, and walked the long, exposed, path to the woods. There were a bunch of people, and it was really only a small grove of the cool-looking trees, but it was nice to sit underneath them for a bit.</p><p>From there, I wandered up a tor, labelled Longaford Tor on my map, to get a view.</p><figure><img alt="Green-brown hills dotted with boulders." src="https://cdn-images-1.medium.com/max/1024/1*fgHAPKPlcDi6gfPgZeV4dg.jpeg" /><figcaption>View of Dartmoor from Longaford Tor</figcaption></figure><p>I spotted some interesting buildings from the tor and walked down a path towards them. The path arrived at a large field and I lost the trail from there. It seemed simple enough to just walk through the field, but I was soon shin-deep in bog and surrounded to the ears with grasses. It took about 40 minutes to flounder around the bog before reaching the other side.</p><p>I didn’t know how I’d get over the fence, so I followed it until I came across a gate. On the gate was a sign marking the real path, that I’d missed, which had ran just south of my own path.</p><figure><img alt="A map of a section of Dartmoor" src="https://cdn-images-1.medium.com/max/1024/1*Rg4gjSAi-rfN3QofU5s7AQ.jpeg" /></figure><p>Beyond the fence there were goats, stone bridges and some ruins of gunpowder mills. I found the building I’d spotted from the tor, which housed a pottery shop now. And more importantly, this pottery shop was offering “Cream Tea!”.</p><p>Unlike my previous attempts at getting cream tea, I decided to just say “cream tea please” this time, and see what they brought out.</p><p>So, I learned what a real “cream tea” was: a regular tea, plus a scone with clotted cream and jam. There is much different about British and American English. I would have expected the “cream” to modify the “tea”, and not instead be sitting on an unrelated scone, but oh well.</p><figure><img alt="A tea pot sitting on a table with a scone and a bowl of jam and bowl of clotted cream." src="https://cdn-images-1.medium.com/max/1024/1*4T1BTtUc1XQJp5rL5vUp9w.jpeg" /><figcaption>“cream tea”</figcaption></figure><p>It felt like my day was done then, so I started walking back to the car, following the main road. I had supposed that walking along the road would be more straightforward, but it was actually a slog, with having to jump into high grasses every time a car came by.</p><p>It kind of cheered me to encounter someone else trying to walk along the road, going the opposite direction. I realized that the person was actually Liisa, and crossed over to talk to her. For some reason, it made sense that it was her. Who else would also be doing something like this?</p><p>I told her I’d make it back to the car, and come back around to pick her up. It took forever to reach the car, but I made it, and we made it home to our host and her cat.</p><p>Not tired of walking, from there Liisa and I decided to walk over the moors to a pub that sat alone on the heather hills. We had beer and vegetarian chili and pies on the picnic table outside. We saw the last light on the purple moors. We talked about London and Finland and America.</p><figure><img alt="A woman sits on a bench with her back to the camera, staring out at brown and purple hills in the twilight." src="https://cdn-images-1.medium.com/max/1024/1*y3ZcpspCF7uFrppm0e1mnA.jpeg" /><figcaption>At a pub on the moor with Liisa</figcaption></figure><p>The next day, Liisa and I headed out to get some more moors in before I would drop her off at the Plymouth train station.</p><p>We drove South, parked, and hiked up around Sharpitor and Leather Tor. This time there were groups of wild ponies wandering around and drinking the water that ran down the boggy hills. I had, to say the least, a lot of respect for horses now, and I kept well away from them.</p><figure><img alt="A group of horses on a rocky hill" src="https://cdn-images-1.medium.com/max/1024/1*LMxMDi6kBN96h-yC5ZZ1oQ.jpeg" /></figure><p>Up on the tor, we heard the jingle of an ice cream truck, and spotted it zipping along the main road and stopping at the car park at the bottom of the hill. We followed some ponies down and bought some ice cream. We sat on the curb of the lot and talked about relationships and a recent breakup she had. I think we would have had a different rapport if I were single too, but it was still good.</p><p>I drove Liisa to Plymouth to catch a train back to London and continued on for a couple days more around Tintagel, where I hiked 10 miles along the coastal path to Boscastle, up and down cliffs and havens and through fields with enormous threatening brown cows (you would think I was in Australia with the amount of scary animals I encountered).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opTEVISnBnfxaZ1ng6Oj0g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLGaq5CS0JOnWQRev3M09A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMzBJYjYBg42zZWySb1bCQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iRY1Orf-1UjgZHC5uZ_tKw.jpeg" /><figcaption>The SW coast path between Tintagel and Boscastle</figcaption></figure><p>I took the train from Bodmin Moor to Paddington and met my partner for a week in London. One night, we met up with Liisa at a pub.</p><p>Recently, I got a piece of embroidery from an artist, Victoria Rose, who does aerial embroidery. The piece depicts a hill, with knots for heather, rocks and horses, and a red and blue dot for two people climbing the hill.</p><figure><img alt="An embroidery of an aeriel view of a moor, with big knots for trees." src="https://cdn-images-1.medium.com/max/1024/1*IBrBP4bBEBPBYSULF3uvIg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c65fa92193d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cornwall Diaries Pt II: Rosemergy to Ding-Dong Mine]]></title>
            <link>https://heathermoor.medium.com/cornwall-diaries-pt-ii-rosemergy-to-ding-dong-mine-385133bfdd76?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/385133bfdd76</guid>
            <category><![CDATA[traveldiaries]]></category>
            <category><![CDATA[solo-travel]]></category>
            <category><![CDATA[cornwall]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Sun, 19 Dec 2021 00:02:40 GMT</pubDate>
            <atom:updated>2023-01-24T03:19:21.581Z</atom:updated>
            <content:encoded><![CDATA[<h4>Right-to-roam, relics, dangerous bees and horses</h4><p>Often when I go on trips these days, I don’t seriously research the things I want to do until I get there and I’m laid out on the bed that first night. So when I was researching Cornwall that first night, one of the things I found was an app called <a href="https://www.iwalkcornwall.co.uk/">iWalkCornwall</a>. Very old-school sounding and very old-school looking, but it had mapped out dozens of interesting walks you could do all around the Cornwall Peninsula.</p><p>What drew me to one, <a href="https://www.iwalkcornwall.co.uk/walk/rosemergy_to_ding_dong_mine">Rosemergy to Ding Dong Mine</a>, was that it passed through a neolithic stone relic called Men-an-Tol. I wanted to see it, for whatever reason, so I picked that walk to go on my second day.</p><figure><img alt="A map of a walk from in Cornwall with markers for ruins" src="https://cdn-images-1.medium.com/max/1024/1*cg-AhumjRLZ-U0N1vjJcRg.jpeg" /></figure><p>Driving to Rosemergy from Penzance was harrowing. We’re talking a couple inches of room to pass cars coming the other direction, while being surrounded by stone walls on both sides. Everyone else was zipping along while I crawled.</p><p>So, by the time I got to Rosemergy, I had to use the loo, as it were. I tried to stop at “Rosemergy Cream Teas” to get a cream tea (a tea with cream), but I missed it and absolutely couldn’t turn back. So what I ended up stopping at was a place called Morvah Schoolhouse a bit longer down the road.</p><p>Morvah Schoolhouse that day was an empty little room full of art. I got a bunch of felted things and pot of clotted cream ice cream, and used the loo. It was a sunny day. Sitting outside, looking out past the pasture and onto the coast, I first felt a “I could live here” protothought.</p><figure><img alt="Tea and ice cream in front of a building with the sign “Morvah Schoolhouse”" src="https://cdn-images-1.medium.com/max/1024/1*W5CshhZjl3z5BO9vCF7K3g.jpeg" /></figure><p>Finally, I made it to the start of the walk, climbing up a rocky hill called Carn Galver.</p><p>The hill was doused in heather. Which was beautiful and felt cool as that’s my name, but I suppose it’s both my namesake and my downfall, as it drew in hundreds (thousands?) of bees, which I’m allergic to. I hadn’t brought my adrenaline shot, and I was completely alone as far as I could see. I thought about turning back, but took the risk instead.</p><figure><img alt="A close up of purple and yellow grousy flowers." src="https://cdn-images-1.medium.com/max/1024/1*5zPCYQA7bqdT_ruVtR-Ing.jpeg" /></figure><p>At the top there was a view of the north coast. It’s one of the things I appreciate about hiking alone. I can take as much time as I want at the top, which always seems to be longer than anyone else wants.</p><figure><img alt="A view from the top of a hill of farm land and ocean." src="https://cdn-images-1.medium.com/max/1024/1*H1nCa-WCWWrgsgEyWpaIiw.jpeg" /></figure><p>I tromped through the skinny path down the hill, passing two people who were sunbathing in the valley, and through several fields.</p><p>England has these cool laws about public use of private land called “<a href="https://www.gov.uk/right-of-way-open-access-land/use-your-right-to-roam">right to roam</a>”. Very pro-strolling. The app was basically telling me to walk through other people’s land. Something you wouldn’t do in the rural US, let’s just say.</p><p>After a mile or so, I encountered the goal, Men-an-Tol. It was a bizarre feeling to be alone in these fields with a relic so old. There were no signs or postings or anyone else as far as I could see.</p><figure><img alt="A hollowed out rock in the middle of an expansive, empty field." src="https://cdn-images-1.medium.com/max/1024/1*XurZ93pdW8s3ShtyqylKeA.jpeg" /><figcaption>Me and a relic from 3000 BC</figcaption></figure><p>I encountered another stone circle called the Nine Maidens, a medieval tablet called Men Scryfa, another tin mine, and also this sign which showed the very specific areas of badger activity:</p><figure><img alt="A map with markers for “heron activity” and “badger activity”" src="https://cdn-images-1.medium.com/max/1024/1*IUfkIY1IlzjcXVFvgeyx5w.jpeg" /></figure><p>As I reached the end of the walk, I started seeing the water again. Here’s where things went awry.</p><figure><img alt="A thin walking path winding around a crumbling stone house." src="https://cdn-images-1.medium.com/max/1024/1*z38zhTTSDWCyGkvTrP6Nzg.jpeg" /></figure><p>The app was telling me to go through a gate and walk across a field. Milling beyond this gate were gorgeous horses. The sign on the gate said that these were public grazing horses, and to not feed them. I vowed to not feed them. After all, they weren’t paying me much attention. I opened the gate just enough to slip through, closing it behind me.</p><figure><img alt="Four horses grazing a field on the coast." src="https://cdn-images-1.medium.com/max/960/1*UrZIEKr3V1Y5oByYZcvtRg.gif" /><figcaption>The beautiful scene, before crossing the gate.</figcaption></figure><p>The second I closed the gate behind me, the horses surrounded me, quite closely.</p><p>I started to get a bit terrified, to be honest. I just wanted to get out of there, out of that semicircle of towering grazing horses. I knew that I shouldn’t get behind them, where they could kick me, so it didn’t seem like I should try to go through them. I also didn’t want to turn around and go back through the gate since I couldn’t see them with my back facing them.</p><p>I pulled my appendages in close to my body. My best thought was to face them and somehow navigate my way over the tall gate backwards. But also, what did they want from me??</p><p>Meanwhile, one of the horses slowly maneuvered its head around me and gently nipped the juicy back fat of my arm. It hurt like hell. However, I could tell that it wasn’t trying to hurt me, it was just really trying to tell me something.</p><p>It was an effective communication. I knew at once the horse was telling me: 1) They know I have food. 2) It’s in my backpack, they know. 3) Give it to them already.</p><p>So then it was like, do I give them food to make them happy? Will that just make them more excited? Oh my god.</p><p>Just at that moment, a man ambled up through the field. For some reason, he was dressed like a British fancy boy. Cardigan, slacks, hands in pockets, strolling through the rural field.</p><p>I couldn’t make him fit into the scenery. Did he own this land maybe, and saw the horses surrounding me from afar, maybe through the spotting scope in his country house?…or was he himself on a walk in his best strolling attire? It felt like I was encountering a Mr. Darcy video game sprite.</p><p>I accepted the situation and plainly asked him what to do. He just shrugged pleasantly. However, his presence behind the horses was enough to break up their concentration on me. They scattered enough for me to pass them, and I hurried on through the field.</p><p>After making it through the scary valley of horses, I ended the hike at the coast. It was exhilarating to both stare out at the calm ocean water and feel safe. However, the scariest part was ahead: driving home on the Cornwall roads.</p><figure><img alt="A grassy coast and ocean view." src="https://cdn-images-1.medium.com/max/1024/1*8hN2D7AKRK9P3Q8C31taVA.jpeg" /></figure><p>The next day, my horse kiss showed up:</p><figure><img alt="An arm with a large bruise on it." src="https://cdn-images-1.medium.com/max/960/1*FEp67epvyMbB6J8tp1dyDA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=385133bfdd76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cornwall and Devon Diaries Pt I - Penzance and Mousehole]]></title>
            <link>https://heathermoor.medium.com/penzance-and-mousehole-a6b0de815c0b?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6b0de815c0b</guid>
            <category><![CDATA[traveldiaries]]></category>
            <category><![CDATA[cornwall]]></category>
            <category><![CDATA[solo-travel]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Sun, 31 Oct 2021 02:33:05 GMT</pubDate>
            <atom:updated>2022-01-01T23:37:16.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A map of Cornwall, UK with destinations penned in" src="https://cdn-images-1.medium.com/max/800/1*DSWugswni1LdeZg7BIqJFA.jpeg" /></figure><h4>Seawall gardens and cream teas</h4><p>It’s been two summers since I actually took this trip to Cornwall. But, it was good stuff, and I wanted to remember some of it by writing it down. This’ll be choppy and boring to anyone but me. Nothing really happened until the hike where I almost died three times.</p><p>I was going to London for a week, and knew that I wanted to take the train to somewhere else in the UK beforehand. When I looked on the map, it seemed like the Southwest of England looked kind of abandoned. Scotland? obviously everyone wants to go there. The Southeast? That’s where Brighton and all the “sunny” beaches are.</p><p>It turns out Cornwall is a huge vacation destination in the UK, who knew?? It was pretty easy to get to. Just stepping on a train after landing in London. Five hours of slipping by coastlines to reach the end of the line, Penzance.</p><p>One of my AirBnb hosts picked me up from the Penzance station in his tiny car. I would soon find out why the cars were so tiny. Having not talked to anyone since arriving, I found myself once again jarred by the language barrier of UK, which is super real. Half of the conversation was us asking each other to repeat ourselves.</p><p>As he drove the very narrow, stone-walled streets of Penzance, he told me his story. From what I pieced together despite the language barrier, he ran a pub for decades in the town, that the fishers would all pour into after coming in from weeks at sea. The fishers would get super drunk and get into lots of fights. He drove me by the docks to point out where the boats would come in. Apparently these days, there was much less fishing, and more tourism.</p><p>I had a little room upstairs. They’d put an electric tea kettle in the room along with tea bags and boxed milk. Their house looked out on Mount’s Bay, just across the road. The road divides the last houses from the bay, but before the bay there are people’s gardens, right on the water.</p><figure><img alt="A garden with flowers overlooking a bay in the sunshine." src="https://cdn-images-1.medium.com/max/1024/1*lzmLycdUiiAmstcyhOU92g.jpeg" /><figcaption>Garden on the water near Mousehole, UK</figcaption></figure><p>This road is part of the <a href="https://en.wikipedia.org/wiki/South_West_Coast_Path">Southwest Coast Path</a>, a marked path that goes around the <em>entire</em> peninsula, if you see that arm sticking out on the left-hand side of the UK.</p><p>I ended up walking down that road to Mousehole (pronounced Mow-zul). Mousehole was also a former fishing village. I got a breakfast looking on their cute harbor. Everything about the town was as cute as its freaking name.</p><p>At this point, I’d heard a mention of “cream teas” a lot from internet research about Cornwall. I decided I didn’t need to look up what a “cream tea” meant, as it’s obviously a tea with a special cream in a special Cornwall preparation. So, I ordered a tea with cream at this breakfast place. They made sure I meant cream and not milk. I thought it was odd that they were trying to steer me away from their famous cream teas. Maybe they didn’t think I was legit enough to have a cream tea? Salty about tourism taking over the fishing perhaps.</p><figure><img alt="A cup of tea and a window looking out on a harbor with fishing boats" src="https://cdn-images-1.medium.com/max/1024/1*zdbfieRglYDL6Nu2oD0leQ.jpeg" /><figcaption>My cream tea in Mousehole</figcaption></figure><p>I took the bus back, and multiple times the driver came within millimeters of a stone wall. Everyone was an absolute precision driver.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6b0de815c0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Raspberry Pi Voice Assistant]]></title>
            <link>https://heathermoor.medium.com/building-a-raspberry-pi-voice-assistant-34f08fc53b55?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/34f08fc53b55</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[recurse-center]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Mon, 06 Jan 2020 03:54:15 GMT</pubDate>
            <atom:updated>2020-01-31T03:53:23.891Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A Raspberry Pi with a speaker and microphone attached." src="https://cdn-images-1.medium.com/max/1024/1*9OjwO5n9AeUcVhAdRtJxPA.gif" /></figure><h4>That answers all your celestial questions</h4><p>This fall I did <a href="https://www.recurse.com/">Recurse Center</a>. When I thought about how to spend my time there, one area of interest stuck out to me — voice technology. I see my mom use dictation software and voice assistants often. The software is at once impressive and also has room for improvement, which makes for a perfect area to explore. My mom also loves astronomy. So, I decided to make a celestial voice assistant for her.</p><p>A celestial voice assistant is a voice assistant that helps you with your celestial questions, such as: “When will the sun set?” and “What phase is the moon today?”</p><p>I wanted it to be a small, physical device that you could just plug in to the wall. Apparently, that’s a natural fit for the <a href="https://www.raspberrypi.org/">Raspberry Pi</a>. I had never worked with Raspberry Pi before, and my conception of it wasn’t quite right. Now, I would just explain it as “a small computer”. It was much more full-featured than I thought, and that made it pretty smooth to work with.</p><p>I’ll first talk about this hardware, then I’ll talk about the actual voice software part of it.</p><h3>The hardware</h3><p>For my initial, inexpensive setup I had these ingredients:</p><ul><li><a href="https://www.raspberrypi.org/products/raspberry-pi-3-model-b/">Raspberry Pi 3B</a></li><li>Pi standard power supply</li><li>32GB SD Card</li><li><a href="https://www.walmart.com/ip/Sony-PlayStation-Eye-PS3/20470320">Playstation Eye</a> (USB microphone)</li><li><a href="https://www.adafruit.com/product/3369">Adafruit Mini Speaker</a> (USB speaker)</li><li><a href="https://www.raspberrypi.org/products/sense-hat/">Sense HAT</a> (Pi add-on board with a compass and LED grid)</li></ul><p>Later, for my mom’s present, I upgraded to a sleeker <a href="https://www.seeedstudio.com/ReSpeaker-USB-Mic-Array-p-4247.html">ReSpeaker USB Mic Array</a>, instead of the Playstation Eye — which had an unfortunate webcam vibe but was otherwise a pretty good “far-field” microphone.</p><p>For development, I often just used earbuds plugged into the Pi’s audio jack, instead of a speaker, and spoke directly into an <a href="https://www.adafruit.com/product/3367">Adafruit USB Mini Microphone</a>.</p><p>To put it all together, I attached the Sense HAT to the Pi’s GPIO pins, wrote the Raspian OS on the SD card according to these instructions, set up the wifi configuration, and a few other things, which I <a href="https://github.com/harthur/celestial-snips-app/blob/master/README.md#setup">documented here</a>.</p><h3>The software: voice assistant overview</h3><p>You can write your own voice assistant software completely from scratch, but it would be a huge project. Easier is to use an existing framework.</p><p>I settled, maybe too quickly, on one particular voice framework: <a href="http://snips.ai/">Snips</a>. I’ll just get this out of the way: Snips was bought by Sonos a couple weeks ago and is shutting their developer support soon. The code was never completely open sourced, so look elsewhere if you’re starting a voice project! It seems like <a href="https://rhasspy.readthedocs.io/en/latest/">Rhasppy</a> is a good alternative to look into.</p><p>Snips operates as several different services that run on the device. Many of these components are common across voice frameworks: there’s an audio component that interfaces with the microphone to get the audio as data. The wakeword or hotword detector is listening for a specific phrase from the stream of data (e.g. “Alexa” or “Hey Snips”).</p><p>Then there’s the automatic speech recognition (ASR): a component that takes the audio data and tries to sus out the text of what the person was saying. The natural language understanding (NLU) component takes text and parses it into “intents”.</p><p>Intents are kind of like the set of questions that the assistant can answer. An intent is often not mapped to one exact sentence, but several that a person could say to get the same result. An example is an intent to get the temperature. Someone could say either “What’s the temperature?” or “How hot is it right now?” to trigger this one intent.</p><p>Intent detection is the purpose of the NLU, and each intent the assistant supports needs to have been trained into the NLU, which employs machine learning for flexibility in recognizing variations on the same intent.</p><p>Finally, there are “actions” to handle the intents, and a text-to-speech (TTS) component which takes the answer the action provides and says it out loud over a speaker in an artificial voice.</p><h3>The software: action code</h3><p>Snips provides all of the standard components (the NLU is the only one <a href="https://github.com/snipsco/snips-nlu">open-sourced</a>). The code I wrote was mainly action code to handle the intents that I’d specified to the NLU.</p><p>For Snips, all of the components: wakeword, ASR, NLU, TTS — run as separate services on the device. The components react by publishing and subscribing to topics on the network using the <a href="https://en.wikipedia.org/wiki/MQTT">MQTT protocol</a>.</p><p>This divide lets some services, like the wakeword detection and ASR, run on “satellite” microphone-only devices, while shipping off the intent processing and speech to a main, speaker-enabled device. It also allows a lot of flexibility in writing intent handlers, as you can write an action in any language you want, as long as it has an MQTT library, which most languages do.</p><p>Here’s an edit of the code to handle the MoonPhase intent, which tells you what phase the moon is currently in:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60ec0af89c22993c67594b7b62369d69/href">https://medium.com/media/60ec0af89c22993c67594b7b62369d69/href</a></iframe><p><a href="https://github.com/snipsco/hermes-protocol">Hermes</a> is a protocol over MQTT that Snips created for controlling sessions in the voice assistant. The call hermes.publish_end_session(session_id, msg) will, essentially, publish an MQTT message to the hermes/tts/say topic telling the TTS to say e.g. “The moon is a waning crescent” aloud.</p><p>The code uses the 8x8 LED display of the Sense HAT to display an image of the moon phase. There’s a very nice <a href="https://pythonhosted.org/sense-hat/api/">Python library</a> for interfacing with the Sense HAT, as well as a <a href="https://www.raspberrypi.org/blog/sense-hat-emulator/">web emulator</a> for fast experimenting. Later, I used the Sense HAT’s magnetometer to get the orientation of the Pi for <a href="https://github.com/harthur/celestial-snips-app/blob/8d04a10a3a2747ff4d511432beb40d056e09753f/display.py#L22">displaying which direction a celestial body was rising</a>.</p><p>I used the <a href="https://astroplan.readthedocs.io/en/latest/api/astroplan.moon_illumination.html#astroplan.moon_illumination">astroplan</a> library for getting the current moon phase, and ended up scraping charts for rising and setting times from the <a href="https://www.usno.navy.mil/USNO">US Naval Observatory</a> web site. I wanted to compute the rising and setting times dynamically based on location, but that story is for another blog post. Let’s just say that this assistant is hyper-personalized to my mom.</p><p>You can see all the code for the app here: <a href="https://github.com/harthur/celestial-snips-app">https://github.com/harthur/celestial-snips-app</a></p><h3>Celestial: the final product</h3><p>The question that Celestial answers as of now are:</p><ul><li>“What time does the Sun/Moon/Jupiter/Venus/Mars/Orion rise?”</li><li>“When does the Sun/Moon/Jupiter/Venus/Mars/Orion set?”</li><li>“What moon phase is it?”</li><li>“When is the next full/new moon?”</li><li>“When can I see the space station?”</li></ul><p>The assistant was well-received, and we had some good fun also asking Alexa when Orion rose and getting a non-sensical answer about shoe stores in Truckee (?). But my mom had a bit too much confidence in me when she tried asking Celestial, “What planets can I see in the sky tonight?”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34f08fc53b55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Little Gift Guide for People with Little Apartments]]></title>
            <link>https://heathermoor.medium.com/a-little-gift-guide-for-people-with-little-apartments-b1f2a12a6ffe?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1f2a12a6ffe</guid>
            <category><![CDATA[city-living]]></category>
            <category><![CDATA[gift-guide]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 17:09:15 GMT</pubDate>
            <atom:updated>2019-11-27T17:54:03.576Z</atom:updated>
            <content:encoded><![CDATA[<p>Two personal notes: I love useful gifts. And, I never thought I’d be the person who was always thinking of how to improve their living space, but Manhattan has forced me to become a fanatic.</p><p>Here’re the things I’ve bought and found useful for little living:</p><h3>Vacuum sealed bags</h3><p>I just vacuum-bagged my summer clothes and slipped them under the bed in a case. For most clothes, I’ve found it to shrink the space down to at least half the usual size, which is a big deal! I like the Ziploc Space Bags (at Target, Container Store), but I haven’t tried others. Important: they’ll need to own a compatible vacuum. They work with Dyson stick vacuums.</p><h3>String Lights</h3><p>String lights are magic for apartments. You can get them the little 3M hooks for them as well. They make small spaces delightful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*VS9w7uAyQPMsM1D-lr4PQg@2x.jpeg" /></figure><h3>Ottoman with storage</h3><p>I store sweaters inside this box seat that I got at the Container Store. It works as a seat and an ottoman:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*WuMrr3EMJ2-PDjBnmtQ5kw@2x.jpeg" /></figure><h3>Hooks</h3><p>Removable hooks are awesome! They use empty space on walls and doors and I use them all over my apartment. 3M brand hooks have worked for me.</p><h3>Go Tall</h3><p>A few months ago we got a tall shoe rack, instead of the usual bench-style one. Just like Manhattan, vertical space is plenty, but floor space is in low supply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZKyIoNUh00ispYe6D68Ow@2x.jpeg" /></figure><h3>Just don’t get big things</h3><p>One of our friends got us this really nice water filter pitcher, that is big and round. It’s so nice, but it actually ends up taking up 1/6 of our fridge space. Err on the side of getting things that won’t take up much space in their apartment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1f2a12a6ffe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ghost in the Hashes]]></title>
            <link>https://medium.engineering/the-ghost-in-the-hashes-55ef1e3a86ef?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/55ef1e3a86ef</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ghosts]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Sun, 30 Jun 2019 16:03:00 GMT</pubDate>
            <atom:updated>2019-11-25T19:12:27.723Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*GmofqghuqY3Wga0BkfKwHQ.png" /></figure><p><em>This was originally published on Medium’s internal instance, to explain a persistent bug to other engineers.</em></p><p>On November 29, 2018 <a href="https://medium.com/u/c9941a52ff5d">Dan Benson</a> did a major upgrade to our production tech stack. He upgraded us from Node 6 to Node 8. <a href="https://nodejs.org/en/about/">Node.js</a> is the JavaScript-based server environment we use for most of our existing backend. Everything went well and we were happy to be using the latest and greatest, with all the performance improvements that came along.</p><p>Shortly afterwards, we started getting some sporadic test failures that couldn’t be explained by any code changes. The error messages were always like “TypeError: <em>X</em> is not a function”. Where <em>X</em> is something that is definitely a function.</p><p>This was disquieting to me. In my head, JavaScript was cannibalizing random functions at will. Perhaps Node 8 was using a new machine learning-based garbage collector? Or there were ghosts.</p><p>We eventually noticed the pattern that these disappeared functions were all methods of Shepherd graph nodes. <a href="https://github.com/Medium/shepherd">Shepherd</a> is a Node dependency injection framework that we wrote several years ago that we have rapidly diminishing knowledge about. This was good because it meant it was less likely to be a JavaScript ghost, and more likely to be something we could fix in Shepherd. However, no one got the time to actually look into Shepherd.</p><p>A couple months later, I was on The Watch (<em>Medium’s </em><a href="https://medium.engineering/watching-medium-a7dde501a22d"><em>on-call rotation</em></a>) again and the errors were still happening. The random test failures were causing us to have to look into and re-run tests regularly. The bug even caused issues in production occasionally, always on one instance, forcing us to manually take the bad instance out of our production gang. We had to pass down the knowledge from Watch to Watch “if you see ‘<em>is not a function</em>’, just rerun the tests”</p><p>I filed an issue for it to log the occurrences. I looked at the Shepherd code, and felt overwhelmed. My Watch cycle came and went without a fix.</p><p>Soon after my Watch cycle, <a href="https://medium.com/u/4b6919c05eb2">Lyra</a> dropped this comment in on the issue:</p><blockquote>I did a little spelunking in Shepherd today. The only thing I’ve found that directly depends on V8 is <a href="https://github.com/Medium/shepherd/blob/master/lib/Builder.js#L360">CompiledNode.generateHashes</a>, which uses an npm module we wrote called oid, which includes a <a href="https://github.com/Medium/oid/blob/master/src/oidNative.cc">C++ native extension</a>.</blockquote><p>The package Lyra was referring to, <a href="https://github.com/medium/oid">oid</a>, provides an API for getting a <a href="https://en.wikipedia.org/wiki/Hash_function">hash</a> of any JavaScript object or primitive. This hashing code is written in C++ as a V8 extension, <a href="https://v8.dev/">V8</a> being the underlying JavaScript engine that Node uses.</p><p>Shepherd uses oid to get hashes of Shepherd graph nodes. These hashes are used to cache nodes, ensuring that nodes which have the same handler function are only run once per built graph, and the result cached.</p><p>This lead made so much sense. One of the biggest things that would change with a Node upgrade would be an underlying upgrade to V8. It also made sense that “graphNode.X is not a function” may crop up if you accidentally replaced a graph node in the cache with another which didn’t define a function named X.</p><p>Lyra and <a href="https://medium.com/u/e968697bc462">Kyle</a> found that oid was depending on another library, nan, that had its own v8 extension. That dependency was on an older version of nan. <a href="https://medium.com/u/e968697bc462">Kyle</a> upgraded oid so that it would build nan’s new version along with oid.</p><p>Everyone was very excited about the upgrade. However, the “X is not a function” failure cropped up right away after the upgrade went out. We were all very sad.</p><p>People returned to their regular work. Another month went by, full of ghosts. Waiting around one day, I decided to get Shepherd running locally and debug more. I picked up with the trail that Lyra left — looking into the hashes.</p><p>Once I got Shepherd set up, I added some console.log()s to the the hash generation code. I spun up our graph tests and immediately noticed something odd. The hash values for objects were low, much lower than the values for string graph nodes. They were in the millions. I’m no hashing expert, but the values just seemed too low.</p><p>I created a little test Node script that looked like this:</p><pre><strong>const</strong> oid = require(&#39;oid&#39;)</pre><pre><strong>const</strong> x = {}<br><strong>const</strong> hash = oid.hash(x)</pre><pre>console.log(hash)</pre><p>And ran it on my current Node 8 setup. Then I switched to Node 6, compiled oid for that, and ran it again. There was a clear difference:</p><p>Node 6:<br>1777246106</p><p>Node 8:<br>1314340</p><p>I ran it several times to similar results. I saw that oid was using a V8 method for objects called <a href="https://github.com/Medium/oid/blob/master/src/oidNative.cc#L20">GetIdentityHash()</a>. The <a href="https://v8docs.nodesource.com/node-0.8/db/d85/classv8_1_1_object.html">V8 docs</a> didn’t say much for this method, other than that it wasn’t guaranteed to be unique. V8 is open source though, and has a <a href="https://github.com/v8/v8">mirror on GitHub</a>. I searched there for “GetIdentityHash” and started from there. I ended up at <a href="https://github.com/v8/v8/blob/master/src/objects/property-array.h#L62">this line of code</a> which implied the hash was 21 bits. Indeed, every time I ran it, the hash stayed under 2²¹.</p><p>Empirically, it seemed like the hashes were 31 bits before. Where did those 10 bits go?…They stole them! 😱😱😱 To use for storing the length of something.</p><p>It was clear this wasn’t long enough of a hash for us, so it was time to move on. I searched Google for advice on implementing object ids, and the internet suggested using a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a>, where the keys are your objects, and the values are increasing integer ids. This actually makes the id for an object completely unique — even better than before. I submitted a <a href="https://github.com/Medium/shepherd/pull/141">pull request</a> implementing this.</p><p>Since Shepherd is open source, I tagged <a href="https://medium.com/u/d0b0b0d9d535">Nick Santos</a> on the review, a former employee who was involved in Shepherd. He gets really excited about <a href="https://medium.engineering/the-unluckiest-paragraphs-751dd36d2d30">odd bugs</a>, so he was excited about this one. He <a href="https://github.com/Medium/shepherd/pull/142">wrote a test for us</a> that failed if there was a collision after creating a certain number of graph nodes. He found empirically that it would usually take just under 2000 graph nodes before the first collision.</p><p>Theoretically, it’s a case of the <a href="https://en.wikipedia.org/wiki/Birthday_problem">birthday problem</a>. So, even if there’s only a 1 in 2²¹ chance of collision between two particular nodes, the chance of some two nodes colliding in a group of nodes is much higher. The chance of some two nodes colliding in a group of 100 nodes is about 0.2%, in 500 is about 5%, and by 2500 is about 75%. In contrast, if the hash were 2³¹, the chance of some two nodes colliding in 2500 nodes would be about 0.1%.</p><p>With the fixes in, Kyle upgraded and published all of our packages. We haven’t seen the bug since.</p><p>Of all the issues here, I think maybe the core one was depending on oid, and in turn getIdentityHash(). Both of these APIs called out that they weren’t guaranteed to be unique, and there could be a collision between two different objects. Moreover, neither specified how big the hash values were. Ideally, you would use an API with a contract for the length of the hash, so that you can judge how likely collisions are for your particular use case, and the number of bits doesn’t change from underneath you. However, it’s hard to know what the options were when this original code was written.</p><p>I also think about how long it took us to fix this bug. It was a constant background issue for 4 months. I wish that I’d dove in deeper on the first Ghost Watch I was on. From there, it was passed down through The Watches. If you couldn’t debug it within a Watch cycle, you had to move on back to your product work.</p><p>Bugs and product areas that are in no-persons land is an ongoing issue for us imho, much like the Hash Ghost was.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55ef1e3a86ef" width="1" height="1" alt=""><hr><p><a href="https://medium.engineering/the-ghost-in-the-hashes-55ef1e3a86ef">The Ghost in the Hashes</a> was originally published in <a href="https://medium.engineering/">Medium Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mapping Medium’s Tags]]></title>
            <link>https://medium.engineering/mapping-mediums-tags-1b9a78d77cf0?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b9a78d77cf0</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ml-case-studies]]></category>
            <category><![CDATA[word2vec]]></category>
            <category><![CDATA[embedding]]></category>
            <category><![CDATA[eng-blogs]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Wed, 24 Jan 2018 01:30:56 GMT</pubDate>
            <atom:updated>2021-02-10T18:25:45.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Q-0lM_c4AC5opjWxMgh-vg.png" /></figure><h4>Machine learning brings Medium’s tags to life</h4><p><em>This was originally published Jan 18, 2018 on Hatch, Medium’s internal instance, to explain a hack week project to the company.</em></p><p>When you publish a post on Medium, you’re prompted to add labels to your post that describe what your post is about. These tags are mostly free-form. Authors can write whatever they think describes their post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*7uxs8rj5jHPQoj9pA3SFSw.png" /><figcaption>Adding some tags to a Medium post.</figcaption></figure><p>As far as data goes, these tags are a gold mine. Authors are labelling their posts with a succinct word or phrase that other people understand. We can (and have) used these tags to inform our algorithms for showing content and organizing it.</p><p>However, there are big issues with tags that limit their usefulness. One of the issues is that tags are scattered. At this point, authors have defined over 1 million unique tags. Many tags are essentially duplicates of other tags, or are so close that they have the same audience. Here are some examples:</p><ul><li>Global Warming = Climate Change</li><li>Hillary Clinton = Hilary Clinton (common misspelling)</li><li>Poetry = Poem = Poems = Poetry on Medium</li><li>Startup = Entrepreneurship = Startup Lessons = Founder Stories</li></ul><p>To computers, each tag is just a string of text and by default they don’t have meaning or relatedness. This makes it hard for us to wield them cohesively in algorithmic battles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*ep-vOzizftxQb4yKeQ26Jg.gif" /><figcaption>The “Climate Change” tag is asked about the “Global Warming” tag</figcaption></figure><h3>Tags as multi-dimensional characters</h3><p>Instead of each tag just being represented by a string, what if we could represent it by its qualities and how it relates to other tags? When we talk about people, we don’t compare them by their names, rather we describe and compare them by the many qualities they have. People are “multidimensional” to us. What if tags were too?</p><p>We’re going to take the word “multidimensional” literally, and represent each tag by a vector of numbers in a multi-dimensional vector space.</p><p>First of all, what is a vector? For the sake of this project’s Python code, a vector is just a fixed-length array of numbers. However, you can interpret this list of numbers in different ways. You could interpret it as a point in space (e.g. (5,3) is the point that is offset 5 along the x-axis and 3 along the y-axis in 2-dimensional space). However, sometimes it’s more useful to interpret it as a <a href="https://en.wikipedia.org/wiki/Euclidean_vector">vector</a> with direction and magnitude, the ones you might remember from Physics class. It’s confusing. I recommend this short <a href="https://www.youtube.com/watch?v=fNk_zzaMoSs">video explanation</a>.</p><p>If we could represent tags with vectors then we could compare them by distance or plot them to visualize the clusters they form. Spoiler: we’re going to do just that.</p><h3>Training the tag vectors</h3><p>But how do we find the meaning of these thousands of tags in a way that can represented by vectors of numbers? We do this by training a machine learning model using our tag data.</p><p>The training data I used was the tags of 500,000 “reliable” public English Medium posts. I pretended each post’s tag list was a “sentence” (where each tag is a “word”), and fed those into a training algorithm which usually takes real sentences and learns vector representations of words. I used <a href="https://radimrehurek.com/gensim/">gensim</a>’s word2vec implementation for this, and I specified that these vectors should have 100 dimensions.</p><p>I won’t go into details about how the training algorithm works, but essentially it figures out a tag’s vector values by looking at the tags that are used along with it on posts. You can read more about the algorithm <a href="https://www.tensorflow.org/tutorials/word2vec">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*7kzhXvlzYzk0dWMDA3YVTA.png" /><figcaption>One post’s set of tags. To figure out the vector for “Programming”, the algorithm takes into account that it was used with “Paper Review” and “Computer Science”, among many other examples.</figcaption></figure><p>Algorithms such as word2vec are said to “embed” entities (like tags or words) in a multi-dimensional vector space, and as such, these kinds of vectors are also known as “embeddings”. If you’re googling for more information about all this, you’ll want to search for “embeddings”.</p><h3>Examining the vectors</h3><p>After a few minutes of training, we get the vectors for every tag at our disposal. Let’s check one out. Here’s the vector for “Climate Change”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0jsTl6JpKr4f8bNVoy979g.png" /><figcaption>The 100-dimensional vector that represents the “Climate Change” tag</figcaption></figure><p>Great. Don’t worry, you shouldn’t understand what these numbers mean. I couldn’t even tell you myself. Unfortunately, it’s not even as simple as saying “the <em>X</em>th dimension represents <em>Y</em> quality and the value is how much the tag expresses that quality”. Rather, the dimensions work in concert to represent information about the tags.</p><p>It’s easier to see what’s going on by comparing vectors. One thing we can do is find tag vectors that are close to each other. Here, we interpret them as vectors with direction and magnitude in order to compute the <a href="https://en.wikipedia.org/wiki/Cosine_similarity">cosine similarity</a> between them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*-K4IGg0oIgId6nklgByLIw.png" /><figcaption>The most similar tag vectors to “Climate Change” are Climates, Environmental Issues, Pollution, Environmental Justice, and Public Lands</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*SnPmhEop5UD3FGv0tE8sAw.png" /><figcaption>The most similar to “Science Fiction” are SciFi, Dystopia, Star Trek, Aliens, and Time Travel</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*F804fK--WRLSLj1CZ25TXA.png" /><figcaption>The most similar to “Education” are Higher Education, Teachers, Education Reform, Teaching, and Schools</figcaption></figure><h3>Combining Vectors</h3><p>We can also do arithmetic on our vectors to jump around the vector space. Here we average the “Tech” vector with “Education” to land in the vicinity of EdTech tags:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*WKjAASzcg3BGTL6iJrMlWg.png" /><figcaption>Averaging the “Education” and “Tech” vectors creates a vector which is closest to those of EdTech tags. Computer Science is among the closest and is a different interpretation of combining “Tech” and “Education”.</figcaption></figure><p>Now we can try “Fine Art” + “Cities” to get “Graffiti”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*gMhG-M1S3n_okyIBVPKIbQ.png" /><figcaption>Averaging the “Fine Art” and “Cities” vectors creates a vector which is closest to Graffiti, Street Art, Sculpture, Public Space, Placemaking.</figcaption></figure><p>“Programming” + “Gaming” is “Game Development”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*w175uK-OO6be_Vufunuasg.png" /><figcaption>Averaging the “Programming” and “Gaming” vectors creates a vector which is closest to Game Development, Games, Indiedev, Gamedev, and Minecraft.</figcaption></figure><p>We can also solve analogies, like this one, which is essentially &quot;Education&quot; is to &quot;EdTech&quot; as &quot;Agriculture&quot; is to _:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81xFzonZtZcoKjzgHyjMTg.png" /><figcaption>Averaging the “Agriculture” and “EdTech” vectors along with the negative of “Education” yields a vector which is closest to that of AgTech tags</figcaption></figure><p>The fact that we can perform this basic arithmetic and reliably get these results indicates that we’ve learned some “linear regularities” of the tags. People <a href="http://www.aclweb.org/anthology/W/W14/W14-1618.pdf">have found similar</a>, but more linguistic, regularities in word embeddings obtained by training word2vec on real words and language.</p><h3>Visualizing the vectors</h3><p>We can also plot the tag vectors. Now, we switch to interpreting them as points in space. However, since we can’t visualize points in 100-dimensional space, we’ll have to reduce them to two dimensions.</p><p>To do so, we don’t just take the first two dimensions of the vectors and call it a day. Rather, we try to preserve some information from all of the dimensions, and keep points which are close in the 100-dimensional space close in the 2d space. There are a myriad of ways to do this “dimensionality reduction”. One that is particularly good for visualization is <a href="http://scikit-learn.org/stable/modules/manifold.html#t-sne">t-SNE</a>.</p><p>The plot of this 2d tag space is large, even if we’ve limited it to only tags which have more frequent usage, so we’ll take a closer look at some smaller regions of it.</p><h4>The Medium Tag Universe:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*4yx52hdn3hPKjOKnWIKRvQ.png" /><figcaption>A 2d plot of ~5000 tags and the regions we’ll be examining circled in red.</figcaption></figure><h4>The “Pets” Solar System:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*bgDl8v78YQM3CEktifM-Tw.png" /><figcaption>“Pets”, “Dog Training”, and “Animal Rescue” form a cluster along with related tags.</figcaption></figure><h4>The “Music” Spiral Galaxy with “Podcast” Arm:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*7ZSiR3Egat77Ok57KwbNnA.png" /><figcaption>A cluster of tags related to all aspects of music, including “Beyonce”, “Jazz”, and “Spotify”. Podcast tags are near.</figcaption></figure><h4>The “Storytelling” Galaxy Group:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCgiPKWF58aInTQepWfVMA.png" /><figcaption>Several clusters related to storytelling: TV and movies, books and genres, writing and blogging.</figcaption></figure><h4>The “Data” Galaxy:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*RITOCH7iqXpjkPxGnxbD-g.png" /><figcaption>A cluster containing tags like “Machine Learning”, “Jupyter”, and “Spark”. Speech Recognition and Virtual Assistants form a subcluster.</figcaption></figure><h4>The “Indian Politics” Solar System:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*k11tiht3XI-QWbBEmkNHpw.png" /><figcaption>A small cluster of Indian politics tags</figcaption></figure><h4>The “Family” Nebula:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*jBoNzCHMjMiEhmBJGmvn3w.png" /><figcaption>Tags relating to families, like “Genealogy”, “Parenting Advice”, and “Adoption”</figcaption></figure><h4>The “Gaming” Binary Galaxy:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qzLRJYYAUNaMaUIzHBfzUA.png" /><figcaption>Two gaming-related clusters. One with tags like “Game Design”, “Dungeons and Dragons”, and “Counter Strike”, and another with Virtual Reality tags.</figcaption></figure><h4>The “US Places” Galaxy:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*oFPM-hf12ta6GqlsyBmBnQ.png" /><figcaption>A cluster of some US Places (like “Detroit”, “Florida”, and “New York”) appear near housing-related tags and natural disasters.</figcaption></figure><p>Places are invariably clustered together, and often grouped by geography. Some places are located within other topical clusters. Virginia and Alabama are in the US Politics cluster. European and Asian countries are located in the Travel cluster. African countries are with non-profit and development tags.</p><h4>“Seasons” intergalactic dust:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*BULSQJcV4lwhxmlTqHhZPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*snwyYHGHa4deMtFzh_laqA.png" /><figcaption>The seasons formed two tiny clusters apart from others.</figcaption></figure><p>You might be wondering where “Spring” is. On Medium, more people are talking about software frameworks named <a href="https://en.wikipedia.org/wiki/Spring_Framework">Spring</a>, than the season, so it’s located near Java tags in the computer programming cluster.</p><h4>The “Storytelling” Galaxy in the Portuguese Universe:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*JmDJoL-npOdaYdLYR5lyEw.png" /><figcaption>Tags like “Ficção Científica” and “Como Escrever” in the cluster of storytelling tags from Portuguese posts.</figcaption></figure><p>Previously, we trained a tag embedding model using English posts only. If we train one using Portuguese posts, then we can relate Portuguese tags to each other.</p><h3>Use Cases</h3><p>Other than being really cool, there are several possible downstream uses for these tag vectors now that we have them.</p><h4>Synonymous tags</h4><p>There are many sets of tags on Medium that mean the same thing (e.g. “Science Fiction” and “SciFi”). Tags which mean the same thing are usually very close in the vector space. This could help us identify duplicate tags and normalize them.</p><h4>Other predictions</h4><p>Aside from helping us organize the tag space itself, these tag vectors could be used to help solve other prediction problems with machine learning. Machine learning algorithms take vectors as input <a href="https://en.wikipedia.org/wiki/Feature_(machine_learning)">features</a>. We could include tag vectors in any place where knowing the post’s tags might help with a prediction.</p><p>Being able to use these “dense” expressive vectors instead of the alternative for tags — sparse <a href="https://hackernoon.com/what-is-one-hot-encoding-why-and-when-do-you-have-to-use-it-e3c6186d008f">one-hot-encoded</a> vectors — should improve the algorithms’ ability to predict. The beginning of <a href="https://www.tensorflow.org/tutorials/word2vec#motivation_why_learn_word_embeddings">TensorFlow’s word2vec doc</a> describes why these vectors are better.</p><h3>Issues and Improvements</h3><p>The tag representations we’ve learned aren’t perfect. Here are some things we’d need to consider for future usage of tag vectors at Medium.</p><h4>Ambiguous tags</h4><p>There’s an issue that we’ve already seen with the “Spring” tag: ambiguity. “Spring” has at least two meanings on Medium. Many people use the tag for poetry about the season, but others use it for posts about the Java programming framework. We need to automatically detect that there are two distinct representations to learn: “Spring (season)” and “Spring (programming)”. This problem is called “word-sense disambiguation”. Luckily, it’s an <a href="http://ruder.io/word-embeddings-2017/index.html#multisenseembeddings">area of active research</a>.</p><h4>Bias</h4><p>People have discovered negative <a href="https://www.technologyreview.com/s/602025/how-vector-space-mathematics-reveals-the-hidden-sexism-in-language/">stereotype biases in word embeddings</a> (e.g. “boss” relates more strongly to “he” than “she”). I’ve been thinking about what this would mean for our tags. Obviously, these tag embeddings are completely at the whim of how people choose to use tags on Medium. We’re bound to have some undesirable <a href="https://en.wikipedia.org/wiki/Algorithmic_bias">algorithmic bias</a>.</p><p>Since countries represent groups of people, I thought it might be undesirable to associate countries with topics in some circumstances. African countries are quite close to charity tags. Puerto Rico = hurricanes, as far as tags are concerned. For any downstream use case, we’d have to consider this. De-biasing embeddings is an <a href="http://ruder.io/word-embeddings-2017/index.html#bias">area of active research as well</a>.</p><h4>Associating tags across languages</h4><p>If we find some tags that we know to be counterparts in another language, then we can train a <a href="http://ruder.io/cross-lingual-embeddings/">cross-lingual model</a> that embeds the tags from both languages in a shared vector space, so they could be directly compared.</p><h4>Alternate training algorithms</h4><p>We’re learning the “meaning” of these tags based on the tags that are chosen alongside it by authors, using word2vec. This was chosen because it was easiest to implement end-to-end. It’s possible that learning the vectors using other information would produce more effective vectors for us. For example, we could learn them using reading behavior instead of tag context. It’s also possible that it would find very similar relationships.</p><h3>Resources</h3><p>If you’re interested in learning more about embeddings and the algorithms used here, I’d recommend these resources:</p><ul><li><a href="https://arxiv.org/abs/1301.3781">Original word2vec paper</a>. The algorithm used to train word vectors, which we repurposed to train tag vectors.</li><li><a href="http://www.aclweb.org/anthology/W14-1618">Linguistic Regularities in Continuous Space Word Representations</a> (pdf). All about the neat analogies and arithmetic you can do with word vectors.</li><li><a href="http://www.jmlr.org/papers/volume9/vandermaaten08a/vandermaaten08a.pdf">Original t-SNE paper</a> (pdf). The dimensionality reduction technique used to take our 100-dimensional vectors down to a 2d visualization.</li><li><a href="http://colah.github.io/posts/2014-07-NLP-RNNs-Representations/">Deep Learning, NLP, and Representations</a>. If you already know a bit about neural networks and how they work, this post has a great explanation about how embeddings (including word vectors) are trained as a side effect of solving another task.</li><li><a href="http://ruder.io/word-embeddings-2017/index.html">Word embeddings in 2017: Trends and future directions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b9a78d77cf0" width="1" height="1" alt=""><hr><p><a href="https://medium.engineering/mapping-mediums-tags-1b9a78d77cf0">Mapping Medium’s Tags</a> was originally published in <a href="https://medium.engineering/">Medium Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happens When You Want to Retire from GitHub]]></title>
            <link>https://heathermoor.medium.com/what-happens-when-you-retire-from-github-979fb6b143b3?source=rss-9525fc61191f------2</link>
            <guid isPermaLink="false">https://medium.com/p/979fb6b143b3</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Heather Arthur]]></dc:creator>
            <pubDate>Thu, 31 Aug 2017 08:07:25 GMT</pubDate>
            <atom:updated>2017-09-02T05:01:39.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*WTlxV2hynUk7SBECykmWag.png" /></figure><h4>And some things I wished I’d known about open source</h4><p>Three years ago I essentially stopped maintaining my public code repositories on GitHub. Things were quiet on them, but occasionally I’d get a pull request from some poor soul, and I’d let their efforts languish, putting off the work to review it and make sure it fit. All of my repos were in unmaintained limbo, as it seems to happen to many projects on GitHub.</p><p>I felt bad about the wasted work people were putting in, so a couple years ago I decided to be explicit about the fact that my repos just weren’t being maintained. Little did I know this would be an epic mistake in some regards.</p><p>Many of these projects I hadn’t touched in awhile. One of them still had a contributor that I trusted, to whom I transferred it. Several of them had a good alternative already out there surpassing them in the Node.js world. For those I added a message to the README about the alternative. To all of them I added a simple, but obvious “UNMAINTAINED” to the repo description.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*KzWEcvUkMQBZQK4V6jp0kg.png" /><figcaption>Making things explicit</figcaption></figure><p>Where things were once quiet, there was sound. Once I’d made it explicit, I got a large uptick in contact. A couple people in the mix were asking to help out, others were upset, but many people just wanted to know why I wasn’t maintaining my GitHub anymore. Total strangers requested my personal reasons for stopping. No context, just “why aren’t you working on your GitHub projects anymore?”.</p><p>I took all my contact info down, but the emails and tweets kept coming steadily. Some people would keep contacting me regularly despite me never replying. I wrote a personal blog post about something unrelated and someone commented along the lines of “this is a sad story, but could you reply to these GitHub comments?”</p><p>This difference was remarkable. I regretted it and thought maybe I should have let things fade gradually into obscurity, but I still thought it was The Right Thing to Do given the capacity I had. More recently, I thought about deleting my Github account, but instead I tried a last resort. I removed my real name and just put up “Don’t Contact”. In the past couple weeks since then, I haven’t had anyone contact me! So, I’m very relieved that’s worked.</p><p>It seems like there’s no good way to admit bankruptcy on GitHub. All the while that I’d been creating these projects, I’d banked on everyone remembering “If you don’t like it, fork it”. In reality, it seems like forking isn’t accepted as a solution.</p><p>I mainly just wish I’d never gotten into this situation.</p><p>There are a few different kinds of open source. The open source in question involves writing some code as a personal side project, putting it on GitHub, and maintaining it without the support of an organization or employer. I’ve actually spent several years of my career on a different kind of open source: paid, organization-backed projects. This is just about the GitHub side project kind of open source.</p><p>I did a lot of this kind of open source a few years ago. Node.js was just starting and I was churning out libraries to fill the gaps for my other projects. I put every single side project on my public GitHub. I thought that it would just add more knowledge to the world, and maybe someone else could use my code or library.</p><p>This is probably the thing I would do over again. I might put one or two of these libraries up for public consumption, but definitely not the 20 or so that I did. It might be that I could have correctly maintained just one or two libraries without too much pain.</p><p>I say that I would still have put a couple of these up because there is one, and only one upside to open sourcing a side project as far as I can tell. That is, feeling like you might have helped out other people a bit. There are a couple projects in mind that might have helped a bit, enough to offset the downsides.</p><p>You might notice some upsides missing. One of which is professional opportunities. I don’t believe any of my individual repos got me anywhere closer to a job. What I <em>learned </em>from coding the projects got me a lot of experience, but they didn’t need to be open sourced.</p><p>And yeah, the downsides. <a href="https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/">This post</a> by <a href="https://medium.com/u/f1dca2e6c62e">Nolan Lawson</a> is an accurate description of the work involved in maintaining an open source project without organizational support. There’s a massive amount of tedious effort involved.</p><p>There was also a moment where several well-known, established programmers publicly <a href="https://harthur.wordpress.com/2013/01/24/771/">made fun of some of the code I posted</a>. This was at a time where I was still junior. It took away my confidence in my coding ability for awhile. It’s ironic because I’ve found the best way to build confidence is to do hard things you didn’t think you could do. Coding up these libraries and getting them working gave me real confidence in my coding. But, once again, I didn’t need to open source them to get that benefit.</p><p>I personally, despite a common mantra, regret many things I’ve done in my life. One of them is open sourcing all those side projects. I would have open sourced maybe a couple of them, and otherwise gotten experience from working on an established open source project, or my own projects in private.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=979fb6b143b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>