<?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 Dave Bletsch on Medium]]></title>
        <description><![CDATA[Stories by Dave Bletsch on Medium]]></description>
        <link>https://medium.com/@davebletsch_48259?source=rss-bc85b36bac41------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XWWtDpCOWbE_9f6x</url>
            <title>Stories by Dave Bletsch on Medium</title>
            <link>https://medium.com/@davebletsch_48259?source=rss-bc85b36bac41------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 01:53:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davebletsch_48259/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[Py-phenator]]></title>
            <link>https://medium.com/@davebletsch_48259/py-phenator-47f6190a8007?source=rss-bc85b36bac41------2</link>
            <guid isPermaLink="false">https://medium.com/p/47f6190a8007</guid>
            <category><![CDATA[automator]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[punctuation]]></category>
            <dc:creator><![CDATA[Dave Bletsch]]></dc:creator>
            <pubDate>Wed, 29 Jul 2020 21:02:04 GMT</pubDate>
            <atom:updated>2020-08-07T16:30:04.960Z</atom:updated>
            <content:encoded><![CDATA[<h4>Solving an annoying problem for grammar nerds using <br>Python and MacOS Automator</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XQb5dYrgEUSEYWph" /><figcaption>Photo by <a href="https://unsplash.com/@sandym10?utm_source=medium&amp;utm_medium=referral">Sandy Millar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I am a self-proclaimed grammar nerd. Actually, I’ve often used stronger language, or at least been described with words much harsher than “nerd.” This is particularly important in modern forms of instant electronic communication.</p><p>Like most of you, I prefer to text. Nine times out of ten, the reason for my communication is better served by a few lines of text rather than a 45 second phone call filled with the niceties that have become required with all verbal communications: “Hey!”, “How’s it going?”, “Do you have a second?”, “I’ll do that and then get back to you in a minute.”, “See ya.”. None of these take much time to say, and all are pretty much a reflex. But electronic communications often don’t require these pleasantries. An email, a text message, social media DMs can be devoid of everything except the summary and still be deemed appropriate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t5iieE6yo24dApo8" /><figcaption>Photo by <a href="https://unsplash.com/@charlesdeluvio?utm_source=medium&amp;utm_medium=referral">Charles Deluvio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So the long and short of it is, I text a lot. And I’m at my computer (Mac) a lot. So much of the messaging that I do, I am able to do on a full keyboard. This allows me the opportunity to very quickly write out exactly what is on my mind, and to do so using as much effective punctuation as possible. (The one exception is to capitalize letters. Which I do only when it makes my message more readable as I prefer the aesthetic of all lowercase letters.)</p><p>Some of the people with whom I often message do not feel the same way about grammar, spelling, and punctuation. (BTW, I’m also pro-Oxford comma!) It’s more of a pet-peeve at this point as I’ve become quite adept at deciphering what was intended. Taken out of context, one might find some of the messages I receive to be virtually illegible. As a result, I make a point to always take the extra time to use appropriate punctuation. Even in the worst case scenario: <strong>the compound phrase</strong>.</p><p>Most would agree with me that proper punctuation makes reading communications much easier; however, most would also agree that casual communications can pass with the bare minimum. As I mentioned before, I tend to be on the opposite end of the spectrum. The best example of this that I can think of are phrases which should be hyphenated. Most of the time, hyphens fall in between two or three components of a compound word. Therefore, after typing out the compound word and realizing my spaces should actually be hyphens, it’s not too difficult to backtrack and do the replacements manually.</p><p>The difficulty arises when I come across a compound phrase of five, six, or ten components. Now the backtracking, deleting, typing, and repeating has become tedious and cumbersome. There must be another way.</p><p>I started by reaching for Al Sweigart’s <em>Automate the Boring Stuff with Python</em>. Seems like a good choice as I was actually trying to automate boring things with the programming language I’ve been learning for the past few months. In appendix B of his book, Sweigart explains how to write a script and make it executable. Which I did. Coincidentally, I also used his <a href="https://pypi.org/project/pyperclip/"><em>pyperclip</em></a> module which allows python to access the clipboard that we load and unload with the copy and paste functions.</p><p>My original script functioned properly after only a few minutes of tinkering.</p><pre>#! /usr/local/bin/python3</pre><pre>import pyperclip</pre><pre>text = pyperclip.paste()<br>h_text = text.replace(‘ ‘, ‘-’)</pre><pre>pyperclip.paste(h_text)</pre><p>The problem was that this was a bit of a hassle. In order to hyphenate a phrase, the process was:</p><ol><li>Highlight text to be hyphenated.</li><li>CMD + C to copy</li><li>CMD + tab to switch over to the terminal.</li><li>Navigate to the directory where the executable Python script was located.</li><li>Execute the Python script (./pythenator).</li><li>Navigate back to the original highlighted text.</li><li>CMD + V to paste over the original with the newly-hypenated phrase.</li></ol><p>Now this certainly didn’t save any time or keystrokes, but with a script written, all I had to do with find a way to make the process more streamline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*WOLbinSQR3Ke9pGVEVoN6Q.jpeg" /></figure><p>Enter MacOS Automator.</p><p>When creating a new Automator file, the help wizard gives the option of creating a “Quick Action.” These quick actions show up in the context menu (i.e. the right-click drop down). On the left-hand side of the screen we can select the Utilities Library which contains the option to Run Shell Script. By dragging this option into our workflow, we can gain access to a few options that we’ll want to change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*HLxQ-NPmjFXJcoCGLK3htw.png" /></figure><ol><li>Select the Utilities Library</li><li>Drag “Run Shell Script into workflow</li><li>Change the Shell: /usr/bin/python</li><li>Change the input: “to stdin” instead of “as arguments”</li><li>Copy and paste the Python script into the input field below.</li></ol><p>I figured this would be the end of it, but as so many things in the world of programming, I was throwing some errors.</p><ul><li>pyperclip is a pip install. But my bash shell defaults to Python 3.8. Therefore, when I installed pyperclip via Terminal, I installed it on that version of Python. Unfortunately, the Automator Shell Script runs based on the python in the Shell path dropdown (Step 4 above). Therefore, I had to make sure there was a copy of pyperclip in the library of that version of Python (which happens to be 2.6).</li><li>I was also able to remove the shebang line from the beginning of my script. And though I already made the file executable, since I was pasting the script into the Shell Script window, this now became moot. Unless for some reason I really want to go through the long process that I originally described. Which, obviously, I do not.</li></ul><p>The finished product looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*w6ZGmq09LihN39MMX0bn0A.png" /><figcaption>Highlight the to-be-hyphenated text. CMD + C to copy to the clipboard.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*vCyODidhoZAtn-emMhSWyQ.png" /><figcaption>Right Click to bring up the Quick Service Context Menu</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*N9YitgOFORObKL7Xxb5obg.png" /><figcaption>Select the Automator Script — Pyphenator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*vjHfacsINq8BoOVkq8CvUg.png" /><figcaption>CMD + V to paste the results over the already highlighted text</figcaption></figure><p>This was a fun implementation of a very simple Python script (literally 4 lines of code). My next steps will be to implement a keyboard shortcut and also to implement on iOS so that I will be able to do this via my mobile devices rather than just on my MacBook.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f6190a8007" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dash]]></title>
            <link>https://medium.com/@davebletsch_48259/dash-9523bdccb82?source=rss-bc85b36bac41------2</link>
            <guid isPermaLink="false">https://medium.com/p/9523bdccb82</guid>
            <dc:creator><![CDATA[Dave Bletsch]]></dc:creator>
            <pubDate>Tue, 11 Feb 2020 14:18:32 GMT</pubDate>
            <atom:updated>2020-02-11T14:18:32.073Z</atom:updated>
            <content:encoded><![CDATA[<h4>Interactive apps with Plotly</h4><p>We’ve been told since day 1 that one of the most important roles of a data scientist is to communicate to non-data folks — the role of translator, if you will.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*RfoWvCNs9iSO9jad_Nce4g.jpeg" /></figure><p>This figure is one of many like it, that explain a predictive model. But displaying a series of tables like this one would bore even the most eager data nerd.</p><p>What if we had an interactive tool. One that would allow a non-data-minded user to adjust inputs and see real-time outputs. We would be able to visualize the relationship between the data and the effect that changing independent variables can have.</p><h4>Dash is just that tool.</h4><p>According to their official documentation:</p><blockquote>“Dash is a productive Python framework for building web applications.”</blockquote><p>Seems simple enough. I’d like to focus first on the end of that definition — “web applications.”</p><p>Dash renders apps in a web browser — something that is commonplace on virtually every device in the world today. This means that apps created with Dash will be easily transferrable and usable/viewable. (Hopefully this will aid in the communication process!)</p><blockquote>“…Dash is inherently cross-platform and mobile ready.”</blockquote><h3>Components</h3><p>It is built on: Plotly, Flask, React, and JavaScript.</p><ul><li>Ploty — a JavaScript library and therefore inherently interactive (hoverable, zoomable, scrollable, etc)</li><li>Flask — web framework built with Python using the React.js library</li></ul><h3>Process</h3><ul><li>Install necessary components: dash, a renderer, html components, core components, and plotly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*3q-aSN49IngyPi1UVFxM5w.png" /></figure><ul><li>Instantiate an Dash app object</li><li>Define <strong>layout</strong> elements (headers, input dropdowns, sliders, check boxes, graph objects, etc.)<br>- similar html tags (Div, H1, id, fig, etc.)<br>- formatting styles in dictionary form</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*A0DRXR7wEn-4FJlU8flOTA.png" /></figure><ul><li>Describe <strong>interactivity</strong> — how output elements will update (based on input dropdown menus, API calls, python-written functions, etc.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*9nmRAopWCQU7k2DA_0qsTw.png" /></figure><p><strong>Additional Features</strong></p><p>Authentication — password protection</p><p>Public Hosting — external server accessible to all</p><p>This is a bored Dash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*ejXwu7FU-KQlc765R1kNKg.jpeg" /><figcaption>courtesy of Pixar, 2004</figcaption></figure><p>This is a dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*iCmDXo3UK0JrfxDwbsslNw.gif" /><figcaption>courtesy of Marco Sanchez-Ayala</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9523bdccb82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Languages of the Data Scientist]]></title>
            <link>https://medium.com/@davebletsch_48259/languages-of-the-data-scientist-83fde6c0f6d4?source=rss-bc85b36bac41------2</link>
            <guid isPermaLink="false">https://medium.com/p/83fde6c0f6d4</guid>
            <dc:creator><![CDATA[Dave Bletsch]]></dc:creator>
            <pubDate>Tue, 11 Feb 2020 14:17:08 GMT</pubDate>
            <atom:updated>2020-02-11T14:17:08.939Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Languages of the Data Scientist</strong></p><p>Is one better than the other?</p><p>Language is tough. Learning languages has been proven difficult the older we get. Yet with communication being a part of, well… everything, the need for breaking down communication barriers is important.</p><p>Languages for Data Scientists:</p><ul><li>Python (obviously)</li><li>R</li><li>Scala (Java)</li><li>Julia</li><li>SAS</li><li>SQL</li></ul><h4>SQL</h4><p>It could be argued that this is not a programming language (despite “language” being in its acronym). All of these languages utilize SQL for database management.</p><p>SQL is a fourth-generation language as human-like syntax is used to retrieve and manipulate data. So while it may be intuitive to understand with an easier learning curve, SQL does lack many of the features of the rest on this list. Important, but not an all-in-one.</p><h4>SAS (Statistical Analysis Systems)</h4><p>It already sounds good!</p><ul><li>Intuitive fourth generation language</li><li>Interactive — log window instructs the user with notes and errors (not supported on all platforms)</li><li>Built-in data analysis/data reporting libraries (no importing)</li><li>Can manipulate data within its database and incorporates encryption and security algorithms</li><li>SAS Studio — accessible via any web browser with no installation necessary</li><li>Report Output Format — display results in easy-to-read reports and graphics (including PowerPoint and .pdf formats)</li></ul><p>But,</p><ul><li>free version is not an all-inclusive package</li><li>not open source and therefore packages and libraries don’t update as often as the open-source languages we know</li><li>advanced tools are expensive and difficult to incorporate</li></ul><p>** however, it is highly reliable with a strong support system for users **</p><h4>Scala (JVM)</h4><ul><li>based on Java (fast)</li><li>one of the oldest languages and therefore incorporated/established in many industries (still the most frequently sought-after language skill on job posts)</li><li>many big data tools (Hadoop, Flink, Spark) are written in Java</li><li>identical code on multiple platforms via Java Virtual Machine</li></ul><h4>Julia</h4><ul><li>easy learning curve (very similar to Python)</li><li>super fast (based on C)</li><li>useful for complex mathematical operations</li><li>used for risk analytics with FLUX, ML architecture</li></ul><h3>Up-and-Coming</h3><h4>Rust</h4><p>Developed by Mozilla (endorsed by Charlie’s brother)</p><h4>Dart</h4><p>Google’s programming language</p><h4>R</h4><ul><li>most used language of Data Scientists</li><li>open-source and completely free</li><li>command-line driven (but user interfaces exist like RGUI &amp; RStudio)</li><li>works well with complex data objects of varying sizes</li><li>community support, collaborative package development</li><li><strong>*graphical libraries are extensive for translating analysis to non-technical audiences</strong></li><li>*pro/con, R is not a general purpose language used for other tasks</li></ul><p>Unfortunately,</p><ul><li>*pro/con, R is not a general purpose language used for other tasks</li><li>designed and written by statisticians</li><li>can’t handle auto-formatting characters (copy-paste problems)</li></ul><h3>R vs. Python</h3><ul><li>R was developed by statisticians for complex analysis,<br>Python by developers and programmers for readability and versatility</li><li>Syntax learning curve<br>R: variable assignment can go both ways denoted by arrows or =<br>(&lt;- , -&gt;, =)<br>Python: assignment operator is consistent throughout (=)</li></ul><pre># Assignment using equal operator.<br>var.1 = c(0,1,2,3)           </pre><pre># Assignment using leftward operator.<br>var.2 &lt;- c(&quot;learn&quot;,&quot;R&quot;)   </pre><pre># Assignment using rightward operator.   <br>c(TRUE,1) -&gt; var.3</pre><ul><li>For most purposes, speed difference is negligible. If speed is relevant, probably would want to investigate Julia/Scala.</li></ul><h4>*Speed</h4><p>Python is faster than R using loops with fewer than 1,000 steps (up to 8x faster).</p><p>After 1,000 steps, the function lapply in R is faster than Python’s for loop.</p><blockquote>What if we were iterating through millions of records? (Julia and Scala)</blockquote><blockquote>Julia was specifically designed for performing complex mathematical operations via C (notoriously fast language).</blockquote><ul><li>Visualization<br>R: many packages (ggplot2, plotly, Leaflet, Lattice, highcharter, Sunburst, RGL, etc.)<br>Python: few packages (matplotlib, seaborn, ggplot, plotly)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*QPf0TN_FQe9LtIyjq1ajwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*HBdUwDRqy8OYM6hKOdeiyA.png" /><figcaption>Scatter Plots R vs. Python</figcaption></figure><ul><li>Deep Learning (AI) with Keras and KerasR (written in Python)</li><li>popularity<br><strong>TIOBE index (T</strong>he <strong>I</strong>mportance <strong>O</strong>f <strong>B</strong>eing <strong>E</strong>arnest)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*7Iwdv6TByxWv_QNzCA-kNA.jpeg" /></figure><h3>In summary:</h3><p><strong>Julia</strong> and <strong>Scala</strong> — promising young languages both with significant upside and features</p><p><strong>SAS</strong> — widely used but not free</p><p><strong>R </strong>— industry specific but very powerful</p><p><strong>Python</strong> — powerful with user/programmer in mind</p><p>References:</p><ul><li><a href="https://datascienceplus.com/loops-in-r-and-python-who-is-faster/">Loops in R and Python: Who is faster?</a></li><li><a href="https://mode.com/blog/r-data-visualization-packages">9 Useful R Data Visualization Packages for Any Discipline</a></li><li><a href="https://www.tutorialspoint.com/r/r_variables.htm">R - Variables</a></li><li><a href="https://www.tiobe.com/tiobe-index/">TIOBE Index - TIOBE</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83fde6c0f6d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Commit Messaging]]></title>
            <link>https://medium.com/@davebletsch_48259/git-commit-messaging-40305484282b?source=rss-bc85b36bac41------2</link>
            <guid isPermaLink="false">https://medium.com/p/40305484282b</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Dave Bletsch]]></dc:creator>
            <pubDate>Tue, 05 Nov 2019 18:55:20 GMT</pubDate>
            <atom:updated>2019-11-05T18:55:20.385Z</atom:updated>
            <content:encoded><![CDATA[<h4>and why format matters</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*ptLWrXFw7_rYJU87BUICvQ.jpeg" /></figure><blockquote>“…organization will set you free.”</blockquote><blockquote>— Alton Brown, Good Eats</blockquote><p>For the longest time, I’ve been <em>particular</em> (for lack of a better term) — I always sleep on the left (stage left) side of the bed, I squeegee the bathroom walls every time I shower, the labels of everything in my kitchen cabinets face the same way. Tidiness gives me a sense of comfort, a sense of correctness, a sense of completion. More importantly, a lack of tidiness makes me feel quite the opposite.</p><p>And this has served me well throughout most of my adult life, including an already lengthy career in restaurants and bars — a notoriously un-tidy environment. There’s no doubt that a neat work station is easier to navigate, especially if multiple people will be using it. Furthermore, most who happen upon a neat and organized area feel good about it. I’ve never met someone who preferred a mess. So doing something that I naturally enjoy more than the next person which makes that person’s life a little bit easier and (dare I say) more enjoyable is a win-win in my book.</p><p>However, I’m currently enrolled in a 3.5 month data science bootcamp. This is a subject that some spend years learning and even longer becoming proficient. Compressing years worth of material into a few months means things move pretty quickly. As I’m realizing more and more each day, it is not possible to gain competency (let alone fluency) in every topic on the first attempt. I constantly add to a list of review topics that I plan to dive into at a later date when I either have the time to go over things or I have the need to utilize the tools and techniques that I couldn’t fully grasp.</p><p>In short, there are a lot of loose ends. I don’t feel complete. But I’m getting there.</p><p>I believe there are certain steps that I can take now to develop good habits that hopefully I will use throughout my new career as a data scientist — adhering to a standardized style of programming, if you will. While I understand “industry-standard” is not necessarily defined when it comes to many facets of programming, there are some areas where consistency can be a great benefit.</p><p>One that I would like to focus on is messaging protocol when making a commit to a Git repository.</p><p>The <strong>terminal shell</strong> was completely foreign to me when I began programming. My mouse didn’t work the way I’ve grown accustomed to, error messages were difficult to decipher, half the time it doesn’t even seem like it’s written in English. So when it came time to learn version control with Git, I did a lot of emulating. I would read commands that I found online or in textbooks and enter them without fully understanding what they actually did. Add? Fetch? Commit? Sure.</p><p>One of the few bits of punctuation that I noticed while looking up these commands was the use of a hyphen followed by the letter ‘m’ and some variation of the message in quotes: ‘your message here.’ Seemed simple enough — when committing and pushing files to a repository, its good practice to let other users (including my future self) know exactly what I was doing here. But 3 words does not an accurate description make.</p><p>I quickly learned during my <strong>first group project</strong> that this was not as easy as it sounds. With no template or naming convention, files from the three of us had massively long titles or, worse, took way too long to locate. There had to be a better way.</p><p><strong>Potential Problems</strong>:</p><ul><li>mismatched “standards” in file naming</li><li>inaccurate/vague descriptions</li><li>committing multiple significant changes together</li><li>committing formatting changes with functional changes can sometimes cause important functional changes to get buried making them difficult for collaborators to see</li><li>assuming other reviewers know everything about the history of the project</li><li>didn’t answer <em>why</em> changes were made</li></ul><p><strong>Benefits</strong>:</p><ul><li>readability/ease of use for new users</li><li>track-ability for long projects</li><li>easily revert to an earlier version in case of mistakes (search-ability)</li></ul><p>Where to begin?</p><p>Fortunately, as with most things in the world of programming, a wiser person who came before us has done most of the leg work already. Tim Pope wrote a <a href="https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">blog</a> in 2008 that has been referenced by quite a few people who have written about this subject, and Chris Beams <a href="https://chris.beams.io/posts/git-commit/">expanded on it</a> in 2014. In their experience, there are a few guidelines to follow to both help yourself and to help the rest of your team/collaborators/reviewers of your commits.</p><h3>The seven rules of a great Git commit message</h3><h4>1 . Separate the subject and body with a blank line</h4><ul><li>Git uses this line as a title many times</li><li>git format-patch, git send-email — If sending out via email, git will use this line as the subject</li><li>git log --oneline,git shortlog— These types of commands will print out just this subject line of the commits</li></ul><h4>2 . Subject limit recommendation: 50 chars</h4><ul><li>not a hard and fast rule, but GitHub will give a warning after 50 chars.</li><li>it is a summary — if longer than 50 chars, it can probably go in the body</li><li>if the commit takes more than 50 chars, maybe it should be done in more than a single commit</li></ul><h4>3. Capitalize subject line</h4><h4>4. Do NOT end subject line with a period</h4><h4>5. Use the <em>imperative</em> mood in the subject line</h4><ul><li>sounds like a command, as though the commit is telling the reader what to do, not what it did (which would be the <em>indicative</em> mood)</li><li>in fact, this is how Git “speaks” (merge, fetch, remove)</li><li>Use this simple rule: “if applied, this commit will…”</li></ul><h4>6. Wrap the body to 72 chars</h4><ul><li>72 is standard due to the first computers receiving input via 80-column punch cards</li></ul><blockquote>A legacy of the 80 column punched card format is that a display of 80 characters per row was a common choice in the design of character-based terminals. As of November 2011 some character interface defaults, such as the command prompt window’s width in Microsoft Windows, remain set at 80 columns and some file formats, such as FITS, still use 80-character card images. — wikipedia</blockquote><ul><li>(Less 4 columns on each side for indenting purposes)</li><li>Adding proper notation via the command line with -m messages can be very cumbersome. Instead, one could set up a template in the config folder on the local machine. The following is from Git’s own documentation:</li></ul><blockquote>For instance, consider a template file at ~/.gitmessage.txt that looks like this:</blockquote><pre>Subject line (try to keep under 50 characters)</pre><pre>Multi-line description of commit,<br>feel free to be detailed.</pre><pre>[Ticket: X]</pre><blockquote>Note how this commit template reminds the committer to keep the subject line short (for the sake of git log --oneline output), to add further detail under that, and to refer to an issue or bug tracker ticket number if one exists.</blockquote><blockquote>To tell Git to use it as the default message that appears in your editor when you run git commit, set the commit.template configuration value:</blockquote><pre>$ git config --global commit.template ~/.gitmessage.txt<br>$ git commit</pre><blockquote>Then, your editor will open to something like this for your placeholder commit message when you commit:</blockquote><pre>Subject line (try to keep under 50 characters)</pre><pre>Multi-line description of commit,<br>feel free to be detailed.</pre><pre>[Ticket: X]<br># Please enter the commit message for your changes. Lines starting<br># with &#39;#&#39; will be ignored, and an empty message aborts the commit.<br># On branch master<br># Changes to be committed:<br>#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)<br>#<br># modified:   lib/test.rb<br>#<br>~<br>~<br>&quot;.git/COMMIT_EDITMSG&quot; 14L, 297C</pre><h4>7. Explain what and why, not how</h4><ul><li>The <em>HOW</em> is usually explained via properly commented code (or is actually self-explanatory). The <em>WHAT </em>and <em>WHY </em>are not. These are the questions that should be answered in commit messages.</li><li>This is especially important for future readability and outside reviewers.</li></ul><h3>Resources:</h3><ul><li><a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration">Git - Git Configuration</a></li><li><a href="https://chris.beams.io/posts/git-commit/">How to Write a Git Commit Message</a></li><li><a href="https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">A Note About Git Commit Messages</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40305484282b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turtle Power]]></title>
            <link>https://medium.com/@davebletsch_48259/turtle-power-ebbfa38bb956?source=rss-bc85b36bac41------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebbfa38bb956</guid>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[beginner-data-science]]></category>
            <category><![CDATA[python-beginner]]></category>
            <dc:creator><![CDATA[Dave Bletsch]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 21:56:13 GMT</pubDate>
            <atom:updated>2019-10-20T21:56:13.463Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong><em>How a single video started a movement and what that means for the future of the bar and restaurant world</em></strong></h4><p>For those of you who use plastic straws, I encourage you to stop. According to LonelyWhale.org, a not-for-profit that advocates for the health of our oceans:</p><blockquote>Most plastic straws are <strong>too lightweight</strong> to make it through the mechanical recycling sorter. They drop through sorting screens and mix with other materials and are too small to separate, contaminating recycling loads or getting disposed as garbage.</blockquote><p>For those of you who don’t want to stop, watch the heartbreaking 2017 <a href="https://youtu.be/4wH878t78bw">video</a> of marine biologist Christine Figgener and her team removing a straw from the nose of a sea turtle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*Dnwxx4cFznIOFf77XwYwcA.jpeg" /><figcaption>No more straws, please!</figcaption></figure><p>This one video caused a ripple in the restaurant and bar world that eventually resulted in the industry powerhouse that is Starbucks announcing that they would be phasing out plastic straws (which could take up to 600 years to break down). There is now a movement towards fewer single-use plastics, and sustainability is at the forefront of innovative discussion and a number of educational events.</p><h4>I believe data science can play a big role in the future of this movement.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4xTUYWKaiGhe6of-" /><figcaption>Photo by <a href="https://unsplash.com/@blakewisz?utm_source=medium&amp;utm_medium=referral">Blake Wisz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>How big data is currently used in the bar and restaurant world and how they really s<em>hould</em> be using it</h3><p>As most of you are aware, food and beverage outlets can increase profits in one of two ways:</p><ol><li><strong>increase revenues</strong>: put more butts in the seats, sell more booze, get people to eat dessert, turn tables, push appetizers, etc.</li><li><strong>decrease costs</strong>: buy cheaper rum, serve smaller steaks, use less expensive spoons, single-ply TP, etc.</li></ol><p>Most current efforts which utilize the large amounts of raw data are doing so to market to the consumer. Big chains are targeting ads based on things like:</p><ul><li>social media likes and dislikes</li><li>purchasing history</li><li>internet searches</li><li>self-published feedback on previous restaurant experiences</li><li>time-specific location data (e.g. sending push notifications with coupons right when a returning customer leaves the house to drive the kids to soccer practice)</li></ul><p>The goal here is simple — increase the money coming in.</p><p>And it has worked. Even outdated companies like Applebee’s and TGIFriday’s were able to use data to determine how (and to whom) they should focus their marketing efforts. In 2017, after chasing anecdotal industry trends, Applebee’s retooled their menu to go after Millennials. In reality, they abandoned their loyal customer base (middle-America Baby Boomers and Gen Xers). After a big data initiative that utilized many of the above-mentioned techniques, Applebee’s has seen big increases in many areas that suffered after the changes of a few years ago solidifying data analytics as a key part of the decision making process moving forward.</p><p>Great. Big companies want more market share. More revenues. More money.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FQphre1I5uUdZ6%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FQphre1I5uUdZ6%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FQphre1I5uUdZ6%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d3aefc3b7900ee1167da3aa9e192c56/href">https://medium.com/media/4d3aefc3b7900ee1167da3aa9e192c56/href</a></iframe><h3>The reason I’m here</h3><p>I believe that in the not-too-distant future, data will be utilized in an effort to create a more efficient, less wasteful, and sustainable restaurant of tomorrow.</p><p>Imagine:</p><ul><li>being able to accurately predict exactly how many scallops to order so you’d never have to say, “Sorry, we just sold our last order to that table over there.”</li><li>never going through the refrigerator to find “that smell” or having to throw away food because of over-purchasing</li><li>an <strong>automated</strong> inventory system that built an order based on real-time forecasting data and sensors in storage areas</li><li>understanding when to drop fries into oil because sensors indicate that a rush is coming (Cava — DC-based chain)</li></ul><p>Taking things even further might be <strong>predicting market trends</strong> in order to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/1*nhO9MxxQatc8an8SAvsFww.jpeg" /></figure><ul><li>stockpile rare inventory (the bourbon boom of the 2000s)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*Ir1wvsNCfIXovuWoXnTbVQ.jpeg" /></figure><ul><li>(better yet) get ahead of shortages in supply by investing in the producers themselves (mezcal in Oaxaca and Jalisco)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VGJmkwQN07Jn04mI" /><figcaption>Photo by <a href="https://unsplash.com/@bendavisual?utm_source=medium&amp;utm_medium=referral">Benjamin Davies</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I think there is a great opportunity today to leverage a new abundance of data, and to simultaneously join this movement towards sustainability and a more ethical way of operating our bars and restaurants.</p><p>Furthermore, this can be done in a manner that is consistent with the ultimate goal — to increase profits.</p><p>Sources:</p><ul><li><a href="https://www.michiganstateuniversityonline.com/resources/business-analytics/dining-on-big-data/">https://www.michiganstateuniversityonline.com/resources/business-analytics/dining-on-big-data/</a></li><li><a href="https://www.eater.com/2018/10/10/17957350/restaurants-data-mining-personal-information-privacy-loyalty-programs">https://www.eater.com/2018/10/10/17957350/restaurants-data-mining-personal-information-privacy-loyalty-programs</a></li><li><a href="https://www.cultofmac.com/430158/how-online-retailers-collect-and-use-consumer-data-deal-news/">https://www.cultofmac.com/430158/how-online-retailers-collect-and-use-consumer-data-deal-news/</a></li><li><a href="https://time.com/5339037/turtle-video-plastic-straw-ban/">https://time.com/5339037/turtle-video-plastic-straw-ban/</a></li><li><a href="https://www.strawlessocean.org/">https://www.strawlessocean.org</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebbfa38bb956" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>