<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saurabh Goyal</title>
    <description>The latest articles on DEV Community by Saurabh Goyal (@saurabhgoyal).</description>
    <link>https://dev.to/saurabhgoyal</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%2F175322%2F22f63a37-ae89-4156-b888-8205270b38f5.jpeg</url>
      <title>DEV Community: Saurabh Goyal</title>
      <link>https://dev.to/saurabhgoyal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saurabhgoyal"/>
    <language>en</language>
    <item>
      <title>[Level-Up-Series] Program in Assembly</title>
      <dc:creator>Saurabh Goyal</dc:creator>
      <pubDate>Tue, 04 Jun 2019 10:56:07 +0000</pubDate>
      <link>https://dev.to/saurabhgoyal/level-up-series-program-in-assembly-4i0a</link>
      <guid>https://dev.to/saurabhgoyal/level-up-series-program-in-assembly-4i0a</guid>
      <description>&lt;p&gt;This is one of the experiments to be done under Programmer &lt;a href="/saurabhgoyal/levelling-up-as-a-developer-3gol"&gt;&lt;strong&gt;Level-up-series&lt;/strong&gt;&lt;/a&gt;, checkout &lt;a href="/saurabhgoyal/levelling-up-as-a-developer-3gol"&gt;this post&lt;/a&gt; to know more details.&lt;/p&gt;




&lt;p&gt;As per original experiment, the idea was to write a simple Assembly program but while doing that I tried to get a comprehensive grasp of the language and hence started with a bit of history and the very basics. After reading all this, I have much more to share on fundamentals than on Assembly language itself. Let’s start-&lt;/p&gt;

&lt;h2&gt;
  
  
  Assembler | Compiler | Interpreter
&lt;/h2&gt;

