<?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: SumiSastri</title>
    <description>The latest articles on DEV Community by SumiSastri (@sumisastri).</description>
    <link>https://dev.to/sumisastri</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%2F1259127%2F5b46c99a-eacd-4dc5-99a7-7d9fbeae93e5.jpeg</url>
      <title>DEV Community: SumiSastri</title>
      <link>https://dev.to/sumisastri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sumisastri"/>
    <language>en</language>
    <item>
      <title>What is the difference between Bash shells and the Bash Script?</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Wed, 27 Nov 2024 00:16:50 +0000</pubDate>
      <link>https://dev.to/sumisastri/what-is-the-difference-between-bash-shells-and-the-bash-script-37ab</link>
      <guid>https://dev.to/sumisastri/what-is-the-difference-between-bash-shells-and-the-bash-script-37ab</guid>
      <description>&lt;p&gt;Bash, is a shell and refers to the specific Bourne again shell. The Bash script is a scripting language that allows you to write a script to automate processes using the Bash shell. &lt;/p&gt;

&lt;p&gt;Scripts are interpreted language. What that means is that each line of the code is interpreted, executed and then the interpretation moves to the next line. &lt;/p&gt;

&lt;p&gt;Code compilers do not scan through the whole script as a block, instead they look at the code line-by-line.&lt;/p&gt;

&lt;p&gt;There are as many scripting languages as they are shells. There are different scripts for Korn, C and Zee shells. For example, the Bash Script takes the file extension &lt;code&gt;.sh&lt;/code&gt; whereas the &lt;code&gt;.ksh&lt;/code&gt; files are for Korn shells and &lt;code&gt;.csh&lt;/code&gt; for c-shells. The syntax for these scripting languages also differ. The environments and how to set up these environments also differ - in part 8 and part 9 - you see that setting up the environments for Bash and Zish differ substantially.&lt;/p&gt;

&lt;p&gt;Shell scripts help system operators to manipulate files in the file system (FS) and set user read, write and execute levels to files and folders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://linuxconfig.org/bash-scripting-vs-shell-scripting" rel="noopener noreferrer"&gt;Read more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Bash files can be created with the &lt;code&gt;.sh&lt;/code&gt; file extension. You can use any editor - nano or vim - to create a file. &lt;/p&gt;

&lt;p&gt;With nano -&lt;code&gt;nano &amp;lt;filename&amp;gt;&lt;/code&gt; and with vim &lt;code&gt;touch &amp;lt;filename&amp;gt;&lt;/code&gt;. Logic can be written into these files and executed by calling the file after changing the default read-write to files that are executable with the &lt;code&gt;chmod +x &amp;lt;filename&amp;gt;&lt;/code&gt; command and then calling the file with the command &lt;code&gt;bash &amp;lt;filename&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the difference between scripting languages and programming languages?
&lt;/h2&gt;

&lt;p&gt;Scripts share, with programming languages, data types and programming logic. However, they are not programming languages as they are dynamic and loosely typed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pages.cs.wisc.edu/~deppeler/tutorials/scripting/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means the languages are interpreted and not compiled. An interpreter reads code line by line and executes each line until an error is encountered. A compiler bundles a whole code block, reading it once and reducing it down to machine code.&lt;/p&gt;

&lt;p&gt;Examples of scripting languages are JavaScript, Python, PHP. JavaScript, started as a scripting language to add simple scripts to user events - clicks, mouse and keyboard inputs. However with the rapid advancement of the popularity of JavaScript, it has turned into a compiled language rather than a scripting language with its own set of specialised compilers and interpreters.&lt;/p&gt;

&lt;p&gt;One of the downsides of scripting languages is that error messages are not very detailed as scripts are lightweight applications. The error might point to the line that the interpreter has stopped working but the actual error could be a few lines above the actual error message.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/whats-the-difference-between-scripting-and-programming-languages/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The characteristics of programming languages that are incorporated in the Bash script
&lt;/h2&gt;

&lt;p&gt;Bash shares these programming conventions with its own syntax and useage:-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primitive data types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Strings - the default type &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integers - Bash does not support decimal places or floating point numbers&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Nullish types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ideally not recommended as any empty type may be considered a string - spaces represent ASCII char 32 and is an empty string. Another reason is that there are no user inputs like clicks, scrolling that are recognised by bash as it is a direct relationship between the keyboard and the computer kernel. Zero is not considered a nullish type but an integer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Variable storage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;immutable named variables and the &lt;code&gt;let&lt;/code&gt; key word with an assignment operator &lt;code&gt;=&lt;/code&gt; for mutable variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;value of one variable can be assigned to another variable with a different name eg:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num_1 = 10 
num_2 = num_1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Basic arithmetic operators&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Addition &lt;code&gt;+&lt;/code&gt; , subtraction &lt;code&gt;-&lt;/code&gt;, multiplication &lt;code&gt;*&lt;/code&gt; , division &lt;code&gt;\&lt;/code&gt; and modulus &lt;code&gt;%&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Logical operators&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Both statements evaluate to true &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, the or &lt;code&gt;|&lt;/code&gt; operator where 1 or more evaluate as true&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The greater than and less than are &lt;code&gt;gt&lt;/code&gt; and &lt;code&gt;lt&lt;/code&gt; not carats are used for numerical evaluations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Control flow conditional statements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are data control flows with &lt;code&gt;if-then&lt;/code&gt;, &lt;code&gt;if-then-else-then&lt;/code&gt; as well as &lt;code&gt;if-then-elif-then-else-then&lt;/code&gt; blocks as well as nested conditions.&lt;/li&gt;
&lt;li&gt;The key loop structures are &lt;code&gt;for-do&lt;/code&gt;,&lt;code&gt;until-do&lt;/code&gt; and &lt;code&gt;while-do&lt;/code&gt; as well as the &lt;code&gt;switch statement&lt;/code&gt; for complex looping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lists&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bash. like other programming languages, has ordered lists or arrays that allow you to access data and loop through the data performing logical and arithmetical operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where data is stored&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the terminal, data moves from the inputs of the user into 3 streams - a standard input, standard output and standard error.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;$#!/bin/bash&lt;/code&gt; is the file entry point and instructions are picked up by the hardware's interpreter, sent into the standard input stream, where it is stored with the instructions in memory. The data is processed and returned in the standard output stream or standard error stream.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Positional variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another feature of bash is the ability to initialise variables directly on the terminal. These variables are called positional or script variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros and cons of Bash
&lt;/h2&gt;

&lt;p&gt;Bash isn't the right choice for complex arithmetic operations or computing challenges as it has only 2 primitive types of data - strings and numbers. Numbers, are not decimal floating points but inttegers.&lt;/p&gt;

&lt;p&gt;Shell programming works due to several packages of free software from GNU, allowing piping and diverting of code via sempahores to run parallelly. Natively however, bash is programmed to run serially. GNU offers a collection of programs, applications, developer tools and even games that are embedded in the Bash script.&lt;/p&gt;

&lt;p&gt;It is a low-level script that is good for system operators to manage read-write-execute operations on files in the filing system for internal groups and individuals as well as external groups or individuals wishing to access server-based data.&lt;/p&gt;

&lt;p&gt;It is powerful and quick, interacting with the key processes in a computer. It is not easy to learn and formatting is manual.&lt;/p&gt;

&lt;p&gt;Editors like nano and vim are basic and code is clunky - not an ideal developer experience.&lt;/p&gt;

&lt;h4&gt;
  
  
  EXTERNAL REFERENCES - What is the difference between Bash shells and the Bash Script?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Photo credit&lt;/strong&gt; Photo by &lt;a href="https://unsplash.com/@tsuyoshikozu?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Tsuyoshi Kozu&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/a-close-up-of-a-metal-structure-with-a-blue-sky-in-the-background-4ftDrtCzFfs?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;[1] &lt;em&gt;Bash Cookbook:&lt;/em&gt; Ron Brash, Ganesh Naik, Packt Publishing, July 2018&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[2] Stallings W &amp;amp; Mohan R, &lt;strong&gt;Computer organization and architecture: designing for performance&lt;/strong&gt; , 1st edn (Packt Publishing, July 2018), 9th ed., International ed., (Pearson Education, March 2013) chap.1, pg 35&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[3] Scott Simpson, &lt;em&gt;Learning Bash Scripting&lt;/em&gt;, (Linked-in Learning, Sept, 2022), &lt;a href="https://www.linkedin.com/learning/learning-bash-scripting-17063287/what-s-bash?resume=false&amp;amp;u=42314660" rel="noopener noreferrer"&gt;Accessed: Oct. 29, 2024&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[4] &lt;strong&gt;GNU&lt;/strong&gt;(Accessed: Oct. 27, 2024) [Available]&lt;a href="https://www.gnu.org/" rel="noopener noreferrer"&gt;https://www.gnu.org/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[5] George Charalambous (2024), &lt;strong&gt;BASH part 1&lt;/strong&gt;, PDF slides &lt;a href="https://learning.westminster.ac.uk/ultra/courses/_98804_1/outline/file/_5330159_1" rel="noopener noreferrer"&gt;Available to MSc Computer Science Students MODULE: (2024) 7SENG012W.1&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>bash</category>
      <category>bashscripting</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Computers and computing in the mid-20th century</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Wed, 27 Nov 2024 00:00:25 +0000</pubDate>
      <link>https://dev.to/sumisastri/computers-and-computing-in-the-mid-20th-century-op3</link>
      <guid>https://dev.to/sumisastri/computers-and-computing-in-the-mid-20th-century-op3</guid>
      <description>&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%2Fuploads%2Farticles%2Fxx490vkuiuobeuls4ozo.jpg" 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%2Fuploads%2Farticles%2Fxx490vkuiuobeuls4ozo.jpg" alt="Image description" width="640" height="896"&gt;&lt;/a&gt;&lt;br&gt;
The world's first electronic digital computer was the ENIAC - the Electronic Numerical Integrator and Computer. It was designed and constructed at the University of Pennsylvania.&lt;/p&gt;

&lt;p&gt;The machine weighed 30 tonnes and occupied over 100 square meters of floor space - the size of a small warehouse. &lt;/p&gt;

&lt;p&gt;Stallings, et al [1] note that it was developed as a decimal rather than binary machines to create a ballistic report in the form of tables. The firing tables were to be used by gunners in World War II in the 1940s. It provided the range and trajectory of weapons. By the time it was completed, the War had ended. It was therefore used to perform a series of complex calculation to determine the feasibility of the hydrogen bomb. It was dismantled in the 1950s.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Lovelace to the ENIAC
&lt;/h2&gt;

&lt;p&gt;Shustek,[2] observes, that while Ada Lovelace and Charles Babbage created calculators, and the Pascaline, built in the 1600s by Blaise Pascale, the ENIAC was a fully electronic computer that had done "more calculations than all human beings in all of history" at the time.&lt;/p&gt;

&lt;p&gt;Lovelace and Babbage, conceived of ordered instructions to carryout arithmetic operations. The orders were punched into operation cards with a separate sequence of variable cards to store the use of the arguments of each operation. However, Haigh notes [3], the Analytical Engine was never built or stably designed.&lt;/p&gt;

&lt;p&gt;Therefore, while it was a precursor to the ENIAC, the Analytical Engine is not considered to be the first modern-day computer. &lt;/p&gt;

&lt;p&gt;The ENIAC, as an assembly of units wired together to solve mathematical problems is the first electronic version of a computing engine. Data control in the ENIAC is distributed and the machine could run processes in parallel. However, these processes were difficult and time-consuming. The execution of instructions was from read-only-memory or ROM. A simple mathematical calculation could take a minimum of nearly an hour to compute and complete execution.&lt;/p&gt;

&lt;p&gt;Several scientists, Alan Turing, John Mauchly, Presper Eckert and John von Neumann were researching how a program could be stored in memory.  They were also developing methods to retrieve these instructions from memory. This concept of stored programs in memory was incorporated in the design of the Princeton Institute of Advanced Studies model the Electronic Discrete Variable Computer (EDVAC), or the IAS computer.&lt;/p&gt;

&lt;p&gt;The fundamental architecture of the IAS computer persists in modern computer design. Computers today are more compact than the historical computers which used vacuum tubes to operate the on-off switches in the computer circuit board, but the basic architectural decisions have not changed significantly, Stallings et al observe.&lt;/p&gt;

&lt;p&gt;The ENIAC memory consisted of 20 accumulators, each capable of holding a 10-digit decimal number. According to Stallings et al., it was manually programmed by setting switches and plugging and unplugging cables. Shushtek adds that it was an 840-instruction program that used subroutines, nested loops, and indirect addressing for data locations and jump destinations. A jump destination is a set of instructions or programs that can be used to jump from one part of the instruction set to another, altering the instruction set's normal flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The EDVAC and separation of compute, control and memory operations
&lt;/h2&gt;

&lt;p&gt;The EDVAC, separated the planning and set up stages, the compute operation and the storage of the instructions in memory. This meant data flow and control were programmed by circuits responsible for triggering operations at the correct time, Haigh observes. Programming now referred to programming instructions before operations started and coding to the tasks of looking up numerical codes corresponding to the programming instructions.&lt;/p&gt;

&lt;p&gt;von Neumann[4], in his &lt;em&gt;First draft of a report on the EDVAC&lt;/em&gt; discusses the need for the separation of concerns into the central arithmetic part, a central control part, various forms of memory required, the input and output drivers in the second section of the paper which details the main subdivisions of a computer system.&lt;/p&gt;

&lt;p&gt;In his analysis of the central control unit, he says the unit's function is to receive orders from the input driver and provide "a list of orders or code to be used to define the mathematical and logical meaning and the operational significance of its code words". The orders could be to transport instructions from one part of the system memory to another part of the memory to get the next set of instructions from memory, transport instructions from the input driver to the central arithmetic part to execute specific mathematical operations, transport results from the central arithmetic part to the output driver. Speed and reliability are required from the central control unit - the modern-day central processing unit (CPU), or processor.&lt;/p&gt;

