<?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: Anirudh Rowjee</title>
    <description>The latest articles on DEV Community by Anirudh Rowjee (@anirudhrowjee).</description>
    <link>https://dev.to/anirudhrowjee</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%2F466249%2F0dac5d8a-1d5f-4ea8-bc40-985e5687e385.png</url>
      <title>DEV Community: Anirudh Rowjee</title>
      <link>https://dev.to/anirudhrowjee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anirudhrowjee"/>
    <language>en</language>
    <item>
      <title>A Gentle Introduction to Programming</title>
      <dc:creator>Anirudh Rowjee</dc:creator>
      <pubDate>Sun, 18 Oct 2020 08:37:41 +0000</pubDate>
      <link>https://dev.to/anirudhrowjee/a-gentle-introduction-to-programming-31h1</link>
      <guid>https://dev.to/anirudhrowjee/a-gentle-introduction-to-programming-31h1</guid>
      <description>&lt;h3&gt;
  
  
  warning
&lt;/h3&gt;

&lt;p&gt;This post has a sizeable amount of content. Feel free to take breaks in between - understanding what i've written is important, not how fast you do it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."&lt;br&gt;
&lt;em&gt;Ted Nelson&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What if I told you that within your possession is an object that can do simply incredible things?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This device has simply transformed humanity in a large number of aspects - It's connected the world in more ways than one can imagine, Allowed us to literally reach for the stars, unlock the secrets of our DNA, Accelerated the growth of global economies, and lastly, pushed humankind to solve some of the most challenging problems we've encountered.&lt;/p&gt;

&lt;p&gt;Any Guesses?&lt;/p&gt;

&lt;p&gt;Here's a hint - you might be carrying it with you every day, you might have one at home, or you might be using one in a lab. &lt;/p&gt;

&lt;p&gt;Well, of course, it's the Computer! Your smartphone is one. So is your laptop. So is the Desktop PC in your lab.&lt;/p&gt;

&lt;p&gt;Let me ask you another question. &lt;strong&gt;What if I told you that if you put in some time and effort, you will be able to make these beautiful devices do your bidding?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because you &lt;em&gt;can&lt;/em&gt;. It's right here, within your reach. All you have to do is be willing to learn - and given that you're here, reading this, I assume that you are 😄.&lt;/p&gt;

&lt;h1&gt;
  
  
  What will I get by learning Programming?
&lt;/h1&gt;

