<?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: Richard Francis</title>
    <description>The latest articles on Forem by Richard Francis (@the_lazy_).</description>
    <link>https://forem.com/the_lazy_</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%2F433096%2Fedb33e70-26cd-444b-a084-751a99fac842.jpeg</url>
      <title>Forem: Richard Francis</title>
      <link>https://forem.com/the_lazy_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/the_lazy_"/>
    <language>en</language>
    <item>
      <title>Setting Up Kanata with Karabiner-DriverKit-VirtualHIDDevice on macOS</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Thu, 12 Mar 2026 19:38:43 +0000</pubDate>
      <link>https://forem.com/the_lazy_/setting-up-kanata-with-karabiner-driverkit-virtualhiddevice-on-macos-1o47</link>
      <guid>https://forem.com/the_lazy_/setting-up-kanata-with-karabiner-driverkit-virtualhiddevice-on-macos-1o47</guid>
      <description>&lt;p&gt;Kanata is a powerful cross-platform software keyboard remapper. On macOS, achieving the lowest latency and most reliable hardware interception requires pairing Kanata with the Karabiner-DriverKit-VirtualHIDDevice driver rather than relying solely on the standard macOS accessibility APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the Virtual HID Driver
&lt;/h2&gt;

&lt;p&gt;Kanata needs this driver to create a virtual keyboard that macOS recognizes as physical hardware.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Download the latest .pkg installer from the &lt;a href="https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice" rel="noopener noreferrer"&gt;Karabiner-DriverKit&lt;/a&gt;  GitHub Releases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the installer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Activate the system extension by running the following command in your terminal:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open System Settings &amp;gt; Privacy &amp;amp; Security, scroll down to the Security section, and click Allow for software from "pqrs.org".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the driver is active by running systemextensionsctl list. Look for [activated enabled] next to the Karabiner DriverKit entry.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Install Kanata
&lt;/h2&gt;

&lt;p&gt;The most straightforward installation on macOS is via Homebrew.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;kanata
or
cargo &lt;span class="nb"&gt;install &lt;/span&gt;kanata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Create the Kanata Configuration
&lt;/h2&gt;

&lt;p&gt;Create a configuration file to define your hardware and your mappings. For system daemons, it is safer to use absolute paths to a direct source file rather than relying on symlinks, which can cause permission crashes.&lt;/p&gt;

&lt;p&gt;Create a file at &lt;code&gt;/Users/YOUR_USERNAME/.config/kanata/kanata.kbd&lt;/code&gt; (or directly in your dotfiles repository).&lt;/p&gt;

