<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joe Zack</title>
    <description>The latest articles on DEV Community by Joe Zack (@thejoezack).</description>
    <link>https://dev.to/thejoezack</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F66511%2Fce4284f8-7d32-46ee-be18-c4ba422441de.png</url>
      <title>DEV Community: Joe Zack</title>
      <link>https://dev.to/thejoezack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thejoezack"/>
    <language>en</language>
    <item>
      <title>Making Money with Code</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Mon, 10 May 2021 03:18:41 +0000</pubDate>
      <link>https://dev.to/_codingblocks/making-money-with-code-48p8</link>
      <guid>https://dev.to/_codingblocks/making-money-with-code-48p8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NLFFyJjU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/05/Episode158.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NLFFyJjU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/05/Episode158.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! If you know how to code, then you are a highly skilled worker. You can use those skills to make money, either by trading your time (active income) or creating automated income streams to make you money "while you sleep".&lt;/p&gt;

&lt;p&gt;What follows are the notes for the &lt;a href="https://www.codingblocks.net/podcast/making-money-with-code/"&gt;episode&lt;/a&gt;, which you can find wherever podcasts are found - just search for "Coding Blocks"!&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Money
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Active Income
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Active income is income earned by exchanging time for money. This typically includes salary and hourly employment, as well as contracting.&lt;/li&gt;
&lt;li&gt;Some types of active income blur the lines.&lt;/li&gt;
&lt;li&gt;Way to find active income can include job sites like &lt;a href="https://stackoverflow.com/jobs"&gt;Stack Overflow Jobs&lt;/a&gt;, &lt;a href="https://www.indeed.com/"&gt;Indeed&lt;/a&gt;, &lt;a href="https://www.upwork.com/"&gt;Upwork&lt;/a&gt;, etc.