&lt;p&gt;He emphasises that the main function of memory is to store information in a register which is required while a problem is being solved. Therefore, memory should only be used for the duration that the problem is being solved and cleared with a delay to ensure stability and reliability during the processing of information from memory. In this light, he looks at the capacity unit of memory, speed and delays in accessing data from a capacity unit of memory and the time required to process each capacity unit of memory. Memory is fastest when it is closest to the action it is performing. Latency is inversely proportionate to size. The larger the memory storage unit, the slower the processing power. So, the smallest unit of memory - a bit is closest to the processing units.&lt;/p&gt;

&lt;p&gt;The central arithmetic part, as a subdivision of the system is devoted to executing system instructions relating to arithmetical calculations. The logic of the instructions relate to the conversion of decimal system mathematical problems to binary. The section discusses the types of mathematic operations in detail and the set of instructions they may need. It estimates the number of high-speed vacuum tubes the EDVAC needs and the estimated time to complete actions. The paper also explores the vacuum tube elements - the gates and triggers required to execute operations. &lt;/p&gt;

&lt;p&gt;The relationship between the ALU, or the arithmetic logical unit that performs bitwise operations on binary numbers, must also access the memory required to store instructions and logic. The method to load the instructions before execution and to relay them back to output drivers is also detailed in this section. The arithmetic part may be impacted by memory delays and other blocks and interrupts in the signals and therefore the section reviews the system requirements for the interdependency of the ALU and memory. Therefore, based on latency, all decimal and fraction operations need to be reduced down to binary so that it can be stored in its smallest memory register located the closest to the ALU.&lt;/p&gt;

&lt;p&gt;Stallings et al, note that with very few exceptions, modern-day computers are built on the foundations of the von Neumann model. While von Neumann is credited as the founding father of this architecture, his draft paper is a collective intelligence report from several scientists and mathematicians who remain unattributed in the paper and were working on solutions to the limitations of the ENIAC, according to Shustek.&lt;/p&gt;

&lt;h2&gt;
  
  
  Life before personal computers
&lt;/h2&gt;

&lt;p&gt;Transisterisation of the EDVAC was the next step in the progression of the early 20th century computers, Stalling et al note. Transistors replaced the vacuum tubes significantly reducing the heat generated and the footprint of the computer in terms of space occupied and energy consumption. &lt;/p&gt;

&lt;p&gt;Circuit boards with transistors represent the second generation of computers in the 1950s and 1960s. Transistors are semiconductors that amplify electronic signals and electrical power. Their importance in modern electronics in shrinking the size of computers cannot be overstated, says Moraes [5]. Transistors required less power and had a longer lifespan than vacuum tubes making them ideal for a wide use of electronic devices, Moraes adds. With the introduction of silicon in the manufacture of transistors, heat reduction in the compute process increased helping in the development of integrated circuits and microprocessors, which are the third generation of computers. &lt;/p&gt;

&lt;p&gt;In a single chip, today billions of transistors are embedded to amplify electronic signals, the mid-20th century computers started with a few thousand transistors. Transistors increase the voltage and current of the signal, converting even a small input to a significantly larger output.  Acting as a valve, the transistor creates a magnified copy of the input signal.&lt;/p&gt;

&lt;p&gt;The second big change in this generation of computers was the introduction of a multiplexor to transmit a larger data set of information units over a smaller bandwidth of processing queues to the CPU. When a multiplexor is used in an electronic circuit which involves high-speed switching and data transfers, input has to be selected from many available options based on the signal provided to them, Raj [6] explains. The control signal channels information to input pins and output pins. Control and selection pins are used to select the input and output pin signals.&lt;/p&gt;

&lt;p&gt;This combination of applications of these components transformed the ability of these expensive and large machines to be scaled down to size and up in speed and adoption of new users.&lt;/p&gt;

&lt;h4&gt;
  
  
  EXTERNAL REFERENCES - Computers and computing
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Photo credit&lt;/strong&gt; Photo by &lt;a href="https://unsplash.com/@brave4_heart?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Jigar Panchal&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/an-abstract-image-of-a-curved-green-object-8YRWIy8QGpI?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;[1]  Stallings W &amp;amp; Mohan R, &lt;strong&gt;Computer organization and architecture: designing for performance&lt;/strong&gt; , 9th ed., International ed., Pearson Education, March 2013, Available from: ProQuest Ebook Central&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[2] L.J. Shustek,  "Programming the ENIAC: an example of why computer history is hard", Leonard J Shustek, &lt;a href="https://computerhistory.org/" rel="noopener noreferrer"&gt;https://computerhistory.org/&lt;/a&gt; (Accessed: Nov. 25, 2024). &lt;a href="https://computerhistory.org/blog/programming-the-eniac-an-example-of-why-computer-history-is-hard/" rel="noopener noreferrer"&gt;Available&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[3] T. Haigh, "Where code comes from", Tomas Haigh,  &lt;a href="https://cacm.acm.org/" rel="noopener noreferrer"&gt;https://cacm.acm.org/&lt;/a&gt;  (Accessed: Nov. 25, 2024). &lt;a href="https://cacm.acm.org/opinion/where-code-comes-from/" rel="noopener noreferrer"&gt;Available&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[4] J. von Neumann,  "First draft of a report on the EDVAC" &lt;a href="https://web.mit.edu" rel="noopener noreferrer"&gt;https://web.mit.edu&lt;/a&gt;, John von Neuman, edited by Michael D. Godfrey, IEE Annals of the History of Computing , Vol. 15 No.4, 1993, Pg 27 (Accessed: Nov. 25, 2024). &lt;a href="https://web.mit.edu/STS.035/www/PDFs/edvac.pdf" rel="noopener noreferrer"&gt;Available&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[5] C. F. Moraes, "Understanding Transistors: What They Are and How They Work:A deep dive into the world of transistors and their application in modern electronics" &lt;a href="https://www.wevolver.com/" rel="noopener noreferrer"&gt;https://www.wevolver.com/&lt;/a&gt; Cassiano Ferro Moraes,  (Accessed: Nov. 25, 2024) &lt;a href="https://www.wevolver.com/article/understanding-transistors-what-they-are-and-how-they-work" rel="noopener noreferrer"&gt;Available&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[6] A. Raj "What is a multiplexer circuit and how it works", Aswinth Raj &lt;a href="https://circuitdigest.com/" rel="noopener noreferrer"&gt;https://circuitdigest.com/&lt;/a&gt; (Accessed: Nov. 25, 2024) &lt;a href="https://circuitdigest.com/tutorial/what-is-multiplexer-circuit-and-how-it-works" rel="noopener noreferrer"&gt;Available&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>computerscience</category>
      <category>historyofcomputers</category>
    </item>
    <item>
      <title>What are Github Actions and how to set them up</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Thu, 15 Feb 2024 12:50:39 +0000</pubDate>
      <link>https://dev.to/sumisastri/what-are-github-actions-and-how-to-them-up-4jm7</link>
      <guid>https://dev.to/sumisastri/what-are-github-actions-and-how-to-them-up-4jm7</guid>
      <description>&lt;p&gt;I hadn't dabbled much with GitHub Actions (GHA), until I set up a project using GHA for a project I was working on about 8 months ago.&lt;/p&gt;

&lt;p&gt;GHA workflows are a means to automate code builds in the dev, testing and deployment pipelines and is one of several continuous integration and continuous delivery (CI/CD) tools.&lt;/p&gt;

&lt;p&gt;GHA allows developers to run workflows based on events.&lt;br&gt;
An event is a specific activity in a code repository that triggers a workflow run. &lt;/p&gt;

&lt;p&gt;For example, activity can originate from GitHub when someone creates a pull request (PR), opens an issue, or pushes a commit to a repository.&lt;/p&gt;

&lt;p&gt;You can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository.&lt;/p&gt;

&lt;p&gt;A workflow contains one or more jobs which can run in sequentially or in parallel. &lt;/p&gt;

&lt;p&gt;Each job will run inside its own virtual machine runner, or inside a container. The job has one or more steps that either run a script that you define or run in an action.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up GHA configuration or config files
&lt;/h2&gt;

&lt;p&gt;GHA requires a &lt;code&gt;yml.config&lt;/code&gt; file to configure local actions to a cloud-based platform. These config files need to be in the root directory and placed in a folder which is a &lt;code&gt;.github&lt;/code&gt; folder to be parsed (read).&lt;/p&gt;

&lt;p&gt;In the subfolder of workflows you can determine as many config files as you require. &lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;.github/workflows/config1.yml&lt;/code&gt; outlines the first set of rules to configure. To add multiple configs for different jobs, all you need to do is to append another file in the same folder for these additional config rules -  &lt;code&gt;.github/workflows/config2.yml&lt;/code&gt; - and add the required configs.&lt;/p&gt;

&lt;p&gt;You can also add a template for how the PR should look in a markdown or &lt;code&gt;.md&lt;/code&gt; file, in a &lt;code&gt;pr_template.md&lt;/code&gt; file as well as a similar template to report issues.&lt;/p&gt;
&lt;h2&gt;
  
  
  The difference between issues and PRs
&lt;/h2&gt;

&lt;p&gt;An issue is a discussion topic that does not change the code base. &lt;/p&gt;

&lt;p&gt;A pull request triggers the peer-review process, where other developers review the PR making suggestions to change and sanitise the code base making it cleaner, more efficient and maintainable.&lt;/p&gt;
&lt;h2&gt;
  
  
  The &lt;code&gt;config.yml&lt;/code&gt; file
&lt;/h2&gt;

&lt;p&gt;GHA requires a &lt;code&gt;config.yml&lt;/code&gt; to connect local configurations to the GHA cloud.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is YAML?
&lt;/h2&gt;

&lt;p&gt;Yml, or YAML (an acronym for Y Aint Markup Language), is a human-friendly data serialisation language that is language agnostic. It’s a strict superset of JavaScript Object Notation or JSON, with completely different syntax.&lt;/p&gt;

&lt;p&gt;YAML is lighter and more flexible than JSON and is considered great for config files. JSON is more inflexible and therefore is considered better for data interchanges.&lt;/p&gt;
&lt;h3&gt;
  
  
  Fields in the &lt;code&gt;config.yml&lt;/code&gt; file
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;config.yml&lt;/code&gt; file has the following fields&lt;/p&gt;

&lt;p&gt;-&lt;code&gt;name&lt;/code&gt; - Name for this config - eg: PR Checks&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;on&lt;/code&gt; - Where the GitHub action takes place as in the example in the code below.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;on:
  pull_request:
    branches:
    - name of branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;jobs&lt;/code&gt; - Lists jobs to be run during the process (work flow), in this example, the PR checks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A job is a set of steps in a workflow that is executed on the same runner. &lt;/p&gt;

&lt;p&gt;Each step is either a shell script that will be executed, or an action that will be run. &lt;/p&gt;

&lt;p&gt;Steps are executed in order and are dependent on each other. &lt;/p&gt;

&lt;p&gt;Since each step is executed on the same runner, you can share data from one step to another. &lt;/p&gt;

&lt;p&gt;For example, you can have a step that builds your application followed by a step that tests the application that was built. In the example below are a jobs config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jobs:
test:
name:  job name (eg: Check formatting with Prettier)
runs-on: system (eg: ubuntu-ltest)

&amp;lt;!-- steps: (list of steps, uses, with and run commands) --&amp;gt;

steps: - name: Checkout
uses: actions/checkout@v3 - uses: actions/setup-node@v2
with:
node-version: "16" - name: name of commands that will run (eg: Ensure Prettier Formatting Passes)

&amp;lt;!-- run: these are the commands that will run the code checks --&amp;gt;

run: |
npm ci
npm run prettier-check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to protect your main or master branch with GHA
&lt;/h2&gt;

&lt;p&gt;You can configure a GHA workflow to be triggered when an event occurs in your repository, such as a PR being opened or an issue being created.&lt;/p&gt;

&lt;p&gt;Workflows in Github refer to the process of software development and maintaining control over versions over several iterations and changes to the code base.&lt;/p&gt;

&lt;p&gt;A workflow configures an automated process that will run one or more jobs.&lt;/p&gt;

&lt;p&gt;To maintain this control over version control in Github, you can take actions to protect your key branches. The main branch - formerly known as the master branch, is usually is the production ready-branch. &lt;/p&gt;

&lt;p&gt;Additionally each branch you create can be sanitised with GHA, leading to cleaner and more efficient merges of branches into the main branch from development, integration or test environments.&lt;/p&gt;

&lt;p&gt;These steps allow for continuous integration, of the app into the production branch and continuous delivery. CI-CD, as it is referred to, keeps the main branch ready for release on a continuous basis as well as continuous deployment. New features/ bug-fixes can be released into production and making these features available to customers as soon as they are tested and production-ready reducing time-to-market.&lt;/p&gt;

&lt;p&gt;Workflows are defined by a &lt;code&gt;.yml&lt;/code&gt; file and will run automatically, or they can be triggered manually, or at a defined schedule.&lt;/p&gt;

&lt;p&gt;The most important branch to protect is the main branch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No direct changes can be made to main (best practice)&lt;/li&gt;
&lt;li&gt;Branches must be made from main (the first branch therefore production ready)&lt;/li&gt;
&lt;li&gt;Only named people can merge a branch into main (improve security)&lt;/li&gt;
&lt;li&gt;This can be done by clicking the &lt;code&gt;protect-this-branch&lt;/code&gt; on your repository in GitHub and checking the boxes that you would like depending on what rules you want to set to protect the branch&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to protect sub-branches with GHA
&lt;/h2&gt;

