<?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: Mishka</title>
    <description>The latest articles on DEV Community by Mishka (@thiscodeworks).</description>
    <link>https://dev.to/thiscodeworks</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%2F302033%2F55a83028-e73b-4f44-8718-bb3b9621ffec.jpg</url>
      <title>DEV Community: Mishka</title>
      <link>https://dev.to/thiscodeworks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thiscodeworks"/>
    <language>en</language>
    <item>
      <title>I built a Chrome Extension to save code snippets instantly</title>
      <dc:creator>Mishka</dc:creator>
      <pubDate>Wed, 03 Jun 2020 19:57:18 +0000</pubDate>
      <link>https://dev.to/thiscodeworks/i-built-a-chrome-extension-to-save-code-snippets-instantly-4fg2</link>
      <guid>https://dev.to/thiscodeworks/i-built-a-chrome-extension-to-save-code-snippets-instantly-4fg2</guid>
      <description>&lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;As someone learning to code I built a tool for other developers in the same boat. &lt;/p&gt;

&lt;p&gt;It's for saving that one piece of code that worked after (what seems like an eternity) of searching, trying and searching again. For the next time you'll need it. &lt;/p&gt;

&lt;p&gt;Save snippets by just selecting the text &amp;amp; right-click.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="http://thiscodeworks.com/extension"&gt;http://thiscodeworks.com/extension&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you find this helpful!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>showdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Looking for beta testers for Chrome Extension that helps people learning to code</title>
      <dc:creator>Mishka</dc:creator>
      <pubDate>Fri, 08 May 2020 09:16:49 +0000</pubDate>
      <link>https://dev.to/thiscodeworks/looking-for-beta-testers-for-chrome-extension-that-helps-people-learning-to-code-27fm</link>
      <guid>https://dev.to/thiscodeworks/looking-for-beta-testers-for-chrome-extension-that-helps-people-learning-to-code-27fm</guid>
      <description>&lt;p&gt;If you're interested, please sign up here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thiscodeworks.com/extension"&gt;https://www.thiscodeworks.com/extension&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks in advance!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>testing</category>
    </item>
    <item>
      <title>3 Code Snippets that Changed History</title>
      <dc:creator>Mishka</dc:creator>
      <pubDate>Sun, 08 Mar 2020 17:46:00 +0000</pubDate>
      <link>https://dev.to/thiscodeworks/3-code-snippets-that-changed-history-2a27</link>
      <guid>https://dev.to/thiscodeworks/3-code-snippets-that-changed-history-2a27</guid>
      <description>&lt;h2&gt;
  
  
  Three code snippets which I think are truly fascinating and have changed the world in recent history.
&lt;/h2&gt;

&lt;p&gt;I don't know about you, but back in school when we would study History it was the history of civilizations. From Alexander the Great to the rise and fall of the British Empire, I learned all there was about great leaders of the past and how each era impacted history.&lt;/p&gt;

&lt;p&gt;But the inventors who really changed the way we live were just names to memorize in Science class. Graham Bell invented the telephone in 1876. Thomas Edison built the first lightbulb in 1879. The Wright Brothers pioneered aviation in 1903. All fascinating people that each deserved a class of their own.&lt;/p&gt;

&lt;p&gt;However in recent history, some big defining moments that have changed us aren't even physical inventions, but just a few lines of code. While there are so many that have impacted our reality, three in particular stood out to me.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Apollo 11's BAILOUT Code (1969)
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POODOO    INHINT\
    CA  Q\
    TS  ALMCADR

    TC  BANKCALL\
    CADR  VAC5STOR  # STORE ERASABLES FOR DEBUGGING PURPOSES.

    INDEX  ALMCADR\
    CAF  0\
ABORT2    TC  BORTENT

OCT77770  OCT  77770    # DONT MOVE\
    CA  V37FLBIT  # IS AVERAGE G ON\
    MASK  FLAGWRD7\
    CCS  A\
    TC  WHIMPER -1  # YES.  DONT DO POODOO.  DO BAILOUT.

    TC  DOWNFLAG\
    ADRES  STATEFLG

    TC  DOWNFLAG\
    ADRES  REINTFLG

    TC  DOWNFLAG\
    ADRES  NODOFLAG

    TC  BANKCALL\
    CADR  MR.KLEAN\
    TC  WHIMPER
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The BAILOUT code built in the the Apollo Guidance Computer would get triggered if there was a risk of running out of space. By scheduling less important operations, it would keep more critical processes up and running.&lt;/p&gt;