&lt;ul&gt;
&lt;li&gt;Government grants and jobs are out there as well.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Active income is typically has some ceiling, such as your time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Passive Income
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Passive income is income earned on an investment, any kind of investment, such as stock markets, affiliate networks, content sales for things like books, music, courses, etc.&lt;/li&gt;
&lt;li&gt;The work you do for the passive income &lt;em&gt;can&lt;/em&gt; blur lines, especially when that work is promotion.&lt;/li&gt;
&lt;li&gt;Passive income is &lt;em&gt;generally&lt;/em&gt; not tied to your time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Passive Income Options
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://neilpatel.com/blog/built-and-launched-a-saas-company/"&gt;Create a SaaS ap&lt;/a&gt;p to keep people coming back. Don’t let the term &lt;em&gt;SaaS&lt;/em&gt; scare you off. This can be something smaller like a regex validator.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://affiliate-program-management.com/companies-with-affiliate-programs/"&gt;Affiliate links&lt;/a&gt; are a great example of passive income because you need to invest the time once to create the link.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.entrepreneur.com/article/217913"&gt;Ads and sponsors&lt;/a&gt;: typically, the more targeted the audience is for the ad, the more the ad is worth.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.paypal.com/us/brc/article/accepting-donations-online"&gt;Donations&lt;/a&gt; via services like Ko-fi, Patreon, and PayPal.&lt;/li&gt;
&lt;li&gt;  Apps, plugins, website &lt;a href="https://sceptermarketing.com/places-to-sell-your-wordpress-themes-online/"&gt;templates/themes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Create content, such as books, courses, videos, etc. Self-publishing &lt;em&gt;can&lt;/em&gt; have a bigger reward and offer more freedom, but doesn’t come with the built-in audience and marketing team that a publisher can offer.&lt;/li&gt;
&lt;li&gt;  Arbitrage between markets.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://contentmarketinginstitute.com/2018/02/grow-audience-millions/"&gt;Grow an audience&lt;/a&gt;, be it on YouTube, Twitch, podcasting, blogging, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Things to Consider
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;What’s the up-front effort and/or investment?&lt;/li&gt;
&lt;li&gt;How much maintenance can you afford?&lt;/li&gt;
&lt;li&gt;How much will it cost you?&lt;/li&gt;
&lt;li&gt;Who gets hurt if you choose to quit?&lt;/li&gt;
&lt;li&gt;What can you realistically keep up with?&lt;/li&gt;
&lt;li&gt;What are the legal and tax liabilities? &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources We Like
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Apply for Grants To Fund Open Source Work&lt;/em&gt; (&lt;a href="https://changeset.nyc/resources/quick-intro-to-grants.html"&gt;changeset.nyc&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Government grants and loans (&lt;a href="https://www.usa.gov/grants"&gt;usa.gov&lt;/a&gt;, &lt;a href="https://www.grants.gov/"&gt;grants.gov&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;35 Passive Income Ideas for Developers [All Types]&lt;/em&gt; (&lt;a href="https://beginnerspassiveincome.com/passive-income-ideas-for-developers/"&gt;beginnerspassiveincome.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;8 Side Income Ideas For Programmers (That Actually Work)&lt;/em&gt; (&lt;a href="https://www.afternerd.com/blog/side-income-programmers/"&gt;afternerd.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Podcasts

&lt;ul&gt;
&lt;li&gt;The Smart Passive Income Podcast with Pat Flynn (&lt;a href="https://www.smartpassiveincome.com/listen/"&gt;smartpassiveincome.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Entrepreneurs On Fire (&lt;a href="https://www.eofire.com/podcast/"&gt;eofire.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;How I Built This with Guy Raz (&lt;a href="https://www.npr.org/podcasts/510313/how-i-built-this"&gt;npr.org&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Who Moved My Cheese&lt;/em&gt; (&lt;a href="https://amzn.to/3tytneC"&gt;Amazon&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;The Lean Startup: How Today’s Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses&lt;/em&gt; (&lt;a href="https://www.codingblocks.net/book/the-lean-startup"&gt;Amazon&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;These top Patreon creators earn more than $200,000 a year&lt;/em&gt; (&lt;a href="https://blog.patreon.com/top-patreon-creators"&gt;blog.patreon.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Ko-fi – Make an Income Doing What You Love (&lt;a href="https://ko-fi.com/"&gt;ko-fi.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;PayPal – &lt;em&gt;Make your Donate button&lt;/em&gt; (&lt;a href="https://www.paypal.com/donate/buttons"&gt;paypal.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;How Long Does It Take To Create An Online Course?&lt;/em&gt; (&lt;a href="https://www.onlinecoursehow.com/tips/how-long-does-it-take-to-create-an-online-course/#:~:text=Depending%20on%20the%20length%20and,weeks%20or%20more%20to%20complete."&gt;onlinecoursehow.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Udemy – Planning your online course (&lt;a href="https://teach.udemy.com/course-creation/"&gt;udemy.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Am I Procrastinating? (&lt;a href="https://www.amiprocrastinating.com/"&gt;amiprocrastinating.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Google Ads Help: Use Keyword Planner (&lt;a href="https://support.google.com/google-ads/answer/7337243?hl=en"&gt;support.google.com&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tip of the Week
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google developer documentation style guide: Word list (&lt;a href="https://developers.google.com/style/word-list"&gt;developers.google.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;In Windows Terminal, use &lt;code&gt;CTRL+SHIFT+W&lt;/code&gt; to close a tab or the window.&lt;/li&gt;
&lt;li&gt;The GitHub CLI manual (&lt;a href="https://cli.github.com/manual/"&gt;cli.github.com&lt;/a&gt;)

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;gh pr create --fill&lt;/code&gt; to create a pull request using your last commit message as the title and body of the PR.&lt;/li&gt;
&lt;li&gt;We’ve discussed the GitHub CLI in &lt;a href="https://www.codingblocks.net/episode142"&gt;episode 142&lt;/a&gt; and &lt;a href="https://www.codingblocks.net/episode155"&gt;episode 155&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;How to get a dependency tree for an artifact?&lt;/em&gt; (&lt;a href="https://stackoverflow.com/questions/3342908/how-to-get-a-dependency-tree-for-an-artifact/40025428#40025428"&gt;Stack Overflow&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;xltrail – Version control for Excel workbooks (&lt;a href="https://www.xltrail.com/"&gt;xltrail.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Spring Initializr (&lt;a href="https://start.spring.io/"&gt;start.spring.io&lt;/a&gt;)

&lt;ul&gt;
&lt;li&gt;You can leverage the same thing in IntelliJ with Spring.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>podcast</category>
      <category>career</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Getting Started with K9s</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Sat, 24 Apr 2021 03:09:00 +0000</pubDate>
      <link>https://dev.to/thejoezack/getting-started-with-k9s-1gdg</link>
      <guid>https://dev.to/thejoezack/getting-started-with-k9s-1gdg</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dZkeEo7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/04/k9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dZkeEo7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/04/k9s.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this post I’ll tell you a bit about K9s, which is an open source, command line interface for Kubernetes that makes me feel like a super hero. I’ll tell you what K9s is, why I like it so much, and what the trade-offs are. I hope that to convince you to give it a shot, and that you’ll love it as much as I do.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/gOs7mhdluSQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Check out our quick walkthrough on YouTube



&lt;h2&gt;
  
  
  What is K9s?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open Source Cross Platform CLI for Kubernetes&lt;/li&gt;
&lt;li&gt;Intermittently polls cluster resources&lt;/li&gt;
&lt;li&gt;Quickly navigate contexts, namespaces and resources&lt;/li&gt;
&lt;li&gt;Quickly Filtering, sorting, and copying&lt;/li&gt;
&lt;li&gt;Steep, but short learning curve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have worked with Kubernetes for very long, then you know how often you have to “kubectl”. It’s a lot, probably a “babillion” times per day.  There are clever short-cuts you can take, but ultimately the tool is a thin veneer over the Kubernetes API. There are benefits to working so closely with the API itself, but ultimately it’s a lot of work to do fairly routine tasks.&lt;/p&gt;

&lt;p&gt;Think about how Often you “get pods”, “logs”, or “port-forward”. What about those times you need to look up a secret or edit a custom resource you can’t quite remember the name of? Have you ever made your changes only to later realize you altered the wrong cluster or namespace? Oops.&lt;/p&gt;

&lt;p&gt;K9s solves these problems by focusing on the user experience, crafting an interface to the Kubernetes API that is convenient for humans. K9s presents you with a resource oriented view that offers filtering, sorting, and context-sensitive actions. It does this via a command-line interface, with a heavy emphasis on short-cuts. The command-line nature and short-cuts are a large part of what makes K9s so great, but they are also the source of it’s learning curve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codingblocks.net/wp-content/uploads/2021/04/blue-heeler-dog-PMCGFZL.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--quayK4Y8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/04/blue-heeler-dog-PMCGFZL.jpg" alt=""&gt;&lt;/a&gt;11/10 This is a good dog&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do I like K9s?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Speed:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refreshing in the background

&lt;ul&gt;
&lt;li&gt;No more looking up pod names by label or autocomplete (if you’re on bash)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Swapping namespaces and Contexts&lt;/li&gt;
&lt;li&gt;Multiple instances (no changing of default)&lt;/li&gt;
&lt;li&gt;Saving, Filtering logs&lt;/li&gt;
&lt;li&gt;Sorting&lt;/li&gt;
&lt;li&gt;Easy secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Visibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always know your…

&lt;ul&gt;
&lt;li&gt;Namespace&lt;/li&gt;
&lt;li&gt;Context&lt;/li&gt;
&lt;li&gt;Cluster&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Doesn’t change your default context/namespace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bonus points&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pulses&lt;/li&gt;
&lt;li&gt;Popeye&lt;/li&gt;
&lt;li&gt;Accidentally learning new things&lt;/li&gt;
&lt;li&gt;Easy to install on remote servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What can I say? I love how K9s makes me &lt;em&gt;feel&lt;/em&gt;. It polls for resources in the background, which makes it fast for me to zip around between screens. This also makes it really easy to filter and sort tabular information. Filtering is done via the “/” key, it supports wildcards, labels and information that isn’t immediately available on the screen (More akin to grepping a “kubectl describe” than a “kubectl get”, if that makes sense). Filtering also works on all views, including logs and yaml.&lt;/p&gt;

&lt;p&gt;There are context specific actions available as well. For example you can hit “shift-f” to port-forward on a page with services, deployments or pods. You hit “l” for logs, “s” to shell in, “ctrl-d” to delete and so forth.&lt;br&gt;&lt;br&gt;
If you work in a multi-cluster and/or with multiple namespaces then you will be glad to know that the cluster, context and namespace are visible in the top area. Even better, swapping the context (:context or :ctx) or the namespace (:namespace or :ns) does *not* change your global context. It’s like passing –context and –namespace along with every command. This makes it easy to work with multiple clusters at once, even with multiple instances of K9s.&lt;br&gt;&lt;br&gt;
Everything I described here is  fast and simple but it takes sometime to build that muscle memory. There are only a few things you need to remember. I posted a video at the top of this article, but  here is the short of it. Once you’ve internalized those keystrokes, the rest will fall into place and you’ll be zooming around like a superhero in no time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Just remember this:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;ctrl-a (See all the things, including custom resources!)&lt;/li&gt;
&lt;li&gt;: navigates (contexts, namespaces, tools, and resources)&lt;/li&gt;
&lt;li&gt;? for help&lt;/li&gt;
&lt;li&gt;/ filters (works on just about anything)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One more quick thing I want to mention? Ever heard of pulses, popeye, or x-ray? These are all tools that I learned of because I saw them with ctrl-a. I’ve also bumped into other resources (custom or otherwise) that I hadn’t heard of before. K9s made it easy to discover these tools and resources, and I feel like I’m constantly bumping into something new.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codingblocks.net/wp-content/uploads/2021/04/lonely-sad-puppy-8JNSL6N.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VmsnH_yt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2021/04/lonely-sad-puppy-8JNSL6N.jpg" alt=""&gt;&lt;/a&gt;Lonely sad puppy. Ecotional scene. 11/10&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the trade-offs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;kubectl is ubiquitous&lt;/li&gt;
&lt;li&gt;You can’t script k9s&lt;/li&gt;
&lt;li&gt;Batch operations aren’t fantastic either&lt;/li&gt;
&lt;li&gt;Large clusters can be slow (Drop that poll time down!)&lt;/li&gt;
&lt;li&gt;“Freemium” (There are plans for k9s to offer a paid, premium version in the future)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you can’t tell by now, I love K9s. I’ve shown it to many people at this point, and I want to mention the common arguments I hear against using it. For the most part they really just boil down to benefits of sticking with kubectl. Of course, there is nothing stopping you from using kubectl at any point but there is something to be said for sticking with one tool…especially when that tool is completely ubiquitous.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As you can see, I’m rather fervent about it because k9s makes me feel like I have super powers. I feel fast, safe, and like I’m getting stronger everyday. I had to spend some time up front getting used to it, but now I feel like I’m flying. I never thought I’d be making such grand statements about a command line interfaceface tool…but here we here. Now hit the links and give it a shot! Feel free to join the slack, or reach out to me if you have any questions!&lt;br&gt;&lt;br&gt;
Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed/k9s"&gt;https://github.com/derailed/k9s&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://k9scli.io/"&gt;https://k9scli.io/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
    <item>
      <title>The Scariest Bug (I Haven’t Written Yet)</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Mon, 06 Jul 2020 03:39:52 +0000</pubDate>
      <link>https://dev.to/_codingblocks/the-scariest-bug-i-haven-t-written-yet-2akj</link>
      <guid>https://dev.to/_codingblocks/the-scariest-bug-i-haven-t-written-yet-2akj</guid>
      <description>&lt;p&gt;Okay, so I promised to sing a song if &lt;a href="https://www.codingblocks.net/"&gt;Coding Blocks&lt;/a&gt; got enough podcast reviews and, thanks to &lt;strong&gt;you&lt;/strong&gt; , we made it &lt;em&gt;kinda&lt;/em&gt;, and I sang a song &lt;em&gt;kinda&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;Okay, so I actually dusted off a song I had written a while back for a Halloween gag I never went through with but..dang, I cannot sing. Rather than subject you to my warbling, I hired an &lt;a href="https://www.fiverr.com/evgenyzhukov493/be-your-male-singer-or-vocalist"&gt;amazing singer&lt;/a&gt; on fiverr. Trust me, it’s better this way.&lt;/p&gt;

&lt;p&gt;Anyway, here it is – a short song, with video, about the inevitability of making programming mistakes. Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/cESavedcYYU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>programming</category>
      <category>funny</category>
      <category>music</category>
    </item>
    <item>
      <title>Getting started with Apache Beam and Kotlin</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Wed, 08 Apr 2020 18:48:35 +0000</pubDate>
      <link>https://dev.to/thejoezack/getting-started-with-apache-beam-and-kotlin-3noc</link>
      <guid>https://dev.to/thejoezack/getting-started-with-apache-beam-and-kotlin-3noc</guid>
      <description>&lt;p&gt;Are you looking for a simple getting started guide for working with Kotlin and Apache Beam? Well congratulations, you are in the right place. I’ve been doing some &lt;a href="https://www.youtube.com/watch?v=Ycim03b24CU&amp;amp;list=PLWWyzc5ehM91WKA467swlSgR1r_2m5LMJ" rel="noopener noreferrer"&gt;live coding on the subject&lt;/a&gt;, and I made a teeny tiny project to help me get started on new Beam projects quicker.&lt;/p&gt;

&lt;p&gt;There is an &lt;a href="https://beam.apache.org/get-started/wordcount-example/#minimalwordcount-example" rel="noopener noreferrer"&gt;official guide&lt;/a&gt; for getting started, so you should probably start there. However, that guide begins with a fully functional project and I prefer to build a minimum viable product from scratch that is easy to run in an IDE. So if you are like me, and prefer to type your own code then keep reading!&lt;/p&gt;

&lt;p&gt;Note: If you don’t like typing either, you can just clone the &lt;a href="https://github.com/codingblocks/beam-kotlin-example" rel="noopener noreferrer"&gt;repo&lt;/a&gt; and you are ready to go&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait, what is Beam?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://beam.apache.org/" rel="noopener noreferrer"&gt;Beam&lt;/a&gt; is an open-source and unified model for interacting with streaming and batch data. Have you heard of projects or methodologies like &lt;a href="https://spark.apache.org/" rel="noopener noreferrer"&gt;Spark&lt;/a&gt;, &lt;a href="https://flink.apache.org/" rel="noopener noreferrer"&gt;Flink&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/MapReduce" rel="noopener noreferrer"&gt;MapReduce&lt;/a&gt; or batch processing? If not, then this post will not be useful for you. If you have, though, and you haven't heard of Beam - then please let me introduce you! &lt;/p&gt;

&lt;p&gt;Beam is a project that lets you choose a supported language (currently Java, Python, and Go), and write code can run in either batch or streaming mode, and can run in a variety of engines (Spark, Flink, Apex, Dataflow, etc). That means you get to focus on your business logic, and let Beam worry about the implementation. Check out the &lt;a href="https://beam.apache.org/documentation/runners/capability-matrix/" rel="noopener noreferrer"&gt;compatibility matrices&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;Is this the future of batch and streaming data?&lt;br&gt;
Maybe! Time will tell but I think it's worth investigating if these areas interest you.&lt;/p&gt;
&lt;h2&gt;
  
  
  Create the project
&lt;/h2&gt;

&lt;p&gt;First up, “File” &amp;gt; “New Project” and choose “Maven”. Check the “Create from archetype” checkbox and select the &lt;strong&gt;org.jetbrains.kotlin:kotlin-archetype-jvm&lt;/strong&gt; , because Kotlin is awesome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage-2.png"&gt;&lt;/a&gt;Choose the Kotlin JVM archetype, but you can use the default settings for everything else.&lt;/p&gt;
&lt;h2&gt;
  
  
  Add the minimal dependencies
&lt;/h2&gt;

&lt;p&gt;I’m aiming for a bare-bones implementation here, so I’m just going to add the dependency for the direct runner directly to my project for now. Later we can break this out to a “profile” so you can optionally compile in the bits for the execution engines of your choice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Add these to your dependencies in pom.xml --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.beam&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;beam-sdks-java-core&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.19.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- This dependency is for the local runner. --&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- Later we can move this one out to a profile --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.beam&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;beam-runners-direct-java&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.19.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;runtime&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a simple pipeline
&lt;/h2&gt;

&lt;p&gt;Now let’s setup a simple pipeline that is essentially a stripped down version of the &lt;a href="https://beam.apache.org/get-started/wordcount-example/#minimalwordcount-example" rel="noopener noreferrer"&gt;official example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’ll paste the code below, but here is the outline of what is happening:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a pipeline with default options&lt;/li&gt;
&lt;li&gt;Add a step to read from pom.xml&lt;/li&gt;
&lt;li&gt;Add a step to split the text into text characters&lt;/li&gt;
&lt;li&gt;Add a step to count the characters&lt;/li&gt;
&lt;li&gt;Add a step to format the output to a collection of strings&lt;/li&gt;
&lt;li&gt;Add a step to write the output to files, prefixed with “counts:&lt;/li&gt;
&lt;li&gt;Execute the pipeline
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Pipeline&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PCollection&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;gt;(&lt;/span&gt;&lt;span class="nc"&gt;TextIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"pom.xml"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="nc"&gt;FlatMapElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;into&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;TypeDescriptors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strings&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
                            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;via&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ProcessFunction&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toList&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;perElement&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;())&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="nc"&gt;MapElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;into&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;TypeDescriptors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strings&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
                            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;via&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ProcessFunction&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;"${input.key} : ${input.value}"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;TextIO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"counts"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can run the code, and you’ll end up with several files in your project directory of the format &lt;strong&gt;counts-0000*&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;(note: if your main method does not show up as runnable, you may need to right-click pom.xml and “Maven” &amp;gt; “Reimport”)&lt;/p&gt;

&lt;h2&gt;
  
  
  What is next?
&lt;/h2&gt;

&lt;p&gt;I plan to use this project as a jumping off point for experimentation, but I also have some small plans for this project on it’s own.&lt;/p&gt;

&lt;p&gt;Here is what I’m looking at doing to this repo next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding tests&lt;/li&gt;
&lt;li&gt;Adding profiles for multiple runners&lt;/li&gt;
&lt;li&gt;Reading from a streaming source of data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know if you’re interested in hearing more about Beam and I will be happy to write more about it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Ycim03b24CU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Check out our YouTube channel for more information and live streaming with Beam!



</description>
      <category>programming</category>
      <category>apachebeam</category>
      <category>streaming</category>
    </item>
    <item>
      <title>The Best Dev Audiobooks 🔊</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Sun, 08 Mar 2020 03:34:41 +0000</pubDate>
      <link>https://dev.to/_codingblocks/the-best-dev-audiobooks-ccn</link>
      <guid>https://dev.to/_codingblocks/the-best-dev-audiobooks-ccn</guid>
      <description>&lt;p&gt;I’m a big fan of audio learning, and of course there are tons of &lt;a href="https://podcasts.apple.com/us/podcast/coding-blocks/id769189585"&gt;great, free, dev podcasts&lt;/a&gt; but did you know that there are quite a few great audiobooks for devs as well?   &lt;/p&gt;

&lt;p&gt;I've been a subscriber to Audible.com (and yes, these are  affiliate links below) for a long time, but they have only recently started adding the types of programming books that I liked to read. I've kept track of the Audiobooks that I’ve picked up that intersect with books you frequently see on "best of " lists. I’m proud to say I’m 6.5/7 through the list already and I've got the next one already on deck! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2Ivx7bO"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FbboAX8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/2Ivx7bO"&gt;The Pragmatic Programmer&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Frequently cited as the &lt;a href="https://www.google.com/search?sxsrf=ALeKk02yYJfzk7Y9zxt0hwzO8tiumTRcPw%3A1583635587364&amp;amp;ei=g1xkXsLvFYGGsQX8t4-IDA&amp;amp;q=best+books+for+programmers&amp;amp;oq=best+books+for+programmers&amp;amp;gs_l=psy-ab.3..0l4j0i22i30l6.24215.28198..28292...0.1..0.138.2342.20j5......0....1..gws-wiz.......0i71j35i39j0i273j0i131j0i67j0i20i263.d6OADhHhQRw&amp;amp;ved=0ahUKEwiCvY2l7onoAhUBQ6wKHfzbA8EQ4dUDCAs&amp;amp;uact=5"&gt;most popular programmer book&lt;/a&gt; of all time, this book needs little introduction however I recently noticed that the newly updated 20th anniversary edition is available on Audible and it’s next on my list even though I already read the print version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/330hySF"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Hd_zUQE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-1.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/330hySF"&gt;The DevOps Handbook&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is the book I’m currently “reading”. It starts off a bit slow if you’re already familiar with the notion of DevOps and don’t need convincing. The rest has been pure gold though, and I find myself reaching for my note-taking app over and over again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2TwvWyX"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5jH0XQYQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-2.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/2TwvWyX"&gt;The Phoenix Project&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The Phoenix Project is fiction, but it’s an inspiring story that weaves in many ideals of change management and DevOps from the DevOps handbook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2xcQcNk"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VQKNpm9O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-5.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/2xcQcNk"&gt;The Unicorn Project&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This book is from the perspective of a different person on a different team, but roughly at the same time as The Phoenix Project. It was released 6 years later though, and it’s been updated a bit to reflect more recent technologies. The book is standalone though, so no ned to read the other first.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/39yyRN9"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qRwmGWs2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-4.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/39yyRN9"&gt;The Manager’s Path&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Okay, okay, I know what you’re thinking but this book is really helpful for anybody who has ever been in a dev lead or management position or wants to be in one someday *or* has ever been managed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2TKdUbq"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XlGt0SJ5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-3.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/2TKdUbq"&gt;The Lean Startup&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is the popular book that people frequently regarding Minimum Viable Products, “in”-trapreneurs and iteratively delivering value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3cHpi0z"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QtAUlZXb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2020/03/image-6.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://amzn.to/3cHpi0z"&gt;Masters of DOOM&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ok, so this is not directly biz or dev related but it was still an interesting book for anybody who is interested in games, the games industry or “crunch time”. I can’t believe how many innovations came out of Id Software!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Well, that's my list. I'd love to hear your recommendations!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>books</category>
      <category>career</category>
    </item>
    <item>
      <title>My 2020 (Dev|Re)solutions</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Thu, 02 Jan 2020 03:08:26 +0000</pubDate>
      <link>https://dev.to/thejoezack/my-2020-dev-re-solutions-lm2</link>
      <guid>https://dev.to/thejoezack/my-2020-dev-re-solutions-lm2</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F01%2Ftraffic-in-hong-kong-PZ9DFG3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F01%2Ftraffic-in-hong-kong-PZ9DFG3.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New Year’s is my favorite holiday because I find the notion of periodic renewal invigorating. Let that &lt;a href="https://www.youtube.com/watch?v=wPnhaGWBnys" rel="noopener noreferrer"&gt;old lasagna&lt;/a&gt; be forgot, I want to move forward! Overall, I was pretty happy with how my technical skills progressed last year, but I think I can do better. Much better.&lt;/p&gt;

&lt;p&gt;This year I’m done trying to micromanage my future with limited information. I want to keep things simple by setting a high level focus and &lt;a href="https://fs.blog/2017/06/habits-vs-goals/" rel="noopener noreferrer"&gt;prioritizing habits over static goals&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Focus: (Near) Real-Time Analytics and User Experiences
&lt;/h3&gt;

&lt;p&gt;The software that people are interacting with gets better and better every year: better looking, more intuitive, and more responsive. That’s great news for the internet, and people, and everything I guess. That also means that people are coming to expect more and more from my software too. Yikes.&lt;/p&gt;

&lt;p&gt;Apps like Uber, Tinder, and Slack offer great user experiences and the technologies underneath the UI iceburg are really cool too.&lt;/p&gt;

&lt;p&gt;Since this is a high level objective, I’m not going to specify any more detail than that. I want to keep my plan lean and adaptable so I can hop on to any needs or opportunities that 2020 swings my way. I also don’t want to feel obligated to stick to an out-of-date plan.&lt;/p&gt;

&lt;p&gt;Here’s a short list of technologies that are often associated with the (near) real-time types of experiences that I’m talking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pub/Sub queues like Kafka or AWS Kinesis &lt;/li&gt;
&lt;li&gt;GraphQL subscriptions &lt;/li&gt;
&lt;li&gt;Apollo Client&lt;/li&gt;
&lt;li&gt;Web Sockets&lt;/li&gt;
&lt;li&gt;Reactive Programming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F01%2Fimage.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2020%2F01%2Fimage.png"&gt;&lt;/a&gt;Uber has a fantastic user experience, and my customers are coming to expect more real-time capabilities in the software that I write.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Habits: Deliberate scheduling time for tasks
&lt;/h3&gt;

&lt;p&gt;I tend to spend a lot of time researching things for work, &lt;a href="https://www.codingblocks.net/" rel="noopener noreferrer"&gt;Coding Blocks&lt;/a&gt;, or other various side-projects* so finding tech time has never been a problem for me. I spend way too much time on this stuff, but I enjoy it and it’s a passion of mine. Because of that, I’ve always entertained a bit of chaos in my extracurricular activities – letting myself work on whatever I felt inspired to work on. Any why not, this is my “free” time! The problem with this approach is that it’s all too easy over spend time on things that are easy or urgent…continuously bumping important/non-urgent and more mundane tasks to the back of the line.&lt;/p&gt;

&lt;p&gt;I aim to mitigate this habit somewhat this year, by creating a new one. I want to spend 3 hours a week (in 1 hour chunks) working on deliberate, planned tasks. I’ll decide ahead of time what the task is, then I’ll set a timer, and do it.&lt;/p&gt;

&lt;p&gt;Any tech time above and beyond that, including time for blogging, presentations, making videos, or…whatever I feel like is fine too – but I’m going to give this dedicated time a whirl to see if I do a better job of staying on top of important, but not urgent, tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I’m really looking forward to this year, and I hope that my plan of setting a single high-level focus and scheduling deliberate time for it works out. And if it doesn’t? Well, then I’ll stop and try something else! It’s not much of a “resolution” but I think it might “just work” for me.&lt;/p&gt;

&lt;p&gt;Pic: &lt;a href="https://elements.envato.com/traffic-in-hong-kong-PZ9DFG3" rel="noopener noreferrer"&gt;https://elements.envato.com/traffic-in-hong-kong-PZ9DFG3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;* Family, friends, and a hobbies too – but this is a tech focused blog, yo!&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>kafka</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Streaming process output to a browser, with SignalR and C#</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Tue, 17 Dec 2019 05:01:00 +0000</pubDate>
      <link>https://dev.to/_codingblocks/streaming-process-output-to-a-browser-with-signalr-and-c-5adb</link>
      <guid>https://dev.to/_codingblocks/streaming-process-output-to-a-browser-with-signalr-and-c-5adb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kbQHAvIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/caution.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kbQHAvIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/caution.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m happy to announce that I’m taking part in the &lt;a href="https://crosscuttingconcerns.com/The-Third-Annual-csharp-Advent"&gt;The Third Annual C# Advent&lt;/a&gt; this year along side many &lt;a href="https://crosscuttingconcerns.com/The-Third-Annual-csharp-Advent"&gt;great articles&lt;/a&gt;and &lt;a href="https://dotnetcore.show/episode-40-noda-time-with-jon-skeet/"&gt;podcasts&lt;/a&gt;. If you have even a passing interest in C# then you should go check it out and follow all of the authors on social media!&lt;/p&gt;

&lt;p&gt;Okay, enough with the niceties! See, when it comes to holidays I am more of a Grinch than a Griswold so I’m going to show you how to do something in C# that is cool, powerful, and … dangerous! I’m going to show you how, from a website, to invoke processes in a command shell and stream the results back to the browser via SignalR.&lt;/p&gt;

&lt;p&gt;And before we get any further I should note, this blog post will not be a good introduction to SignalR, that &lt;a href="https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr"&gt;documentation already exists&lt;/a&gt;. This article is intended for developers who have web development experience with C#, and are at least somewhat familiar with the concepts of SignalR, and web sockets.&lt;/p&gt;

&lt;p&gt;Finally…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning!&lt;/strong&gt; We are literally about to create a remote code execution injection vulnerability, as it allows any user or process with access to the website to run arbitrary commands. However, there are times when you may want to do something similar, very carefully and in a limited fashion. Check out &lt;a href="https://azure.microsoft.com/en-us/features/cloud-shell/"&gt;Azure Cloud Shell&lt;/a&gt; and &lt;a href="https://coder.com/"&gt;Coder.com&lt;/a&gt; for examples of web apps that let you interact with shells…in a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ok so what exactly are we doing?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Creating an ASP.NET web app that lets users run arbitrary cmd.exe commands on the webserver shell&lt;/li&gt;
&lt;li&gt;Streaming STDOUT and STDERROR output to the browser via SignalR&lt;/li&gt;
&lt;li&gt;Exploring ideas for how we might evolve this project into something really, really cool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: The full source code is available on Github in case you hate typing: &lt;a href="https://github.com/codingblocks/streaming-stdout-with-signalr"&gt;https://github.com/codingblocks/streaming-stdout-with-signalr&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfQ_UASW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/advent-of-csharp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfQ_UASW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/advent-of-csharp.gif" alt="Animated gif showing remote execution of server side dos commands."&gt;&lt;/a&gt;This is what we’ll end up with, a simple and dangerous way to execute server-side commands in a web browser. Awesome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s write some code!
&lt;/h2&gt;

&lt;p&gt;I’ve tried to keep things simple so that you can focus on the meat of the message. The downside is, that you may run into some dragons if you stray off the beaten path. Stray anyway! Please feel free to drop a comment with any questions or comments about things you run into.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Create a new ASP.NET Core Web Application (&lt;a href="https://docs.microsoft.com/en-us/visualstudio/install/update-visual-studio?view=vs-2019"&gt;tested with v3.0.101&lt;/a&gt;)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Assuming you have &lt;a href="https://dotnet.microsoft.com/download"&gt;dotnet installed&lt;/a&gt;, the following command will set you up with a basic razor pages website, in a new directory named “streaming” :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet new webapp &lt;span class="nt"&gt;-o&lt;/span&gt; streaming
&lt;span class="nb"&gt;cd &lt;/span&gt;streaming
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: &lt;a href="https://docs.microsoft.com/en-us/aspnet/core/signalr/dotnet-client?view=aspnetcore-3.1&amp;amp;tabs=netcore-cli"&gt;Add a dependency for SiginalR&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://dotnet.microsoft.com/apps/aspnet/signalr"&gt;SignalR&lt;/a&gt; is a Microsoft project that makes &lt;a href="https://aws.amazon.com/pub-sub-messaging/"&gt;pub/sub interactions&lt;/a&gt; easy for a variety of different client and server technologies. In this example we’ll be using SignalR to stream output from our process, and we’ll also be using a SignalR JavaScript library on the front-end to subscribe to this output and display it on the website. We’ll only be using a small portion of what SignalR offers in this example, but hopefully it’s enough to whet your appetite.&lt;/p&gt;

&lt;p&gt;This command will install the server-side bits, and we’ll have a client-side js file to add in the front-end when we get there&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet add package Microsoft.AspNetCore.SignalR.Client
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Server-Side Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now we’re ready for some code. Let’s create a class for managing our processes, ProcessHub.cs. Make it inherit from the SignalR “Hub” class so that it can access the relevant communication channels. I’m trying to keep the noise down in this post, so I’m only going to focus on the interesting bits, but the &lt;a href="https://github.com/codingblocks/streaming-stdout-with-signalr/blob/master/API/ProcessHub.cs"&gt;full file is on Github&lt;/a&gt;,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// I'm keeping a static copy of the process around, so that we don't end up spawning a new one every time the user asks for one. This also makes the app single threaded, which is most appropriate for many use cases anyway!&lt;/span&gt;
  &lt;span class="nf"&gt;TerminateProcessIfExists&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;process&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Note: You can swap this for the particular shell you want to run, but I'm keeping this simple so sticking to windows with "cmd.exe"&lt;/span&gt;
    &lt;span class="n"&gt;StartInfo&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ProcessStartInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"cmd.exe"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// The process does not allow for redirection by default, so we need to instruct the process to explicitly allow it&lt;/span&gt;
      &lt;span class="n"&gt;RedirectStandardOutput&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;RedirectStandardInput&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;RedirectStandardError&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// This is also required for redirecting output, "Shell" here refers to an actual graphical shell - which isn't going to work for us here&lt;/span&gt;
      &lt;span class="n"&gt;UseShellExecute&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// These events will trigger our custom outputHandler, which we'll see in the next code section&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OutputDataReceived&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;DataReceivedEventHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sendingProcess&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;outLine&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;outputHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;outLine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ErrorDataReceived&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;DataReceivedEventHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sendingProcess&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;outLine&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;outputHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;outLine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="c1"&gt;// We have to explicitly start our redirection in addition to starting the process&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;BeginOutputReadLine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;BeginErrorReadLine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// Notice that we started the redirection BEFORE we executed the command&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;StandardInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;NEWLINE&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// The process will return async by default, so we have to instruct the runtime to hang on to the process so we keep the redirections alive&lt;/span&gt;
  &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WaitForExit&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;_process&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The method below is what SignalR actually calls, note that we pass in an Action that will send our output back to subscribing clients whenever it’s called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The command argument is an arbitrary shell command that we will execute on the server:&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// This calls our private method with the command passed from the client (this is super dangerous, never do this) as well as an Action that will publish output (o) text to any clients that are subscribed to "OutputReceived". Note: this proof-of-concept only has one subscriber,&lt;/span&gt;
  &lt;span class="nf"&gt;Stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Clients&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;All&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SendAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"OutputRecieved"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We’ll also need to make two minor changes to Startup.cs in order to hook things up: (Reminder: full file on &lt;a href="https://github.com/codingblocks/streaming-stdout-with-signalr/blob/master/Startup.cs"&gt;Github&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Add this line to the ConfigureServices method&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddSignalR&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Add these lines to the bottom of the Configure method to set up the url for the client to call:&lt;/span&gt;
&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseSignalR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;routes&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MapHub&lt;/span&gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;CommunicationHub&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"/stream"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Client-Side Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here’s a handy article for adding SignalR to the front-end &lt;a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/signalr?view=aspnetcore-3.1&amp;amp;tabs=visual-studio"&gt;in Visual Studio&lt;/a&gt;. or you can just use a &lt;a href="https://cdnjs.com/libraries/aspnet-signalr"&gt;cdn&lt;/a&gt; to keep things simple. The user interface is really minimal here, just a text input and a button. The output of the commands will just stream to an empty div below.&lt;/p&gt;

&lt;p&gt;The JS shown below is mainly glue code, but it shows how we listen for the button press event, and create / start a new connection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Invoke the "Stream" method, with the command&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;executeButton&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;commandText&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;   &lt;span class="nx"&gt;signalR&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HubConnectionBuilder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;withUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/stream&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;output&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;connection&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;OutputRecieved&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Stream&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`An error occurred: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A good example command to run is “ping codingblocks.net” since it shows you what it looks like as data comes in piecemeal. Other cool examples to try “git status”, “dir”, or “ssh”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfQ_UASW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/advent-of-csharp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfQ_UASW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/advent-of-csharp.gif" alt="Animated gif showing remote execution of server side dos commands."&gt;&lt;/a&gt;Here is a sample of how things are looking now&lt;/p&gt;

&lt;p&gt;Pretty neat right? At this point, the project is just a toy but I bet you can think of some cool stuff to do with it. Like...&lt;/p&gt;

&lt;h2&gt;
  
  
  Okay, now what?
&lt;/h2&gt;

&lt;p&gt;This project is a simple proof of concept showing how you can call processes in C#, and stream the output to a website. It’s not too useful by itself, but there are a myriad of cool ways you can evolve this project to make something &lt;strong&gt;really cool&lt;/strong&gt;! Here are a couple ideas to get your brain juices flowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a dashboard website for custom scripts on your computer&lt;/li&gt;
&lt;li&gt;Make a UI for git&lt;/li&gt;
&lt;li&gt;Make a UI for checking out Docker logs and exec-ing (&lt;a href="https://github.com/codingblocks/mink"&gt;I did this!&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Make a full on browser based terminal using &lt;a href="https://xtermjs.org/"&gt;xterm&lt;/a&gt;, including STDIN and a shared session&lt;/li&gt;
&lt;li&gt;Add basic functionality to current websites for things like ping, grep, nmap, or telnet&lt;/li&gt;
&lt;li&gt;Fix all the minor bugs in this project (like, what happens when you run two commands without refreshing!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hopefully you got something out of this post. Make sure to check out the other &lt;a href="https://crosscuttingconcerns.com/The-Third-Annual-csharp-Advent"&gt;Advent of C# posts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tgO6pSW7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tgO6pSW7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/12/image.png" alt=""&gt;&lt;/a&gt;Here’s a screenshot of a simple Docker admin page I setup to view streaming logs, very similar to this project.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>webdev</category>
      <category>questionableideas</category>
    </item>
    <item>
      <title>In Defense of Big O</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Sun, 06 Oct 2019 18:10:36 +0000</pubDate>
      <link>https://dev.to/_codingblocks/in-defense-of-big-o-2n6e</link>
      <guid>https://dev.to/_codingblocks/in-defense-of-big-o-2n6e</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mbgSwhCU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/10/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mbgSwhCU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/10/image.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the few things that developers can agree on is that the interview process is terribly broken. There are ideas about how to fix it but the industry has yet to come to a consensus on a better way forward.   &lt;/p&gt;

&lt;p&gt;Many developers are particularly aggravated by the way some organizations insist on “academic” interview problems that test developers skill with algorithms and (&lt;a href="https://en.wikipedia.org/wiki/Big_O_notation"&gt;Big O&lt;/a&gt;) algorithmic analysis. The argument is that these types of problems are often irrelevant to the job, rewarding antiquated knowledge over practical skill, and are biased in favor of developers with more time and resources to spend on preparation.  &lt;/p&gt;

&lt;p&gt;Now, before we continue let me get this out of the way:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;I agree with those arguments!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.explainxkcd.com/wiki/index.php/2146:_Waiting_for_the_But"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NM1m4oHp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.explainxkcd.com/wiki/images/d/dd/waiting_for_the_but.png" alt="Nothing to see here, go visit XKCD to see the hover!"&gt;&lt;/a&gt; &lt;a href="https://www.xkcd.com/2146/"&gt;&lt;/a&gt;&lt;a href="https://www.xkcd.com/2146/"&gt;https://www.xkcd.com/2146/&lt;/a&gt; &lt;br&gt;&lt;/p&gt;

&lt;p&gt;As a developer with social media accounts I am also inundated with jokes, memes, and tweets that essentially boil down to “Big O is dumb” and I worry that reductionist platitudes are unfairly tainting how new developers view important tools and techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Sometimes it’s really important&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Maybe your dream job doesn’t require a lot of data and compute, but that doesn’t mean it’s not important for others. Algorithms, data structures, and Big O can certainly come in handy here, but so does system design, scalability, and having a good &lt;a href="https://gist.github.com/jboner/2841832"&gt;grasp on the numbers&lt;/a&gt;. I don’t know how to rank the importance of these subjects but I’ll wager that the developers working on things like databases, search engines, operating systems, and graphical rendering (and many other fields) are critically dependent on having a shared and unambiguous language for understanding how programs scale in terms of space and time complexity.&lt;/p&gt;

&lt;p&gt;If you are interested in these types of subjects, then you are going to need to study up on the underlying principles. I agree that the developers who face these types of problems generally have more time than an interview takes to optimally solve them but it is important to show your interviewers that you share (or are capable of) the same basis for precise communication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.yugabyte.com/a-busy-developers-guide-to-database-storage-engines-the-basics/"&gt;LSM vs B-Trees for databases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dcs.bbk.ac.uk/~dell/teaching/cc/book/ditp/ditp_ch4.pdf"&gt;The Dynamo Paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://static.googleusercontent.com/media/research.google.com/en//archive/bigtable-osdi06.pdf"&gt;The Big Table Paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.ijser.org/researchpaper/The-Role-of-Data-Structures-in-Multiple-Disciplines-of-Computer-Science-A-Review.pdf"&gt;Data Structures in Operating Systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/3D_rendering"&gt;3D Rendering Techniques&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Also, algorithms are awesome!&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Having a good understanding of algorithms and data structures is like a super power. I’ve seen (and probably written) lots of …uh…&lt;em&gt;interesting&lt;/em&gt;…. solutions for dealing with dependency management when a simple “&lt;a href="https://en.wikipedia.org/wiki/Topological_sorting"&gt;top sort&lt;/a&gt;” would have done the trick faster and more correctly. Being able to recognize and classify a problem can go a long way towards solving it. Additionally, perusing algorithms can lead to sparks of inspiration, letting you solve problems that you didn’t even realize you had.  &lt;/p&gt;

&lt;p&gt;Here’s a list of known algorithms to get your motor running:&lt;br&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/List_of_algorithms"&gt;https://en.wikipedia.org/wiki/List_of_algorithms&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Summary&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Interviewing is difficult with many organizations &lt;a href="https://en.wikipedia.org/wiki/Cargo_cult_programming"&gt;cargo culting&lt;/a&gt; the FANG interview process. Despite that, the study of algorithms, data structures, and algorithmic analysis is still really useful for many programmers, and it’s also kinda awesome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=k4RRi_ntQc8"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mbgSwhCU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.codingblocks.net/wp-content/uploads/2019/10/image.png" alt=""&gt;&lt;/a&gt;&lt;a href="https://www.youtube.com/watch?v=k4RRi_ntQc8"&gt;Tell ’em Barack!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: Looking for some resources to get started? Check out these great articles on &lt;a href="https://dev.to/search?q=big%20o"&gt;dev.to&lt;/a&gt;!&lt;br&gt;&lt;br&gt;
 &lt;a href="https://dev.to/search?q=big%20o"&gt;&lt;br&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PPS: Like this kind of topic? Check out the &lt;a href="https://www.codingblocks.net/"&gt;podcast&lt;/a&gt; in your app of choice!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Why Avro?</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Thu, 12 Sep 2019 01:53:04 +0000</pubDate>
      <link>https://dev.to/_codingblocks/why-avro-4dkc</link>
      <guid>https://dev.to/_codingblocks/why-avro-4dkc</guid>
      <description>&lt;p&gt;&lt;a href="https://avro.apache.org/" rel="noopener noreferrer"&gt;Apache Avro&lt;/a&gt; is an open source data serialization system that lets you send information. It is frequently associated with “big data” and distributed systems because it has some distinct advantages over the competition.&lt;/p&gt;

&lt;p&gt;The primary advantages are listed below, but read on for more information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Messages are &lt;a href="https://labs.criteo.com/2017/05/serialization/" rel="noopener noreferrer"&gt;highly efficient&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.oracle.com/database/nosql-12.1.3.0/GettingStartedGuide/avroschemas.html" rel="noopener noreferrer"&gt;Strong schema support&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Schema versioning&lt;/li&gt;
&lt;li&gt;Dynamic schema support&lt;/li&gt;
&lt;li&gt;Different, but compatible, Reader and Writer versions allowed&lt;/li&gt;
&lt;li&gt;&lt;a href="https://avro.apache.org/docs/1.8.2/spec.html#Unions" rel="noopener noreferrer"&gt;Union types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://avro.apache.org/docs/1.8.1/spec.html#Object+Container+Files" rel="noopener noreferrer"&gt;Object container files&lt;/a&gt; can include schema along with encoded records&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why not human readable formats?
&lt;/h2&gt;

&lt;p&gt;There are many different ways of serializing and deserializing data, and they each have their own advantages. JSON is probably the most common format that developers deal with today, but XML is still king in some tech stacks. The prime benefit of these formats is that it easy for humans to read, making development and debugging much easier.&lt;/p&gt;

&lt;p&gt;However, the same things that make formats like JSON and XML human readable (like labels for each element or attribute) are the same things that make it grossly inefficient.  &lt;/p&gt;

&lt;p&gt;Don’t believe me? Here’s a link to the Pokemon &lt;a href="https://github.com/fanzeyi/pokemon.json/blob/master/pokedex.json" rel="noopener noreferrer"&gt;pokedex&lt;/a&gt; in json format. The labels (“id”, “name”, “Attack”, “Sp. Attack”) make up more data than the data does!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/fanzeyi/pokemon.json/blob/master/pokedex.json" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2019%2F09%2Fimage.png"&gt;&lt;/a&gt;Yes, You can compress json and xml, but it’s &lt;a href="http://highscalability.com/blog/2016/3/21/to-compress-or-not-to-compress-that-was-ubers-question.html" rel="noopener noreferrer"&gt;expensive&lt;/a&gt; and your data is no longer human readable…so why not choose a better format at that point?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Human readable / writable&lt;/li&gt;
&lt;li&gt;&lt;a href="https://json-schema.org/" rel="noopener noreferrer"&gt;Optional schema&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Widely supported&lt;/li&gt;
&lt;li&gt;Great for light tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computationally inefficient&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What about Protocol Buffers/Thrift?
&lt;/h2&gt;

&lt;p&gt;Formats like &lt;a href="https://developers.google.com/protocol-buffers/" rel="noopener noreferrer"&gt;Protocol Buffers&lt;/a&gt; or &lt;a href="https://thrift.apache.org/" rel="noopener noreferrer"&gt;Thrift&lt;/a&gt; are not human readable, but they are dramatically more efficient. The idea is that you can create a schema that defines the shape of the data, and you can share that schema with anybody who needs to decode your data.  &lt;/p&gt;

&lt;p&gt;This allows us to dramatically reduce the amount of space per message. The schema also id based, which offers a limited kind of &lt;a href="https://capnproto.org/language.html" rel="noopener noreferrer"&gt;schema evolution where you can add or remove (as long as they aren’t required) new fields&lt;/a&gt; without breaking anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highly efficient&lt;/li&gt;
&lt;li&gt;Most major languages have 3p library support for it&lt;/li&gt;
&lt;li&gt;Limited support for schema evolution&lt;/li&gt;
&lt;li&gt;Required schemas can serve as documentation &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Schemas must be shared between serializers and deserializers&lt;/li&gt;
&lt;li&gt;Can’t add or remove required fields&lt;/li&gt;
&lt;li&gt;Schemas are not directly versioned&lt;/li&gt;
&lt;li&gt;Complicated for light tasks &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Avro?
&lt;/h2&gt;

&lt;p&gt;I listed all the reasons above, and I’ll list them again below, but ultimately it boils down to having awesome schema support.&lt;/p&gt;

&lt;p&gt;Having a stand-alone, versioned schema allows Avro to keep the minimum amount of information in it’s messages – making them highly compact. The schema support also allows for different readers and writers to negotiate on which schemas they support, which bakes a lot of flexibility in at the lowest level.&lt;/p&gt;

&lt;p&gt;There are some additional niceties that go along with this too, like making it easier to support dynamic schemas rather than compiling them in with your code and having to figure out how to share the schema across projects. Sure, you could build this on top of another format…and also build that support into all of the tools you support, but why do that when you could use a popular, agreed upon standard?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Messages are &lt;a href="https://labs.criteo.com/2017/05/serialization/" rel="noopener noreferrer"&gt;highly efficient&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.oracle.com/database/nosql-12.1.3.0/GettingStartedGuide/avroschemas.html" rel="noopener noreferrer"&gt;Strong schema support&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Schema versioning&lt;/li&gt;
&lt;li&gt;Dynamic schema support&lt;/li&gt;
&lt;li&gt;Different, but compatible, Reader and Writer versions allowed&lt;/li&gt;
&lt;li&gt;&lt;a href="https://avro.apache.org/docs/1.8.2/spec.html#Unions" rel="noopener noreferrer"&gt;Union types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://avro.apache.org/docs/1.8.1/spec.html#Object+Container+Files" rel="noopener noreferrer"&gt;Object container files&lt;/a&gt; can include schema along with encoded records&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support is not as wide as other formats&lt;/li&gt;
&lt;li&gt;Complicated for light tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read a much better comparison here: &lt;a href="https://martin.kleppmann.com/2012/12/05/schema-evolution-in-avro-protocol-buffers-thrift.html" rel="noopener noreferrer"&gt;https://martin.kleppmann.com/2012/12/05/schema-evolution-in-avro-protocol-buffers-thrift.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The author of that post also wrote this awesome &lt;a href="https://www.codingblocks.net/designing-data-intensive" rel="noopener noreferrer"&gt;book&lt;/a&gt;!&lt;br&gt;&lt;br&gt;
 &lt;a href="https://www.codingblocks.net/designing-data-intensive" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.codingblocks.net%2Fwp-content%2Fuploads%2F2019%2F09%2Fdesigning-data-intensive-applications.jpg"&gt;&lt;/a&gt;, and if you're interested in this post then I bet you will love it.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>distributedsystems</category>
      <category>cloud</category>
      <category>kafka</category>
    </item>
    <item>
      <title>Analyzing Dev.to Git History with Elasticsearch</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Tue, 07 May 2019 04:15:20 +0000</pubDate>
      <link>https://dev.to/_codingblocks/analyzing-dev-to-git-history-with-elasticsearch-3cn2</link>
      <guid>https://dev.to/_codingblocks/analyzing-dev-to-git-history-with-elasticsearch-3cn2</guid>
      <description>&lt;p&gt;Importing Git History into Elasticsearch is &lt;a href="https://analytics.codingblocks.net/blog/analyzing-git-history-with-elasticsearch//blog/importing-git-history-to-elasticsearch/" rel="noopener noreferrer"&gt;not very much fun&lt;/a&gt; thanks to the lack of git formatting options, but it's pretty cool once you get it working!&lt;/p&gt;

&lt;p&gt;The commits that I imported has 22 data points, including a one-to-many list of changed files. I imported the git history from &lt;a href="https://github.com/thepracticaldev/dev.to"&gt;dev.to&lt;/a&gt; to see how things looked.&lt;/p&gt;

&lt;p&gt;Now I can run simple queries like this to see things like how many commits were made by each contributor:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Fdevtools.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Fdevtools.png" alt="Query for Commits by Author in Kibana Dev Tools"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's nice and all, but I'd prefer something visual so I put together a simple dashboard in &lt;a href="https://www.elastic.co/products/kibana" rel="noopener noreferrer"&gt;Kibana&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a screenshot of the charts I put together. I can apply filters and searches at the top of the dashboard and it will affect all the charts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Fkibana-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Fkibana-1.png" title="Unfiltered dashboard" alt="Unfiltered dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can (for example) look at commits by Ben Halpern in the last 90 days that involve "Algolia". &lt;/p&gt;

&lt;p&gt;Check out the video to see a bit more about the visualizations:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ejeHzxOBiOQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Pretty cool right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Eventually I'd like to take some time to clean-up the import process so it's easier to run, but for now I'm going to take some time exploring a couple of my own projects to see if I can dig anything interesting up.&lt;/p&gt;

</description>
      <category>git</category>
      <category>elasticsearch</category>
      <category>kibana</category>
    </item>
    <item>
      <title>The Pragmatic Programmer: Investing in Your Knowledge Portfolio</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Mon, 29 Apr 2019 00:00:24 +0000</pubDate>
      <link>https://dev.to/_codingblocks/the-pragmatic-programmer-investing-in-your-knowledge-portfolio-2h6n</link>
      <guid>https://dev.to/_codingblocks/the-pragmatic-programmer-investing-in-your-knowledge-portfolio-2h6n</guid>
      <description>&lt;p&gt;&lt;a href="https://www.codingblocks.net" rel="noopener noreferrer"&gt;Coding Blocks&lt;/a&gt; just began a new series of podcasts about my favorite all-time programmer-y book: &lt;em&gt;The Pragmatic Programmer&lt;/em&gt;. Talking about it helped me focus my thoughts on the subjects, and I hope that you get as much out of the conversation as I did.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://overcast.fm/+FMJNp3878" rel="noopener noreferrer"&gt;Listen to the show and let me know if you can figure out how to tell if you are making stone soup or just boiling frogs.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a snippet of the show notes:&lt;/p&gt;




&lt;p&gt;&lt;a href="https://overcast.fm/+FMJNp3878" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7338it3qz6h4u48ccas.jpg" alt="Cover Art for Episode 105" width="600" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;A Pragmatic Philosophy&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://pragprog.com/news/coming-soon-the-pragmatic-programmer-20th-anniversary-edition-in-beta" rel="noopener noreferrer"&gt;Note: 20th anniversary edition going into beta May 8th&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Written by programmers, not designers of some framework or language, the book presents patterns for developing software.&lt;/p&gt;

&lt;p&gt;This book is packed full of greatness even in the foreword:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are no perfect tools, methodologies, or solutions. You must pick the best bits for each particular situation.

&lt;ul&gt;
&lt;li&gt;Don’t fall in love with any particular technology or tool.&lt;/li&gt;
&lt;li&gt;Use your experience to help pick the right solutions for any particular situation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Pragmatic programmers get the work done and do it well.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This book is for those who want to be more productive and effective developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Traits of a Pragmatic Programmer
&lt;/h3&gt;

&lt;p&gt;How would you rate yourself on these traits?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Early adopter / fast adapter

&lt;ul&gt;
&lt;li&gt;Instinctive and passionate about trying out new technologies.&lt;/li&gt;
&lt;li&gt;Confident and grasp new things quickly.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Inquisitive  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You ask a ton of questions, you want to know as much as you can about what’s being done.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Critical thinker&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t accept whatever is being said or claimed. Use your experience to think through the problem.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Realistic&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You understand when something is complex and what that means for timelines.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Jack of all trades&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You keep your knowledge broad even if your practice is very focused / narrow.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tips
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Care about your craft.&lt;/li&gt;
&lt;li&gt;Think about your work.

&lt;ul&gt;
&lt;li&gt;Always evaluate what you’re doing and why.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Just Good Advice
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Embrace individuality and craftsmanship, even on large teams.&lt;/li&gt;
&lt;li&gt;Always be working to sharpen and hone your skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;The Cat Ate My Source Code&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“The greatest of all weaknesses is the fear of appearing weak.”&lt;/em&gt; – J. B. Bossuet&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adopt an attitude, style, and philosophy of approaching problems and solutions where you’re always thinking about the big picture.&lt;/li&gt;
&lt;li&gt;Take responsibility for your actions.

&lt;ul&gt;
&lt;li&gt;Commit to something being done right even though you don’t have control over all aspects of what’s being done.&lt;/li&gt;
&lt;li&gt;This doesn’t mean you have to fall on the sword. In “impossible” situations, it’s up to your discretion to not accept responsibility for what is happening.&lt;/li&gt;
&lt;li&gt;Accepting responsibility is being held accountable.&lt;/li&gt;
&lt;li&gt;If you do make a mistake or there is a shortcoming, be honest and offer options.

&lt;ul&gt;
&lt;li&gt;Vendor didn’t come though? You should have had a contingency plan. Can’t blame things on them.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Being responsible doesn’t mean being perfect. It means working to prevent mistakes, and then working to fix them when things go wrong.&lt;/li&gt;

&lt;li&gt;Be willing to change, but be cautious at the same time.&lt;/li&gt;

&lt;li&gt;Know how good your software has to be. Define what is good enough?&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Offer options, not excuses.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;“Rubber Duck”&lt;/em&gt; it. If what you have to say sounds lame, then you should probably save your breath and find some possible solutions.&lt;/li&gt;
&lt;li&gt;Admit when you need help or more resources.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Software Entropy&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Entropy refers to the amount of “disorder” in a system.&lt;/li&gt;
&lt;li&gt;Also known as “software rot” .

&lt;ul&gt;
&lt;li&gt;Despite best plans and best people working on a project, it can still suffer from this.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Don’t live with broken windows.

&lt;ul&gt;
&lt;li&gt;Don’t leave poor decisions or bad code in your code.&lt;/li&gt;
&lt;li&gt;If you don’t have time to fully fix it, patch it somehow.&lt;/li&gt;
&lt;li&gt;Neglect accelerates rot, rot begets rot.&lt;/li&gt;
&lt;li&gt;Don’t let the &lt;em&gt;“the rest of the code sucks”&lt;/em&gt; mentality sink in, otherwise it will decline faster than you could imagine.&lt;/li&gt;
&lt;li&gt;Keeping the codebase clean effectively makes others not want to mess it up.&lt;/li&gt;
&lt;li&gt;If you don’t have time to do things properly, maybe consider &lt;em&gt;“boarding it up”&lt;/em&gt;, i.e. comment the code out or display a warning.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;Stone Soup and Boiled Frogs&lt;/em&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Be a catalyst for change&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Talking about change often goes nowhere.
&lt;/li&gt;
&lt;li&gt;People want to plan meetings.&lt;/li&gt;
&lt;li&gt;Then management approvals.&lt;/li&gt;
&lt;li&gt;Barriers to entry pile up.&lt;/li&gt;
&lt;li&gt;This is known as &lt;em&gt;“start-up fatigue”&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Start making strides in the direction you see the change needs to happen, show people, and they’ll begin to rally around you.&lt;/li&gt;
&lt;li&gt;People find it easier to join an ongoing success.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Remember the big picture, don’t be the frog in boiling water.

&lt;ul&gt;
&lt;li&gt;Constantly review what’s happening around you otherwise you’ll lose sight of what’s happening and things can start to deteriorate without your noticing.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Good-Enough Software&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Users should be able to participate in determining if something is good enough.&lt;/li&gt;
&lt;li&gt;The scope and quality of the system you create should be part of the project specifications.&lt;/li&gt;
&lt;li&gt;Knowing when to stop iterating over the same code is important.

&lt;ul&gt;
&lt;li&gt;Code can never be perfect so leave well enough alone. &lt;/li&gt;
&lt;li&gt;Don’t over-embellish or over-refine an otherwise perfectly good program.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Make quality a requirements issue.

&lt;ul&gt;
&lt;li&gt;Letting your users experience the software now may lead to better overall software in the future, even better than the path of perfecting what is there now.&lt;/li&gt;
&lt;li&gt;Great software today is better than perfect software tomorrow.
&lt;/li&gt;
&lt;li&gt;How can we set standards around quality? Test coverage, code reviews, static code analysis, etc. maybe?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Your Knowledge Portfolio&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“An investment in knowledge always pays the best interest.”&lt;/em&gt; – Benjamin Franklin&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your knowledge portfolio is all the knowledge you’ve gained programming both in the technical as well as domain specific bits you’ve picked up over time.
&lt;/li&gt;
&lt;li&gt;Your knowledge and experience are your most important professional assets … but are expiring assets.&lt;/li&gt;
&lt;li&gt;Consider investing in your knowledge portfolio like you would make financial investments:

&lt;ul&gt;
&lt;li&gt;Invest regularly, as a habit.&lt;/li&gt;
&lt;li&gt;Diversify.&lt;/li&gt;
&lt;li&gt;Manage risk.&lt;/li&gt;
&lt;li&gt;Buy low, sell high.&lt;/li&gt;
&lt;li&gt;Review and Rebalance.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Invest regularly in your knowledge portfolio

&lt;ul&gt;
&lt;li&gt;Learn at least one new language a year.&lt;/li&gt;
&lt;li&gt;Read a technical book each quarter.&lt;/li&gt;
&lt;li&gt;Read nontechnical books, too.&lt;/li&gt;
&lt;li&gt;Take classes.&lt;/li&gt;
&lt;li&gt;Participate in user groups.&lt;/li&gt;
&lt;li&gt;Experiment with different environments.&lt;/li&gt;
&lt;li&gt;Stay current by subscribing to trade magazines, journals, newsletters, or similar.&lt;/li&gt;
&lt;li&gt;Join and participate in online communities and read white papers for technologies of interest.&lt;/li&gt;
&lt;li&gt;Be on the lookout for opportunities. If you can’t answer a question … don’t let it go!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Critically analyze what you read and hear.

&lt;ul&gt;
&lt;li&gt;Try to think critically about what you read and hear, don’t take it for truth.&lt;/li&gt;
&lt;li&gt;Beware of zealots, or any time somebody can confidently tell you &lt;em&gt;“the way”&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Communicate!&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ideas are worthless unless you can communicate it&lt;/li&gt;
&lt;li&gt;Meetings, tickets, wikis, and code are all forms of communication.
&lt;/li&gt;
&lt;li&gt;Understand what you want to say.

&lt;ul&gt;
&lt;li&gt;Jot down your high level goals.&lt;/li&gt;
&lt;li&gt;Have a plan for getting it across.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Know your audience.

&lt;ul&gt;
&lt;li&gt;The WISDOM acrostic:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;W&lt;/strong&gt; hat do you want them to learn?&lt;/li&gt;
&lt;li&gt;What is their &lt;strong&gt;I&lt;/strong&gt; nterest?&lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;S&lt;/strong&gt; ophisticated are they?&lt;/li&gt;
&lt;li&gt;How much &lt;strong&gt;D&lt;/strong&gt; etail do they want?&lt;/li&gt;
&lt;li&gt;Whom do you want to &lt;strong&gt;O&lt;/strong&gt; wn the info?&lt;/li&gt;
&lt;li&gt;How can you &lt;strong&gt;M&lt;/strong&gt; otivate them to listen to you?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Choose your moment wisely and make what you’re saying relevant in time.&lt;/li&gt;

&lt;li&gt;Communicate with your audience the way they want to be communicated with.&lt;/li&gt;

&lt;li&gt;Make your message look good.

&lt;ul&gt;
&lt;li&gt;Presentation is as important as the content itself.&lt;/li&gt;
&lt;li&gt;Which is easier to read? One full page of text? Or two pages of text broken apart into sections with section headers?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Get people involved in your documents early and often.

&lt;ul&gt;
&lt;li&gt;Involving your audience builds relationships and creates better documents.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Be a listener. If you don’t listen to others, they won’t listen to you.&lt;/li&gt;

&lt;li&gt;Get back to people. People hate when you don’t reply, even if it’s just an &lt;em&gt;“I’ll get back to you later.”&lt;/em&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Tip
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;It’s Both What You Say and the Way You Say It.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources We Like
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;The Pragmatic Programmer&lt;/em&gt; by Andrew Hunt, David Thomas (&lt;a href="https://www.codingblocks.net/get/the-pragmatic-programmer" rel="noopener noreferrer"&gt;Amazon&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;The Pragmatic Bookshelf (&lt;a href="https://pragprog.com/" rel="noopener noreferrer"&gt;pragprog.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Programmers’ Build Errors: A Case Study (at Google)&lt;/em&gt; (&lt;a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42184.pdf" rel="noopener noreferrer"&gt;static.googleuserconent.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Broken windows theory (&lt;a href="https://en.wikipedia.org/wiki/Broken_windows_theory" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;How ‘Broken Windows’ Helped Shape Tensions Between Police And Communities&lt;/em&gt; (&lt;a href="https://www.wnyc.org/story/how-broken-windows-helped-shape-tensions-between-police-and-communities-today/" rel="noopener noreferrer"&gt;www.wnyc.org&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tip of the Week
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Git&lt;/em&gt; the source code for your favorite old games. (&lt;a href="https://github.com/historicalsource?tab=repositories" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Learn about all of your favorite design patterns using &lt;em&gt;The Catalog of Design Patterns&lt;/em&gt;. (&lt;a href="https://refactoring.guru/design-patterns/catalog" rel="noopener noreferrer"&gt;refactoring.guru&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Learn VS Code tricks you didn’t even know about. &lt;em&gt;VS Code can do that?!&lt;/em&gt; (&lt;a href="https://vscodecandothat.com/" rel="noopener noreferrer"&gt;vscodecandothat.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Sharpen your Azure skills with these self paced labs provided by Microsoft:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Acquire the cloud skills you need, at your own pace&lt;/em&gt; (&lt;a href="https://handsonlabs.microsoft.com/handsonlabs/SelfPacedLabs" rel="noopener noreferrer"&gt;handsonlabs.microsoft.com&lt;/a&gt;) &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Welcome to Self-paced Labs&lt;/em&gt; (&lt;a href="https://www.microsoft.com/handsonlabs/selfpacedlabs" rel="noopener noreferrer"&gt;www.microsoft.com&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>podcast</category>
      <category>programming</category>
      <category>books</category>
    </item>
    <item>
      <title>Quickstart Guide: Elastic Stack for Devs</title>
      <dc:creator>Joe Zack</dc:creator>
      <pubDate>Sun, 28 Apr 2019 20:03:37 +0000</pubDate>
      <link>https://dev.to/_codingblocks/quickstart-guide-elastic-stack-for-devs-580e</link>
      <guid>https://dev.to/_codingblocks/quickstart-guide-elastic-stack-for-devs-580e</guid>
      <description>&lt;h2&gt;
  
  
  Curious about the Elastic Stack? This quick guide will walk you through setting it up and importing articles from some of my favorite dev.to authors so you can play around!
&lt;/h2&gt;

&lt;p&gt;Elasticsearch is an open-source, scalable, full-text search and analytics engine. It is used for a variety of purposes, from &lt;a href="https://analytics.codingblocks.net/blog/elasticsearch-is-not-just-for-search/" rel="noopener noreferrer"&gt;Full Text Search, to E-Commerce, to Real-Time Analytics&lt;/a&gt;. It is frequently associated with big organizations and big data, but Elastic did a great job with their default configurations so it's easy for smaller projects as well.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Zaqe5rFtma4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this guide, we're going to spin up a basic Elastic Stack (formerly known as the "ELK Stack") that brings together a few different open-source services that were designed to work together. Here is a high level description of those services:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elasticsearch&lt;/strong&gt; is a persistence engine and API layer.&lt;br&gt;
&lt;strong&gt;Logstash&lt;/strong&gt; is a plugin-based tool for importing data&lt;br&gt;
&lt;strong&gt;Kibana&lt;/strong&gt; is an administration GUI for exploration and management&lt;/p&gt;

&lt;p&gt;I also recorded a video if you prefer watching over reading:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Felasticsearch-quickstart-complete.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Felasticsearch-quickstart-complete.png" title="The results: Elastic Stack running with dev blog data" alt="Screenshot of Elastic Stack with developer blog data"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;You need Docker for this guide, check here for &lt;a href="https://docs.docker.com/install/" rel="noopener noreferrer"&gt;installation instructions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are on Windows, then I recommend using the Linux containers (default) and also &lt;a href="https://blogs.msdn.microsoft.com/wael-kdouh/2017/06/26/enabling-drive-sharing-with-docker-for-windows/" rel="noopener noreferrer"&gt;sharing a drive&lt;/a&gt; so that Docker can persist your Elastic data to disk. &lt;/p&gt;
&lt;h2&gt;
  
  
  #1: Compose the architecture
&lt;/h2&gt;

&lt;p&gt;The first step is to create a docker-compose.yml file that describes how your services fit together. I'm aiming for speed over depth in this guide so I have already created this for you.&lt;/p&gt;

&lt;p&gt;Simply clone the repository and fire up the Elastic Stack:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/codingblocks/simplified-elastic-stack.git&lt;br&gt;
cd simplified-elastic-stack&lt;br&gt;
docker-compose up -d&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Give Elasticsearch a few seconds to catch it's breath after it starts up and then you can verify it's status by hitting this url a browser: &lt;a href="http://localhost:9200" rel="noopener noreferrer"&gt;http://localhost:9200&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2F200-status.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2F200-status.png" title="Congratulations, you have the Elastic stack running on you computer!" alt="Screenshot of successful status message"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: The logstash container will shutdown quickly because it doesn't yet have anything to do yet, so lets fix that!&lt;/p&gt;

&lt;h2&gt;
  
  
  #2: Import data
&lt;/h2&gt;

&lt;p&gt;Now we'll use Logstash to import data. The repo you cloned above already has a custom Dockerfile.Logstash file, so lets add an input plugin that can import &lt;a href="https://www.copyblogger.com/what-the-heck-is-rss/" rel="noopener noreferrer"&gt;RSS&lt;/a&gt; feeds. All you have to do is add the second line to Dockerfile.Logstash so that it looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FROM docker.elastic.co/logstash/logstash-oss:7.0.0&lt;br&gt;
RUN bin/logstash-plugin install logstash-input-rss&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Now let's add a couple input configurations. Each "rss" block represents one RSS feed that will be imported into Elasticsearch every 3600 seconds. Replace the config/logstash.conf file contents with the following lines and Logstash will take care of the rest.&lt;/p&gt;

&lt;p&gt;You can see the inputs are some of my favorite blogs, configured to poll once an hour. The output sets up a basic index called "blogs" that will hold the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update config/logstash.conf:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input {
  rss {
    url =&amp;gt; "https://dev.to/feed/davefollett"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/dance2die"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/dotnetcoreblog"
    interval =&amp;gt; 3600
  }
  rss {
    url =&amp;gt; "https://dev.to/feed/kritner"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/molly_struve"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/rionmonster"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/TheInfraDev"
    interval =&amp;gt; 3600
  }

  rss {
    url =&amp;gt; "https://dev.to/feed/thejoezack"
    interval =&amp;gt; 3600
  }
}

output {
  elasticsearch {
    action =&amp;gt; "index"
    index =&amp;gt; "blogs"
    hosts =&amp;gt; "elasticsearch:9200"
    document_id =&amp;gt; "%{[link]}"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it, Logstash will take care of everything else. Next time we restart our environment, Logstash will start polling and importing the feed data.&lt;br&gt;
Stop, re-build, and restart your environment:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker-compose down&lt;br&gt;
docker-compose build&lt;br&gt;
docker-compose up -d&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Give Elasticsearch a minute to breathe after docker-compose is running, and try hitting this url in the browser to see that you have data: &lt;a href="http://localhost:9200/blogs/_search" rel="noopener noreferrer"&gt;http://localhost:9200/blogs/_search&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  #3: Have fun!
&lt;/h2&gt;

&lt;p&gt;Everything is setup now, so it's time for you to do a bit of exploring.&lt;br&gt;
If you are new to the Elastic Stack, I recommend getting acquainted with Kibana first. It's already running on your computer: &lt;a href="http://localhost:5601" rel="noopener noreferrer"&gt;http://localhost:5601&lt;/a&gt;&lt;br&gt;
Head over to the "dev tools" and give a few of these queries a shot so you can get a taste of what Elastic has to offer.&lt;/p&gt;
&lt;h4&gt;
  
  
  Sample queries
&lt;/h4&gt;

&lt;p&gt;Simple filter, Get the top 5 posts about JavaScript in the last year&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /blogs/_search?q=JavaScript&amp;amp;size=5
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "published": {
              "gte" : "now-1y/y",
            }
          }
        }
      ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple aggregate, posts by date&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /blogs/_search?size=0
{
  "aggs":{
    "posts by date":{
      "date_histogram":{
        "field":"published",
        "interval":"year"
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Combination aggregate/filters: Top 10 results for Elasticsearch, with results and counts by author&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /blogs/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "message": "Elasticsearch"
          }
        }
      ]
    }
  },
  "aggs": {
    "author": {
      "terms": {
        "field": "author.keyword"
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are a couple suggestions for what to do now that you've got Elastic Stack up and running:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a simple website that lets you browse and search for your favorite blogs.&lt;/li&gt;
&lt;li&gt;Explore the &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html" rel="noopener noreferrer"&gt;Search&lt;/a&gt; and &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html" rel="noopener noreferrer"&gt;Aggregations&lt;/a&gt;
APIs* &lt;a href="https://www.elastic.co/guide/en/kibana/current/visualize.html" rel="noopener noreferrer"&gt;Create visualizations with Kibana&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Felasticsearch-quickstart-complete.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fanalytics.codingblocks.net%2Fimg%2Felasticsearch-quickstart-complete.png" title="The results: Elastic Stack running with dev blog data" alt="Screenshot of Elastic Stack with developer blog data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting: (Huge thanks to &lt;a href="https://dev.to/davefollett"&gt;Dave Follett&lt;/a&gt; for the help!)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Running on linux, and the Elasticsearch container keeps crashing? Your vm.max_map_count might be too low. Check this out for an explanation / fix: &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html" rel="noopener noreferrer"&gt;https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Having trouble with containers? "docker logs" and "docker inspect" are your friends. You can run a command like this in order to see where all the elasticsearch files are on disk: "docker inspect $(docker ps -f name=elasticsearch -aq)"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Photo by Nine Köpfer on Unsplash&lt;/p&gt;

</description>
      <category>elasticsearch</category>
    </item>
  </channel>
</rss>