&lt;p&gt;Excellent Question.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's an exercise in logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, before you reject yourself because you feel you aren't "good" at such things, hear me out.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Programming is NOT math.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(This isn't to say that you can't use programming to do math - you can, and that's a topic for another post.)&lt;/p&gt;

&lt;p&gt;The Fact of the matter is, programming is perhaps one of the most fun ways to improve your logical acumen, because it has direct and tangible results. Math tends to be more abstract and has a higher learning curve as opposed to programming. In many ways, it's easier. There is NO hard-and-fast rule that you must be good at math to be good at programming.&lt;/p&gt;

&lt;p&gt;Think of it as a muscle. Even the most experienced programmers who have built large-scale systems will have trouble programming if they haven't done it for a long time, which is to say, &lt;strong&gt;practice is important&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://itu.foleon.com/itu/measuring-digital-development/internet-use/"&gt;Internet proliferation is at an all-time high.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means that more people around the world are coming online, as a part of the huge global community that we are. Understanding how the internet works, and the true extent of its capabilities is fundamental in using it to bring about change, and improve people's lives. More than that, it's about putting yourself in a position to take advantage of this connection to deliver value to yourself and the world at large.&lt;/p&gt;

&lt;p&gt;If you know how to write code that takes advantage of this connection to make things happen, it is nothing but an advantage.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will become much better at problem solving&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This holds true not just for programming problems, but for problems in general. Taking a structured approach and looking at a problem from multiple directions are skills that you will pick up ALONG the way. These skills, and the accompanying mental models, will help you no matter what field you choose to make a career in.&lt;/p&gt;

&lt;p&gt;This will become more apparent as we use pseudocode to model real-life problems in the sections ahead.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's a path to a better, high-paying job.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compared to many other professions, the bar for entry - i.e. the minimum amount of skill required to get a job in the software engineering field is far lesser than that of any other field. You can use the internet to do this, in many cases, without having to pay for external training. Many of the Industry leaders in Software will hire people without a college degree if they are passionate about what they do, and skilled enough to make the cut - there is no formal restriction.&lt;/p&gt;

&lt;p&gt;In any case, Glassdoor&lt;sup id="fnref1"&gt;1&lt;/sup&gt; reports the Average salary for the role of Software Engineer in the USA to be &lt;strong&gt;~$93,000&lt;/strong&gt;. This is a LOT of money and can lead to a significantly better life for many people.&lt;/p&gt;

&lt;h4&gt;
  
  
  warning
&lt;/h4&gt;

&lt;p&gt;I am formally advising you against dropping out of college. I am not responsible if your parents find out that you are considering such things, or if anything happens to you as a consequence of this choice.&lt;/p&gt;

&lt;p&gt;Again, &lt;br&gt;
I am advising against you dropping out of college.&lt;/p&gt;
&lt;h1&gt;
  
  
  What can I do with programming?
&lt;/h1&gt;

&lt;p&gt;At the end of the day, no matter how fun the act of doing so may be, Programming is a means to an end. It's a method by which we solve problems - as long as we can define the problem we want to solve. &lt;/p&gt;

&lt;p&gt;Some problems are well-defined, and some aren't well defined at all. This goes to say that for some problems, there's an obvious solution, and for some problems, there isn't - but this is no indication that it's something that can't be solved by a computer. Theoretically, if you can define a problem in a mathematical sense, a computer can solve it. It might not be efficient (i.e. takes too much time) or it might not be feasible (i.e. you need more processing power than the energy of the sun) - but it is possible. &lt;/p&gt;
&lt;h4&gt;
  
  
  warning
&lt;/h4&gt;
&lt;h2&gt;
  
  
  When we talk about problem-solving with programming, it's easy to digress and talk about Computer Science problems - classical problems like the &lt;a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem"&gt;Travelling Salesman Problem&lt;/a&gt; and the &lt;a href="https://en.wikipedia.org/wiki/Knapsack_problem"&gt;Knapsack Problem&lt;/a&gt; (I highly recommend you read about them when you're more comfortable), whose answer is mathematical, but have programming solutions - are extremely confusing for beginners because of the sheer background that you need to understand the problem as it is. Because of this, we'll talk more about the applications of programming. It's not as glossy and sleek as solving the computer science problems but are of high utility nonetheless.
&lt;/h2&gt;

&lt;p&gt;Let's say you want to get an SMS/Whatsapp Message whenever the price of an item drops below a certain number on Amazon or Flipkart (I see you looking at that smartphone you've been wanting). You can do that with no more than 50 lines of code! &lt;/p&gt;

&lt;p&gt;Maybe you've got a bet with a friend about how many times the word "Hello" was mentioned in any book of your choice. That's also extremely easy to do with code, as opposed to spending hours reading the book with a notepad in hand! This is an optimization.&lt;/p&gt;

&lt;p&gt;At this point, you may ask - "But wait, Anirudh, these are all silly problems! The first one maybe has some potential, but what about delivering value to people? Can I do something that people would pay me for or something that would deliver some tangible value?"&lt;/p&gt;

&lt;p&gt;And that is an excellent question. Thankfully, we have answers.&lt;/p&gt;

&lt;p&gt;Let's say you want to track your habits at the push of a button - that every day you brushed your teeth twice, you would press a button, and at the end of the month, you'd know your longest streak and success percentage. This is also only mildly difficult to implement.&lt;/p&gt;

&lt;p&gt;Or what if the vegetable vendor pushing a cart near your house wants a better way to manage his finances so that he can keep his money safe and track online payments. Not impossible! Definitely difficult, and definitely not something you can do on your first day (contrary to what some people will tell you), but it is very much possible.&lt;/p&gt;

&lt;p&gt;The bottleneck is often the programmer and not the computer - simply put, if YOU can solve a problem, you can theoretically write a program to solve it.&lt;/p&gt;
&lt;h1&gt;
  
  
  An Introduction to PseudoCode
&lt;/h1&gt;

