<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anastasia Pankina on Medium]]></title>
        <description><![CDATA[Stories by Anastasia Pankina on Medium]]></description>
        <link>https://medium.com/@siapankina?source=rss-6bcd1195069b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Sm0Cc143vFrAXe3z.jpg</url>
            <title>Stories by Anastasia Pankina on Medium</title>
            <link>https://medium.com/@siapankina?source=rss-6bcd1195069b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 03:05:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@siapankina/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Bootcamp to Developer: A Two-Part Series]]></title>
            <link>https://medium.com/@siapankina/from-bootcamp-to-developer-a-two-part-series-44be04bba90e?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/44be04bba90e</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[career-change]]></category>
            <category><![CDATA[bootcamp-experience]]></category>
            <category><![CDATA[how-to-become-a-developer]]></category>
            <category><![CDATA[develop]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Tue, 22 Feb 2022 18:11:34 GMT</pubDate>
            <atom:updated>2022-02-22T18:11:34.372Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part One: My Experience of Bootcamp</h4><p>This <em>blog has also been posted to </em><a href="https://unboxed.co/blog/from-bootcamp-to-developer-my-experience-of-bootcamp-part-one/"><em>Unboxed</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ly3WIy5mQ1SQFB02" /></figure><p><em>Is it possible to become a developer without an engineering degree?</em></p><p>– If you ever wondered what degree you need to become a developer or doubted that it is possible to find a job as a developer without an engineering degree, or how to start a career change towards becoming a developer, this post is for you.</p><p><strong><em>What gave me the idea to become a developer?</em></strong></p><p>I remember walking with my husband and talking about school education and what role teachers play in children’s future career choices (basically how kids later decide what they want to become, or which subjects to learn). I said to my husband: “I really liked maths at school, probably if geometry was explained in a better way to me, I would continue being good at maths and could have ended up studying engineering or something similar and maybe have ended up working as a developer.” Because in my mind to be a developer you should have been really good with maths. Then my husband just asked me: “Why don’t you just try coding on your own now? There are so many online courses and bootcamps, just give it a try and see if you like it.”</p><p><strong><em>The search for a bootcamp.</em></strong></p><p>Just before starting my search for a perfect bootcamp, I decided to try coding and first see if I actually liked it. In Coursera I found a really basic but quite fulfilling course for beginners: <a href="https://coursera.org/share/8466c90ab25367679b77db4a3a64d237">HTML, CSS and JS (Javascript) for Web Developers</a>. The goal was to build a simple web page for a restaurant, with pictures of food and to show the menu. And guess what? I enjoyed it a lot! I never thought that programming can be fun and creative, you basically build things from nothing and you have so many ways of doing that.</p><p>After finishing the basic course and being sure that I enjoy programming and want to dedicate time and money to it -I started looking for bootcamps.When I started my search I realised that there are a loooot of bootcamps, offering you all types of support, flexible learning, a variety of languages and, of course, they ranged from free to not so cheap.</p><p>So I started asking myself:</p><ol><li>“What do I want to get from bootcamp?”</li><li>“How much time and money am I ready to invest?”</li><li>“Do I prefer online or offline classes?”</li><li>“Will I need support from career services?”</li></ol><p>I came to the conclusion that I wanted a bootcamp that will help me learn the most popular languages (back end and front end) and that will help me to find a job as quickly as possible, so I can continue building my knowledge base. I realised that offline classes are the best option for me, therefore I needed to find Bootcamp that was in London. Money wise I thought that if bootcamp guarantees 100% tuition refund in case I don’t find a job…then anything between 0–15k was a reasonable price for me.</p><p>My two top options were: <a href="https://www.lewagon.com/">Le Wagon</a> and <a href="https://flatironschool.com/">Flatiron School</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*TzXrgL1Ii9DMndx7UmCukw.png" /></figure><p><strong><em>P.S. Flatiron School no longer has branches in Europe and UK (only for online option)</em></strong></p><p>Both coding schools boasted good reputations in London and worldwide which made it quite difficult to choose.</p><p>Other considerations were that Le Wagon was much cheaper than Flatiron (6k vs 12k), however Le Wagon only offered a 9 week program where Flatiron offered a 15 week program so there was also a time-cost balance to consider. In the end I chose to go with Flatiron and honestly… I’ve never regretted my decision!</p><p><strong><em>My journey in bootcamp.</em></strong></p><p>I will be honest with you…from day one it was tough…<br>I felt like I was learning an alien language! However I’ve learned some tricks along the way that made it easier and I will share these with you.The first most important thing is to divide the learning process into steps, steps that will help you to understand what you need to learn on your “become a developer” journey.</p><p><em>Step1: Don’t try to memorise everything </em><br>It is impossible! Plus things are constantly changing in the programming world and you want to keep yourself updated. So what I would suggest instead is to have a list of websites that document everything for you and then learn how to use those sites. For example: <a href="https://developer.mozilla.org/">https://developer.mozilla.org</a> (I often use this side to look up JavaScript updates. For example, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">how array works</a>.) Another site I use frequently is: <a href="https://www.w3schools.com/css/css_grid.asp">https://www.w3schools.com/css/css_grid.asp</a> which is great for CSS.</p><p><em>Step 2: Be patient and learn how to debug <br></em>Debugging is sooooo important! First of all, before asking for help you need to understand what is not working else you won’t know what questions to ask. When I just started and didn’t know how to debug, I was grabbing one of the coaches of Flatiron school, bringing them to my screen and was just pointing to the screen saying “This is not working, why?” … The coach then had to sit with me and debug to understand what was not working.</p><p>Some things like:<br>- console.log()<br>- debugger<br>- DevTools on your browser <br>Are your friends, learn to use them! (There are much more options just google them)</p><p>Step 3: <em>Read the error<br></em>Surprisingly, a lot of developers skip error messages or just read them superficially. Well, you should read them and understand them! To be able to debug, and know where to start your debugging journey, error messages can and will help you!</p><p>Step 4: <em>Learn how to google your errors<br></em>Probably the most important part after all. When I started my ‘googling’ experience it sounded like:“why my function is not working when I try to run blah blah blah” as though google could see my code :D duh You need to be more specific, a better way of google searching would be: “return last element of array js.”When you specify what outcome you want to get and with what programming language, the higher your chance of actually being able to find the information you need. <a href="https://stackoverflow.com/questions">Stackoverflow</a> probably has all the answers, you just need to know how to ask them correctly first.</p><p><strong>So can you become a developer without an engineering degree? </strong><br>As you can see, it might be difficult at first but it is definitely possible to become a developer without an engineering degree. The main thing is to shift your mindset, learn to feel comfortable with all the things you don’t know and won’t be able to know or understand in just 1–2 days… It takes time, patience, a loooot of practice and a lot of googling.</p><p>In the upcoming part 2 of this series, I am going to share how I found my first job as a software developer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44be04bba90e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pipes in bash]]></title>
            <link>https://medium.com/@siapankina/pipes-in-bash-28348eb1bf1e?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/28348eb1bf1e</guid>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Sun, 15 Mar 2020 20:31:40 GMT</pubDate>
            <atom:updated>2020-03-15T20:31:40.304Z</atom:updated>
            <content:encoded><![CDATA[<p>A pipeline is a sequence of one or more commands separated by one of the control operators ‘|’ or ‘|&amp;’.</p><p>The format for a pipeline is</p><pre>[time [-p]] [!] command1 [ | or |&amp; command2 ] …</pre><p>The output of each command in the pipeline is connected via a pipe to the input of the next command. That is, each command reads the previous command’s output. This connection is performed before any redirections specified by the command.</p><p>If ‘|&amp;’ is used, command1’s standard error, in addition to its standard output, is connected to command2’s standard input through the pipe; it is shorthand for 2&gt;&amp;1 |. This implicit redirection of the standard error to the standard output is performed after any redirections specified by the command.</p><p>The reserved word time causes timing statistics to be printed for the pipeline once it finishes. The statistics currently consist of elapsed (wall-clock) time and user and system time consumed by the command’s execution. The -p option changes the output format to that specified by POSIX. When the shell is in POSIX mode (see <a href="https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html#Bash-POSIX-Mode">Bash POSIX Mode</a>), it does not recognize time as a reserved word if the next token begins with a ‘-’. The TIMEFORMAT variable may be set to a format string that specifies how the timing information should be displayed. See <a href="https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#Bash-Variables">Bash Variables</a>, for a description of the available formats. The use of time as a reserved word permits the timing of shell builtins, shell functions, and pipelines. An external time command cannot time these easily.</p><p>When the shell is in POSIX mode (see <a href="https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html#Bash-POSIX-Mode">Bash POSIX Mode</a>), time may be followed by a newline. In this case, the shell displays the total user and system time consumed by the shell and its children. The TIMEFORMAT variable may be used to specify the format of the time information.</p><p>If the pipeline is not executed asynchronously (see <a href="https://www.gnu.org/software/bash/manual/html_node/Lists.html#Lists">Lists</a>), the shell waits for all commands in the pipeline to complete.</p><p>Each command in a pipeline is executed in its own subshell, which is a separate process (see <a href="https://www.gnu.org/software/bash/manual/html_node/Command-Execution-Environment.html#Command-Execution-Environment">Command Execution Environment</a>). If the lastpipe option is enabled using the shopt builtin (see <a href="https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html#The-Shopt-Builtin">The Shopt Builtin</a>), the last element of a pipeline may be run by the shell process.</p><p>The exit status of a pipeline is the exit status of the last command in the pipeline, unless the pipefail option is enabled (see <a href="https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html#The-Set-Builtin">The Set Builtin</a>). If pipefail is enabled, the pipeline’s return status is the value of the last (rightmost) command to exit with a non-zero status, or zero if all commands exit successfully. If the reserved word ‘!’ precedes the pipeline, the exit status is the logical negation of the exit status as described above. The shell waits for all commands in the pipeline to terminate before returning a value.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28348eb1bf1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compiled Versus Interpreted Languages]]></title>
            <link>https://medium.com/@siapankina/compiled-versus-interpreted-languages-e301017d56e9?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e301017d56e9</guid>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[language]]></category>
            <category><![CDATA[interpreters]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Sun, 08 Mar 2020 23:53:05 GMT</pubDate>
            <atom:updated>2020-03-08T23:53:05.067Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article I want to shed light on things like:</p><ul><li>what compiled and interpreted means</li><li>what is the difference between compiled and interpreted languages</li><li>pros and cons of compiled and interpreted languages</li></ul><p><strong>Let’s start with understanding what compiled and interpreted means.</strong></p><p>Imagine you have a book that is written in Latin, but unfortunately you didn’t study latin at school and you can’t understand a word.<br>To be able to read and understand it you have two options:</p><ol><li><em>The compiled version would be</em>: to go online or to a book store and find this book translated to English, so you and other english speakers can read and understand the book.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*wYXJNMgISgVkgGFXzqL16w.jpeg" /></figure><ol><li><em>Interpreted version would be</em>: to find someone who knows Latin and ask them to translate the book as you read it.</li></ol><p>In compiled languages there is a program that translates your code from the language you wrote the code(e.g. C++, C, Rust, etc) to machine code that your CPU is able to understand and execute. Once that translation is finished, you get an executable file that you can run.</p><p>Interpreted languages, on the other hand, work in a different way. Usually there is program, called the interpreter, that will read your code, translate it to machine code that your CPU understands, and then execute it. This is translation happens as your code is read by the interpreter: the interpreter reads one line, translate it to machine code, and then execute it.</p><p><strong><em>Advantages of Compiled languages.</em></strong><br>Programs compiled into native code at compile time usually tend to be faster than those translated at run time, due to the overhead of the translation process.The overhead for the translation only occurs once when the source is compiled; after that, the program only has to be loaded and executed.</p><p><strong><em>Disadvantages of Compiled languages.</em></strong><em><br></em>Additional time needed to complete the entire compilation step before testing, and platform dependence of the generated binary code.<br>Because a compiler translates source code into a specific machine language, programs have to be specifically compiled for OS X, Windows or Linux, as well as specifically for 32-bit or 64-bit architectures. For a programmer or software company trying to get a product out to the widest possible audience, this means maintaining multiple versions of the source code for the same application. This results in more time spent on source code maintenance and extra trouble when updates are released.</p><p><strong><em>Advantages of Interpreted languages.<br></em></strong>Platform independency, because interpreters execute the source program code themselves.<br>Fast prototyping (no compiling, no execute cycle).</p><p><strong><em>Disadvantages of Interpreted languages.</em></strong><br>The biggest disadvantage is speed. Interpreted code runs slower than compiled code.This is because the interpreter has to analyse and convert each line of source code into machine code before it can be executed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e301017d56e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tidying Up Your Code]]></title>
            <link>https://medium.com/analytics-vidhya/tidying-up-your-code-c24e678e153?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c24e678e153</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Thu, 16 Jan 2020 22:45:18 GMT</pubDate>
            <atom:updated>2020-01-22T12:53:02.255Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfCUCbWXe9JONVsJSUd%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FfCUCbWXe9JONVsJSUd%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FfCUCbWXe9JONVsJSUd%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e3662a9c8787183d3e8f813888cc539/href">https://medium.com/media/4e3662a9c8787183d3e8f813888cc539/href</a></iframe><p>“Master programmers think of systems as stories to be told rather than programs to be written” — Uncle Bob.</p><p>If you want to make your and other people’s life easier you need to learn how to tidy up, and I am not talking about your room or your cupboards :)</p><p>When I just started learning programming my goals were:</p><ul><li>learn how to write code(…duh :D)</li><li>make it work</li></ul><p>On the way to goal achievement I realised that I was missing an important part, the part that distinguishes code from good code.</p><p>I am talking about “clean code”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FLLR3cBvqxpamY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FLLR3cBvqxpamY%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FLLR3cBvqxpamY%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="307" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1f190164061facc0a59719e9c58fb92/href">https://medium.com/media/a1f190164061facc0a59719e9c58fb92/href</a></iframe><p>I want to walk you through the changes that I have made in the code of one of my projects to make it cleaner. I’ll show you how I improved the readability of one of the functions.</p><p>This is the function before the improvements:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krnmMiDgGq2NNufA9jD1Bw.png" /></figure><p>As you can see, there are many things wrong with this code, the main two being:</p><ul><li>Is not clear what it does: the function is too long and it keeps track of too many variables. This is very error prone.</li><li>Is not readable: the naming is not great, and there is a lot going on in the function, it’s very hard to understand what this function is doing.</li></ul><p>To show how important it is to write clean code, I’d like to propose an exercise to you: read the previous code and spend a couple of minutes trying to understand what it does. Then, check the code after the refactoring, and think if you understand what the code does better. I did this exercise and it really helped me to understand the importance of clean code.</p><p>Without further due, here is the code after the refactoring:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Elx4vbjWSc9nUiV71HoZ0w.png" /></figure><p>I didn’t change the behaviour of the function in any way, all I did was split the code inside the function “score_alert” into several functions and gave to these new functions meaningful names.</p><p>This example shows how important is to split the behaviour into functions and not concentrate all the code inside one single function and the difference that it makes to give meaningful names to functions.</p><p>If you are interested in writing a cleaner and more readable code I would really recommend reading the book “Clean Code” that explains in detail how to:</p><ul><li>write a good code and transform bad code into good code</li><li>create good names, good functions, good objects, and good classes</li><li>implement complete error handling without obscuring code logic</li><li>format code for maximum readability</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*0R577jK7ko0CA5Gc3Ica9A.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c24e678e153" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/tidying-up-your-code-c24e678e153">Tidying Up Your Code</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript and DOM manipulation.]]></title>
            <link>https://medium.com/@siapankina/javascript-and-dom-manipulation-73c353ce309e?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/73c353ce309e</guid>
            <category><![CDATA[js]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 22:09:27 GMT</pubDate>
            <atom:updated>2019-12-29T22:09:27.491Z</atom:updated>
            <content:encoded><![CDATA[<p>Javascript is the language of the web. It can be used (and <a href="https://www.educba.com/uses-of-javascript/">it’s used</a>) in many fields, but we can definitely say that Javascript is the language of the web.</p><p>In this post I’d like to show how easily you can use Javascript to make amazing things on the web (what I’m going to show is not amazing, but hopefully is at least fun to do!).<br>To follow this post you’ll need basic knowledge of Javascript and the <a href="https://www.w3schools.com/js/js_htmldom.asp">DOM model</a>.</p><p>What we are trying to do is write a small program that changes the background colour of every tweet from a certain account (of your choice) in your feed.</p><p>How can we do this? This is roughly what we need:</p><ol><li>For this we need to get a list with the DOMs of every tweet (I choose the NYTimes account )</li><li>Change the background colour of each one of them.</li></ol><p>Sounds very simple, but the practise is a bit more complicated. Let’s start simple and let’s say that we want to change the background colour only of the first tweet from the NYTimes in my feed. How can get the the DOM of a tweet from the NYTimes? Well, let’s use the “Inspector” tool from the browser!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCy-RHOQqsxYA_woNH3U0g.png" /></figure><p>We need to find something to identify every tweet from the NYTimes in the DOM hierarchy. Something that we know is that every tweet from the NYTimes comes from the account “nytimes”, which appears just on top of the tweet. Perfect! we might be able to use that. Let’s use the inspector to see in where (in which element) the name of the account appears. For that, we right-click on the account name in the tweet, and click on “Inspect”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xkAgAD2KCaVRCmBG9PQIQQ.png" /></figure><p>Hm, unfortunately it didn’t give the expected result. “Inspect” took us to the “span” element that contains the text. However, not all hope is lost! if you look a bit up in the element that is selected in the “Inspector” tool, you can see that one of the elements is a link (“&lt;a /&gt;”) that points to the NYTimes account!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*JDM0etHELT8wh7E4Is1xXg.png" /></figure><p>We can definitely work with that! What we can do now is the following:</p><ol><li>Get all links in the document (webpage)</li><li>Filter and keep only the ones that contain “nytimes”</li><li>From the filtered links, get the DOM parent element and change the background colour.</li></ol><p>Let’s do that:</p><p>First we need to get all the link the page. Luckily, the <a href="https://www.w3schools.com/jsref/coll_doc_links.asp">object “document” has a member “ links” that returns a “HTMLCollection” with all the links</a>. Unfortunately, a “HTMLCollection” is not an array, and we cannot call the useful methods that we know from arrays (like <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter">filter</a>, which we will need).<br>However, as almost always, StackOverflow has the answer to our questions! <a href="https://stackoverflow.com/questions/23276811/how-to-use-array-methods-on-document-links-array">Here</a> is a post that explains how to convert a “HTMLCollection” into an array. This is the line we need:<br>var allLinksArray = Array.prototype.slice.call( document.links );</p><p>Great, now the next step is filter out all the links which do not point to “nytimes” (i.e. that their “href” property does not point to nytimes). We can use the method filter for that:</p><p>let allTweetsByNYT = allLinksArray.filter((link) =&gt; { return link.href.includes(&quot;nytimes); });</p><p>Now “allTweetsByNYT” contains all the DOM objects that are links to the NYTimes. However, we want to change the colour of the whole tweet, not just the link. For that, we need to get the “parent” div that contains the tweet. We know that it’s one of the parents of the DOM objects that we have because the tweet contains the DOM objects that we have. How can we find which parent exactly? Well, let’s use the inspector again.<br>The DOM objects have a property called “parentElement”, which points to the parent element of the object. If you have a DOM object and you access the member “parentElement” in the console, the “Inspector” will mark the parent element in the web page. We can use this to find the div that contains the whole tweet:</p><ol><li>take the first element in “allTweetsByNYT”, and access the member “parentElement”. Now in the website the inspector will highlight the element.</li><li>If it’s the div that we want (the one that contains the whole tweet), then we finish (we can change the colour of that element).</li><li>If it’s not, then access the member “parentElement” of that element, and repeat the process (go to step 1).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYOIRUpEsqAnsAi_Co9IHA.png" /><figcaption>This is after doing step 1 once. See how the inspector highlights the element in the page</figcaption></figure><p>After repeating this process a few times, we finally find the element that contains the tweet:</p><p>allTweetsByNYT[0].parentElement.parentElement.parentElement.parentElement</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5vilUzRBXe5VWZpSK1OPA.png" /><figcaption>We’ve found the element that contains the tweet!</figcaption></figure><p>Perfect, now we only need to change the background colour of that element, and do it for every DOM object that we have in our array:</p><p>allTweetsByNYT.forEach((link) =&gt; {link.parentElement.parentElement.parentElement.parentElement.style.backgroundColor=&quot;red&quot;;})</p><p>Let’s run this code and see what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cz0Fk3ZJRP7i5Dmn2IVV8g.png" /></figure><p>Great! It did what we wanted, and changed the background colour of the tweets that we expected.</p><p>This was a simple example to show you how you can use the DOM object model and Javascript to make modifications to webpages. In only a few lines of code we’ve done something quite cool (or at least I think so!).</p><p>Thanks for reading! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73c353ce309e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to survive your first week at Flatiron (software engineering)]]></title>
            <link>https://medium.com/@siapankina/how-to-survive-your-first-week-at-flatiron-software-engineering-201dd5e92e33?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/201dd5e92e33</guid>
            <category><![CDATA[flatiron]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[stress]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[how-to-prepare-yourself]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Sun, 01 Dec 2019 23:27:18 GMT</pubDate>
            <atom:updated>2019-12-01T23:28:48.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*KFLV5REoEQlJ2Oa7BwGoTg.jpeg" /></figure><h3>How to survive your first week at Flatiron school (software engineering)</h3><p><strong>Congratulations!</strong> You are now starting your journey to become a software developer. Some time ago you passed the interview process and you were accepted in Flatiron. Now it’s your first day of your first week, and you couldn’t be more excited!</p><p>If you think that I am exaggerating with the word “survive”…I am not ;)</p><p>I must say that the first day is going to be tough: Flatiron is a place that requires a lot of personal work, and you will see that from day one. Don’t worry if you feel lost! it’s completely normal, and based on my experience, your classmates probably also feel lost.</p><p>I remember my first day, it was so overwhelming! My thoughts were:</p><p>“OMG! I do not know what to do!”, “Am I really ready for that? It seems so advanced.”</p><p>At that time I thought that everyone in my group were so prepared, they knew how to code and they had everything under control.</p><p>Don’t worry, they feel the same way as you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*cyhNkd0jd7Zd3zBDLaKpSg.png" /></figure><blockquote>Do not be afraid of sharing your feelings and thoughts with your peers!</blockquote><p>I think the best you can do the first day is get to know your colleagues and the professors. You will also start learning through labs (there is work to do since day one!), so the first day is also perfect to start getting more comfortable with the platform, tools, etc.</p><p>During the first days I was feeling very overwhelmed: there was a lot of new things to learn, new people to meet, new tools to use and new language to learn (Ruby). <br>Also, learning through labs is challenging if you never have done that before. The way it works is: you have a lesson, which is basically theory. Immediately after, you have a lab where you will put that theory into practice. That can feel very challenging, specially at the beginning, but again, don’t worry! soon you will get used to that way of learning, and you are going to see that it is actually really good! Although it might sound counter-intuitive, you will learn theory through practicing that same theory. It’s a great way to learn that will help you grasp concepts and get familiar with them very quickly.</p><p><strong>My</strong> <strong>first advice to you is:</strong> talk to your peers. You are probably all feeling the same way, and talking and sharing how you feel will help you to leave behind that feeling that you are the only one that is lost or don’t understand what to do, and will also help you to get to know each other better and form bonds, and that’s important, as you are going to spend a lot of time with your classmates for the next few months!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F5411279&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Ftravolta-teacher-gif-5411279&amp;image=https%3A%2F%2Fmedia.tenor.com%2Fimages%2F1df0be9284edd7cea246f31e9f6e9e83%2Fraw&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4d7e06acf8bde7fddcfbe3dbe0c9a38/href">https://medium.com/media/d4d7e06acf8bde7fddcfbe3dbe0c9a38/href</a></iframe><p><strong>My second advice is</strong>: talk to your coaches. They are there to help you to learn: learn new languages, learn to correctly formulate your questions and correctly read your errors.<br>You can have one on one session with one of the coaches and ask to go through a lab together, or just ask to explain you what you didn’t understand.</p><p>There is a rule in Flatiron:</p><p>If you don’t know how to solve a problem:</p><ol><li>Try to solve it by yourself</li><li>Google it</li><li>Ask your peers</li><li>Ask your coach</li></ol><p>But come on! It is your first week, you probably even don’t know how to correctly formulate your question to be able to google it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*QHGJsy0N8jSnsVgvlatDOQ.jpeg" /></figure><p><strong>Third advice is: </strong>drink a lot of water and have 8 hours sleep.<br>Believe me, you need it!<br>My first week I was having nightmares about labs and I was talking in my dreams about labs….</p><p>You are going to have a code challenge in 8 days and you will have only 1 hour to finish it. You will need rest, so you don’t “break” halfway.</p><p><em>Why the first week is the hardest?</em></p><ul><li>you are learning totally new skills</li><li>it is very intense</li><li>and you have code challenge on the way (and you know, exams are not fun)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*7JK2gw_dwcXcDvYly0O4JA.jpeg" /></figure><p><strong>Last advice:</strong> talk to students from module 2.<br>If you are worrying about passing the code challenge, talk to the students from module 2. They passed it, so they can give you some valuable advices: what to focus on, how to prepare yourself and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*0OxXZ8suWotxy6xxjF9CGQ.jpeg" /></figure><p>After you passed the exam your brain probably will stop working :D<br>I wasn’t able to concentrate at all …I needed some rest…unfortunately train never stops, you need to continue studying. That is why it is so important to try to be well rested, so after-exam effect won’t be so harsh.</p><p>After the first week everything is much easier: you will be already used to the way of working. You and your classmates will know each other better, and you will also feel more comfortable using the tools (like Git, Visual Studio Code, etc) that you need to use every day. It’s still tough, there is a lot to learn and a lot to practice, but that feeling of being lost will no longer be there.</p><p>I’m going to start my 6th week in Flatiron soon, and I can honestly say that the first week was the hardest of all! So if you are feeling the same, don’t panic! It will be much better soon, and amazing things await for you ahead!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=201dd5e92e33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging like a pro in Ruby]]></title>
            <link>https://medium.com/@siapankina/debugging-like-a-pro-in-ruby-a32c998084ac?source=rss-6bcd1195069b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a32c998084ac</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Anastasia Pankina]]></dc:creator>
            <pubDate>Tue, 05 Nov 2019 19:59:52 GMT</pubDate>
            <atom:updated>2019-11-05T22:12:31.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtOTQ-PzqFuJACC9qevBZg.png" /></figure><p>When I started learning to programming, I didn’t realise the importance of knowing good tools to debug your code. <br>Usually I was writing very small programs, and if something didn’t work, it was to look carefully at the code to figure out the problem. In the worst cases, I would put a lot of “puts” statement everywhere in my code, to print out the value of the variables, and that “technique” was all I needed to debug.</p><p>However, that way of debugging not always work, specially when you have a lot of code to debug, and you are not sure what’s failing and where to put the “puts”.<br>Luckily for us, there is two great tools that can help us to debug our Ruby code: <a href="https://github.com/pry/pry">pry</a> and <a href="https://github.com/nixme/pry-nav">pry-nav</a>.<br>Pry is a gem that allows you to stop your application when running, and inspect the value of variables. Pry-nav adds more functionality to pry, specifically it allows you to move forward in your code, line by line.</p><p>It’s easier to see how useful this is with an example. Let’s say that we need to debug the following code:</p><pre>def find_the_max_positive(arr)<br>  i = 0<br>  the_max = 0</pre><pre>  while i &lt; arr.length<br>    if the_max &lt; arr[i]<br>      the_max = arr[i]<br>      i += 1<br>     end<br>  end</pre><pre>return the_max<br>end</pre><p>That function should find the max. number in an array of positive numbers. Sadly, the function gives the right result only sometimes. For example, here:</p><pre>find_the_max_positive([1,12, 29])</pre><p>It will return 29, which is the right answer. However, here:</p><pre>find_the_max_positive([47, 10, 25])</pre><p>Our code will hang and our application never ends! It’s time to use pry and pry-nav.</p><p>First we need to include them, so we do it:</p><pre>require &#39;pry&#39;<br>require &#39;pry-nav&#39;</pre><p>Now, we can specify where we want our code to stop. We don’t know exactly where is the bug, so let’s set the stop point at the beginning of our function.<br>In order to tell pry that we want to stop, we need to add the following line to the point where we want it to stop:</p><pre>binding.py</pre><p>So, let’s add that line to our code and run it.<br>Once we run it, this is what we’ll see in the terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*vPrPG48A6MsdWS6lddyeYg.png" /></figure><p>Great! that means that now you are able to see the value all the variables. To do that, you only need to write the name of the variable in the terminal. Let’s print the value of arr:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Dkt0yCdNnaR2BmmWAsApuw.png" /></figure><p>Now, thanks to pry-nav, we can execute our code step by step. By typing “next”, the code will move forward to the next line. Let’s do it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d0bpYBBVGyJiSVh9tpL0-Q.png" /></figure><p>Great, now we can go step by step, inspecting the variables each time and making sure that they match what we expect.<br>Let’s type next a couple of times, to enter in the loop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*6iizpJtVB1DRvqqrj2a5eQ.png" /></figure><p>We are now inside the loop, and the variables <em>i</em> and <em>max </em>are what we expected. Let’s continue and type next until we execute the full loop once.<br>By the way, my advise when debugging is to write down what you <em>expect </em>the value of the variables to be, and then compare them with what they really are. If they don’t match your expectations, then there is the bug!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwD5PAlS2YgvQW67-dvX5g.png" /></figure><p>Perfect, so now <em>max </em>is 47 and <em>i </em>is 1, this is what we expected. Let’s type next once again (small exercise, what values <em>should</em> the variables have if this code worked fine?) and check the value of <em>i</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRLBTo4EN3ZISzaR4qu05A.png" /></figure><p>Aha! Did you see what happen? After typing next, the <em>if </em>statement was checked, and it was false (because arr[1] is 10, and <em>max </em>is 47) and we came back to the <em>if</em> check (because there is no more code inside the loop), but the index variable, <em>i</em>, is still 1! So, as the code is now, it will again make the same check, which will be false again, and will come back to this <em>if</em> again, and so on. Do you see the bug here? we should increment <em>i</em> always, not only when we find a max number.</p><p>We can now leave pry. To do that, type !!! in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*HnsJANlmTccVE5WQXyMAsQ.png" /></figure><p>Now let’s fix the code:</p><pre>def find_the_max_positive(arr)</pre><pre>  i = 0<br>  the_max = 0</pre><pre>  while i &lt; arr.length<br>    if the_max &lt; arr[i]<br>      the_max = arr[i]<br>    end<br>    i += 1<br>  end</pre><pre>return the_max<br>end</pre><p>If we now run this function (notice that we have removed the <em>binding.pry </em>line) passing the previous array, we will get the right answer. Yay!</p><p>This was a very small/simple example, but hopefully I’ve convinced you about how important is to learn how to debug, how much time it can save to you, and how good are pry and pry-nav!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a32c998084ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>