&lt;p&gt;The below config defines the keyboards kanata should work on, a variable &lt;code&gt;tap-hold&lt;/code&gt;, the default source and two layers. The first layer (&lt;code&gt;default&lt;/code&gt;) swaps &lt;code&gt;lctl&lt;/code&gt; and &lt;code&gt;caps&lt;/code&gt;, so when pressing the &lt;code&gt;caps&lt;/code&gt; you'll get a &lt;code&gt;lctl&lt;/code&gt;. For the second layer you need to hold &lt;code&gt;n&lt;/code&gt;, which converts the &lt;code&gt;qwertyuiop&lt;/code&gt; keys to &lt;code&gt;1234567890&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;defcfg&lt;/span&gt;
  &lt;span class="nv"&gt;concurrent-tap-hold&lt;/span&gt; &lt;span class="nv"&gt;yes&lt;/span&gt;
  &lt;span class="nv"&gt;macos-dev-names-include&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"Apple Internal Keyboard / Trackpad"&lt;/span&gt;
    &lt;span class="s"&gt;"Karabiner DriverKit VirtualHIDKeyboard 1.8.0"&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="nb"&gt;defvar&lt;/span&gt;
  &lt;span class="nv"&gt;tap-hold&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;defsrc&lt;/span&gt;
  &lt;span class="nv"&gt;esc&lt;/span&gt;    &lt;span class="nv"&gt;f1&lt;/span&gt;   &lt;span class="nv"&gt;f2&lt;/span&gt;   &lt;span class="nv"&gt;f3&lt;/span&gt;   &lt;span class="nv"&gt;f4&lt;/span&gt;   &lt;span class="nv"&gt;f5&lt;/span&gt;   &lt;span class="nv"&gt;f6&lt;/span&gt;   &lt;span class="nv"&gt;f7&lt;/span&gt;   &lt;span class="nv"&gt;f8&lt;/span&gt;   &lt;span class="nv"&gt;f9&lt;/span&gt;   &lt;span class="nv"&gt;f10&lt;/span&gt;  &lt;span class="nv"&gt;f11&lt;/span&gt;  &lt;span class="nv"&gt;f12&lt;/span&gt;
  &lt;span class="nv"&gt;grv&lt;/span&gt;    &lt;span class="mi"&gt;1&lt;/span&gt;    &lt;span class="mi"&gt;2&lt;/span&gt;    &lt;span class="mi"&gt;3&lt;/span&gt;    &lt;span class="mi"&gt;4&lt;/span&gt;    &lt;span class="mi"&gt;5&lt;/span&gt;    &lt;span class="mi"&gt;6&lt;/span&gt;    &lt;span class="mi"&gt;7&lt;/span&gt;    &lt;span class="mi"&gt;8&lt;/span&gt;    &lt;span class="mi"&gt;9&lt;/span&gt;    &lt;span class="mi"&gt;0&lt;/span&gt;    &lt;span class="nb"&gt;-&lt;/span&gt;    &lt;span class="nb"&gt;=&lt;/span&gt;    &lt;span class="nv"&gt;bspc&lt;/span&gt;
  &lt;span class="nv"&gt;tab&lt;/span&gt;    &lt;span class="nv"&gt;q&lt;/span&gt;    &lt;span class="nv"&gt;w&lt;/span&gt;    &lt;span class="nv"&gt;e&lt;/span&gt;    &lt;span class="nv"&gt;r&lt;/span&gt;    &lt;span class="no"&gt;t&lt;/span&gt;    &lt;span class="nv"&gt;y&lt;/span&gt;    &lt;span class="nv"&gt;u&lt;/span&gt;    &lt;span class="nv"&gt;i&lt;/span&gt;    &lt;span class="nv"&gt;o&lt;/span&gt;    &lt;span class="nv"&gt;p&lt;/span&gt;    &lt;span class="nv"&gt;[&lt;/span&gt;    &lt;span class="nv"&gt;]&lt;/span&gt;    &lt;span class="err"&gt;\&lt;/span&gt;
  &lt;span class="nv"&gt;caps&lt;/span&gt;   &lt;span class="nv"&gt;a&lt;/span&gt;    &lt;span class="nv"&gt;s&lt;/span&gt;    &lt;span class="nv"&gt;d&lt;/span&gt;    &lt;span class="nv"&gt;f&lt;/span&gt;    &lt;span class="nv"&gt;g&lt;/span&gt;    &lt;span class="nv"&gt;h&lt;/span&gt;    &lt;span class="nv"&gt;j&lt;/span&gt;    &lt;span class="nv"&gt;k&lt;/span&gt;    &lt;span class="nv"&gt;l&lt;/span&gt;    &lt;span class="c1"&gt;;    '    ret&lt;/span&gt;
  &lt;span class="nv"&gt;lsft&lt;/span&gt;   &lt;span class="nv"&gt;z&lt;/span&gt;    &lt;span class="nv"&gt;x&lt;/span&gt;    &lt;span class="nv"&gt;c&lt;/span&gt;    &lt;span class="nv"&gt;v&lt;/span&gt;    &lt;span class="nv"&gt;b&lt;/span&gt;    &lt;span class="nv"&gt;n&lt;/span&gt;    &lt;span class="nv"&gt;m&lt;/span&gt;    &lt;span class="o"&gt;,&lt;/span&gt;    &lt;span class="o"&gt;.&lt;/span&gt;    &lt;span class="nb"&gt;/&lt;/span&gt;    &lt;span class="nv"&gt;up&lt;/span&gt;   &lt;span class="nv"&gt;rsft&lt;/span&gt;
  &lt;span class="nv"&gt;fn&lt;/span&gt;   &lt;span class="nv"&gt;lctl&lt;/span&gt;  &lt;span class="nv"&gt;lalt&lt;/span&gt; &lt;span class="nv"&gt;lmet&lt;/span&gt;          &lt;span class="nv"&gt;spc&lt;/span&gt;         &lt;span class="nv"&gt;rmet&lt;/span&gt; &lt;span class="nv"&gt;ralt&lt;/span&gt; &lt;span class="nv"&gt;left&lt;/span&gt; &lt;span class="nv"&gt;down&lt;/span&gt; &lt;span class="nv"&gt;rght&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;defalias&lt;/span&gt;
  &lt;span class="nv"&gt;n_layer&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;tap-hold&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="nv"&gt;n&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;layer-toggle&lt;/span&gt; &lt;span class="nv"&gt;numbers&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="nv"&gt;deflayer&lt;/span&gt; &lt;span class="nv"&gt;default&lt;/span&gt;
  &lt;span class="nv"&gt;esc&lt;/span&gt;    &lt;span class="nv"&gt;f1&lt;/span&gt;   &lt;span class="nv"&gt;f2&lt;/span&gt;   &lt;span class="nv"&gt;f3&lt;/span&gt;   &lt;span class="nv"&gt;f4&lt;/span&gt;   &lt;span class="nv"&gt;f5&lt;/span&gt;   &lt;span class="nv"&gt;f6&lt;/span&gt;   &lt;span class="nv"&gt;f7&lt;/span&gt;   &lt;span class="nv"&gt;f8&lt;/span&gt;   &lt;span class="nv"&gt;f9&lt;/span&gt;   &lt;span class="nv"&gt;f10&lt;/span&gt;  &lt;span class="nv"&gt;f11&lt;/span&gt;  &lt;span class="nv"&gt;f12&lt;/span&gt;
  &lt;span class="nv"&gt;grv&lt;/span&gt;    &lt;span class="mi"&gt;1&lt;/span&gt;    &lt;span class="mi"&gt;2&lt;/span&gt;    &lt;span class="mi"&gt;3&lt;/span&gt;    &lt;span class="mi"&gt;4&lt;/span&gt;    &lt;span class="mi"&gt;5&lt;/span&gt;    &lt;span class="mi"&gt;6&lt;/span&gt;    &lt;span class="mi"&gt;7&lt;/span&gt;    &lt;span class="mi"&gt;8&lt;/span&gt;    &lt;span class="mi"&gt;9&lt;/span&gt;    &lt;span class="mi"&gt;0&lt;/span&gt;    &lt;span class="nb"&gt;-&lt;/span&gt;    &lt;span class="nb"&gt;=&lt;/span&gt;    &lt;span class="nv"&gt;bspc&lt;/span&gt;
  &lt;span class="nv"&gt;tab&lt;/span&gt;    &lt;span class="nv"&gt;q&lt;/span&gt;    &lt;span class="nv"&gt;w&lt;/span&gt;    &lt;span class="nv"&gt;e&lt;/span&gt;    &lt;span class="nv"&gt;r&lt;/span&gt;    &lt;span class="no"&gt;t&lt;/span&gt;    &lt;span class="nv"&gt;y&lt;/span&gt;    &lt;span class="nv"&gt;u&lt;/span&gt;    &lt;span class="nv"&gt;i&lt;/span&gt;    &lt;span class="nv"&gt;o&lt;/span&gt;    &lt;span class="nv"&gt;p&lt;/span&gt;    &lt;span class="nv"&gt;[&lt;/span&gt;    &lt;span class="nv"&gt;]&lt;/span&gt;    &lt;span class="err"&gt;\&lt;/span&gt;
  &lt;span class="nv"&gt;lctl&lt;/span&gt;   &lt;span class="nv"&gt;a&lt;/span&gt;    &lt;span class="nv"&gt;s&lt;/span&gt;    &lt;span class="nv"&gt;d&lt;/span&gt;    &lt;span class="nv"&gt;f&lt;/span&gt;    &lt;span class="nv"&gt;g&lt;/span&gt;    &lt;span class="nv"&gt;h&lt;/span&gt;    &lt;span class="nv"&gt;j&lt;/span&gt;    &lt;span class="nv"&gt;k&lt;/span&gt;    &lt;span class="nv"&gt;l&lt;/span&gt;    &lt;span class="c1"&gt;;    '    ret&lt;/span&gt;
  &lt;span class="nv"&gt;lsft&lt;/span&gt;   &lt;span class="nv"&gt;z&lt;/span&gt;    &lt;span class="nv"&gt;x&lt;/span&gt;    &lt;span class="nv"&gt;c&lt;/span&gt;    &lt;span class="nv"&gt;v&lt;/span&gt;    &lt;span class="nv"&gt;b&lt;/span&gt;    &lt;span class="nv"&gt;@n_layer&lt;/span&gt; &lt;span class="nv"&gt;m&lt;/span&gt;  &lt;span class="o"&gt;,&lt;/span&gt;    &lt;span class="o"&gt;.&lt;/span&gt;    &lt;span class="nb"&gt;/&lt;/span&gt;    &lt;span class="nv"&gt;up&lt;/span&gt;   &lt;span class="nv"&gt;rsft&lt;/span&gt;
  &lt;span class="nv"&gt;fn&lt;/span&gt;   &lt;span class="nv"&gt;caps&lt;/span&gt;  &lt;span class="nv"&gt;lalt&lt;/span&gt; &lt;span class="nv"&gt;lmet&lt;/span&gt;          &lt;span class="nv"&gt;spc&lt;/span&gt;         &lt;span class="nv"&gt;rmet&lt;/span&gt; &lt;span class="nv"&gt;ralt&lt;/span&gt; &lt;span class="nv"&gt;left&lt;/span&gt; &lt;span class="nv"&gt;down&lt;/span&gt; &lt;span class="nv"&gt;rght&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;deflayer&lt;/span&gt; &lt;span class="nv"&gt;numbers&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="mi"&gt;1&lt;/span&gt;    &lt;span class="mi"&gt;2&lt;/span&gt;    &lt;span class="mi"&gt;3&lt;/span&gt;    &lt;span class="mi"&gt;4&lt;/span&gt;    &lt;span class="mi"&gt;5&lt;/span&gt;    &lt;span class="mi"&gt;6&lt;/span&gt;    &lt;span class="mi"&gt;7&lt;/span&gt;    &lt;span class="mi"&gt;8&lt;/span&gt;    &lt;span class="mi"&gt;9&lt;/span&gt;    &lt;span class="mi"&gt;0&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
  &lt;span class="nv"&gt;_&lt;/span&gt;      &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;              &lt;span class="nv"&gt;_&lt;/span&gt;              &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;    &lt;span class="nv"&gt;_&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Configure macOS Security Permissions
&lt;/h2&gt;

&lt;p&gt;macOS requires explicit user intent for a binary to intercept keyboard inputs. You must manually add the Kanata binary to the TCC (Transparency, Consent, and Control) database.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open System &lt;code&gt;Settings &amp;gt; Privacy &amp;amp; Security &amp;gt; Input Monitoring&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the &lt;code&gt;+&lt;/code&gt; button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Press &lt;code&gt;Cmd + Shift + G&lt;/code&gt; to open the path navigator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Paste &lt;code&gt;/opt/homebrew/bin/kanata&lt;/code&gt; and press Enter.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Select the binary and ensure the toggle is set to ON.&lt;/p&gt;