&lt;p&gt;Interestingly, it was triggered 3 times before Neil Armstrong safely landed and famously said, "the Eagle has landed," without him even knowing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thiscodeworks.com/the-apollo-11-lunar-module-s-bailout-code-historicalcode-nasa-apollo/5e032fc5a3e13d0979365780"&gt;Reference&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Bitcoin (2009)
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;double AttackerSuccessProbability(double q, int z)\
{\
    double p = 1.0 - q;\
    double lambda = z * (q / p);\
    double sum = 1.0;\
    int i, k;\
    for (k = 0; k &amp;lt;= z; k++)\
    {\
        double poisson = exp(-lambda);\
        for (i = 1; i &amp;lt;= k; i++)\
            poisson *= lambda / i;\
        sum -= poisson * (1 - pow(q / p, z - k));\
    }\
    return sum;\
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This piece of code is not only why Bitcoin exists, but it's also the reason why millions trust it. It makes the chances of somebody attacking and taking over the network extremely unlikely.&lt;/p&gt;

&lt;p&gt;This code essentially gave birth to the era of cryptocurrency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thiscodeworks.com/the-code-that-made-bitcoin-both-exist-and-extremely-secure-c-c-historicalcode-interesting-cyberattacks-security/5e04ea64fb3b6d001473dd0b"&gt;Reference&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Google's PageRank Algorithm (1996)
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np

def pagerank(M, num_iterations=100, d=0.85):\
    N = M.shape[1]\
    v = np.random.rand(N, 1)\
    v = v / np.linalg.norm(v, 1)\
    iteration = 0\
    while iteration &amp;lt; num_iterations:\
        iteration += 1\
        v = d * np.matmul(M, v) + (1 - d) / N\
    return v
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Google's PageRank algorithm to "organize the world's information" put it on the map. Nobody could've imagined the way it would revolutionize the way we browse the internet and the giant of a company it would soon become. Today Google is the world's &lt;a href="https://www.cnbc.com/2019/06/11/amazon-beats-apple-and-google-to-become-the-worlds-most-valuable-brand.html"&gt;3rd most valuable company at $315.5 billion.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All because of a search algorithm. Imagine that...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thiscodeworks.com/google-s-pagerank-algorithm-from-1996-the-origin-of-internet-search-javascript-python-search-historicalcode-google/5e10d1f696432f6f7b798b35"&gt;Reference&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you found this interesting, check out other great code snippets in history at:&lt;br&gt;
&lt;a href="https://www.thiscodeworks.com/tag/historicalcode"&gt;https://www.thiscodeworks.com/tag/historicalcode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>interesting</category>
    </item>
    <item>
      <title>Want to start a newsletter for people learning to code. Sign up if you're interested.</title>
      <dc:creator>Mishka</dc:creator>
      <pubDate>Sat, 25 Jan 2020 08:18:14 +0000</pubDate>
      <link>https://dev.to/thiscodeworks/want-to-start-a-newsletter-for-people-learning-to-code-sign-up-if-you-re-interested-42bh</link>
      <guid>https://dev.to/thiscodeworks/want-to-start-a-newsletter-for-people-learning-to-code-sign-up-if-you-re-interested-42bh</guid>
      <description>&lt;p&gt;Taught myself how to code and now work full-time as a web developer. A lot of people ask me for courses and tips which I'm more than happy to share, but thought why not share those resources in a structured newsletter that teaches you how to code and deploy a website in 2-3 months? From A-Z. &lt;/p&gt;

&lt;p&gt;HTML + CSS + Javascript&lt;/p&gt;

&lt;p&gt;Sign up if you're interested. If I get at least 500 emails, I'll start it 10th February. If I don't get enough emails, I'll delete this list (unless you opt for future updates) and you'll never hear from me again. &lt;/p&gt;

&lt;p&gt;So do share this form if you really want this newsletter. &lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="https://forms.gle/yoBAG5jyckxYMcXR8"&gt;https://forms.gle/yoBAG5jyckxYMcXR8&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>5 things I do when I'm stuck coding</title>
      <dc:creator>Mishka</dc:creator>
      <pubDate>Fri, 27 Dec 2019 18:44:08 +0000</pubDate>
      <link>https://dev.to/thiscodeworks/5-things-i-do-when-i-m-stuck-coding-1657</link>
      <guid>https://dev.to/thiscodeworks/5-things-i-do-when-i-m-stuck-coding-1657</guid>
      <description>&lt;p&gt;As somebody who learnt coding by copying and pasting snippets from anywhere on the internet, I get stuck quite a lot when working on projects as that's not exactly the best way to learn.&lt;/p&gt;

&lt;p&gt;But after almost 2 years of coding, I've gotten better and along the way made a mental checklist of things to do when I hit a new pothole to get back on track. I don't know what expert coders with CS degrees do when they're stuck so this may not be the best list. But if it helps anyone else, here goes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Check for missing brackets.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I used to code in an editor in which I couldn't see missing brackets until the app would crash and the error message would mention something about a missing curly brace. I've since shifted to VS code that does the job for me before I run the code. Atom also has some great plugins that help you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Change the order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes it will make no sense at all, and sometimes it will make all the sense in the world. But oftentimes just moving some lines of code back and forth does the trick.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Add lots of console messages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I saw an article on Medium the other day about how you should never use console.log. I think that's ridiculous. I'm sure even the experts use them.&lt;/p&gt;

&lt;p&gt;Add as much console.log messages as you can in the functions that is crashing. Fit it in between steps. Add variables to the messages to see what they are at each step before processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Search the error message&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes it's not even your fault. Might be some bug in the package or framework you're using. A quick Google search will show somebody else in the same predicament and an Einstein or two that would have already solved it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Understand the code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If all else fails I go back to the documentation and try and understand every bit of the code I'm running. It helps. I used to do this more often in the beginning when I was learning programming. Because it also helps give me more technical terms for the stuff I'm working with. &lt;/p&gt;

&lt;p&gt;Putting that in Google gives better search results than what you'd get with a description of the crash.&lt;/p&gt;




&lt;p&gt;I'd love to hear what everyone else does when they're stuck programming. Also, if you're interested in seeing where I invest my time coding, check out my site: &lt;a href="https://www.thiscodeworks.com"&gt;thiscodeworks.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
