<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Valentin's Lab &#187; information</title>
	<atom:link href="https://vaab.blog.kal.fr/category/thoughts/information/feed/" rel="self" type="application/rss+xml" />
	<link>https://vaab.blog.kal.fr</link>
	<description>Ratiocination of an opensource techie</description>
	<lastBuildDate>Thu, 15 Nov 2018 08:04:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F&amp;language=en_US&amp;category=text&amp;title=Valentin%27s+Lab&amp;description=Ratiocination+of+an+opensource+techie&amp;tags=blog" type="text/html" />
	<item>
		<title>Emacs and flymake for python, javascript, php, rst</title>
		<link>https://vaab.blog.kal.fr/2012/09/20/emacs-and-flymake-for-python-javascript-php-rst/</link>
		<comments>https://vaab.blog.kal.fr/2012/09/20/emacs-and-flymake-for-python-javascript-php-rst/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 10:28:16 +0000</pubDate>
		<dc:creator><![CDATA[vaab]]></dc:creator>
				<category><![CDATA[comp]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[sci]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[flymake]]></category>
		<category><![CDATA[jhint]]></category>
		<category><![CDATA[jslint]]></category>
		<category><![CDATA[phplint]]></category>
		<category><![CDATA[rst]]></category>
		<category><![CDATA[rst2html]]></category>

		<guid isPermaLink="false">http://vaab.blog.kal.fr/?p=335</guid>
		<description><![CDATA[Emacs is a wonderfull editor, every sane people know this. Here's how to extend your flymake to some trendy languages. You'll find here a general overview by answering question as What's flymake ? for emacs, and How does it work &#8230;<p class="read-more"><a href="https://vaab.blog.kal.fr/2012/09/20/emacs-and-flymake-for-python-javascript-php-rst/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p><a class="reference external" href="http://www.gnu.org/software/emacs/">Emacs</a> is a wonderfull editor, every <a class="reference external" href="http://www.dina.kvl.dk/~abraham/religion/">sane people</a> know this. Here's
how to extend your <a class="reference external" href="http://www.emacswiki.org/emacs/FlyMake">flymake</a> to some trendy languages.</p>
<p>You'll find here a general overview by answering question as <a class="reference internal" href="#what-s-flymake">What's flymake ?</a> for emacs,
and <a class="reference internal" href="#how-does-it-work">How does it work ?</a>.</p>
<p>Following are the snippet of code to have nice <a class="reference external" href="http://www.emacswiki.org/emacs/FlyMake">flymake</a> integration for:</p>
<blockquote>
<ol class="arabic simple">
<li><a class="reference internal" href="#python">Python</a></li>
<li><a class="reference internal" href="#php">PHP</a></li>
<li><a class="reference internal" href="#javascript">Javascript</a></li>
<li><a class="reference internal" href="#restructured-text">ReSTructured Text</a></li>
</ol>
</blockquote>
<p>Happy coding !</p>
<div class="section" id="what-s-flymake">
<h3>What's flymake ?</h3>
<p><tt class="docutils literal"><span class="pre">flymake-mode</span></tt> in emacs is meant to &quot;compile&quot; your code while
you are typing (no need to save) so as to give you interesting
highlights on particular bits of code you've written.</p>
<p>If these can spot <em>syntax errors</em>, code analyzers can go much beyond and
show you <em>logical errors</em> as unused variables, unreachable code, an so
on. And there's more: you can be hinted when <em>breaking code style</em>
conventions that you've chosen, or even <em>code smell</em> detectors (too much
method in an object, too much local variable, ...)</p>
</div>
<div class="section" id="how-does-it-work">
<h3>How does it work ?</h3>
<div class="section" id="the-big-picture">
<h4>The big picture</h4>
<p><tt class="docutils literal"><span class="pre">flymake-mode</span></tt> is very simple, as you type it'll create a copy of your current
emacs buffer in a file usualy called <tt class="docutils literal"><span class="pre">&lt;filename&gt;-flymake.&lt;ext&gt;</span></tt>.</p>
<p>Then, it'll launch an executable on this file and will collect it's standard output.</p>
<p>To work out of the box, the format should be something like this:</p>
<pre class="literal-block">
myfile.myext:&lt;line no&gt;: &lt;ERROR|WARNING&gt;: error message
</pre>
<p>This is a typical output of my <tt class="docutils literal">pycheckers</tt> script which combines <a class="reference external" href="http://pypi.python.org/pypi/pep8">pep8</a>
code style checker and <a class="reference external" href="http://pypi.python.org/pypi/pylint">pylint</a> (syntax, logical, code style, code smell
checking):</p>
<pre class="literal-block">
converter.py:38: ERROR: E501 (pep8) line too long (141 characters)
converter.py:130: ERROR: E303 (pep8) too many blank lines (2)
converter.py:156: WARNING: W0212 (pylint) Access to a protected member _fields_id of a client class
converter.py:185: WARNING: R0911 (pylint) Too many return statements (9/6)
</pre>
<p><tt class="docutils literal">emacs</tt> will then use this output to highlight WARNING and ERROR message in
two different colors.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Besides helping you in getting better code every day, having the same
format, one by line, with clear tagging of the error type and the analyzer
can be extremely usefull in continuous integration to get a valuable metric
on code quality.</p>
</div>
</div>
<div class="section" id="what-do-i-need">
<h4>What do I need ?</h4>
<p>You'll need to enable flymake once for all by adding the following line to
your <tt class="docutils literal"><span class="pre">~/.emacs</span></tt>, which will launch flymake whenever you'll open a file:</p>
<pre class="literal-block">
(add-hook 'find-file-hook 'flymake-find-file-hook)
</pre>
<p>Then to set up <tt class="docutils literal"><span class="pre">flymake-mode</span></tt> for a langage you'll need to:</p>
<blockquote>
<p>1. add a specific snippet of code in <tt class="docutils literal"><span class="pre">~/.emacs</span></tt> to configure the analyzer (ie:
to set the actual name of the executable analyzer and its command line
arguments if any).</p>
<p>2. create the executable code as it often require some tweaking to get the
correct output. This stage is optional if your analyzer output is already
in the correct format.</p>
</blockquote>
</div>
</div>
<div class="section" id="ok-where-s-the-code">
<h3>Ok, where's the code ?</h3>
<div class="section" id="python">
<h4>Python</h4>
<div class="section" id="analyzer">
<h5>Analyzer</h5>
<p>My <tt class="docutils literal">pycheckers</tt> code analyzer is actually written in python and will call
<a class="reference external" href="http://pypi.python.org/pypi/pep8">pep8</a> and <a class="reference external" href="http://pypi.python.org/pypi/pylint">pylint</a> and ensure that the output format is correct. These two
analyzers are available on <a class="reference external" href="http://pypi.python.org/pypi">PyPI</a> and thus are installable thanks to:</p>
<pre class="literal-block">
pip install pylint
pip install pep8
</pre>
<p>Please check the analyzer code at: <a class="reference external" href="https://gist.github.com/3754270">https://gist.github.com/3754270</a></p>
<p>I typically put the analyzer in <tt class="docutils literal">~/bin/pycheckers</tt> and ensure that it is
executable.</p>
</div>
<div class="section" id="id1">
<h5>Emacs</h5>
<p>Here's the emacs snippet:</p>
<pre class="literal-block">
;; Python flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-pycheckers-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                    'flymake-create-temp-inplace))
        (local-file (file-relative-name
                     temp-file
                     (file-name-directory buffer-file-name))))
      (list &quot;~/bin/pycheckers.py&quot;  (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
            '(&quot;\\.py\\'&quot; flymake-pycheckers-init)))
