<?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>Forem: Lukas Lukac</title>
    <description>The latest articles on Forem by Lukas Lukac (@web3coach).</description>
    <link>https://forem.com/web3coach</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%2F35892%2F9710a8eb-0fb6-4f64-a983-4a39dca67046.jpg</url>
      <title>Forem: Lukas Lukac</title>
      <link>https://forem.com/web3coach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/web3coach"/>
    <language>en</language>
    <item>
      <title>Stream micro-payments to your favorite content creators</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Tue, 25 Aug 2020 10:15:21 +0000</pubDate>
      <link>https://forem.com/web3coach/stream-micro-payments-to-your-favorite-content-creators-29nj</link>
      <guid>https://forem.com/web3coach/stream-micro-payments-to-your-favorite-content-creators-29nj</guid>
      <description>&lt;p&gt;Welcome to a new series: real-world blockchain use-cases. &lt;/p&gt;

&lt;p&gt;You will learn how blockchain can be used to solve various day-to-day business challenges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem #1
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Web 2.0 business model is broken.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ads business works best at scale.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On a centralized platform where you spend as much time as possible, with personalized suggestions of what to watch/read next.&lt;/li&gt;
&lt;li&gt;On a platform where you can be perfectly tracked. Preferably already signed in. Cross-device cookies and anonymous sessions are a pain the ass to track.
Facebook, Youtube, Instagram, Twitter, LinkedIn, X, Y, Z platforms convinced creators to upload their content and give up the control in exchange for an ads revenue $$$$.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ads business model contributed to the formation of &lt;strong&gt;massive platforms&lt;/strong&gt; and a &lt;strong&gt;decline in personal blogs and unique independent sites.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Did you ever try to include a link to an external site, even your blog, from your LinkedIn post? The LinkedIn algorithm will teach you a lesson about post views.&lt;/p&gt;

&lt;p&gt;You are being held as a hostage. Please, someone, call the SWAT team finally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What about subscriptions?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's say you don't want to trade your privacy or attention for money.&lt;/p&gt;

&lt;p&gt;Subscription business model FTW!&lt;/p&gt;

&lt;p&gt;Except… The average American &lt;a href="https://www.forbes.com/sites/tonifitzgerald/2019/03/29/how-many-streaming-video-services-does-the-average-person-subscribe-to/#277199ad6301"&gt;already subscribes to 3.4 on-demand video services&lt;/a&gt;, and that's not even counting other media such as music, podcasts, books, or subscriptions to individual creators.&lt;/p&gt;

&lt;p&gt;How many do you have? I personally have seven recurring monthly subscriptions.&lt;/p&gt;

&lt;p&gt;Can we do better?&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution - Web Monetization
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Web Monetization provides an open, native, efficient, and automatic way to compensate creators, pay for API calls, and support crucial web infrastructure."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A neutral protocol for transferring money. &lt;a href="https://interledger.org"&gt;Interledger&lt;/a&gt; provides a simple, ledger-agnostic, and currency-agnostic method to transfer small quantities of money (no more - minimum 5$ card payment nonsense in 2020).&lt;/p&gt;

&lt;p&gt;Do you want to transfer 1M $? Okay. 4 seconds. 0 fees.&lt;/p&gt;

&lt;p&gt;Do you want to transfer 1$? Okay. 4 seconds. 0 fees.&lt;/p&gt;

&lt;p&gt;Do you want to transfer 0.001$? Okay. 4 seconds. 0 fees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web monetization is about streaming micro-payments from consumers DIRECTLY to the content creators,&lt;/strong&gt; without a middleman taking 70% cut from all the profit like in the music, movie, book, and every other industry.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;one budget for all your subscriptions (you will learn how to set it up at the bottom of this post)&lt;/li&gt;
&lt;li&gt;real-time salary - the content creator is receiving money simultaneously as her/his readers consume the content&lt;/li&gt;
&lt;li&gt;no hidden fees&lt;/li&gt;
&lt;li&gt;decentralized protocol empowering freedom of speech, user rights, and privacy&lt;/li&gt;
&lt;li&gt;no content firewalls - looking at you Financial Times
financial times firewall&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xWQPTXry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qcy1m22yq317xc92c914.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xWQPTXry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qcy1m22yq317xc92c914.png" alt="financial times"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, this is too good to be true. What are the cons?&lt;/p&gt;

&lt;h3&gt;
  
  
  Disadvantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The payments are streamed in small quantities. For the idea to work, a sufficient amount of users have to set up the Web Monetization Browser Extension to provide liquidity &lt;em&gt;(e.g., You received 0.002295 XRP from Interledger Network).&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The concept is still a bit "techy" from the UX perspective.&lt;/li&gt;
&lt;li&gt;Educational gap - users don't understand tokens or advantages of p2p systems YET.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fortunately, all of this can and will be tackled in the upcoming months. The UX will get better, and the news will spread.&lt;/p&gt;

&lt;p&gt;So, how does the situation looks now? Who is using the protocol?&lt;/p&gt;

&lt;h3&gt;
  
  
  Existing clients
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sUWxHyL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4kbwzjb1e07xoki650uf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sUWxHyL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4kbwzjb1e07xoki650uf.png" alt="web dev monetization clients"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--POo2IoKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ocv77gr46g6oeqbodpkn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--POo2IoKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ocv77gr46g6oeqbodpkn.png" alt="coil monetization clients"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technical Flow Diagram
&lt;/h3&gt;

