User:Timothee Flutre/Notebook/Postdoc/2012/05/16

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
(About programming: add beamer template on github)
(About programming: add tuto scientific python)
(2 intermediate revisions not shown.)
Line 13: Line 13:
** my own page on [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2011/11/07 R]
** my own page on [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2011/11/07 R]
** [http://www.cplusplus.com/doc/tutorial/ C++ tutorial], a must-read (and a [http://www.mycplus.com/featured-articles/best-free-programming-courses-online/ list] of the best free C/C++ resources online)
** [http://www.cplusplus.com/doc/tutorial/ C++ tutorial], a must-read (and a [http://www.mycplus.com/featured-articles/best-free-programming-courses-online/ list] of the best free C/C++ resources online)
-
** [http://scipy-lectures.github.io/ Python tutorial] for scientists, [http://www.jchr.be/python/manuel.htm tutoriel Python] (in French)
+
** Python tutorials: for [http://www.tutorialspoint.com/python/index.htm everyone], [http://scipy-lectures.github.io/ scientists] ([http://www.sam.math.ethz.ch/~raoulb/teaching/PythonTutorial/index.html another]), [http://www.jchr.be/python/manuel.htm in French]
** [http://resrc.io/list/10/list-of-free-programming-books/ list] of free programming books
** [http://resrc.io/list/10/list-of-free-programming-books/ list] of free programming books
Line 26: Line 26:
  <nowiki>
  <nowiki>
-
help2man -o myprogram.man ./myprogram
+
help2man -N -o myprogram.man ./myprogram
man ./myprogram.man
man ./myprogram.man
groff -mandoc myprogram.man > myprogram.ps
groff -mandoc myprogram.man > myprogram.ps

Revision as of 09:52, 19 February 2014

Project name Main project page
Previous entry      Next entry

About programming

  • Templates: it is always rewarding on the long term to start any piece of computer software with a minimum amount of generic code (command-line options, help message, license, usage of gzipped files, running time, etc). But it's a pain to write all this every time, right? And often we know how to do something in one language but not in another. So below are my typical templates for any C++/Python/R/Bash program, as well as Beamer presentation.
  • Language-independent user documentation: I'm a firm believer that it is necessary to add some user documentation, even minimal, to any program. An easy way to do this is to simply generate such documentation from the "help" message, as long as it is "properly" formatted (see help2man). The following commands work for any programming language:
help2man -N -o myprogram.man ./myprogram
man ./myprogram.man
groff -mandoc myprogram.man > myprogram.ps
ps2pdf myprogram.ps myprogram.pdf


Personal tools