<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://tech.saigonist.com/taxonomy/term/18/all" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>python</title>
    <link>http://tech.saigonist.com/taxonomy/term/18/all</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Stack traces, backtraces, call stacks explained in JavaScript, Python, PHP</title>
    <link>http://tech.saigonist.com/b/code/stack-traces-backtraces-call-stacks-explained-javascript-python-php</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 12, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/stack&quot;&gt;stack&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/call-stack&quot;&gt;call stack&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/stack-trace&quot;&gt;stack trace&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/javascript&quot;&gt;javascript&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/python&quot;&gt;python&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/bash&quot;&gt;bash&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;People are rarely happy to see a stack trace. A stack trace often appears when software encounters an exception, an unexpected error which can&#039;t be handled gracefully and therefore most stop execution of the program. What the stack trace shows is what was happening in the moments leading up to the bug. The stack is called a stack because each item (each function call) is stacked on top of the previous one in a special part of computer memory called the stack. Most computers and programming languages work with a stack. In programs written in programming languages without side effects, a...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Fri, 11 Mar 2016 19:37:27 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">64 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Python-like List Comprehensions in JavaScript</title>
    <link>http://tech.saigonist.com/b/code/python-list-comprehensions-javascript</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 4, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/javascript&quot;&gt;javascript&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/es6&quot;&gt;es6&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/python&quot;&gt;python&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/functional&quot;&gt;functional&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/lambda&quot;&gt;lambda&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Python has a neat syntactic feature where you can take a literal list constructor&#039;s bracket notation (e.g. &lt;code&gt;[2, 4, 6, 8, 10]&lt;/code&gt;) but have code statements generate the list&#039;s contents. So instead of writing out the 5 even numbers in the example, one could write &lt;code&gt;[(x+1)*2 for x in range(5)]&lt;/code&gt; which turns out to be more characters but you can imagine the savings if the series in the list was longer. Instead of &lt;code&gt;range()&lt;/code&gt; we could have a literal list &lt;code&gt;[0, 1, 2, 3, 4]&lt;/code&gt; or even a generator function, anything which is iterable.&lt;/p&gt;

&lt;p&gt;How could we do this...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 03 Mar 2016 17:19:43 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">51 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>List Comprehensions in PHP (how to emulate Python)</title>
    <link>http://tech.saigonist.com/b/code/list-comprehensions-php-how-emulate-python</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 4, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/python&quot;&gt;python&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/functional&quot;&gt;functional&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/lambda&quot;&gt;lambda&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Python has a sweet syntactic feature where you can take a literal list written out in bracket notation (e.g. &lt;code&gt;[1, 3, 5, 7, 9]&lt;/code&gt;) but have inline expressions generate the list&#039;s contents. So instead of writing out the 5 consecutive odd numbers like above, in Python we can say &lt;code&gt;[(x*2+1 for x in range(5)]&lt;/code&gt; which turns out to be more characters but you can imagine the savings if the series in the list was longer and not just odd. Instead of &lt;code&gt;range()&lt;/code&gt; we could have a literal list &lt;code&gt;[0, 1, 2, 3, 4]&lt;/code&gt; or even a generator function, anything which is...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 03 Mar 2016 17:17:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">50 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Top 5 Programming Languages to Learn in 2016</title>
    <link>http://tech.saigonist.com/b/code/top-5-programming-languages-learn-2016</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;January 15, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/javascript&quot;&gt;javascript&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/python&quot;&gt;python&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/c-sharp&quot;&gt;c-sharp&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;It&#039;s a new year in a world that&#039;s moving faster than ever. This means it&#039;s important to keep up to date on technology, and young people who would have not been programmers before need to learn to code. There are various lists of programming languages by popularity of demand but they are too broad to read at face value. I&#039;ve seen many people fail to learn a programming language when they had nothing to apply it to and were simply learning how a language works. It&#039;s a bit like learning a foreign language by reading a dictionary. The following list are my choices (not necessarily in order)...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 14 Jan 2016 20:28:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">31 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Choosing Shell script vs Python vs Node.js vs PHP for Server-side Command Line Scripting</title>
    <link>http://tech.saigonist.com/b/code/choosing-shell-script-vs-python-vs-nodejs-vs-php-server-side-command-line-scripting</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;December 22, 2015&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/nodejs&quot;&gt;node.js&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/python&quot;&gt;python&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/shell&quot;&gt;shell&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/bash&quot;&gt;bash&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/javascript&quot;&gt;javascript&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;After decades of improvements in graphical user interfaces, the Unix command line interface still remains the most powerful way to get things done for a lot of workflows. This is due to many reasons: the difficulty of quickly and precisely moving the mouse cursor compared to the ability of touch typists to select exactly what they want (even when it&#039;s via hotkey combinations), but mainly (IMO) the expressive power of composing separate Unix commands into one pipe-separated command operating on standardized files (usually text).&lt;/p&gt;

&lt;p&gt;It&#039;s also easy to write your own Unix commands which...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Tue, 22 Dec 2015 09:07:59 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">20 at http://tech.saigonist.com</guid>
  </item>
  </channel>
</rss>