</pre>
</div>
<div class="section" id="for-the-lazier">
<h5>For the lazier</h5>
<p>This snippet will do the complete job for you:</p>
<pre class="literal-block">
mkdir -p ~/bin &amp;&amp;
cd ~/bin &amp;&amp;
wget https://raw.github.com/gist/3754270/a4fecffaff6ab702f5c8d37332afc90f6461e40b/pycheckers.py &amp;&amp;
chmod +x pycheckers.py &amp;&amp;
cat &lt;&lt;EOF &gt;&gt; ~/.emacs

;; Python flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-pycheckers-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                    'flymake-create-temp-inplace))
        (local-file (file-relative-name
                     temp-file
                     (file-name-directory buffer-file-name))))
      (list &quot;~/bin/pycheckers.py&quot;  (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
            '(&quot;\\.py\\'&quot; flymake-pycheckers-init)))

EOF
</pre>
<p>You'll need to restart <tt class="docutils literal">emacs</tt> for this to work. (Or highlight the added snippet
in the end of your <tt class="docutils literal">.emacs</tt> and call <tt class="docutils literal"><span class="pre">M-x</span> <span class="pre">eval-region</span></tt>)</p>
</div>
</div>
<div class="section" id="php">
<h4>Php</h4>
<div class="section" id="id2">
<h5>Analyzer</h5>
<p>I've also a <tt class="docutils literal">phpcheckers</tt>, even if it is very small, I feel better to know
that I could grep out some specific warnings or add another sub-analyzer quite
easily, and feel free to add your own include path as you wish in the
'packages-path' arguments:</p>
<pre class="literal-block">
#!/bin/bash