&lt;p&gt;Each branch or sub-branch (from an integration or development branch head) also needs to be protected so that code is sanitised before it reaches the main branch and merged into master.&lt;/p&gt;

&lt;p&gt;Some best practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit history - clean messages and description of reason for change&lt;/li&gt;
&lt;li&gt;PR required before branch can be merged - to discuss and make changes&lt;/li&gt;
&lt;li&gt;Tests written must pass in the PR environment&lt;/li&gt;
&lt;li&gt;A minimum number of people required to review code before merging&lt;/li&gt;
&lt;li&gt;Named people review code&lt;/li&gt;
&lt;li&gt;Security and best practice - the person who writes the code, changes the code and merges the code into master&lt;/li&gt;
&lt;li&gt;Stale branches - changes already made on master pulled into branch and updated before merging&lt;/li&gt;
&lt;li&gt;Conflicts - all merge conflicts to be cleared before merging&lt;/li&gt;
&lt;li&gt;A PR format&lt;/li&gt;
&lt;li&gt;An issues format&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this will help you set up GHA in a project without feeling too intimidated to experiment!&lt;/p&gt;

&lt;p&gt;Photo Credit: Photo by &lt;a href="https://unsplash.com/@campaign_creators?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Campaign Creators&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/man-writing-on-white-board---kQ4tBklJI?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>githubactions</category>
      <category>github</category>
    </item>
    <item>
      <title>What is the difference between monoliths, microservices, monorepos and multirepos?</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Fri, 02 Feb 2024 13:01:51 +0000</pubDate>
      <link>https://dev.to/sumisastri/what-is-the-difference-between-monoliths-microservices-monorepos-and-multirepos-111c</link>
      <guid>https://dev.to/sumisastri/what-is-the-difference-between-monoliths-microservices-monorepos-and-multirepos-111c</guid>
      <description>&lt;h2&gt;
  
  
  What is the difference between monoliths and microservices?
&lt;/h2&gt;

&lt;p&gt;A monolith is a single program that runs the whole application. The program is responsible for maintaining authentication and authorisation (auth), access to Application Programming Interfaces (APIs), UI (User Interface) and even messaging systems like emails, notifications and alarms. All of these services are tightly coupled.&lt;/p&gt;

&lt;p&gt;A microservice has distributed services for different components of the application. This modularises the application and your auth services could be run by one program, while UI run by another. If you have several APIs, each API could have a separate program to run the API calls. This separation of concerns could make the app more performant.&lt;/p&gt;

&lt;p&gt;Microservices require dedicated teams, infrastructure management by infrastructure engineers.&lt;/p&gt;

&lt;p&gt;Serverless is microservices without infrastructure management and the use of functional programming to set-up and provision servers and infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the difference between monorepos and multirepos?
&lt;/h2&gt;

&lt;p&gt;A monorepo is one (mono) repository, or repo, that hosts all services needed for the app. It acts as a single source of truth and allows code sharing and code transparency.&lt;/p&gt;

&lt;p&gt;The repo may contain several projects with different teams working on each submodule in the repo. While these projects maybe different, the relationship between these projects need not be. Indeed, well-defined relationships between these projects could make the use of monorepo make resounding sense.&lt;/p&gt;

&lt;p&gt;A monorepo often has one single package manager - like &lt;a href="https://github.com/lerna/lerna?utm_source=monorepo.tools" rel="noopener noreferrer"&gt;lerna&lt;/a&gt; or &lt;code&gt;pnpm&lt;/code&gt; - that updates all the packages in each repo with a single command in the root repository. &lt;/p&gt;

&lt;p&gt;There are other tools - Bazel from google, Gradle, Nx by Nrwl and Turborepo by Vercel.&lt;/p&gt;

&lt;p&gt;I personally have used both &lt;code&gt;lerna&lt;/code&gt; and &lt;code&gt;pnpm&lt;/code&gt; and have found them effective in managing related code bases with my side projects as well as at work on an enterprise level. &lt;a href="https://sumisastri.github.io/dev-blogs/" rel="noopener noreferrer"&gt;Here is a link to my dev blogs home page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A multirepo (or a polyrepo) code bases distributed across different code repositories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is a monorepo a monolith?
&lt;/h2&gt;

&lt;p&gt;A monolith is an app with related data to this app. While a monorepo may contain a monolith, a monolith is not always in a monorepo.&lt;/p&gt;

&lt;p&gt;A monolith can be broken up into microservices, but a monorepo can only be broken down into individual repositories. &lt;/p&gt;

&lt;p&gt;However, it would be a mistake to apply the use of the monorepo concept simply to colocate code. It goes back to the problem above, which is no well-defined relationship between projects in a repo.&lt;/p&gt;

&lt;p&gt;Another way to understand a monorepo versus a monolith is to define each by what it is not. &lt;/p&gt;

&lt;p&gt;The opposite of a monorepo is a multirepo (or a polyrepo) and the opposite of a monolith is distributed microservices. &lt;/p&gt;

&lt;p&gt;Monoliths have tightly coupled code bases which can only be decoupled by distributed microservices not by polyrepos or monorepos.&lt;/p&gt;

&lt;p&gt;A monorepo is often mistakenly thought to be a monolith - this is when code is colocated with no clear establishment of the relationship or use of such a stratgey. &lt;/p&gt;

&lt;p&gt;And a monolith is often broken down into polyrepos each with their own code base to decouple code. This decoupling of code is best when related code bases are still colocated without being tightly coupled.&lt;/p&gt;

&lt;p&gt;Monorepos can solve some of the challenges faced by a polyrepo approach - inconsistent tooling, duplication of code, a lack of ease in code sharing.&lt;/p&gt;

&lt;p&gt;The section on what &lt;a href="https://monorepo.tools/" rel="noopener noreferrer"&gt;monorepo tools should provide&lt;/a&gt; is useful if you are planning to set up an enterprise-level monorepo.&lt;/p&gt;

&lt;p&gt;A monorepo has constraints just as does a monolith, it is not a silver bullet. &lt;/p&gt;

&lt;p&gt;Version control systems like Git, and code repo hubs like GitHub, do not scale multiple repos in a monorepo particularly well. &lt;/p&gt;

&lt;p&gt;It is also hard for DevOps to move work along from local hosts to integration and production environments. Some of this is attitude to change rather than a true release constraint. Colocated code with clear relationships between the code bases do not mean co-dependency of the code. Each repo can have its own DevOps workflow.&lt;/p&gt;

&lt;p&gt;A combination of monorepos and microservices could solve the challenges of monorepos as monorepos are expensive in terms of data storage. Microservices for the distribution of these data sets across microservices may be one available solution.&lt;/p&gt;

&lt;p&gt;A monolith may have different package managers, different stacks and different sets of data configured in different ways all related to a single application. &lt;/p&gt;

&lt;p&gt;Colocating these packages in a monorepo may make sense in some use cases.&lt;/p&gt;

&lt;p&gt;In general, there are no solutions without trade offs. These articles may be useful in determining how and when your use case fits a monorepo, polyrepo or monolith structure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Further Reading&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The section on &lt;a href="https://sumisastri.github.io/dev-blogs/server-environment/" rel="noopener noreferrer"&gt;data infrastructures and cloud computing&lt;/a&gt; on my personal blog &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.perforce.com/blog/vcs/what-monorepo" rel="noopener noreferrer"&gt;What is a monorepo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://monorepo.tools/" rel="noopener noreferrer"&gt;Monorepo tools&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext" rel="noopener noreferrer"&gt;How google uses a monorepo - case study&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.nrwl.io/misconceptions-about-monorepos-monorepo-monolith-df1250d4b03c" rel="noopener noreferrer"&gt;Misconceptions on monorepos and monoliths&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/@magenta2127/monorepo-vs-multi-repo-vs-monolith-7c4a5f476009" rel="noopener noreferrer"&gt;A demo of how the 3 systems work - monorepos, multirepos and monoliths&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/ableneo/monorepo-pros-cons-tools-2e6f86939be1" rel="noopener noreferrer"&gt;Pros and cons - a blog from Medium&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.thoughtworks.com/en-us/insights/blog/agile-engineering-practices/monorepo-vs-multirepo" rel="noopener noreferrer"&gt;Pros and cons - thoughtworks blog&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@trevorbobyk?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Trevor Bobyk&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/low-angle-photo-of-black-high-rise-concrete-city-buildings-vd_TGp0QiLU?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Git, Git 'heads' and branch management</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Thu, 25 Jan 2024 11:41:47 +0000</pubDate>
      <link>https://dev.to/sumisastri/git-git-heads-and-branch-management-2agh</link>
      <guid>https://dev.to/sumisastri/git-git-heads-and-branch-management-2agh</guid>
      <description>&lt;p&gt;When Linus Torvalds created Git, he considered it nothing but a "stupid content tracker" and named it Git which in British slang means an annoying and infuriating person.&lt;/p&gt;

&lt;p&gt;Git, to its reputation has some infuriating and annoying terminology, and performs certain content tracking tasks in its own way. &lt;/p&gt;

&lt;p&gt;It does benefit you greatly to understand the structure around which Git is built and how it tracks version changes. &lt;/p&gt;

&lt;p&gt;The section in &lt;a href="https://git-scm.com/book/en/v2/Git-Branching-Branch-Management" rel="noopener noreferrer"&gt;docs on branch management&lt;/a&gt; is a the best resource if you get stuck.&lt;/p&gt;

&lt;p&gt;This article is part of a section of blogs on &lt;a href="https://sumisastri.github.io/dev-blogs/github-repo-management/" rel="noopener noreferrer"&gt;GitHub and repo management&lt;/a&gt; on &lt;a href="https://sumisastri.github.io/dev-blogs/" rel="noopener noreferrer"&gt;my dev blogsite&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Photo credit: Photo by &lt;a href="https://unsplash.com/@praveentcom?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Praveen Thirumurugan&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/a-book-and-a-small-figurine-on-a-desk-KPAQpJYzH0Y?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Git heads and the Merkle tree
&lt;/h2&gt;

&lt;p&gt;A basic concept to get right is, that all commits in a Git branch are part of a Merkle tree. &lt;/p&gt;

&lt;p&gt;At the top or the head of the Merkle tree is the trunk or main branch (this branch was formerly called the master branch). The head of the main or original branch and is also known as the origin head.&lt;/p&gt;

&lt;p&gt;From the main branch - or the trunk of the Merkle tree - other branches are created. Each branch that is created now has its own head of the branch or branch head.&lt;/p&gt;

&lt;p&gt;Sub-branches created from these secondary branches then have their own branch heads.&lt;/p&gt;

&lt;p&gt;So the main branch could be the production branch, a sub-branch a development, staging, integration or testing branch. &lt;/p&gt;

&lt;p&gt;You may find it useful to read this section in conjunction with &lt;a href="https://sumisastri.github.io/dev-blogs/github-version-control/part2-dev-workflows/" rel="noopener noreferrer"&gt;the developer workfows&lt;/a&gt; section as tracking changes is part of a systematic tracking of every miniscule change through the development process.&lt;/p&gt;

&lt;p&gt;Each sub-branch points to a branch head, the branch head may point to another branch head until all branches point to the origin head in the main branch.&lt;/p&gt;

&lt;p&gt;To track these complex secondary and tertiary branch changes, the Merkle tree generates serialised hash-tags that uniquely identify all the changes or git commits in a branch. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Merkle_tree" rel="noopener noreferrer"&gt;Wikipedia has a good image and description&lt;/a&gt; that really helps understanding the concept.&lt;/p&gt;

&lt;p&gt;To change the history of a git commit means understanding how each commit fits into this tree-like structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding, commiting, staging and pushing code changes up the Merkle tree
&lt;/h2&gt;

&lt;p&gt;Typically the workflow in a branch follow these steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Making changes- these changes will not be tracked if the changes are not saved&lt;/li&gt;
&lt;li&gt;Saving files - files are saved in the local repo once you are confident that the changes work&lt;/li&gt;
&lt;li&gt;Changes saved and staged - this is done with a &lt;code&gt;git add&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;You can check if your files have been staged with the &lt;code&gt;git status&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;Staged files committed - when you are ready to push your changed code into the version control tracking system you do this with a &lt;code&gt;git commit&lt;/code&gt; and this command takes a &lt;code&gt;-m&lt;/code&gt; flag where you write a commit note - why has the change been made and how does it enhance the feature&lt;/li&gt;
&lt;li&gt;You can check the logs of commits at this stage&lt;/li&gt;
&lt;li&gt;When you are ready to add the files in your local environment to the cloud repo your committed files can be pushed up to the branch with a &lt;code&gt;git push&lt;/code&gt; command this ensures tracked and saved changes are transfered to the repository&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you followed the &lt;a href="https://sumisastri.github.io/dev-blogs/github-version-control/part5-github-repo-set/" rel="noopener noreferrer"&gt;steps to setting up a repository&lt;/a&gt; you have already gone through the process of adding, commiting, staging and pushing code changes to the main branch by adding the &lt;code&gt;README.md&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The command  &lt;code&gt;git add&lt;/code&gt; README.md - adds changes you have made to the branch. You then commit these changes with the command &lt;code&gt;git commit -m "your commit message"&lt;/code&gt; this sends the code to a staging environment.&lt;/p&gt;

&lt;p&gt;At this stage if you check &lt;code&gt;git status&lt;/code&gt; you will see your file in the staging area. &lt;/p&gt;

&lt;p&gt;You can now check the log files with &lt;code&gt;git log&lt;/code&gt; in your main branch you should see &lt;code&gt;commit 123ab456 (HEAD -&amp;gt; main, origin/main, origin/HEAD)&lt;/code&gt;. The number you see in the commit is a Secure Hash Algorithm or SHA, or hashtag, that contains all the data of the commit and points to the top of the Merkle tree or the head of the branch. This is how a commit points to the head of the git branch. The commit with the hash number holds the data of the author, date and the commit message which describes what the change in the version is all about.&lt;/p&gt;

