<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.7">Jekyll</generator><link href="https://vishwesh-d-kumar.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vishwesh-d-kumar.github.io/" rel="alternate" type="text/html" /><updated>2020-06-15T19:17:17+00:00</updated><id>https://vishwesh-d-kumar.github.io/feed.xml</id><title type="html">Vishwesh Kumar</title><subtitle>Researcher@Precog | GSOC@CCExtractor</subtitle><entry><title type="html">GSoC 2020 , my journey so far!</title><link href="https://vishwesh-d-kumar.github.io/GSoC-2020-Journey-so-far!/" rel="alternate" type="text/html" title="GSoC 2020 , my journey so far!" /><published>2020-06-15T00:00:00+00:00</published><updated>2020-06-15T00:00:00+00:00</updated><id>https://vishwesh-d-kumar.github.io/GSoC-2020-Journey-so-far!</id><content type="html" xml:base="https://vishwesh-d-kumar.github.io/GSoC-2020-Journey-so-far!/">&lt;p&gt;In March’20 , I applied for &lt;a href=&quot;https://summerofcode.withgoogle.com/&quot;&gt;GSoC&lt;/a&gt; under the organization of &lt;a href=&quot;https://summerofcode.withgoogle.com/organizations/5176609797046272/&quot;&gt;CCExtractor Development&lt;/a&gt;.
My proposal got accepted on May 4th ,and thats when my journey began!.&lt;/p&gt;

&lt;p&gt;You can read more about my project decription &lt;a href=&quot;https://summerofcode.withgoogle.com/projects/#5888598286532608&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would like to thank my mentor Carlos for selecting this project , and helping me through it.The CCExtractor community has helped me 
get a clear idea of my project since the proposal phase , which has been an immense help during the current phase.&lt;/p&gt;

&lt;p&gt;In this post I’m going to be highlighting what I’ve accomplished so far , and
what all I’ve learnt so far!&lt;/p&gt;

&lt;h1 id=&quot;community-bonding-phase&quot;&gt;Community bonding phase&lt;/h1&gt;
&lt;p&gt;During this phase , I worked on understanding the AST module ,which was integral 
to building my goals for phase 1 : which is a runtime based flowchart .&lt;/p&gt;

&lt;p&gt;The idea was to build a program that goes provides a flowchart-esque graphcal
 output &lt;strong&gt;and&lt;/strong&gt; how a given function traverses through the chart&lt;/p&gt;

&lt;p&gt;####A brief overview what AST Trees are:
 This is a brief overwiew I gave in my proposal , 
 that I’ve shared for others to understand&lt;/p&gt;

&lt;p&gt;Let me first introduce you to the concept of breaking down the program into parts ,an AST Tree
, or an Abstract Syntax tree .&lt;/p&gt;

&lt;p&gt;This is basically how python understands your code flow , and executes it. 
To make it clear , let me put some trees  corresponding to  code&lt;/p&gt;
&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;hello&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Ok then&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;“&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;”&lt;/span&gt;
 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;A cool website that helps us visualize the ast tree generated is : https://vpyast.appspot.com/&lt;/p&gt;

&lt;p&gt;I suggest you try the code out there , and make some changes to see how 
the output changes!&lt;/p&gt;

&lt;p&gt;Cool , isn’t It ?&lt;/p&gt;

&lt;p&gt;Its basically a decision tree of sorts , for the compiler to follow based on values it gets .
The compile() function in python , accepts both AST Trees and Source code to compile .&lt;/p&gt;

&lt;p&gt;In a more formal sense , (for people who have studied automatas and grammars,) , the code is tokenized, then is parsed according to a parser , based on a grammar( a set rules on how to expand symbols basically ).This is the python grammar .&lt;/p&gt;

&lt;p&gt;The AST trees are then generated using the grammar , and are used by python to create the low level language of BYTE codes .This byte code is finally what produces your executable to be run.&lt;/p&gt;

&lt;p&gt;I have taken the course Theory of Computation this semester, as one of my electives . I was pleasantly surprised when I was able to see the concepts of CFGs that I had learnt for my midsems . :)&lt;/p&gt;

