<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Engineering on p &lt; Whatever</title>
    <link>https://szeitlin.github.io/posts/engineering/</link>
    <description>Recent content in Engineering on p &lt; Whatever</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 03 Mar 2021 13:13:57 -0800</lastBuildDate>
    <atom:link href="https://szeitlin.github.io/posts/engineering/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>DVC_vs_Pachyderm</title>
      <link>https://szeitlin.github.io/posts/engineering/dvc_vs_pachyderm/</link>
      <pubDate>Wed, 03 Mar 2021 13:13:57 -0800</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/dvc_vs_pachyderm/</guid>
      <description>&lt;p&gt;I decided to embark on this comparison mostly out of curiosity. No tool is perfect for all use cases, that&amp;rsquo;s why&#xA;we have forks, and spoons, and sometimes when we&amp;rsquo;re camping, sporks. Although Pachyderm claims to use a git-style&#xA;approach for data and code versioning, there are aspects of the Pachyderm approach (like forking) that aren&amp;rsquo;t exactly&#xA;like git. So one thing I wanted to know is, how well does this analogy to git work for DVC? And are there use cases&#xA;where one should definitely use DVC or Pachyderm?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Test Patterns for Data Engineering</title>
      <link>https://szeitlin.github.io/posts/engineering/data-eng-test-patterns/</link>
      <pubDate>Fri, 26 Feb 2021 12:45:27 -0700</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/data-eng-test-patterns/</guid>
      <description>&lt;p&gt;Coming from a background in bench science, or what we affectionately referred to as &amp;ldquo;wetlab&amp;rdquo;, I like to test everything I do, and I like my tests&#xA;to be fast and representative of what I expect to find when I run things &amp;ldquo;for real&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Most people I&amp;rsquo;ve met who are newer to data engineering find that it&amp;rsquo;s not immediately obvious how to write and run tests for data things.&#xA;It&amp;rsquo;s different enough from writing unit tests for web apps that there are some pitfalls to be aware of. This post is about that.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Data Engineering Is Software Engineering</title>
      <link>https://szeitlin.github.io/posts/engineering/data-eng-is-real-eng/</link>
      <pubDate>Thu, 15 Oct 2020 09:47:10 -0700</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/data-eng-is-real-eng/</guid>
      <description>&lt;p&gt;Recently, a coworker asked me what the difference is between data science and data engineering.&#xA;She seemed to think that data engineering was “just analytics”, which is a definition I&amp;rsquo;ve often&#xA;heard applied to data science, as well.&lt;/p&gt;&#xA;&lt;p&gt;After I got over my initial horror that she had been wondering this for months and hadn’t asked sooner, I started to explain:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;Data engineering is getting data, cleaning data, reshaping data, validating data, and loading it into databases.&#xA;Data science is all of that, plus analyzing the data and figuring out how to display it in a way that makes sense,&#xA;and sometimes also building models and doing machine learning.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Postgres With Docker</title>
      <link>https://szeitlin.github.io/posts/engineering/postgres-with-docker/</link>
      <pubDate>Tue, 08 Oct 2019 15:03:46 -0700</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/postgres-with-docker/</guid>
      <description>&lt;p&gt;Recently, someone asked for help with setting up postgres in docker and connecting to it with python.&lt;/p&gt;&#xA;&lt;p&gt;While helping this person, I realized this is something that should be fairly straightforward with a&#xA;simple set of instructions, but there aren&amp;rsquo;t a lot good beginner tutorials out there. So I decided&#xA;to write this up because I&amp;rsquo;m sure it&amp;rsquo;s something other people would also find useful. A few years ago&#xA;I wouldn&amp;rsquo;t have been able to do this even with a lot of googling (this time I only had to google a few things!).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python OOP</title>
      <link>https://szeitlin.github.io/posts/engineering/python_oop/</link>
      <pubDate>Fri, 24 May 2019 13:29:53 -0700</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/python_oop/</guid>
      <description>&lt;p&gt;I frequently hear Python referred to as a &amp;lsquo;scripting&amp;rsquo; language, because it&amp;rsquo;s not compiled.&#xA;Unfortunately, for this reason, a lot of people seem to assume you can&amp;rsquo;t write &amp;lsquo;real&amp;rsquo; programs with it.&#xA;This post is about moving beyond using Python as a scripting language. I&amp;rsquo;m assuming you&amp;rsquo;re already comfortable with&#xA;basic python data types and methods.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Note: Most of the content here is specific to Python 3. If you&amp;rsquo;re just learning&#xA;Python now, don&amp;rsquo;t learn Python 2, it&amp;rsquo;s being deprecated and many current&#xA;libraries already stopped supporting it.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pachyderm vs Airflow</title>
      <link>https://szeitlin.github.io/posts/engineering/pachyderm-vs-airflow/</link>
      <pubDate>Sun, 02 Dec 2018 17:10:01 -0800</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/pachyderm-vs-airflow/</guid>
      <description>&lt;p&gt;If you do a lot of data pipelining, you&amp;rsquo;ve probably heard a lot about Airflow by now. I gave a talk&#xA;about it a while back at a meetup, and wrote a blog post about it. The gist of my pitch for Airflow&#xA;was essentially &lt;em&gt;&amp;ldquo;Look, it&amp;rsquo;s so much better than cron.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Fast-forward a year or two, and my team is using Pachyderm now. This post is about why I wanted to try Pachyderm,&#xA;what I love about it, some things that can be improved about it, and some of the tricks you&amp;rsquo;ll need to know if you want to start using it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>More AWS things I learned the hard way: S3 best practices and VPCs</title>
      <link>https://szeitlin.github.io/posts/engineering/aws-s3-vpc/</link>
      <pubDate>Sun, 02 Dec 2018 16:29:47 -0800</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/aws-s3-vpc/</guid>
      <description>&lt;p&gt;To make a long, mostly whiny story short, as part of my current role,&#xA;I&amp;rsquo;ve been doing a lot of fighting with AWS to help support my team.&lt;/p&gt;&#xA;&lt;p&gt;Some of the things I&amp;rsquo;ve learned along the way are probably not obvious if you, like me, are relying&#xA;mostly on AWS docs and other people&amp;rsquo;s advice, so I thought I&amp;rsquo;d collect some of them here.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;Best practices for storing big data on S3&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cross-account access with AWS</title>
      <link>https://szeitlin.github.io/posts/engineering/cross-account-access-aws/</link>
      <pubDate>Sat, 04 Aug 2018 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/cross-account-access-aws/</guid>
      <description>&lt;p&gt;&lt;em&gt;The scene:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I needed to process data from an s3 bucket using pyspark.&#xA;The s3 bucket was owned by a different account.&#xA;I had done this before.&#xA;But this time, there was a twist: we needed to encrypt the data&#xA;because of GDPR requirements.&#xA;At the end of the processing, I needed to&#xA;save the results to another s3 bucket for loading into Redshift.&lt;/p&gt;&#xA;&lt;p&gt;Thus began a weeks-long saga of learning about AWS the hard way.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Things I learned about Pyspark the hard way</title>
      <link>https://szeitlin.github.io/posts/engineering/things-i-learned-about-pyspark-the-hard-way/</link>
      <pubDate>Wed, 28 Mar 2018 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/things-i-learned-about-pyspark-the-hard-way/</guid>
      <description>&lt;h2 id=&#34;why-spark&#34;&gt;Why Spark?&lt;/h2&gt;&#xA;&lt;p&gt;Lately I have been working on a project that requires cleaning and analyzing a large volume of event-level data.&lt;/p&gt;&#xA;&lt;p&gt;Originally, I did some exploratory data analysis on small samples of data (up to 15 million rows) using pandas, my usual data visualization tools, and multiprocessing. But then it was time to scale up.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-spark-is-good-for-this&#34;&gt;Why Spark is good for this&lt;/h2&gt;&#xA;&lt;p&gt;Distributed processing means it&amp;rsquo;s very fast at very large scale, and we can scale it up with minimal adjustments (the same code still works, we just need a bigger cluster).&lt;/p&gt;</description>
    </item>
    <item>
      <title>A tutorial within a tutorial on building reusable models with scikit-learn</title>
      <link>https://szeitlin.github.io/posts/engineering/within-every-tutorial-is-another-tutorial/</link>
      <pubDate>Mon, 12 Sep 2016 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/within-every-tutorial-is-another-tutorial/</guid>
      <description>&lt;p&gt;Things I learned while following &lt;a href=&#34;http://blog.districtdatalabs.com/building-a-classifier-from-census-data/&#34;&gt;a tutorial&lt;/a&gt; on how to build reusable models with scikit-learn.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;When in doubt, go back to pandas.&lt;/li&gt;&#xA;&lt;li&gt;When in doubt, write tests.&lt;/li&gt;&#xA;&lt;li&gt;When in doubt, write helper methods to wrap existing objects, rather than creating new objects.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;ingesting-clean-data-is-easy-right&#34;&gt;Ingesting &amp;ldquo;clean&amp;rdquo; data is easy, right?&lt;/h2&gt;&#xA;&lt;p&gt;Step 1 of this tutorial began with downloading data using &lt;a href=&#34;http://requests.readthedocs.io/en/master/&#34;&gt;requests&lt;/a&gt;, and saving that to a csv file. So I did that. I&amp;rsquo;ve used requests before, I had no reason to think it wouldn&amp;rsquo;t work. It looked like it worked.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Shuffling the deck: an interview experience</title>
      <link>https://szeitlin.github.io/posts/engineering/shuffling-the-deck-an-interview-question/</link>
      <pubDate>Thu, 16 Jun 2016 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/shuffling-the-deck-an-interview-question/</guid>
      <description>&lt;p&gt;Here is a story about an interesting interview question and how I approached it.&lt;/p&gt;&#xA;&lt;p&gt;The company in question wasn&amp;rsquo;t interested in actually looking at my code, since I apparently tried to answer the wrong question.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;Given a deck of n unique cards, cut the deck c cards from the top and perform a perfect shuffle. A perfect shuffle is where you put down the bottom card from the top portion of the deck followed by the bottom card from the bottom portion of the deck. This is repeated until one portion is used up. The remaining cards go on top.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Test-driven data pipelining</title>
      <link>https://szeitlin.github.io/posts/engineering/test-driven-data-pipelining/</link>
      <pubDate>Mon, 08 Feb 2016 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/test-driven-data-pipelining/</guid>
      <description>&lt;h2 id=&#34;when-to-test-and-why&#34;&gt;When to test, and why:&lt;/h2&gt;&#xA;&lt;p&gt;• Write a test for every method.&lt;/p&gt;&#xA;&lt;p&gt;• Write a test any time you find a bug! Then make sure the test passes after you fix the bug.&lt;/p&gt;&#xA;&lt;p&gt;• Think of tests as showing how your code should be used, and write them accordingly. The next person who&amp;rsquo;s going to&#xA;edit your code, or even just use your code, should be able to refer to your tests to see what&amp;rsquo;s happening.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Data pipelining with pandas</title>
      <link>https://szeitlin.github.io/posts/engineering/data-pipelining-with-pandas-automating-lookup-and-update/</link>
      <pubDate>Sat, 02 Jan 2016 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/data-pipelining-with-pandas-automating-lookup-and-update/</guid>
      <description>&lt;p&gt;For better or worse, when you&amp;rsquo;re dealing with data pipelines of varying shapes and sizes, sometimes you need to combine objects that don&amp;rsquo;t match up evenly.&lt;/p&gt;&#xA;&lt;p&gt;For example, if you want to apply a condition via lookup, sometimes it makes sense to just do a merge. This creates a new column in your data table, and then you can use that for reference.&lt;/p&gt;&#xA;&lt;p&gt;This is an extremely simple example to show what I mean:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Things I learned about zip files</title>
      <link>https://szeitlin.github.io/posts/engineering/things-i-learned-about-zip-files-last-week/</link>
      <pubDate>Thu, 15 Jan 2015 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/things-i-learned-about-zip-files-last-week/</guid>
      <description>&lt;p&gt;In an effort to advance my python skills, I spent some time slowly pecking away at &lt;a href=&#34;http://pythonchallenge.com&#34;&gt;the puzzles on pythonchallenge&lt;/a&gt;. I got stuck on most of the challenges, and either had to search for a hint, or ask for help from a friend, or both. This latest one was particularly instructive, and it had to do with zipfiles.&lt;/p&gt;&#xA;&lt;p&gt;I thought I knew what zip files were. I have used them since grad school, for transferring folders via email, and for compression. I used various utilities and command-line tools to deal with zipping and unzipping. But I never needed to know how they worked.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating user-friendly documentation with Selenium</title>
      <link>https://szeitlin.github.io/posts/engineering/automating-user-friendly-documentation-using-selenium-/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/automating-user-friendly-documentation-using-selenium-/</guid>
      <description>&lt;p&gt;Once upon a time, a friend recruited me to do some technical writing for the company where he works now. Basically, they needed someone to quickly revise and update the documentation for their software.&lt;/p&gt;&#xA;&lt;p&gt;Most modern user-friendly software documentation isn&amp;rsquo;t just writing, though. It&amp;rsquo;s screenshots. A LOT of screenshots. So you don&amp;rsquo;t just write &amp;ldquo;click on the blue box&amp;rdquo;, you also show a picture of it, like this. See the blue box?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fun with text file encodings</title>
      <link>https://szeitlin.github.io/posts/engineering/fun-with-failing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/fun-with-failing/</guid>
      <description>&lt;p&gt;This post is about a couple of painful problems I&amp;rsquo;ve had with reading in text files.&lt;/p&gt;&#xA;&lt;p&gt;They&amp;rsquo;re just text files, right? What could be hard about that?&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-fun-with-encoding&#34;&gt;&lt;strong&gt;1. Fun with encoding&lt;/strong&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The problem:&lt;/p&gt;&#xA;&lt;p&gt;A friend sent me a dump of data from iTunes, as a table.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Just a text file.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;She&amp;rsquo;s on a Mac. I&amp;rsquo;m on a Mac. But when I went to read in the file, Python choked in a way I hadn&amp;rsquo;t seen before.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quick and dirty: plot your data on a map with python</title>
      <link>https://szeitlin.github.io/posts/engineering/quick-and-dirty-plot-your-data-on-a-map/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/quick-and-dirty-plot-your-data-on-a-map/</guid>
      <description>&lt;p&gt;Once upon a time, I looked at a couple of data sets that involved geographical data. I wanted to actually plot the data on a map, so I had to do some shopping around for easy ways to do this quickly with python.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;what-i-wanted-to-do&#34;&gt;What I wanted to do&lt;/h2&gt;&#xA;&lt;p&gt;One of the data sets provided zipcodes, which I was able to convert to latitude and longitude (more on this below). At a minimum, I knew I wanted to be able to plot: a) location, b) a number value and text label, c) multiple colors designating groups of data points, e.g. &amp;lsquo;high&amp;rsquo; or &amp;rsquo;low&amp;rsquo; values for a particular variable, which ideally could be toggled on and off.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Recursion excursion</title>
      <link>https://szeitlin.github.io/posts/engineering/recursion-excursion/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://szeitlin.github.io/posts/engineering/recursion-excursion/</guid>
      <description>&lt;p&gt;More than once, and probably not for the last time, I have done a technical interview for which I was underprepared.&#xA;I feel like no matter how much I try to prepare, I am always underprepared for technical interviews.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going to tell you about a time I was underprepared for a few reasons, including:&lt;/p&gt;&#xA;&lt;p&gt;a) It was the first interview where I was asked to write more than a couple lines of recursive code&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