&lt;p&gt;The final command is &lt;code&gt;git push -u origin main&lt;/code&gt; which pushes your code up the branch into the head of the branch - as this is the main branch this is the &lt;code&gt;origin head&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So when you &lt;code&gt;git add &amp;lt;filename&amp;gt;&lt;/code&gt; you add your blobs in your working file into a staging area. When you &lt;code&gt;git commit -m"Commit message"&lt;/code&gt; you save the blob in a log queue.&lt;/p&gt;

&lt;p&gt;Run a &lt;code&gt;git log&lt;/code&gt; and you should see the blob of data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;commit 123ab456
Author: YourName &amp;lt;your email&amp;gt;
Date: Fri Jan 13 15:11:26 2023 +0000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The number you see in the commit is a Secure Hash Algorithm or SHA, or hashtag, that contains all the data of the commit and points to the top of the Merkle tree or the head of the branch.&lt;/p&gt;

&lt;p&gt;The main or master branch is a branch like any other made up of commits. In the case of a main branch, the sub-branches are merged into the main branch.&lt;/p&gt;

&lt;p&gt;You can run &lt;code&gt;git log - oneline&lt;/code&gt; to see your commit messages in a single line with the commit message and the serialised number that uniquely identifies it. The &lt;code&gt;oneline&lt;/code&gt; flag removes the author, date and other information that is contained in the &lt;code&gt;git log&lt;/code&gt; command so that you can see the key information as you build up commits in a branch.&lt;/p&gt;

&lt;p&gt;eg:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;b4ceaa6 (HEAD -&amp;gt; master, origin/master, origin/HEAD) Add regex&lt;/li&gt;
&lt;li&gt;eec4771 Render url conditionally on submit for home page&lt;/li&gt;
&lt;li&gt;0beb61d Fix radio buttons css and custom component&lt;/li&gt;
&lt;li&gt;c1790e4 Debug radio buttons&lt;/li&gt;
&lt;li&gt;3d2fee9 Add radio buttons - initial set up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you run &lt;code&gt;git branch&lt;/code&gt; in a repo, you will see a list of branches with an asterisk against the name of the branch you are working on.&lt;/p&gt;

&lt;p&gt;Eg:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature-Create-data-table&lt;/li&gt;
&lt;li&gt;BugFix-Remove-logo&lt;/li&gt;
&lt;li&gt;Chore-Update-docs&lt;/li&gt;
&lt;li&gt;HotFix-Add-codes-to-db&lt;/li&gt;
&lt;li&gt;* Spike-Experiment-with-libraries&lt;/li&gt;
&lt;li&gt;Feature-Create-admin-user-form&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use &lt;code&gt;git branch -vv&lt;/code&gt; gives you your branch version and the name of its origin head and the SHA related to the branch.&lt;/p&gt;

&lt;p&gt;Eg:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;version-control                4ae7a1d [origin/version-control: ahead 1] Fix nav typos&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these branches will be merged into the main branch and each of these branches will have their own origin head.&lt;/p&gt;

&lt;p&gt;To check your logs try these out&lt;br&gt;
&lt;code&gt;git log --pretty=format:"%cn - %cd %h %s %t"&lt;/code&gt; - a neater version of the log files&lt;/p&gt;

&lt;p&gt;Check the Merkle tree &lt;code&gt;git log --pretty=format:'%h %s' --graph git log --graph --oneline --decorate --all&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Check more details of the commit &lt;code&gt;git cat-file -p HEAD&lt;/code&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Creating your first branch and sub-branch
&lt;/h2&gt;

&lt;p&gt;To create a branch off from the main branch, you use the command &lt;code&gt;git checkout -b &amp;lt;branch-name&amp;gt;&lt;/code&gt; this creates a new branch. This defines your new branch, you can also use the more up to date &lt;code&gt;git switch -b&lt;/code&gt; to create a branch. &lt;/p&gt;

&lt;p&gt;You follow the same steps to add, commit and push code to your branch. Now the branch  that you have created has its own branch head and all the logs will relate to the changes made in this branch.&lt;/p&gt;

&lt;p&gt;Your initial commit will prompt you to set your upstream when you push changes &lt;code&gt;git push - set-upstream origin &amp;lt;branch-name&amp;gt;&lt;/code&gt;, so you run the command and append your branch name to this &lt;code&gt;git push --set-upstream my-new-branch&lt;/code&gt; you only need to do this one to link your branch to your branch head. This branch head will then point to the main branch.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NAMING CONVENTION FOR BRANCHES&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Naming conventions vary from organisation, to organisation but often use these variables to create branch names to manage branch merges into a complex system of interactive and distributed code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Type of code change&lt;br&gt;
feature/&lt;br&gt;
release/&lt;br&gt;
hotfix/&lt;br&gt;
bugfix/&lt;br&gt;
test/&lt;br&gt;
chore/&lt;br&gt;
task/&lt;br&gt;
enhancement/&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ticket number&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repository or workflow name - eg: Forms, ECommerce, etc.,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reason for the creation of the branch&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;eg: Forms-feature-123-add-radio-buttons&lt;/p&gt;

&lt;p&gt;In a personal repo or side project, you can create any name of choice for your branches.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an SHA and how Git uses it to track code changes
&lt;/h2&gt;

&lt;p&gt;A Sha is a hash function which takes an input and produces a 160-bit (20-byte) hash value known as a message digest – typically rendered as a hexadecimal number, 40 digits long. It was designed by the United States National Security Agency, and is a U.S. Federal Information Processing Standard.&lt;/p&gt;

&lt;p&gt;SHA-1 sometimes know as SHA-0 is deprecated/ SHA-2 and SHA-3 are now required for SSL certificates for browsers by the NIST (National Institute of Standards and Technology).&lt;/p&gt;

&lt;p&gt;Version control systems like Git still use SHA-1 to hash versions.&lt;/p&gt;

&lt;p&gt;As you have seen above in the log, the SHA is the commit number - &lt;code&gt;commit 123ab456&lt;/code&gt;. The commits in this branch track the branch origin head and when you merge the branch into master all the changes in the branch track the master branch with its own unique SHA representing the point at which the branch origin head starts tracking the master origin head.&lt;/p&gt;

&lt;h2&gt;
  
  
  Merging branches and SHAs
&lt;/h2&gt;

&lt;p&gt;When you merge master into a branch, all the SHA's merged into master are merged into the branch and track the branch origin head.&lt;/p&gt;

&lt;p&gt;To integrate these changes to the main branch you need to merge these changes. To merge changes you will checkout of your branch to the branch you want to merge code changes. The steps in this example would be&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git checkout main&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git merge my-new-branch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push origin main&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You will see all the updated code and the deltas (differences between the last commit and the new commit) running as the information is hashed.&lt;/p&gt;

&lt;p&gt;Once the algorithm is run you can push and merge code.&lt;/p&gt;

&lt;p&gt;To go back into your working branch you simply checkout of the main branch and check in to your branch with the command &lt;code&gt;git checkout my-new-branch&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a blob refer to in a git branch and how does it relate to origin head?
&lt;/h2&gt;

&lt;p&gt;If the concept of git as a tree of data can be used as an analogy, then the commits are like leaves on the branch. Each leaf is a data object or a blob.&lt;/p&gt;

&lt;p&gt;A blob is an acronym for both basic large object or a binary large object (BLOB) but is spelt as a common noun - blob and referred to as such. While many consider a commit as a file that is being committed, we are merely committing blobs of data to the data tree in the branches of the data tree.&lt;/p&gt;

&lt;p&gt;As we have seen, at the top of every branch is the head. To attach the blob data to the branch the first commit must attach itself to the head and is set to the origin head. Each origin head is unique and at the top of the branch that the blob is attached to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code snapshots an organic way to capture code as it is changed
&lt;/h2&gt;

&lt;p&gt;As you can see Torvalds is actually right, it is quite an easy to understand content tracking system if you know how the Merkle tree is structured.&lt;/p&gt;

&lt;p&gt;Git tracks code up and down the Merkle tree by capturing snapshots of the code as it is changed.&lt;/p&gt;

&lt;p&gt;The commands &lt;code&gt;git add &amp;lt;filename&amp;gt;&lt;/code&gt; adds a file as a snapshot&lt;br&gt;
The command &lt;code&gt;git add .&lt;/code&gt; adds all the files changed to the snapshot&lt;br&gt;
The command &lt;code&gt;git status&lt;/code&gt; shows you the files modified but not saved&lt;br&gt;
The command &lt;code&gt;git commit&lt;/code&gt; adds the files to save to the snapshot&lt;br&gt;
A commit can be a one line commit or a long commit if the change is complex. With the commit you get a serialised number identifying the commit/ the author of the commit and the date and time of the commit.&lt;br&gt;
All commits are merged into the branch it points to until merges work they way up to the origin-head of the main branch&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In summary&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The head of the whole project you are tracking in a repo is set once in the main branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each data blob or commit tracks the head that the branch is tracking via a SHA algorithm that collates all the data and tracks the deltas with a hashed number.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The main branch is exactly like any branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All new branches created are merged into the master branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each new branch has its own unique head to track changes in the sub-branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>git</category>
    </item>
    <item>
      <title>Clean Code - Part 3 how linting works</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Thu, 18 Jan 2024 15:37:58 +0000</pubDate>
      <link>https://dev.to/sumisastri/clean-code-part-3-522b</link>
      <guid>https://dev.to/sumisastri/clean-code-part-3-522b</guid>
      <description>&lt;p&gt;Linting removes fluff from fabrics. That is the original use of the term when threads come off the surface of cloth and you remove them with a linter. This was done for 2 reasons - lint inhaled by workers in a factory resulted in respiratory challenges and artificially inflated the weight of the cloth. Lint had to be removed to clean and pare down the cotton to its real intrinsinc value in terms of commercial sales as well as prevent workers from being impacted by the fluff flying around.&lt;/p&gt;

&lt;p&gt;Code linting was created by a computer scientist at Bell Labs, in the United States, for pretty much similar reasons. Stephen C Johnson, used the term linting code as a linter could trap the bad code and leave it out of the code base while letting the best value code pass through.&lt;/p&gt;

&lt;p&gt;He split code into algorithms that caught the bad code, then the good code that was written then passed through. More of the history of linting can be found on &lt;a href="https://en.wikipedia.org/wiki/Lint_(software)" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do read the references where there is a fascinating bio of Johnson, who was not a computer scientist but a mathematician. &lt;/p&gt;

&lt;p&gt;It makes reading his original paper a pleasure - some extracts from the 12-page document below.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Johnson's original white paper on linting
&lt;/h2&gt;

&lt;p&gt;In his &lt;a href="https://web.archive.org/web/20220123141016/https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.1841&amp;amp;rep=rep1&amp;amp;type=pdf" rel="noopener noreferrer"&gt;original paper&lt;/a&gt;, on why he created a linting package, Johnson says "Lint is a command which examines C source programs, detecting a number of bugs and obscurities. It enforces the type rules of C more strictly than the C compilers. It may also be used to enforce a number of portability restrictions involved in moving programs between different machines and/or operating systems. Another option detects a number of wasteful, or error prone, constructions which nevertheless are, strictly speaking, legal. Lint accepts multiple input files and library specifications, and checks them for consistency."&lt;/p&gt;

&lt;p&gt;The paper has a wealth of information and is written so well that if you have ever (or never) used a code linter, you will understand the philosophy and constraints of linting far better than I can every describe - it is a read worth investing in.&lt;/p&gt;

&lt;p&gt;One of my pet peeves on linting was how strict the rules are. Johnson, refers to this in his paper. The example he uses is a number being converted to a character - possible in JavaScript where 1 or one can be used interchangeably and the program will still run.&lt;/p&gt;

&lt;p&gt;"The programmer obviously has a strong motivation for doing this, and has clearly signaled his intentions. It seems harsh for lint continue to complain about this." he says, "On the other hand, if this code is moved to another machine, such code should be looked at carefully."&lt;/p&gt;

&lt;p&gt;The motivation for linting, therefore arose to make code portable across multiple systems and devices and correcting kinks that may otherwise pass through and block the performance of the software that has been written.&lt;/p&gt;

&lt;p&gt;Understanding this motivation behind the creation of linting, significantly helps the radical acceptance of linting as a tool that helps and defends, rather than blocks and annoys.&lt;/p&gt;

&lt;p&gt;One of the joys of the paper is the sense of humour, and frustration Johnson expresses for the reasons behind his need for a linter ... "(for various stupid reasons!)" - he says, code can be written badly and this "causes fatal conflicts which prevent the proper operation of the program".&lt;/p&gt;

&lt;p&gt;He created a program for linting therefore to detect as many code discrepancies possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shut the lint up
&lt;/h2&gt;

&lt;p&gt;Johnson, in his imitable way, has a section called "shutting lint up" as he says "There are occasions when the programmer is smarter than lint... Some way of communicating with lint, typically to shut it up, is desirable."&lt;/p&gt;

&lt;p&gt;The challenge with lint overrides - a more polite term for shutting your lint up - is a lack of clarity on how to do this with your existing linter. Linters work on certain key word commands and new keywords may not be recognised by code compilers. If you see lint overrides, they still follow the same principles set out in Johnson's paper - they take the form of comments, which require minimal preprocessor changes.&lt;/p&gt;

&lt;p&gt;"The preprocessor just had to agree to pass comments through to its output, instead of deleting them as had been previously done. Thus, lint directives are invisible to the compilers, and the effect on systems with the older preprocessors is merely that the lint directives don’t work," the paper says.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lint override strategies
&lt;/h2&gt;