&lt;p&gt;Source: &lt;a href="https://webmonetization.org/docs/explainer"&gt;https://webmonetization.org/docs/explainer&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Users must have an account or subscription with a Web Monetization provider (also known as a WM sender).&lt;/li&gt;
&lt;li&gt;Users must have a Web Monetization agent installed in their browser with the necessary authorization to initiate payments from the WM provider on the user's behalf.&lt;/li&gt;
&lt;li&gt;Websites must sign up with, or run their own, Web Monetization receiver.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sequence diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bamyOn-N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/974zri2j156punq2rdgd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bamyOn-N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/974zri2j156punq2rdgd.png" alt="web monetization flow diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready to join the community and become a member of the Web 3.0 monetization movement in under 5 minutes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Tutorial - Setup your Web Monetization
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;DISCLAIMER: This is not financial advice. I am NOT affiliated with UpHold, Ripple, or Coil, but I like their technology a lot!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the next five steps, we will configure Web Monetization from both user and content creator perspective. We will pay others as we browse the web, and we will receive money as other users engage with our content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two steps to support content creators on the web:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start a Coil subscription&lt;/li&gt;
&lt;li&gt;Test your subscription&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1) Start a Coil subscription
&lt;/h3&gt;

&lt;p&gt;Coil is a company financed by Ripple. A San Francisco start-up that is also behind the &lt;a href="https://interledger.org/"&gt;Interledger&lt;/a&gt; protocol.&lt;/p&gt;

&lt;p&gt;Ripple, together with the open-sourced community, develops XRP blockchain ledger designed for payments. XRP's main value proposition is to be efficient and fast. Two fundamental requirements to enable micro-payments on the web.&lt;/p&gt;

&lt;p&gt;You install Coil's Browser Extension and set up a 5$ monthly subscription. When your browser extension detects ANY website powered by web monetization such as &lt;a href="https://css-tricks.com"&gt;https://css-tricks.com&lt;/a&gt; or &lt;a href="https://dev.to"&gt;https://dev.to&lt;/a&gt;, it will start streaming XRP micro-payments to the website owner OR directly to the content creator behind a specific article/tutorial/music/content!&lt;/p&gt;

&lt;p&gt;Yey! Simple as that. One subscription to rule them all, and to reward the content creators across the globe!&lt;/p&gt;

&lt;p&gt;Enough theory.&lt;/p&gt;

&lt;p&gt;Open &lt;a href="https://coil.com"&gt;https://coil.com&lt;/a&gt; and follow the "how to get started" instructions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Eu8Q92yp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hkricma3l3rliaqejwml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Eu8Q92yp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hkricma3l3rliaqejwml.png" alt="coil get started instructions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Register as a member&lt;/li&gt;
&lt;li&gt;Active a 5$ subscription&lt;/li&gt;
&lt;li&gt;Install the extension&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Done?&lt;/p&gt;

&lt;p&gt;Let's test it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Test your subscription
&lt;/h3&gt;

&lt;p&gt;Open any website powered by the web monetization protocol.&lt;/p&gt;

&lt;p&gt;E.g., this platform.&lt;/p&gt;

&lt;p&gt;All you have to do is browse around as a typical consumer, and you are actively supporting the authors in real-time (see the browser extension in the top-right corner in action). Coil client will be streaming tiny amount from your subscription to the Payment Receiver.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tgn7BY9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vzgqjzaycy0jshb2umxu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tgn7BY9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vzgqjzaycy0jshb2umxu.png" alt="coil extension in action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is possible because this platform has configured its Web Monetization tag in the page header:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--arQcrAKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sy144zr5lmxfgrpgy60p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--arQcrAKz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sy144zr5lmxfgrpgy60p.png" alt="dev to monetized tag"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perfect.&lt;/p&gt;

&lt;p&gt;How did they do it, and how can you do it as well for your website?&lt;/p&gt;

&lt;p&gt;I will show you in the next four steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four steps to become a content creator and get paid:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up a web monetized wallet&lt;/li&gt;
&lt;li&gt;Get your Payment Pointer&lt;/li&gt;
&lt;li&gt;Generate your meta tag&lt;/li&gt;
&lt;li&gt;Include the meta tag on your website&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1) Set up a web monetized wallet
&lt;/h3&gt;

&lt;p&gt;I created an account on &lt;a href="https://uphold.com"&gt;UpHold.com&lt;/a&gt; and deposited 20€ using my debit card. Then I exchanged the 20€ for XRP cryptocurrency. The depositing step is optional, but I wanted to have some XRP for future tutorials.&lt;/p&gt;

&lt;p&gt;This is how my UpHold wallet looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W92otdVT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3ex5nkfyv67a8s58mf66.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W92otdVT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3ex5nkfyv67a8s58mf66.png" alt="Web3Coach UpHold XRP Account"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Get your Payment Pointer
&lt;/h3&gt;

&lt;p&gt;Click on the last option from the previous screen - "from Interledger Payment Pointer" and generate a new one Payment Pointer.&lt;/p&gt;

&lt;p&gt;My one is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZOkTrZUy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xe5d6skdo83e5hoq1zzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZOkTrZUy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xe5d6skdo83e5hoq1zzq.png" alt="Web3Coach Interledger Pointer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy this Payment Pointer to every platform where you post regularly.&lt;/p&gt;

&lt;p&gt;I configured two websites so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coil&lt;/li&gt;
&lt;li&gt;Dev.To&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To configure Coil,&lt;/strong&gt; open &lt;a href="https://coil.com/settings/payouts"&gt;https://coil.com/settings/payouts&lt;/a&gt;, and paste your Payment Pointer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JPVEywCL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l4ub5vczdorisl0d4eg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JPVEywCL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l4ub5vczdorisl0d4eg7.png" alt="Configuring Coil Payout"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To configure the DevTo,&lt;/strong&gt; open &lt;a href="https://dev.to/settings/misc"&gt;https://dev.to/settings/misc&lt;/a&gt;, and paste your Payment Pointer. Once you do so, you will receive streamed micro-payments as other users engage with your content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sMHUp2cr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7rw83xg6lq52eevstn5l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sMHUp2cr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7rw83xg6lq52eevstn5l.png" alt="Configuring Web3Coach dev.to Payment Pointer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3) Generate your meta tag
&lt;/h3&gt;