&lt;p&gt;We’ll discuss what are these, why they were needed, how things started, what should I answer when people ask me if Python is interpreted or compiled :p.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Early in the time, Different processors/architectures (I’ll call them &lt;strong&gt;&lt;code&gt;environments&lt;/code&gt;&lt;/strong&gt; from now on) required their own set of machine code (0s and 1s) instructions to perform same operations because of the way their hardware was wired. The case is same even today, any type of program you want to run, at the final layer where any non-machine-code program is converted to machine code instructions, that translator is environment specific. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LhXRZGng--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-Different-env.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LhXRZGng--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-Different-env.png" alt="diff-env"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Putting that aside, writing machine code instructions even for one specific environment was cumbersome since they are not easily understandable by humans. Of course people didn’t remember machine codes for each command they wanted to perform, they had something called &lt;a href="https://en.wikipedia.org/wiki/Opcode_table"&gt;&lt;strong&gt;Opcode tables&lt;/strong&gt;&lt;/a&gt; which was a mapping between human-readable commands such as &lt;code&gt;Load A, 10&lt;/code&gt; to machine code command such as &lt;code&gt;00111010&lt;/code&gt;, they wrote their programs in opcodes and then by looking up the table, they converted that to machine code instructions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Obviously enough, a need was felt of a program which can automate the above step by taking opcoded (human-readable commands) program and generating machine code program from it, a &lt;strong&gt;Translator&lt;/strong&gt;. One such translator was created and was called &lt;strong&gt;Assembler&lt;/strong&gt; since it translated the first structured version of the opcode instructions which were called &lt;strong&gt;Assembly language&lt;/strong&gt;. A point to note here is that it &lt;strong&gt;worked exactly like a mapping&lt;/strong&gt; , i.e. it took one instruction of opcode and converted to one instruction of machine code, there was no complex translation. Such type of naive translator is called &lt;strong&gt;Interpreter&lt;/strong&gt;. So &lt;strong&gt;an Assembler is nothing but an Interpreter for Assembly language.&lt;/strong&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yG_fKaAX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-int-asm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yG_fKaAX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-int-asm.png" alt="interpreter"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As it started speeding up the programming, community wanted to have even higher levels of abstraction with which complex set of machine code instructions could be written as much simpler high level instructions without programmer focusing on low level stuff such as where and how of memory allocation, this is when &lt;strong&gt;Compilers&lt;/strong&gt; were born. Compilation was not a direct mapping of instruction in one language to instruction in another, rather a sophisticated and complex process of reading the whole program first then converting that into machine code program with all kinds of optimizations, this extended the possibilities a lot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The main challenge with this though, was that it was a common and true perception that such a compiled program can not achieve the same level of performance as that of a hand written Assembly program, mainly because of the memory allocation logic and optimizations that humans can think of depending on the situation. &lt;strong&gt;Obviously that performance came with the trade-off of huge entry barrier to programming.&lt;/strong&gt; Any way, one such language &lt;strong&gt;A0&lt;/strong&gt; was created which was compiled into machine code instead of being translated one line at a time, though it didn’t become much popular because of the earlier mentioned perception. Later IBM created &lt;strong&gt;FORTRAN&lt;/strong&gt; on the same principle which was widely accepted. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5YQ5yIUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-compiler.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5YQ5yIUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-compiler.png" alt="compiler"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now there were languages which had their compilers and were easy to code in but there was still an issue - different compilers had to be written for different environments. A solution was proposed which included both compiler and interpreter for translation. This was the introduction to &lt;strong&gt;Write Once, Run Everywhere&lt;/strong&gt; concept. There were 2 steps-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The high level source code would be compiled into some kind of &lt;strong&gt;intermediate-code&lt;/strong&gt;. This was different from normal compilation in which source code is converted to machine code.&lt;/li&gt;
&lt;li&gt;That intermediate-code will be interpreted by an interpreter written specifically for the environment in which program has to be run.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;Point to note here is that, this solution also needed writing environment specific &lt;strong&gt;interpreters&lt;/strong&gt; but was still preferred to writing environment specific &lt;strong&gt;compilers&lt;/strong&gt; because of two reasons-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing environment specific compiler for high level source code was much more cumbersome than writing environment specific interpreters for much lower level intermediate-code.&lt;/li&gt;
&lt;li&gt;Bytecode provided an ease of sharing the program without sharing the source code which provided some kind of abstraction.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;COBOL was the first language to start with this concept and it made writing and sharing programs extremely simple. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MDzqtkKA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-comp-int.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MDzqtkKA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/com-asm-int-comp-int.png" alt="compiler-interpreter"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In interpretation process, a major optimization method was introduced, it’s called &lt;strong&gt;JIT (Just-In-Time) Complilation&lt;/strong&gt;. What it does is that when interpreter is going line by line and translating to machine code, it also feeds the lines to a module called JIT-compiler which starts finding duplicate lines, complex set of lines and other types of instructions which can be optimized on and keeps storing their machine code translations for future usage. With the collected insight and data, it saves repeated translation of multiple lines of intermediate-code to machine code by interpreter. All this happens on the fly as and when lines come, hence Just-In-Time. It creates a significant positive impact in performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Needless to mention that in reality there are much more intricate details about each point mentioned above, I have just tried to give an overview of all three things.&lt;/p&gt;




&lt;h2&gt;
  
  
  Popular Implementations for Languages
&lt;/h2&gt;