&lt;p&gt;To override your linter commands, it requires a team to discuss which rules should be ignored and how. Style-guides, like airbnb's linting guide for React, prepackages these rules for you.&lt;/p&gt;

&lt;p&gt;In Part 2, of this series - the ES Lint config for the code editor, Atom - is the config we used when I was at bootcamp with &lt;a href="https://generalassemb.ly/" rel="noopener noreferrer"&gt;GA&lt;/a&gt; and enforces, what GA believed were good styling guiderails for a linter.&lt;/p&gt;

&lt;p&gt;Besides checking style, linters are also excellent tools for finding certain classes of bugs and code inconsistencies that may cause a code run to fail.&lt;/p&gt;

&lt;p&gt;You can find this out before the code runs and compiles and fix it. However, it is not a failsafe solution. You may not be able to fix all problems using a lint. Test other tools than can, and should, be used with a linter as it is not a guaranteed method to catch all code smells.&lt;/p&gt;

&lt;h2&gt;
  
  
  ES Lint for JavaScript
&lt;/h2&gt;

&lt;p&gt;There are different linters for JavaScript, but ES Lint has proved to be very popular as it is more easily configurable. &lt;a href="https://www.thecodecampus.de/blog/eslint-customizable-javascript-linting-tool-1/" rel="noopener noreferrer"&gt;The Codecampus&lt;/a&gt; has a good article on why it believes ES Lint to be a better linter for JavaScript compared to other options in the market. Click the english version when you reach the page which is in German.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.npmjs.com/package/eslint-config-airbnb" rel="noopener noreferrer"&gt;airbnb guide&lt;/a&gt; is most often used for React projects as it pre-writes some rules for linting with the React component library.&lt;/p&gt;

&lt;p&gt;Kwabena Boadu has a great guide to &lt;a href="https://biblicalph.github.io/journal/linting-with-eslint-airbnb-and-prettier.html" rel="noopener noreferrer"&gt;set-up ES Lint with airbnb's style guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Style guides can be opinionated and vary - this is an example of an opionated guide - &lt;a href="https://secure.phabricator.com/book/phabricator/article/arcanist_lint/" rel="noopener noreferrer"&gt;The Arcanist user guide - lint&lt;/a&gt;, but reading them always gives you another perspective and challenges your own ways of thinking, opening you out to possibilities that you may not have considered.&lt;/p&gt;

&lt;p&gt;Many organisations will write in some overrides or make tweaks to prefab style-guides like airbnb. Some style guides can be very strict and some packages methods may fail linting. For example, with the &lt;code&gt;Formik&lt;/code&gt; form library for React, the use of the spread operator, essential to run some methods in the package, fail the airbnb style guide rules.&lt;/p&gt;

&lt;p&gt;Another point worth bearing in mind is your repo structure. Monoliths and monorepos have different ways of configuring ES Lint. A monolith, is a repo that refers to packages and Application Programming Interfaces (APIs) outside the repo for its functioning. A monorepo hosts all packages that it depends on within the same repo. An uber-package manager like &lt;code&gt;pnpm&lt;/code&gt; or &lt;code&gt;lerna&lt;/code&gt; are popular package managers for JavaScript monorepos that use &lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;npm packages&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Whether you are working on a side-project, or an enterprise level app, you will add several &lt;code&gt;npm&lt;/code&gt; packages to help you with the task you hope to complete. Each of these packages are written by different code writers, to different rules.&lt;/p&gt;

&lt;p&gt;While these packages are maintained by the code writers, they are often upgraded, patches added and therefore, you will also need to manage the packages you have used in your code base regularly.&lt;/p&gt;

&lt;p&gt;Do take &lt;a href="https://xkcd.com/1513/" rel="noopener noreferrer"&gt;style-guides and rules&lt;/a&gt; seriously and save the blushes :-)&lt;/p&gt;

&lt;p&gt;Here's a good link to help you understand why &lt;a href="https://www.thecodecampus.de/blog/eslint-customizable-javascript-linting-tool-1/" rel="noopener noreferrer"&gt;linting is a friend not foe&lt;/a&gt;. Click the English version when you get to the page which is in German.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sumisastri.github.io/dev-blogs/clean-code/" rel="noopener noreferrer"&gt;The complete series on my blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@cchabot?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Crystal de Passillé-Chabot&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/clear-spray-bottle-9gzU1mtTzWM?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Clean Code - Part 2 code editors and linting</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Thu, 18 Jan 2024 15:36:30 +0000</pubDate>
      <link>https://dev.to/sumisastri/clean-code-part-2-30jm</link>
      <guid>https://dev.to/sumisastri/clean-code-part-2-30jm</guid>
      <description>&lt;p&gt;There are as many code editors as there are coding languages. Before code editors were developed, Notepad and TextEdit on Macs were used or vim - on the computer terminal.&lt;/p&gt;

&lt;p&gt;Modern code editors come with many extensions to help code writers write and edit code as well as check formatting and syntax. They also provide you with a linter, which is a tool that analyses your code and flags up errors, bugs, syntax mistakes and incorrect code constructs.&lt;/p&gt;

&lt;p&gt;Linting is a programme that can be run to scan your code and keep it clean. As you can imagine, writing lines and lines of code is fatiguing. Nobody writes bad code because they want to. The nature of the beast - code being lines of programmatic instructions that need to be parsed and executed - depends on every indent, comma, spelling and use of a code block being rigid and adhere to rules. This becomes humanly impossible to monitor as you will find if you rely on Notepad, for example as a text editor.&lt;/p&gt;

&lt;p&gt;Linting therefore keeps track of code inconsitencies and is 1 tool to use to keep code that smells at bay. For more, here's &lt;a href="https://www.freecodecamp.org/news/what-is-linting-and-how-can-it-save-you-time/" rel="noopener noreferrer"&gt;a good read from freeCodeCamp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An IDE - Integrated Development Environment - is a code editor on speed.&lt;/p&gt;

&lt;p&gt;Like all things, choosing a code editor is a matter or personal preference and what you are using the code editor for. Code sandboxes provide a good first step to working on code if all you need is to check syntax, errors and if the code works.&lt;/p&gt;

&lt;p&gt;Language specific code editors - like PyCharm - are great for Python. IDE's like Vim and Visual Studio Code, which is what I have migrated to after using Vim, Sublime Text, Scribd and Atom, suits my needs as it has several great extensions and integrates with GitHub seamlessly.&lt;/p&gt;

&lt;p&gt;Sublime Text although good for beginners, is annoying as it interupts your code flow with regular prompts to upgrade to a paid version - which you can ignore when you are using it infrequently, but becomes intrusive when you want to code in peace. For a beginner who has gone beyond the useful functions of CodePen, code sandboxes and Sublime Text, Atom is a good free option to set up shop with and start projects in HTML (Hyper Text Markup Language), CSS and JavaScript.&lt;/p&gt;

&lt;p&gt;This blog is pretty Mac-centric, so a small note - &lt;strong&gt;Commander (cmder)&lt;/strong&gt; allows you to run the same commands on Macs/ Windows/ Linux - and especially good for windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linter set up - ESLint
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install the following eslint packages globally with package managers &lt;code&gt;yarn&lt;/code&gt; or &lt;code&gt;npm&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn global add eslint eslint-plugin-react babel-eslint

npm &lt;span class="nb"&gt;install &lt;/span&gt;eslint eslint-plugin-react babel-eslint

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create an &lt;code&gt;.eslintrc&lt;/code&gt; file - note this is a dotfile
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;open .eslintrc&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 if you want to check pre-set linter rules in a code base&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In your terminal copy and paste - this programs the terminal to open your code editors
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;​&lt;br&gt;
After you should be able to now use VS Code with the command &lt;code&gt;code .&lt;/code&gt; or Atom with &lt;code&gt;atom .&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Vim - the IDE everyone loves to hate
&lt;/h2&gt;

&lt;p&gt;Vim is an editor that is on every Mac terminal by default. All you need to do is type &lt;code&gt;vi&lt;/code&gt; in your Mac terminal and the IDE fires up. Type &lt;code&gt;I&lt;/code&gt; (insert and edit), escape from the command mode. You can quit &lt;code&gt;:q&lt;/code&gt; (quit), &lt;code&gt;:qa&lt;/code&gt; (quit all tabs the quit commands do do not save edits). The command for editing is to write and then quit &lt;code&gt;:wq&lt;/code&gt; (write and quit) or &lt;code&gt;:wqa&lt;/code&gt; (write and quit all tabs).&lt;/p&gt;

&lt;p&gt;Created by Bram Moolenaar in 1991 as an upgrade from the 1970s version, Vim is free, open-source and light-weight. It is easy to use but for the unfamiliar, a bit clunky and the vim commands can be a bit difficult to understand, at first.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vim.rtorr.com/" rel="noopener noreferrer"&gt;This guide&lt;/a&gt; might help. I use Vim, when I have to - for adding configs and some other tasks, but it is not my preferred IDE. However, this is a great guide if you want to check it out - &lt;a href="https://www.codecademy.com/resources/blog/what-is-vim/" rel="noopener noreferrer"&gt;codecademy guide&lt;/a&gt; and &lt;a href="https://www.freecodecamp.org/news/vim-language-and-motions-explained/" rel="noopener noreferrer"&gt;freeCodeCamp&lt;/a&gt; provides a more detailed guide.&lt;/p&gt;
&lt;h2&gt;
  
  
  Atom set up and linting for JavaScript
&lt;/h2&gt;

&lt;p&gt;If you are using Atom as our text editor of choice. It's similar in many ways to Sublime Text, but it has a nice user interface and a lot of 3rd-party plugins and packages that we can use to help us code more efficiently, and hopefully make fewer typos along the way.&lt;/p&gt;

&lt;p&gt;To use and install:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download &lt;a href="https://atom.io/" rel="noopener noreferrer"&gt;Atom&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Copy it into your &lt;code&gt;Applications&lt;/code&gt; folder, and add it to your dock.&lt;/li&gt;
&lt;li&gt;Open Atom and click on the &lt;code&gt;Atom&lt;/code&gt; menu then &lt;code&gt;Install Shell Commands&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Un-check the box on the left hand panel &lt;code&gt;Show Welcome Guide when opening Atom&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type cmd + , to open the preferences. Click on the &lt;em&gt;Themes&lt;/em&gt; tab and set the UI (User Interface) theme &lt;strong&gt;and&lt;/strong&gt; the syntax theme to &lt;em&gt;One Light&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;em&gt;Core&lt;/em&gt; panel, make the following change:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exclude VCS Ignored Paths&lt;/strong&gt; - &lt;em&gt;uncheck&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;em&gt;Editor&lt;/em&gt; panel, make the following changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Show Indent Guide&lt;/strong&gt; – &lt;em&gt;check&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show Invisibles&lt;/strong&gt; - &lt;em&gt;check&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tab Type&lt;/strong&gt; &amp;gt; &lt;em&gt;soft&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Copy and paste the following command into the terminal - this installs options to edit, clean and lint your code keeping it clean without manual intervention
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apm &lt;span class="nb"&gt;install &lt;/span&gt;auto-indent atom-ternjs file-icons language-ejs language-babel linter linter-erb linter-csslint linter-eslint linter-js-yaml linter-ruby open-in-browser ruby-block pigments sublime-style-column-selection
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;​Atom has a package called atom-linter that we can configure to work with eslint to check our code &lt;em&gt;as we type&lt;/em&gt;. We'll set up this next. We're going to define a set of rules for &lt;code&gt;eslint&lt;/code&gt; to use. From the terminal, run the following command:&lt;br&gt;
​&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;atom ~/.eslintrc
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;You might come across some blue notifications on the right hand side, just say &lt;code&gt;yes&lt;/code&gt; to all of the installations. Cut and paste the following text into the file you just opened in Atom. This JavaScript Notation file (&lt;code&gt;.json&lt;/code&gt; file) runs the linter's scanning and programming function through your code base.&lt;br&gt;
​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"browser"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"commonjs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"es6"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"plugins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"extends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"eslint:recommended"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"plugin:react/recommended"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"globals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"angular"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"$"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"parser"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"babel-eslint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"parserOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"sourceType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ecmaVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ecmaFeatures"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"jsx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"brace-style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"camelcase"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"never"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"comma-dangle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"never"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"func-call-spacing"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"never"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"eqeqeq"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"warn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"indent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"SwitchCase"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"key-spacing"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"beforeColon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"no-console"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"off"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"no-fallthrough"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"warn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"prefer-const"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"quotes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"single"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"semi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"never"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"react/prop-types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now &lt;strong&gt;save the file&lt;/strong&gt; in Atom with cmd + S.&lt;br&gt;
​&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keeping your code indented is so important and because of this we are going to give you a shortcut to automaticly indent all code in the file you are viewing.
​
Whilst on atom:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;click on "Atom" in the topbar and select &lt;code&gt;Keymap...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add this to the bottom of the file&lt;/li&gt;
&lt;li&gt;This yaml (&lt;code&gt;.yml&lt;/code&gt; file) is a lightweight script that formats your editor's indenting functionality for your
​
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;atom-text-editor"&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cmd-shift-r"&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;editor:auto-indent"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save file and cmd + shift + R will be the shortcut to auto indent!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning up and linking set up&lt;/strong&gt; Back in Atom's preferences&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the packages tab and search for the &lt;code&gt;linter-eslint&lt;/code&gt; and click on "Settings" for this package.&lt;/li&gt;
&lt;li&gt;Find where it says &lt;code&gt;.eslintrc Path&lt;/code&gt;, set it to &lt;code&gt;~/.eslintrc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Make sure the box for &lt;code&gt;Disable when no ESLint config is found&lt;/code&gt; is &lt;strong&gt;unchecked&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Global Node installation Path&lt;/code&gt; to &lt;code&gt;/Users/username/.config/yarn/global&lt;/code&gt;, replacing &lt;code&gt;username&lt;/code&gt; with your username. If you are not sure what that is ask your instructor for help.&lt;/li&gt;
&lt;li&gt;Check the &lt;code&gt;Use global ESLint installation&lt;/code&gt; checkbox
​
&lt;strong&gt;Now quit Atom&lt;/strong&gt; and you are ready to use it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  VS Code and my favourite extensions
&lt;/h2&gt;