&lt;p&gt;You can find it pre-generated in the Coil settings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--umZWySlp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6yf6rr3vmvxtiq07rjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--umZWySlp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6yf6rr3vmvxtiq07rjk.png" alt="Configuring Coil Payment Pointer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4) Include the meta tag on YOUR website
&lt;/h3&gt;

&lt;p&gt;Paste the Monetization tag to your website / blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aL776lvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ol4950bst0ewxfmi2hvl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aL776lvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ol4950bst0ewxfmi2hvl.png" alt="Adding monetization pointer to https://web3.coach"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Commit. Push.&lt;/p&gt;

&lt;p&gt;You are ready to receive real-time XRP payments as long as your users have an active Coil extension :)&lt;/p&gt;

&lt;p&gt;Result on my website &lt;a href="https://web3.coach:"&gt;https://web3.coach:&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GdtKvEo_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s98mo3wmqom7ej73htt4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GdtKvEo_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s98mo3wmqom7ej73htt4.png" alt="Coil users supporting Web3Coach web"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few minutes after you deploy the Monetization tag, and as Coil members will reach your website, you will start receiving XRP payments for your excellent content:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You received 0.002295 XRP from Interledger Network.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Welcome to Web 3.0!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you like the p2p monetization concept, re-tweet and spread the word!&lt;/strong&gt;&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--2L9TrhbY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1259906388341534720/EjZtV7GS_normal.jpg" alt="Lukáš Lukáč profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Lukáš Lukáč
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="mentioned-user" href="https://dev.to/web3coach"&gt;@web3coach&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      The Web 2.0 business model is broken.&lt;br&gt;&lt;br&gt;- ads&lt;br&gt;- no privacy&lt;br&gt;- middlemen taking 70% of profits from content creators&lt;br&gt;&lt;br&gt;🧵A thread how blockchain can help:
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      10:16 AM - 25 Aug 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1298202537984745473" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1298202537984745473" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1298202537984745473" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>blockchain</category>
      <category>webmonetization</category>
    </item>
    <item>
      <title>Observations from my first week as full-time IndieHacker after seven years of 9-5 coding</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Fri, 31 Jul 2020 10:01:18 +0000</pubDate>
      <link>https://forem.com/web3coach/observations-from-my-first-week-as-full-time-indiehacker-after-seven-years-of-9-5-coding-2abn</link>
      <guid>https://forem.com/web3coach/observations-from-my-first-week-as-full-time-indiehacker-after-seven-years-of-9-5-coding-2abn</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;2020 is the year of everyone going crazy on indie hacking, building bootstrapped products, starting paid newsletters, and launching podcasts.&lt;/p&gt;

&lt;p&gt;I jumped on this boat myself, but this time with full steam ahead. Full time. I quit my job to &lt;a href="https://twitter.com/Web3Coach" rel="noopener noreferrer"&gt;teach blockchain programming&lt;/a&gt; - no more hobbies or side projects.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F62y7od7x616lo5255o4v.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F62y7od7x616lo5255o4v.jpg" alt="Last day at work"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I want to share my top two findings from the first week as an indie-hacker with you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. There are no rules
&lt;/h2&gt;

&lt;p&gt;I find myself surprisingly lost - in a good way. As someone who loves structures and rules, waking up at 9 am for the stand-up, for years, it feels peculiar NOT to HAVE TO.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When do you want to wake up? &lt;strong&gt;Up to you!&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;What do you want to work on? &lt;strong&gt;Up to you!&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;How are you going to implement this product? &lt;strong&gt;Up to you!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you want to play CS:GO for 10 hours? Ok. Do you want to work for 16 hours? Ok.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This sounds fantastic until you realize that your day's structure has a direct impact on your earnings :)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Exciting because there is no cap on how much you can earn, but also a bit stressful because you may earn 10 000$ this month, or 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. You are the entire company
&lt;/h2&gt;

&lt;p&gt;When you start indie hacking, you will probably be a solo founder. A developer with a good idea? Well, congratulation! You are now also a product team, marketing team, sales team, and potentially a legal team.&lt;/p&gt;

&lt;p&gt;You soon realize that the tech is probably the least of your problems :) Coding is the easiest part! You already have experience in solving technical challenges. But that's now only 30% of your workweek compared to the previous 100% as a dev employee (depending on what you are building ofc).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ultimate freedom comes with the ultimate responsibility - as superman would say.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why becoming an IndieHacker?
&lt;/h2&gt;

&lt;p&gt;Well, the answer will vary from person to person. That's the beauty of it - there are no rules.&lt;/p&gt;

&lt;p&gt;I left my comfy job bc I want to acquire a new marketing, business skills, and bring more devs into the blockchain ecosystem.&lt;/p&gt;