&lt;p&gt;Okay. Now that we've seen the dreams of how we'll make the world a better place, let's get down to implementation.&lt;/p&gt;

&lt;p&gt;Pseudocode can be thought of like programming in English - it does not have a defined &lt;strong&gt;syntax&lt;/strong&gt; (i.e. a set of rules on how everything should be written, what words can and can't be used, etc). It's a simple description of programming constructs. You'll understand more as we move on.&lt;/p&gt;

&lt;p&gt;Pseudocode is often used to describe what is known as an Algorithm - a defined set of steps to take to solve a problem. Here's a  universal one - making a cup of coffee.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remember ingredients as milk, sugar, coffee powder
add sugar to milk
turn stove on
put milk in pot
put sugar in pot
boil milk and sugar
add coffee powder
stir contents of pot
take a glass
pour from pot to glass
drink
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we could make it less verbose and simple to read, but we often lose control over the finer details - people will start to assume things that aren't already pretty obvious.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add sugar and milk to pot
boil contents of pot
pour to glass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What are the assumptions people can make here? Maybe they have questions like - What stove is used? What order do we add the ingredients in? Do we stir? When do we get the glass ready?&lt;/p&gt;

&lt;p&gt;There is a similar tradeoff in programming languages, which might influence the way some authors write pseudocode - I'd call this the control-complexity tradeoff. The more "complex" a programming language is, the higher degree of control it gives you. When we move on to the actual programming aspect of this series, it'll be more obvious, but this isn't something that's very obvious or relevant to beginners.&lt;/p&gt;

&lt;h1&gt;
  
  
  Basic Programming Constructs
&lt;/h1&gt;

&lt;p&gt;Consider the coffee pseudocode. Some things were assumed - the existence of the stove, that we know that boiling means, what stirring means, etc. These are the constructs - pre-existing building blocks of a universe - that exist in the situation.&lt;/p&gt;

&lt;p&gt;In that way, when we deal with programming, there are certain constructs - building blocks - that we use to make our programs. These are mostly consistent across different programming languages, which is why this article serves as an introduction to Programming, not to Python or C++.&lt;/p&gt;

&lt;p&gt;These constructs can be condensed as follows - Communication, Data, Computation, Repetition, Routines, and Abstractions, and are written in terms of writing programs for computers. If you were writing pseudocode to make coffee, you would have a different set of constructs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communication
&lt;/h2&gt;

&lt;p&gt;Our program is useless if the program can't communicate with us. A conversation is a two-way street - it involves talking and listening. Similarly, with computers, this is known as Input and Output. Input is what we tell the program, and Output is what the program tells us. In our world of pseudocode, we define these things as &lt;code&gt;Tell&lt;/code&gt; and &lt;code&gt;Ask&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Consider the canonical "hello, world" program&lt;sup id="fnref2"&gt;2&lt;/sup&gt; - in Pseudocode, this would read -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tell "Hello, World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, in regular cases, &lt;code&gt;Tell&lt;/code&gt; would just communicate with us - the programmer - on our screen, but remember that it can take multiple forms, maybe you want to tell another program, or another computer - or maybe you want to tell Facebook or Twitter. However, for us, the first case would be enough.&lt;/p&gt;

&lt;p&gt;Now, how do we tell communicate something to the program? We would use &lt;code&gt;Ask&lt;/code&gt;, right? However, this is useless if we can't remember the answer - if you asked someone what their name was but couldn't remember it, it wouldn't have any utility.&lt;/p&gt;

&lt;p&gt;This is the perfect place to introduce us to the next construct, which is Data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data
&lt;/h2&gt;

&lt;p&gt;We need some way to remember the information we're remembering, right? Let's do that. Introducing our next construct, &lt;code&gt;Remember&lt;/code&gt; -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember "Anirudh" as Name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why do we need to know what we are remembering something as? This is because by thinking of a shorter, permanent name for something, it becomes much easier to recall. If you have to remember a number, but you don't know &lt;em&gt;what it's for&lt;/em&gt;, recalling it when someone asks you what the number was will be &lt;strong&gt;extremely difficult&lt;/strong&gt;. Computers work somewhat similarly.&lt;/p&gt;

&lt;p&gt;Solving our first problem -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember the answer of Ask "What is your name?" as Name
Tell "Hello"
Tell Name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which would give us the output of&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is your name? &amp;lt;you type "Sam"&amp;gt;
Hello 
Sam
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The advantage of data is that we can now change things easily - say I write a program where I have to &lt;code&gt;Tell&lt;/code&gt; a specific value many times.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tell "Something"
...
Tell "Something"
... n times 
Tell "Something"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As humans do, let's change our minds about what we want to &lt;code&gt;Tell&lt;/code&gt;. Now, you have to go and change every line of &lt;code&gt;Tell "Something"&lt;/code&gt; to &lt;code&gt;Tell "Something Else"&lt;/code&gt;, every time it occurs in the pseudocode. This is a &lt;em&gt;very&lt;/em&gt; tedious process. &lt;/p&gt;

&lt;p&gt;Wouldn't it be easier to lean on our memory?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember "Hello" as ImportantThing
Tell ImportantThing
...
Tell ImportantThing
... n times 
Tell ImportantThing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's much cleaner, and if we want to change what we're &lt;code&gt;Tell&lt;/code&gt;ing, all it takes is a change in one line, as opposed to &lt;code&gt;n&lt;/code&gt; lines.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember "Bye" as ImportantThing
Tell ImportantThing
...
Tell ImportantThing
... n times 
Tell ImportantThing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can &lt;code&gt;Remember&lt;/code&gt; almost anything - numbers, lists, text, tables, and sometimes, even other pseudocode, but we'll get to this later.&lt;/p&gt;

&lt;h4&gt;
  
  
  tip
&lt;/h4&gt;

&lt;p&gt;As a shorthand for &lt;code&gt;the answer of &amp;lt;Any Operation&amp;gt;&lt;/code&gt;, let's just enclose &lt;code&gt;&amp;lt;Any Operation&amp;gt;&lt;/code&gt; in brackets.&lt;br&gt;
In effect, the pseudocode &lt;code&gt;the answer of first+second&lt;/code&gt; will be &lt;code&gt;(first+second)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Eg -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember the answer of Ask "What is your name?" as name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will become&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember (Ask "What is your name?") as name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can have this construct nested, but that is beyond the scope of our concerns for now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Computation
&lt;/h2&gt;

&lt;p&gt;All this is cool, but what about dealing with operations such as addition and subtraction? At some point, we'll need to do this. Thankfully, in both Pseudocode as well as programming, this is pretty close to how the real world works.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember 1 as first
Remember 2 as second
Remember ( first+second ) as sum
Remember ( first-second ) as difference
Remember ( first*second ) as product
Remember ( first/second ) as ratio
Tell sum
Tell difference
Tell product
Tell ratio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which would give us the output as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3
-1
2
0.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because we used &lt;code&gt;Remember&lt;/code&gt;, we won't have to change every line of pseudocode if we want to use different numbers, or even if we want to &lt;code&gt;Ask&lt;/code&gt; and let the user decide what numbers they want to add.&lt;/p&gt;

&lt;p&gt;Lastly, another type of computation we can do is &lt;strong&gt;comparison&lt;/strong&gt; -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember 1 as first 
Remember 2 as second
Remember (first = second) as equality
Remember (first &amp;gt; second) as first_is_greater
Remember (first &amp;lt; second) as first_is_lesser
Tell equality
Tell first_is_greater
Tell first_is_lesser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which will, as you can tell by this point, give us the output as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;false
true
true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll notice that the comparison type of computation gives us only True or False answers. This is something we will use to our advantage to &lt;em&gt;control what the program does based on data it has&lt;/em&gt; in the next section.&lt;/p&gt;

&lt;p&gt;Finally, you can also compare the Comparison results too! We can do this using &lt;code&gt;And&lt;/code&gt;, and &lt;code&gt;Or&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember 1 as first
Remember 3 as second
Remember 2 as third
Remember (first &amp;gt; second) as compare_one
Remember (first &amp;lt; second) as compare_two
Remember (second &amp;gt; third) as compare_three
Remember (second &amp;lt; third) as compare_four
Tell (compare_true And compare_four)
Tell (compare_true Or compare_four)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a little tricky to understand how &lt;code&gt;And&lt;/code&gt; and &lt;code&gt;Or&lt;/code&gt; work, so I'll leave you with this - for &lt;code&gt;And&lt;/code&gt; to be True, both terms compared have to be True - and for &lt;code&gt;Or&lt;/code&gt;, only one of the terms has to be True. This is the same as the &lt;code&gt;And&lt;/code&gt; and &lt;code&gt;Or&lt;/code&gt; that one encounters in Boolean Algebra.&lt;/p&gt;

&lt;p&gt;It is a good idea to use these &lt;strong&gt;Truth Tables&lt;/strong&gt; for reference - &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;first&lt;/th&gt;
&lt;th&gt;second&lt;/th&gt;
&lt;th&gt;first And second&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;first&lt;/th&gt;
&lt;th&gt;second&lt;/th&gt;
&lt;th&gt;first Or second&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  tip
&lt;/h4&gt;

&lt;p&gt;Pat yourself on the back!! You've made it this far, and that was a mouthful. Feel free to take a coffee break (you already know how to make it 😄 in our pseudocode, so it'll be easy).&lt;/p&gt;