&lt;p&gt;After going through above, one thing we need to understand is that languages are not compiled or interpreted, it’s the implementation of their translator which takes such approaches. A language may have one or more translators using different approaches. We’ll go through some popular implementations (translators)-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in C, It has two components - JAVAC, working as compiler and JVM, working as (interpreter + JIT compiler)&lt;/li&gt;
&lt;li&gt;JAVAC compiles the source code (.java) into bytecode (.class)&lt;/li&gt;
&lt;li&gt;Then bytecode is interpreted into machine code line by line by platform specific JVM which acts as interpreter while applying JIT compilation.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;CPython&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in C, acts both as compiler and interpreter&lt;/li&gt;
&lt;li&gt;Implicitly compiles the source code (.py) to intermediate-code (.pyc), no manual action is needed&lt;/li&gt;
&lt;li&gt;Then intermediate-code is interpreted into machine code line by line.&lt;/li&gt;
&lt;li&gt;Even the interactive shell that comes with it follows the same process.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;Jython&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in Java, acts as compiler only&lt;/li&gt;
&lt;li&gt;Compiles the source code (.py) into Java bytecode&lt;/li&gt;
&lt;li&gt;Then bytecode can be fed into any JVM (Java Virtual Machine) which produces the machine code.&lt;/li&gt;
&lt;li&gt;Provides access to full Java library.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;PyPy&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in Python itself, acts as compiler and (interpreter + JIT compiler)&lt;/li&gt;
&lt;li&gt;Compiles the source code (.py) into intermediate-code (.pyc)&lt;/li&gt;
&lt;li&gt;Then intermediate-code is interpreted into machine code line by line while applying JIT compilation.&lt;/li&gt;
&lt;li&gt;In some cases, it’s faster than CPython since it makes use of JIT compilation.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;IronPython&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in .Net, acts purely as compiler&lt;/li&gt;
&lt;li&gt;Compiles the source code (.py) directly to machine code&lt;/li&gt;
&lt;li&gt;Provides access to full .Net library.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;C&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Original - I don’t know the exact name of C’s original compiler.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in Assembly, acts as compiler only.&lt;/li&gt;
&lt;li&gt;Compiles the source code (.c) into machine code.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;GCC&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented in C itself, acts as compiler and assembler.&lt;/li&gt;
&lt;li&gt;Compiles the source code (.c) into Assembly (.s)&lt;/li&gt;
&lt;li&gt;Then intermediate-code (.s) is converted into machine code by assembler.&lt;/li&gt;
&lt;/ul&gt;


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




&lt;h2&gt;
  
  
  Registers and Memory
&lt;/h2&gt;

&lt;p&gt;Before we go into the Assembly language itself, There are couple of things I would like to clarify -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Physical form of Memory&lt;/strong&gt; - In terms of memory, the smallest data unit is &lt;strong&gt;bit&lt;/strong&gt; which is either 0 or 1 so basically we want to have two states possible in our memory system to identify whether it has 0 or 1. In earlier time, Magnetic tapes were used which are made of tiny magnetic particles and there can be two states of direction of magnetic charge in those particles, thus providing 0 or 1. Later on, logical gates (Physical form of boolean functions) were used which when structured in a particular way such as &lt;a href="https://en.wikipedia.org/wiki/Flip-flop_(electronics)"&gt;Gated Latch&lt;/a&gt; become &lt;strong&gt;stateful&lt;/strong&gt; , i.e. can store a bit of memory. I highly recommend checking out &lt;a href="https://www.youtube.com/watch?v=RU1u-js7db8"&gt;this video&lt;/a&gt;, It explains Memory in detail and amazingly simple manner. After having a mechanism of building 1 bit memory, next requirement was to have more of that, considering 1 bit memory system as abstract memory blocks, such blocks were then combined in forms of grids of grids of grids and so on thus achieving such high amount of memory that we see today. A 1 GB RAM stick actually has ~1 Billion physical memory blocks to store that many bits data, it’s amazing how technology has grown to be able to do that in extremely small spaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Registers&lt;/strong&gt; - For efficient usage, access and writes on memory by processor, processors generally have very small amount of their own memory, called Registers. They are used by processor to hold instructions, data to perform instruction on and multiple other things. The registers have a digital representation also which provide a virtual abstraction between actual memory and their representation in programs, these registers are referenced in programs instead of individual memory addresses.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Assembly Language
&lt;/h2&gt;

&lt;p&gt;Finally we are here! As we already know now, Assembly is a low level language created to provide an abstraction to programmers from machine code. In current time, Assembly is used when program needs to interact with low level components such as OS, Processor and BIOS. Being low level, it’s much faster than other high level languages, hence it’s another major usage is in time critical jobs./saurabhgoyal/&lt;/p&gt;