&lt;p&gt;Follow me on Twitter if you are considering this journey or want to learn more about self-employment, indie-hacking, and my &lt;strong&gt;current obsession with blockchain programming&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Web3Coach" rel="noopener noreferrer"&gt;https://twitter.com/Web3Coach&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What about you? Did you try entrepreneurship? Are you considering it?&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>Best Terminal Setup - Terminator + ZSH + Powerlevel10k</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Tue, 07 Jul 2020 17:56:58 +0000</pubDate>
      <link>https://forem.com/web3coach/best-terminal-setup-terminator-zsh-powerlevel10k-7pl</link>
      <guid>https://forem.com/web3coach/best-terminal-setup-terminator-zsh-powerlevel10k-7pl</guid>
      <description>&lt;p&gt;I tried a new Linux (Ubuntu) terminal setup and it's a blast. I want to share it with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will you setup?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terminator&lt;/strong&gt; terminal to support splitting the terminal screen vertically and horizontally into multiple windows. Extremely useful when working with distributed systems like blockchain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ZSH&lt;/strong&gt; framework to add productivity plugins and custom color themes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Powerlevel10k&lt;/strong&gt; for "speed, flexibility and out-of-the-box experience."&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdsnr1m42mh4xq0jkwrz.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdsnr1m42mh4xq0jkwrz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the Terminator
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;terminator


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Open it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa1zo7uskon3ttt5i18pj.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa1zo7uskon3ttt5i18pj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Install ZSH
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;zsh


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;And make it your default shell:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

chsh &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;which zsh&lt;span class="si"&gt;)&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Or checkout the &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH" rel="noopener noreferrer"&gt;official ZSH Github repo&lt;/a&gt; and choose your favorite installation process.&lt;/p&gt;
&lt;h3&gt;
  
  
  PowerLevel10k Theme
&lt;/h3&gt;

&lt;p&gt;The great thing about ZSH is the level of personalization possible. I found this theme which looks pretty solid: &lt;a href="https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k" rel="noopener noreferrer"&gt;https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Install the theme
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

git clone &lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'source ~/powerlevel10k/powerlevel10k.zsh-theme'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;!&lt;/span&gt; ~/.zshrc

&lt;span class="nb"&gt;source&lt;/span&gt; ~/.zshrc


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Ready for the cool part? The theme comes with an interactive guide for setting everything as you wish, "to your gusto".&lt;/p&gt;
&lt;h4&gt;
  
  
  Configure a custom font [optional]
&lt;/h4&gt;

&lt;p&gt;In case you have a weakness for a specific font, you can install it and configure it according to the &lt;a href="https://github.com/romkatv/powerlevel10k#fonts" rel="noopener noreferrer"&gt;PowerLevel10k's fonts instructions.&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Configure colors, spaces, features
&lt;/h4&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9topcx7l0g4fw0w0s45e.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9topcx7l0g4fw0w0s45e.gif" alt="P10k configure"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

p10k configure


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Enable battery plugin
&lt;/h4&gt;

&lt;p&gt;The last personalization I did so far, was enabling the battery status inside the terminal screen.&lt;/p&gt;

&lt;p&gt;You can do so by opening the &lt;code&gt;vim $HOME/.p10k.zsh&lt;/code&gt; file and uncommenting this line:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8qd122712sdtuz0i1ekf.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8qd122712sdtuz0i1ekf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are done!&lt;/p&gt;

&lt;p&gt;The theme even includes the time the last command took:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsid4oulvoklzraw9jx2p.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsid4oulvoklzraw9jx2p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know on Twitter if you like this setup! &lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1280568270173736960-924" src="https://platform.twitter.com/embed/Tweet.html?id=1280568270173736960"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1280568270173736960-924');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1280568270173736960&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>How to install Go and write a HelloWorld program in 4 steps</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Mon, 06 Jul 2020 16:02:27 +0000</pubDate>
      <link>https://forem.com/web3coach/how-to-install-go-and-write-a-helloworld-program-in-4-steps-4bj2</link>
      <guid>https://forem.com/web3coach/how-to-install-go-and-write-a-helloworld-program-in-4-steps-4bj2</guid>
      <description>&lt;p&gt;There is something about the official Go installation instructions that keep confusing developers, myself included - so here is a quick tutorial on how I setup Go on my new MSI laptop running the latest Ubuntu 20.&lt;/p&gt;

&lt;h2&gt;
  
  
  1/4 Download Go
&lt;/h2&gt;

&lt;p&gt;Visit &lt;a href="https://golang.org/dl/"&gt;Go web&lt;/a&gt; and check the latest version: &lt;strong&gt;1.14.2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fetch the Go source to &lt;code&gt;/usr/local/&lt;/code&gt; dir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;wget &lt;span class="nt"&gt;-c&lt;/span&gt; https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz &lt;span class="nt"&gt;-O&lt;/span&gt; - | &lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xz&lt;/span&gt; &lt;span class="nt"&gt;-C&lt;/span&gt; /usr/local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2/4 Configure the ENV
&lt;/h2&gt;

&lt;p&gt;I like to keep all my Go projects in &lt;code&gt;$HOME/go&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Depending on your setup, add the following 2 env variables to your shell configs and define the desired paths.&lt;/p&gt;

&lt;p&gt;Check your shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$SHELL&lt;/span&gt;
/usr/bin/zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because I use ZSH, I will add the 2 vars to the &lt;code&gt;$HOME/.zshrc&lt;/code&gt; config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOPATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/go
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:/usr/local/go/bin:&lt;span class="nv"&gt;$GOPATH&lt;/span&gt;/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reload the config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3/4 Validate the installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go version
go version go1.14.2 linux/amd64

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GOPATH&lt;/span&gt;
/home/web3coach/go

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$PATH&lt;/span&gt;
usr/local/go/bin:/home/web3coach/go/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect. Let's write a simple Go program to ensure everything works well.&lt;/p&gt;

&lt;h2&gt;
  
  
  4/4 Program Hello
&lt;/h2&gt;

&lt;p&gt;Create the Hello's project dir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/go/src/hello
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/go/src/hello
&lt;span class="nb"&gt;touch &lt;/span&gt;hello.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the following Hello's code into the &lt;code&gt;./hello.go&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"fmt"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, World!"&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;
  
  
  Compile
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new program's binary will be generated and stored in &lt;code&gt;$GOPATH/bin&lt;/code&gt; dir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; &lt;span class="nv"&gt;$GOPATH&lt;/span&gt;/bin