&lt;h2&gt;
  
  
  Control
&lt;/h2&gt;

&lt;p&gt;Great. Time to make another assumption!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;oh, no, Anirudh, not again!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Oh, come on. You're having fun (I hope). I swear I'm not trying to control how you feel by injecting humor in my post.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Oh no. Now you know.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can control your program like this too! Introducing the &lt;code&gt;If-Then-Else&lt;/code&gt; constructs - These will take specific steps only if certain conditions are met. &lt;/p&gt;

&lt;p&gt;It's especially useful if you're writing a calculator that &lt;em&gt;hates&lt;/em&gt; negative numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember (Ask "Enter first Number") as num1
Remember (Ask "Enter Second Number") as num2

If (num1 &amp;lt; num2) is True Then
  Remember (num2 - num1) as difference
  Tell "Your answer is"
  Tell difference
Else
  Tell "Please make the second number bigger than the first, thanks"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, let's get to the space from the margin after the &lt;code&gt;If&lt;/code&gt; statement - This is our way of telling the computer that we want ONLY some things to happen. Wouldn't it be silly if we did in fact make the second number bigger than the first, and the computer still told us to "Please make the second number bigger than the first"? We call this separated unit a &lt;em&gt;section&lt;/em&gt;, or a &lt;em&gt;block&lt;/em&gt;. It's annoying, but it's important.&lt;/p&gt;