&lt;p&gt;Below, I have given a very high level view of the language, it’s not a tutorial at all, for detailed tutorial, check out the links given in references section.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Addressing data in memory&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;There are 3 steps towards execution of an instruction&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loading instruction and operands data from memory to register.&lt;/li&gt;
&lt;li&gt;Identifying the instruction.&lt;/li&gt;
&lt;li&gt;Executing the instruction.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Registers are used to hold data required to perform an instruction. To verify that correct data was copied, for each byte of data, registers generally have an extra bit called &lt;strong&gt;Parity bit&lt;/strong&gt;. Using this, correct count of set bits can be ensured, it’s not full proof though since it does a mod on the total count. &lt;a href="https://www.tutorialspoint.com/what-is-a-parity-bit"&gt;Read more here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Sections - An assembly program generally has following 3 sections in it-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data - All constants values are declared and initialized here.&lt;/li&gt;
&lt;li&gt;bss - All variable memory spaces are declared and bound here.&lt;/li&gt;
&lt;li&gt;text - Instructions for program logic go here.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;Statement format&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[label] command [operands] [;comment]&lt;/li&gt;
&lt;li&gt;The parts in square brackets are optional&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;Memory segment - Memory is segmented into 3 parts to store specific type of data in it-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data - Stores data elements for the program, basically elements represented by &lt;code&gt;.data&lt;/code&gt; and &lt;code&gt;.bss&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;code - Stores instruction codes for the program, basically elements represented by &lt;code&gt;.text&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;stack - Stores values passed to function calls in the program.&lt;/li&gt;
&lt;/ul&gt;


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




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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I feel that discussing actual syntax and full tutorial of the language here is useless, I have given some very basic idea above. &lt;a href="https://github.com/SaurabhGoyal/programmer-achievements/tree/master/assembly"&gt;Check out this repo&lt;/a&gt; to see more detailed code and instructions. Till now, I have added three basic and popular programmes - &lt;code&gt;hello-world&lt;/code&gt;, &lt;code&gt;triangle&lt;/code&gt; and &lt;code&gt;fizzbuzz&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The whole experiment along with this post took ~4 days.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;My favourite part of this experiment was definitely reading about compilers and interpreters.&lt;br&gt;
/10x-dev&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checkout other posts from level-up series &lt;a href="/10x-dev/2019/05/30/levelling-up-as-developer.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Other Learnings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Makefile&lt;/strong&gt; - I learned how to use this and what exactly is the benefit. I highly recommend it and there is a nice little tutorial given in references section, check that out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Linux commands&lt;/strong&gt; - Some new linux commands I picked up - &lt;code&gt;file&lt;/code&gt; (Tells file type of passed file) and &lt;code&gt;tee&lt;/code&gt; (Provides a plumbing like T for output stream of a command. Usage ex.- sending output to both stdout and a file)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Linux file descriptors&lt;/strong&gt; - STDIN is represented by 0, STDOUT by 1, and STDERR by 2.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Linux null device&lt;/strong&gt; - I knew about &lt;code&gt;/dev/null&lt;/code&gt; earlier too but not formally, it’s a null device (a file actually), discards any input given to it, so used mainly when you don’t want the output or error from a command.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repository with implementation - &lt;a href="https://github.com/SaurabhGoyal/programmer-achievements/tree/master/assembly"&gt;https://github.com/SaurabhGoyal/programmer-achievements/tree/master/assembly&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Tutorial source - &lt;a href="https://www.tutorialspoint.com/assembly_programming"&gt;https://www.tutorialspoint.com/assembly_programming&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Registers and Memory Video - &lt;a href="https://www.youtube.com/watch?v=fpnE6UAfbtU"&gt;https://www.youtube.com/watch?v=fpnE6UAfbtU&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Programming Languages Video - &lt;a href="https://www.youtube.com/watch?v=RU1u-js7db8"&gt;https://www.youtube.com/watch?v=RU1u-js7db8&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Assembly (using NASM) in 64 bit - &lt;a href="https://cs.lmu.edu/~ray/notes/nasmtutorial/"&gt;https://cs.lmu.edu/~ray/notes/nasmtutorial/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Makefile - &lt;a href="https://opensource.com/article/18/8/what-how-makefile"&gt;https://opensource.com/article/18/8/what-how-makefile&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Level-up Series - 

&lt;ul&gt;
&lt;li&gt;&lt;a href="/saurabhgoyal/levelling-up-as-a-developer-3gol"&gt;Blog post series&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gist.github.com/SaurabhGoyal/5f911bbef0dd5f11aaf7e8a5f7be1399"&gt;Achievements Gist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


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

