<?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 Sachin Suresh on Medium]]></title>
        <description><![CDATA[Stories by Sachin Suresh on Medium]]></description>
        <link>https://medium.com/@sachinsuresh00?source=rss-42f8239d6516------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v2djbxXNhpWaTDX6gd36fg.jpeg</url>
            <title>Stories by Sachin Suresh on Medium</title>
            <link>https://medium.com/@sachinsuresh00?source=rss-42f8239d6516------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:00:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sachinsuresh00/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[Becoming a 10x Software Developer : The Journey continues — Day 9,10,11,12,13,14]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-9-10-11-12-13-14-19b2cf6c0818?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b2cf6c0818</guid>
            <category><![CDATA[file-handling]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[modular-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[class]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Fri, 27 Sep 2019 14:45:19 GMT</pubDate>
            <atom:updated>2019-09-28T07:08:57.359Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 10-14</h3><p>September 26, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><h3><strong>Regular Expressions</strong></h3><p>Regular Expressions are special syntactic patterns which is used to match sequences in strings in Python. Some examples of regular expressions are:</p><pre>[0-9]     or \d     - matches one digit<br>[0-9]+    or \d+    - one or more digits together<br>[0-9]*    or \d*    - zero or more digits together<br>[0-9].    or \d.    - one character after one digit together<br>[0-9]..   or \d..   - two characters after one digit together<br>[0-9]...  or \d...  - three characters after one digit together<br>[0-9].{n} or \d.{n} - n characters after one digit together</pre><pre>Similarly,<br>[a-z] - matches a to z<br>[A-Z] - matches A to Z<br>\w    - matches any letter of alphanumeric type<br>\W    - matches any letter of non-alphanumeric type<br>\s    - matches one empty space</pre><pre>Use of +,*,.,{} are also valid in the above sequences.</pre><pre>Examples:<br>\d{10}  - Exactly 10 numbers together will be matched<br>\d{12,} - 12 or more numbers will be matched</pre><p>For example if you want to match any email ID using regex, the regex pattern is</p><pre>[a-zA-Z0-9._-]+\@[a-zA-Z0-9]\.[a-zA-Z_.]</pre><h3>Regex Grouping</h3><p>In case of matching long patterns in strings, the best method is to divide the required sequence into groups and try to match the groups one by one.</p><p>For example, if you want to match a url, like</p><pre><a href="https://www.google.com/search/Python-3">https://www.google.com/search/Python-3</a><br>http://yahoo.co.in<br>www.google.com</pre><p>The regex pattern is</p><pre>(https[s]?://)?(www\.)?([a-zA-Z0-9_-])+\.([a-zA-Z0-9\.])+</pre><p>In the case of python3 code, the structure would be as follows</p><pre>import re   #for regular expressions<br>regex = re.compile(r&quot; &lt;Enter your regex here&gt; &quot;)<br>matches = regex.search(&quot; &lt;Enter the string in which expression has to be matched&gt; &quot;)<br>print(matches.group())</pre><h3>Iterators and Generators</h3><p><strong>Iterators and Iterables</strong></p><p>Iterables are the objects which one can iterate over. It generates an iterator when passed through <em>iter()</em> function.</p><p>Iterators are objects which is used to iterate over an iterable object using <em>next()</em> function. Iterators have <em>__next__()</em> method which returns the next item of the object.</p><p>Iteration saves you memory space as opposed to use of for loops in traversal in iteration.</p><p><strong>Generators</strong></p><p>Generators are functions that, instead of return a single value, can return multiple values through the use of loops. Here instead of a return keyword, yield could be used as it doesn’t take you out of the program. Yield just returns the value while pausing the execution. It also changes the value to the next value.</p><p>The need for generators is when you need a customised iteration. Classes can also perform customised iteration which will be learnt later.</p><p>The difference between a list and a generator is that lists can hold all the values at once, while generators only can hold one value at once. Through iteration, the next value is obtained every time the generator loops.</p><h3><strong>Parameters in a function</strong></h3><ol><li>Default Parameters. Ex: def function(a=10, b=10):</li><li>Reference Parameters. Ex: def function(a, b):</li><li>Keyword Specific Parameters. Ex: def function(int, str):</li><li>Variable length parameters. Ex: def function(algs, *kwrgs):</li></ol><h3>Anonymous Functions ( Lambda functions)</h3><p>Syntax</p><pre>x = lambda arg1, arg2, …, argn : expression</pre><p>Ex:</p><pre>sum = lambda a,b:a+b<br>print(sum(1,2))</pre><p>outputs</p><pre>3</pre><h3>Object Oriented Programming</h3><p>We have used procedural programming until now. For large databases, we would end up having a lot of functions and it would be difficult to manage it. Therefore we need Object Oriented Programming.</p><p>There are 4 main features associated with OOPs:</p><ol><li>Encapsulation</li><li>Abstraction</li><li>Inheritance</li><li>Polymorphism</li></ol><p>Encapsulation is the property that the variables and attributes of the class and the methods and functions that work on it, bind together under a single head, for instance, a class is an example.</p><p>In abstraction, we are hiding the workings of the class and lets other classes to see only the things which we want them to see.</p><p>Inheritance is the property involved in creating new classes from existing classes and the new classes having the properties of the parent class.</p><p>Polymorphism represents the ability to exhibit different behaviour at different natures but implementation remains same.</p><h3>Class</h3><p>Syntax</p><pre>class ClassName:<br>    &lt;attributes&gt;<br>    &lt;functions&gt;<br>object = ClassName()<br>object_new = ClassName()</pre><p><em>self</em> : Lets you access your variables outside the class. The object is implicitly passed when calling function having <em>self</em>.</p><p>Constructors: Helps you have instance variables initialised.</p><p>Syntax:</p><pre>def __init__(self, arg):<br>    self.variable = arg</pre><p>Static variables: The value of the static variable remains the same across all the instances of classes.</p><h3>Modular Programming</h3><p>Modular Programming is the programming method in which the program is broken into small pieces to use the modules again and again.</p><p>Modules: Modules are the collection of functions.</p><p>Syntax</p><pre>from module_name import f1, f2, f3, ...#selectively import functions</pre><pre>#or</pre><pre>from module_name import *#import all the functions under module_name</pre><p>Packages: Packages are a collection of modules which has its own <em>__init__()</em> method. It also a <em>setup.py</em> file associated with it to install it to a new system.</p><h3>Exception Handling</h3><p>There are mainly two kinds of errors that is observed in programming namely Compile-time errors and Run-time errors. Run-time errors are referred to as Exceptions.</p><p>Syntax</p><pre>try:<br>    &lt;any code that would throw an exception&gt;<br>    &lt;ex: divide by 0&gt;<br>except Exception:<br>    print(&quot;&lt;your message&gt;&quot;)<br>else:<br>    &lt;if no exceptions, this part is run&gt;<br>finally:<br>    &lt;no matter if there are exceptions or not in either try or except, this part will run&gt;</pre><h3>Datetime</h3><p>Some of the important commands associated with datetime library are:</p><pre>import datetime   - imports the module<br>datetime.date(yyyy,m,d) - do not prefix month and day with 0<br>dt = datetime.date.today() - today&#39;s date will be stored<br>dt.weekday() - prints the day index<br>dt.isoweekday() - prints the day number<br>ddelta = datetime.timedelta(days=7) - a difference of 7 days will be calculated and stored<br>next_week = dt+ddelta - next week same day will be stored</pre><p>datetime.datetime.today() and datetime.datetime.now() outputs similar values i.e. the current date and time. However the difference between the two lies in the case that today() gives uses your local timezone while, now() takes an argument of timezone.</p><p>Inorder to work with timezones, it is advisable to use the pytz library which can be accessed by</p><pre>import pytz</pre><pre>strftime() - used as string format time to print in a particular format.<br>strptime() - used as string pass time to input in a particular format.</pre><p>There are two types of datetimes present:</p><ol><li>Naive: Doesn’t have any information about the timezone.</li><li>Aware: Has the information about the timezone.</li></ol><h3>Working with JSON files</h3><p>JSON — Javascript Object Notation</p><p>Web apps and Mobile apps take data from sources like databases, APIs, and other websites in the form of XnY, objects and JSON.</p><p>JSON format looks similar to a dictionary in python.</p><p>Pickling: Pickling is another name for the process of type casting.</p><p>The pickling and unpickling of JSON files is done using special methods called load() and dump() in python.</p><pre>json.loads() - a json string is converted to a dictionary<br>json.dumps() - a dictionary is converted to a json string<br>json.load()  - a json file is converted to dictionary<br>json.dump()  - a dictionary is dumped into a json file</pre><h3>File Handling</h3><p>Context Manager</p><pre>with open(&quot;test.txt&quot;, &#39;r&#39;) as file:<br>    &lt;body&gt;</pre><p>Once out of with block, my file will be closed.</p><p>In the case of big files, use</p><pre>file.readlines() - gives an iterator of list of lines</pre><p>That’s all for the topics covered in the previous days.</p><p>Signing off for today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b2cf6c0818" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 9]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-9-5ced3d0caa59?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ced3d0caa59</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[string]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[set]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Sat, 14 Sep 2019 03:45:22 GMT</pubDate>
            <atom:updated>2019-09-14T03:45:22.673Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 9</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PuuxG3fu6hPyqu1c.png" /></figure><p>September 13, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><p>In Python programming language there are 4 collection data type namely,</p><ol><li>List</li><li>Dictionary</li><li>Tuple</li><li>Set</li></ol><p>Today we discussed about sets.</p><h3>Sets</h3><p>Set is an un-ordered collection of unique items. The elements are seperated by ‘,’ and enclosed in ‘{}’ braces.</p><pre>s = {1,2,3,4,5} <br>* s.add(6) - adds &#39;6&#39; to set s</pre><p>If A = {1,2,3,4} and B = {4,5,6}</p><pre>A-B = {1,2,3} <br>A&amp;B = {4} <br>A|B = {1,2,3,4,5,6} <br>A^B = {1,2,3,5,6}</pre><h3>Some more string functions</h3><p>If s = ‘hEllo’</p><pre>* s.upper() = &#39;HELLO&#39; <br>* s.lower() = &#39;hello&#39; <br>* s.capitalise() = &#39;HEllo&#39;</pre><p>If s = ‘today is friday’</p><pre>* s.title() - &#39;Today Is Friday&#39; <br>* l = s.split() - l = [&quot;today&quot;, &quot;is&quot;, &quot;friday&quot;] <br>* l = s.split(&quot;i&quot;) - l = [&quot;today &quot;, &quot;s friday&quot;]</pre><p>If l = [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]</p><pre>* s = &quot;&quot;.join(l) - s = hello * s = &quot;-&quot;.join(l) - s = h-e-l-l-o</pre><p>If s = “ tarzan \t skills \t \n”</p><pre>* s.strip() - s = &quot;tarzan \t skills&quot; <br>* s.rstrip() - s = &quot; tarzan \t skills&quot; <br>* s.lstrip() - s = &quot;tarzan \t skills \t \n&quot;</pre><h3>map()</h3><p>If the input is taken in the form of a string (inputs seperated by spaces), map() function helps you to convert the values and store it in a list. Ex. If the input required is in a list of integers and the values are inputted seperated by spaces, we have a string of the values seperated by spaces</p><pre>l = list(map(int, input().split))</pre><p>The above line of code basically receives your space seperated values as string, splits it to individual values as string, and maps the int type conversion through the values. The returned pointer is then converted to a list and stored in l.</p><p>The rest of the day, we started with Hackerrank. It was a really compettitive beginning and our objective is to achieve top 10000 in India as soon as possible. That’s all for the day.</p><p>Signing off</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/4c38e34f40d2b8958a150841bfd0a9c2"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ced3d0caa59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 8]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-8-31f92fd64609?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/31f92fd64609</guid>
            <category><![CDATA[tuples]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[lists]]></category>
            <category><![CDATA[dictionary]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 13:34:51 GMT</pubDate>
            <atom:updated>2019-09-12T13:34:51.828Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 8</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uiinPHZvp4Uz36PK.png" /></figure><p>September 12, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><h3>Collection data types</h3><p>In Python programming language there are 4 collection data type namely,</p><p>Today, we have covered lists, dictionary and tuples.</p><h3>List</h3><p>List is a collection which is ordered and changeable. It allows duplicate members. Ex.</p><pre>l = [&quot;Hello&quot; , 23 , 4.54 , &quot;World&quot;] <br>l = [&quot;qwerty&quot; , 34 , [&quot;pot&quot; , &#39;luck&#39; , &quot;crazy&quot;] , &quot;true&quot;] <br>l[0] = &#39;qwertry&#39; <br>l[2][1] = &#39;pot&#39;</pre><pre>* l[::-1] : reverses the list <br>* z = l.extend(p) : If l and p are two lists, z would store the list p appended to l. <br>* del l[index] : Deletes the mentioned index&#39;s value <br>* l.remove(value) : Removes &#39;value&#39; if it is present in the list <br>* value in list : returns true if value present in the list and returns false if not present <br>* Similarly &#39;value not in list&#39; returns true if value not present in list <br>* list.append(value) : appends value to the list <br>* list.index(value) : returns the index of value in the list <br>* list.sort() : Sorts the list in ascending order <br>* list.sort(reversed = &#39;True&#39;) : Sorts the list in descending order</pre><h3>Dictionary</h3><p>Dictionary is a collection which is unordered, changeable and indexed. No duplicate members is present. Elements in dictionary are always stored as key-value pairs.</p><pre>* dict[key] = value <br>* dict.key() = [key1, key2, key3, ....] <br>* dict.values() = [value1, value2, value3, ....]</pre><p>Ex.</p><pre>dict = { &quot;python&quot;:2019 , &quot;cpp&quot;:2011 , &quot;c&quot;:2015 } <br>dict = { &quot;python&quot;:{&quot;language&quot;:&quot;high level&quot; } , &quot;cpp&quot;:{&quot;language&quot;:&quot;low level&quot;}}<br>dict[&quot;cpp&quot;][&quot;language&quot;] = &quot;low level&quot;</pre><h3>Tuple</h3><p>Tuple is a collection which is ordered and unchangeable. It allows duplicate members.</p><pre>* p = (&#39;a&#39;) : defines p as a string because of only value being inputted <br>* p = (&#39;a&#39;,) : defines p as a tuple even without more than one entry<br>* t.item() : returns the list of items in the tuple t</pre><p>Ex.</p><pre>t = (&#39;a&#39; , &#39;b&#39;) <br>t = (&#39;a&#39; , &#39;b&#39; , (&quot;Hello&quot; , &quot;there&quot;) )</pre><p>The remaining collection data type set() would be covered during the next session. That sums up the content for the day’s discussion.</p><p>Signing off</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/b7587a7fa4ea67d28208459cb423bbc6"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31f92fd64609" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 7]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-7-8790fffe4239?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/8790fffe4239</guid>
            <category><![CDATA[os]]></category>
            <category><![CDATA[seek]]></category>
            <category><![CDATA[file-handling]]></category>
            <category><![CDATA[mode]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 08:32:24 GMT</pubDate>
            <atom:updated>2019-09-12T08:32:24.477Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 7</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uljvDAkgK5Qq2EEB.png" /></figure><p>September 11, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><p>Today, we started with File Handling. In relation to that, a bunch of commands from os package in python was discussed. These are important as it has the ability to interact with your operating system no matter which one it is. Some of the examples of these commands are:</p><pre>os.getcwd()               - Displays the current working directory os.chdir(&#39;&lt;path&gt;&#39;)        - Changes the directory to &lt;path&gt; os.path.abspath(&#39;&lt;path&gt;&#39;) - Returns an absolute path with filename mentioned even if it doesn&#39;t exit actually in the system os.path.relpath(&#39;&lt;path&gt;&#39;) - Returns the relative path with filename mentioned <br>os.path.dirname(&#39;&lt;path&gt;&#39;) - Gives you the path to the directory before last &#39;/&#39; <br>os.path.isabs(&#39;&lt;path&gt;&#39;)   - Checks whether &lt;path&gt; is an absolute path <br>os.path.basename(&#39;&lt;path&gt;&#39;)- The last name after &#39;/&#39; is displayed os.path.exists(&#39;&lt;path&gt;&#39;)  - Checks whether &lt;path&gt; exists os.path.isdir(&#39;path&#39;)     - Checks whether &lt;path&gt; corresponds to a directory <br>os.path.isfile(&#39;path&#39;)    - Checks whether &lt;path&gt; corresponds to a file <br>os.path.getsize(&#39;&lt;path&gt;&#39;) - Returns the size of the file os.listdir(&#39;&lt;path&gt;&#39;)      - Returns the list of elements in &lt;path&gt; os.mkdir(&#39;filename&#39;)      - Creates a directory with name &#39;filename&#39;</pre><h3>Create, Write, Read and Append to a file</h3><p>File objects: file objects lets you use, access and manipulate files i.e.</p><pre>file_object = open(&#39;&lt;filename&gt;&#39;, &#39;&lt;mode&gt;&#39;)</pre><p>File objects when declared has three attributes:</p><ul><li>name</li><li>mode</li><li>closed</li></ul><pre>fo.name - returns the name of the file <br>fo.mode - returns the mode of the file <br>fo.closed - checks whether the file is closed or not</pre><h4>Creating a file</h4><p>Creates a file:</p><pre>fo = open(&#39;&lt;filename&gt;&#39;, &#39;x&#39;) fo.close()</pre><h4>Writing a file</h4><p>Write some data into the file:</p><pre>fo = open(&#39;&lt;filename&gt;&#39;, &#39;w&#39;) text = &#39;Enter text&#39; fo.write(text) fo.close()</pre><h4>Reading a file</h4><p>Read all of the data from the file and print it:</p><pre>fo = open(&#39;&lt;filename&gt;&#39;, &#39;r&#39;) <br>text = fo.read() <br>print(text) fo.close()</pre><h4>Appending a file</h4><p>Appending to an already made file</p><pre>fo = open(&#39;&lt;filename&gt;&#39;, &#39;a&#39;) text = &#39;Enter new text&#39; fo.write(text) fo.close()</pre><h4>Modes</h4><p>Modes are the information we give saying how we want our file to be utilised. Some of the examples of modes are:</p><pre>&#39;x&#39; - creates a new file and returns the file object. Returns error if file already exists. <br>&#39;r&#39; - opens a file in read mode. Pointer at the beginning. <br>&#39;a&#39; - creates a file if it doesn&#39;t exist, opens the file in append mode else. Pointer at the end. <br>&#39;w&#39; - creates a file in write mode. If file exists, overwrites the file. Pointer at the beginning. <br>&#39;r+&#39; - opens in read and write mode. Pointer stays at beginning of the file and overwrites the characters on by one when written into.<br>&#39;rb&#39; - opens a file in binary read mode. Pointer at beginning <br>&#39;ab&#39; - creates/appends in binary append mode if file not present/present. Pointer at the end. <br>&#39;wb&#39; - creates/ overwrites in binary write mode if file not present/present. Pointer at the beginning. <br>&#39;a+&#39; - creates/ append and read a file in binary append mode. Pointer at end. <br>&#39;rb+&#39; - opens in binary read and write mode. Pointer at start. <br>&#39;ab+&#39; - creates/ append and append a file in binary append mode. Pointer at end.</pre><p>Note that ‘r’, ‘r+’, ‘rb’, ‘rb+’ modes won’t create a file if it doesn’t already exist.</p><h4>seek()</h4><p>seek() is a function that lets you move your pointer in a file to the desired input.</p><p>Syntax:</p><pre>seek(offset, from what)</pre><p>Some examples are:</p><pre>seek(0,0) - Takes you to the beginning of the file <br>seek(0,2) - Takes you to the end of the file <br>seek(0,1) - Takes you to the current position in a file</pre><p>In the case of mode = ‘a+’, even though read is allowed, since the current pointer stays at the end of the file, reading is not actually possible. When we ask the program to read from the file, it would return only empty string. However, with the help of seek(), you can traverse to different parts of the file and keep the pointer there. From there, the read() function could be used.</p><p>Note that append mode is completely independent to .append() (which belongs to lists)</p><p>This briefly sums up the contents of discussion of Day-7.</p><p>Signing off</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/b00cca91a5a3b534cebc2e5b899fc46f"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8790fffe4239" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 5 and Day 6]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-5-and-day-6-d3e983ce4c1e?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3e983ce4c1e</guid>
            <category><![CDATA[while-loop]]></category>
            <category><![CDATA[for-loop]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[if-else]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Wed, 11 Sep 2019 03:19:21 GMT</pubDate>
            <atom:updated>2019-09-11T04:05:26.302Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 5 and Day 6</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A9wVAALlgTQeycA5.png" /></figure><p>September 10, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><p>It’s been a while since my last blog. The reason being, transition to a more practice based training approach. Over the last few days as we have gone further into basic Python programming, we have encountered various types of problems.</p><p>The last couple of days, we have mainly started with conditional statements and loops. We will go through some of the important aspects introduced:</p><ol><li>Flow control: It is the order in which a program’s code executes. For the help of programming, certain regulations are given as condition statements, loops and function calls. These are part of the flow control and determine the flow of running of the code.</li><li>if … else / if … elif / if … elif … else: These are some of the fundamental conditional status. For ‘if’ and ‘elif’ conditions have to passed to run its body while ‘else’ doesn’t need a specific condition to be passed</li></ol><pre>Syntax <br>if (condition): <br>    &lt;body&gt; <br>else: <br>    &lt;body&gt; </pre><pre>if (condition): <br>    &lt;body&gt; <br>elif (condition): <br>    &lt;body&gt; </pre><pre>if (condition): <br>    &lt;body&gt; <br>elif (condition): <br>    &lt;body&gt; <br>else: <br>    &lt;body&gt;</pre><pre>while (condition): <br>    &lt;body&gt; <br>    &lt;conditional variable updation&gt;</pre><p>3. while and while … else: They are loops that run until a certain condition becomes false. Constant updation is required in the body of loop as it is necessary to save it from becoming an infinite loop.</p><p>4. continue : It resets the Head to the start of the loop.</p><p>5. break : It breaks you out of the loop</p><p>6. range() : range() outputs the range of values between two specific numbers.</p><pre>Syntax <br>range(start,stop,step) <br>Ex. <br>list(range(0,5)) = [0,1,2,3,4] <br>list(range(5)) = [0,1,2,3,4] <br>list(range(0,30,5)) = [0,5,10,15,20,25] <br>list(range(5,0,-1)) = [5,4,3,2,1]</pre><p>Note that step value has to be given in case of negative propagation and only integer entries are allowed as start, stop and step.</p><p>7. for : ‘for’ is a loop to traverse through the elements in a list</p><pre>Syntax <br>for value in range(n): <br>   &lt;body&gt;</pre><p>More and more problems were practised as we approach the ending of basics to Python programming. Soon we will venture into advanced python programming.</p><p>Signing off</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/e54845632527de286fab25872aa0cbcb"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3e983ce4c1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 3]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-3-93e255bc4cbc?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/93e255bc4cbc</guid>
            <category><![CDATA[slice]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[string]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Fri, 06 Sep 2019 18:14:20 GMT</pubDate>
            <atom:updated>2019-09-06T18:14:20.338Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 3</h3><p>September 06, 2019</p><p>Hello Everyone,</p><p>I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><p>After a couple of days of exploring through the world of Git, today, we anchored the ship in a particular direction. We decided to delve deeper into Python programming. So today’s discussion includes, predominantly, features of Python programming like string slicing and functions.</p><h4>String Slicing</h4><p>String Slicing is used to slice a given sequence. For example, we have to write a program to display “abcac” repeatedly until total length becomes 12. The program is as follows:</p><pre>string = &#39;abcac&#39; <br>length = 12 <br>string_length= len(string) <br>times= length//string_length <br>remaining= length%string_length print(string*times+string[0:remaining])</pre><p>outputs</p><pre>abcacabcacab</pre><p>Here we require a part of the string to be extracted to get the desired output.</p><p>The syntax of slicing is</p><pre>slice(start:end:step)</pre><p>‘start’ is the starting point of the string. ‘end’ is the ending point of the string. ‘step’ is the number of jumps that takes place to consider the next character. By default, step = 1. If slice is defined as slice(::-1), it does a string reversal.</p><h4>Input in Python</h4><p>Input command is used when you want enter the required values only when the code block is run. This helps in removing hard coding in the code. This is a more dynamic approach.</p><p>Input Syntax</p><pre>var = input(&quot;Message: &quot;)</pre><p>Here, whatever value you have entered when the “Message: “ prompt is shown, will be stored as the value of var with the data type set to string.</p><h4>Functions in Python</h4><p>Functions are code blocks that takes input values as arguments and returns something. It can be called anywhere in the program and one of its main feature is its re-usability.</p><p>Function Syntax</p><pre>def add(a,b): <br>    value = a + b <br>    return value</pre><p>Here is a function that adds two numbers passed to it. ‘add’ is the function name. ‘a’ and ‘b’ are the parameters. ‘value’ is returned once this function is executed. The function call for the above function is:</p><pre>sum = add(number1,number2)</pre><p>Some important terms associated with functions are:</p><ol><li>Return Type : It is the data type of the value that the function must return. Since python is dynamically typed language, return type doesn’t hold much significance here.</li><li>Function name : It is the name assigned to a function. It is important for the function to have a unique meaningful name because the function call requires the function name.</li><li>Arguments: They are the values you pass into the function parameters.</li><li>Parameters: They are the variables in the declaration of a function.</li></ol><p>Today, we continued practicing with some quantitative based questions too. That’s all for today folks.</p><p>Signing Off</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/d86c656b30f03213117c1b0729542482"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93e255bc4cbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming a 10x Software Developer : The Journey continues — Day 2]]></title>
            <link>https://medium.com/@sachinsuresh00/becoming-a-10x-software-developer-the-journey-continues-day-2-54235afb1c22?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/54235afb1c22</guid>
            <category><![CDATA[git-branch]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[variables]]></category>
            <category><![CDATA[data-type]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Thu, 05 Sep 2019 20:39:58 GMT</pubDate>
            <atom:updated>2019-09-07T08:23:27.342Z</atom:updated>
            <content:encoded><![CDATA[<h3>Becoming a 10x Software Developer : The Journey continues — Day 2</h3><p>September 05, 2019</p><p>Hello Everyone,</p><p>Since my path to becoming a software developer is a continuous process over a period of time, I request you to go through my previous blog to be up-to-date with my progress. However I will try my level best to keep things as simple and easy to understand without any prior research.</p><p>Today’s session was all about Git Branching and operations in Python programming along with introduction to variables and data types in Python.</p><p>Before we started with Git Branching, in relation to yesterday’s session on git push, we found out the way to have our login credentials to github saved. This is very important because otherwise, every time, the terminal will prompt you to enter your username and password which is a tedious process.</p><p>To store your credentials for git push, use</p><pre>git config credential.helper store</pre><pre>git push <a href="https://github.com/owner/repo.git">https://github.com/owner/repo.git</a></pre><p>Here, ‘owner’ has to be replaced with your github username and ‘repo’ with your repository name.</p><h4>Git Branching</h4><p>In a team project, each individual works on their own branch and once the code is in working condition, the individual has to do a pull request to the manager who manages the master branch. In this way, the code in the master branch is always executable without errors or unwanted results. If another branch wants to add their code, then the manager adds it to the master branch provided it doesn’t cause any discrepancy. If any problems are encountered, the manager could manage the editing or deletion of the branch. After completion of each work, the individual does a git pull to check whether their code is same as what the master has. If the master has some changes that the individual doesn’t have, then it is updated in the individual’s file through git pull. If the master has an updated file for which the individual also made changes, then the individual has to incorporate the earlier committed code in master into his update and make sure both the updates work.</p><p>Some Git commands introduced:</p><pre>git branch - to see the branches <br>git branch &lt;name&gt; - to create a new branch <br>git checkout &lt;name&gt; - to switch branch <br>git checkout -b &lt;name&gt; - to create a branch and switch into it</pre><h4>Operations in Python programming</h4><p>Python programming blesses us with a wide range of arithmetic and logic operations like Addition(+), Subtraction(-), Multiplication(*), Division(/), Exponential(**), Parenthesis(()) and Modulus(%) as its arithmetic operators and Greater than(&gt;), Less then (&lt;), Greater than or equal to (&gt;=), Less than or equal to(&lt;=), and Equal to (==) as its Relational operators.</p><p>Since these operations could occur in a single statement, there is a need for priorities to be given to the operators to decide which would be evaluated first. The arithmetic operators have a higher priority than relational operators. The priority of arithmetic operators can be easily remembered by PEMDAS.</p><p>i.e. Parenthesis&gt;Exponential&gt;Multiplication&gt;Division&gt;Addition&gt;Subtraction</p><p>Even though modulus is not mentioned here, since it involves division to find the remainder, it could be prioritized after multiplication.</p><p>Some important observations are:</p><ul><li>In the case of arithmetic operations, if one of the number is a decimal, then the answer will always be a decimal except in the case of complex numbers.</li><li>In python, j is used to denote square root of -1.</li><li>In terms of complex numbers, it never gives you zero as ending digit post decimal with j.</li><li>Division of two integers or floats always return a float value.</li></ul><p>Some examples of arithmetic operations:</p><pre>30/6=5.0 <br>2j+3j=5j <br>1-2.0=-1.0 <br>2j*3j=-6+0j <br>1/4j=-0.25j <br>1j/4j=0.25 +0j <br>1%2.0=1.0 <br>1%2j=error <br>1j%4j=error</pre><ul><li>In <strong>from decimal import Decimal</strong>, operations should be enclosed without quotes while numbers have to be put in quotes to attain exact values. Due to how floating numbers are defined sum of 1.1+2.2 gives a result of 3.3000000000000003 and is mathematically incorrect. Hence <strong>Decimal</strong> can be used to attain mathematically accurate values for similar discrepancies.</li><li><strong>from fractions import Fraction</strong> helps you work with fractions and their arithmetic and logical applications.</li><li>Note: Always in the case of solving arithmetic problems involving decimals try to use <strong>from decimal import Decimal</strong> and include the numbers in quotes inside <strong>Decimal()</strong></li></ul><h4>Variable, Data Types and Type Casting</h4><p>Variables are something with a particular data type to which we can assign data. Variables must always have meaningful names when declared.</p><p>Naming Convention</p><ol><li>Camel convention- every new word in variable name starts with capital. [Used for C, C++] ex: FirstName, firstName</li><li>Pascal convention- all the words are separated with underscore. [Used for Python] ex: first_name, last_name</li></ol><p>Data Types</p><p>Based on data types of variables, there are two kinds of languages:</p><ol><li>Statically typed languages. ex: C,C++,Java -It requires the data type to be specified during the declaration of the variable.</li><li>Dynamically typed languages. ex: Python2, Python3 -It automatically identifies the data type of the variable based on the input data.</li></ol><p>In python, some of the basic data types are:</p><ul><li>Integers (int)</li><li>Floating point numbers (float)</li><li>Complex Numbers (complex)</li><li>Strings (string)</li><li>Boolean (bool)</li><li>Unsigned Integer type (uint)</li><li>Date/Time types (time)</li><li>Enumerated type (enum)</li></ul><p>Type Casting</p><p>Conversion of the value of a variable to accomodate the change in data type mentioned. ex: Conversion of integer values into float if data type is declared as float</p><pre>a = 2.75 <br>b = int(a) <br>print(b)</pre><p>outputs</p><p>Here, even though a is a floating variable, b takes the value of int data type. Hence an integer value is outputted.</p><p>Today we also dealt with solving some quantitative based question which can improve our problem solving skills. With that, I have pretty much covered the main points discussed in today’s session. More content to follow tomorrow.</p><p>Signing off for today. :)</p><p><em>Originally published at </em><a href="https://gist.github.com/sachins0023/98597d85ff734a82c38f2dbaca80f549"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54235afb1c22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Day in becoming a 10x Software Developer]]></title>
            <link>https://medium.com/@sachinsuresh00/my-first-day-in-becoming-a-10x-software-developer-a0b0d6d796fe?source=rss-42f8239d6516------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0b0d6d796fe</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Sachin Suresh]]></dc:creator>
            <pubDate>Wed, 04 Sep 2019 18:12:58 GMT</pubDate>
            <atom:updated>2019-09-04T18:15:13.254Z</atom:updated>
            <content:encoded><![CDATA[<p>September 04, 2019</p><p>Tarzan Skills is an intensive 16-week training that I have joined to develop my software skills so that it would pave a way towards an interesting and creative career. Me, being a mechanical engineering graduate, have had limited exposure to the IT environment. However, especially with machine learning and artificial intelligence becoming popular, I believe such a career path is extremely enticing to pursue.</p><p>After the basic introductions with the team, we started off with a fun exercise where we had to fill the missing letter in the given set of pair of words. For example,</p><p>Bread/b_tter = bread/butter</p><p>Shoe/s_ck = shoe/sock</p><p>River/b_at = river/boat</p><p>Even though I didn’t know why this had to be done, I raced to complete the pairs hardly reading over it as it was, pretty much, a simple task. However once our responses were collected, we were asked to write down the words that we remembered from the set of pairs. This proved to be a tricky assignment as I wasn’t ready for it since I had skimmed through the pairs filling the missing letters. This taught us an important lesson about time. That is, how our effort and investment of time for a certain work would definitely reward us and it is our duty to smartly use the available time we all have because it is one thing every person loses irrespective of any differences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUOknyEHrQ6wGqynmp__Eg.jpeg" /></figure><p>Now moving on to the main part, we were introduced to git, python and some commands in terminal as it was the first class. Some of the commands that were introduced are:</p><p>· <em>pwd</em> : Tells you the present working directory</p><p>· <em>mkdir</em> : Creates a new directory</p><p>· <em>ls</em> : lists down the contents of the present working directory</p><p>· <em>cd</em> : change directory</p><p>· <em>man</em> : opens linux provided manual for the required command</p><p>We were also introduced to certain flags that in combination with the above commands would help to retrieve more applications of it. For example, ‘<em>ls –a’ </em>would display all the contents of the present working directory including the hidden ones which it otherwise doesn’t.</p><p>Repositories were introduced along with Github and the importance of it was explained too. A repository is a place where things are stored so that a team of people could access it from anywhere as per requirement. Git is such a repository which stores the change that occurs in each version of the code. Github is the hosting service for the Git repositories. The importance in using Git is that it is possible to revert to the latest working point of the code which we have saved (committed). This makes debugging any error occurred over the course of the project easily manageable.</p><p>We were introduced to the various git commands like:</p><p>· <em>git clone &lt;url&gt;</em> : clones the repository to your local system</p><p>· <em>git status</em> : displays the state of the working directory</p><p>· <em>git add &lt;filename1&gt; &lt;filename2&gt; …</em> : initiates tracking of changes</p><p>· <em>git commit –m “&lt;your message&gt;”</em> : saves the changes (delta)</p><p>· <em>git push origin master</em> : updates the changes in origin/master (github.com) from master (local system)</p><p>The basic process involved in Git is as follows:</p><p>Pull from origin -&gt; Status -&gt; Add -&gt; Commit -&gt; Push -&gt; Status</p><p>Here, checking the git status is important as it lets you see which changes have been staged, which haven’t and which files aren’t being tracked by git. Unless the changes are being tracked, it cannot be committed.</p><p>We were introduced to python programming too with PyCharm, the IDE (Integrated Development Environment) being used. Our first python program was created which displays “Hello world” and it was saved as hello-world.py and pushed to the git repository that was created. Working of print statement was learnt during this process. More exercises were done to further understand the working of print statement under different situations. Some of them were:</p><p>· Difference between comma separated strings and strings joined by ‘+’</p><p><em>print(‘1’,’5’)</em> outputs 1 5</p><p><em>print(‘1’+’5’)</em> outputs 15</p><p>· Use of sep</p><p>Comma separated arguments in a print statement can be given a separator during output which could be any special symbol specified.</p><p><em>print(‘I’,’love’,’programming’,’in’,’python’,sep=’%’)</em> outputs I%love%programming%in%python</p><p>· Use of end</p><p>Every print statement in python starts with a new line. This is because of the <em>end</em> argument being defaulted to ‘\n’. So if it is required to insert a different character or symbol at the end of a print statement, we specify it with end argument.</p><p><em>print(‘I’,’love’,end=’*’)</em></p><p><em>print(‘programming’,’in’,end=’*’)</em></p><p><em>print(‘python’,end=’&amp;’)</em></p><p>outputs</p><p>I love*programming in*python&amp;</p><p>All of the changes or exercises that was done today was committed and pushed to git so that a record of it will be available for us at a later point of time and can be accessed from a different system too. All in all, the first day was a very productive and informative experience and I am hopeful to gain more knowledge and experience more challenges in the coming days.</p><p>Signing off for today. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0b0d6d796fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>