&lt;p&gt;Our Biased calculator should work as follows -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter first number &amp;lt;you type 1&amp;gt;
Enter second number &amp;lt;you type 2&amp;gt;
Your answer is
1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AND, it should work as follows -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter first number &amp;lt;you type 3&amp;gt;
Enter second number &amp;lt;you type 2&amp;gt;
Please make the second number bigger than the first, thanks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why the Control constructs are so useful - they offer us an extreme amount of control over the program based on data - and being human, we like being in control.&lt;/p&gt;

&lt;h4&gt;
  
  
  warning
&lt;/h4&gt;

&lt;p&gt;Another caveat is that for the &lt;code&gt;If-Then-Else&lt;/code&gt; block to work, the statement that we check is true or not has to be one that answers in terms of yes or no - simply put, True or False - and our "Comparison" type of computations fit the bill perfectly, so it is this type of result that is used.&lt;/p&gt;

&lt;p&gt;This is also reinforcing what some of you may have already suspected - our Comparison type of Computations have a "Binary" or "Boolean" output, in that they can either be True, or False.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repetition
&lt;/h2&gt;

&lt;p&gt;Last Part! Are you excited? Are you excited? Are you excited? Are you excited? I'm going to ask you until you keep saying yes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;could you be more annoying, Anirudh?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Maybe. My sister asks me this often, and scientists around the world are still confused. However, the utility of asking a question, or doing an action till you get the right answer or result is appreciated and praised around the world as "Determination" and "Persistence", but it's really just repetition.&lt;/p&gt;

&lt;p&gt;Consider our calculator that hates negative numbers. What if we don't want it to stop, but instead keep asking until you give a number greater than the first number. Again, this too relies heavily on the comparison type of computation to make decisions on whether something has happened or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember (Ask "Enter first Number") as num1
Remember (Ask "Enter Second Number") as num2