</description>
      <category>levelup</category>
      <category>assembler</category>
      <category>compiler</category>
      <category>interpreter</category>
    </item>
    <item>
      <title>Levelling up as a developer</title>
      <dc:creator>Saurabh Goyal</dc:creator>
      <pubDate>Thu, 30 May 2019 02:48:07 +0000</pubDate>
      <link>https://dev.to/saurabhgoyal/levelling-up-as-a-developer-3gol</link>
      <guid>https://dev.to/saurabhgoyal/levelling-up-as-a-developer-3gol</guid>
      <description>&lt;p&gt;Most programmers/developers, if not all, have a hunch to up their game, to level up in their skills and to be considered among the good programmers out there, unfortunately not everyone is sure what path to take and more importantly how to even measure their skills. Data structures, algorithms, system design, tech stack knowledge and experience are the industry standard right now but they are not quite measurable and do not provide users with trackable objectives to complete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vPFHi68D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/NotSureIfGoodProgrammer.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vPFHi68D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://saurabhgoyal.github.io/assets/images/NotSureIfGoodProgrammer.jpg" alt="AmIGood"&gt;&lt;/a&gt;&lt;em&gt;&lt;sup&gt;&lt;a href="https://ardalis.com/working-through-roadblocks-a-guide-for-new-programmers"&gt;https://ardalis.com/working-through-roadblocks-a-guide-for-new-programmers&lt;/a&gt;&lt;/sup&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With that said, A quick google search landed me on &lt;a href="https://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer/"&gt;this blog post&lt;/a&gt; by &lt;strong&gt;jasonrudolph&lt;/strong&gt; and this lists some of the objectives which can be considered as achievements for a developer. What I liked about them is that for someone who doesn’t have a path, they provide a nice way to get started, get uncomfortable in their programming routine and be better on the way.&lt;/p&gt;

&lt;p&gt;The steps are very simple-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Select a particular experience to pursue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pursue that experience to completion. (Achievement unlocked!)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reflect on that experience. Really soak it in. Maybe a blog post would be in order?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return to Step 1, this time selecting a new experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step-3 is the most crucial, this is what will ensure that you learn something with each achievement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have forked the gist which had the &lt;a href="https://gist.github.com/SaurabhGoyal/5f911bbef0dd5f11aaf7e8a5f7be1399"&gt;list of these achievements&lt;/a&gt; to be completed, check them out, If you like them, fork it and add your own achievements. The current ones in the list are really interesting and I am positive that everyone can learn a lot with each achievement. I’ll be updating this post as and when I complete an achievement. All posts under this series will have the prefix &lt;code&gt;Level-Up-Series&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Achievements
&lt;/h2&gt;

&lt;p&gt;*1. &lt;strong&gt;Write a program in assembly language (June 2nd, 2019)&lt;/strong&gt; -&lt;/p&gt;

&lt;p&gt;So the basic idea was to write any small program in Assembly, but while doing that I learned a lot of the other things. &lt;a href="https://dev.to/saurabhgoyal/level-up-series-program-in-assembly-4i0a"&gt;Check this post for detailed information on this&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>levelup</category>
      <category>10x</category>
      <category>developer</category>
    </item>
    <item>
      <title>Scheduling a task - for dummies</title>
      <dc:creator>Saurabh Goyal</dc:creator>
      <pubDate>Sat, 29 Jul 2017 17:48:07 +0000</pubDate>
      <link>https://dev.to/saurabhgoyal/scheduling-a-task-for-dummies-46n3</link>
      <guid>https://dev.to/saurabhgoyal/scheduling-a-task-for-dummies-46n3</guid>
      <description>&lt;h1&gt;
  
  
  What -
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;Basic concept is that there is a work at hand and there is some related task to be done, but not right away. Some situations when scheduling a task may be needed instead of doing right away are -&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When the task is not to be done now because of lower priority, un-availability of required resource, complexity of task, cost of running the task, &lt;code&gt;priority of the main work at hand&lt;/code&gt; or various other reasons. Then you schedule that task to be done &lt;code&gt;later&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the task is to be distributed to one or more other people who’ll do it. You need a common platform to communicate about the task to them. You schedule that task to be &lt;code&gt;queued&lt;/code&gt; in their list of work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the task is to be repeated at a certain frequency such as daily or weekly. You schedule that task to be run &lt;code&gt;periodically&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now how do we schedule? Let’s look at the components involved. At it’s core, a task is nothing but a set of instructions to be performed on a particular data set. That is the data you need to pass to schedule a task. The combined data can be called a &lt;code&gt;Message&lt;/code&gt; which is passed from the scheduler to whoever will perform that task.&lt;/p&gt;