&lt;p&gt;The byte code is actually way too vast for us to extract info out of( it is very explicit , and doesn’t really seem to capture the codes flow ) , so we’ll be stopping at the AST trees .&lt;/p&gt;

&lt;p&gt;Now , whats amazing about python is that it includes the ast module, which 
parses given source code and produces the ast trees corresponding to it&lt;/p&gt;

&lt;p&gt;For resources on this : I used the following 
https://docs.python.org/3/library/ast.html&lt;/p&gt;

&lt;p&gt;https://greentreesnakes.readthedocs.io/en/latest/index.html&lt;/p&gt;

&lt;p&gt;An amazing resource , that covers the basics of the ast module is the
greentreesnakes documentation&lt;/p&gt;

&lt;p&gt;A basic overview of gives us an idea of the blocks we need to focus on :
the &lt;a href=&quot;https://greentreesnakes.readthedocs.io/en/latest/nodes.html#control-flow&quot;&gt;Control Flow Blocks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These control flow blocks are what change the flow of the program based
on the current state of the program (if x==0, while(i&amp;lt;n))&lt;/p&gt;

&lt;p&gt;Now the next phase in this is then, actually visiting the nodes of the tree&lt;/p&gt;

&lt;p&gt;The NodeVisitor Class , is a powerful class for the same
The basic functioning of the class is the following 
It takes the type of the node ,and calls the function based on the type 
For example : lets say an If node is visited by the Nodevisitor ,&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;The first function to be called would be generic_visit()&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This func would look for the definition of the function visit_If().
If found , the node would be passed to it , and the function can hence be used 
to extract whatever info we want from it&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Returning generic visit would allow for all the child nodes to be visited&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now that we have a slight understanding of the same , the repository that used this idea 
was &lt;a href=&quot;https://github.com/coetaur0/staticfg&quot;&gt;Staticfg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Understanding its code , and how it worked ,gave me a deep understanding as to how
the control flow graph was built .However , having an overwiew would not allow 
me to build using the repository , and hence I took a deep dive into its source code&lt;/p&gt;

&lt;p&gt;While I cannot explain every function in detail here , I’ll outline the basic flow 
of the program&lt;/p&gt;

&lt;p&gt;The following were the basic ideas used&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;On encountering a control flow node (described above), We create a control flow block&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The block has 2 ways the program can go after the control flow block is 
visited&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;A block is created if the condition comes out to be true , and an after block is 
created if the condition is not true&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We recursively visit the child nodes of the body of the control flow statement, 
set the current block as the after_block , and then continue building the program&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;first-coding-phasejune-1st--present&quot;&gt;First Coding phase!(June 1st -present)&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/vishwesh-D-kumar/AlgorithmFlowVisualizer/tree/runtime_only&quot;&gt;This is my current repository for reference in the post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ll be outlining how I went about completing each of my targets , wherever possible .&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Staticfg&lt;/p&gt;

    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Add support for continue statements in staticfg&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Stop breakage of code on statements of type
        &lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Improve Clean_cfg to make sure no empty blocks pop up in cfg&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The above problems were faced by me in testing the repository out. I forked and worked on the errors
