<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Rohit Pratti</title>
    <description>The latest articles on Forem by Rohit Pratti (@brohittv).</description>
    <link>https://forem.com/brohittv</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%2F189160%2F99e5ed45-458a-4eae-b806-302f6312f60e.jpg</url>
      <title>Forem: Rohit Pratti</title>
      <link>https://forem.com/brohittv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/brohittv"/>
    <language>en</language>
    <item>
      <title>Why we should be  testing with Cypress!</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Sun, 24 Nov 2019 01:50:07 +0000</pubDate>
      <link>https://forem.com/brohittv/why-we-should-be-testing-with-cypress-222c</link>
      <guid>https://forem.com/brohittv/why-we-should-be-testing-with-cypress-222c</guid>
      <description>&lt;p&gt;Hello everyone, today I will explain why to use Cypress to test your front-end components its really easy and honestly anyone can learn to use it!&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Cypress...
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;THE UI&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The awesome part about Cypress Testing is the Cool GUI that comes with the software so you don't have to test everything in CMD line, it is really self explanatory and uses google chrome to test your program!&lt;/p&gt;

&lt;p&gt;All you need to do is have your front-end and back-end(if the components require the back-end) servers running and click run tests! It looks like this!&lt;/p&gt;

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

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

&lt;p&gt;The top Image is the dashboard this allows you to pick which tests you want to run...&lt;/p&gt;

&lt;p&gt;The Second Image is the actual tests being run in google chrome, the great advantage of this is you can actually watch the tests being run... and find out exactly what step in the process the tests are failing! this makes bug hunting so much easier and trust me it makes you a better programmer!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress does not use Selenium&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most end-to-end testing tools are Selenium-based, which is why they all share the same problems. To make Cypress different, they built a new architecture from the ground up. Whereas Selenium executes remote commands through the network, Cypress runs in the same run-loop as your application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress works on any front-end framework or website.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cypress tests anything that runs in a web browser. All of the architecture surrounding Cypress is built to handle modern JavaScript frameworks especially well. They have hundreds of projects using the latest React, Angular, Vue, Elm, etc. frameworks. Cypress also works equally well on older server rendered pages or applications.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress tests are only written in JavaScript.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While you can compile down to JavaScript from any other language, ultimately the test code is executed inside the browser itself. There are no language or driver bindings - there is and will only ever be just JavaScript.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress is all in one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Writing end-to-end tests takes a lot of different tools to work together. With Cypress you get multiple tools in one. There is no need to install 10 separate tools and libraries to get your test suite set up. They have taken some of the best-in-class tools you are likely already familiar with and made them all work together seamlessly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress is for developers and QA engineers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The tests don't require you to be a developer to understand or write them they are super readable and the one can learn how to write cypress tests within minutes and all you need to start is &lt;code&gt;npm install cypress&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is good for devs because we don't have to waste time writing tests that could be used for solving tests&lt;/p&gt;

&lt;p&gt;and this is good for QA engineers because they don't have to know complex javascript logic to understand what the test is supposed to do.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cypress runs much, much faster.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These architectural improvements unlock the ability to do TDD with full end-to-end tests for the very first time. Cypress has been built so that testing and development can happen simultaneously. You can develop faster while driving the entire dev process with tests because: you can see your application; you still have access to the developer tools; and changes are reflected in real time. The end result is that you will have developed more, your code will be better, and it will be completely tested.&lt;/p&gt;

&lt;p&gt;Their Dashboard service pushes this optimization even further!&lt;/p&gt;

&lt;p&gt;To learn how to use cypress visit cypress.io or check out their docs at &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.cypress.io/guides/overview/why-cypress.html" rel="noopener noreferrer"&gt;https://docs.cypress.io/guides/overview/why-cypress.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;or maybe I'll just write another blog... we'll see&lt;/p&gt;

</description>
      <category>cypress</category>
      <category>testing</category>
    </item>
    <item>
      <title>How do I.... useState?</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Sun, 10 Nov 2019 05:46:24 +0000</pubDate>
      <link>https://forem.com/brohittv/how-do-i-usestate-26l2</link>
      <guid>https://forem.com/brohittv/how-do-i-usestate-26l2</guid>
      <description>&lt;p&gt;Hey Its me back again with another React Hook blog, this time its useState!&lt;/p&gt;

&lt;h1&gt;
  
  
  What is useState?
&lt;/h1&gt;

&lt;p&gt;well as I mentioned earlier, useState is a react hook that lets you access state in functional components, if you were not aware functional components don't have access to a state! however the useState hook lets you work around this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1, import useState
&lt;/h2&gt;

&lt;p&gt;This is a simple step and it gives you access to the useState library&lt;/p&gt;