&lt;h1&gt;
  
  
  How -
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Protocol
&lt;/h2&gt;

&lt;p&gt;We need a protocol (a set of rules or a contract) to do that in efficient and inter-operable way in machines (read- computers). The protocol used for that is called &lt;code&gt;Messaging Protocol&lt;/code&gt;. One of the most common messaging protocol that we use or rather did use in our daily lives is post office service, where we have to provide destination, source, add required stamps and enclose the contents in a wrapper for the messaging to be completed. In computers, one such protocol is SMTP (Simple Mail Transfer Protocol), which powers the email service.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;If you are wondering why a separate protocol, let's just think this way - a protocol is nothing but a refined version of whole or parts of one or more other protocols customized for one specific purpose.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Followings are the benefits of using a specific messaging protocol over other such as HTTP/IMAP -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTTP is a synchronous protocol and works on a point to point connection which means whenever a message is sent from the sender, it’ll be received by only one receiver and in synchronous mode, i.e. if there is any interruption before the data has been completely received by the receiver, data will be lost. This may be fine for web applications where client(receiver) will request again, but is not suitable for messaging which requires guarantee of message delivery to one or more clients which may or may not be available at the time of sending the message,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTP has high dependency of sender and receiver on each other and each part of communication highly depends on proper understanding and knowledge of both. This prevents the consumers, publishers and other parts from being independent of each other and anywhere and with any level of capacity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Messaging protocols are created for messaging only and hence they optimize on connection establishment and request-response cycle in multiple ways, making it the solution for this purpose.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As most messaging protocol make use of asynchronous execution of sub-parts such as publishing, routing and consuming, they are named asynchronous messaging protocol. There are various such protocols - AMQP, MQTT etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Components &amp;amp; Process -
&lt;/h2&gt;

&lt;p&gt;Now that you have the message and a protocol to send it, what’s missing? &lt;code&gt;Consistency&lt;/code&gt; and &lt;code&gt;Reliability&lt;/code&gt;. In simpler terms, We need to ensure -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The message does not get damaged/altered in any way before the person gets it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The message reaches the intended person.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And most importantly, the task in the message gets executed successfully before discarding the message.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the above, one good approach is having a &lt;code&gt;message storage&lt;/code&gt; and a &lt;code&gt;storage-manager&lt;/code&gt; to prevent losses and manage routing and message persistence in case of errors. So there are-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Messages to be delivered which consist of the task to be performed and the data on which it’s to be performed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One or more publishers that produce messages and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One or more consumers which consume messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Message storage - Queue is the data structure used mostly for this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manager - A program/service/middleman that links all parts and facilitates the messaging.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This may sound simple but the whole benefit of message reliability, interoperability between all kinds of resources because of common standard, scalability in terms of messages, publishers and consumers and the dependency removal between publishers and consumers is all that async messaging protocols bring to the plate.&lt;/p&gt;

&lt;p&gt;In general, There are two popular patterns for messaging -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Publisher Subscriber&lt;/code&gt; - Publishers publish messages for certain topics. Consumers subscribe for certain topics. Whenever a new message is available for a topic, all subscribed consumers get that message.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Message Queue&lt;/code&gt; - Publishers add message to a queue and consumers consume that queue. A message is consumed by only one consumer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Let’s Talk AMQP-
&lt;/h1&gt;