Repeat Till (num2 &amp;gt; num1) is True
  Remember (Ask "Enter Second Number") as num2

Remember (num2 - num1) as difference
Tell "Your answer is"
Tell difference
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which would output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter first Number &amp;lt;you type 10&amp;gt;
Enter second Number &amp;lt;you type 5&amp;gt;
Enter second Number &amp;lt;you type 6&amp;gt;
Enter second Number &amp;lt;you type 7&amp;gt;
Enter second Number &amp;lt;you type 15&amp;gt;
Your answer is
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we don't have to worry about getting a negative number because we've bugged the user enough to make sure that they will give only positive numbers.&lt;/p&gt;

&lt;h4&gt;
  
  
  warning
&lt;/h4&gt;

&lt;p&gt;If you provide an expression that can NEVER be true in the &lt;code&gt;Repeat Till () is True&lt;/code&gt;, it will keep on repeating forever - or until you can kill the program, or your computer. This is known as a forever-loop. It's not fun. Don't do it.&lt;/p&gt;

&lt;p&gt;Finally, say we want to write a program to count down from 10 for a rocket launch. How would we do this? With our newfound powers of repetition, we could do the following -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Remember 10 as count
Repeat till (count = 0) is True
  Tell count
  Remember (count - 1) as count
Tell "Takeoff!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which would give us the output as -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10
9
8
7
6
5
4
3
2
1
Takeoff!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;yay! that was fun! However, because this is a type of repetition that is used so often, most languages have an inbuilt construct for it, which we will discuss later. In principle, that construct does this as well, but it looks much neater. it's called a &lt;code&gt;For-In&lt;/code&gt; construct and looks something like this -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remember [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] as numbers
For number In numbers
  Tell number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would give us the same output as above.&lt;/p&gt;

&lt;h1&gt;
  
  
  This was a lot to understand! What do I do now?
&lt;/h1&gt;

&lt;p&gt;Take some time to digest this, but try and apply this technique to solve as many problems as you can. This is a primer to programming, and problem-solving with computers - this encourages you to think in terms of problems, and not in terms of a language. &lt;/p&gt;

&lt;p&gt;Look at some problems all around you in your daily life. Is it possible to frame it in such a way that a computer can solve it? Is it possible to write pseudocode which makes it easy to solve this problem?&lt;/p&gt;

&lt;p&gt;Here's a small challenge to get you started - &lt;strong&gt;in the comments, the first person to write the pseudocode to calculate the sum of the first N natural numbers (where N is something the user provides) will be formally declared the "Ultimate Baller and Coolest Person in the whole Universe"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;(Oh, that's also your first assignment)&lt;/p&gt;

&lt;p&gt;Don't worry too much about not writing syntactically perfect pseudocode - by design, pseudocode is supposed to be natural language. Solving the problem using the constructs that we discussed is the priority.&lt;/p&gt;

&lt;p&gt;Please feel free to leave all feedback - what you liked, and especially what you didn't like - in the comments below. Join us on discord for more discussion on this.&lt;/p&gt;

&lt;p&gt;Thank you for taking the time to read this article! I hope this helped you get a better grip on the ideas and concepts that we're dealing with.&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://www.glassdoor.co.in/Salaries/us-software-engineer-salary-SRCH_IL.0,2_IN1_KO3,20.htm"&gt;Glassdoor&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/%22Hello,_World!%22_program"&gt;https://en.wikipedia.org/wiki/%22Hello,_World!%22_program&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>0 to 1100100 in Python - a series for beginners in Programming</title>
      <dc:creator>Anirudh Rowjee</dc:creator>
      <pubDate>Sun, 11 Oct 2020 18:11:32 +0000</pubDate>
      <link>https://dev.to/anirudhrowjee/0-to-1100100-in-python-a-series-for-beginners-in-programming-4gkg</link>
      <guid>https://dev.to/anirudhrowjee/0-to-1100100-in-python-a-series-for-beginners-in-programming-4gkg</guid>
      <description>&lt;p&gt;(Psst - Join us on &lt;a href="https://discord.gg/ahru6GS"&gt;Discord&lt;/a&gt;!)&lt;/p&gt;