&lt;p&gt;Repeat this exact process for &lt;code&gt;Privacy &amp;amp; Security &amp;gt; Accessibility.&lt;/code&gt; (Optional)&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup Background Services (LaunchDaemons)
&lt;/h2&gt;

&lt;p&gt;To run Kanata seamlessly without an open terminal window, configure two LaunchDaemons: one for the Karabiner communication bridge and one for Kanata itself. These must run as root.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Karabiner Daemon
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;/Library/LaunchDaemons/org.pqrs.karabiner-daemon.plist&lt;/code&gt;:&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="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;plist&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Label&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;org.pqrs.karabiner-daemon&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;ProgramArguments&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;array&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/array&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;RunAtLoad&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;true/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;KeepAlive&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;true/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/plist&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Kanata Daemon
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;/Library/LaunchDaemons/com.kanata.daemon.plist&lt;/code&gt; (Replace YOUR_USERNAME with your actual macOS shortname):&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="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;plist&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Label&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;com.kanata.daemon&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;ProgramArguments&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;array&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/opt/homebrew/bin/kanata&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;--cfg&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Users/YOUR_USERNAME/.config/kanata/kanata.kbd&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/array&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;RunAtLoad&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;true/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;KeepAlive&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;true/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;StandardOutPath&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/tmp/kanata.out.log&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;StandardErrorPath&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/tmp/kanata.err.log&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/plist&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Set Ownership and Boot the Services
&lt;/h2&gt;

&lt;p&gt;Ensure the .plist files are owned by the system, make sure the path to your config file is traversable by the root user, and start the daemons.&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 chown &lt;/span&gt;root:wheel /Library/LaunchDaemons/org.pqrs.karabiner-daemon.plist
&lt;span class="nb"&gt;sudo chown &lt;/span&gt;root:wheel /Library/LaunchDaemons/com.kanata.daemon.plist

&lt;span class="c"&gt;# Optional&lt;/span&gt;
&lt;span class="nb"&gt;sudo chmod &lt;/span&gt;644 /Users/YOUR_USERNAME/.config/kanata

&lt;span class="nb"&gt;sudo &lt;/span&gt;launchctl load &lt;span class="nt"&gt;-w&lt;/span&gt; /Library/LaunchDaemons/org.pqrs.karabiner-daemon.plist
&lt;span class="nb"&gt;sudo &lt;/span&gt;launchctl load &lt;span class="nt"&gt;-w&lt;/span&gt; /Library/LaunchDaemons/com.kanata.daemon.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Verification and Troubleshooting
&lt;/h2&gt;

&lt;p&gt;Check if the services are running successfully:&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;launchctl list | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"kanata|karabiner"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a numerical PID in the first column for both entries, and a 0 in the second column.&lt;/p&gt;

&lt;p&gt;Run to view the errors from kanata&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;cat&lt;/span&gt; /tmp/kanata.err.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Common Errors:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Exit code 1 for Kanata: Usually indicates a file path issue. Ensure there are no tildes (~) in your .plist path.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;not permitted in /tmp/kanata.err.log: The Kanata binary was dropped from the Input Monitoring list. Remove it from System Settings and re-add it manually using Cmd + Shift + G.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;asio:61 or asio:2: Kanata cannot reach the Karabiner driver. Ensure org.pqrs.karabiner-daemon is actively running.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>performance</category>
      <category>productivity</category>
      <category>tooling</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to fix error:0308010C:digital envelope routines::unsupported</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Wed, 17 May 2023 20:02:09 +0000</pubDate>
      <link>https://forem.com/the_lazy_/how-to-fix-error0308010cdigital-envelope-routinesunsupported-2bil</link>
      <guid>https://forem.com/the_lazy_/how-to-fix-error0308010cdigital-envelope-routinesunsupported-2bil</guid>
      <description>&lt;p&gt;CAUSES&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;NODE VERSION: Using Node version 17 and above,&lt;/li&gt;
&lt;li&gt;Docker: Building with docker pulls the latest version of node.js by default {Node:LTS}.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The problem here is Node.js 17's push to use OPENSSL 3, changing the code required for the initialisation context of the md family.&lt;/p&gt;

&lt;p&gt;HOW TO FIX&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downgrade Node.js&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can use nvm (Node Version Manager) for your Os and run&lt;br&gt;
&lt;code&gt;nvm install 16.15.1&lt;/code&gt;&lt;br&gt;
&lt;code&gt;nvm use 16.15.1&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While for docker you can directly supply the version of Node.js to use.&lt;br&gt;
&lt;code&gt;use Node:16.15.1&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Enable Legacy Support
Get passed the error by enabling support for legacy OpenSSL versions.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Update ENV Variable&lt;br&gt;
&lt;code&gt;export NODE_OPTIONS=--openssl-legacy-provider&lt;/code&gt;&lt;br&gt;
Using your terminal Run this on macOs, Linux or Windows Git Bash.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Updating the package.json file&lt;br&gt;
&lt;code&gt;"start": "react-scripts start"&lt;/code&gt;&lt;br&gt;
Update to:&lt;br&gt;
&lt;code&gt;"start": "react-scripts --openssl-legacy-provider start"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Starting Git: An explanatory Guide for Masters</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Wed, 12 Apr 2023 21:38:43 +0000</pubDate>
      <link>https://forem.com/the_lazy_/starting-git-an-explanatory-guide-for-masters-53d3</link>
      <guid>https://forem.com/the_lazy_/starting-git-an-explanatory-guide-for-masters-53d3</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As a software developer, mastering version control is essential for efficient and collaborative development. Git, a widely used distributed version control system, provides powerful tools and features that enable developers to track changes, collaborate with team members, and manage code repositories effectively. In this comprehensive guide, we will delve into the world of Git and explore its features, best practices, and code examples to help you become a Git master.&lt;/p&gt;

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

&lt;p&gt;Git has become the de facto standard for version control in software development due to its distributed nature, speed, and flexibility. It allows developers to work offline, work on multiple branches, and easily collaborate with team members. Git also provides robust versioning, branching, and merging capabilities, making it ideal for managing source code in both small and large projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Git
&lt;/h2&gt;

