Sunday, March 24, 2013

Printing Source Code

This is a little tip on how to print source code neatly in Linux.

$ sudo apt-get install a2ps
$ a2ps -2 your-directory/all-files --line-numbers=1 -o total.ps
$ ps2pdf total.ps total.pdf

The result is as follows:



The options used for a2ps are this.
  -2 means two columns in a single page on landscape mode
  --line-numbers=1 means to print line numbers every line
  -o specifies the resulting PostScript file.


Sunday, March 17, 2013

Type Annotations (JSR 308) and the Checker Framework


http://types.cs.washington.edu/checker-framework/current/checkers-manual.html
http://types.cs.washington.edu/jsr308/

Sunday, March 03, 2013

Online Courses, Open University, or MOOC

Massive Open Online Courses (MOOC)

Some examples are
 - Udacity http://www.udacity.com
 - Coursera http://www.coursera.org

ACM White Paper on Online Learing
 - http://www.acm.org/education/online_learning_white_paper.pdf

Discussion on Online Learning
 - http://www.computingportal.org/OnlineLearning

Will MOOCs destroy Academia? (in CACM, 55(11), November 2012)
 - http://cacm.acm.org/magazines/2012/11/156587-will-moocs-destroy-academia/fulltext

A recap of the Sloan Consortium Conference on Online Learning (eLearn Magazine, October 2012)
 - http://elearnmag.acm.org/archive.cfm?aid=2384576

A wokshop on MOOC
 - http://people.csail.mit.edu/asolar/plooc2013/

XML Programming in Java

Here is a list of tutorials that I think are useful for XML programming in Java.

 - http://xjaphx.wordpress.com/2011/12/24/android-xml-adventure-parsing-xml-using-xpath/
 - http://www.ibm.com/developerworks/library/x-javaxpathapi/index.html
 - http://www.ibm.com/developerworks/java/library/j-jdom/
 - http://docs.oracle.com/javase/tutorial/jaxp/dom/readingXML.html

Basically, there are two XML programming styles in general. It is DOM-based and SAX-based. Simply speaking, DOM-based XML programming is a style to construct a whole XML tree first and to navigate it for one's own sake. SAX-based XML programming is a stream-based style to construct only the part of the whole XML tree on demand. It never attempts to store the whole XML tree in the memory, which may consume quite big resources depending on the size of XML documents.

The SAX-based XML programming can be classified into two sub-styles. One sub-style is driven by the XML parser that will call user's registered functions on receiving the relevant XML elements. It is called SAX & Push style. That is, the XML parser calls user functions. The other sub-style is driven by user functions that will call the XML parser in sequence. It is called SAX & Pull style.

The notion of XML programming seems to be more important because programmers need to know it in developing mobile phone software, as well as for web systems.

( I'll try to update this page more later. )