drwxrwxr-x 2 web3coach web3coach    4096 čec  5 19:25 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxrwxr-x 4 web3coach web3coach    4096 čec  5 19:25 ..
&lt;span class="nt"&gt;-rwxrwxr-x&lt;/span&gt; 1 web3coach web3coach 2076690 čec  5 19:25 hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;hello&lt;/code&gt; is your new generated program's binary. You can now execute it from any directory because the &lt;code&gt;$GOPATH/bin&lt;/code&gt; is included in your previously configured &lt;code&gt;$PATH&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt; "Hello, World!"&lt;/p&gt;

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

&lt;p&gt;You installed Go 1.14.2 and fully setup its environment. If you want to know how to develop a blockchain from scratch in Go - follow me on Twitter: &lt;a href="https://twitter.com/Web3Coach"&gt;https://twitter.com/Web3Coach&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>linux</category>
      <category>backend</category>
    </item>
    <item>
      <title>Producing good code is only possible in aligned environment</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Wed, 01 Jul 2020 12:51:20 +0000</pubDate>
      <link>https://forem.com/web3coach/producing-good-code-is-only-possible-in-aligned-environment-54cj</link>
      <guid>https://forem.com/web3coach/producing-good-code-is-only-possible-in-aligned-environment-54cj</guid>
      <description>&lt;p&gt;If you want to produce good work/code/business, make sure your environment is aligned with your vision.&lt;/p&gt;

&lt;p&gt;Especially the people you surround yourself with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;family&lt;/li&gt;
&lt;li&gt;coworkers&lt;/li&gt;
&lt;li&gt;boss&lt;/li&gt;
&lt;li&gt;partner&lt;/li&gt;
&lt;li&gt;friends&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Env is crucial for success, yet I think it's often overlooked. WDYT?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How to configure a local Git repository to use a specific SSH key</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Fri, 12 Jun 2020 14:28:04 +0000</pubDate>
      <link>https://forem.com/web3coach/how-to-configure-a-local-git-repository-to-use-a-specific-ssh-key-4aml</link>
      <guid>https://forem.com/web3coach/how-to-configure-a-local-git-repository-to-use-a-specific-ssh-key-4aml</guid>
      <description>&lt;p&gt;Sounds familiar?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin master

fatal: Could not read from remote repository.
Please make sure you have the correct access rights
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you work on multiple projects from the same machine, you often need to use a different SSH key per repository.&lt;/p&gt;

&lt;p&gt;For example you may have two repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;github.com/work/work-repo-1 [work SSH key]&lt;/li&gt;
&lt;li&gt;github.com/personal/personal-repo-1 [personal SSH key]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you don't want to mess around with the global SSH config stored by default in &lt;code&gt;~/.ssh/config&lt;/code&gt;, you can configure the local one, located as a hidden folder inside your cloned repository path.&lt;/p&gt;

&lt;p&gt;Open the local repository's git config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd $HOME/your-projects/github.com/work/work-repo-1
vim .git/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will see settings like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;core&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;repositoryformatversion = &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;
        &lt;span class="s"&gt;filemode = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;bare = &lt;/span&gt;&lt;span class="no"&gt;false&lt;/span&gt;
        &lt;span class="s"&gt;logallrefupdates = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;ignorecase = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;precomposeunicode = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;