&lt;p&gt;​If you are using VS Code as our text editor of choice and a mac, you can download it and read the&lt;br&gt;
&lt;a href="https://code.visualstudio.com/docs/setup/setup-overview" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;. Once you have used Atom, you will find VS Code easy to use and intuitive. Some useful &lt;a href="https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf" rel="noopener noreferrer"&gt;keyboard shortcuts for reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some quick ones that are handy cmd plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a selects all + c copies + x cuts + v pastes + z undo&lt;/li&gt;
&lt;li&gt;b toggle open and close side bar with file names&lt;/li&gt;
&lt;li&gt;d - find next match of a word - word by word&lt;/li&gt;
&lt;li&gt;f finds a word at file level&lt;/li&gt;
&lt;li&gt;f2 finds and selects all occurances of the word and you can change all occurances&lt;/li&gt;
&lt;li&gt;p opens a new file allows you to switch between files double click the tab to keep it permanantly docked in the tab&lt;/li&gt;
&lt;li&gt;k opens a preview mode tab hit enter allows you to keep it permanently docked in the tab you have opened&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;alt plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;arrow up moves selected line of code up the arrow down moves the code to the line below&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;alt plus shift plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;arrow up or down duplicates the code line selected 1 line up or down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;cmd plus shift plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;e - go to explorer&lt;/li&gt;
&lt;li&gt;f - go to finder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;control plus shift plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;g goes to the files you have changed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;cmd plus option plus&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;s saves all open files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you use these commands often enough, they become a part of your DNA and you will do it without thinking :-)&lt;/p&gt;

&lt;h3&gt;
  
  
  VS Code extensions - my go to list**
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prettier - code formatting&lt;/li&gt;
&lt;li&gt;VSCode pdf - save pdf's and read them in vscode&lt;/li&gt;
&lt;li&gt;Bracket pair colorizer - colors pairs of brackets to identify code blocks&lt;/li&gt;
&lt;li&gt;Live Server - opens html files serves it on a real port&lt;/li&gt;
&lt;li&gt;Live Share - share code and collaborate&lt;/li&gt;
&lt;li&gt;Markdown pdf - markdown for pdf's&lt;/li&gt;
&lt;li&gt;MPEG-4 Preview - saves mp4 files that you can view in the IDE&lt;/li&gt;
&lt;li&gt;Prettier - cleans up formatting&lt;/li&gt;
&lt;li&gt;Thunder client - great for Application Programming Interfaces (APIs) and a substitute for postman so that you can work on APIs and check data within the IDE&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VS Code extensions - how long is a peice of string
&lt;/h3&gt;

&lt;p&gt;There are a ton of extensions which can be used - I have tried some of these and removed them as I don't need them on a day-to-day basis. You will develop your own list of faves too...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced new file - allows you to run &lt;code&gt;&amp;gt;new file&lt;/code&gt; gives you a drop-down selector to show file paths you can put the new fiel in&lt;/li&gt;
&lt;li&gt;Better comments - if you add comments highlights it in different colors&lt;/li&gt;
&lt;li&gt;Quokka - javascript playground/ scratchpad/ sandbox&lt;/li&gt;
&lt;li&gt;Polacode - generates snippets to share in other files&lt;/li&gt;
&lt;li&gt;Bookmarks - use it to mark blocks of code and toggle between codeblocks in files&lt;/li&gt;
&lt;li&gt;Cloak - hides .env files and api keys/ passwords&lt;/li&gt;
&lt;li&gt;CSS Peek - checks css code by class and id&lt;/li&gt;
&lt;li&gt;Debugger for Chrome - for html and vanilla javascript&lt;/li&gt;
&lt;li&gt;DotEnv - different colors for different variables&lt;/li&gt;
&lt;li&gt;EditorConfig for VSCode - team formating of code&lt;/li&gt;
&lt;li&gt;ES7 React/Redux/GraphQL/React-Native snippets - code snippets for React-Redux
When to use code snippets (&lt;a href="https://www.freecodecamp.org/news/definitive-guide-to-snippets-visual-studio-code/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/definitive-guide-to-snippets-visual-studio-code/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;FaunaDB - for databases&lt;/li&gt;
&lt;li&gt;Kite - ai code intellisense&lt;/li&gt;
&lt;li&gt;Import cost - file sizes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While this is only a small sample, if you want to know more about how to choose and editor and what's out there, &lt;a href="https://www.hostinger.com/tutorials/best-code-editors" rel="noopener noreferrer"&gt;Hostinger&lt;/a&gt; has a good summary that is worth checking out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sumisastri.github.io/dev-blogs/clean-code/" rel="noopener noreferrer"&gt;The complete series on my blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@cchabot?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Crystal de Passillé-Chabot&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/clear-spray-bottle-9gzU1mtTzWM?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Clean Code - Part 1</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Thu, 18 Jan 2024 15:33:41 +0000</pubDate>
      <link>https://dev.to/sumisastri/clean-code-part-1-7h3</link>
      <guid>https://dev.to/sumisastri/clean-code-part-1-7h3</guid>
      <description>&lt;h2&gt;
  
  
  What is clean code?
&lt;/h2&gt;

&lt;p&gt;There are some that are of the view that if code works then does it matter if it is clean. It works right?&lt;/p&gt;

&lt;p&gt;But code written any how, in any way means that someone else reading our code - or even our future selves - may not understand the code when we see it again. It becomes a cognitive waste of energy trying to decipher it.&lt;/p&gt;

&lt;p&gt;There is a value and effort put into writing code therefore it stands to reason that some value and effort must be derived from reading it, running it and maintaining it.&lt;/p&gt;

&lt;p&gt;Even if clean code is written just as a matter of self-development, that is in my opinion, a goal worth achieving. It gives you mastery over the code you have written, therefore an ability to transfer that knowledge. It provides autonomy, self-sufficiency and the confidence, perhaps to write new and better code. There is a sense of purpose and a clarity of direction writing code that you and your team are proud of, and of course if it does not work, it isn't code. So it must work but also work hopefully elegantly and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean code benefits organisations
&lt;/h2&gt;

&lt;p&gt;Even if clean code does not benefit the individual code writer, surely, clean code is important as it provides organisations with code that they can sell to their clients as it is both reliable and predictable.&lt;/p&gt;

&lt;p&gt;Refactoring code, writing it better, removing legacy and tech debt makes existing customers trust the software they are using and inspires hopefully both trust and confidence.&lt;/p&gt;

&lt;p&gt;From a commercial point of view renewals and retaining customers is doubly important - long-term revenue - compared to new customers where the costs of acquisition are high.&lt;/p&gt;

&lt;p&gt;Today, tech is everywhere. AI is no longer the realm of geekdom. Computers, personal laptops, wearables, phones, tablets - there is software everywhere. In weighing machines, slot machines, teller counters, CCTV cameras, doorbells, washing machines - tech is now both useful and intrusive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code impacts lives so the cleaner code the better
&lt;/h2&gt;

&lt;p&gt;I am not particularly keen on virtue signalling or talking about the moral responsibility of writing clean code. I am interested in the side-effects of writing bad code - law-suits, repair costs, product recalls.&lt;/p&gt;

&lt;p&gt;Non-tech professionals will blame code writers for badly written code - look at the Volkswagen emissions case, or the privacy intrusions of search engines and social media software.&lt;/p&gt;

&lt;p&gt;Scapgoating of dev teams and individual code writers have a terrible impact which could be loss of livelihood, reputation and worse - fines and imprisionment.&lt;/p&gt;

&lt;p&gt;Keeping code clean therefore becomes an armour a sword of protection. And it does not have to be difficult.&lt;/p&gt;

&lt;p&gt;For organisations it is a high cost and training and development of tech teams is as much an investment in your product as other research and development investments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design and clean code go hand-in-hand
&lt;/h2&gt;

&lt;p&gt;Working to a robust architectural design provides code with a strong foundation. To the architect, lies the task of figuring out if is the structure intuitive and the patterns clear. For the code writer, if the architecture is not well defined talk with other people in the team and work on a shared understanding of the design-patterns you will use as a team.&lt;/p&gt;

&lt;p&gt;Often, as a code writer, you are writing on a body of work that already exists. It becomes easy to iterate already established patterns. Search for a good example you can follow: webhook, service, unit tests, integration tests, etc., there will be several your fellow code writers have invested good time writing. Follow their lead.&lt;/p&gt;

&lt;p&gt;Often, unfamiliar code becomes an excuse to describe something as high effort. Let it serve as a signal that you need to invest in learning the approach. Work on a side project, check the code out, make your mistakes in a sandbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  All code needs to be maintained, clean code needs less maintenance
&lt;/h2&gt;

&lt;p&gt;Code smells appear when code rots. Every line of code that you write should be read multiple times as once written, code already begins the decay process. My checklist in no particular order:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove commented code (or anything similar, debuggers, etc.)&lt;/li&gt;
&lt;li&gt;If something is not in spec leave it out&lt;/li&gt;
&lt;li&gt;Check that you have added tests&lt;/li&gt;
&lt;li&gt;Think about code dependencies&lt;/li&gt;
&lt;li&gt;Work on tech debt and legacy to see if you can update and renew your code base&lt;/li&gt;
&lt;li&gt;Heavily coupled or unclear code is very difficult to change&lt;/li&gt;
&lt;li&gt;Value objects over arrays - they make the interface more obvious/ help to keep them cleaner&lt;/li&gt;
&lt;li&gt;Avoid private methods as they are difficult to test, and could hide complex logic&lt;/li&gt;
&lt;li&gt;Write better functions&lt;/li&gt;
&lt;li&gt;Is there too much bloat in your code - is there something you can refactor that works more efficiently?&lt;/li&gt;
&lt;li&gt;Contra-intuitively to the above, if 2 lines makes your code clearer, maybe 2 lines is better than 1 line - don't be a slave to writing DRY (don't repeat yourself) code&lt;/li&gt;
&lt;li&gt;Write better variable names - 'n' - finally what is 'n' ? Any number of things if you come back and try to decipher it or someone else needs to decipher it - waste of cognitive energy isn't it easier to understand a variable that is &lt;code&gt;let number = () =&amp;gt; {}&lt;/code&gt; Instead of &lt;code&gt;n&lt;/code&gt; which could mean infinity as well&lt;/li&gt;
&lt;li&gt;Think about the packages/ libraries you add - are they performant, well-maintained, do they compile well, are issues reported and fixed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Uncle Bob says ...
&lt;/h2&gt;

&lt;p&gt;Much of this blog is inspired by watching Uncle Bob's, &lt;a href="https://en.wikipedia.org/wiki/Robert_C._Martin" rel="noopener noreferrer"&gt;also known as Robert C Martin&lt;/a&gt;, YouTube videos when I need inspiration. Here are some of my key take outs from what he says in simple terms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;is your code easy to understand&lt;/li&gt;
&lt;li&gt;does your brain relax when you read the code&lt;/li&gt;
&lt;li&gt;does it read like good prose&lt;/li&gt;
&lt;li&gt;does it step up from most important first - code execution - to least important last - gives parser place to exit quick&lt;/li&gt;
&lt;li&gt;does the way the function you write start with simple first to complex later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=7EmboKQH8lM" rel="noopener noreferrer"&gt;For those who don't know this industry maverick check this video out&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am sure this conversation will grow. I am sure there will be many disagreements. There will definitely be divided opinions about what is clean code.&lt;/p&gt;

&lt;p&gt;That's great! Let's start talking more about it. And for sure, doing more as a result of all of the talk. So let's keep it clean (both the talk and the code!).&lt;/p&gt;

&lt;p&gt;Uncle Bob may disagree - as he says "let's not ship sh$@!X%".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://sumisastri.github.io/dev-blogs/clean-code/" rel="noopener noreferrer"&gt;The complete series on my blog&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Or to go to &lt;a href="https://dev.to/sumisastri/clean-code-part-2-30jm"&gt;Code editors and linting - part 2 of clean code click here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For &lt;a href="https://dev.to/sumisastri/clean-code-part-3-522b"&gt;How linting works - part 3 in this series click this link&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@cchabot?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Crystal de Passillé-Chabot&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/clear-spray-bottle-9gzU1mtTzWM?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>History of the Web - Part 2</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Wed, 17 Jan 2024 14:00:14 +0000</pubDate>
      <link>https://dev.to/sumisastri/history-of-the-web-part-2-nc2</link>
      <guid>https://dev.to/sumisastri/history-of-the-web-part-2-nc2</guid>
      <description>&lt;h2&gt;
  
  
  Enter the browser with the JavaScript dragon
&lt;/h2&gt;

&lt;p&gt;With the introduction of JavaScript to the &lt;a href="https://en.wikipedia.org/wiki/World_Wide_Web" rel="noopener noreferrer"&gt;World Wide Web&lt;/a&gt;, or the Web, &lt;a href="https://brendaneich.com/" rel="noopener noreferrer"&gt;Brenden Eich&lt;/a&gt; its creator and co-founder of &lt;a href="https://www.mozilla.org/en-GB/firefox/" rel="noopener noreferrer"&gt;Mozilla&lt;/a&gt;, did not anticipate the browser wars and the host of controversy that JavaScript brought to the rapid growth of the Web and mobile apps.  &lt;/p&gt;

