18 December, 2010

The best CLI tools all the time

Every December, each geeky website will prepare "Best Windows/Mac Software of 20xx". Why there is not a "Best CLI Tools All the Time" article?
Why not "Best CLI Tools of 20xx"? Sorry, there would not be too useful to have such a list every year. As good CLI goods all survive throughout years. Ever since I know the use of ssh, it keeps to top on my list. What software allow you to forward whatever port you like and execute commands on different hosts?
While "Best CLI Tools All the TIme" comes to be head, I googled an interesting site: http://www.commandlinefu.com/

11 December, 2010

Does Dynamic Programming Languages more Productive for Web Development?

While Dynamic Programming Languages like Python and Groovy are hot topics in recent years. Surprisingly, there is not a clear definition for "Dynamic Programming Language". So, what "Dynamic Programming Language" refers to and does it really helps to spped your next web application?

StAX - Streaming API for XML

StAX, is a Java processing XML API which allow software to processing XML stream in a push streaming style. In certain scenario, StAX will be the most efficient approach for prcoessing XML stream. This article aims to provide an overview on this API as well as comparison with two other commonly used APIs: DOM and SAX.

07 December, 2010

YAML - YAML Ain't Markup Language

YAML, which stands for "YAML Ain't Markup Languge", is a data serialization format, which can be used to represent data or message.
This article provide a background on YAML as well as a comparison between YAML and XML using the Maven POM as a example.

05 December, 2010

Using SyntaxHighlighter at Blogspot

Blogspot doesn't support syntax highlight by default. What a shame, considering that all decent Wiki engine are providing certain level of support for this already. While Blogspot isn't a wiki, but without syntax highlighting, I just keep have a feel that, Blogspot is not a place for technical post. Anyway, SyntaxHighlighter is a solution for this.
The official installation instruction require you to upload the script and link the scripts from your blogspot template. Castillo has post a workaround on how to use this lovely tools on Blogspot without having a hosting space. The post seems out-dated. It isn't too hard to figure out the way, below are the up-to-date procedure.
1. Update the Blogspot template and add following in the <head>
  <script language='javascript'   
    src='http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/scripts/XRegExp.js'/>
  <script language='javascript' 
    src='http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/scripts/shCore.js'/>
  <script language='javascript' 
    src='http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/scripts/shAutoloader.js'/>

  <link rel='stylesheet' type='text/css'
    href='http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/styles/shCoreDefault.css' />

2. Apply the following snipplets near the end of <body>
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.autoloader(
  'xml  http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/scripts/shBrushXml.js',
  'css  http://bitbucket.org/alexg/syntaxhighlighter/raw/b7578b438a69/scripts/shBrushCss.js'
);
SyntaxHighlighter.all();
</script>
3. In the post, use <pre> with the class attribute to define the corresponding syntax
<pre class="brush: xml>
  <echo>Hi SyntaxHighlighter!</echo>
</pre>
SyntaxHighlighter support different kind of syntax, all you need to do is just to define it in the "autoloader" call. The full list of supported syntax can be found here. SyntaxHighlighter also provided a few different theme which can be configure by importing different javascript, the full list can be found in here.