&lt;h2&gt;
  
  
  What is this?
&lt;/h2&gt;

&lt;p&gt;Welcome! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0 to 1100100 in Python&lt;/strong&gt; is a series of blog posts that I will be writing, to introduce beginners to the world of programming and the Python programming language. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Vision for the series 👀
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Anyone - I mean anyone, irrespective of prior programming experience - should be able to write a full Python program by the time they're done with this course.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Course Structure 🆕
&lt;/h2&gt;

&lt;p&gt;Each post in the series will cover two to three topics in Python. The table of contents is given below.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Post&lt;/th&gt;
&lt;th&gt;Target Release Date&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;This Post&lt;/td&gt;
&lt;td&gt;Oct 7th, 2020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A Gentle Introduction to Programming&lt;/td&gt;
&lt;td&gt;Oct 11th 2020&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Introduction to Python - Variables, Data Types and I/O&lt;/td&gt;
&lt;td&gt;Oct 15th 2020&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(More on the way!)&lt;/p&gt;

&lt;h2&gt;
  
  
  What will each post consist of 📇?
&lt;/h2&gt;

&lt;p&gt;Each post will have the following - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;An Introduction&lt;/strong&gt;, and a list of all the topics covered&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-life use cases&lt;/strong&gt; of the topics that are covered&lt;/li&gt;
&lt;li&gt;Each Topic, covered section-wise&lt;/li&gt;
&lt;li&gt;Some &lt;strong&gt;Helpful tips&lt;/strong&gt;, and things to remember&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assignments&lt;/strong&gt; (before you run away, these will be simple, well-defined assignments. My aim is to make them as fun as possible.)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An emphasis will be placed on you writing more code than you will be reading - this is to ensure that you are capable of writing programs on your own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some other things you will learn 📖
&lt;/h2&gt;

&lt;p&gt;You will learn how to &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read technical documentation &lt;/li&gt;
&lt;li&gt;Become better at using Google to search for very specific answers&lt;/li&gt;
&lt;li&gt;Condense abstract questions into simple, concise targets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Did I mention you won't be taught any of this? These are all skills that you will pick up along the way, all on your own!&lt;/p&gt;

&lt;h2&gt;
  
  
  Where will I run my code 💽 ?
&lt;/h2&gt;

&lt;p&gt;For the convenience of all parties involved, you will be running all your code in the comfort of your own browser! There will be nothing that you need to install on your system, unless you want to - in which case, feel free. Not much will change. &lt;/p&gt;

&lt;p&gt;I &lt;em&gt;&lt;strong&gt;HIGHLY&lt;/strong&gt;&lt;/em&gt; recommend using a desktop or a laptop to follow this course. In terms of mobile - tablets and smartphones will work, but it won't be easy. At all.&lt;/p&gt;

&lt;p&gt;For a small taste of what we're going to be doing, I encourage you to do the following - &lt;/p&gt;