&lt;p&gt;you could simply say &lt;code&gt;React.useState()&lt;/code&gt; every-time, however that can be bothersome so when you import React you can destructure(which is not a real word btw..) by going &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Import React, {useState} from 'react';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;this is basic stuff but now every-time you want to use the function you have access to it as &lt;code&gt;useState&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2, how do you use it?
&lt;/h2&gt;

&lt;p&gt;Using this hook is almost as simple as importing it..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OC0PjkVt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dujlo8997mvafwex81uf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OC0PjkVt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dujlo8997mvafwex81uf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So theres two things you can notice right off the bat, there is an array in this case we have a &lt;code&gt;count&lt;/code&gt; and a &lt;code&gt;setCount&lt;/code&gt; function, and basically what this does is the first value of the array is what is being stored in the state in this case we are storing some count, &lt;/p&gt;

&lt;p&gt;and the setCount is a function(which can be named anything "updateCount" "blah" anything..) we are assigning to the count value in state and we are saying every-time I use setCount, do this with that state... and update the value of count...&lt;/p&gt;

&lt;p&gt;for example if I have a button that increases the count every time you click it, all you have to do is... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m-DVW2hb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/yzqd4v0mp0vw3b6jzpw9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m-DVW2hb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/yzqd4v0mp0vw3b6jzpw9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;simply "set the count" to whatever the original count is +1, you may find this similar the &lt;code&gt;setState&lt;/code&gt; function in class functions, and thats because thats exactly what it is doing, except this setCount is specific to the count value in state..&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3, updating multiple Values at once
&lt;/h2&gt;

&lt;p&gt;Unlike this.setState() where it automatically merges the rest of the state... you can run into a problem where if you have multiple counts for example.. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tg2RPXgh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rj89mmtleaxrjv21ufsi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tg2RPXgh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rj89mmtleaxrjv21ufsi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;well now if you try to update the state you need to change the function otherwise it won't know which count to update, and even worse it'll reset the value of the second one unless you merge the state&lt;/p&gt;

