<?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 Ashok Be on Medium]]></title>
        <description><![CDATA[Stories by Ashok Be on Medium]]></description>
        <link>https://medium.com/@lifebalance?source=rss-aa31acb95eed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1bdc8orEoJm3nOGd.jpeg</url>
            <title>Stories by Ashok Be on Medium</title>
            <link>https://medium.com/@lifebalance?source=rss-aa31acb95eed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 05 Nov 2026 12:11:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lifebalance/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[Follow your Curiosity, Know you Genius!]]></title>
            <link>https://medium.com/@lifebalance/follow-your-curiosity-know-you-genius-9dbd6975d429?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dbd6975d429</guid>
            <category><![CDATA[inspirational]]></category>
            <category><![CDATA[curiosity]]></category>
            <category><![CDATA[genius]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 17:29:56 GMT</pubDate>
            <atom:updated>2025-03-17T17:34:46.338Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Curiosity drives learning, which drives innovation. And when that is sustained by Community and Mentorship, the Genius will definitely emerge!</em></p><p>When <strong>Curiosity </strong>awakens in a student, <strong>Learning </strong>becomes an adventure; When <strong>Knowledge </strong>meets hands-on practice, <strong>Innovation </strong>begins to flourish; When <strong>Community </strong>surrounds exploration, <strong>Mentorship </strong>illuminates the path forward; When <strong>experiences </strong>are documented and shared, the <strong>Engineer/Genius</strong> within emerges; KGiSL campus is where your genius takes root — discover, contribute, and publish your technological journey NOW!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2Hys0cLjGAoQE_s8" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dbd6975d429" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to hack genius]]></title>
            <link>https://medium.com/hackgenius/how-to-hack-genius-caf936a22c56?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/caf936a22c56</guid>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Sun, 30 Sep 2018 07:47:10 GMT</pubDate>
            <atom:updated>2018-11-04T06:17:58.646Z</atom:updated>
            <content:encoded><![CDATA[<p>Very interesting article! Read it immediately and benefit. The article is <a href="http://j.mp/hackGenius">here</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dI5_LNAbA3CYYv4Y" /><figcaption>“man holding hack saw” by <a href="https://unsplash.com/@bobrodriguez?utm_source=medium&amp;utm_medium=referral">Bobby Rodriguezz</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*D0lHL3pMb3lNoCJYmC5dVA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*2S5MJhw-79pxl4tzAretig.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*on4VJQAMZFRzUZen3xfjFw.jpeg" /><figcaption>Moments. Formula. Desire.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=caf936a22c56" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackgenius/how-to-hack-genius-caf936a22c56">How to hack genius</a> was originally published in <a href="https://medium.com/hackgenius">hackgenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keywords in Python and C]]></title>
            <link>https://medium.com/hackgenius/keyword-comparison-between-python-and-c-f3dc4b6f0eec?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3dc4b6f0eec</guid>
            <category><![CDATA[keywords]]></category>
            <category><![CDATA[c-language]]></category>
            <category><![CDATA[insights]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Mon, 03 Sep 2018 10:44:27 GMT</pubDate>
            <atom:updated>2026-01-31T18:28:01.507Z</atom:updated>
            <content:encoded><![CDATA[<p>How to start comparing two programming languages? Begin at the <strong>core</strong> by analyzing the <strong>keywords </strong>(aka <em>a small set of words that are reserved and important to the language</em><strong>) </strong>that are <strong><em>exclusive</em></strong> to both languages.</p><p><strong>UPDATE</strong> Mar 2024: Added lambda to the unique keyword list in Python.<br><strong>UDDATE </strong>Apr 2025: <em>tl;dr </em>tabular comparison at <a href="https://github.com/kgisl/cs8251/blob/9b63e32fb89ea698ad8ea5fa7817faab46eae8fd/lab/Python%20vs%20C%20Language%20Keyword%20Comparison.md#unique-keywords-in-each-language">https://bit.ly/keywordsTable</a></p><h3>Comparing Python and C through Keywords</h3><p>As reported elsewhere (<a href="http://j.mp/reservedWords">http://j.mp/reservedWords</a>), here are some popular languages and the count of keywords in each of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*JGZgd90b0KT4dvVZZGWG-Q.png" /></figure><p>For quite some time, with only 31 keywords, Python (Version 2) had held the distinction of being the <strong>“language with the least number of keywords”. </strong>Of course, we need to ignore Smalltalk (6) and the not-yet-mainstream Go (25) and Elm (25).</p><p>But with the transition to Python 3, that <strong>distinction</strong> has been ceded back to the good old C language (total keywords is 32). In any case, I was quite curious as to what were the additional keywords that were added to the language. Here’s what I came up with:</p><ul><li>In the transition from Python_2 to Python_3, there have been six changes to the keyword list — four were added and two were removed, resulting in a net addition of two.</li><li><strong>UPDATE </strong><em>(May 2023)</em>: Python 3.9.5 now has 36. Launch <a href="https://ideone.com/h7LbNb">this</a>!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*p_nLXP3vZRleaPkhQFapjg.png" /><figcaption>Python 3.9.5 keywords has one extra.</figcaption></figure><h3>Net Change is +6–4 = +2</h3><pre>Keywords added to Python_3: {&#39;None&#39;, &#39;nonlocal&#39;,  &#39;True&#39;, &#39;False&#39;}<br>Keywords removed from: {&#39;print&#39;, &#39;exec&#39;}<br>Total changes: 6</pre><p>Note: Both print and exec have been removed as keywords but retained as <strong>built-in</strong> functions. For an in-depth and insightful answer on behaviour of exec in Python 3 vis-à-vis Python 2, read <a href="https://stackoverflow.com/questions/15086040/behavior-of-exec-function-in-python-2-and-python-3">this</a>.</p><h3>“Core” Python versus “Core” C</h3><p>If you really think about it, it is not an <strong>apples-to-apples</strong> comparison when you compare the count of keywords in a strictly typed language (C, Java, etc.) versus a dynamic language (Python). Also, C does not have syntax that supports object-oriented programming or exception handling, whereas Python does.</p><p>Nevertheless, for the benefit of a developer/student who is familiar with core Python and is keen on familiarizing with the core part of the C language, the journey can start with a critical inspection of the keywords in both the languages. While “<em>type-less</em>” C has 21 keywords, “<em>essential</em>” Python (sans keywords related to objected orientation and exception handling) has 16 keywords.</p><pre>-----------------------<br>Comparing keywords in Python and type-less C<br>-----------------------<br>Python: [&#39;break&#39;, &#39;class&#39;, &#39;continue&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;else&#39;, &#39;for&#39;, &#39;global&#39;, &#39;if&#39;, &#39;in&#39;, &#39;is&#39;, <br>&#39;nonlocal&#39;, &#39;pass&#39;, &#39;return&#39;, &#39;while&#39;] <br><em># Total - 15 </em></pre><pre>&quot;type-less&quot; C Language: [&#39;auto&#39;, &#39;break&#39;, &#39;const&#39;, <br>&#39;continue&#39;, &#39;do&#39;, &#39;else&#39;, &#39;enum&#39;, &#39;extern&#39;, &#39;for&#39;, <br>&#39;goto&#39;, &#39;if&#39;, &#39;lambda&#39;, &#39;register&#39;, &#39;return&#39;, &#39;sizeof&#39;, <br>&#39;static&#39;, &#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;void&#39;, <br>&#39;volatile&#39;, &#39;while&#39;] <br><em># Total - 21</em></pre><p>If you remove the keywords that are common to both the above lists, here’s what remains:</p><pre>------ DIFFERENCE -------<br>extra in python: [&#39;class&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;global&#39;, &#39;in&#39;, &#39;is&#39;, &#39;lambda&#39;, &#39;nonlocal&#39;, &#39;pass&#39;] 9</pre><pre>extra in clang: [&#39;auto&#39;, &#39;const&#39;, &#39;do&#39;, &#39;enum&#39;, <br>&#39;extern&#39;, &#39;goto&#39;, &#39;register&#39;, &#39;sizeof&#39;, &#39;static&#39;, <br>&#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;volatile&#39;] 14</pre><p>My 5-part analysis below will attempt to compare and contrast the two languages by referring to the above <strong>22 keywords </strong>(8 that exists only in Python verus 14 that exists only in C language).</p><h3>Part 0 (programming constructs)</h3><ul><li>The do-while loop construct exists in C, but not in Python.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*i9FDRFUsm14dSRxP.png" /><figcaption>The difference can be almost life and death!</figcaption></figure><ul><li>enum exist in C to give variable-like labels to numeric values. You can also define constant values (<em>and</em> macros) using preprocessor directives (<strong>#define</strong>). There is no support for something like this in Python.</li><li>C has the keywordsswitch-case-default that help implement the multi-conditional constructs which can be quite elegant when used with enum. The equivalent of this can be codified with a series of non-elegant if-elif statements or using the more elegant <a href="https://python.plainenglish.io/use-python-dictionary-as-a-switch-2b1f5450d46a">dict</a> datatype in Python.</li><li>goto allows you to jump to an arbitrary location in the Ccode, and allowing for obscure source code to be written. And for that reason, it is recommended that this keyword be used sparingly. But then, see below for a code snippet from the Linux <strong>kernel </strong>code that uses goto. Go figure. There is no support for this kind of conditional jumps in Python.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/0*S4NUImnwgXHpWJZ6" /><figcaption>code snippet from the Linux kernel that uses goto</figcaption></figure><ul><li>A function or class definition in Python requires def which is not required in C. lambdais a keyword used to create anonymous functions in Python.</li><li>pass - a Python statement which has no effect; the equivalent of this is best achieved in C by using the ; delimiter.</li></ul><h3>Part 1 (scope)</h3><ul><li>Scope options are accomplished by using global and nonlocal in Python, whereas in C the keywords auto, static and extern are used.</li><li>C continues to be one of the few languages that allows you to get close to the metal, and that is why it has keywords like register and <a href="http://bit.ly/volatileKeyword">volatile</a>.</li><li>For example, keyword volatile is used to declare <strong>volatile</strong> variables, which are variables that can be changed by external factors, such as hardware devices.</li><li>The keyword register is used to declare register variables, which are variables that are stored in <strong>CPU registers</strong> instead of memory. <a href="https://bit.ly/registerClang"><em>“A CPU register can be accessed in less than a CPU cycle on modern super-scalar CPUs (as opposed to going to memory which can </em></a>take <em>100–300 CPU cycles.</em>”</li></ul><h3>Part 2 (objects and immutability)</h3><ul><li>Python supports object-oriented programming with the class keyword whereas the closest equivalents in C would be struct and typedef. The memory-efficient construct union, is unique to C and is not found in other strictly typed languages.</li><li>In Python, where everything is an object, there is an explicit del keyword.</li><li>At compile time, the C programmer can signal the need for <strong>immutability</strong> by using const as a prefix along with the data type. In Python, the mutability or immutability of an object is determined by its type.</li></ul><h3>Part 3 (object inspection)</h3><ul><li>Member introspection in a sequence or collection is possible in Python using the inkeyword - there is no equivalent of that in C.</li><li>Object equivalence is supported in Python and the keyword is is used to accomplish this. It returns False even if the objects are<a href="https://www.w3schools.com/python/ref_keyword_is.asp#:~:text=The%20is%20keyword%20is%20used,two%20objects%20are%20100%25%20equal."> 100% equal</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*Wl7YZX6MQBvpWA-Qdm1aJQ.png" /><figcaption>Object equivalence checking in Python.</figcaption></figure><h3>Part 4 (related to memory)</h3><ul><li>sizeof- is it a macro or a keyword? Or is it an <a href="https://en.cppreference.com/w/c/language/sizeof">operator</a>? That’s a source for intense debate. The keyword is typically used when invoking <a href="https://github.com/kgisl/cs8251/blob/master/notes/dynamicMemory.md">dynamic memory allocation</a>. In contrast, <em>explicit</em> memory management is non-existent in Python.</li><li>A comparison of the <strong>operators </strong>supported in the languages highlights a significant difference: C language heavily utilizes pointers. Using the unary &amp; and * (address and de-referencing) operators, <a href="https://www.w3schools.com/c/c_pointers.php">pointer variables</a> in C allows the programmer to <strong>“</strong><a href="https://bit.ly/toTheMetal"><strong>write to the metal</strong></a><strong>”</strong>, i.e. have direct access to and modification of memory.</li></ul><h3>Misc</h3><p>Remember, the above analysis has been about comparing <em>“type-less”</em> C and <em>“non-OOP and exception handling free”</em> Python. Again, an important capability of the C language is its support for <strong>preprocessor</strong> <strong>directives </strong>(using #define and #undef) for defining <a href="https://www.simplilearn.com/tutorials/c-tutorial/what-is-macros-in-c#:~:text=CTMEEnroll%20Now-,What%20Are%20Macros%20in%20C%3F,terminated%20by%20the%20semicolon(%3B).">macros</a><strong>.</strong></p><h3>Pop Quiz</h3><p>What does Python <strong><em>dynamically</em></strong> provide for that the C language doesn’t? What does the C language <strong><em>dynamically</em></strong> provide for that Python doesn’t?</p><h3>Program listing</h3><p>The above lists of keywords were generated using a Python (Version 3) program which is listed below.</p><pre>import keyword<br>python3 = keyword.kwlist</pre><pre># this can be obtained from a Python2 interpreter<br># by using the above two statements <br>#<br>python2 = [<br>	&#39;and&#39;, &#39;as&#39;, &#39;assert&#39;, &#39;break&#39;, &#39;class&#39;, &#39;continue&#39;,<br>	&#39;def&#39;, &#39;del&#39;, &#39;elif&#39;, &#39;else&#39;, &#39;except&#39;, &#39;exec&#39;, <br>	&#39;finally&#39;, &#39;for&#39;, &#39;from&#39;, &#39;global&#39;, &#39;if&#39;, &#39;import&#39;, <br>	&#39;in&#39;, &#39;is&#39;, &#39;lambda&#39;, &#39;not&#39;, &#39;or&#39;, &#39;pass&#39;, &#39;print&#39;,<br>	&#39;raise&#39;, &#39;return&#39;, &#39;try&#39;, &#39;while&#39;, &#39;with&#39;, &#39;yield&#39;<br>]</pre><pre># new keywords in Python 3 <br>additional = set(python3) - set(python2)<br>print(&quot;Keywords added to Python3:&quot;, additional)</pre><pre>removed = set(python2) - set(python3)<br>print(&quot;Keywords removed from:&quot;, removed)</pre><pre>print(&quot;Total changes:&quot;, len(additional) + len(removed))<br></pre><pre>print(&quot;-----------------------&quot;)<br>print(&quot;Comparing keywords in Python and C&quot;)<br>print(&quot;-----------------------&quot;)</pre><pre>&#39;&#39;&#39;<br># get keywords for C from webpages <br># write a scrap program by processing links in   <br>  https://www.programiz.com/c-programming/list-all-keywords-c-language<br>  <br>  http://tigcc.ticalc.org/doc/keywords.html#switch<br>&#39;&#39;&#39;<br></pre><pre>clang = []<br>with open(&quot;programiz.txt&quot;, &quot;r&quot;) as fp:<br>  links = fp.readlines()<br>  for link in links: <br>    try:<br>      link.index(&quot;list-all-keywords-c-language#&quot;) <br>      hashsymbol = link.find(&quot;#&quot;)<br>      keyword = link[hashsymbol+1:-1]<br>      #print(&quot;found keyword&quot;, keyword)<br>              list = keyword.split(&quot;_&quot;)</pre><pre>      clang.extend(klist)<br>    except:<br>      pass</pre><pre>clang.extend([&quot;size_t&quot;, &quot;NULL&quot;])</pre><pre>clangRemove = [<br>    &#39;NULL&#39;,<br>    &#39;char&#39;, &#39;int&#39;, &#39;float&#39;, &#39;double&#39;, &#39;long&#39;, &#39;size_t&#39;, &#39;void&#39;,<br>    &#39;short&#39;, &#39;unsigned&#39;, &#39;signed&#39;,<br>    &#39;switch&#39;, &#39;case&#39;, &#39;default&#39;,<br>    # &#39;auto&#39;, &#39;volatile&#39;, &#39;register&#39;, <br>    # &#39;enum&#39;, &#39;typedef&#39;,<br>]</pre><pre>clang = [<br>    keyword for keyword in clang <br>    if keyword not in clangRemove<br>]</pre><pre>pythonRemove = [<br>    &#39;None&#39;, &#39;False&#39;, &#39;True&#39;,<br>    &#39;assert&#39;, &#39;with&#39;, &#39;yield&#39;, &#39;lambda&#39;,<br>    &#39;try&#39;, &#39;except&#39;, &#39;finally&#39;, &#39;raise&#39;,<br>    &#39;import&#39;, &#39;from&#39;, &#39;as&#39;, <br>    &#39;and&#39;, &#39;or&#39;, &#39;not&#39;,<br>    &#39;elif&#39;<br>]</pre><pre>python3 = [<br>    keyword for keyword in python3<br>        if keyword not in pythonRemove<br>]</pre><pre>print(&quot;Python:&quot;, sorted(python3), len(python3))<br>print()<br>print(&quot;&#39;typefree&#39; C Language:&quot;, sorted(clang), len(clang))<br></pre><pre>print(&quot;\n------ DIFFERENCE -------&quot;)<br>pextra = set(python3) - set(clang)<br>cextra = set(clang) - set(python3)<br>print(&quot;extra in python:&quot;, sorted(pextra), len(pextra))<br>print(&quot;extra in clang:&quot;, sorted(cextra), len(cextra))</pre><h3>Program Output</h3><pre>Keywords added to Python3: {&#39;None&#39;, &#39;nonlocal&#39;, <br>&#39;True&#39;, &#39;False&#39;}<br>Keywords removed from: {&#39;print&#39;, &#39;exec&#39;}<br>Total changes: 6<br>-----------------------<br>Comparing keywords in Python and C<br>-----------------------<br>Python: [&#39;break&#39;, &#39;class&#39;, &#39;continue&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;else&#39;, &#39;for&#39;, &#39;global&#39;, &#39;if&#39;, &#39;in&#39;, &#39;is&#39;, <br>&#39;nonlocal&#39;, &#39;pass&#39;, &#39;return&#39;, &#39;while&#39;] 15</pre><pre>&#39;typefree&#39; C Language: [&#39;auto&#39;, &#39;break&#39;, &#39;const&#39;, <br>&#39;continue&#39;, &#39;do&#39;, &#39;else&#39;, &#39;enum&#39;, &#39;extern&#39;, &#39;for&#39;, <br>&#39;goto&#39;, &#39;if&#39;, &#39;register&#39;, &#39;return&#39;, &#39;sizeof&#39;, <br>&#39;static&#39;, &#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;void&#39;, <br>&#39;volatile&#39;, &#39;while&#39;] 21</pre><pre>------ DIFFERENCE -------<br>extra in python: [&#39;class&#39;, &#39;def&#39;, &#39;del&#39;, &#39;global&#39;, <br>&#39;in&#39;, &#39;is&#39;, &#39;nonlocal&#39;, &#39;pass&#39;] 8<br>extra in clang: [&#39;auto&#39;, &#39;const&#39;, &#39;do&#39;, &#39;enum&#39;, <br>&#39;extern&#39;, &#39;goto&#39;, &#39;register&#39;, &#39;sizeof&#39;, &#39;static&#39;, <br>&#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;volatile&#39;] 14</pre><h3>Useful links</h3><ul><li>Google’s AI search output — <a href="https://bit.ly/3v1Jecn">https://bit.ly/3v1Jecn</a></li><li>Also see the typical (<em>and rather boring!</em>) analysis of these two languages at <a href="https://medium.com/edureka/python-vs-c-b83446bc2c23">https://medium.com/edureka/python-vs-c-b83446bc2c23</a> .</li><li>Python and C — Comparisons and Contrast s<a href="https://www.rose-hulman.edu/class/cs/csse120/Resources/C/Python_vs_C.html">https://www.rose-hulman.edu/class/cs/csse120/Resources/C/Python_vs_C.html</a></li><li>Learn XinY minutes <a href="https://learnxinyminutes.com/docs/c/">https://learnxinyminutes.com/docs/c/</a></li><li>C for Python Programmers <a href="https://web.archive.org/web/20190315070958/http://www.toves.org/books/cpy/">https://web.archive.org/web/20190315070958/http://www.toves.org/books/cpy/</a></li><li>Short tutorial <a href="http://techbeamers.com/python-keywords-identifiers-variables/">http://techbeamers.com/python-keywords-identifiers-variables/</a></li><li>Tutorial for each of the Python keywords: <a href="http://j.mp/python3Keywords">http://j.mp/python3Keywords</a></li><li>See another comparison <a href="https://kov.ai/cppJS">https://kov.ai/cppJS</a> or <a href="http://bit.ly/keywordsJSVsCpp">http://bit.ly/keywordsJSVsCpp</a> (between C++ and JavaScript) written by a former KiTE student</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3dc4b6f0eec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackgenius/keyword-comparison-between-python-and-c-f3dc4b6f0eec">Keywords in Python and C</a> was originally published in <a href="https://medium.com/hackgenius">hackgenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keywords in Python and C]]></title>
            <link>https://medium.com/professional-pirates/keywords-in-python-and-c-a1ef167c23c5?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1ef167c23c5</guid>
            <category><![CDATA[keywords]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Mon, 03 Sep 2018 10:44:27 GMT</pubDate>
            <atom:updated>2018-09-04T02:57:32.547Z</atom:updated>
            <content:encoded><![CDATA[<p>Comparing keywords that are common and unique to both languages provides for interesting insights.</p><p>As reported elsewhere (<a href="http://j.mp/reservedWords">http://j.mp/reservedWords</a>), here are some popular languages and the count of keywords in each of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*JGZgd90b0KT4dvVZZGWG-Q.png" /></figure><p>For quite some time, with only 31 keywords, Python (Version 2) had held the distinction of being the <strong>“language with the least number of keywords”. </strong>Of course, we need to ignore Smalltalk (6) and the not-yet-mainstream Go (25) and Elm (25).</p><p>But with the transition to Python 3, that <strong>distinction</strong> has been ceded to the C language (total keywords is 32). Therefore, I was quite curious as to what were the additional keywords that were added to the language. Here’s what I came up with:</p><ul><li>In the transition from Python_2 to Python_3, actually there have been six changes to the keyword list; four were added and two were removed, resulting in a net addition of 2.</li></ul><pre>Keywords added to Python_3: {&#39;None&#39;, &#39;nonlocal&#39;, &#39;True&#39;, &#39;False&#39;}<br>Keywords removed from: {&#39;print&#39;, &#39;exec&#39;}<br>Total changes: 6</pre><p>Note: Both print and exec have been removed keywords but retained as <strong>built-in</strong> functions. For an in-depth and insightful answer on behaviour of exec in Python 3 vis-à-vis Python 2, read <a href="https://stackoverflow.com/questions/15086040/behavior-of-exec-function-in-python-2-and-python-3">this</a>.</p><p>If you really think about it, it is not an <strong>apples-to-apples</strong> comparison when you comparing the count of keywords in a strictly typed language (C, Java, etc) versus a dynamic language (Python). Also, C does not have syntax that supports object-oriented programming or exception handling, whereas Python does.</p><p>Nevertheless, for the benefit of a developer/student who is familiar with core Python and is keen on familiarizing with the core part of the C language, the journey can start with an critical inspection of the keywords in both the languages. In comparison to <em>“type-free”</em> C, Python (sans keywords related to objected orientation and exception handling) has 15 keywords and C has 21 keywords.</p><pre>-----------------------<br>Comparing keywords in Python and type-free C<br>-----------------------<br>Python: [&#39;break&#39;, &#39;class&#39;, &#39;continue&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;else&#39;, &#39;for&#39;, &#39;global&#39;, &#39;if&#39;, &#39;in&#39;, &#39;is&#39;, <br>&#39;nonlocal&#39;, &#39;pass&#39;, &#39;return&#39;, &#39;while&#39;] Total - 15</pre><pre>`typefree` C Language: [&#39;auto&#39;, &#39;break&#39;, &#39;const&#39;, <br>&#39;continue&#39;, &#39;do&#39;, &#39;else&#39;, &#39;enum&#39;, &#39;extern&#39;, &#39;for&#39;, <br>&#39;goto&#39;, &#39;if&#39;, &#39;register&#39;, &#39;return&#39;, &#39;sizeof&#39;, <br>&#39;static&#39;, &#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;void&#39;, <br>&#39;volatile&#39;, &#39;while&#39;] Total - 21</pre><p>If you remove the keywords that are common to both the above lists, here’s what remains:</p><pre>------ DIFFERENCE -------<br>extra in python: [&#39;class&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;global&#39;, &#39;in&#39;, &#39;is&#39;, &#39;nonlocal&#39;, &#39;pass&#39;] 8</pre><pre>extra in clang: [&#39;auto&#39;, &#39;const&#39;, &#39;do&#39;, &#39;enum&#39;, <br>&#39;extern&#39;, &#39;goto&#39;, &#39;register&#39;, &#39;sizeof&#39;, &#39;static&#39;, <br>&#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;volatile&#39;] 14</pre><p>My analysis below will attempt to compare and contrast the two languages by referring to the above <strong>22 keywords </strong>(8 that exists only in Python verus 14 that exists only in C).</p><ul><li>The do-while loop construct exists in C, but not in Python</li><li>enum exist in C to give variable-like labels to numeric values, but this is not supported in Python</li><li>C also has the switch-case-default keywords allowing for multi-conditional constructs which can be quite elegant when used with enums. The equivalent of this can be codified with a series non-elegant if-elif statements in Python</li><li>goto allows you to jump to an arbitrary location in the Ccode, and allowing for obscure source code to be written. And for that reason, it is recommended that this keyword be used sparingly; totally unsupported in Python</li><li>A function or class definition in Python requires def which is not required in C</li><li>pass - a Python statement which has no effect; the equivalent of this is best achieved in C by using the ; delimiter</li><li>Scope options are accomplished by using global and nonlocal in Python, whereas in C the keywords auto, static and extern are used.</li><li>C continues to be one of the few languages that allows you to get closer to the metal, and that is why it has keywords like register and volatile .</li><li>sizeof- is it a macro or a keyword? that’s a source for intense debate. The keyword is normally used in calculation of dynamic memory allocation. In contrast, <em>explicit</em> memory management is non-existent in Python.</li><li>Python supports object-oriented programming with the class keyword for which the closest equivalents would be struct and typedef in C. union, the memory-efficient construct is rather unique to C, which is not found even in other strictly typed languages.</li><li>Everything is an object in Python, and therefore an explicit del exists.</li><li>C has the ability to define that variable of any data type to be const at compile time, whereas in Python, the type of the object pre-determines whether it is mutable or immutable.</li><li>Member introspection in a sequence or collection is possible in Python through inkeyword - there is no equivalent of that in C.</li><li><a href="https://en.wikipedia.org/wiki/Type_introspection#Python">Type reflection</a> (meaning you can ask an object what type it is) and object equivalence is supported in Python and is is used to accomplish this.</li></ul><p>The above lists of keywords were generated using a Python (Version 3) program which is listed below.</p><h3>Program Listing and Output</h3><pre>import keyword<br>python3 = keyword.kwlist</pre><pre># this can be obtained from a Python2 interpreter<br># by using the above two statements <br>#<br>python2 = [<br>	&#39;and&#39;, &#39;as&#39;, &#39;assert&#39;, &#39;break&#39;, &#39;class&#39;, &#39;continue&#39;,<br>	&#39;def&#39;, &#39;del&#39;, &#39;elif&#39;, &#39;else&#39;, &#39;except&#39;, &#39;exec&#39;, <br>	&#39;finally&#39;, &#39;for&#39;, &#39;from&#39;, &#39;global&#39;, &#39;if&#39;, &#39;import&#39;, <br>	&#39;in&#39;, &#39;is&#39;, &#39;lambda&#39;, &#39;not&#39;, &#39;or&#39;, &#39;pass&#39;, &#39;print&#39;,<br>	&#39;raise&#39;, &#39;return&#39;, &#39;try&#39;, &#39;while&#39;, &#39;with&#39;, &#39;yield&#39;<br>]</pre><pre># new keywords in Python 3 <br>additional = set(python3) - set(python2)<br>print(&quot;Keywords added to Python3:&quot;, additional)</pre><pre>removed = set(python2) - set(python3)<br>print(&quot;Keywords removed from:&quot;, removed)</pre><pre>print(&quot;Total changes:&quot;, len(additional) + len(removed))</pre><pre>print(&quot;-----------------------&quot;)<br>print(&quot;Comparing keywords in Python and C&quot;)<br>print(&quot;-----------------------&quot;)</pre><pre>&#39;&#39;&#39;<br># get keywords for C from webpages <br># write a scrap program by processing links in <br> https://www.programiz.com/c-programming/list-all-keywords-c-language<br> <br> http://tigcc.ticalc.org/doc/keywords.html#switch<br>&#39;&#39;&#39;<br># Also read <a href="http://www.toves.org/books/cpy/">http://www.toves.org/books/cpy/</a></pre><pre>clang = []<br>with open(&quot;programiz.txt&quot;, &quot;r&quot;) as fp:<br> links = fp.readlines()<br> for link in links: <br> try:<br> link.index(&quot;list-all-keywords-c-language#&quot;) <br> hashsymbol = link.find(&quot;#&quot;)<br> keyword = link[hashsymbol+1:-1]<br> #print(&quot;found keyword&quot;, keyword)<br> list = keyword.split(&quot;_&quot;)</pre><pre>clang.extend(klist)<br> except:<br> pass</pre><pre>clang.extend([&quot;size_t&quot;, &quot;NULL&quot;])</pre><pre>clangRemove = [<br> &#39;NULL&#39;,<br> &#39;char&#39;, &#39;int&#39;, &#39;float&#39;, &#39;double&#39;, &#39;long&#39;, &#39;size_t&#39;, &#39;void&#39;,<br> &#39;short&#39;, &#39;unsigned&#39;, &#39;signed&#39;,<br> &#39;switch&#39;, &#39;case&#39;, &#39;default&#39;,<br> # &#39;auto&#39;, &#39;volatile&#39;, &#39;register&#39;, <br> # &#39;enum&#39;, &#39;typedef&#39;,<br>]</pre><pre>clang = [<br> keyword for keyword in clang <br> if keyword not in clangRemove<br>]</pre><pre>pythonRemove = [<br> &#39;None&#39;, &#39;False&#39;, &#39;True&#39;,<br> &#39;assert&#39;, &#39;with&#39;, &#39;yield&#39;, &#39;lambda&#39;,<br> &#39;try&#39;, &#39;except&#39;, &#39;finally&#39;, &#39;raise&#39;,<br> &#39;import&#39;, &#39;from&#39;, &#39;as&#39;, <br> &#39;and&#39;, &#39;or&#39;, &#39;not&#39;,<br> &#39;elif&#39;<br>]</pre><pre>python3 = [<br> keyword for keyword in python3<br> if keyword not in pythonRemove<br>]</pre><pre>print(&quot;Python:&quot;, sorted(python3), len(python3))<br>print()<br>print(&quot;&#39;typefree&#39; C Language:&quot;, sorted(clang), len(clang))</pre><pre>print(&quot;\n------ DIFFERENCE -------&quot;)<br>pextra = set(python3) - set(clang)<br>cextra = set(clang) - set(python3)<br>print(&quot;extra in python:&quot;, sorted(pextra), len(pextra))<br>print(&quot;extra in clang:&quot;, sorted(cextra), len(cextra))</pre><pre>Keywords added to Python3: {&#39;None&#39;, &#39;nonlocal&#39;, <br>&#39;True&#39;, &#39;False&#39;}<br>Keywords removed from: {&#39;print&#39;, &#39;exec&#39;}<br>Total changes: 6<br>-----------------------<br>Comparing keywords in Python and C<br>-----------------------<br>Python: [&#39;break&#39;, &#39;class&#39;, &#39;continue&#39;, &#39;def&#39;, &#39;del&#39;, <br>&#39;else&#39;, &#39;for&#39;, &#39;global&#39;, &#39;if&#39;, &#39;in&#39;, &#39;is&#39;, <br>&#39;nonlocal&#39;, &#39;pass&#39;, &#39;return&#39;, &#39;while&#39;] 15</pre><pre>&#39;typefree&#39; C Language: [&#39;auto&#39;, &#39;break&#39;, &#39;const&#39;, <br>&#39;continue&#39;, &#39;do&#39;, &#39;else&#39;, &#39;enum&#39;, &#39;extern&#39;, &#39;for&#39;, <br>&#39;goto&#39;, &#39;if&#39;, &#39;register&#39;, &#39;return&#39;, &#39;sizeof&#39;, <br>&#39;static&#39;, &#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;void&#39;, <br>&#39;volatile&#39;, &#39;while&#39;] 21</pre><pre>------ DIFFERENCE -------<br>extra in python: [&#39;class&#39;, &#39;def&#39;, &#39;del&#39;, &#39;global&#39;, <br>&#39;in&#39;, &#39;is&#39;, &#39;nonlocal&#39;, &#39;pass&#39;] 8<br>extra in clang: [&#39;auto&#39;, &#39;const&#39;, &#39;do&#39;, &#39;enum&#39;, <br>&#39;extern&#39;, &#39;goto&#39;, &#39;register&#39;, &#39;sizeof&#39;, &#39;static&#39;, <br>&#39;struct&#39;, &#39;typedef&#39;, &#39;union&#39;, &#39;volatile&#39;] 14</pre><p><em>Originally published at </em><a href="https://medium.com/hackgenius/keyword-comparison-between-python-and-c-f3dc4b6f0eec"><em>medium.com</em></a><em> on September 3, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1ef167c23c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/professional-pirates/keywords-in-python-and-c-a1ef167c23c5">Keywords in Python and C</a> was originally published in <a href="https://medium.com/professional-pirates">Professional Pirates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why every engineer must write regularly]]></title>
            <link>https://medium.com/professional-pirates/why-every-engineer-must-write-regularly-62be6670424e?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/62be6670424e</guid>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Sat, 25 Aug 2018 08:53:00 GMT</pubDate>
            <atom:updated>2018-08-26T18:49:13.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Demonstrate your commitment to Coding (or any other technical skills) and Communication on a daily basis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*zOe8w3iipcBdnrGNAq5lng.png" /><figcaption>Publish your progress on a <strong><em>daily basis</em></strong> towards your goals.</figcaption></figure><p><em>Originally published at </em><a href="https://medium.com/hackgenius/why-every-engineer-must-write-aad94d35b839"><em>medium.com</em></a><em> on August 25, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62be6670424e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/professional-pirates/why-every-engineer-must-write-regularly-62be6670424e">Why every engineer must write regularly</a> was originally published in <a href="https://medium.com/professional-pirates">Professional Pirates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why every engineer must write regularly]]></title>
            <link>https://medium.com/hackgenius/why-every-engineer-must-write-aad94d35b839?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/aad94d35b839</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[communication-skills]]></category>
            <category><![CDATA[commitment]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Sat, 25 Aug 2018 08:53:00 GMT</pubDate>
            <atom:updated>2021-12-28T03:02:03.921Z</atom:updated>
            <content:encoded><![CDATA[<p>Demonstrate your commitment to Coding (or any other technical skills) and Communication on a daily basis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zOe8w3iipcBdnrGNAq5lng.png" /><figcaption>Publish your progress on a <strong><em>daily basis</em></strong> towards your goals.</figcaption></figure><p>It is important not only to become technically strong, but also document your progress towards this goal. Use a blogging site (like Medium) to publish to the world about your <strong>commitment</strong> to <strong>technical</strong> skills (especially coding if you are a computer science engineering student, it could be others skills for other streams) <em>and</em> <strong>communication</strong> skills.</p><p>What to write? How often to write? How to start? Please read this article <a href="https://medium.freecodecamp.org/why-every-software-engineer-should-write-articles-f35bdae72d1b">https://medium.freecodecamp.org/why-every-software-engineer-should-write-articles-f35bdae72d1b</a></p><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aad94d35b839" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackgenius/why-every-engineer-must-write-aad94d35b839">Why every engineer must write regularly</a> was originally published in <a href="https://medium.com/hackgenius">hackgenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ulimate Cut-and-Paste Job]]></title>
            <link>https://medium.com/professional-pirates/the-ulimate-cut-and-paste-job-9327ac8873d4?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/9327ac8873d4</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[prime-numbers]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Sun, 11 Mar 2018 07:55:09 GMT</pubDate>
            <atom:updated>2018-09-17T03:38:29.901Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Ultimate Cut-and-Paste Job and a JavaScript challenge</h3><p>The <strong>task</strong>: Write python code to generate prime_factors for any integer.</p><p>The <strong>solution</strong>: A one-liner Python program (okay three, if you count the <strong>import</strong> statements) which get the job done, without <strong><em>actually</em></strong> defining the function. Lo and behold!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*dBCRnYf0nvvkgZLpKysUig.png" /><figcaption>Credits: suic on codewars.com</figcaption></figure><p>The above python code scrapes and selects one of the answers associated with the related <strong>Stackoverflow</strong> question. The exec function call eliminates the need for performing the typical cut-and-paste job! How cool is that? That’s why Python <em>rocks</em>!</p><p>Incredible, isn’t it? Take it for a spin below:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Frepl.it%2F%40kgashok%2FIntelligentImaginaryStrategy%3Flite%3Dtrue&amp;url=https%3A%2F%2Frepl.it%2F%40kgashok%2FIntelligentImaginaryStrategy%3Flite%3Dtrue&amp;image=https%3A%2F%2Frepl.it%2Fpublic%2Fimages%2Freplit-logo-800x600.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=repl" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/056e1df4ef0d75d3b5cbbe7a985818e9/href">https://medium.com/media/056e1df4ef0d75d3b5cbbe7a985818e9/href</a></iframe><h3>The JavaScript Challenge</h3><p>Who will be the first one to write an equivalent <strong>Javascript</strong> program that does exactly what the Python program does?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9327ac8873d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/professional-pirates/the-ulimate-cut-and-paste-job-9327ac8873d4">The Ulimate Cut-and-Paste Job</a> was originally published in <a href="https://medium.com/professional-pirates">Professional Pirates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write about one web tool]]></title>
            <link>https://medium.com/professional-pirates/write-about-one-web-tool-14468974b191?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/14468974b191</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[curiosity]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[hackathon-organizing]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Thu, 22 Feb 2018 19:30:32 GMT</pubDate>
            <atom:updated>2023-06-16T17:20:45.080Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>First read up on <a href="https://medium.freecodecamp.org/tools-i-wish-i-had-known-about-when-i-started-coding-57849efd9248">https://medium.freecodecamp.org/tools-i-wish-i-had-known-about-when-i-started-coding-57849efd9248</a></li><li>Choose a tool of your liking.</li><li>Do something with the tool, big or small, trivial or important. It does not matter. All that it matters, is use it to understand what it can do.</li><li>Add a comment below on which tool you chose, why and how you put it to use!</li><li>Repeat <strong><em>at least once more</em></strong>, starting at Step 2.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14468974b191" width="1" height="1" alt=""><hr><p><a href="https://medium.com/professional-pirates/write-about-one-web-tool-14468974b191">Write about one web tool</a> was originally published in <a href="https://medium.com/professional-pirates">Professional Pirates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blog counter for a Publication]]></title>
            <link>https://medium.com/professional-pirates/blog-counter-cefba2b0fb9d?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/cefba2b0fb9d</guid>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Sat, 20 Jan 2018 12:24:58 GMT</pubDate>
            <atom:updated>2018-01-20T14:12:41.525Z</atom:updated>
            <content:encoded><![CDATA[<p>It is a good habit to write as often as possible on your personal blog. Write about anything that is of interest to you. It could be your progress towards a goal that you have set for yourself.</p><p><a href="https://medium.com/professional-pirates/my-first-api-development-7d9e601430ac">Manivasakam R of KGISL IIM</a> (<a href="http://www.kgisliim.ac.in/">http://www.kgisliim.ac.in/</a>) has developed a nice <strong>Blog Counter</strong> over at <a href="http://cbcounter.herokuapp.com/">http://cbcounter.herokuapp.com/</a>. His counter generates a report on the number of blogs made by each contributor to a common blog.</p><p>Take a look at it, remix his code and give it a twist of your own!</p><p>Only recently, Medium has started to open up its API and allow for integration. Read up more on this at <a href="https://venturebeat.com/2015/10/07/medium-opens-up-publishing-api-adds-wordpress-plugin-and-adds-new-content-partners/">https://venturebeat.com/2015/10/07/medium-opens-up-publishing-api-adds-wordpress-plugin-and-adds-new-content-partners/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZNGshlhgzlDSItgSOMZGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_VaNRq7TUOiAWdRwGo_yTw.png" /><figcaption>Counter for blog entries in a common medium publication.</figcaption></figure><h3>Suggestions for Enhancement</h3><p>Two enhancement ideas to the existing blog counter <br> 1. Sort the list of bloggers based on their count (so it becomes a Blog Ladder) <br> 2. Every week, generate this report and automatically post it to the common blog using the medium API <br> 3. Automate Step 2 — is it even possible?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cefba2b0fb9d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/professional-pirates/blog-counter-cefba2b0fb9d">Blog counter for a Publication</a> was originally published in <a href="https://medium.com/professional-pirates">Professional Pirates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In-place Selection Sort]]></title>
            <link>https://medium.com/@lifebalance/in-place-select-sort-b865f82287c?source=rss-aa31acb95eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/b865f82287c</guid>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[sorting-algorithms]]></category>
            <dc:creator><![CDATA[Ashok Be]]></dc:creator>
            <pubDate>Mon, 06 Nov 2017 20:57:44 GMT</pubDate>
            <atom:updated>2017-11-08T15:31:41.408Z</atom:updated>
            <content:encoded><![CDATA[<p>In-place selection sort recursive code in Javascript</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*OASOnBWkECLk_iRFiw1O0Q.jpeg" /><figcaption>Just like when you play cards</figcaption></figure><p>Following <a href="https://medium.com/coderdojo-coimbatore/thinking-recursively-with-code-afce0b8a3dc0"><strong>Part 1</strong></a>, <strong>Part 2</strong> explores the in-place recursive Selection Sort technique which is not as straightforward, but still fun to wrap your head around using the JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice"><strong>splice</strong></a> function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pgWywep4lagMbS_HdVFp-w.png" /></figure><p>The in-place select sort algorithm calls for a swap of the minimum value (basis for selection) with a specific indexed location, starting from 0 to the one-minus length of array.</p><p>Line 21 secures the minimum value in the variableminVal which is <strong><em>spliced</em></strong> in place in the index location idx in Line 23. This is after the element in that indexed location has already been <strong><em>spliced</em></strong> into place at the location where the minimum value originally had been discovered.</p><p>And finally, the loop continues to proceed to handle each of the other elements in the list. But, wait a minute! There is an important tweak you have to make to the helper function <strong>indexOfMinValue</strong>, which is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BR2K4ClvM8m-piPnkdsJAQ.png" /></figure><p>Basically, the only addition is <strong>Line 10</strong> which filters out those elements that are not integers. More importantly, the i &lt; iMin check is required to ensure that the comparison check begins with the first element of the <strong>unsorted sub-list,</strong> which is located at thestart index.</p><p>Happy <strong>Sorting</strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b865f82287c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>