&lt;p&gt;You can go two ways from here. This procedure will have to be followed for every single assignment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you want to keep track of your progress, you can &lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Go to [repl.it](https://repl.it/languages/Python3), and create an account. Any provider will do. Then, make sure you are signed in
2. Come back to this post. Start typing in the REPL below, and type what you want.
3. In a few seconds, you'll see a message - "REPL Forked". Forking a REPL is akin to making a copy of the REPL that you can keep in your own account, but with the same base template. It prevents you from having to copy-paste.
4. Now, a copy of the template REPL is saved in your account! you can refer to it at any point, and you can start editing the code right there, and run it just the same.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;If you don't want to keep track of your progress, feel free to edit the code right below. Your changes will not be saved, and you won't be able to keep track of your progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you're done making the changes that you want, press the LARGE GREEN PLAY BUTTON, (imagine some sound effect here) and watch your code run - run like the wind.&lt;/p&gt;

&lt;p&gt;(For those of you wondering, REPL stands for &lt;code&gt;Read, Edit and Print Loop&lt;/code&gt;)&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@AnirudhRowjee/SiennaEnragedPoint?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  When can I get started? Do I have to sign up 📝 ?
&lt;/h2&gt;

&lt;p&gt;You can get started as soon as the first post comes out! There is no charge. No expenses. If enough people in the comments want to, I'll start a whatsapp group where everyone can discuss the course and everything. I'm open to alternative arrangements, and you can always send me an email.&lt;/p&gt;

&lt;p&gt;Happy Coding! 💻&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Github Policeman - find out which of your repositories don't have a LICENSE</title>
      <dc:creator>Anirudh Rowjee</dc:creator>
      <pubDate>Tue, 06 Oct 2020 20:35:58 +0000</pubDate>
      <link>https://dev.to/anirudhrowjee/github-policeman-find-out-which-of-your-repositories-don-t-have-a-license-d66</link>
      <guid>https://dev.to/anirudhrowjee/github-policeman-find-out-which-of-your-repositories-don-t-have-a-license-d66</guid>
      <description>&lt;p&gt;Inspired by &lt;a href="https://medium.com/adobetech/how-to-combine-rest-api-calls-with-javascript-promises-in-node-js-or-openwhisk-d96cbc10f299"&gt;this&lt;/a&gt; Medium article, I built Github Policeman, by means of which I learned about Hooks and making API calls in React. &lt;/p&gt;

&lt;p&gt;In essence, it queries the Github API by username, and lets you know licensing statistics for your public Github repos, and gives you the links to all the ones that don't have a license.&lt;/p&gt;

&lt;p&gt;you can check out the live demo &lt;a href="https://github-policeman.netlify.app"&gt;here&lt;/a&gt;, and the Github Repository &lt;a href="https://github.com/anirudhRowjee/github-policeman"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;I would love any and all feedback on this application - thank you for your time!&lt;br&gt;
Keep Hacking!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Looking for Feedback - Personal Portfolio</title>
      <dc:creator>Anirudh Rowjee</dc:creator>
      <pubDate>Sun, 04 Oct 2020 09:05:08 +0000</pubDate>
      <link>https://dev.to/anirudhrowjee/looking-for-feedback-personal-portfolio-5cpn</link>
      <guid>https://dev.to/anirudhrowjee/looking-for-feedback-personal-portfolio-5cpn</guid>
      <description>&lt;p&gt;Hey, Dev Community! &lt;/p&gt;

&lt;p&gt;All of you are awesome developers, and I must take advantage of that to ask, humbly, that you review my &lt;a href="https://anirudhrowjee.xyz"&gt;portfolio page&lt;/a&gt;. Please feel free to go all-out with your feedback - I want to know what you like, and especially what you don't like. &lt;/p&gt;

&lt;p&gt;Thank you for your time!&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Tales from the config rabbit hole - and some advice</title>
      <dc:creator>Anirudh Rowjee</dc:creator>
      <pubDate>Wed, 16 Sep 2020 16:47:32 +0000</pubDate>
      <link>https://dev.to/anirudhrowjee/tales-from-the-config-rabbit-hole-and-some-advice-3505</link>
      <guid>https://dev.to/anirudhrowjee/tales-from-the-config-rabbit-hole-and-some-advice-3505</guid>
      <description>&lt;p&gt;We've all been there before - as you stare at your screen with bleary eyes, you wonder why the 218397218th color scheme/plugin you've selected hasn't soothed your senses yet. Your plugin manager is crying for help. Not to mention, you've got absolutely zero work done!&lt;/p&gt;

&lt;p&gt;Falling down the config rabbit hole like this is usually a huge time sink, and leaves you with zero motivation to actually get back to what you wanted to do. As people who've overcome this, &lt;strong&gt;&lt;em&gt;what is your advice to beginners who often find themselves in this situation&lt;/em&gt;&lt;/strong&gt;? Any stories would also be appreciated!&lt;/p&gt;

&lt;p&gt;(also, feel free to leave links/screenshots to your own setup in the comments! In the event someone still in the rabbit hole chances upon this post, you might help end their indecision.)&lt;/p&gt;

&lt;p&gt;Also, thank you all for the warm welcome to the dev.to community! This is my first post, so please be kind 😄&lt;/p&gt;

&lt;p&gt;~ &lt;span&gt;Photo by &lt;a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Markus Spiske&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/programmer?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>vim</category>
      <category>vscode</category>
      <category>github</category>
    </item>
  </channel>
</rss>