and sent &lt;a href=&quot;https://github.com/coetaur0/staticfg/pull/13&quot;&gt;this PR&lt;/a&gt; ,which has been merged into master 
It has detailed explanation of each task I went about doing&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Generating timeline of given program
    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Create A timeline generator&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Creating this was interesting .The resources I used were the following  : https://docs.python.org/3/library/sys.html
 After my research while writing the proposal , I was able to grasp and create a basic timeline generator for a given source file
 &lt;a href=&quot;https://github.com/vishwesh-D-kumar/AlgorithmFlowVisualizer/commit/015927f1c838e82a0ba9cb386c6210437e41bbc5&quot;&gt;This is the rough draft I came up with&lt;/a&gt;&lt;/p&gt;

    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Take care of statements that have no such blocks created for them  and hence cannot be mapped to any block(ie : break , continue,else)&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;I was initially saving this while staticfg was visiting the nodes to be left out in a list known as lines to leave .
 However certain problems came up with that appraoch towards the end ( seperating else blocks from elif ) , and hence 
 I rejected that in favour of deleting unmapped lines once I have the lines to block map&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Connect staticfg to timeline generation&lt;/p&gt;

    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Map every line to its corresponding block&lt;/p&gt;

        &lt;p&gt;Created a dict linesmap , mapping lines to corresponding blocks
  Done by iterating over the list of blocks ,and checking the statements in a block.
  Marking the max of the statements to the min of the statements as belonging to that in 
  this is done in function map_lines()&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Create runtime depictor of the program , with a pdf being given as an output at every step&lt;/p&gt;

        &lt;p&gt;Using the timeline generation above , and the linesmap , I highlighted the control flow link being used during every step in the program&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Remove unnecessary produced steps&lt;/p&gt;

        &lt;p&gt;Only produced output on which control flow jumps are made&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Only show blocks being used in runtime&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Convert the cfg to a flowchart&lt;/p&gt;

    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Decide on which flowchart blocks to use&lt;/p&gt;

        &lt;p&gt;Control flow blocks (if,else,while,for) are what I focused on&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Devise a algorithm to break up given cfg blocks based on statements&lt;/p&gt;

        &lt;p&gt;Done by checking for blocks , and replacing them whenever neccesary,with new Decision,LoopBlocks created&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Create a class for the entire process&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Highlight control flow blocks with colors for better visual representation&lt;/p&gt;
      &lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;
        &lt;p&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Align the graphviz output to look better (Maybe only use straight lines?)&lt;/p&gt;

        &lt;p&gt;Learnt about graphviz documentation , and how python relates to the dot files 
  Used the findings to achieve the above two tasks&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Write unittests for the same&lt;/p&gt;

    &lt;ul class=&quot;task-list&quot;&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Write simple tests to check for continue/break statements&lt;/li&gt;
      &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;Check with popular sorting algorithms&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Using the timeline returned , I checked the blocks being visited were in correct order or not.Checked with insertion sort , 
 selection sort , knapsack etc&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">In March’20 , I applied for GSoC under the organization of CCExtractor Development. My proposal got accepted on May 4th ,and thats when my journey began!.</summary></entry><entry><title type="html">Setting this website up [Animations Included]!</title><link href="https://vishwesh-d-kumar.github.io/Making-a-blog-website!/" rel="alternate" type="text/html" title="Setting this website up [Animations Included]!" /><published>2020-05-29T00:00:00+00:00</published><updated>2020-05-29T00:00:00+00:00</updated><id>https://vishwesh-d-kumar.github.io/Making-a-blog-website!</id><content type="html" xml:base="https://vishwesh-d-kumar.github.io/Making-a-blog-website!/">&lt;p&gt;I made this website in under 2 hours , with no previous knowledge of javascript . I am outlining the steps for the same for all others , who all want a quick start!&lt;/p&gt;

&lt;p&gt;Steps :&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to the &lt;a href=&quot;https://github.com/barryclark/jekyll-now&quot;&gt;Jekyll Now repository&lt;/a&gt; , and fork the repository. Take a good look at the repository ,and you’ll be done setting up a minimal blog site in a jiffy!&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Adding animations : There are many open sourced p5.js animations , which can be used as a potential background for websites! I personally liked &lt;a href=&quot;https://github.com/CrypticGuy/Interactive-Background&quot;&gt;this&lt;/a&gt; visualization, and decided to go with it !&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;The following changes were made in the /_layouts/default.html file (as I wanted the changes in all webpages , and all pages use default.html) , for using the p5.js library (which renders the animations).
    &lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://cdn.jsdelivr.net/npm/p5@1.0.0/lib/p5.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://vishwesh-d-kumar.github.io/assets/js/myjsfile.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;Add your js file in the path /assets/js/myfile.js.This will be the canvas used.
Add the following to the setup() function , to convert your canvas to a background!&lt;/p&gt;
    &lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
     &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

 &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;scrollHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;offsetHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
                        &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;scrollHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;offsetHeight&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;//Height of body element&lt;/span&gt;
 &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createCanvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;windowWidth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
 &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
 &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;For local testing , refer to the jekyll-now readme.&lt;/li&gt;
  &lt;li&gt;And thats it! You have a blogging website up and running with a sweet js animation background.&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">I made this website in under 2 hours , with no previous knowledge of javascript . I am outlining the steps for the same for all others , who all want a quick start!</summary></entry></feed>