&lt;p&gt;To get started with Git, you need to install Git on your local machine and set up a Git repository. Here are the basic steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Git: You can download and install Git from the official Git website (&lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;https://git-scm.com/&lt;/a&gt;). Follow the installation instructions for your operating system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure Git: After installation, you need to configure Git with your name and email address, which will be used to identify your commits. Use the following commands in your terminal or command prompt:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a Git Repository: To create a new Git repository, navigate to the directory where you want to create the repository and run the following command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init

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

&lt;/div&gt;



&lt;p&gt;This creates a new Git repository in the current directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Basics
&lt;/h2&gt;

&lt;p&gt;Once you have set up a Git repository, it's time to learn some Git basics. Here are some fundamental concepts and commands that you need to understand:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Git Workflow&lt;/strong&gt;: Git follows a three-step workflow: modify, stage, and commit.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Modify: Make changes to your files in the repository using your code editor.&lt;/li&gt;
&lt;li&gt;Stage: Stage the changes you want to commit using the git add command. Staging allows you to select which changes you want to include in your next commit.&lt;/li&gt;
&lt;li&gt;Commit: Commit the staged changes to the repository using the git commit command. A commit is a snapshot of the changes you made, and it creates a new version of your code in the repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Branching&lt;/strong&gt;: Branching is a powerful feature of Git that allows you to create separate lines of development in your repository. You can create new branches to work on different features or bug fixes without affecting the main branch (usually called the "master" or "main" branch).&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create a new branch: Use the git branch command followed by the branch name to create a new branch. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch feature-branch

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

&lt;/div&gt;



&lt;p&gt;This creates a new branch named "feature-branch" that is identical to the current branch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch to a branch: Use the git checkout command followed by the branch name to switch to a different branch. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout feature-branch

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

&lt;/div&gt;



&lt;p&gt;This switches to the "feature-branch" branch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Merge branches: Use the git merge command followed by the branch name to merge changes from one branch to another. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge feature-branch

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

&lt;/div&gt;



&lt;p&gt;This merges the changes from the "feature-branch" branch into the current branch.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Remote Repositories&lt;/strong&gt;: Git allows you to work with remote repositories, which are repositories hosted on a remote server, such as GitHub, GitLab, or Bitbucket. You can push your local changes to a remote repository and pull changes from a remote repository using Git commands. Here are some basic commands for working with remote repositories:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Clone a remote repository: Use the git clone command followed by the repository URL to create a local copy of a remote repository. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/username/repo.git

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

&lt;/div&gt;



&lt;p&gt;This creates a local copy of the remote repository in a directory named "repo".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push changes to a remote repository: Use the git push command followed by the remote repository name and branch name to push your local changes to the remote repository. For example:
&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;/div&gt;



&lt;p&gt;This pushes the changes from the "feature-branch" branch to the remote repository named "origin".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull changes from a remote repository: Use the git pull command followed by the remote repository name and branch name to pull changes from a remote repository to your local repository. For example:
&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;/div&gt;



&lt;p&gt;This pulls the changes from the "master" branch of the remote repository named "origin" into your local repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Writing Clean JavaScript Code with Git
&lt;/h2&gt;

&lt;p&gt;In addition to the basic Git commands, here are some best practices for writing clean JavaScript code in conjunction with Git:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use descriptive commit messages&lt;/strong&gt;: When committing changes, use descriptive commit messages that clearly explain the purpose of the commit. Avoid generic commit messages like "Fix bug" or "Update code". Instead, provide detailed information about the changes made and the problem they address.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "Fix issue #123: Refactor API request handling for improved error handling"

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Follow Git branching model&lt;/strong&gt;: Follow a Git branching model, such as Gitflow or GitHub Flow, to structure your branches and manage your development workflow. This helps to keep your repository organized and makes it easier to collaborate with other developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Commit frequently and in small chunk&lt;/strong&gt;s: Commit your changes frequently and in small, logical chunks. Avoid committing a large number of changes in a single commit, as it makes it difficult to track changes and understand the purpose of the commit. Committing frequently and in small chunks allows for better code review and makes it easier to identify and fix issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use feature branches&lt;/strong&gt;: Create separate feature branches for each feature or bug fix you are working on. This allows you to isolate changes related to a specific feature or bug fix and makes it easier to merge changes into the main branch later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep the main branch clean&lt;/strong&gt;: Keep the main branch (e.g., "master" or "main") clean and stable. Avoid committing directly to the main branch, and use pull requests or merge requests for code review and merging changes into the main branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use meaningful branch names: Use meaningful and descriptive names for your branches that reflect the purpose of the changes being made. This makes it easier to understand the purpose of the branch and track changes in the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review and address code review comments&lt;/strong&gt;: Use Git's code review features, such as pull requests or merge requests, to review and provide feedback on changes made by other team members. Address code review comments promptly and make necessary changes to ensure the quality and maintainability of the codebase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep the repository history clean&lt;/strong&gt;: Avoid committing unnecessary or sensitive information, such as passwords, API keys, or large binary files, to the repository. Keep the repository history clean and focused on code changes to make it easier to track changes, understand the evolution of the codebase, and maintain repository performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;In conclusion, mastering Git is essential for efficient and collaborative software development. By following best practices for code documentation, using meaningful commit messages, utilizing branches effectively, and leveraging remote repositories, you can maintain a clean and organized Git repository.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Agile Software Development: Principles, Practices, and Benefits</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Wed, 12 Apr 2023 21:14:43 +0000</pubDate>
      <link>https://forem.com/the_lazy_/agile-software-development-principles-practices-and-benefits-18b5</link>
      <guid>https://forem.com/the_lazy_/agile-software-development-principles-practices-and-benefits-18b5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Agile software development is a modern approach to software development that focuses on flexibility, collaboration, and iterative progress. It has gained widespread popularity in the software industry due to its ability to deliver high-quality software solutions that meet customer needs in a dynamic and rapidly changing environment. In this article, we will delve into the principles, practices, and benefits of Agile software development, providing an in-depth understanding of this methodology and how it can benefit software engineering teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Principles of Agile Software Development
&lt;/h2&gt;

&lt;p&gt;The Agile methodology is built upon a set of guiding principles that shape the way software is developed. These principles, as outlined in the Agile Manifesto, include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Individuals and interactions over processes and tools&lt;/strong&gt;: Agile emphasizes the importance of effective communication and collaboration among team members, valuing human interactions over rigid processes and tools. It encourages face-to-face communication, open discussions, and teamwork.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Working software over comprehensive documentation&lt;/strong&gt;: Agile promotes delivering working software that meets customer needs over extensive documentation. While documentation is important, Agile teams prioritize working software that can be tested, reviewed, and iteratively improved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customer collaboration over contract negotiation&lt;/strong&gt;: Agile emphasizes close collaboration with customers and stakeholders throughout the development process. It involves regular customer feedback, incorporating changes as needed, and fostering a strong partnership to ensure that the software meets the customer's requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responding to change over following a plan&lt;/strong&gt;: Agile acknowledges that change is inevitable in software development. It encourages teams to be adaptable, flexible, and responsive to changes in requirements, technology, and market conditions. Agile teams embrace change and adjust their plans and priorities accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Agile Practices
&lt;/h2&gt;

&lt;p&gt;Agile software development is characterized by several practices that support the principles mentioned above. These practices include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scrum&lt;/strong&gt;: Scrum is a popular Agile framework that provides a structured approach to software development. It involves time-boxed iterations called sprints, daily stand-up meetings, backlog grooming, sprint planning, sprint reviews, and retrospectives. Scrum promotes transparency, collaboration, and iterative development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kanban&lt;/strong&gt;: Kanban is another Agile framework that focuses on visualizing work, managing flow, and limiting work in progress (WIP). Kanban boards are used to visualize tasks, their status, and bottlenecks. Teams can use Kanban to optimize workflow, reduce waste, and improve efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Continuous Integration and Deployment&lt;/strong&gt;: Agile teams adopt continuous integration and deployment practices, where code changes are integrated and tested frequently, and the software is deployed to production regularly. This ensures that the software is always in a releasable state and reduces the risk of integration issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test-Driven Development (TDD)&lt;/strong&gt;: TDD is a development approach where tests are written before the code is implemented. Tests drive the development process, and code is written to pass the tests. TDD ensures that the software is thoroughly tested, and any issues are caught early in the development process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-functional Teams&lt;/strong&gt;: Agile teams are typically cross-functional, comprising members with different skill sets, such as developers, testers, designers, and product owners. This promotes collaboration, reduces dependencies, and enables faster decision-making.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Benefits of Agile Software Development
&lt;/h2&gt;

&lt;p&gt;Agile software development offers numerous benefits for software engineering teams, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility and Adaptability&lt;/strong&gt;: Agile allows teams to be flexible and adaptable to changing requirements, technology, and market conditions. Teams can quickly respond to changes and adjust their plans and priorities accordingly, ensuring that the software meets customer needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Faster Time to Market&lt;/strong&gt;: Agile enables incremental and iterative development, which allows for faster delivery of working software. Features can be delivered in smaller chunks, and customer feedback can be incorporated quickly, resulting in a shorter time to market.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Higher Quality Software&lt;/strong&gt;: Agile promotes continuous testing, frequent integration, and deployment practices, which help in identifying and resolving issues early in the development process. This results in higher quality software that meets customer requirements and has fewer defects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Collaboration and Communication&lt;/strong&gt;: Agile emphasizes strong collaboration and communication among team members, customers, and stakeholders. This leads to better understanding of requirements, quicker feedback loops, and effective problem-solving, which ultimately results in higher-quality software.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased Customer Satisfaction&lt;/strong&gt;: Agile encourages regular customer involvement throughout the development process, allowing for feedback, changes, and updates to be incorporated quickly. This leads to higher customer satisfaction as their requirements are met, and they feel engaged in the development process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Team Morale and Productivity&lt;/strong&gt;: Agile promotes self-organizing, empowered teams that have autonomy and ownership over their work. This leads to improved team morale, job satisfaction, and productivity as team members are motivated and engaged in the development process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced Risks and Costs&lt;/strong&gt;: Agile's iterative and incremental approach allows for early detection and mitigation of risks, resulting in reduced risks and costs associated with rework and late-stage changes. Agile also promotes efficient resource utilization and optimized workflow, leading to cost savings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better Visibility and Transparency&lt;/strong&gt;: Agile promotes transparency through practices such as daily stand-up meetings, sprint reviews, and backlog grooming. This leads to better visibility into the project status, progress, and potential issues, allowing for timely action and decision-making.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Agile software development has become a widely adopted approach in the software industry due to its flexibility, collaboration, and iterative progress. By following the principles and practices of Agile, software engineering teams can benefit from increased flexibility, faster time to market, higher quality software, improved collaboration, increased customer satisfaction, enhanced team morale and productivity, reduced risks and costs, and better visibility. Implementing Agile practices can lead to successful software development projects and satisfied customers.&lt;/p&gt;

</description>
      <category>agile</category>
      <category>principles</category>
      <category>devops</category>
      <category>software</category>
    </item>
    <item>
      <title>10 Best Practices for Writing Clean JavaScript Code in Software Engineering</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Mon, 10 Apr 2023 12:56:28 +0000</pubDate>
      <link>https://forem.com/the_lazy_/10-best-practices-for-writing-clean-javascript-code-in-software-engineering-1i50</link>
      <guid>https://forem.com/the_lazy_/10-best-practices-for-writing-clean-javascript-code-in-software-engineering-1i50</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;JavaScript is a widely-used programming language that is extensively used in modern software engineering projects. Writing clean JavaScript code is essential for creating maintainable, efficient, and bug-free applications. Clean code is not only easier to understand, debug, and maintain, but it also promotes collaboration among team members, reduces technical debt, and enhances overall software quality. In this article, we will explore 10 best practices for writing clean JavaScript code that can help you improve your software development practices and create high-quality JavaScript applications.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Follow Consistent Code Formatting&lt;/strong&gt;: Consistent code formatting is crucial for readability and maintainability of JavaScript code. Follow a consistent coding style guide, such as the Airbnb JavaScript Style Guide or the Google JavaScript Style Guide, to ensure that your code is formatted consistently across your projects. Consistent indentation, spacing, and naming conventions make your code easier to read and understand, especially when collaborating with other team members.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Descriptive and Meaningful Variable and Function Names&lt;/strong&gt;: Choose descriptive and meaningful variable and function names that accurately reflect their purpose and functionality. Avoid using ambiguous or generic names that can make your code difficult to understand. Well-named variables and functions act as self-documenting code and improve code readability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep Functions Short and Focused&lt;/strong&gt;: Functions in JavaScript should be short and focused on a single task. Avoid writing long and complex functions that perform multiple tasks. This makes your code more modular, easier to understand, and allows for better code reusability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid Global Variables and Functions&lt;/strong&gt;: Minimize the use of global variables and functions as they can lead to potential naming conflicts, security risks, and make debugging and maintenance more challenging. Use proper scoping techniques, such as modules, classes, and closures, to encapsulate code and prevent polluting the global namespace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Comments Wisely&lt;/strong&gt;: Use comments strategically to provide explanations, clarify complex logic, and document important information in your JavaScript code. However, avoid over-commenting and redundant comments that can clutter your code and make it harder to maintain. Focus on writing self-explanatory code and use comments as a supplement when necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Handle Errors Gracefully&lt;/strong&gt;: Proper error handling is crucial in JavaScript to ensure that your application behaves gracefully in the face of unexpected errors. Use try-catch blocks to handle exceptions, validate input data, and provide meaningful error messages to users. Proper error handling can prevent crashes, improve user experience, and make debugging easier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Optimize for Performance&lt;/strong&gt;: JavaScript performance is critical for creating fast and responsive web applications. Optimize your JavaScript code for performance by avoiding unnecessary computations, reducing DOM manipulations, and minimizing network requests. Use tools like performance profiling and code analysis to identify performance bottlenecks and optimize your code accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep Dependencies in Check&lt;/strong&gt;: JavaScript projects often rely on external libraries and dependencies. However, it's important to keep the number of dependencies in check and only use the ones that are necessary for your project. Regularly review and update your dependencies to ensure that they are up to date and secure. This reduces the risk of security vulnerabilities, simplifies maintenance, and improves the overall stability of your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write Unit Tests&lt;/strong&gt;: Writing unit tests is a crucial practice in software engineering, including JavaScript development. Unit tests help you catch bugs early, ensure code correctness, and provide documentation for how your code is supposed to work. Follow the principle of test-driven development (TDD) and write tests before writing the actual code to ensure that your code is reliable, maintainable, and bug-free.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Refactor Regularly&lt;/strong&gt;: Refactoring is the process of improving the design and structure of your code without changing its external behavior. Regularly review and refactor your JavaScript code to eliminate code smells such as duplication, long functions, and complex logic. Refactoring improves code readability, maintainability, and performance, and helps to reduce technical debt. Use tools like linters and code analysis tools to identify areas of improvement and refactor your code accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Writing clean JavaScript code is essential for creating maintainable, efficient, and bug-free applications. Following best practices such as consistent code formatting, using descriptive variable and function names, keeping functions short and focused, avoiding global variables and functions, using comments wisely, handling errors gracefully, optimizing for performance, keeping dependencies in check, writing unit tests, and regularly refactoring can greatly improve the quality of your JavaScript code. By adopting these best practices, you can enhance collaboration among team members, reduce technical debt, and create high-quality JavaScript applications that are easy to understand, debug, and maintain.&lt;/p&gt;

&lt;p&gt;Remember, writing clean code is an ongoing process that requires continuous effort and discipline. Keep yourself updated with the latest best practices, tools, and techniques in JavaScript development, and consistently apply them in your projects. With a commitment to writing clean JavaScript code, you can significantly improve the quality of your software engineering projects and create robust and efficient JavaScript applications. Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Best Practices for Code Documentation: Ensuring Clarity, Maintainability, and Collaboration in Software Development</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Mon, 10 Apr 2023 12:47:40 +0000</pubDate>
      <link>https://forem.com/the_lazy_/best-practices-for-code-documentation-ensuring-clarity-maintainability-and-collaboration-in-software-development-259h</link>
      <guid>https://forem.com/the_lazy_/best-practices-for-code-documentation-ensuring-clarity-maintainability-and-collaboration-in-software-development-259h</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Code documentation is a crucial aspect of software development that helps ensure clarity, maintainability, and collaboration among team members. Well-documented code provides valuable information about how the code works, its purpose, and how to use it correctly, which is essential for understanding, maintaining, and extending software projects. In this article, we will explore best practices for code documentation, including the importance of documentation, the types of documentation, and practical tips for creating effective code documentation that promotes good coding practices and enhances collaboration among developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is Documentation Important in Software Development?&lt;br&gt;
Documentation plays a critical role in software development for several reasons:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clarity&lt;/strong&gt;: Well-documented code helps developers understand how the code works, its intended functionality, and how to use it correctly. This clarity is essential for maintaining and troubleshooting code, especially in complex projects or when working with legacy code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintainability&lt;/strong&gt;: Good documentation makes it easier for developers to update, modify, or fix code, even if they are not the original authors. It ensures that the code remains maintainable and can be extended or improved over time, without causing unintended consequences or introducing bugs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;: Documentation promotes collaboration among team members, allowing them to understand each other's code, share knowledge, and work together more effectively. It serves as a reference for team members, facilitating communication and coordination in software development projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Types of Code Documentation:
&lt;/h2&gt;

&lt;p&gt;Code documentation can come in various forms, depending on the specific needs and requirements of the project. Here are some common types of code documentation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inline comments&lt;/strong&gt;: Inline comments are short comments inserted directly in the code to explain its purpose, functionality, or any relevant information. They should be concise, focused, and placed strategically within the code to provide context to developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Function/Method/Class documentation&lt;/strong&gt;: Function, method, and class documentation provides detailed information about the purpose, input/output parameters, and usage of functions, methods, or classes. It often includes descriptions, examples, and usage guidelines to help developers understand how to use and interact with the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API documentation&lt;/strong&gt;: API documentation provides documentation for application programming interfaces (APIs) that are exposed by software projects. It includes details about the API endpoints, parameters, return values, and usage examples to help developers integrate and use the APIs correctly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;README files&lt;/strong&gt;: README files are documentation files that provide high-level information about the project, including installation instructions, usage guidelines, and other relevant information. They serve as a quick reference for developers who are new to the project or need to understand the project's overall structure and functionality.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best Practices for Code Documentation
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Be Clear and Concise&lt;/strong&gt;: Documentation should be clear, concise, and easy to understand. Use simple and straightforward language, avoid jargon or technical terms that may not be familiar to all team members, and provide examples or code snippets to illustrate concepts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Meaningful Names&lt;/strong&gt;: Use meaningful and descriptive names for variables, functions, methods, classes, and other code elements. This makes it easier for developers to understand the purpose and functionality of the code without having to rely solely on documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provide Context&lt;/strong&gt;: Document the purpose, functionality, and usage of the code, including any assumptions, limitations, or dependencies. Provide context to help developers understand the code's intended behavior and any potential impacts or considerations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep Documentation Updated&lt;/strong&gt;: Documentation should be kept up-to-date as the code evolves. Update documentation whenever changes are made to the code, including bug fixes, enhancements, or modifications. Outdated documentation can be misleading and result in confusion or mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Consistent Formatting and Style&lt;/strong&gt;: Use consistent formatting and style for documentation to make it visually appealing and easy to read. Consistent formatting and style create a professional appearance and help developers navigate the documentation more efficiently. Use consistent headings, bullet points, indentation, and font styles to create a cohesive and organized documentation structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Version Control for Documentation&lt;/strong&gt;: Use version control systems, such as Git, to manage and version control your code documentation. This allows you to track changes, collaborate with other team members, and easily roll back to previous versions if needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Include Usage Examples&lt;/strong&gt;: Include usage examples in your documentation to illustrate how to use the code correctly. Provide real-world examples and scenarios that showcase the code's functionality and usage in different contexts. This helps developers understand the code's intended usage and promotes good coding practices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Document Edge Cases and Error Handling&lt;/strong&gt;: Document edge cases, error handling, and any potential pitfalls in your code documentation. This helps developers understand how the code behaves in different scenarios and how to handle errors or exceptions correctly. It also serves as a reference for troubleshooting and debugging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Documentation Generation Tools&lt;/strong&gt;: Utilize documentation generation tools, such as Javadoc, Sphinx, or Doxygen, to automatically generate documentation from comments in the code. These tools can save time and effort in creating consistent and up-to-date documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Solicit Feedback from Team Members&lt;/strong&gt;: Encourage feedback from team members on the documentation. Get input from other developers, testers, or stakeholders to ensure that the documentation is clear, accurate, and helpful. Incorporate feedback into the documentation to continuously improve its quality.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Code documentation is a crucial aspect of software development that promotes clarity, maintainability, and collaboration among team members. Following best practices for code documentation, such as being clear and concise, providing context, keeping documentation updated, using consistent formatting and style, including usage examples, documenting edge cases and error handling, utilizing documentation generation tools, and soliciting feedback from team members, can help ensure that your code documentation is effective and enhances the overall quality of your software projects. Investing time and effort in creating comprehensive and up-to-date code documentation pays off in the long run by improving code understandability, maintainability, and collaboration among team members.&lt;/p&gt;

</description>
      <category>documentation</category>
      <category>software</category>
      <category>development</category>
      <category>maintainability</category>
    </item>
    <item>
      <title>Introduction to Object-Oriented Programming (OOP)</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Mon, 10 Apr 2023 12:21:17 +0000</pubDate>
      <link>https://forem.com/the_lazy_/introduction-to-object-oriented-programming-oop-357o</link>
      <guid>https://forem.com/the_lazy_/introduction-to-object-oriented-programming-oop-357o</guid>
      <description>&lt;p&gt;Object-oriented programming (OOP) is a popular programming paradigm that has gained widespread adoption in software development due to its ability to efficiently represent and manipulate complex data structures. In this article, we will provide a comprehensive introduction to OOP, including its basic principles, concepts, and benefits, with a focus on how it can be used in modern software engineering projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Object-Oriented Programming (OOP)?
&lt;/h2&gt;

&lt;p&gt;At its core, OOP is a programming paradigm that organizes code into objects, which are instances of classes. A class is a blueprint or template that defines the structure and behavior of objects, while objects are actual instances of those classes that represent real-world entities or concepts. OOP allows developers to model complex systems with classes and objects, providing a way to organize and encapsulate data and behavior into self-contained units.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Principles of OOP
&lt;/h2&gt;

&lt;p&gt;OOP is based on four fundamental principles known as the "Four Pillars of OOP." These principles are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;: Encapsulation is the process of hiding the internal details of an object and exposing only what is necessary. It allows for data and behavior to be bundled together in a class, which can then be accessed and modified only through defined interfaces. This helps in achieving data security, maintainability, and reusability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;: Inheritance allows classes to inherit properties and methods from other classes, creating a hierarchical relationship between classes. It promotes code reuse and enables the creation of specialized classes that inherit common behavior from a more general class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;: Polymorphism allows objects of different classes to be treated as objects of a common interface or superclass. It provides flexibility and extensibility in code, allowing for interchangeable use of objects with different implementations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt;: Abstraction is the process of simplifying complex systems by representing them with abstract classes or interfaces that define common behavior. It allows for the creation of high-level abstractions that hide the implementation details, making the code more maintainable and adaptable to changes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Benefits of OOP
&lt;/h2&gt;

&lt;p&gt;OOP offers several benefits that make it a popular choice in software engineering projects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modularity&lt;/strong&gt;: OOP promotes modularity by encapsulating data and behavior into classes and objects. This makes it easier to understand, modify, and maintain code, as changes in one part of the system do not necessarily impact the entire codebase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reusability&lt;/strong&gt;: OOP allows for the creation of reusable classes and objects, which can be used across different projects. This reduces duplication of code, improves development efficiency, and promotes a consistent coding style.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: OOP provides flexibility in code design and implementation, allowing for changes to be made more easily without affecting the entire system. This makes it easier to adapt to changing requirements and improve the overall quality of the software.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Organization&lt;/strong&gt;: OOP provides a clear structure and organization to code, making it easier to understand and maintain. Classes and objects help in categorizing and grouping related data and behavior, making it more intuitive to navigate and debug code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Object-oriented programming (OOP) is a powerful paradigm that has revolutionized the way software is developed. Its principles of encapsulation, inheritance, polymorphism, and abstraction provide a solid foundation for building complex and scalable software systems. With its benefits of modularity, reusability, flexibility, and code organization, OOP has become a widely adopted approach in modern software engineering. By understanding the basic concepts and principles of OOP, software developers can leverage its advantages to create robust and maintainable code for a wide range of applications.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>oop</category>
      <category>introduction</category>
      <category>programming</category>
    </item>
    <item>
      <title>DOCKER - How To Resolve "react exited with code 0"</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Fri, 24 Jul 2020 06:37:25 +0000</pubDate>
      <link>https://forem.com/the_lazy_/docker-react-exited-with-code-0-398n</link>
      <guid>https://forem.com/the_lazy_/docker-react-exited-with-code-0-398n</guid>
      <description>&lt;h1&gt;
  
  
  Resolving "react exit with code 0" when running a React container
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwyms8hs2h0fwztopvaqj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwyms8hs2h0fwztopvaqj.png" alt="Exit Code" width="640" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I guess before running into this error on your Docker instance I presume you have basic knowledge of Docker and as such won't need to explain or give basic explanation about Docker and rather go straight to the solution of the aforementioned problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Error
&lt;/h3&gt;

&lt;p&gt;The error is met when you run the below command on a set of project(s) that include a React App.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-composer up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or try to start a React App container from an image on your Docker instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  For the simplest solution, Skip to Option 5 😉
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Option 1
&lt;/h3&gt;

&lt;h4&gt;
  
  
  (While Running Multiple Containers)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Add the configuration "tty:true" to your react instance&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    react:
            tty: true //NOTE
            build: dockerreact
            ports: - "3000:3000"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Option 2
&lt;/h3&gt;
&lt;h4&gt;
  
  
  (While Running Multiple Containers)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Setting "stdin_open:true" to your react instance&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    react:
            stdin_open: true //NOTE:
            build: dockerreact
            ports: - "3000:3000"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Option 3
&lt;/h3&gt;
&lt;h4&gt;
  
  
  (While Running Multiple Containers or Single React Container)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Add "CI=true" as a command that should be executed before "npm install" in your Dockerfile within your React project root directory&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM node:14.5

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app

RUN CI=true //NOTE

RUN npm install
COPY . /usr/src/app

EXPOSE 3000
CMD ["npm","start"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Option 4
&lt;/h3&gt;
&lt;h4&gt;
  
  
  (While Running Multiple Containers or Single React Container)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Use "docker-compose run" instead of "docker-compose up" as this automatically sets either option 1 or 2 as true&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;NOTE: This is only works on already built docker images&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 5
&lt;/h3&gt;

&lt;h4&gt;
  
  
  (While Running Multiple Containers or Single React Container)
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Lastly, Downgrade your "react scripts" version to 3.4.0&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;NOTE: Downgrading to 3.3.0 or lower wont solve this error and might bring up other issues on your react project&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"dependencies": {
        "@testing-library/jest-dom": "^4.2.4",
        "@testing-library/react": "^9.3.2",
        "@testing-library/user-event": "^7.1.2",
        "react": "^16.13.1",
        "react-dom": "^16.13.1",
        "react-scripts": "3.4.0,  //NOTE:
        "react-scripts": "3.4.1" //NOT WORKING
},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>react</category>
      <category>docker</category>
      <category>compose</category>
      <category>linux</category>
    </item>
    <item>
      <title>Environmental Variables in Python</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Sun, 19 Jul 2020 16:34:22 +0000</pubDate>
      <link>https://forem.com/the_lazy_/environmental-variables-in-python-5a2k</link>
      <guid>https://forem.com/the_lazy_/environmental-variables-in-python-5a2k</guid>
      <description>&lt;h1&gt;
  
  
  Environmental Variables in Python
&lt;/h1&gt;

&lt;p&gt;Before we begin let's look at our little vocabulary&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ENV = Environmental Variable

ENVs = Environmental Variables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Haven't really built any major project with Python except writing scripts or solving simple Algorithms. Today I was making changes to my &lt;a href="https://github.com/igmrrf/Facebook_autopost_post" rel="noopener noreferrer"&gt;Facebook_autopost_bot&lt;/a&gt; when I realized am gonna need to set this up to enable others use the code and also share it openly on Github without letting out my passwords and configurations.&lt;/p&gt;

&lt;p&gt;Maybe you're already using &lt;strong&gt;ENVs&lt;/strong&gt; in your Python scripts or applications, but if your haven't started then now is a good time to consider a change. I believe prior to you readint his, you already know what an ENV is so no need to make this post longer.&lt;br&gt;
NOTE: ENVs exist outside of your code as part of your server environment— can help you by both streamlining and making more secure the process of running your scripts and applications. Automation and Security are the major reasons for adopting ENVs&lt;/p&gt;
&lt;h2&gt;
  
  
  Let's Start
&lt;/h2&gt;

&lt;p&gt;In Python environment variables are implemented using the &lt;em&gt;os&lt;/em&gt; package.&lt;/p&gt;

&lt;p&gt;Sample Code:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os

print(environ)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Result: Will show you all the ENVs existing on your machine(object containing a lot of information about your machine, os, services etc.)&lt;/p&gt;

&lt;p&gt;Note: This is an edited (shortened) output for the purpose of the blog post length.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; environ({'SHELL': '/bin/bash', 'LSCOLORS': 'ExFxBxDxCxegedabagacad', 'SESSION_MANAGER': 'local/igmrrf:@/tmp/.ICE-unix/2554,unix/igmrrf:/tmp/.ICE-unix/2554', 'QT_ACCESSIBILITY': '1', 'APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL': 'true', 'LANGUAGE': 'en_NG:en', 'QT4_IM_MODULE': 'ibus', 'GNOME_SHELL_SESSION_MODE': 'ubuntu', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'XMODIFIERS': '@im=ibus', 'DESKTOP_SESSION': 'ubuntu', 'SSH_AGENT_PID': '2467', 'NO_AT_BRIDGE': '1', 'GTK_MODULES': 'gail:atk-bridge', 'DBUS_STARTER_BUS_TYPE': 'session', 'PWD': '/home/igmrrf/Desktop/Writings/ENVs in Python',   'TERM_PROGRAM': 'vscode', '_': '/usr/bin/python3'})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  COMMANDS for Reading and Writing environment variables:
&lt;/h3&gt;
&lt;h3&gt;
  
  
  READING
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;os.environ.get('USER')
os.environ['User']
os.getenv('USER')

&amp;gt;&amp;gt;&amp;gt; igmrrf
&amp;gt;&amp;gt;&amp;gt; igmrrf
&amp;gt;&amp;gt;&amp;gt; igmrrf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The commands will print out your current username&lt;/p&gt;

&lt;p&gt;Note: If there no environment variable matching the key, it'll return &lt;em&gt;None&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  WRITING
&lt;/h3&gt;

&lt;p&gt;To change an ENV&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;os.environ[&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'tldo'&lt;/span&gt;
&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;os.environ['USER']

&amp;gt;&amp;gt;&amp;gt;tldo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  To Clear an ENV
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;os.environ.pop&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When trying to access that ENV, you'll get &lt;em&gt;None&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;os.environ.get&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  To Clear All ENV
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;os.environ.clear&lt;span class="o"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When trying to access any ENV, you'll get &lt;em&gt;KeyError&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;os.environ.get&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; KeyError: key does not exist.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE: I was scared at first about this clear function but don't worry, the settings you apply in your python projects and scripts don't affect other projects outside that specific process or affect machine wide ENVs.If you wish to affect a machine wide change on your machine you'll need to run these commands from &lt;em&gt;bash&lt;/em&gt; with &lt;em&gt;sudo&lt;/em&gt; priviledges&lt;/p&gt;

&lt;h2&gt;
  
  
  Using ENVs
&lt;/h2&gt;

&lt;p&gt;In order to use these variables as we keep on building scripts and as programmers and developers, effeciency, speed and optimization is a major criteria, we need to assign the function of handling these variables to an external file.&lt;/p&gt;

&lt;p&gt;A package that does this effortlessly is &lt;em&gt;python-decouple&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Open your terminal &amp;amp; Run&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install python-decouple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;if your use Linux ubuntu and install python using &lt;em&gt;sudo apt install python3&lt;/em&gt; then run&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 install python-decouple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;A useful package for handling ENVs locally instead of us acccessing our os(&lt;em&gt;import os&lt;/em&gt;) and manipulating which is a bit complex 😉&lt;/p&gt;

&lt;p&gt;If you've already got it installed, you'll get&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Requirement already satisfied: python-decouple in /home/your_name/.local/lib/python3.8/site-packages (3.3)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;else it will be installed in few seconds&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Python-decouple
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Let's get started by creating and opening our .env file at the root of your project
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;p&gt;Note: &lt;em&gt;code&lt;/em&gt; is a command that comes with &lt;a href="//www.visualstudiocode.com"&gt;VsCode&lt;/a&gt;. Only run it if you have VsCode install and configured correctly on your machine&lt;/p&gt;

&lt;p&gt;Then configure the file as follows&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;username=igmrrf
PASSWORD=12345
URL=https://api.igmrrf.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then import Python-decouple in Your Python script where you need these variables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from decouple import config

print(config('URL'))
print(config('USERNAME'))

&amp;gt;&amp;gt;&amp;gt; your_api_endpoint
&amp;gt;&amp;gt;&amp;gt; igmrrf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wasn't that easy? 😄&lt;/p&gt;

&lt;p&gt;Python provides a package for almost everything, that's one of the reasons Python is so popular and getting more recognition.&lt;/p&gt;

&lt;p&gt;If you've got a second, either tweet about this or go check out a python package 😉&lt;/p&gt;

</description>
      <category>python</category>
      <category>env</category>
      <category>environmental</category>
      <category>decouple</category>
    </item>
    <item>
      <title>Adding SSH Keys to Your GitHub Account</title>
      <dc:creator>Richard Francis</dc:creator>
      <pubDate>Thu, 16 Jul 2020 18:16:45 +0000</pubDate>
      <link>https://forem.com/the_lazy_/adding-ssh-keys-to-your-github-account-1fp0</link>
      <guid>https://forem.com/the_lazy_/adding-ssh-keys-to-your-github-account-1fp0</guid>
      <description>&lt;h1&gt;
  
  
  Github SSH key Setup
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Surely a github account 🤓&lt;/li&gt;
&lt;li&gt;A Mac/Linux/Windows or Android devices (Yes, I once had my Android device setup for pushing little changes when I couldn't get my PC) 😁&lt;/li&gt;
&lt;li&gt;Internet Connection 😌&lt;/li&gt;
&lt;li&gt;Little knowledge of the Terminal (Command Line) 😋&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  NOTE: To follow up with an Android device download "Termux" and run the Linux commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Alright Let's Go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step One : Checking For Existing SSH Keys
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Linux, Mac &amp;amp; Windows(Git Bash)&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;First, we're gonna check if there's an existing SSH key on your device.&lt;br&gt;
NOTE: If you're sure you don't have existing SSH keys you can skip this step to the next one.&lt;/p&gt;

&lt;p&gt;Open Terminal&lt;/p&gt;

&lt;p&gt;Enter the following command to see if existing SSH keys are present&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -al ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It'll list the files in this directory if they exist.&lt;br&gt;
If a count instead is shown or no files you can move to step two&lt;/p&gt;

&lt;p&gt;Expected Output&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;id_rsa.pub
id_ecdsa.pub
id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you already have and wish to use then, skip step 2 and continue from step 3. But if you wish to not use any already available to connect to github you can continue with step 2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Generating SSH Keys
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Linux, Mac &amp;amp; Windows(Git Bash)&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Type or paste the command below intor your terminal, replace &lt;a href="mailto:your_email@example.com"&gt;your_email@example.com&lt;/a&gt; with your Github email address.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Press "Enter" when prompted "Enter a file in which to save the key".&lt;br&gt;
Doing this accepts the default location.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Enter a file in which to save the key(/home/you/.ssh/id_rsa):[Press Enter]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;At the next prompt type a secure password and confirm it by typing it again on the next prompt&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Enter passphrase (empty for no passphrase): [Type a passphrase]
&amp;gt; Enter same passphrase again: [Type passphrase again]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Step 3 Adding SSH key to the ssh-agent
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Linux &amp;amp; Windows(Git Bash)&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Start the ssh-agent in the background&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ eval "\$(ssh-agent -s)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Result: But could be a different number&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Agent pid 67068
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add your ssh private key to the ssh-agent.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh-add ~/.ssh/id_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Mac&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Start the ssh-agent in the background&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ eval $(ssh-agent -s)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Result: But could be a different number&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Agent pid 59068
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;NOTE: For macOS Sierra 10.12.2 or later&lt;br&gt;
Modify your (&lt;a href=""&gt;~/.ssh/config&lt;/a&gt;) file to automatically load keys into the ssh-agent and store passphrases in your keychain.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First check to see if your &lt;a href=""&gt;~/.ssh/config&lt;/a&gt; file exists in the default location&lt;/p&gt;

&lt;p&gt;$ open ~/.ssh/config&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you get&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[The file /Users/you/.ssh/config does not exist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then create the file.&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;Open it and modify the file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host *
    AddKeysToAgent yes
    UseKeyChain yes
    IdentityFile ~/.ssh/id_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add your ssh private key to the ssh-agent.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh-add ~/.ssh/id_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If for professional purposes or personal purposes, you created the key with a different name, replace id_rsa with the name of the private key file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Adding SSH key to your Github Account
&lt;/h2&gt;

&lt;p&gt;Copy the SSH key to your clipboard&lt;br&gt;
REMINDER: If your SSH key file has a different name, modify the filename to match your setup. No new line or whitespace are allowed.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;MAC&lt;/em&gt;
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pbcopy &amp;lt; ~/.ssh/id_rsa.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Linux&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;To Check for latest drivers and update&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get update

$ sudo apt-get upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install xclip and copy the contents&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get install xclip

&lt;p&gt;$ xclip -sel clip &amp;lt; ~/.ssh/id_rsa.pub&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;em&gt;Windows&lt;/em&gt;&lt;br&gt;
&lt;/h3&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ clip &amp;lt; ~/.ssh/id_rsa.pub&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  General&lt;br&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  ALL COMMANDS ARE DONE NOW.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Login your Github on a browser &amp;amp; Navigate to Settings
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjoitpglovaljqqx31hpe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjoitpglovaljqqx31hpe.png" alt="Alt Text" width="242" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Select SSH and GPG keys
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh3q3tm1e28hzrh40fphv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh3q3tm1e28hzrh40fphv.png" alt="Alt Text" width="245" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Click New SSH keys
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdyir8s7buhmvpuskboj5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdyir8s7buhmvpuskboj5.png" alt="Alt Text" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  In the Title field, add a descriptive label for the new key
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6b9j5mgrfobm14k0ntts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6b9j5mgrfobm14k0ntts.png" alt="Alt Text" width="602" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Finally paste your key into the Key Field and click add
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpbq5a7u6xlhete1mfrkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpbq5a7u6xlhete1mfrkt.png" alt="Alt Text" width="786" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Now you can go back to your terminal and clone, push, pull and run every other Git command without having to repeatedly input your GITHUB details
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Extra Note: When try to perform a Git command from an Editors or IDE for the first time, you might be asked to input the passphrase use in creating the SSH key.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  You can either allow it once or allow it until you choose to remove the SSH Key from Github
&lt;/h4&gt;

&lt;p&gt;Thanks 😘&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>sshkeys</category>
      <category>ssh</category>
    </item>
  </channel>
</rss>