&lt;p&gt;At a 2-day full-stack conference hosted by &lt;a href="https://stackskills.com/" rel="noopener noreferrer"&gt;Stack Skills&lt;/a&gt;, speakers reflected on the good-old-days of Web 1.0 and the risks that the introduction of JavaScript created, if you are interested in this section read &lt;a href="https://sumisastri.github.io/dev-blogs/history-of-the-web/part1-web1.0/" rel="noopener noreferrer"&gt;Part 1 - A love letter to the personal website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While HTML (Hyper Text Markup Language) is just text and CSS (Cascading Style Sheets) enhanced a web page with HTML attributes for layouts, design, colour and animations, JavaScript took web-development to another level of interactivity.&lt;/p&gt;

&lt;p&gt;JavaScript allows the user to interact with every HTML element and change its behaviour. This event-driven behaviour is based on the users’ interaction with the Web - mouse and key movements, clicks on the page - offering a whole new way of looking at web data and analytics.&lt;/p&gt;

&lt;p&gt;Web 1.0 from static sites, with text and some styling but with limited user interaction, transformed and JavaScript allowed users to now interact with pages - click buttons, see sliders and animated picture galleries, play interactive games.&lt;/p&gt;

&lt;p&gt;However Web 2.0 is not just about JavaScript that the user can interact with, it also about JavaScript accessing DBs (databases) with Application Programming Interfaces (APIs).&lt;/p&gt;

&lt;p&gt;Every hardware developer wanted a JavaScript engine to parse the Web documents so that users who were adopting personal computers and interacting with the Web could have a better user-experience (UX).&lt;/p&gt;

&lt;p&gt;Microsoft kicked the ball into play with Internet Explorer, google followed with Chrome, Apple with Safari and Mozilla with Firefox. Many other niche market players emerged, made inroads into the market, many got burnt and/ or suffered decay.&lt;/p&gt;

&lt;p&gt;UX design became more important and JavaScript frameworks like google's AngularJS, or Facebook's user interface library called ReactJS,  burgeoned and grew to enhance the developer experience.&lt;/p&gt;

&lt;p&gt;The real disruptor was mobile technologies with the emphasis on technologies that supported mobile-app development.&lt;/p&gt;

&lt;p&gt;Given this shift from web applications to mobile applications, Bruce Lawson’s look under the hood of the browser wars with a talk called &lt;em&gt;"Internet Explorer - Rest in Peace (RIP) or Be Right Back (BRB)?"&lt;/em&gt;, explored the history of the browser in the evolution of the world wide web.&lt;/p&gt;

&lt;p&gt;While the browser wars raged in the 1990s, today Safari has been taken to task for not using Chrome, Internet Explorer, Firefox, or any other browser on its mobile devices, he said.&lt;/p&gt;

&lt;p&gt;Apple phones and i-pads mask these browsers and use Safari, which users see and interact with. However, the UX with Safari is so poor that users often prefer Android mobile devices. A plurality of browsers perform so much better on speed and efficiency, Lawson said. As of 2025, Apple in Europe under the Digital Act will be obliged to change this anti-competitive behaviour, he added.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm going to the garden to eat bugs - big ones, fat ones, round ones, curly ones
&lt;/h2&gt;

&lt;p&gt;Browsers, and JavaScript with all its avatars, also bring with them the joy of bugs.&lt;/p&gt;

&lt;p&gt;Gabriel Manor-Leichtman’s in-depth look at browser developer tools to help debugging code and network performance issues was worth reviewing once again for its rich content and useful guidelines on the online playback of Stack Skills conference package.&lt;/p&gt;

&lt;p&gt;Loosely typed JavaScript, and its bug-ridden code, can partially be tackled with the stricter TypeScript superscript.&lt;/p&gt;

&lt;p&gt;TypeScript, has uses well beyond the frontend, as Ryan Cormack from the online card and gifts site, Moonpig, pointed out. Using Amazon Web Services (AWS) which compiles down to Cloud Formation, you can move JavaScript code and embedded data from the frontend to the backend of apps with TypeScript lambda functions.&lt;/p&gt;

&lt;p&gt;This does not come without its trade-offs, Cormack said, you need to write imperative (versus declarative) code if you use YAML (Yet Another Markup Language - also known as YML) compilation, deal with constant code updates and have at least a foundational knowledge of AWS, which has its own learning curve.&lt;/p&gt;

&lt;p&gt;A way through this maze of JavaScript options is to choose the option of creating micro-frontends to scale and deploy complex apps, Teresa Wu said, demonstrating how the Chase App worked. &lt;/p&gt;

&lt;p&gt;Chase’s banking app looked the customer journey from onboarding through to off-boarding with each segment of the UX built with strategic intent and collaboration but released in operational isolation to speed up the process of development and ensure each moving part of the app worked efficiently.  &lt;/p&gt;

&lt;p&gt;Micro frontends, Wu said, helps modularisation. For example, customer navigation through the app can be tested as the journey changes. This offers flexibility where it is needed. Navigation (the main - entry point for the customer) is wrapped in routine logic but when authentication of the user is required, authentication logic and a more centralised logic is used. This works, like a proxy, Wu said, where the two sets of logic reference each other. All of this helps scaling web and mobile apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing and data availability challenges with JavaScript
&lt;/h2&gt;

&lt;p&gt;Testing also becomes an imperative with the introduction of JavaScript and the multi-device nature of application development.  &lt;/p&gt;

&lt;p&gt;Going through the testing pyramid, Rob Richardson, talked about the need to create a testing strategy where fewer end-to-end or integration tests were written with thought and intent while several unit tests constantly tested code blocks.  &lt;/p&gt;

&lt;p&gt;Code testing is also more complex as the developer shifts through environments - developer, staging, integration, and production with different tests required at each of these stages of code build. Infrastructure has also to be taken into consideration. &lt;/p&gt;

&lt;p&gt;Availability of data also becomes a challenge with testing. Due to higher levels of regulation on data-security, not all developers see all the data. With data not visible, it becomes difficult to do a proper root-cause analysis and reproduce a bug locally. It is also not easy to define how much data you need to see to test the bug. With regulation preventing access to the amount of data a developer has access to loggers and tracing tools as well as remote debugging are options to live or local debugging, Richardson said.&lt;/p&gt;

&lt;p&gt;Specifically testing for mobile devices and browsers on different platforms is part of the integration testing that Web 2.0 developers need to consider.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fun, fun, FWAs?
&lt;/h2&gt;

&lt;p&gt;A little left field was the option to build Functional Web Apps (FWAs) with Web Components proposed by Simon McDonald. Web Components are APIs to different web platforms that help you create custom HTML tags and design your app pages.&lt;/p&gt;

&lt;p&gt;FWAs solve the challenge that developers face with Dynamic Web Apps (DWAs), JAM (JavaScript, APIs and Markup) stacks and PWAs (Progressive Web Apps), McDonald said. Markup refers to the styling from CSS stylesheets that marks up HTML text blocks helping in layouts and organising chunky blocks of text.&lt;/p&gt;

&lt;p&gt;DWAs consume APIs from external sources, the complex modern system of libraries and tooling services that they bring, result in the constant converting of modern JavaScript code back into vanilla JavaScript that browsers understand.&lt;/p&gt;

&lt;p&gt;DWAs require debugging with source maps for multiple branches of code as well as maintenance of versions of code updates with patches and breaking changes.&lt;/p&gt;

&lt;p&gt;All this makes for a poor customer experience (CX), as well as developer experience (DX). Background jobs like cron jobs are clunky and infrastructure as code may solve some of these challenges, but not all.&lt;/p&gt;

&lt;p&gt;The JAM-stack which relies on HTML, CSS &amp;amp; JavaScript mashed-up into one artefact has its own trade-offs, McDonald said.These are slow builds, not really a full-stack - the rehydration from API calls to the frontend is slow and not always secure.&lt;/p&gt;

&lt;p&gt;PWAs are built on HTML, CSS and JavaScript rather than traditional mobile-app languages like Swift or Kotlin. They are accessed through a browser. To enhance the speed of dowloading PWAs use pre-processors to format and minify code. A pre-processor, takes out all the empty spaces in a code block (minification) and formats newer versions of JavaScript to a version that browsers recognise.&lt;/p&gt;

&lt;p&gt;When a website is created a tree of all the elements called the DOM (Document Object Model) is built. To shake out the fluff from every branch of this DOM-tree, pre-processors have to delve into a complex mesh of HTML elements. A process called layout-thrashing or DOM-tree shaking. With complex nested DOMs - as more pages and complex layouts, API calls are made, this process of layout-thrashing and DOM-tree shaking can become a headache.&lt;/p&gt;

&lt;p&gt;FWAs, on the other hand, with their HTML first approach offers dynamic personalisation and assistive technologies built in by default.&lt;/p&gt;

&lt;p&gt;FWAs are built using functions as code, programmed on the server using managed DBs making deployments more efficient.&lt;/p&gt;

&lt;p&gt;With this enhanced control comes a better CX, inclusivity, speed and even a better DX with less maintenance and breaking changes from versions of code updates.&lt;/p&gt;

&lt;p&gt;The cons are that code must be loaded in memory in the machine and this is limiting in terms of the time taken to parse the code and then run it. Not all DBs are able to fill this requirement.&lt;/p&gt;

&lt;p&gt;Emergent DBs - Cosmos (Azure), DynamoDB (AWS), PlanetScale, a relational DB or Fauna and document-style DB (independents not linked to any big cloud provider) - fill this gap, he said.&lt;/p&gt;

&lt;p&gt;Another challenge with FWAs is infrastructure as code is complex, as Cormack highlighted earlier in the day. DBs are often linked to a cloud-based service you must decide on the cloud service provider you are going to use and go all in with AWS/ Google/ Azure.&lt;/p&gt;

&lt;p&gt;This all is may not be the optimal option for some organisations. The BBC has gone down this route and for more inspiration, McDonald pointed to resources &lt;a href="https://begin.com/" rel="noopener noreferrer"&gt;Begin&lt;/a&gt; to explore the option of FWA suitability.&lt;/p&gt;

&lt;p&gt;As a total aside, &lt;a href="https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q" rel="noopener noreferrer"&gt;fun-fun functions&lt;/a&gt; is a great YouTuber - sadly taking a sabbatical but a great Web 2.0 site to checkout and total inspiration for the subhead I chose for this section...he will be more sadly missed than Web 1.0 imho :-).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sumisastri.github.io/dev-blogs/" rel="noopener noreferrer"&gt;My dev blogs home page&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://fossbytes.com/who-is-brendan-eich/" rel="noopener noreferrer"&gt;Fossbytes - Who is Brenden Eich&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://fwa.dev/" rel="noopener noreferrer"&gt;What are FWAs (Functional Web Apps)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://coherent-labs.com/posts/web-components/" rel="noopener noreferrer"&gt;What are web components&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ramotion.com/blog/dynamic-web-application-development/" rel="noopener noreferrer"&gt;What are DWAs (Dynamic Web Apps)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://jamstack.org/what-is-jamstack/" rel="noopener noreferrer"&gt;What is the JAM-Stack&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.codecademy.com/resources/blog/what-is-a-progressive-web-application/" rel="noopener noreferrer"&gt;What are PWAs (Progressive Web Apps)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.who.int/news-room/fact-sheets/detail/assistive-technology" rel="noopener noreferrer"&gt;What are assistive technologies&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>History of the Web - Part 1</title>
      <dc:creator>SumiSastri</dc:creator>
      <pubDate>Wed, 17 Jan 2024 13:54:55 +0000</pubDate>
      <link>https://dev.to/sumisastri/history-of-the-web-part-1-85a</link>
      <guid>https://dev.to/sumisastri/history-of-the-web-part-1-85a</guid>
      <description>&lt;p&gt;While the internet has been around for longer than the the World Wide Web, or the Web, in today's day and age the Web is changing so rapidly.&lt;/p&gt;

&lt;p&gt;It is worth taking a look back into where it all started.&lt;/p&gt;

&lt;h2&gt;
  
  
  A love letter to the personal website
&lt;/h2&gt;

&lt;p&gt;If we thought Web 1.0 was dead, a 2-day &lt;a href="https://stackskills.com/" rel="noopener noreferrer"&gt;Stack Skills&lt;/a&gt; conference in London (2022), considered it fun to resurrect that dead thought from the grave. The conference focused on the history of the Web, Web 1.0, Web 2.0 and challenges ahead for Web 3.0.&lt;/p&gt;

&lt;p&gt;Full disclosure right up front.  &lt;/p&gt;

&lt;p&gt;This site is the result of the influence that the speakers had on my thought processes as an emerging developer.&lt;/p&gt;

&lt;p&gt;Topics covered&lt;/p&gt;

&lt;p&gt;What is the difference between Web 1.0, 2.0 and 3.0 ?&lt;/p&gt;

&lt;p&gt;Dangers of the cancel culture for Web 3.0&lt;/p&gt;

&lt;p&gt;Pure CSS Games - hey no blinking JavaScript&lt;/p&gt;

&lt;p&gt;Assistive technologies - why Web 1.0 worked better with just HTML&lt;/p&gt;

&lt;p&gt;Additional Resources&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the difference between Web 1.0, 2.0 and 3.0 ?
&lt;/h2&gt;

&lt;p&gt;The theme of the 2-day conference, was to take us through a brief history of the &lt;a href="https://en.wikipedia.org/wiki/World_Wide_Web" rel="noopener noreferrer"&gt;World Wide Web&lt;/a&gt;, or the Web, starting with HTML (Hyper Text Markup Language), reminding us that a combination of HTML and CSS (Cascading Style Sheets) are perfect tools to build any website. All that JavaScript added was the browser wars and bugs...&lt;/p&gt;