&lt;p&gt;AMQP (Asynchronous Message Queuing Protocol) is a specific protocol that uses the components mentioned above and adds some more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsaurabhgoyal.github.io%2Fassets%2Fimages%2FThe-amqp-model-for-wikipedia.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsaurabhgoyal.github.io%2Fassets%2Fimages%2FThe-amqp-model-for-wikipedia.svg" alt="AMQP Model-1"&gt;&lt;/a&gt;&lt;em&gt;&lt;sup&gt;&lt;a href="https://commons.wikimedia.org/wiki/File:The-amqp-model-for-wikipedia.svg" rel="noopener noreferrer"&gt;https://commons.wikimedia.org/wiki/File:The-amqp-model-for-wikipedia.svg&lt;/a&gt;&lt;/sup&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The store-manager/middleman is called &lt;code&gt;Message Broker&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In a nutshell, Broker maintains one or more &lt;code&gt;queues&lt;/code&gt; where all incoming messages are stored until they have been successfully consumed as expected. These queues may be in-memory or persistent. The messages can be added directly to the queues by broker or another layer called &lt;code&gt;exchange&lt;/code&gt; be added which controls and manages which messages are to be added to which queue based on rules called &lt;code&gt;binding&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The consumers are called &lt;code&gt;workers&lt;/code&gt; (Their work is to consume the queue). They may be increased or decreased based on load on the queue. They can be configured to consume only certain types of queues thus to distribute consumption of different kind of tasks to different workers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsaurabhgoyal.github.io%2Fassets%2Fimages%2Fexchanges-bidings-routing-keys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsaurabhgoyal.github.io%2Fassets%2Fimages%2Fexchanges-bidings-routing-keys.png" alt="AMQP Model-2"&gt;&lt;/a&gt;&lt;em&gt;&lt;sup&gt;&lt;a href="https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html" rel="noopener noreferrer"&gt;https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html&lt;/a&gt;&lt;/sup&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Popular names -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Celery -&lt;/code&gt; Just a client to be used as a producer to assign messages to broker or consume messages from broker. It basically is an interpreter between your application and broker and uses AMQP to interact with broker, so that your application does not have to do all that. Other similar solutions are - &lt;code&gt;pika&lt;/code&gt;, &lt;code&gt;kafka&lt;/code&gt; etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;RabbitMQ -&lt;/code&gt; A broker that manages queues and interacts with publisher and consumer. Has highly reliable and comprehensive features to ensure message delivery and prevent any loss. Other similar solutions are - &lt;code&gt;ActiveMQ&lt;/code&gt;, &lt;code&gt;Amazon SQS&lt;/code&gt;, &lt;code&gt;kafka&lt;/code&gt; etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Redis-&lt;/code&gt; A data store that stores key-value pairs, supports certain types of data-structures as values and performs very well for high speed requirements. All data is stored in memory and hence is often used as cache. Other similar solutions are - &lt;code&gt;memcached&lt;/code&gt;, &lt;code&gt;mongodb&lt;/code&gt; etc. &lt;strong&gt;Why this is here&lt;/strong&gt; - It has recently added support for publisher-consumer pattern through AMQP and hence is also getting popular as a broker.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;References:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/an-advanced-message-queuing-protocol-amqp-walkthrough" rel="noopener noreferrer"&gt;Digital Ocean AMQP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rabbitmq.com/tutorials/tutorial-one-python.html" rel="noopener noreferrer"&gt;RabbitMQ Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>engineering</category>
    </item>
    <item>
      <title>Sensitive info in the project!</title>
      <dc:creator>Saurabh Goyal</dc:creator>
      <pubDate>Wed, 19 Jul 2017 17:18:07 +0000</pubDate>
      <link>https://dev.to/saurabhgoyal/sensitive-info-in-the-project-5g1l</link>
      <guid>https://dev.to/saurabhgoyal/sensitive-info-in-the-project-5g1l</guid>
      <description>&lt;p&gt;I have been more and more involved in tasks such as deployment and server management recently and I am still struggling through the nuts and bolts of the whole process from pushing the changes in the repository to deploying those and making sure that each resource in the infrastructure has successfully started running with the new changes.&lt;/p&gt;