phplint --modules-path ~/var/lib/phplint/modules \
        --packages-path /usr/share/php \
        --no-print-notices &quot;$&#64;&quot;
</pre>
<p>So i'm using only <a class="reference external" href="http://www.icosaedro.it/phplint">phplint</a> here.</p>
</div>
<div class="section" id="id3">
<h5>Emacs</h5>
<p>Here's the emacs snippet:</p>
<pre class="literal-block">
;; PHP flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-phplint-init()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                     'flymake-create-temp-inplace))
         (local-file (file-relative-name
                      temp-file
                      (file-name-directory buffer-file-name))))
      (list &quot;phpcheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
             '(&quot;\\.php[345]?$&quot; flymake-phplint-init))
  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.inc$&quot; flymake-phplint-init)))
</pre>
</div>
<div class="section" id="id4">
<h5>For the lazier</h5>
<p>This snippet will do the complete job for you:</p>
<pre class="literal-block">
mkdir -p ~/bin &amp;&amp;
cd ~/bin &amp;&amp;
cat &lt;&lt;EOF &gt; ~/bin/phpcheckers &amp;&amp;
#!/bin/bash

phplint --modules-path ~/var/lib/phplint/modules \
        --packages-path /usr/share/php \
        --no-print-notices &quot;\$&#64;&quot;
EOF
chmod +x phpcheckers &amp;&amp;
cat &lt;&lt;EOF &gt;&gt; ~/.emacs

;; PHP flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-phplint-init()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                    'flymake-create-temp-inplace))
        (local-file (file-relative-name
                     temp-file
                     (file-name-directory buffer-file-name))))
      (list &quot;~/bin/phpcheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
            '(&quot;\\.php[345]?$&quot; flymake-phplint-init))
  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.inc$&quot; flymake-phplint-init)))

EOF
</pre>
<p>You'll need to restart <tt class="docutils literal">emacs</tt> for this to work. (Or highlight the added snippet
in the end of your <tt class="docutils literal">.emacs</tt> and call <tt class="docutils literal"><span class="pre">M-x</span> <span class="pre">eval-region</span></tt>)</p>
</div>
</div>
<div class="section" id="javascript">
<h4>Javascript</h4>
<div class="section" id="id5">
<h5>Analyzer</h5>
<p>I use a combination of <a class="reference external" href="http://www.jslint.com/lint.html">jslint</a> and <a class="reference external" href="http://www.jshint.com/about/">jshint</a>.</p>
<p>This is more work as <a class="reference external" href="http://www.jslint.com/lint.html">jslint</a> is widely criticized for behing too spotty on
some conventions only shared by its author, I find it useful when tamed down
to normal behavior.</p>
<p>Second, it's not so easy to get the correct format out of <a class="reference external" href="http://www.jslint.com/lint.html">jslint</a>. So I
created a <tt class="docutils literal"><span class="pre">jslint-emacs</span></tt> executable that lies in
<tt class="docutils literal"><span class="pre">~/bin/jslint-emacs</span></tt>. Here's the code:</p>
<pre class="literal-block">
#!/bin/bash