&lt;p&gt;Here is a brief time-line of the transition points between the 3 versions of the Web:&lt;/p&gt;

&lt;p&gt;1980s and 1990s - The Web, which was invented by collaborators, &lt;a href="https://www.cailliau.org/Welcome.html" rel="noopener noreferrer"&gt;Robert Cailliau&lt;/a&gt; and &lt;a href="https://www.w3.org/People/Berners-Lee/" rel="noopener noreferrer"&gt;Tim Berners-Lee&lt;/a&gt; in the 1980s, was conceived as a document sharing amongst academics, was built on HTML, with URLs (Unique Resource Locators) - that linked the documents and gave academics access to scientific research.&lt;/p&gt;

&lt;p&gt;Web 1.0 started as a document storage and sharing experiment at a particle physics organisation, &lt;a href="https://home.cern/" rel="noopener noreferrer"&gt;CERN&lt;/a&gt;, the introduction of CSS in the 1990s, by &lt;a href="https://www.wiumlie.no/en" rel="noopener noreferrer"&gt;Håkon Wium Lie&lt;/a&gt;, ideas which he developed with &lt;a href="https://www.w3.org/People/Bos/" rel="noopener noreferrer"&gt;Bert Bos&lt;/a&gt;, provided more opportunities for pepping-up the typewriter-style printed page that was a bit dull and difficult to read.&lt;/p&gt;

&lt;p&gt;Sophie Koonin's introductory talk, &lt;em&gt;“A love letter to the personal website,”&lt;/em&gt; was a tribute to the loss of the personal websites of the 1990s - websites for the creative pleasure of the individual not for profit of conglomerates.&lt;/p&gt;

&lt;p&gt;Kooky sites like &lt;a href="https://sadgrl.online/" rel="noopener noreferrer"&gt;Sadgrl&lt;/a&gt;, Koonin demonstrated were examples of the next phase in the development of the Web where people built sites for fun, self-expression and creativity.&lt;/p&gt;

&lt;p&gt;It was not just with content, but with top-level-domains (TLDs), that content creators showed creativity.&lt;/p&gt;

&lt;p&gt;TLDs are the final extension of a web name, for example &lt;code&gt;.com&lt;/code&gt;. If you look at the sites, &lt;code&gt;https://carol.gg/&lt;/code&gt; and &lt;code&gt;https://ghost.computer/&lt;/code&gt; the unusual TLDs were expressions of the individual. Today, everyone wants a &lt;code&gt;.com&lt;/code&gt; which is easily recognisable globally.&lt;/p&gt;

&lt;p&gt;Even if TLDs were not creative, secondary-domain names, which are the memorable part of the domain name, before the &lt;code&gt;.com&lt;/code&gt; extention, were truly memorable - &lt;code&gt;https://lynnandtonic.com/&lt;/code&gt; and &lt;code&gt;https://darn.es/&lt;/code&gt; showed the creative flair that early developers had.&lt;/p&gt;

&lt;p&gt;Some of this creative flair has been retained, Koonin concedes, &lt;code&gt;google&lt;/code&gt; being an example. Today's creative naming seems to be more about brand building than self-expression. This is the point of difference between a name like &lt;code&gt;lynnandtonic&lt;/code&gt; which simply was an expression of Stephanie Eckles, a CSS specialist's creative flair, Koonin pointed out.&lt;/p&gt;

&lt;p&gt;Another common feature of these sites are they are all built in HTML and CSS with no JavaScript in sight. The purpose of early websites of the 1990s were to be creative and full of personality to mark the developer's individuality on the Web.  &lt;/p&gt;

&lt;p&gt;Web 2.0 was coined in 1999 by &lt;a href="http://darcyd.com/" rel="noopener noreferrer"&gt;Darci DiNucci&lt;/a&gt;, whose personal website displays all the characteristics of Web 1.0 static pages - no email form, you need to download a CV which is stored on a URL rather than a database, limited CSS and no JavaScript. The name Web 1.0 was retrofitted by DiNucci, a UI-UX and technical writer, to differentiate Web 2.0 which was more feature rich.&lt;/p&gt;

&lt;p&gt;One of the early movers to shift the dynamic of the Web, as a document storage system for academics and researchers, was the content generator, &lt;a href="https://myspace.com/" rel="noopener noreferrer"&gt;My Space&lt;/a&gt;. The site started the shift towards UGC (user-generated-content).&lt;/p&gt;

&lt;p&gt;Web 2.0, played to DiNucci's strengths - a focus on the user-experience(UX), personalisation of the user-journey with UXD (UX-Design frameworks), data stored server-side with Application Protocol Interfaces (APIs) making it easy to use a variety of resources on a web page.&lt;/p&gt;

&lt;p&gt;The increased use of APIs, along with improved UI-UXD, encouraged more users to post blogs, comments, reactions, photographs, images making the Web more interconnected and devices and infrastructures more interoperable. At this stage UGC  was the shift from developer-generated content.&lt;/p&gt;

&lt;p&gt;As a precursor to Web 2.0 where UGC was more common, in Koonin’s opinion, was the success of MySpace which ruined the Web for indie sites. The term Web 2.0, was only widely adopted in 2004 in a conference where DiNucci's original terminology to differentiate the 2 versions of the Web was viralised.&lt;/p&gt;

&lt;p&gt;The general word of caution on Web 2.0, from Koonin, is that although it has influenced a whole generation of content creators to flock to social media sites, it has also spelt the death of the creative impulse of self-expression and a risk towards all sites looking like cookie-cutter imprints of each other. If you do see the My Space site, for example, it has suffered from this general trend.&lt;/p&gt;

&lt;p&gt;While individuality is lost and customisation is limited, the real danger lies in algorithms harvest data and generate feeds of echo-chamber information, Koonin said.&lt;/p&gt;

&lt;p&gt;The discussion about Web 3.0 started around 2006, where mobile distruption and bigger data with all its infrastructure, capacity and privacy issues grew exponentially. Social media sites which started with MySpace, today include Facebook, Instagram, TikTok, YouTube, Twitter and the like, have resulted in a more ominous trend - the cancel culture, Koonin said.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dangers of the cancel culture for Web 3.0
&lt;/h2&gt;

&lt;p&gt;Web 3.0 is not really a "thing" as it has not been designed, defined and its characteristics - big data, use of emerging technologies like AI (artificial intelligence), ML (machine learning), block chain are making significant departures from what Web 2.0 looked like.&lt;/p&gt;

&lt;p&gt;Koonin also said Web 2.0 needed a reset as the cancel culture will slowly lead to content loss when these sites are taken down as a UGC provider is in the eye of a social media storm.&lt;/p&gt;

&lt;p&gt;Content generators now need to think of uncreative content guidelines - search-engine-optimisation and other engagement metrics  as well as social and political correctness - taking the fun out of building a personal website.&lt;/p&gt;

&lt;p&gt;Emergent technlogies like AI, interconnected devices with IoT (the Internet of Things) and NFC (Near Field Communication), will alogorithmize content many human interactions. This has the potential of rendering content we consume devoid of human intelligence and actions we take devoid of human intervention. This will all be in the name of convenience, speed and removing the nature of individuals, prone errors and creative rather than programmed logic.&lt;/p&gt;

&lt;p&gt;Pointing us to &lt;a href="https://indieweb.org/" rel="noopener noreferrer"&gt;Indie Web&lt;/a&gt; and &lt;a href="https://yesterweb.org/" rel="noopener noreferrer"&gt;Yester Web&lt;/a&gt; which aim to “reclaim the Web,” the movement encourages developers to harken back to the past and create a personal website which is not dependent on pre-built templates like WordPress, Wix and Square Space offer but on vanilla HTML and CSS.&lt;/p&gt;

&lt;p&gt;Koonin suggests we turn this paradigm on its head and join the &lt;a href="https://indieweb.org/POSSE" rel="noopener noreferrer"&gt;POSSE&lt;/a&gt; - the movement to Publish on your Own Site and Syndicate Everywhere.&lt;/p&gt;

&lt;p&gt;The challenge for developers with this spartan approach - using pure HTML and CSS - is the lack of tools and options that JavaScript offer.&lt;/p&gt;

&lt;p&gt;A shibbolith that Elad Schechter, who was the next speaker, aimed to dismiss. It is hard to convince a crowd of developers who are keen to learn the next best thing that going backwards is the way forwards, but it certainly made me think in new ways about how to approach what has become a significantly over-engineered space.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pure CSS Games - hey no blinking JavaScript
&lt;/h2&gt;

&lt;p&gt;Schechter, talk &lt;em&gt;“How to Create Pure CSS Games”&lt;/em&gt;, used clever CSS tricks like checkboxes and radio-buttons with CSS animations.&lt;/p&gt;

&lt;p&gt;Schechter ran through how he created a CSS counter for his games and animations. Pseudo classes, sibling selectors in conjunction with CSS animations like transform-rotate helped providing an illusion of movement - proving you do not blinking well need JavaScript.&lt;/p&gt;

&lt;p&gt;He did caveat-emptor this by saying he used an HTML pre-processor. A pre-processor takes HTML and CSS code and processes it in advance so that it renders more efficiently (quickly) on the Web.&lt;/p&gt;

&lt;p&gt;Schechter created atoms of coronavirus with blinking eyes, elements appearing and disappearing, movement of these atoms across the page using and CSS attributes like display-block and display-none or setting opacity at various levels.&lt;/p&gt;

&lt;p&gt;Worth checking out is &lt;a href="https://codepen.io/elad2412/" rel="noopener noreferrer"&gt;Elad2412 on CodePen&lt;/a&gt; for more inspiration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Assistive technologies - why Web 1.0 worked better with just HTML
&lt;/h2&gt;

&lt;p&gt;On a more serious note, Sam Prioux, highlighted how Web 2.0 creates more complexity and less accessibility to visually challenged users.&lt;/p&gt;

&lt;p&gt;Web 1.0 offered text-to-speech screen readers and since most of the Web was HTML, this made the early Web much more universally accessible. Text could also be printed to braille.&lt;/p&gt;

&lt;p&gt;Today with text layered with images, audio, and video there are still tools to make the Web more accessible. Command Line Interface (CLI) tools, image recognition tags, voice recognition, video-magnification, and accessibility APIs.&lt;/p&gt;

&lt;p&gt;Hardware and software developers, Prioux said, need to work together as computer central processing units (CPUs), and compute-power, can be slow with speech recognition. Commercial &lt;a href="https://www.who.int/news-room/fact-sheets/detail/assistive-technology" rel="noopener noreferrer"&gt;assistive technologies&lt;/a&gt; are in their infancy and need to be further developed.&lt;/p&gt;

&lt;p&gt;Web 2.0 and mobile disruption with touchscreens, more event-driven behaviours on-clicks, on-blur, on-mouse-in and out, icons that point to these events, rather than words made Web 2.0 a difficult space to navigate for those who needed accessibility to be built into the programming and hardware. &lt;/p&gt;

&lt;p&gt;Event-driven behaviour is when the user is expected to interact with a web page for an action to occur. In the examples above, when the user is expected to click a link, if they hover over a form field that then becomes blurred to the vision, when the mouse is moved on a trackpad.&lt;/p&gt;

&lt;p&gt;It was not till Apple introduced touch-screen accessibility that hardware caught up with the needs of computer accessibility to the community who needed additional support, Prioux said.&lt;/p&gt;

&lt;p&gt;However, web standards for accessibility, browser extensions and API capabilities are still not fully understood and both hardware and software developers need to think of future accessibility not just play catch up. AR (Augmented Reality) technologies like VR (Virtual Reality), new crypto currencies - are just a few Prioux mentioned.&lt;/p&gt;

&lt;p&gt;He also warned of privacy and biases in the field of assistive technology. A lot more work needs to be done with the community in UI-UXD (user-interface and user-experience-design).&lt;/p&gt;

&lt;p&gt;Prioux, provided an inspiring and insightful look into the plethora of options to be creative and ensure accessibility to prevent abuse of privacy and stop biases across devices.&lt;/p&gt;

&lt;p&gt;AI promises to revolutionise accessibility, he also pointed developers to think of customisation for accessibility or creating separate but equal experiences for assistive technologies that help the enjoyment and ease of use.  &lt;/p&gt;

&lt;p&gt;On a seriously light-hearted note, Herve Aniglo, talked about teaching children to code with music using &lt;a href="https://sonic-pi.net/" rel="noopener noreferrer"&gt;Sonic PI&lt;/a&gt;, a language agnostic platform that helps you learn recursions, looping, circuit breaking and functional programming by creating simple tunes.  &lt;/p&gt;

&lt;p&gt;Python, JavaScript, and Ruby are languages that can be learnt by programming sounds for synthesisers. Conversely, it is also a tool for programmers to learn how to read and write music.&lt;/p&gt;

&lt;p&gt;Music and sound, Aniglo said, bring tech to a wider audience and is a great introduction to children learning the Web. One of the sections on Berners-Lee's site is the section for kids where he explains particle physics in simple terms. It is also a great reference for Koonin's examples of a Web 1.0 site.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://sumisastri.github.io/dev-blogs/history-of-the-web/part2-web2.0/" rel="noopener noreferrer"&gt;Part2 - Enter the browser with the JavaScript dragon&lt;/a&gt;, I have aggregated the talks on JavaScript together to tell a story. The theme of this next section questions if JavaScript really the big, bad wolf of the Web or just another coding language, a tool at our disposal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sumisastri.github.io/dev-blogs/" rel="noopener noreferrer"&gt;My tech blogs home page&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Robert_Cailliau" rel="noopener noreferrer"&gt;Wikipedia Robert Cailliau&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://css-tricks.com/comparing-html-preprocessor-features/" rel="noopener noreferrer"&gt;CSS Tricks and Preprocessors&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