&lt;p&gt;When going through our deployment scripts and resources the other day, this question popped up in my head.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do we manage our sensitive info in the project?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The sensitive info that consists of any of the below and more-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;API tokens&lt;/code&gt; to third party services. (such as Google APIs, Twilio etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Credentials/access keys&lt;/code&gt; to connect to either your own resources or others’. (such as AWS secret and access keys, address of resources such as servers, database instances etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Configurations&lt;/code&gt; for various services for your app. (such as Email configuration, Encryption keys, Critical settings or flags etc.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After some digging, I found we have stored these into the codebase only and is included in the version control system(git). This is a basic mistake that people do in the initial phase of a project without understanding the consequences. &lt;code&gt;I'll talk about it more later in the post.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Before proceeding, we must understand how and why above happens. So you have created your awesome app which uses some third party APIs or have some critical configuration. The data for those is sensitive and must not be made public, so you have setup your project such that whenever someone is initiating your app, he or she will provide all that sensitive data in a configuration file or through environment variables manually and your app will use that.&lt;/p&gt;

&lt;p&gt;All your sensitive info is off the code-base, secured to one or more authorized personnels and things work fine &lt;code&gt;UNTILL&lt;/code&gt; your product starts to grow and you face following problems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You have &lt;code&gt;multiple environments&lt;/code&gt; of your app - dev, staging, prod, each with a different set of sensitive data/configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The sensitive data/configuration itself starts getting big as &lt;code&gt;number of services and resources you use increase&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You have whole &lt;code&gt;system and separate team for DevOps&lt;/code&gt;, and the work is not restricted to a set of personnel anymore. The way they store/manage the sensitive data is a big concern for you and may cause you tons of losses in worst cases.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is to say, &lt;strong&gt;the offline method is not scalable&lt;/strong&gt;. When above happens and there are multiple versions of configuration files, you need to find a way to store them securely and manage them better, also making sure their availability and integrity. You can’t keep all those offline anymore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The intuitive and probably the best option is to put them in a private secure location (accessible only be authorized personnels such as devops engineers) and whenever instantiating the app, all data is pulled from there.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The locations can be places like a &lt;code&gt;repository&lt;/code&gt; or &lt;code&gt;AWS S3 bucket&lt;/code&gt; or any of the multiple available services to store sensitive data (&lt;code&gt;PassPack, Swordfish, CHEF server&lt;/code&gt; etc.). In any case, &lt;strong&gt;we must always store encrypted data to those places and decrypt before using at our end to ensure security even if data from that location is compromised.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Although, in that case you’ll have to provide keys/credentials to fetch the data from that secure location. But this is not same as before because we have successfully abstracted all sensitive data, which may increase a lot, behind one secure location/service, size of credentials to which is and will always be fixed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The above is the basic idea on how to automate deployment and configuration of one or more servers while keeping the sensitive data managed at one place securely. Of-course it’ll need some work at our end to modify our deployment script accordingly. To give you a better understanding, I’ll explain what We did in one of my projects-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We stored all the sensitive data in an S3 bucket. The data was encrypted before upload using a password. We used a tool called &lt;code&gt;Ansible-Vault&lt;/code&gt; for encryption which is good because we use &lt;code&gt;Ansible&lt;/code&gt; for all our deployment scripts and &lt;code&gt;Ansible-Vault&lt;/code&gt; is a module of &lt;code&gt;Ansible&lt;/code&gt;. The major benefit of using &lt;code&gt;Ansible-Vault&lt;/code&gt; is that when running Ansible scripts, if we provide the password of encryption used with Ansible-Vault then &lt;code&gt;Ansible&lt;/code&gt;, when processing any variable file, decrypts the file before its use automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Alternatively, we could use something else for encryption and modify our deployment script to decrypt the files manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now whenever deploying, all that is needed by the script are AWS keys for fetching file from S3 and the password/key for decrypting that file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:- &lt;em&gt;A repository is better in terms of modification and history management of sensitive data itself, which is not fully available with S3. The benefit mainly comes when you have lots and lots of sensitive data and multiple DevOps engineers who may be making changes to same key/s simultaneously. Although this is improbable in most projects.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Now let’s discuss what I wrote earlier - &lt;strong&gt;Committing any sensitive data to version control system is a big mistake.&lt;/strong&gt; Because-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The sensitive data is in the history even after moving out. Proper removal will require-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;History manipulation&lt;/code&gt; - which although possible is not very clean and smooth.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Rotation of all your sensitive data&lt;/code&gt; - Once a piece of sensitive data is public, it’s never fully safe to use that. Eventually you’ll have to rotate it for a new value which may be quite some work based on it’s purpose and howmany places is it being used.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;With all that said, there are multiple tools such as &lt;code&gt;truffleHog&lt;/code&gt; which search repos for any sensitive info in full history. They must be used if not confident.&lt;/p&gt;

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