filename=&quot;$1&quot;

jslint &quot;$filename&quot; --nomen --maxerr 999999 |

## reformat from:
##
##  #45 Expected exactly one space between 'function' and '('.
##      init: function(parent, dataset, csv_import_record){ // Line 127, Pos 23
##
## to:
##
##  filename.js:94: WARNING: (jslint) Expected exactly one space between 'function' and '('.

         sed -r &quot;N;s/^\s*#[0-9]+ (.*)\n\s+.*\/\/ Line ([0-9]+),.*/$filename:\2: WARNING: W000 (jslint) \1/&quot; |

## Remove garbages lines that were not match by previous regex
## as their is a small header not matching regexp.

         grep -E &quot;^$filename:[0-9]+:&quot; |

         grep -v &quot;at column.*not column.*.&quot; |
         grep -v &quot;Expected '{' and instead saw 'return'&quot; |
         grep -v &quot;Expected exactly one space between ')' and 'return'&quot; |
         grep -v &quot;Combine this with the previous 'var' statement&quot; |
         grep -v &quot;Unexpected 'in'. Compare with undefined, or use .*&quot;

## force errorlevel 0 so as to avoid emacs ``flymake-mode`` to complain
exit 0
</pre>
<p>I've found that <tt class="docutils literal">jshint</tt> can use a specific reporter written in javascript, which
seems perfect to get the correct ouput from it.</p>
<p>This is my <tt class="docutils literal"><span class="pre">~/bin/jshint-emacs</span></tt>:</p>
<pre class="literal-block">
#!/bin/bash

jshint &quot;$1&quot; --reporter ~/.emacs.d/jslint-emacs-reporter.js
</pre>
<p>And of course, my <tt class="docutils literal"><span class="pre">~/.emacs.d/jslint-emacs-reporter.js</span></tt> is available as a
gist here: <a class="reference external" href="https://gist.github.com/3754379">https://gist.github.com/3754379</a></p>
<p>It seems that this javascript reporter could be used also with <tt class="docutils literal">jslint</tt> but I didn't
figure out how to do so. (This was maybe because I've already written the sed/grep thing
before).</p>
<p>Of course, this is my <tt class="docutils literal">~/bin/jscheckers</tt>:</p>
<pre class="literal-block">
#!/bin/bash