&lt;p&gt;so you can fix this issue like this.. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LYCiePXn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d3ma5p9rzb8hv83tgjbg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LYCiePXn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d3ma5p9rzb8hv83tgjbg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;now,&lt;br&gt;
it first gets the state of everything,&lt;br&gt;
then it knows to update the first count (once again currentState can be called anything, "state" , "blah" you're just saying take the state and only update this one value)&lt;/p&gt;

&lt;p&gt;and to simply just replace the rest of the values with the original data.. now if I click the button it will still increase the value that is specified in this case just count...&lt;/p&gt;

&lt;p&gt;however another great thing about useState is you can call it anywhere and call multiple useStates for multiple different values.. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rIuEAVZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w4t3tb3k36sz2wwmpurc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rIuEAVZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w4t3tb3k36sz2wwmpurc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so now count2 isn't affected unless you call the &lt;code&gt;setCount2&lt;/code&gt; function because that is the only updater function tied to that value in state!&lt;/p&gt;

&lt;p&gt;Thats it for my quick introduction to useState.. I hope it is helpful..&lt;/p&gt;

&lt;p&gt;its very easy to use and is usually the base for a lot of custom Hooks which I may talk about in my next blog!&lt;/p&gt;

</description>
      <category>reacthooks</category>
    </item>
    <item>
      <title> How to useEffect vs componentDid/Will-unmount</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Tue, 29 Oct 2019 10:16:14 +0000</pubDate>
      <link>https://forem.com/brohittv/how-to-useeffect-vs-componentdid-will-unmount-i82</link>
      <guid>https://forem.com/brohittv/how-to-useeffect-vs-componentdid-will-unmount-i82</guid>
      <description>&lt;p&gt;I was working on a project and I had to close out some modals, and realized there were both Class component modals and Functional component modals that were involved... so I decided for the class component I would use the life cycle methods and use useEffect for the functional components heres what they look like&lt;/p&gt;

&lt;h2&gt;
  
  
  Lifecycle method
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  useEffect Method
&lt;/h2&gt;

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

&lt;h3&gt;
  
  
  The Similarities
&lt;/h3&gt;

&lt;p&gt;Let's get the easy stuff out of the way how are they similar..?&lt;/p&gt;

&lt;p&gt;thats right!&lt;/p&gt;

&lt;p&gt;the &lt;strong&gt;handleClick&lt;/strong&gt; function is the same barring the minor difference of using "const" in the functional component the logic of the actual function is pretty simple, if you click on the modal background or hit the &lt;em&gt;esc&lt;/em&gt; key it should call the function that closes the modal.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Differences
&lt;/h3&gt;

&lt;p&gt;Now whats the difference? its how you handle the &lt;strong&gt;event-listeners&lt;/strong&gt;,&lt;br&gt;
you might notice that in class components if you have an &lt;em&gt;event-listener&lt;/em&gt;&lt;br&gt;
in it, and it &lt;em&gt;console.log("hello")&lt;/em&gt; and go to you google-developer tools &lt;br&gt;
and checked console, you might notice it console logs it 3 times, this is because you haven't done what I call a clean up listener aka the &lt;strong&gt;removeEventListener&lt;/strong&gt; function call so it doesn't know when to stop listening to the click, once the modal is closed there is no need for the event listener to be active! other wise it would open and close immediately when you tried to open it!&lt;/p&gt;

&lt;p&gt;in the useEffect you do this using a "clean-up function" which you can see in the return function, this removes the event listener when the component is no longer rendered,&lt;/p&gt;

&lt;p&gt;the equivalent to this in the class component is &lt;strong&gt;componentWillUnmount&lt;/strong&gt;&lt;br&gt;
inside this you can add the clean up function and now the event listener is only active while the modal is open!&lt;/p&gt;

&lt;p&gt;pretty fun and simple function that uses some cool features!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>books</category>
      <category>lifecycle</category>
    </item>
    <item>
      <title>How to install and Set up Python on Mac</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Thu, 24 Oct 2019 06:14:50 +0000</pubDate>
      <link>https://forem.com/brohittv/how-to-install-and-set-up-python-on-mac-29fd</link>
      <guid>https://forem.com/brohittv/how-to-install-and-set-up-python-on-mac-29fd</guid>
      <description>&lt;p&gt;Hello Everyone this is a simple guide on how to quickly set up python on a mac and be able to switch between versions using pyenv!&lt;/p&gt;

&lt;p&gt;First Note that all Mac OS come with Python 2.7 out the gate which can be helpful to learn but You might want to use Python 3 for more serious development!&lt;/p&gt;

&lt;p&gt;This Blog will help you set this up in a quick and simple fashion!&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1 - Set up Homebrew
&lt;/h1&gt;

&lt;p&gt;You will first need homebrew installed to be able to install everything straight from terminal.&lt;/p&gt;

&lt;p&gt;just copy and paste this into your terminal: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2 - Install pyenv
&lt;/h1&gt;

&lt;p&gt;Now we will install pyenv to help us manage and install different versions of Python, the pyenv docs describe its functionality as &lt;/p&gt;

&lt;p&gt;"pyenv lets you easily switch between multiple versions of Python. It’s simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well."&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Brew install
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;brew install pyenv&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add pyenv initializer to shell startup script
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;echo 'eval "$(pyenv init -)"' &amp;gt;&amp;gt; ~/.bash_profile&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reload your profile
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;source ~/.bash_profile&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3 - Install Python using pyenv
&lt;/h1&gt;

&lt;p&gt;## List of Python versions&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    You can look at a list of all the different python versions that 
    can be installed using the command 

   `pyenv install --list`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;## Installing Selected Version &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    Once you have selected a version you want to use install it using 
    the command 

   `pyenv install &amp;lt;version&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h1&gt;
  
  
  Step 4 - Switching to the installed version
&lt;/h1&gt;

&lt;p&gt;## Viewing all installed versions&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  You can look at the list of all installed versions of python using 
  the command 

  `pyenv versions`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;## Setting Global Version &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Set the global or default python version using the command

 `pyenv global &amp;lt;version&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;## Setting Local Version&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Set the local version for the repo by cd'ing into the repo then 
  using the command 

 `pyenv local &amp;lt;version&amp;gt;` 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;## Checking Current Version in user&lt;/p&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  You can always check what version of Python is currently being used &lt;br&gt;
  by using the command

&lt;p&gt;&lt;code&gt;python -V&lt;/code&gt; or &lt;code&gt;python --version&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Conclusion&lt;br&gt;
&lt;/h1&gt;

&lt;p&gt;pyenv is a great tool to use to easily manage and switch between Python&lt;/p&gt;

&lt;p&gt;for more about pyenv look at their documentation here : &lt;br&gt;
  &lt;a href="https://github.com/pyenv/pyenv/wiki"&gt;https://github.com/pyenv/pyenv/wiki&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>pyenv</category>
    </item>
    <item>
      <title>Machine Learning: Intro</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Tue, 20 Aug 2019 16:36:30 +0000</pubDate>
      <link>https://forem.com/brohittv/machine-learning-intro-221f</link>
      <guid>https://forem.com/brohittv/machine-learning-intro-221f</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dOHy73St--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mc0gblv9jxx1vlcbnepx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dOHy73St--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mc0gblv9jxx1vlcbnepx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the world around us Algorithms surround us in our daily lives all the time, you might be reading this blog because of you searched something on google which put your search term through some algorithms and brought this Blog to you because I clearly understand machine learning at the highest level possible.... (NOT) &lt;/p&gt;

&lt;p&gt;Anyway when you click on this blog the algorithm takes note...when you visit facebook or youtube there is an algorithm that brings your the stuff you see on the home page based on stuff you like, when you buy something online there is an algorithm that is watching your purchase and making suggestions to you based on stuff other people may have purchased..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BnTUMJlC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/944vivd34a50seeb3xy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BnTUMJlC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/944vivd34a50seeb3xy5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here you can see its college season and an algorithm has brought me stuff I might need when I go back to school...&lt;/p&gt;

&lt;p&gt;Theres also algos at your bank watching transactions to make sure there aren't any fraudulent transactions..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TanU2-aG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/s7mnw4cht9megihe6yr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TanU2-aG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/s7mnw4cht9megihe6yr4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in the stock market there a bunch of bots trading with.... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tSINgnmk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hdo16inwi29z6xw7fkbl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tSINgnmk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hdo16inwi29z6xw7fkbl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You guessed it! More bots..&lt;/p&gt;

&lt;p&gt;So how do these algorithms work??&lt;/p&gt;

&lt;p&gt;In the OLDSCHOOL days we built this algorithm bots with stuff we could explain like If (number === 1) {return number} and you would get the output "1"! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hueNrmA3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/61onmetgdbq0598wmg5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hueNrmA3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/61onmetgdbq0598wmg5f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But there are many problems in the world that we can not just write simple instructions for.. like for example there are billions of stock transactions happening in the world at once, how can a bot determine which one are legit and which ones are fraudulent?&lt;/p&gt;

&lt;p&gt;Theres a BAJILLION videos on youtube which 8 should the bot bring to you to watch? in our daily world these bots are constantly being asked questions and They are giving us answers... now these might not be perfect answers but it is the best answer it knows that it can give us at the time and most of the time its pretty accurate! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IlXnYe9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nj8nr4y0dqkwhnww77eh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IlXnYe9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nj8nr4y0dqkwhnww77eh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However how do these bots work not really anyone knows.. including the people that "build" these bots &lt;/p&gt;

&lt;p&gt;This is because the companies that use these bots aren't only secretive about the information because these bots are very valuable employees to the company but they are also not completely sure themselves... see its similar to how a person learns if I point at a bee and tell you that it is a bee.. you are able to understand and now every time you see a bee hopefully you are able to tell that it is a bee and not one of those nasty wasps&lt;/p&gt;

&lt;p&gt;but if I were to ask you how did you remember that was a bee.. you would be like IDK and if someone asked me how did I teach you that was a bee I would be like... uhhh IDK!&lt;br&gt;
While an individual neuron in the brain and clusters of neurons in code may be understood.. the whole is beyond the grasp of our knowledge&lt;/p&gt;

&lt;p&gt;this is kind of similar to how machine learning works on the basic level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XT_5fPTG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qrbqdzmpx4l2nws12yvj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XT_5fPTG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qrbqdzmpx4l2nws12yvj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--17n-k-84--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1m8uutcr1r3zq1tg2o3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--17n-k-84--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1m8uutcr1r3zq1tg2o3a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin we must first build a builder bot and teacher bot...&lt;br&gt;
These bot brains are much simpler to understand and a really good programmer could make them given the time and effort. &lt;br&gt;
And their job? well its just like their name suggests.. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T_btNaw7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/83oaedpghjo3e3k364lc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T_btNaw7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/83oaedpghjo3e3k364lc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The builder bot builds bots although its not very good at them, this is because the builder bot is building these robots towards a direction but almost at random... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bzqIB0zV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xys6o5oew1jdiyo9ckk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bzqIB0zV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xys6o5oew1jdiyo9ckk5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this leads to some pretty... special student bots for the teacher bot to.. yes teach... however the teacher bot itself doesn't know the difference from a 3 and a Bee because if it did then... why is this blog even a thing?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZnI-vkx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k2cwzz1u1nwago2lbjfu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZnI-vkx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k2cwzz1u1nwago2lbjfu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead we give the teacher bot a bunch of 3 photos and a bunch of bee photos and the answer key to which is what. &lt;/p&gt;

&lt;p&gt;Teacher bot can't teach... but teacher bot sure as hell can test..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_8QWBFIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4c1yp9ka6j2lgu5zlkcr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_8QWBFIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4c1yp9ka6j2lgu5zlkcr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The student bots try really really hard on the test but they are bad at what they do.. like really bad.. like they can't even pass the tests...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BuL0QuFH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qmk2unhlht55d8nnt6is.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BuL0QuFH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qmk2unhlht55d8nnt6is.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And its not really their fault.. I mean after all they were made by a bot that doesn't know what a 3 and Bee is so how is it going to make a bot that knows what a 3 and Bee is while just making random connections in the bot brain.. So the poor little student bots take their bad tests home unlike me in 6th grade however they don't know the fate that awaits them...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bDQB_YC---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k9gzler7h73vw2xavzmi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bDQB_YC---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k9gzler7h73vw2xavzmi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ones that did the best are put to one side... and well the others...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GyrJtoqF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mcw9rlmrufpe8blvb8r4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GyrJtoqF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mcw9rlmrufpe8blvb8r4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;yeah...&lt;/p&gt;

&lt;p&gt;anyway builder bot takes the ones that are left makes copies and makes a bunch of random changes again and sends these new bots off to school again.. some of them a little smarter &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D2R-o3Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3gwe77yg03fwv6fuq7aq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D2R-o3Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3gwe77yg03fwv6fuq7aq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this cycle happens again... and again... and again... and again..&lt;/p&gt;

&lt;p&gt;you may ask me hey Rohit, if the builder is building at random and teacher that doesn't teach and only tests, in theory shouldn't work or at the least it shouldn't be efficient.&lt;br&gt;
Well you would be right, if we were working with just 1 or 13 bots like a regular school classroom and it took the builder bot real world time to build these new bots.&lt;/p&gt;

&lt;p&gt;however teacher bot isn't just teaching any regular old 13 student classroom but instead its teaching an infinite warehouse of student bots&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D2R-o3Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3gwe77yg03fwv6fuq7aq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D2R-o3Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3gwe77yg03fwv6fuq7aq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The test isn't just 10-15 questions but more like a million questions all asking whether something is a bee or a 3 and each bot is being taken back and built instantly with the "improvements" random or not when its a million random changes one of them has to eventually lucky enough to be barely tell the difference between a bee and a 3&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0pnHEAfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/kpkas0br09efvtpznqf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0pnHEAfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/kpkas0br09efvtpznqf3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As the process keeps repeating the score keeps going higher and higher &lt;br&gt;
and the score required to survive keeps going higher and higher&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J3DWcVUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/47qieiprvperds78korr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J3DWcVUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/47qieiprvperds78korr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eventually you do get a bot that can really tell the difference between a bee and a 3 from a picture it has never seen before &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i0znRaY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lefkh0fjbjfmqwofv8ce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i0znRaY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lefkh0fjbjfmqwofv8ce.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but how the student bot does this neither the builder bot or the teacher bot of the person who is overseeing this project know... after making so many random changes some useful some not the code for the bot gets very complicated...&lt;/p&gt;

&lt;p&gt;While a single line of code and multiple functions may be understood the whole is beyond our grasp of knowledge.. &lt;/p&gt;

&lt;p&gt;And this can be frustrating because although the bot is doing what it has been taught to do very well... it is only good at that one thing and to teach it a new thing you would have to start the whole process over again with the new lesson implemented into the testing,&lt;br&gt;
in our scenario the bot is very good at pictures but what happens if a picture is upside down or if its a video? the bot is stumped again... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gq9Mo1H9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5j9697wu6c736ghhk6u8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gq9Mo1H9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5j9697wu6c736ghhk6u8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;or things that are very clearly not a bee.. get put into the bee folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--im_WSmGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/efh8mvacty0a8wgqhczc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--im_WSmGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/efh8mvacty0a8wgqhczc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and this why companies are always collecting data because now the human overseers have to write longer tests which more questions and try to include questions the best bots get wrong.. so when you click on the traffic signals in the picture to check if you are not a bot they are also collecting information to see what makes us humans different from the bots!&lt;/p&gt;

&lt;p&gt;This is because more data means longer tests which means more efficient bots &lt;/p&gt;

&lt;p&gt;and this is the basics of how machine learning next we are going to talk about how this concept is used in combination with your ads that are being tracked to keep you on certain companies products longer DUN DUN DUN heres some words for thought if the student bot could learn to like the same stuff as you... would it be able to find you new stuff to keep being engaged?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YDOQ3jus--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jmww7d6xqo805eoijgal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YDOQ3jus--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jmww7d6xqo805eoijgal.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would like to credit: &lt;a href="https://www.youtube.com/watch?v=R9OHn5ZF4Uo"&gt;https://www.youtube.com/watch?v=R9OHn5ZF4Uo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the great pictures and awesome video on this topic in better depth and understanding would definitely go check it out!&lt;/p&gt;

</description>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Personalizing your Google Ad Settings </title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Thu, 08 Aug 2019 17:29:25 +0000</pubDate>
      <link>https://forem.com/brohittv/personalizing-your-google-ad-settings-3fch</link>
      <guid>https://forem.com/brohittv/personalizing-your-google-ad-settings-3fch</guid>
      <description>&lt;h1&gt;
  
  
  Google Ads
&lt;/h1&gt;

&lt;p&gt;You see google ads everywhere whether its a youtube video or a just a gaming website, but have you ever noticed sometimes the ads are about stuff that you were thinking about and now you're paranoid that the govt is listening to you and the FBI guy behind your screen knows all your deepest darkest secrets...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1nUD4Nt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9n9awpio655m5nntzg7j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1nUD4Nt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9n9awpio655m5nntzg7j.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  welll... while that isn't completely wrong it isn't exactly completely right either
&lt;/h2&gt;

&lt;p&gt;So today I will be talking about google ad settings and how to personalize them...&lt;/p&gt;

&lt;p&gt;Lets begin with how to get to your google ad settings... simple click &lt;a href="https://lmgtfy.com/?q=google+ad+settings"&gt;this&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm just kidding although you can just google the term "google ad settings" you can also just go directly &lt;a href="https://adssettings.google.com/authenticated"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  BEGIN
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dG9RpVQV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vvlrq12f40q5nsfw3cp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dG9RpVQV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vvlrq12f40q5nsfw3cp6.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the first thing you should see clearly it allows you to choose targeted ads, now Ideally you do want targeted ads because they would be catered to you specifically, however the coolest thing about this page is you can see what google thinks about you and who you are as a person based off all the activity you've had open while exploring google.. so if you had some music playing while on google, google knows the song and then adds it to your profile.. here is where you can see them&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aaYLgye0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vwm3plvjv81kqa5zoix8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aaYLgye0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vwm3plvjv81kqa5zoix8.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see google has my correct age.. which can be updated by just clicking on it so if you guys wanted to know your internet age based on what you browse this is a great way to check it out! Now i've also noticed a couple ads that I particularly don't care for which are the auto insurance and Chevrolet, which means I don't want to see ads for these things... well the fix for that is simple! &lt;/p&gt;

&lt;p&gt;Just click on the ads you dont want to see like so&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9AhGnN_0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zwc45yua9e7thi7cr9d7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9AhGnN_0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zwc45yua9e7thi7cr9d7.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And just click turn off.. now google understands you don't want to see those ads but if google "feels" like you've been watching videos about auto insurance it may turn that ad setting back on again and adjust your age based of those videos.&lt;/p&gt;

&lt;h1&gt;
  
  
  Getting Deep
&lt;/h1&gt;

&lt;p&gt;But the google ad settings can be even more indepth.. you can click on the ad setting, and manage what activity google tracks and doesn't in this page right here.. &lt;a href="https://myactivity.google.com/myactivity"&gt;https://myactivity.google.com/myactivity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Sk4FuqUB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cpoj03dmgcn22lrbv7ev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Sk4FuqUB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cpoj03dmgcn22lrbv7ev.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your activity page shows all the history and data that google keeps about you.. this is technically that fbi agent behind your desk that knows everything about you including stuff you didn't know you likes.. now how it has this information and how its able to use this information to bring you the right video to watch next I will explain in my next blog about basic machine learning.. for now I will explain the activity page &lt;/p&gt;

&lt;p&gt;In my case we are looking as some of my YouTube history.. google is using my Youtube history to give my profile categories of things it "thinks" I would like and brings me ads related to this... However note that websites you visit while incognito or using a private browser that doesnt save cookies will not let google gather the information about you... however don't be fooled because every ad you click on still saves cookies about you and thats why when you're up at 2 am you get that dating app ad because google knows you're lonely coder and seek and want friends, ANYWAY YOU GET THE POINT... make sure you know who's tracking what cookies 😂&lt;/p&gt;

&lt;h1&gt;
  
  
  Using this to your Advantage
&lt;/h1&gt;

&lt;p&gt;You can use your ad settings to your advantage in different ways... first being you can edit your profile to more represent you however google will now be still throwing the same old ads and that can get boring... fast..&lt;/p&gt;

&lt;p&gt;So the best way to use this to your advantage is to be specific but broadly specific remove the intricate details and let google take random shots at you checking whether or not you like the ad... and send it to its teacher bots....&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jW84ohxH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/28nvgnj0lgit10rxs26q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jW84ohxH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/28nvgnj0lgit10rxs26q.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...foreshadowing for my next blog&lt;/p&gt;

</description>
      <category>google</category>
    </item>
    <item>
      <title>Game Development and Programming</title>
      <dc:creator>Rohit Pratti</dc:creator>
      <pubDate>Tue, 02 Jul 2019 07:28:31 +0000</pubDate>
      <link>https://forem.com/brohittv/game-development-and-programming-5ea1</link>
      <guid>https://forem.com/brohittv/game-development-and-programming-5ea1</guid>
      <description>&lt;p&gt;Studies from as recent as 2017 show that the video game industry is worth more than $80Billion and projected to cross $90Billion by 2020 and this is just in the US&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.wepc.com/news/video-game-statistics/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.wepc.com%2Fwp-content%2Fuploads%2F2018%2F05%2F111-global-video-games-market-value.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as you can see every year more and more video games are being bought and as a gamer myself I don't see this trend changing anytime soon, games are super popular because there are so many genres with so many companies pumping out games in just about every category and the graphics and stories and levels just keep getting better and better!... but behind every great video game is a poorly credited video game developer team &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsteemitimages.com%2F640x0%2Fhttps%3A%2F%2Fssl-forum-files.fobby.net%2Fforum_attachments%2F0034%2F5023%2Fchart.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsteemitimages.com%2F640x0%2Fhttps%3A%2F%2Fssl-forum-files.fobby.net%2Fforum_attachments%2F0034%2F5023%2Fchart.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are some video game companies that you may know... you may even play games by some of these companies.. I personally am a huge nintendo smash bros fan and participate in melee tournaments when I get the chance pretty often! however when you see these game companies you immediately know what your favorite games by them are.. ok so lets try this Lets look at this list of people &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hideo Kojima&lt;/li&gt;
&lt;li&gt;Gabe Newell&lt;/li&gt;
&lt;li&gt;John Carmack&lt;/li&gt;
&lt;li&gt;Masahiro Sakurai&lt;/li&gt;
&lt;li&gt;Markus Persson&lt;/li&gt;
&lt;li&gt;Andrew and Paul Gower&lt;/li&gt;
&lt;li&gt;Alex Seropian&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You probably don't recognize any of these names much less the games they helped mostly create... now granted all these men are very well compensated for their contribution to the video game world and are all worth millions of dollars, as a coder that is the secret goal is to be rich for something you made and nobody knows about you... however although I find it odd at first I realize that its pretty normal in the entertainment industry, Usually every movie only has the studios that made it at the beginning, and musicians usually are given the credit but their labels do present themselves all over the product... and in video games and movies and music however there is an end credits where everyone is give their rightful due...&lt;/p&gt;

&lt;p&gt;So instead of complaining about it I decided to give these some of my favorite game developers credit and talk a little about their games and what code they used!&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Andrew, Ian and Paul Gower - Runescape
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmassivelyop.com%2Fwp-content%2Fuploads%2F2015%2F05%2Frsos-696x229.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmassivelyop.com%2Fwp-content%2Fuploads%2F2015%2F05%2Frsos-696x229.jpg" alt="RuneScape" title="RuneScape"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Created by the three Gower brothers and published in 2001, Runescape is an MMORP or better known as a Massive Multiplayer Online Role Player, which if you've played any role playing games is pretty easy to understand you are a person born in a world called runescape and you have different skills and levels and quests that you can do and everything is basically controlled with a mouse! such a simple game mechanics and its ability to be afk is what made the game madly popular and still has over 70k active users online almost at all times! although the Gower brothers are no longer with the company jagex, they all walked away very rich worth over 305 million dollars in total... &lt;/p&gt;

&lt;p&gt;However we are here to talk about what made their game so revolutionary.. lets begin with what it was written in... &lt;/p&gt;

&lt;p&gt;"We write in a scripting language called RuneScript, which our Game Engine team has created specifically for making RuneScape content. The Java-based game engine then reads this RuneScript code and makes it all work. RuneScript is constantly being changed and expanded as we add new features to it to allow it to do new things." - Mod John Jagex Dev Team&lt;/p&gt;

&lt;p&gt;Thats right, runescape is written in its own language that is similar to javascript and wiki html, it uses a java engine to translate the code into html&lt;/p&gt;

&lt;p&gt;"Hmm, syntax wise it's similar to any C-style language, except variable names are prefixed with their type (eg. %varname is an integer). We also lack full array support. Other than that, it'd do pretty much anything you could do in C or Java." - Mod Chris E Jagex Game Engine QA&lt;/p&gt;

&lt;p&gt;Here is some sample code.. if you notice the syntax is very similar to a basic object oriented language such as ruby or java!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fvignette.wikia.nocookie.net%2Frunescape2%2Fimages%2F0%2F0e%2FRunescript.png%2Frevision%2Flatest%3Fcb%3D20140515184821" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fvignette.wikia.nocookie.net%2Frunescape2%2Fimages%2F0%2F0e%2FRunescript.png%2Frevision%2Flatest%3Fcb%3D20140515184821" alt="Image result for runescript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to learn more about runescape  visit : &lt;a href="https://runescape.wiki/" rel="noopener noreferrer"&gt;https://runescape.wiki/&lt;/a&gt; and &lt;a href="https://oldschoolrunescape.fandom.com/wiki/Old_School_RuneScape_Wiki" rel="noopener noreferrer"&gt;https://oldschoolrunescape.fandom.com/wiki/Old_School_RuneScape_Wiki&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;learning about runescript is difficult however and jagex keep it real top secret however they do have forums with active mods who are happy to answer questions about runescript and runescape they keep dev blogs similar to these! @ &lt;a href="https://www.runescape.com/community" rel="noopener noreferrer"&gt;https://www.runescape.com/community&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Masahiro Sakurai
&lt;/h2&gt;

&lt;p&gt;ahh Sakurai, boy do I love and hate this man.. I love him because he created possibly the greatest video game of all time.. Super Smash Bros melee a cross over fighting game between all of nintendo's video game franchise all stars &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FUfTa9uSfE43sI%2Fgiphy.gif%3Fcid%3D790b76115d1afefc306e434c737753e6%26rid%3Dgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FUfTa9uSfE43sI%2Fgiphy.gif%3Fcid%3D790b76115d1afefc306e434c737753e6%26rid%3Dgiphy.gif" alt="marth GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/2uxI1STtbkQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;However he also divided the community almost released two of the worst sequels ever, blah blah blah he has redeemed himself with the most recent version smash ultimate however today we are here to talk about smash and what it was written in.. which are C++, C and assembly language 6502 personally I don't know alot about these languages and plan to educate myself more but I do know that both Hal Labs and Sakurai's team worked night and day and many overtimes just to get the characters to work and the game to work perfectly, I bring up melee in this blog because till this date it is widely agreed that there has been no game inside and outside the smash bros franchise and fighting game franchises that has been able to match the movement options and fighting style of smash bros melee that mixes king of the hill concepts equally well with fighting game concepts and really somehow made the best fighting game of all time all through an accident, a code they had written to fix "clipping" along the ledges allowed characters to move and slide across the ground and this created a technique called "wave-dashing" &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/VbzKD5Zyl0uj5Onewr/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/VbzKD5Zyl0uj5Onewr/giphy.gif" alt="Animated GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This along with Dash dancing: &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpa1.narvii.com%2F6060%2F5e230f84683d2073beca08a58770fe1753c9a841_hq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpa1.narvii.com%2F6060%2F5e230f84683d2073beca08a58770fe1753c9a841_hq.gif" id="media-5d8a5759" alt="user uploaded image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and other advanced techniques allowed melee's movement to push the game to become one of the most watched competitive fighting games at most major competitive tournaments with huge crowd and pot prizes over $15k at a time!&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Alex Seropian/Bungie
&lt;/h2&gt;

&lt;p&gt;See growing up as a kids everyone I knew played Halo : Combat evolved, and until I wrote this blog I never thought about hey I wonder what code Halo was written in, Halo of course is one of the best first-person shooter series of all time, atleast the original series made by bungie and then its arguable if the new halos are really that good or not BUT once again we are not here to talk about my elitist opinions on video games... but we are here to talk about the code behind the game and the people behind it... Bungie was established by  Alex Seropian, and their first really successful game was Myth.. dont know much about Myth but it gave them enough traction to be bought out by Microsoft from take two which led to make Halo and actually this is where I started to learn that Runescape having its own language was actually an outlier and that Bungie just like most game developing companies used C++ and Java to create halo and used the same engine as Doom, Call of duty, which is the Quake 3 engine if you guys remember that game which was basically a stripped down version of all these games that they made as a test game of which most modern first person shooters are made and this realization led me to my final conclusion that not all games are original in terms of development yet they are code built on top of engines that already pre exist and then from there its a bit easier to make the game how you want when you dont have to create all the things such as movement and character models from scratch.. although most game developers do end up making their own models they try to avoid having to create a game engine... anyway focussing back on halo, halo would be one of the best selling games of the early to mid 2000's and would eventually loose out to the aforementioned call of duty.. another game built on the same engine also written in C++ The engine however can handle C, C++ and Python.. python games are more commonly found on the nintendo systems where the graphics burden isnt as heavy although I am once again not sure why that would matter for the language itself but its what I have discovered. So as I journey down this path about Game developers and their code I discover my next big target... the GAMING ENGINES!! coming soon to you&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fzj6NmJC6trBhm%2Fgiphy.gif%3Fcid%3D790b76115d1b06ec7a326139590c6ea1%26rid%3Dgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fzj6NmJC6trBhm%2Fgiphy.gif%3Fcid%3D790b76115d1b06ec7a326139590c6ea1%26rid%3Dgiphy.gif" alt="video game halo GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know my thoughts are really ADD and random but my blogs are a reflection of how my research progressed so its safe to assume the beginning and end of most of my blogs may not have a finite beginning and end point!&lt;/p&gt;

</description>
      <category>gaming</category>
      <category>history</category>
    </item>
  </channel>
</rss>