&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;remote "origin"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;url = git@github.com:web3coach/web.git&lt;/span&gt;
        &lt;span class="s"&gt;fetch = +refs/heads/*:refs/remotes/origin/*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Individualize the settings
&lt;/h2&gt;

&lt;h3&gt;
  
  
   Configure your user
&lt;/h3&gt;

&lt;p&gt;Configure your user's name, email by modifying the &lt;code&gt;user&lt;/code&gt; group settings. This is important because this name and email will appear in your project's git commit history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;name = Lukas Lukac&lt;/span&gt;
        &lt;span class="s"&gt;email = lukas@web3.coach&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
   Configure your auth permissions
&lt;/h3&gt;

&lt;p&gt;Git uses SSH for permissions authentication. Specify what SSH key you want to use by defining the &lt;code&gt;sshCommand&lt;/code&gt; setting inside the &lt;code&gt;core&lt;/code&gt; group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;core&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;sshCommand = "ssh -i ~/.ssh/id_rsa_web3coach"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;name = Lukas Lukac&lt;/span&gt;
        &lt;span class="s"&gt;email = lukas@web3.coach&lt;/span&gt;

&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;core&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;repositoryformatversion = &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;
        &lt;span class="s"&gt;filemode = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;bare = &lt;/span&gt;&lt;span class="no"&gt;false&lt;/span&gt;
        &lt;span class="s"&gt;logallrefupdates = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;ignorecase = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
        &lt;span class="s"&gt;precomposeunicode = &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;

        &lt;span class="s"&gt;sshCommand = "ssh -i ~/.ssh/id_rsa_web3coach"&lt;/span&gt;

&lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;remote "origin"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
        &lt;span class="s"&gt;url = git@github.com:web3coach/web.git&lt;/span&gt;
        &lt;span class="s"&gt;fetch = +refs/heads/*:refs/remotes/origin/*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Alternative
&lt;/h3&gt;

&lt;p&gt;Prefix your git command with an ENV variable on the fly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_web3coach' git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you for reading.&lt;/p&gt;




&lt;p&gt;If you like this tutorial, follow me on Twitter where I share my blockchain programming journey: &lt;a href="https://twitter.com/Web3Coach"&gt;https://twitter.com/Web3Coach&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>How to handle errors in Go? [5 rules]</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Thu, 14 May 2020 08:36:35 +0000</pubDate>
      <link>https://forem.com/web3coach/how-to-handle-errors-in-go-5-rules-2bgf</link>
      <guid>https://forem.com/web3coach/how-to-handle-errors-in-go-5-rules-2bgf</guid>
      <description>&lt;h2&gt;
  
  
  Practically and efficiently!
&lt;/h2&gt;

&lt;p&gt;While handlings errors in Go is exceptionally annoying, I like the explicit error checks much more than throwing an exception 5 levels up the stack and hoping someone will catch it. I am looking at you Java!&lt;/p&gt;

&lt;p&gt;Here are my 5 rules on handling errors in Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1 - Don't ignore the error
&lt;/h2&gt;

&lt;p&gt;Sooner or later your function will fail and you will waste hours figuring why and restoring your program.&lt;/p&gt;

&lt;p&gt;Just handle it. If you are in a rush or too tired - take a break.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"time"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// DO NOT IGNORE THE ERROR&lt;/span&gt;
    &lt;span class="n"&gt;lucky&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;ifItCanFailItWill&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;ifItCanFailItWill&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"I will fail one day, handle me"&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;h2&gt;
  
  
  Rule 2 - Return early
&lt;/h2&gt;

&lt;p&gt;It may feel natural to focus on the "happy path" of the code execution first, but I prefer to start with validation and return the value at the end when everything went 100% fine.&lt;/p&gt;

&lt;p&gt;I don't scale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;nah&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"I will fail one day, handle me"&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;♛ PRO:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;earlyReturnRocks&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"time dividability must be OCD compliant"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"a different custom, specific, helpful error message"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to read&lt;/li&gt;
&lt;li&gt;Easier to add more validation&lt;/li&gt;
&lt;li&gt;Less nested code (especially in loops)&lt;/li&gt;
&lt;li&gt;A clear focus on safety and error handling&lt;/li&gt;
&lt;li&gt;Specific error message per &lt;code&gt;if&lt;/code&gt; condition possible&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rule 3 - Return value or Error (but not both)
&lt;/h2&gt;

&lt;p&gt;I have seen developers using the return values in combination with an error at the same time. This is a bad practice. Avoid doing this.&lt;/p&gt;

&lt;p&gt;Confusing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;validateToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;desiredValue&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expiredAt&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;// THE expiredAt (nowNs) SHOULD NOT BE RETURNED TOGETHER WITH THE ERR&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"token expired"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Disadvantages?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unclear method signature&lt;/li&gt;
&lt;li&gt;One must reverse-engineer the method to know what values are returned and when&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You are right, and sometimes you need to return some additional information about the error, in which case, create a new dedicated Error object.&lt;/p&gt;

&lt;p&gt;♛ PRO:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/davecgh/go-spew/spew"&lt;/span&gt;
    &lt;span class="s"&gt;"time"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;validateToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;spew&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;spew&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;// Compatible with error built-in interface.&lt;/span&gt;
&lt;span class="c"&gt;//&lt;/span&gt;
&lt;span class="c"&gt;// type error interface {&lt;/span&gt;
&lt;span class="c"&gt;//  Error() string&lt;/span&gt;
&lt;span class="c"&gt;// }&lt;/span&gt;
&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;expiredAt&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"token expired at block %d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;expiredAt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;validateToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;desiredValue&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;expiredAt&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rule 4 - Log or Return (but not both)
&lt;/h2&gt;

&lt;p&gt;When you log an error, you are handling it. Do NOT return the error back to the caller - forcing him to handle it as well!&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fph3vyxeh9l0mtukitcdj.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fph3vyxeh9l0mtukitcdj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why? Because you don't want to log the same message twice or more:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;
    &lt;span class="s"&gt;"os"&lt;/span&gt;
    &lt;span class="s"&gt;"time"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// validateToken() is already doing the logging,&lt;/span&gt;
    &lt;span class="c"&gt;// but I didn't reverse engineer the method so I don't know about that&lt;/span&gt;
    &lt;span class="c"&gt;// and now I will unfortunately end up with the same message being logged twice&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;validateToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;// I have nowhere to return it, SO I RIGHTFULLY LOG IT&lt;/span&gt;
        &lt;span class="c"&gt;// And I will not ignore a possible error writing err&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fprint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Stderr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"validating token failed. %s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c"&gt;// Extremely rare, no other choice&lt;/span&gt;
            &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&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="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;expiredAt&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"token expired at block %d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;expiredAt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;validateToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;desiredValue&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Nanosecond&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c"&gt;// DO NOT LOG AND RETURN&lt;/span&gt;
        &lt;span class="c"&gt;// DO NOT LOG AND RETURN&lt;/span&gt;
        &lt;span class="c"&gt;// DO NOT LOG AND RETURN&lt;/span&gt;
        &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"token validation failed. token expired at %d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TokenExpiredErr&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;expiredAt&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;nowNs&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"shinny desired value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Messy output when logging AND returning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;token validation failed. token expired at 115431493validating token failed. token expired at block 115431493
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;♛ PRO either logs OR returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validating token failed. token expired at block 599480733
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rule 5 - Configure an &lt;code&gt;if err != nil&lt;/code&gt; macro in your IDE
&lt;/h2&gt;

&lt;p&gt;I couldn't keep typing the error check, so I just created a quick video guide I created on how to set it up in GoLand from Intellij. I bound the macro on my Mouse 4 button that I usually use for healing my Necromancer in Guild Wars 2 :)&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Do you like Go?
&lt;/h2&gt;

&lt;p&gt;I am writing an eBook on &lt;code&gt;how to build a peer-to-peer system in Go&lt;/code&gt; from scratch!&lt;/p&gt;

&lt;p&gt;Check it out: &lt;a href="https://web3.coach/#book" rel="noopener noreferrer"&gt;https://web3.coach/#book&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tweet about it at: &lt;a href="https://twitter.com/Web3Coach" rel="noopener noreferrer"&gt;https://twitter.com/Web3Coach&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Blockchain Way of Programming</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Fri, 17 Apr 2020 12:28:43 +0000</pubDate>
      <link>https://forem.com/web3coach/the-blockchain-way-of-programming-7h5</link>
      <guid>https://forem.com/web3coach/the-blockchain-way-of-programming-7h5</guid>
      <description>&lt;p&gt;Hi dev.to,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lukas:&lt;/strong&gt; How are you?&lt;br&gt;
&lt;strong&gt;Dev.to:&lt;/strong&gt; Great. We grew in the number of users and added many new cool features into the platform. What about you?&lt;br&gt;
&lt;strong&gt;Lukas:&lt;/strong&gt; I have seen the new features! The DevToConnect is cool! I am launching a new project [&lt;a href="https://web3.coach"&gt;https://web3.coach&lt;/a&gt;], and I would like the dev.to community to be apart of it. Therefore, &lt;strong&gt;I will be sharing all my articles on this great platform.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the project about?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I am writing an eBook teaching developers how blockchain works and how to program blockchain systems.&lt;/strong&gt; The eBook is not specific to any particular blockchain. Opposite. It contains various peer-to-peer, blockchain, and cryptographical design patterns useful for any software developer who wants to expand his programming career. No cryptocurrencies involved!&lt;/p&gt;

&lt;h2&gt;
  
  
  What's inside?
&lt;/h2&gt;

&lt;p&gt;This product will contain everything I know about blockchain&lt;br&gt;
development. It will have theory, diagrams as well as the full&lt;br&gt;
source code stored in a private Github repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will you build?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;You will build a blockchain from scratch in Go.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't worry; you don't need to have any prior Go experience to start reading the book. It's a very powerful and beginner-friendly language, and you will pick it up quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will you learn?
&lt;/h2&gt;

&lt;p&gt;By learning blockchain, you will explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Peer-to-peer systems software architecture&lt;/li&gt;
&lt;li&gt;Event-based architecture&lt;/li&gt;
&lt;li&gt;How servers can communicate autonomously (BTC, ETH, XRP)&lt;/li&gt;
&lt;li&gt;Go programming language ❤&lt;/li&gt;
&lt;li&gt;Solidity programming language (Turing machines)&lt;/li&gt;
&lt;li&gt;Encoding and secure hashing&lt;/li&gt;
&lt;li&gt;Asymmetric cryptography and general internet security&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Because like blockchain, it's a fantastic technology for your overall&lt;br&gt;
programming career:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trendy language&lt;/li&gt;
&lt;li&gt;Better paid than an average PHP/Java/Javascript position
• Optimized for multi-core CPU architecture. You can spawn thou-
sands of light-weight threads(Go-routines) without problems -&lt;/li&gt;
&lt;li&gt;Practical for highly parallel and concurrent software such as
blockchain networks&lt;/li&gt;
&lt;li&gt;Easy to get started and be productive&lt;/li&gt;
&lt;li&gt;Nearly C++ level of performance out of the box&lt;/li&gt;
&lt;li&gt;Compiles to binary and is very portable&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's blockchain good for?
&lt;/h2&gt;

&lt;p&gt;I know many developers think blockchain is just a hype and how no use-case, but that's a myth!&lt;/p&gt;

&lt;p&gt;Blockchain technology has various incredible use-cases transforming major industries as we speak from banking to supply chains and self-sovereign identity.&lt;/p&gt;

&lt;p&gt;I have been working on this for more than a year, but I am&lt;br&gt;
finally going to wrap it up. I will be releasing it in a few weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can you get started?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You can download TODAY the first 6 chapters of the book for FREE:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://web3.coach"&gt;https://web3.coach&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b3OU4NOs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r30uhs4i9mbad1xo2ygf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b3OU4NOs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r30uhs4i9mbad1xo2ygf.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ready to start a new programming journey?&lt;/p&gt;

&lt;p&gt;PS: If you have any question or want to follow the book updates, add me on Twitter: &lt;a href="https://twitter.com/Web3Coach"&gt;https://twitter.com/Web3Coach&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>java</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Anyone interested in Ethereum blockchain development?</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Thu, 03 Oct 2019 17:51:25 +0000</pubDate>
      <link>https://forem.com/web3coach/anyone-interested-in-ethereum-blockchain-development-3731</link>
      <guid>https://forem.com/web3coach/anyone-interested-in-ethereum-blockchain-development-3731</guid>
      <description>&lt;p&gt;Hey everyone, I’m currently trying to find out what would motivate developers to start with blockchain development.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;higher salary?&lt;/li&gt;
&lt;li&gt;innovative and challenging tech?&lt;/li&gt;
&lt;li&gt;being a pioneer in new industry?&lt;/li&gt;
&lt;li&gt;more remote-friendly jobs?&lt;/li&gt;
&lt;li&gt;ideals of decentralization?&lt;/li&gt;
&lt;li&gt;something completely else?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks so much in advance - looking forward to reading your answers!&lt;/p&gt;

&lt;p&gt;PS: For private responses you can DM me: &lt;a href="https://www.linkedin.com/in/llukac"&gt;https://www.linkedin.com/in/llukac&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Levelling-up your SSH Private Key from RSA to ED25519 + Symmetric Password Protection</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Mon, 25 Mar 2019 13:05:32 +0000</pubDate>
      <link>https://forem.com/web3coach/levelling-up-your-ssh-private-key-from-rsa-to-ed25519--symmetric-password-protection---3175</link>
      <guid>https://forem.com/web3coach/levelling-up-your-ssh-private-key-from-rsa-to-ed25519--symmetric-password-protection---3175</guid>
      <description>&lt;p&gt;Today I had to generate a separate Private and Public Key in order to access my new blockchain node so I took the opportunity to setup a fresh, unique key pair that are also protected by 2FA authentication, interactive password. Later I will take it a step further and protect it with a Yubikey.&lt;/p&gt;

&lt;p&gt;Even though RSA was a standard for asymetric SSH keys for years, keys below 2048-bit length are not considered safe anymore due to evolution in hardware. It's time to upgrade to a stronger, elliptic curve algorithm, ED25519 which is faster, more secure and shorter in bytes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;Having a basic understanding of SSH and &lt;strong&gt;ssh-keygen&lt;/strong&gt; installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1/3 - Generate a new ED25519 Priv Key
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"lukas@gmailorwhatever.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;thank you &lt;a href="http://andrewzappella.com/" rel="noopener noreferrer"&gt;Andrew&lt;/a&gt;, my dear colleague for the command recommendation!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You will be prompted to enter the key destination path,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter file in which to save the key: 
/Users/enchanterio/.ssh/id_ed25519_devto_tutorial
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose a passphrase (&lt;strong&gt;DO NOT LEAVE BLANK&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;Enter passphrase (empty for no passphrase):
Enter same passphrase again:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your private key has been saved in &lt;em&gt;/Users/enchanterio/.ssh/id_ed25519_devto_tutorial&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Your public key has been saved in &lt;em&gt;/Users/enchanterio/.ssh/id_ed25519_devto_tutorial.pub&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The key fingerprint is:&lt;br&gt;
&lt;em&gt;SHA256:qxCxjp6thlj59cjQKy+qTrPnlTNfCq/RKNP+bYCwyA8 &lt;a href="mailto:lukas@gmailorwhatever.com"&gt;lukas@gmailorwhatever.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The key's randomart image is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+--[ED25519 256]--+
|                 |
|                 |
|    .            |
|   . o           |
|. ..=.. S        |
| Eo+oo*. .       |
|.=++o&amp;amp; =o.       |
|+.+=O.@.=.       |
|o=B+.*==..       |
+----[SHA256]-----+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2/3 - Configuring SSH agent
&lt;/h2&gt;

&lt;p&gt;Connect to a server, add the content of your new local Pub Key &lt;code&gt;cat ~/.ssh/id_ed25519_devto_tutorial.pub&lt;/code&gt; to the server's &lt;code&gt;.ssh/authorized_keys&lt;/code&gt; file and remove the old RSA Key:&lt;/p&gt;

&lt;p&gt;&lt;a href="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%2Fmqttbiigyq6t70gq3vjq.jpg" class="article-body-image-wrapper"&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%2Fmqttbiigyq6t70gq3vjq.jpg" alt="authorized_keys" width="800" height="240"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;ignore that the key on the image is different from the above in this tutorial, I took the screenshot before I wrote the tutorial&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Disconnect from the server. Now we will do an additional trick to associate the specific IP address with this new Private Key without affecting rest of the SSH connections based on the old RSA Key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host blockchain-node
        HostName &amp;lt;YOUR_IP_ADDRESS&amp;gt;
        User root
        IdentityFile /Users/enchanterio/.ssh/id_ed25519_devto_tutorial
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3/3 - Dialing the connection
&lt;/h2&gt;

&lt;p&gt;Execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh blockchain-node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will be prompted to unlock your SSH key by password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter passphrase for key '/Users/enchanterio/.ssh/id_ed25519_devto_tutorial':
&amp;lt;type pwd...&amp;gt;

Done! Connected. Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the server you just connected to, authenticated you against your new password protected, ED25519 Elliptic Private Key. Gg.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>security</category>
      <category>linux</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is Proof of Work?</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Thu, 07 Feb 2019 19:47:44 +0000</pubDate>
      <link>https://forem.com/web3coach/what-is-proof-of-work-1m9h</link>
      <guid>https://forem.com/web3coach/what-is-proof-of-work-1m9h</guid>
      <description>&lt;p&gt;The next several blocks of my series will be dedicated to synchronization between blockchain nodes and how they come to an agreement (&lt;strong&gt;consensus&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;Everything in software has its pros and cons... there is no silver bullet, sadly.&lt;/p&gt;

&lt;p&gt;Liquid error: internal&lt;/p&gt;

&lt;p&gt;For more blocks checkout my Twitter-chain: &lt;a href="https://twitter.com/BlocksByLukas"&gt;https://twitter.com/BlocksByLukas&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GoLang implementation of how blockchain achieves immutability</title>
      <dc:creator>Lukas Lukac</dc:creator>
      <pubDate>Tue, 05 Feb 2019 20:14:25 +0000</pubDate>
      <link>https://forem.com/web3coach/golang-implementation-of-how-blockchain-achieves-immutability-1cb4</link>
      <guid>https://forem.com/web3coach/golang-implementation-of-how-blockchain-achieves-immutability-1cb4</guid>
      <description>&lt;p&gt;In my previous article, I theoreticized on &lt;a href="https://dev.to/blocksbylukas/how-blockchain-achieves-immutability-op9"&gt;How blockchain achieves immutability&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Time to focus on practice.&lt;/p&gt;

&lt;p&gt;Liquid error: internal&lt;/p&gt;

&lt;p&gt;Let me know if you have any questions or doubts about the theory or this particular Go code, I am happy to help, answer!&lt;/p&gt;

&lt;p&gt;For more blocks checkout my Twitter-chain: &lt;a href="https://twitter.com/BlocksByLukas"&gt;https://twitter.com/BlocksByLukas&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>go</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