jslint-emacs &quot;$1&quot;
jshint-emacs &quot;$1&quot;
</pre>
</div>
<div class="section" id="id6">
<h5>Emacs</h5>
<p>Here's the emacs snippet:</p>
<pre class="literal-block">
;; Javascript flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-jslint-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                     'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
      (list &quot;jscheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.js\\'&quot; flymake-jslint-init)))
</pre>
</div>
<div class="section" id="id7">
<h5>For the lazier</h5>
<p>This snippet will do the complete job for you:</p>
<pre class="literal-block">
mkdir -p ~/bin &amp;&amp;
cd ~/bin &amp;&amp;
cat &lt;&lt;EOF &gt; ~/bin/jslint-emacs &amp;&amp;
#!/bin/bash

filename=&quot;\$1&quot;

jslint &quot;\$filename&quot; --nomen --maxerr 999999 |

## reformat from:
##
##  #45 Expected exactly one space between 'function' and '('.
##      init: function(parent, dataset, csv_import_record){ // Line 127, Pos 23
##
## to:
##
##  filename.js:94: WARNING: (jslint) Expected exactly one space between 'function' and '('.

         sed -r &quot;N;s/^\s*#[0-9]+ (.*)\n\s+.*\/\/ Line ([0-9]+),.*/\$filename:\2: WARNING: W000 (jslint) \1/&quot; |

## Remove garbages lines that were not match by previous regex
## as their is a small header not matching regexp.

         grep -E &quot;^\$filename:[0-9]+:&quot; |

         grep -v &quot;at column.*not column.*.&quot; |
         grep -v &quot;Expected '{' and instead saw 'return'&quot; |
         grep -v &quot;Expected exactly one space between ')' and 'return'&quot; |
         grep -v &quot;Combine this with the previous 'var' statement&quot; |
      grep -v &quot;Unexpected 'in'. Compare with undefined, or use .*&quot;

## force errorlevel 0 so as to avoid emacs ``flymake-mode`` to complain
exit 0
EOF
chmod +x jslint-emacs &amp;&amp;
cat &lt;&lt;EOF &gt; ~/bin/jscheckers &amp;&amp;
#!/bin/bash

~/bin/jslint-emacs &quot;\$1&quot;
~/bin/jshint-emacs &quot;\$1&quot;

EOF
chmod +x jscheckers &amp;&amp;
mkdir -p ~/.emacs.d &amp;&amp;
cd ~/.emacs.d &amp;&amp;
wget https://raw.github.com/gist/3754379/3c43c50b4d85f50b8314af8e498b1b4f2cee58ea/jslint-emacs-reporter.js &amp;&amp;
cat &lt;&lt;EOF &gt;&gt; ~/.emacs

;; Javascript flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-jslint-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                    'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
      (list &quot;jscheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.js\\'&quot; flymake-jslint-init)))

EOF
</pre>
<p>You'll need to restart <tt class="docutils literal">emacs</tt> for this to work. (Or highlight the added snippet
in the end of your <tt class="docutils literal">.emacs</tt> and call <tt class="docutils literal"><span class="pre">M-x</span> <span class="pre">eval-region</span></tt>)</p>
</div>
</div>
<div class="section" id="restructured-text">
<h4>ReSTructured Text</h4>
<div class="section" id="id8">
<h5>Analyzer</h5>
<p>I was surprised to see that <a class="reference external" href="http://docutils.sourceforge.net/docs/user/tools.html">rst2html</a> will make very decent rst analyzer.</p>
<p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/tools.html">rst2html</a> is provided by python <a class="reference external" href="http://pypi.python.org/pypi/docutils">docutils package</a>.</p>
<p>My <tt class="docutils literal">~/bin/rstcheckers</tt>:</p>
<pre class="literal-block">
#!/bin/bash

rst2html &quot;$1&quot; &gt; /dev/null
</pre>
<p>Surprising isn't it ? As it isn't a code analyzer but the compiler itself, it
does it's job really well, and in combination with flymake, it gives you a very
convenient on-the-fly syntax checking.</p>
<p>Note that <tt class="docutils literal">&gt;/dev/null</tt> is required as <tt class="docutils literal">rst2html</tt> jobs is to output HTML from your
<tt class="docutils literal">rst</tt> (which we don't want to see), and it casts errors on the standard error pipe.</p>
</div>
<div class="section" id="id9">
<h5>Emacs</h5>
<p>Here's the emacs snippet:</p>
<pre class="literal-block">
;; ReSTructured Text Flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-rst-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                     'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
      (list &quot;rstcheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.rst\\'&quot; flymake-rst-init)))
</pre>
</div>
<div class="section" id="id10">
<h5>For the lazier</h5>
<p>This snippet will do the complete job for you:</p>
<pre class="literal-block">
mkdir -p ~/bin &amp;&amp;
cd ~/bin &amp;&amp;
cat &lt;&lt;EOF &gt; ~/bin/rstcheckers &amp;&amp;
#!/bin/bash

rst2html &quot;\$1&quot; &gt; /dev/null
EOF
chmod +x rstcheckers &amp;&amp;
cat &lt;&lt;EOF &gt;&gt; ~/.emacs

;; ReSTructured Text Flymake configuration

(when (load &quot;flymake&quot; t)
  (defun flymake-rst-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                    'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
      (list &quot;rstcheckers&quot; (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
               '(&quot;\\.rst\\'&quot; flymake-rst-init)))

EOF
</pre>
<p>You'll need to restart <tt class="docutils literal">emacs</tt> for this to work. (Or highlight the added snippet
in the end of your <tt class="docutils literal">.emacs</tt> and call <tt class="docutils literal"><span class="pre">M-x</span> <span class="pre">eval-region</span></tt>)</p>
</div>
</div>
</div>
<div class="section" id="conclusion">
<h3>Conclusion</h3>
<p>I hope this will let you add some more language to your emacs
<tt class="docutils literal"><span class="pre">flymake-mode</span></tt>. If you spot any errors, please let me know.</p>
</div>
</div>
 <p><a href="https://vaab.blog.kal.fr/?flattrss_redirect&amp;id=335&amp;md5=9ac35db7c92e40c75f8ffba62903aee9" title="Flattr" target="_blank"><img src="https://vaab.blog.kal.fr/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>https://vaab.blog.kal.fr/2012/09/20/emacs-and-flymake-for-python-javascript-php-rst/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F2012%2F09%2F20%2Femacs-and-flymake-for-python-javascript-php-rst%2F&amp;language=en_GB&amp;category=text&amp;title=Emacs+and+flymake+for+python%2C+javascript%2C+php%2C+rst&amp;description=Emacs+is+a+wonderfull+editor%2C+every+sane+people+know+this.+Here%27s+how+to+extend+your+flymake+to+some+trendy+languages.+You%27ll+find+here+a+general+overview+by+answering+question+as...&amp;tags=emacs%2Cflymake%2Cjhint%2Cjslint%2Cphplint%2Crst%2Crst2html%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Evolution of internet usage worldwide</title>
		<link>https://vaab.blog.kal.fr/2011/06/06/evolution-of-internet-usage-worldwide/</link>
		<comments>https://vaab.blog.kal.fr/2011/06/06/evolution-of-internet-usage-worldwide/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 13:33:37 +0000</pubDate>
		<dc:creator><![CDATA[vaab]]></dc:creator>
				<category><![CDATA[information]]></category>

		<guid isPermaLink="false">http://vaab.blog.kal.fr/?p=151</guid>
		<description><![CDATA[Here's the story of my quest to get a complete visual display of the evolution of internet usage worldwide.
<p class="read-more"><a href="https://vaab.blog.kal.fr/2011/06/06/evolution-of-internet-usage-worldwide/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>Reading my news as usual, I crossed this article from <a class="reference external" href="http://www.techno-science.net/?onglet=glossaire&amp;definition=4008">techno-science</a> French site which shows a graph of the evolution of internet usage worldwide. I was a little disappointed when I saw it didn't go further than 2003. I could recollect that recently, various articles (<a class="reference external" href="http://www.engadget.com/2011/01/28/un-worldwide-internet-users-hit-two-billion-cellphone-subscript/">engadget</a>, <a class="reference external" href="http://hothardware.com/News/ITU-Finds-2-Billion-Internet-Users-Worldwide-5-Billion-Mobile-Subscriptions/">hothardware</a>), had stated that <a class="reference external" href="http://www.itu.int">ITU</a> declared that we had overcome the 2 Billion's users symbolic barrier.</p>
<p>Teased by these data, I wanted to get the over-whole view of the 1990-2011 evolution, and thought it would be not far away from some googling. Results is that while information is available, it wasn't aggregated in a statistical graphic (as far as I could manage to find on the net). So here's what I would have like to find.</p>
<div class="section" id="gathering-data">
<h3>Gathering data</h3>
<p>Although <a class="reference external" href="http://www.internetworldstats.com/emarketing.htm">internetworldstats</a> page was the source for 1995-2011 data, no graph is provided to show these data. I only could find a graph that stops at 2007 which is before getting past the 2 billion barrier.</p>
<p>So here's my very small contribution by aggregating these last data in one graph.
Pre 1995 data are correlated from <a class="reference external" href="http://stuff.mit.edu/people/mkgray/net/internet-growth-summary.html">mkgray</a> efforts. 1995-2010 data comes from <a class="reference external" href="http://www.internetworldstats.com/emarketing.htm">internetworldstats</a>. Both data source aren't quite measuring the same thing and should
be considered with much caution as IP, domain-names, mobiles, private networks, and many
other concerns will lead to different definition of &quot;internet users&quot;. These figures give just a very rough idea of internet usage.</p>
</div>
<div class="section" id="result">
<h3>Result</h3>
<img alt="files/2011/06/evolution-internet-2011.png" src="files/2011/06/evolution-internet-2011.png" />
<p>This image is my own work using <a class="reference external" href="http://www.internetworldstats.com/emarketing.htm">internetworldstats</a> data, and is protected under <a class="reference external" href="http://en.wikipedia.org/wiki/en:Creative_Commons">Creative Commons</a> <a class="reference external" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en">Attribution-Share Alike 3.0 Unported</a> licence.</p>
<img alt="files/2011/06/Internet_users_per_100_inhabitants_1997-2010_ITU_internet_world_stats.png" src="files/2011/06/Internet_users_per_100_inhabitants_1997-2010_ITU_internet_world_stats.png" />
<p>This image is based on <a class="reference external" href="http://en.wikipedia.org/wiki/File:Internet_users_per_100_inhabitants_1997-2007_ITU.svg">Wiiod work</a> which is coming from <a class="reference external" href="http://commons.wikimedia.org/wiki/File:Internet_users_per_100_inhabitants_1997-2007_ITU.png">Kozuch</a> refactor of an original <a class="reference external" href="http://www.itu.int/ITU-D/ict/statistics/ict/graphs/internet.jpg">ITU document</a>. I added data from <a class="reference external" href="http://www.internetworldstats.com/emarketing.htm">internetworldstats</a> and <a class="reference external" href="http://data.worldbank.org/indicator/IT.NET.USER.P2/countries?display=graph">worldbank.org</a> . Figures used are rough personal approximation of both sources.
This image is protected under <a class="reference external" href="http://en.wikipedia.org/wiki/en:Creative_Commons">Creative Commons</a> <a class="reference external" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en">Attribution-Share Alike 3.0 Unported</a> licence.</p>
<dl class="docutils">
<dt>I suggest you take a look at those interactive graph:</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href="http://www.google.com/publicdata?ds=wb-wdi&amp;ctype=l&amp;strail=false&amp;nselm=h&amp;met_y=it_net_user_p2&amp;scale_y=lin&amp;ind_y=false&amp;rdim=country&amp;tdim=true&amp;hl=fr&amp;dl=fr">Google data browser</a>  (stops at 2008)</li>
<li><a class="reference external" href="http://data.worldbank.org/indicator/IT.NET.USER.P2/countries?display=graph">worldbank.org</a> (stops at 2009)</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="analysis">
<h3>Analysis</h3>
<p>In less than 15 years, 2 billions users (30% of humanity) have gained access to the internet. In the 5 last years humanity gained 1 billion users, equaling the 10 first years, and denoting a acceleration in the figures.</p>
<dl class="docutils">
<dt>Now, what's next for the 5 next years ? 3 scenarii:</dt>
<dd><ul class="first last simple">
<li>acceleration of figures is not finished: in 5 years we'll have 4 billion users and more than 60% of humanity.</li>
<li>acceleration is finished, but current pace will remain: in 5 years, we'll be 3 billion users and nearly 50% of humanity.</li>
<li>acceleration will reverve: in 5 years, we'll be 2.5 billion, and nearly 40% of humanity.</li>
</ul>
</dd>
</dl>
<p>Whatever the figures, a such change in communication worldwide can only lead to large scale changes of our social structures (including political and business power structures).</p>
</div>
</div>
 <p><a href="https://vaab.blog.kal.fr/?flattrss_redirect&amp;id=151&amp;md5=3ebbfe97fed3869fe5a97499fcdc5bf8" title="Flattr" target="_blank"><img src="https://vaab.blog.kal.fr/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>https://vaab.blog.kal.fr/2011/06/06/evolution-of-internet-usage-worldwide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F2011%2F06%2F06%2Fevolution-of-internet-usage-worldwide%2F&amp;language=en_GB&amp;category=text&amp;title=Evolution+of+internet+usage+worldwide&amp;description=Reading+my+news+as+usual%2C+I+crossed+this+article+from+techno-science+French+site+which+shows+a+graph+of+the+evolution+of+internet+usage+worldwide.+I+was+a+little+disappointed+when...&amp;tags=blog" type="text/html" />
	</item>
	</channel>
</rss>
