all repos — h3rald @ 4fa231fe644b664425d0c6f11f000902b4b3408d

The sources of https://h3rald.com

Added contents.
h3rald h3rald@h3rald.com
Sat, 05 Aug 2017 13:35:05 +0200
commit

4fa231fe644b664425d0c6f11f000902b4b3408d

parent

c37ffc546087434e3c1af95d8e109d66ac55a9b3

163 files changed, 10323 insertions(+), 6 deletions(-)

jump to
A contents/403.html

@@ -0,0 +1,5 @@

+----- +title: Forbidden +content-type: page +----- +<p>There&#8217;s obviously nothing to see here. Go <a href="">home</a>!</p>
A contents/404.html

@@ -0,0 +1,5 @@

+----- +title: Page Not Found +content-type: page +----- +<p>The page you&#8217;re looking for cannot be found. Try searching the <a href="/archives/">archives</a>, maybe you&#8217;ll have better luck!</p>
A contents/500.html

@@ -0,0 +1,5 @@

+----- +title: Internal Server Error +content-type: page +----- +<p>Something went wrong. Try to go back <a href="/">home</a> and if things improve. If not, send a <a href="/">tweet</a> to <em>@h3rald</em> and I&#8217;ll try to sort it out.</p>
A contents/about.html

@@ -0,0 +1,18 @@

+----- +title: About +content-type: page +----- +<p>H3RALD.com was created in 2004 by Fabio Cevasco, a system architect, technical writer, programmer and IT enthusiast. It features over a hundred <a href="/archives/">articles</a> covering a wide range of topics, from programming to writing, productivity and traveling.</p> +<p>As of version 8, H3RALD.com is a completely static web site, except for a few <span class="caps">AJAX</span> calls. All the files are generated automatically thanks to the <a href="http://nanoc.stoneship.org/">nanoc</a> publishing system, an ingenious creation of <a href="http://www.stoneship.org/">Denis Defreyne</a>. Nanoc can be used to easily create static web sites using Ruby, as explained in <a href="http://www.h3rald.com/articles/take-back-your-site-with-nanoc/">this article</a>.</p> +<p>The following ruby libraries (gems) are used to compile this web site:</p> +<ul> + <li><a href="https://rubygems.org/gems/nanoc">nanoc</a>, to generate the entire web site</li> + <li><a href="https://rubygems.org/gems/extlib">Extlib</a>, in some custom Rake tasks</li> + <li><a href="https://rubygems.org/gems/bb-ruby">BB-Ruby</a>, for BBCode support</li> + <li><a href="https://rubygems.org/gems/builder/">Builder</a>, to create <span class="caps">RSS</span> and <span class="caps">ATOM</span> feeds</li> + <li><a href="https://rubygems.org/gems/less/">Less</a>, for the <span class="caps">SASS</span> filter</li> + <li><a href="https://rubygems.org/gems/therubyracer">The Ruby Racer</a>, to execute Javascript code (needed by Less)</li> + <li><a href="https://rubygems.org/gems/redcloth/">RedCloth</a>, for Textile support</li> + <li><a href="https://rubygems.org/gems/rdiscount">RDiscount</a>, for Markdown support</li> + <li><a href="https://rubygems.org/gems/glyph">Glyph</a>, for Glyph support</li> +</ul>
A contents/articles/10-programming-languages.html

@@ -0,0 +1,205 @@

+----- +title: 10 programming languages worth checking out +content-type: article +subtitle: A quick comparison of 10 non-mainstream programming languages +popular: true +timestamp: 1229868075 +tags: programming +----- +<blockquote> +<p>&mdash; This article has been translated into <a href="http://science.webhostinggeeks.com/10-programskih-jezika">Serbo-Croatian</a> by <cite><a href="http://webhostinggeeks.com/">Web Geeks</a></cite> &mdash;</p> +</blockquote> +<p>If you program for fun or profit, chances are that you know C, C++, Java, <span class="caps">PHP</span>, Perl, Python or Ruby. These programming languages are all widely known, and, to a different degree, used in commercial applications. At least some of them can safely be considered <em>mainstream</em>, even if that word has become so overused and misused that has almost lost its original meaning, if it ever had one.</p> +<p>If you are earning your living by coding, it&#8217;s often one of these languages that pays the bills. Nevertheless, true hackers frequently meander in other directions, exploring and discovering different paradigms and methodologies, sometimes to the most <a href="http://esolangs.org/wiki/Main_Page">esoteric</a> extremes.</p> +<blockquote> +<p>&#8220;The most obvious common &#8216;personality&#8217; characteristics of hackers are high intelligence, consuming curiosity, and facility with intellectual abstractions. Also, most hackers are &#8216;neophiles&#8217;, stimulated by and appreciative of novelty (especially intellectual novelty). Most are also relatively individualistic and anti-conformist.&#8221;</p> +</blockquote> +<p style="padding-left:4em;">&ndash; Eric S. Raymond, <cite><a href="http://catb.org/jargon/html/personality.html">The Jargon File</a></cite></p> +<p>Even if you&#8217;re particularly devoted to one of the languages mentioned above, it is normal to be curious about what else is out there. As the end of the year approaches, I find myself thinking about learning &ndash; or at least become acquainted with &ndash; some less known, more experimental, programming languages.<br /> +I was originally planning on learning another programming language as a New Year&#8217;s Resolution, which is quite common among programmers. The most difficult task turned out to be <em>choosing</em> a particular language: there are so many out there which makes it very hard to decide.</p> +<p>This article deals with ten possible candidates, and it&#8217;s far from being an exhaustive list. The programming languages described henceforth are very different from each other, but they all have one thing in common: they all stimulate my curiosity in their own, very different ways.</p> +<h3 id="haskell">Haskell</h3> +<p>I tried to learn Haskell in the past. Quietly, I started diving into the multitude of articles, tutorials, overviews and even books about this fascinating academic language which claims to achieve functional purity though remaining extremely useful, practical and efficient. Sadly, I&#8217;m still not able to fully grasp some of its most crucial concepts, such as <a href="http://en.wikibooks.org/wiki/Programming:Haskell_monads">monads</a>, but this still doesn&#8217;t put me off <em>wishing</em> to learn the language.</p> +<p>If you&#8217;ve never enountered Haskell before, I find <a href="http://www.willamette.edu/~fruehr/haskell/evolution.html">The Evolution of a Haskell Programmer</a> an amusing and informative read. Although aiming to be humorous in a way, it serves a very important didascalic purpose: it is one of the most complete collections of the different paradigms and programming approaches Haskell allows.</p> +<p>Besides its very elegant, pragmatic and almost-magical syntax, what really intrigues me about this language is what it offers, in terms of features:</p> +<ul> + <li>9 different <a href="http://www.haskell.org/haskellwiki/Implementations">implementations</a> (multiple compilers <em>and</em> interpreters)</li> + <li>Countless <a href="http://haskell.org/ghc/docs/latest/html/libraries/">standard libraries</a> <a href="http://hackage.haskell.org/packages/archive/pkg-list.html">packages</a> which can be used to solve <em>any</em> programming challenge</li> + <li>Abundant <a href="http://www.haskell.org/haskellwiki/Books_and_tutorials">learning material</a></li> + <li><a href="http://www.haskell.org/haskellwiki/Why_Haskell_matters#The_speed_of_Haskell">Speed</a> that rivals C and C++</li> + <li>Very mature cross-platform compatibility</li> +</ul> +<p>The catch? It is likely to be very different from any other language you might have encountered before, and that&#8217;s probably the reason why some people find it difficult to learn and master. That being said, if you are looking for a challenging (but very rewarding, I believe) New Year&#8217;s Resolution, you should definitely go for this.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://www.haskell.org/">Official Haskell Wiki</a></li> + <li><a href="http://en.wikibooks.org/wiki/Haskell">Haskell Wikibook</a></li> + <li><a href="http://book.realworldhaskell.org/read/index.html">Real World Haskell</a></li> + <li><a href="http://cdsmith.wordpress.com/2007/07/29/37-reasons-to-love-haskell-playing-off-the-ruby-article/">37 Reasons to Love Haskell</a></li> + <li><a href="http://antoniocangiano.com/2007/03/13/haskell-eye-for-the-ruby-guy/">Haskell for the Ruby Guy</a></li> + <li><a href="http://www.techworld.com.au/article/261007/-z_programming_languages_haskell">A-Z of Programming Languages: Haskell</a></li> + <li><a href="http://learnyouahaskell.com/">Learn you a Haskell for Great Good!</a></li> + <li><a href="http://cgi.cse.unsw.edu.au/~dons/blog/2008/05/16">Haskell Hacking</a></li> +</ul> +<h3>Erlang</h3> +<p><a href="http://erlang.org/">Erlang</a> is a concurrent programming language originally developed by Ericsson for their real-time applications. It goes without saying that with these premise, Erlang seems the most natural answer to all concurrency problems you may encounter in your life as a programmer.<br /> +Developing with concurrency in mind feels natural and easy in Erlang, and the performance of Erlang-powered systems can be unmatched.</p> +<p>Quite a few interesting applications have been developed in this language, such as:</p> +<ul> + <li><a href="http://couchdb.apache.org/">CouchDB</a>, a popular distributed, document-oriented database</li> + <li><a href="http://yaws.hyber.org/">Yaws</a>, a high-performance web server</li> + <li>even <a href="http://www.facebook.com/note.php?note_id=14218138919&amp;id=9445547199">Facebook Chat</a></li> +</ul> +<p>The price Erlang adepts have to pay, as Damien Katz (CouchDB creator and Erlang enthusiast) <a href="http://damienkatz.net/2008/03/what_sucks_abou.html">points out</a>, is:</p> +<ul> + <li>Awkward syntax, inspired by Prolog</li> + <li>Weird if expressions</li> + <li>Difficult string operations</li> + <li>No classes or namespaces</li> +</ul> +<p>&#8230;this list could go on. Damien&#8217;s article is an interesting read, enough to put anyone off learning the language if read superficially. On the other hand, it provides an invaluable resource for newcomers who wish to be prepared before taking on the challenge of learning Erlang to build their next scalable, concurrent and industry-proof application.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://www.erlang.org/">Official Erlang Web Site</a></li> + <li><a href="http://www.onlamp.com/pub/a/onlamp/2007/09/13/introduction-to-erlang.html">An Introduction to Erlang</a></li> + <li><a href="http://www.defmacro.org/ramblings/concurrency.html">Erlang Style Concurrency</a></li> + <li><a href="http://www.planeterlang.org/">PlanetErlang</a></li> + <li><a href="http://www.erlang-projects.org/">Erlang Projects</a></li> +</ul> +<h3 id="io">Io</h3> +<p><a href="http://iolanguage.com/">Io</a> is a relatively new programming language by Steve Dekorte which recently surfaced from Google&#8217;s oblivion (if you tried googling for it a few months ago, you couldn&#8217;t event find its home page) thanks to a short vut stimulating <a href="http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html">article</a> by <a href="http://whytheluckystiff.net/">_why</a>. It doesn&#8217;t have the best name for a programming language, that&#8217;s for sure, but it&#8217;s definitely a breath of fresh air in terms of the way it works.</p> +<p>Its unusual, minimalist and yet elegant and powerful syntax reminds of Smalltalk, but the language goes far beyond that. Io is an object-oriented, prototype-based, message-based and fully-reflective programming language. This means that you use messages like in Smalltalk, you create objects like in Javascript and every bit of your code can be inspected and passed around as you see fit.</p> +<p>If you think Ruby allows fancy (and potentially dirty) tricks like metaprogramming and monkey-patching, Io takes this to a whole different level, imposing virtually no limitation to the programmer. What&#8217;s truly amazing is that its grammar and syntax are so minimal that you can learn them in literally 10 minutes. After that, you can start experimenting, first with its extremely small core and then with its extension libraries and bindings.</p> +<p>Io has indeed a lot of potential. Granted, it&#8217;s still young and under development, but also already quite efficient and suitable for real-world tasks demanding high speed and concurrency. It is implemented in C, but Ola Bini started to design a similar language called <a href="http://kenai.com/projects/ioke/">Ioke</a> for the Java Virtual Machine.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://iolanguage.com/">Official Io Web Site</a></li> + <li><a href="http://github.com/stevedekorte/io/tree/master">Io Repository on Github</a></li> + <li><a href="http://tech.groups.yahoo.com/group/iolanguage/">Io user group</a></li> + <li><a href="http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html">Io has a very clean mirror</a></li> + <li><a href="http://iota.flowsnake.org/">Io Notes</a></li> + <li><a href="http://wiki.type-z.org/index.php/Io/IoLanguage">Io Language Notes</a></li> + <li><a href="http://ozone.wordpress.com/2006/03/15/blame-it-on-io/">Blame it on Io! A slow-paced introduction to the Io language</a></li> + <li><a href="http://en.wikibooks.org/wiki/Programming:Io">Io Wikibook</a></li> +</ul> +<h3 id="plt-scheme"><span class="caps">PLT</span> Scheme</h3> +<p>I stumbled upon the <a href="http://plt-scheme.org/"><span class="caps">PLT</span> Scheme web site</a> while browsing for different Lisp flavors about a year ago. At the time, I was determined to learn the rudiments of Lisp and I started reading a few articles and books on this old and yet still popular language.<br /> +Although I was originally put off by certain Common Lisp literature, which dismissed Scheme as an almost-heretic attempt to revitalize an venerable language, I soon found out that Scheme &ndash; and <span class="caps">PLT</span> Scheme in particular &ndash; is definitely worthy of attention and interest.</p> +<p>Being a technical writer, I immediately became fond of the <a href="http://docs.plt-scheme.org/guide/"><span class="caps">PLT</span> Scheme Guide</a>, one of the clearest and most well-organized examples of documentation available for a programming language I&#8217;ve ever come across.<br /> +The manual is exquisitely crafted as a Getting Started Manual and a Reference Book at the same time, though remaining pleasant to read sequentially: a rare trait in technical documentation. Best of all, it&#8217;s free: you simply have no real excuse not to read it.</p> +<p>Besides its excellent documentation, <span class="caps">PLT</span> Scheme feels like a fresh and modern implementation of one of the two most important dialects of Lisp. It&#8217;s cross-platform, it has an extensive <a href="http://planet.plt-scheme.org/">collection of packages</a> and a very active community behind it. <br /> +After my first attempt to learn Haskell, I felt compelled to try out <span class="caps">PLT</span> Scheme and it immediately felt much easier and more user friendly to learn, partly because of <a href="http://download.plt-scheme.org/drscheme/">DrScheme</a> a dedicated <span class="caps">IDE</span>/learning tool optimized to get you started and feel comfortable with the language.<br /> +Caveats? None, unless you have an adversion for parenthesis, that is.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://plt-scheme.org/">Official <span class="caps">PLT</span> Scheme Web Site</a></li> + <li><a href="http://docs.plt-scheme.org/guide/index.html"><span class="caps">PLT</span> Scheme Guide</a></li> + <li><a href="http://planet.plt-scheme.org/">PLaneT</a></li> + <li><a href="http://docs.plt-scheme.org/quick/">Quick: An Introduction to <span class="caps">PLT</span> Scheme with Pictures</a></li> + <li><a href="http://docs.plt-scheme.org/more/">More: Systems Programming with <span class="caps">PLT</span> Scheme</a></li> +</ul> +<h3 id="clojure">Clojure</h3> +<p><a href="http://clojure.org/">Clojure</a> is the most recent and notable attempt to bring Lisp back to life and ready to face the challenges posed to IT systems by the new century: concurrency and scalability. Because it runs on the Java Virtual Machine, you also get Java interoperability for free, in a more Lispy flavour. Although I&#8217;m a bit reluctant to deal with anything related to Java nowadays, Clojure&#8217;s approach makes it more appealing.</p> +<p>Unlike other Lisps (and Schemes) you may have encountered before, Clojure comes with some interesting additions:</p> +<ul> + <li><a href="http://clojure.org/multimethods">Multimethods</a></li> + <li><a href="http://clojure.org/agents">Agents asynchronous actions</a></li> + <li>Some interestings <a href="http://clojure.org/special_forms">special forms</a></li> + <li>Many pre-built <a href="http://clojure.org/data_structures">data structures</a>, like Vectors, Maps, Sets, Collections, &#8230;</li> +</ul> +<p>Despite all this, Rich Hickey became increasingly popular both in the Lisp and Java world for creating such an interesting and well-designed language. Unlike with many new (and old) programming languages, I have yet to find a single blog post or article which is seriously criticizing Clojure in any way.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://clojure.org">Official Clojure Web Site</a></li> + <li><a href="http://groups.google.com/group/clojure">Clojure User Group</a></li> + <li><a href="http://www.infoq.com/presentations/hickey-clojure">Clojure presentation on InfoQ</a></li> + <li><a href="http://netzhansa.blogspot.com/2008/10/trying-clojure.html">Trying Clojure</a></li> + <li><a href="http://groups.google.com/group/clojure/msg/f038decc18c7da37">My first look at Clojure</a></li> + <li><a href="http://enclojure.net/Index.html">Enclojure</a></li> +</ul> +<h3 id="squeak">Squeak</h3> +<p><a href="http://www.squeak.org/">Squeak</a> has become one of the most popular Smalltalk implementations available. It has been used in some very interesting projects:</p> +<ul> + <li><a href="http://wiki.laptop.org/go/Smalltalk_Development_on_XO">EToys</a>, a kids-oriented but powerful development environment built in Squeak, was included as part of the educational sofware suite of the <a href="http://www.laptop.org"><span class="caps">OLPC</span></a>.</li> + <li><a href="http://www.seaside.st/">Seaside</a> is a modern and very productive web framework running on Squeak.</li> + <li><a href="http://www.croquetproject.org/index.php/Main_Page">Croquet</a> is a development solution to build complex, multi-user virtual worlds.</li> +</ul> +<p>If you ask <a href="http://www.stonehenge.com/merlyn/">Randal Schwartz</a>, he&#8217;ll explain you <a href="http://www.infoq.com/articles/smalltalk-comeback-schwartz">why</a> Squeak and Smalltalk are at least worth a look. Personally, while I&#8217;m attracted by Smalltalk&#8217;s unique approach to programming and its friendly syntax, I am still a bit overwhelmed by the way it works. <br /> +Squeak, and Smalltalk in general, runs inside (literally) a virtual machine written in Squeak itself. This means that:</p> +<ul> + <li>You write your code inside Squeak</li> + <li>You debug, inspect and interact your code inside squeak</li> + <li>You run your code inside Squeak</li> + <li>You can install Squeak on virtually any platform, including mobile phones, fairly easily</li> +</ul> +<p>Everything lives inside Squeak. It&#8217;s very weird to picture this without actually trying it, so I suggest you <a href="http://www.squeak.org/Download/">download it</a> and give it a try: it will definitely be an unusual but intriguing experience.</p> +<p>Smalltalk takes programming to a whole different level, which is simply unimaginable for other languages. In return, it asks you to fully embrace the Smalltalk way of doing things, according to which external text editors, external version control systems and other common tools familiar to traditional programmers simply loose their purpose.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://www.squeak.org/">Official Squeak Web Site</a></li> + <li><a href="http://squeakbyexample.org/">Squeak by Example</a></li> + <li><a href="http://www.squeakland.org/">SqueakLand</a></li> + <li><a href="http://www.infoq.com/articles/smalltalk-comeback-schwartz">Ruby&#8217;s Roots: Smalltalk Comeback and Randal Schwartz on Smalltalk</a></li> + <li><a href="http://twit.tv/floss29"><span class="caps">FLOSS</span> Weekly 29: Dan Ingalls</a></li> +</ul> +<h3 id="ocaml">OCaml</h3> +<p>Like Smalltalk, <a href="http://caml.inria.fr/">OCaml</a> has been getting more attention recently than in the past. Sure, not everyone is planning to learn is these days, but after reading <a href="http://enfranchisedmind.com/blog/2008/04/14/useful-things-about-static-typing/">this article</a> I admit I was eager to give it a proper try.</p> +<p>Despite being statically typed, OCaml offers some of the features which are common in dynamically typed languages like Ruby, such as duck typing, the possibility of creating Domain-Specific Languages and even extending the language syntax with custom operators and constructs.</p> +<p>Additionally, the <a href="http://batteries.forge.ocamlcore.org/">OCaml Batteries Included</a> project was created as an attempt to bundle a standard set of commonly-used library together with the language core. Even if this project is still in alpha stage, it definitely <a href="http://dutherenverseauborddelatable.wordpress.com/2008/11/07/a-taste-of-ocaml-batteries-included/">looks promising</a>.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://caml.inria.fr/">Official Caml Web Site</a></li> + <li><a href="http://www.ocaml-tutorial.org/">Objective Caml Tutorial</a></li> + <li><a href="http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html">A Concise Introduction to Objective Caml</a></li> + <li><a href="http://wiki.cocan.org/">The OCaml Alliance Network</a></li> + <li><a href="http://ocamlnews.blogspot.com/">OCaml News</a></li> + <li><a href="http://batteries.forge.ocamlcore.org/">OCaml Batteries Included</a></li> +</ul> +<h3>Factor</h3> +<p><a href="http://factorcode.org/">Factor</a> is to Forth what <a href="http://clojure.org">Clojure</a> is to Common Lisp: a reincarnation of an ancient language in a more modern and practical form. In the specific case, although it borrows from Lisp and Self as well, Factor retains the main characteristics of its ancestor: it&#8217;s stack-based, concatenative and has postfix notation.<br /> +While this is enough to put some people off, if you digg deeper you&#8217;ll discover that Factor offers all the most important features available in contemporary programming languages: garbage collection, dynamic typing, an object system, &#8230; they&#8217;re just presented in a very different way:</p> +<blockquote> +<p>&#8220;Learning Factor is tough. One reason for this is that Factor is very different from other programming languages. Programmers today are used to imperative programming languages where data is stored and passed around in named variables (or function calls, which name their variables). Factor is the opposite of this. A lot of code tends to be written in a functional style, and even more jarringly, variables are rare, only referenced in a small fraction of words. Nobody intends to change any of this; it&#8217;s a feature, not a bug!&#8221;</p> +</blockquote> +<p style="padding-left:3em;">&ndash; Daniel Ehrenberg, <cite><a href="http://useless-factor.blogspot.com/2008/01/learning-factor.html">Learning Factor</a></cite></p> +<p>Like Haskell, Factor demands a completely different programming approach to what you may be used to, but once you get past that, it can be as useful as any other language, if not more. The <a href="http://docs.factorcode.org/content/article-furnace.html">Furnace</a> web framework, which powers the <a href="http://concatenative.org/">Concatenative</a> wiki, is entirely built in Factor and runs on top of a Factor web server.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://factorcode.org/">Official Factor Web Site</a></li> + <li><a href="http://concatenative.org/wiki/view/Factor">Factor on the Concatenative Wiki</a></li> + <li><a href="http://docs.factorcode.org/">Factor Documentation</a></li> + <li><a href="http://learnfactor.org/">Learn Factor</a></li> + <li><a href="http://planet.factorcode.org/">Planet Factor</a></li> +</ul> +<h3 id="lua">Lua</h3> +<p><a href="http://www.lua.org/">Lua</a> (&#8220;Moon&#8221; in Portuguese), is a lightweight and fast scripting language which can be easily embedded in other systems. Compared to the other languages mentioned in this article, it is definitely the less alien of the lot: if you know a tiny bit of C or Java, you&#8217;ll be able to understand (and possibly write) 80% of Lua code without reading a single line of its documentation.</p> +<p>Despite its simplicity, Lua is considered a multi-paradigm language supporting imperative, functional and even object-oriented approaches. More specifically, Lua&#8217;s <em>tables</em> provide a simple but powerful way to create arrays, hashes and even classes (or better, prototypes). Simple (and multiple) inheritance is achieved through <em>metatables</em>, which allow calls to undefined functions to be <em>transferred</em> to parent tables.</p> +<p>Lua programs are not interpreted in the traditional way: they are compiled to bytecode and then executed in the Lua Virtual Machine. As a result, Lua code tends to be executed much faster than other interpreted languages, so fast that &#8220;as fast as Lua&#8221; has become a proverbial expression.<br /> +Lua found its niche in embedded applications and games development, basically everywhere there&#8217;s the need to provide a fast scripting language which is also very easy to learn and extend with C or other languages.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://www.lua.org/">Official Lua Web Site</a></li> + <li><a href="http://www.lua.org/manual/">Lua Manual</a></li> + <li><a href="http://lua-users.org/">Lua-users</a></li> + <li><a href="http://icculus.org/~theoddone33/lua/">Learning Lua</a></li> + <li><a href="http://lua.gts-stolberg.de/en/index.php?uml=1">Lua for Beginners</a></li> +</ul> +<h3 id="scala">Scala</h3> +<p>You may not be happy to see <a href="http://www.scala-lang.org/">Scala</a> in this list instead of other very valid and equally powerful languages for the Java Virtual Machine such as <a href="http://groovy.codehaus.org/">Groovy</a>. While there was no doubt on whether Clojure should have been included or not, I was a bit hesitant to include Scala. In the end, I chose to do so simply because Scala fits better in this list than other languages: as you should have noticed by now, I am somehow more inclined to learn functional languages as opposed to their object-oriented counterparts.</p> +<p>Scala is both object oriented and functional. It offers the best of both worlds: classes, traits and mixins which may be familiar to <span class="caps">OOP</span> lovers but also anonymous functions, currying and pattern matching which may please Haskell enthusiasts. Additionally, it&#8217;s also compatible with Java: so if you use Java for work, trying out Scala for pleasure is definitely the most logical next step, especially if you want to experiment with functional programming in the meantime.</p> +<p>Compared to learning a fully-functional (no pun intended) language like Haskell, Clojure or <span class="caps">PLT</span> Scheme, learning Scala is definitely easier and will feel less alien.</p> +<h4>To get you started&#8230;</h4> +<ul> + <li><a href="http://www.scala-lang.org/">Official Scala Web Site</a></li> + <li><a href="http://blogs.zdnet.com/Burnette/?p=690">The Case for Scala</a></li> + <li><a href="http://scala.sygneca.com/">Scala Wiki</a></li> + <li><a href="http://grok-code.com/75/learning-scala-with-project-euler/">Learning Scala with Project Euler</a></li> + <li><a href="http://www.codecommit.com/blog/scala/roundup-scala-for-java-refugees">Roundup: Scala for Java Refugees</a></li> +</ul> +<h3>Epilogue</h3> +<p>There are so many interesting programming language out there that it&#8217;s very hard to keep track of all of them. I hope this list can aid you in the right direction, whichever it may be. <br /> +Some people may debate over the very essence of this article: why <em>choosing</em> a programming language? Why spending time and energy in a task which may lead to a lot of confusion in your mind and lead you nowhere? What&#8217;s the purpose of learning something which may feel totally alien to you?</p> +<p>A programming language is ultimately just a tool to get your job done. If you have to write an end-user, desktop <span class="caps">GUI</span> application which will always run on Windows and which needs to inteface with Microsoft technologies, you&#8217;ll choose C# over Haskell, there&#8217;s no doubt about that. Especially if 500 developers in your company already develop in C# and you don&#8217;t, as a matter of fact, have a saying on the matter.</p> +<p>But what if you <em>could</em> choose? What if you wanted to develop your own geeky command line application to automate a particular task for yourself, and not because someone else tells you to do so? Would you be willing to experiment with something totally different and potentially difficult just for the sake of learning new things?</p> +<p>If the answer is yes, then you should take a look at this list again. Not now, maybe not this month or this year, but when you feel the time is right, and give one of these languages a shot. It may not end well (so far I attempted to learn Haskell twice, with no luck), but I promise you it will be worthwhile, in the long run. <br /> +If you already mastered some of these languages already, or even all of them, be assured that they&#8217;re plenty out there ready to be discovered and open your mind even more. Or, if you prefer, there are a lot of minds out there which may need guidance in learning and discovery. Help them. Write articles, tutorials, books, educate and evangelize: ultimately, that will be your greatest reward.</p>
A contents/articles/10-reasons-to-learn-ruby.html

@@ -0,0 +1,107 @@

+----- +title: 10 Reasons to Learn Ruby +content-type: article +subtitle: Ten possible reasons to learn the Ruby Programming Language +popular: true +timestamp: 1188988800 +tags: ruby +----- +<h3>Preamble</h3> +<p>I discovered Ruby fairly recently, through the excellent Ruby on Rails framework<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>. Although I don&#8217;t consider myself a Ruby expert by any means, I read the PickAxe<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>, I&#8217;ve coded a few utilities for my personal use in Ruby and I&#8217;m currently developing with Rails during my free time.</p> +<p>Ruby is currently my programming language of choice; I started off with Turbo Pascal in high school, discovered C and C++ at university, did my thesis in Java and learned <span class="caps">PHP</span> from scratch because I wanted to learn how to make websites quickly and easily. I guess I feel compelled to code sometimes, more as a form of entertainment than anything else. Rather dissatisfied with what I tried language-wise, I was determined to start learning either Python or Ruby. I chose the latter because I didn&#8217;t want incorrect indentation to break my code<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup>, and here I am, heaping praise upon it.</p> +<p>There are plenty<sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup> of introductions, tutorials, articles and essays of different sorts which aim to guide the novice and advise the guru on how to get the most out of Ruby. This article, however, is not one of them.</p> +<p>It&#8217;s more of a modest, humble, and incomplete list of a few reasons which may (or may not) entice you to use Ruby or at least play with it a bit. A word of caution: if you are using another programming language for work or whatever, don&#8217;t complain to me if you don&#8217;t want to use it anymore &#8211; that&#8217;s exactly what happened to me, but luckily, it didn&#8217;t matter. Ruby is a very beautiful and elegant language, but like all things of this sort, it may well poison your mind and corrupt your soul&#8230;</p> +<p>You have been warned.<br /> +h3. Why learn Ruby?</p> +<h4>#1 &#8211; You get all the treats without the tricks</h4> +<p>Ruby borrows from all the best programming languages out there, from smalltalk to Java, Perl to Python<sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup>. Basically, here&#8217;s the features and functionalities Ruby gives you which you may have seen elsewhere:</p> +<ul> + <li><em>Exceptions:</em> Believe it or not, exceptions are one of the most important things to master when developing any kind of application. PHP4 programmers probably won&#8217;t know anything about them and they&#8217;ll tell you to just print stuff on the screen or use their &#8220;extremely advanced&#8221; class for error handling. Please, ignore them. Fortunately for all of us, Ruby comes with try/catch (or better, begin/rescue) blocks and a series of predefined, extensible Exceptions to handle errors properly.</li> + <li><em>Namespaces:</em> Ruby modules make excellent and easy-to-use namespaces, for the joy of Java and C++ enthusiasts.</li> + <li><em>Built-in Regular Expressions:</em> For all the Perl monkeys, you can put something between slashes and it will become a regular expression, ready to be matched with a =~ operator.</li> + <li><em>Overloadable operators:</em> Ruby lets you define operators like +, -, etc., for any of your classes.</li> + <li><em>Packages:</em> Called &#8220;gems&#8221;, they really are solid and precious indeed&#8230;and they work! Packages support dependencies, and they can be either cross-platform or platform-dependent.</li> + <li><em>Interactive Shell:</em> the Interactive Ruby Shell can be used to test Ruby code instantly, similar to the Python console.</li> + <li><em>Unit Testing</em>: The <code>Test::Unit</code> module makes things so easy that you really don&#8217;t have any excuse not to test your code.</li> +</ul> +<h4>#2 &#8211; You&#8217;ll love the little things</h4> +<p>Ruby is elegant. Why&#8217;s that? Because it doesn&#8217;t focus on making code <em>concise</em> so much as <em>readable and usable</em>. Here are some tips to help you out:</p> +<ul> + <li>You can use both <em>if</em> and <em>unless</em> in condition statements. Of course you can just use <em>if</em> and negate the condition, but <em>unless</em> can be less error-prone at times. Furthermore, you can use both operators as conditional modifiers, after a statement rather than before: <em>order.new unless order.exists</em>.</li> + <li>You can use question marks and exclamation marks at the end of your methods. Although no convention is enforced, ? is added if the method should return true or false, while ! is used to clarify that the method does something forcefully, like destroying a database record, chopping off the last character of a string, etc.</li> + <li>You can use the <em>alias</em> directives to create an alias for a method already defined. In this way you can have an <em>exist</em> and an <em>exists</em> method at no additional cost or repetition.</li> + <li>You can use the <em>attr_reader</em>, <em>attr_writer</em> or <em>attr_accessor</em> directives to automatically generate getter and setter methods for specified class members.</li> + <li>Some naming conventions are enforced for your own sanity: constants, classes and modules are capitalized, methods and members must start with a lowercase letter; global variables are prepended by a $, instance variables by <code>@</code> and class variables by <code>@@</code>; etc.</li> + <li>Parentheses are optional in method calls. You can therefore write <em>File.open(&#8220;/home/h3rald/test.txt&#8221;)</em> or simply <em>File.open &#8220;/home/h3rald/test.txt&#8221;</em>, which is particularly handy with methods that don&#8217;t take parameters.</li> +</ul> +<h4>#3 &#8211; You won&#8217;t ever use a semicolon again</h4> +<p>You want to add another instruction? Just go on the next line. Hit <return> and you&#8217;re done. In Ruby, like in Python, newlines matter and you don&#8217;t have to remember to end your instructions with a semicolon. Unfortunately this means that you won&#8217;t be able to write your whole program in a single line of code, like the C++ folks&#8230; that&#8217;s too bad, isn&#8217;t it?</p> +<p><strong><span class="caps">UPDATE</span>:</strong> Indeed you <span class="caps">CAN</span> use semicolons as line delimiters in Ruby as well, the point, however, is that you don&#8217;t have to.</p> +<h4>#4 &#8211; Everything is an object, as it should be</h4> +<p>When I studied Java they taught me that everything is an object.</p> +<p><em>- &#8220;So 14 and 374346.678 are objects then?&#8221;</em><br /> +<em>- &#8220;No, silly, they are numbers!&#8221;</em></p> +<p>In Ruby, numbers, strings, Boolean values <em>et al</em> are objects. Really. This means you&#8217;ll write things like:</p> +<div class='ruby'><pre><code>"YOU SHOULDN'T ALWAYS USE CAPITALS".downcase #=&gt; outputs "you shouldn't always use capitals" +-12.abs #=&gt; outputs 12</code></pre></div><p>instead of something like:</p> +<div class='ruby'><pre><code># PHP Code + +strtolower("YOU SHOULDN'T ALWAYS USE CAPITALS"); +abs(-12);</code></pre></div><p>You save time, you save brackets, and it just makes more sense.</p> +<h4>#5 &#8211; Everything has a value</h4> +<p>Or &#8220;you&#8217;ll hardly ever use return to return values&#8221;. In a nutshell, all Ruby instructions return a value, even variable assignments, so you don&#8217;t really need to use the &#8220;return&#8221; keyword at the end of a method; the value of the last assignment or <em>any</em> other expression will always be returned.</p> +<h4>#6 &#8211; You can alter your environment in any way you like</h4> +<p>The first time I saw this, it really freaked me out. Imagine a typical programming situation: you start using a system class or a class written by someone else and you notice that you&#8217;d like to have an additional method. At this point you have a few ways to handle this in ordinary programming languages:<br /> +s</p> +<ul> + <li>You modify the developer&#8217;s source code, if you have access to it. This is normally not a good idea, and you shouldn&#8217;t do it.</li> + <li>You derive a new class from the original one, and you implement the new method there. This is a good idea, but it could be overkill for just one method, and you may have to update some of your other code accordingly.</li> + <li>You give up, and you just create the method outside the class, somewhere else. This can be done, but it is not very elegant and goes against Object Oriented Programming.</li> +</ul> +<p>In Ruby, you can simply add the method to the original class, without having to hack the original source code, and even for system classes! You want to have a method to automatically convert a measurement from meters to feet? You can simply extend the Numeric class as follows:</p> +<div class='ruby'><pre><code>class Numeric + def feet + self*3.2808399 + end +end</code></pre></div><p>From now on, all your numbers will have a <em>feet</em> method, which can be used just like any other method that was originally defined for the class:</p> +<div class='ruby'><pre><code>5.feet #=&gt; Returns 16.4041995</code></pre></div><p>Basically, Ruby classes are never closed and can be modified at any time from anywhere. Use with care, of course.</p> +<h4>#7 You won&#8217;t get unicorns from birds and horses, but you&#8217;ll still get donkeys if you want</h4> +<p>I distinctly remember my C++ professor at university using animals to illustrate key object-oriented concepts like classes and inheritance. Weird things came in when she tried to explain multiple inheritance to inherit a class Pegasus from a class Bird and a class Horse. It had methods like &#8220;fly&#8221; and &#8220;neigh&#8221;&#8230; crazy stuff, anyhow, Ruby does not offer multiple inheritance. <br /> +This seems to be the trend, after all, and of course it&#8217;s up to tastes. I don&#8217;t quite fancy multiple inheritances, as they may lead to unpredictable things. Nevertheless, it is possible to create &#8220;mix-ins&#8221; using Ruby modules, so that members and methods defined in a module will be added to a particular class if the module is included in it.</p> +<h4>#8 You don&#8217;t really need <span class="caps">XML</span></h4> +<p><span class="caps">XML</span> is a nice, general-purpose markup language which can be processed by every programming language and used everywhere. Unfortunately, it can also be quite verbose to write, very difficult to parse, and let&#8217;s be honest, it&#8217;s not really readable at first glance in many cases, unlike the following code snippet:</p> +<div class='yaml'><pre><code>regexp: !ruby/regexp /a-zA-Z/ +number: 4.7 +string: a string</code></pre></div><p>This is definitely easier and more readable than <span class="caps">XML</span>, isn&#8217;t it? Welcome to <span class="caps">YAML</span>, Ruby&#8217;s favorite markup (but not really<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup>) language, which can be used to represent any Ruby object in a simple, clear and yet complete way. <br /> +Ruby <em>can</em> parse <span class="caps">XML</span>, but YAML&#8217;s simplicity convinced a lot of developers to use it as an alternative to <span class="caps">XML</span> for configuration files, for example (Rails does this).<br /> +The code snipped presented before was obtained by executing the following line of Ruby code:</p> +<div class='ruby'><pre><code>{"string" =&gt; "a string", "number" =&gt; 4.7, "regexp" =&gt; /a-zA-Z/}.to_yaml</code></pre></div><p>The <em>to_yaml</em> method is defined for the Object class, which is the father of all of the other classes, and thus it is available in all Ruby objects. This means that you can convert anything into <span class="caps">YAML</span> <em>and</em> re-convert anything back into Ruby objects, with total transparency for the developer. So much for parsing, huh?</p> +<h4>#9 Lambda is much more than a Greek letter</h4> +<p>Ruby borrows some magic from Lisp and Perl with Proc objects and blocks. Procs are _&quot;blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.&quot; _<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup> Consider the following:</p> +<div class='ruby'><pre><code>def gen_times(factor) + return Proc.new {|n| n*factor } + end + + times3 = gen_times(3) + times5 = gen_times(5) + + times3.call(12) #=&gt; 36 + times5.call(5) #=&gt; 25 + times3.call(times5.call(4)) #=&gt; 60</code></pre></div><p>I could have used the <em>lambda</em> method instead of <em>Proc.new</em> and gotten the same result. This should ring a bell for people who know Perl and Python (or Lisp)<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup>. You can do the same thing in <span class="caps">PHP</span> as well, but most people don&#8217;t really use the function.<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup></p> +<p>Additionally, Ruby makes extensive use of blocks, sort of &#8220;unborn Procs&#8221;<sup class="footnote" id="fnr10"><a href="#fn10">10</a></sup>, for example, to iterate the contents of an object and execute some code, like the <em>each</em> method available for the Array class:</p> +<div class='ruby'><pre><code>[1, 2, 4, 6, 8].each {|c| puts c*2} #=&gt; outputs each element multiplied by 2 in a new line.</code></pre></div><p>Should the code in the block exceed one line, you&#8217;re advised (but not required) to include the block within <em>do &#8230; end</em> instead of using braces. Ruby folks don&#8217;t like braces much, really.</p> +<h4>#10 &#8211; You can go on Rails</h4> +<p>Last but not least, you can always use Ruby on Rails for developing web applications. Deployment may not be as easy as it is with <span class="caps">PHP</span>, but Rails was built in Ruby because Ruby has features no other language can offer.</p> +<h3>Conclusion</h3> +<p>Time&#8217;s up. You&#8217;ve probably made up your mind about Ruby already, and you are either playing with it already, or you&#8217;re totally ignoring it. However, the next time you&#8217;re frustrated because your code looks ugly and you think you could have done the same thing with half the code you got, don&#8217;t blame me!</p> +<h3>Notes</h3> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> <a href="http://www.rubyonrails.org">Ruby on Rails</a>, <span class="caps">MVC</span> Web Development Framework.</p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://pragprog.com/book/ruby/programming-ruby/" title="2nd Ed.">Programming Ruby</a>, by Dave Thomas &amp; others, Pragmatic Programmers, 2004</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> Not entirely correct, but sort of. For more information on Python&#8217;s indentation rules and myths, read <a href="http://www.secnetix.de/~olli/Python/block_indentation.hawk">Python: Myths about Indentation</a>.</p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> For a list of Ruby tutorials, refer to the <a href="http://www.ruby-lang.org/en/documentation/">Documentation</a> section of the Official Ruby Website.</p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> For more information on Ruby, and in particular on the similarities and differences with other languages, refer to <a href="http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/">Ruby from Other Languages</a>.</p> +<p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> <span class="caps">YAML</span> is Not a Markup Language.</p> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> Definition and example taken from the official Ruby documentation for class <a href="http://www.ruby-doc.org/core/classes/Proc.html">Proc</a>.</p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> For some example on lambda functions in Python, see <a href="http://www.secnetix.de/~olli/Python/lambda_functions.hawk">Python: Lambda Functions</a>.</p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> For examples of &#8220;lambda functions&#8221; in <span class="caps">PHP</span> using create_function(), see <a href="http://www.webmasterworld.com/forum88/7414.htm">this</a>.</p> +<p class="footnote" id="fn10"><a href="#fnr10"><sup>10</sup></a> For more detailed information on Ruby&#8217;s Procs, blocks etc. refer to <a href="http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods">Understanding Ruby blocks, Procs and methods</a>.</p>
A contents/articles/10-reasons-why-i-didnt-update-my-blog.html

@@ -0,0 +1,65 @@

+----- +title: 10 reasons why I didn't update my blog +content-type: article +timestamp: 1213234200 +tags: internet|rant|personal|writing +----- +<p><em>&#8220;It has been a while since my last post, sorry about that&#8221;</em><br /> +I read this sentence (or something along those lines) on many blogs on the Internet, including mine. As a matter of fact, I actually didn&#8217;t write a meaningful post on my blog for a long time and no, probably this is not going to change that either.</p> +<p>Yesterday I started thinking <strong>why</strong> this happens, not only to me but to a lot of other non-professional bloggers. A professional blogger &emdash; for what I can tell &emdash; is someone like Michael Arrington or Gina Trapani: someone who has the luck (or course) to be able to just blog for a living.</p> +<p>I don&#8217;t blog for a living: my site is self-sustaining via a few very unobtrusive ads, just that. I have a full time job, and I blog in my spare time about my interests, without even trying to make &#8220;proper&#8221; money from my site. There&#8217;s nothing wrong with it: I believe there are some other people in my condition, and that&#8217;s quite normal.</p> +<p>That being said, let&#8217;s examine the ten most common reasons why I (and you too, maybe) end up not updating my blog, <em>even when I have time to do so</em>.h3. Someone already blogged about it</p> +<p>This is very irritating. I am obsessed with original content. I want to write about something other people <em>never</em> (or hardly ever) wrote about. As a consequence, I often find myself googling the same topic I&#8217;m planning my blog post on, and I <em>obviously</em> often get quite a few results, too!</p> +<p>I actually wanted to title this very post &#8220;The Blogger&#8217;s Block&#8221;, but I immediately thought of putting that very title into Google, just to see if someone else already blogged about it. Sure they did! Not original at all, tough luck. <br /> +It also happened a few weeks ago: I wanted to write about the current state of tech news sites and Antonio Cangiano comes up with a similar <a href="http://antoniocangiano.com/2008/05/29/random-thoughts-on-social-sites/">post</a>. Very interesting indeed, but quite annoying as well!</p> +<p>OK scrap that, think about something else&#8230;</p> +<p>This can potentially go on for days, and the only solution is of course trying not to worry about it, and just write the damn thing (that&#8217;s what I did to write this post).</p> +<h3>I didn&#8217;t research enough on the subject</h3> +<p>This happens tipically with reviews, round-ups, etc. Things I actually enjoy writing, but which may be easily subject to (harsh) criticism unless ou do them right. <br /> +I wanted to write a review of the new Treo 750 I bought. I&#8217;ve been using for a while, I learnt a few interesting hacks etc. etc. Unfortunately the 3G iPhone came out, so everyone is all hyped up about it. Too bad that I, being Italian and living in Italy, I never actually touched the damn thing!<br /> +What has that got to do with my Treo 750? Well, it would be nice to write a review of a Windows Mobile 6 phone comparing to the upcoming Apple wonder, wouldn&#8217;t it?</p> +<p>The solution to this would be trying to limit the scope of your post: screw Apple, let&#8217;s just focus on my Treo 750 and on the amazing amount of programming languages I can use on it!</p> +<h3>After researching for X days, I realized it was all a waste of time</h3> +<p>This happens with big articles. I once thought about writing a comprehensive article about all the possible ways to deploy a Ruby on Rails web site. Cool, isn&#8217;t it? I started researching about all the most esoteric lightweight web servers, about JRuby, Glassfish, IronRuby, &#8230; A lot of things. And new solutions kept coming up, and with them more and more posts, and then even entire books on the subjects.</p> +<p>Very frustrating. I abandoned the whole thing, because there was simply no reason to go on researching: it was all a waste of time.</p> +<p>How to fix this? Again, reduce the scope of your article so that you are able to reduce the time you spend researching about it. Or maybe try to get paid to write it, so that even if there&#8217;s plenty of articles about the same subject, at least you have a concrete purpose to write yours.</p> +<p>Erhm, yes, by the way, keep an eye on <a href="http://www.sitepoint.com">SitePoint</a> in the next few days/weeks, OK?</p> +<h3>I only write when I&#8217;m inspired, and now I&#8217;m not</h3> +<p>Very, very common. I normally think about a very cool article to write in the evening, or early in the morning, or whenever I don&#8217;t have access to a computer or the Internet. <br /> +Of course I don&#8217;t forget about it, but by the time I have a chance to actually write it, I really don&#8217;t fancy doing so. Oh, the irony! <br /> +It happened today, actually, during my lunch break: I was supposed to write this post but I didn&#8217;t feel like it. I lost my inspiration and all my artistic verve, so no, it can&#8217;t be done. Tough luck, wait until next time.</p> +<p>How did I solve this? Well, I started writing the post in my coffee break: there was no way to finish it in time, of course, but at least I started it.<br /> +I also saved it to my <span class="caps">PDA</span> and continued writing it when I had a chance. Eventually, I managed to finish it during my lunch break, the next day.</p> +<p>Try to write <em>whenever you are inspired</em>. If you are not inspired in your lunch break, do some work in your lunch break and then write when, in an hour or so, probably, you feel like writing again.</p> +<h3>This won&#8217;t make Digg&#8217;s front page</h3> +<p>Digg, Reddit, DZone, you name it. They are all excellent free tools for promoting your content. Don&#8217;t tell me you never wrote a post <em>for the sake of making the front page</em> of one of those sites. I did, I confess.<br /> +I didn&#8217;t make Digg&#8217;s front page in a while, and I&#8217;m probably never going to make it again. The reason? When it comes to promoting the right content in a fair way Digg <strong>sucks</strong>. As a consequence, 80% of the articles which appear on Digg <strong>suck</strong>. I&#8217;m sure you&#8217;ll be able to forgive my French when I say that <strong>Digg utterly sucks</strong>.</p> +<p>No matter how clever your story may be, unless you&#8217;re backed up by a swarm or an active community willing to Digg your story, you simply aren&#8217;t going to make it. When is the last time a proper programming article made it to Digg? I don&#8217;t remember, probably way before I unsubscribed to the Digg&#8217;s Technology feed, about a year or so ago.</p> +<p>Just write for the sake of writing. Don&#8217;t even submit your story to Digg (unless you&#8217;re writing about the iPhone, of course, then you may have a chance): post it to a less-known site, maybe, or to Reddit, instead. You won&#8217;t get as much traffic, granted, but you also won&#8217;t get tons of idiots writing pointless crap on your site and you won&#8217;t risk a server crash. If it&#8217;s destiny, then some good soul will post it to Digg, but nobody will digg it. That&#8217;s just life, I&#8217;m afraid.</p> +<h3>It has been too long since my last post: the next one will have to make up for it</h3> +<p>This happens when you start feeling guilty because you didn&#8217;t post in a long time.</p> +<p><em>&#8220;My next post is going to be superb, long, interesting and everyone will start flocking back to my blog!&#8221;</em></p> +<p>Wrong. First of all because statistically people just don&#8217;t &#8220;flock back&#8221; because you bestowed them of one interesting post (you have to keep up, too), and second because by doing so your mind will automatically discard all those bits of things you wanted to write about, but you never did because you&#8217;re waiting for that special <em>next post</em> which will be <em>so much better</em> and will bring your blob back to <del>spam</del> life.</p> +<p>It happened, it happened&#8230; again, all you have to do is just post all the tidbits you need, while you&#8217;re preparing your big shot: your blog will remain &#8220;fresh&#8221; and more people will enjoy your interesting posts, whenever they&#8217;ll come.</p> +<h3>Nobody gives a damn, anyway</h3> +<p>I didn&#8217;t want to upset my younger audience by using a nasty f-word in the title, but that&#8217;s exactly how it feels like it, sometimes.<br /> +I went to Rome last week, did you know? I twittered about it, you <strong>ought</strong> to know! And of course you&#8217;ll all be waiting for the usual 10-page-long article on my awesome vacation. Like when I <a href="http://www.h3rald.com/articles/incomplete-guide-to-london">went to London</a>, remember?<br /> +No, sadly not everyone may be interested in this crap. So I probably won&#8217;t post about it: who cares? When you start thinking like this, you may stop posting for weeks: not everyone may be interested in everything you post, and I believe that&#8217;s normal.<br /> +Especially for a blog like mine, which is deliberately open to all my interests: programming, technology, travelling, etc. That&#8217;s why most blogs try to be themed: they write about a particular subject, even a single programming project, and they (try to) do it well. The trade-off is that a themed blog may run out of posts amazingly quickly, if you&#8217;re not carefula and if you&#8217;re not 100% devoted to your blog&#8217;s theme. <br /> +A themed blog will build up a faithful audience, like when I was writing almost exclusively about CakePHP: a lot of <span class="caps">PHP</span> programmers where flocking here daily. Then things <a href="http://www.h3rald.com/blog/42">went wrong</a> and I really couldn&#8217;t be bothered to write about the same crap. Which leads us to the next topic&#8230;</p> +<h3>If I write about this, a large chunk of my audience is going to be upset</h3> +<p>This applies especially to themed blogs: if you&#8217;re a well-known Firefox addict, you can&#8217;t suddenly start writing about <a href="http://www.h3rald.com/articles/firefox-lovers-guide-to-opera">Opera</a>, praising its speed and the features it offers out-of-the box!<br /> +If you take a side, you&#8217;d better stick to it, if you want your audience to stick to you: the ten people who happen to read this blog are probably quite shocked by the amount of times I &#8220;changed side&#8221;: from CakePHP and <span class="caps">PHP</span> to Rails and Ruby, from Firefox to Opera (well, wait until my next SitePoint article comes out, at least&#8230;). Probably they are not the same people who read this blog a year or so ago.</p> +<p>In the end, it&#8217;s entirely up to you: if you are prone to radically change our opinion (and this happen in technology, much more than in politics), which involves changing the whole theme of your blog, maybe you should consider not having a themed blog at all. <br /> +And if you don&#8217;t feel 100% sure you want a themed blog, you definitely shouldn&#8217;t go for a themed domain name, or you may end up abandoning it afterwards. And when that happens, unless you&#8217;re writing damn cool posts like <a href="http://redhanded.hobix.com/">Why</a>, it&#8217;s going to hurt your audience. On the other hand, if you&#8217;re sure you&#8217;ll get ten times more visitors, go for it.<br /> +No, h3rald.com stays&#8230; I may end up raving about Safari at some point within the next ten years though, don&#8217;t be upset!</p> +<h3>I&#8217;m not an expert on the subject, so I shouldn&#8217;t blog about it</h3> +<p>This is a common problem I have when I try to write about something I don&#8217;t know extensively enough. When I started to learn Ruby, I was eager to start writing about it: it seemed just too cool to be true!<br /> +I thought about writing a longish post on learning Ruby from scratch, but then I realized it wouldn&#8217;t have been a great idea: I was just starting to learn a new language, I didn&#8217;t know all the nitty-gritty and writing about it to teach others was going to be a bit presumptuous, maybe!<br /> +Instead, I opted for a lighted <a href="http://www.h3rald.com/articles/10-reasons-to-learn-ruby">10 reasons to learn Ruby</a> article, clearly stating in the first paragraph that I was just a noob getting excited about his new toy. It worked, actually: people seemed to enjoy it, and I was partially excused for the few mistakes I made here and there.<br /> +You don&#8217;t have to be an expert to blog about something: you just have to be totally honest about what you know, and what you don&#8217;t know.</p> +<h3>There are a lot of professional bloggers out there, and I&#8217;m not one of them</h3> +<p>Finally, this can be summarized in two words: inferiority complex. &#8220;Proper&#8221; blogs fire out 10+ posts <em>per day</em>, and I don&#8217;t even write ten points in <em>a month</em>! Again, those a professional bloggers: they live for blogging (and make an awful lot of money out of it), and they most likely have someone else blogging for them, too! <br /> +Think of TechCrunch or LifeHacker, for example: they have a small legion of talented writers working for them &emdash; even if Michael Harrington does rant about Twitter about three times a week himself, though.<br /> +At the end of the day, what matters is the <em>quality</em> of your posts. Not the length minf, the Quality. I personally think that non-professionals (I said &#8220;non-professionals&#8221;, not &#8220;amateurs&#8221;!) are <em>allowed</em> to write about once a week, if they can provide good content, that is.</p> +<p>But you still do have to write <em>at least</em> once a week (OK, let&#8217;s make it ten days), otherwise either you&#8217;re justified (you genuinely don&#8217;t have time) or you may be a victim of one of these common fears. Watch out, and happy blogging!</p>
A contents/articles/10.html

@@ -0,0 +1,55 @@

+----- +title: Italian General Elections - 2006 +content-type: article +timestamp: 1144560780 +tags: italy|politics +----- +<p style="float:right;"><img src="http://www.berluscastop.it/v_imag/sodom1.gif" alt="" /></p> +<p>Another five years have passed and here we go again: General Elections time!<br /> +Today and tomorrow Italy <del>must</del> should vote for a new government, and the choice is <em>again</em> between two main contenders to the Prime Minister&#8217;s <del>throne</del> chair:</p> +<p>- <a href="http://news.bbc.co.uk/1/hi/world/europe/299254.stm">Romano Prodi</a><br /> +- <a href="http://news.bbc.co.uk/1/hi/world/europe/3034600.stm">Silvio Berlusconi</a></p> +<p>Just today I was reading an interesting article titled <a href="http://service.spiegel.de/cache/international/spiegel/0,1518,409538,00.html"><em>&#8216;The End of Silvio&#8217;s Show?&#8217;</em></a> in which the author examines the possibility that Berlusconi&#8217;s five years of subtle pseudo-dictatorship may end in favour the former president of European Commission Romano Prodi.</p> +<p><em>Who are they?</em></p> +<p><strong>Silvio Berlusconi</strong><br /> +<img src="http://www.consapevolezza.it/notizie/gen-mar-2002/imgs/berlusconi_corna_5.jpg" alt="" /></p> +<p>I can&#8217;t imagine someone asking this question, at least I can&#8217;t think of anyone who doesn&#8217;t know Silvio Berlusconi as the icon of the latest <em>national oddity</em>. <br /> +Forthose who need their memory refreshed, here&#8217;s a small collection of links featuring him:</p> +<ul> + <li><a href="http://news.bbc.co.uk/1/hi/world/europe/3034600.stm"><span class="caps">BBC</span> <span class="caps">NEWS</span> Profile</a></li> + <li><a href="http://en.wikipedia.org/wiki/Silvio_Berlusconi">Wikipedia Page</a> about him</li> + <li><a href="http://www.economist.com/displaystory.cfm?story_id=587107">An Italian Story</a> &#8211; An article written in 2001 published by the Economist, <em>before</em> he was elected Prime Minister</li> + <li><a href="http://www.economist.com/displaystory.cfm?story_id=593654">Fit to run Italy?</a> &#8211; Another article by the Economists explaining why Berlusconi should <em>not</em> lead the Italian Government</li> + <li><a href="http://grabbyeducational.blogspot.com/">Meglio coglioni che mafiosi</a> &#8211; Italian blog against Berlusconi (warning: profanity).</li> + <li><a href="http://www.geocities.com/basta2006/">Basta 2006 &#8211; Geocities</a> &#8211; a comprehensive directory of websites dedicated to Berlusconi, a really good resource.</li> +</ul> +<p>There are millions more. In particular, I&#8217;d like to add one more: <a href="http://www.consapevolezza.it/notizie/gen-mar-2002/impero_berlusconi.asp">The Empire of Silvio Berlusconi</a>, which features an image taken from an Italian magazine listing (roughly) everything owned (the image is dated 2002) by our current (for now) Prime Minister, such as:</p> +<ul> + <li>Mediaset Television (100%) &#8211; which includes three national channels</li> + <li>Medusa Film (100%) &#8211; Movie productions</li> + <li>Milan A.C. (99%) &#8211; Football team</li> + <li>Edilnord (63%) &#8211; Real Estate</li> + <li>Blockbuster (51%) &#8211; Video retal shops</li> + <li>Mondadori Spa (48%) &#8211; Biggest Italian editorial company</li> + <li>Mediolanum (35.5%) &#8211; Financial sociaty &#8211; banks, insurances etc.</li> +</ul> +<p>Nice, isn&#8217;t it? Of course he had to give those societies to some trusted administrators before becoming Prime Minister&#8230; but let&#8217;s not talk about this&#8230;</p> +<p><strong>Romano Prodi</strong><br /> +<img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/04/Prodi.jpg/200px-Prodi.jpg" alt="" /></p> +<p>Perhaps not as well known abroad as Silvio, but was recently the President of the European Commission for a while. Here are some (more serious) links about him:</p> +<ul> + <li><a href="http://europa.eu.int/comm/archives/commission_1999_2004/prodi/index_en.htm">European Commission Archives</a></li> + <li><a href="http://www.eitb24.com/portal/eitb24/noticia/en/international-news/centre-left-candidate--profile-of-romano-prodi-?itemId=D23503&amp;cl=%2Feitb24%2Finternacional&amp;idioma=en">eitb24&#8217;s profile of Romano Prodi</a></li> + <li><a href="http://www.answers.com/topic/romano-prodi">Answers.com on Romano Prodi</a></li> + <li><a href="http://topics.nytimes.com/top/reference/timestopics/people/p/romano_prodi/index.html?inline=nyt-per">New York Times archives about Romano Prodi</a></li> +</ul> +<p>Known as &#8220;The Professor&#8221; for his education&#8230;</p> +<blockquote> +<p><em>&#8220;He graduated in economics at Milan&#8217;s Catholic University in 1961 and did postgraduate studies at the London School of Economics. He also spent a year as visiting professor at Harvard in 1974&#8221;</em><br /> +<em>(<a href="http://news.bbc.co.uk/1/hi/world/europe/299254.stm">Prodi&#8217;s <span class="caps">BBC</span> profile</a>)</em></p> +</blockquote> +<p>&#8230;Romano Prodi is the candidate proposed by the current Italian opposition, grouping roughly all the center-left parties. He&#8217;s the one who pushed Italy &#8211; as President of the European Commission &#8211; to accept the Euro as new currency, back in the day, and also the one who was blamed for than after a few months when the <em>Euro effect</em> occurred: prices went higher and didn&#8217;t seem to be an <em>exact conversion</em> from Lire to Euro. He was chubby enough (&#8220;mortadella&#8221; is one of his most recurring nicknames) to be quickly appointed as scapegoat for the unpleasant situation.</p> +<p style="float:left;"><img src="http://www.dsmirandola.it/sg/img/berlusconi_corna.jpg" alt="" /></p> +<p>Besides that, if someone asks me what&#8217;s the difference between the two candidates, I&#8217;ll answer: one is a politician and devoted all his life to Politics, while the other partly devoted only the last 10-years-or-so to politics because it seemed to be <em>a cool and worthwhile investment</em>&#8230;</p> +<p><em><strong>Who am going to vote?</strong></em></p> +<p>Well, one thing is sure: I don&#8217;t want Silvio to win again, I don&#8217;t want Italy to be publicly ridicolized abroad all the time that muppet opens his mouth or simply does something <em>he</em> thinks is funny&#8230;</p>
A contents/articles/11-07-2009.html

@@ -0,0 +1,217 @@

+----- +title: 11th of July 2009 +content-type: article +timestamp: 1248605640 +tags: wedding +----- +<ul> + <li><a href="#prologue">Prologue</a></li> + <li><a href="#party">The wedding party</a></li> + <li><a href="#stag">The stag night</a></li> + <li><a href="#preparations">The preparations</a></li> + <li><a href="#ceremony">The ceremony</a></li> + <li><a href="#reception">The reception</a></li> + <li><a href="#honeymoon">The honeymoon</a></li> + <li><a href="#photos">Photos</a></li> + <li><a href="#trivia">Trivia</a></li> + <li><a href="#quotes">Famous quotes</a></li> +</ul> +<h3 id="prologue">Prologue</h3> +<p>Roxanne and I arrived in Ireland on the 3rd of July, just over a week before the wedding day. We thought a week would have been more than enough to finish organizing our big day, and we were right: we spent a few days enjoying our holiday with relatives and going around to meet the photographer, the florist and all the others.</p> +<p>Slowly guests started arriving into the country from Italy, England, Romania etc. For some reason, everyone chose a different day to get to Killenaule, so we had people turning up right until the very day before.</p> +<p>In a similar fashion, I was waiting for my waistcoat to arrive until the last minute: it turns out that the guy I bought it from decided to send it through normal post about 10 days before &#8212; &#8220;They normally arrive in less than two weeks&#8221;, he wrote to me in his last email.</p> +<p>I ended up having to drive to Clonmel the afternoon before the wedding with half the wedding party in my car looking for a waistcoat. I eventually managed to rent one (with matching shirt and cravat) for <em>just</em> 40 Euro.</p> +<h3 id="party">The wedding party</h3> +<p>The following table lists all the members of the wedding party, for your own reference.</p> +<table> + <tr> + <th>Name </th> + <th>Role </th> + </tr> + <tr> + <td> Fabio Cevasco </td> + <td> Groom </td> + </tr> + <tr> + <td> Roxanne O&#8217;Mahoney </td> + <td> Bride </td> + </tr> + <tr> + <td> Matteo Lagomarsino </td> + <td> Best man </td> + </tr> + <tr> + <td> Simona Angheluta </td> + <td> Maid of Honor </td> + </tr> + <tr> + <td> Roberto Pischedda </td> + <td> Head Usher </td> + </tr> + <tr> + <td> Delia Angheluta </td> + <td> Bridesmaid </td> + </tr> + <tr> + <td> Zacharry O&#8217;Mahoney </td> + <td> Usher </td> + </tr> + <tr> + <td> Caspar O&#8217;Mahoney </td> + <td> Usher </td> + </tr> +</table> +<h3 id="stag">The stag night</h3> +<p>In Italy, England, US and in many other countries a &#8220;stag night&#8221; may end up in many different ways: dinner with friends, strip club, wild practical jokes to the groom, and so on. In Ireland, it generally means one thing: <em>drink</em>. It occasionally ends up badly (there are rumors a poor fellow who was thrown out in a river and got married with a broken nose), but generally everything turns out just fine: have a few pints, sing and dance, and have a couple of eggs in the morning. That normally does the trick &#8212; if you&#8217;re an Irishman.</p> +<p>I was well aware of my in-laws drinking habits, so I decided to take uncle Felix&#8217;s offer: &#8220;I&#8217;ll have a taxi ready for you whenever you want to sneak out of the pub, and make sure you do&#8221; &#8212; he said.</p> +<p>The evening started with a few pints at Laffansbridge, an old country pub in the middle of nowhere, probably one of the best places for a pint of Guinnes in the whole Tipperary. The little smart guy who runs it has one simple rule: at midnight the light goes off and no more drinks are served, so all 16 of us got into a minibus by then, heading for the next pub.</p> +<p><em>Quinn&#8217;s</em> is the family pub, in the sense that it is owned by Felix Quinn Jr, son of Felix Quinn Sr, brother of Anastasia Quinn, mother of James O&#8217;Mahoney, father of Roxanne O&#8217;Mahoney, my wife (families are still very large and very close, in Ireland). Being the family pub, <em>Quinn&#8217;s</em> doesn&#8217;t close at midnight; in fact, it often doesn&#8217;t close at all for family and friends (i.e. the entire village of Killenaule).<br /> +As soon as we got in, Claire (wife of Felix, son of Felix, etc. etc.) greeted us with a full round of pints, and then another, and yet another&#8230;</p> +<p>Around the third round someone asked me if I could sing a song &#8212; a request I politely but firmly declined due to my total ignorance in Irish folk songs and my total inability to utter sounds in even the slightest musical way. Luckily, someone else volunteered and sang a beautiful ballad, perfectly in-tune, with no music backing at all: Irish people are amazingly musical when sober, imagine when drunk!</p> +<p>When people started getting into <em>their</em> fourth round (note the pronoun), I decided to try out an old trick to keep myself sober: I drank less than half a pint, and then pretended to drink the rest, leaving always something in my glass. In that way &ndash; I thought &ndash; I could pretend I didn&#8217;t need yet another pint. Unfortunately the pub owner spotted me straight away and said &#8220;That pint is stale&#8230; here, have another one, on the house!&#8221;. At that point I decided it was better for me &amp; the rest of the Italians to quietly sneak out.</p> +<p>I was at home (uncle Martin&#8217;s house) and in bed at about 1:30 AM. I almost didn&#8217;t sleep at all that night, as expected, so I wasn&#8217;t too bothered when the rest of the drinking comrades came back, singing and shouting at 4:30 am. Simona [the Maid of Honor and girlfriend of my brother-in-law Zac], on the other hand, wasn&#8217;t too amused when Zac turned up after drinking the (Irish) Nightly Guideline Drink Amount: approx. 10-11 pints of Guinness &#8212; those he could count, that is.</p> +<h3 id="preparations">The preparations</h3> +<p>This part of the day is best reported in chronological tabular form:</p> +<table> + <tr> + <th>Time </th> + <th>Event </th> + </tr> + <tr> + <td> 7:35 </td> + <td> The groom <del>wakes up</del> decides to stop pretending to sleep. </td> + </tr> + <tr> + <td> 8:00 </td> + <td> The bridesmaids are up and about, ready to go to the hairdresser </td> + </tr> + <tr> + <td> 9:00 </td> + <td> Uncle Martin and the rest of the gang slowly regain consciousness. The groom spends about half an hour trying to explain uncle Martin that he&#8217;s his only hope to collect and bring back the flowers for the church (_&quot;Ahhhh you want <em>me</em> to do it&#8230; you could have said so since the beginning!&quot;_). </td> + </tr> + <tr> + <td> 9:45 </td> + <td> The groom takes the bridesmaids into town, to the hairdresser </td> + </tr> + <tr> + <td> 10:00 </td> + <td> The groom attempts to gather his groomsmen for the first time </td> + </tr> + <tr> + <td> 10:15 </td> + <td> The groom starts having a chat with the best man and the head usher. The other ushers are <em>somewhere around</em>. </td> + </tr> + <tr> + <td> 10:30 </td> + <td> The groom realizes that one of the ushers (Zac) has the most terrible hangover on Earth and the other (Caspar) slept solidly from 3 am (while still in the pub) until now </td> + </tr> + <tr> + <td> 11:00 </td> + <td> The groom attempts to gather his groomsmen for the second time, this time telling them it&#8217;s time to get ready (he&#8217;s not taken seriously) </td> + </tr> + <tr> + <td> 11:30 </td> + <td> The groom attempts to gather his groomsmen for the third and final time, now everyone is starting to try out their suits </td> + </tr> + <tr> + <td> 11:45 </td> + <td> For some weird reason auntie Noelle decides to call the groom and tell him that the florist is not accepting checks, after 5 minuts of absolute panic, she says we&#8217;re going to get the flowers anyway and there&#8217;s nothing to worry about. </td> + </tr> + <tr> + <td> 12:00 </td> + <td> All groomsman are dressed. It starts raining. </td> + </tr> + <tr> + <td> 12:30 </td> + <td> Zac decides he needs some fresh air and takes a walk outside in his morning suit, regardless of the heavy rain and the groom&#8217;s prayers </td> + </tr> + <tr> + <td> 13:10 </td> + <td> The groomsmen go to the church. </td> + </tr> + <tr> + <td> 14:00 </td> + <td> Guests start arriving </td> + </tr> + <tr> + <td> 14:20 </td> + <td> The brides arrives and the ceremony starts. </td> + </tr> +</table> +<h3 id="ceremony">The ceremony</h3> +<p>The wedding ceremony was very suggestive, almost magic. As soon as I looked at Roxanne in her wedding dress all worries faded away, and we both enjoyed the wedding rite. I must say I also don&#8217;t remember much of the whole ceremony, but I&#8217;m told it&#8217;s a common thing to happen.</p> +<p>As the ceremony started, we sat down without looking at the audience, so I didn&#8217;t feel paranoid and enjoyed listening to the priest&#8217;s speech, the readings and the songs. Canon Liam Ryan embodies the typical Irish priest: about 70-year-old, tall, extremely talkative, cheerful and very charismatic. He shocked us all during the reharsal telling us what we&#8217;d have had to do the day after, and it felt like a lot of work. The groomsmen and the bridesmaids were terrified: <em>&#8220;So I have to help you sit down, move the chair&#8230; like that&#8230; then&#8230; go back&#8230; no, wait, what was that again?&#8221;</em>. Matteo and Roberto couldn&#8217;t believe the whole choreography involved in the event: it&#8217;s nothing like that in Italy, but they were glad they were part of it in the end.</p> +<p>It all happened exactly like Father Ryan predicted, he even guessed almost all the few mistakes we made: &#8220;You have to walk slowly in front of the bride&#8221; &ndash; he said to Delia, the bridesmain &ndash; &#8220;and if you <em>think</em> you&#8217;re going slow while you&#8217;re doing it, you&#8217;re probably going <em>way too fast</em>&#8221;. But nobody noticed, really, and nobody cared: they were all too excited to mind that, and everyone&#8217;s eyes were on Roxanne, anyway. She was really, really gorgeous and her dress was fabulous. It felt unreal, at times: we both felt we were in one of those movies&#8230;</p> +<p>The most peculiar thing about the whole ceremony was perhaps the different languages involved: English, Italian, Gaelic and Latin. I doubt there was a single person among us who could understand the entirety of the mass, but it was very evocatory. The whole mass was predominantly in English, with the following exceptions:</p> +<ul> + <li>The First Reading was in Latin (my mum read it superbly &#8212; she&#8217;s a Latin teacher!)</li> + <li>The Second Reading was in Italian</li> + <li><em>Our Father</em> was sung in Gaelic</li> +</ul> +<p>By our own common decision, we didn&#8217;t ask for a professional video of the ceremony, only <a href="#photos">photos</a>. Nevertheless, my uncle captured most of the ceremony (and the most embarassing bits of the dancing after the <a href="#reception">reception</a>) using my dad&#8217;s video camera.</p> +<h3 id="reception">The reception</h3> +<p>When the ceremony ended it was still raining heavily, so after an endless amount of pictures taken we went straight into our Rolls. Technically, that was not <em>our</em> Rolls of course: we rented it from a local car hirer, and it was worth every penny. A lot of people get married in a VW Beatle or in a Mercedes at most, but Roxanne and I really love old cars, so when we saw <a href="http://www.alleventslimos.com/Wedding/rolls_silver_cloud.html">Ruby</a>, a red 1961 Silver Cloud II, we just had to get it. Champagne and chauffeur included, of course.</p> +<p>The chauffeur was a very jolly and chatty fellow from Waterford, and drove that beauty of a car for a very long time. Unfortunately though his sat nav decided to stop working and he wasn&#8217;t really <em>local</em>, so erhm&#8230;, well, let&#8217;s just say we were really lucky that at least <em>the bride</em>knew her way around. We made it safe and sound to Raheen House in no time: so fast that everyone else arrived about 10-15 minutes afterwards.</p> +<p><a href="http://www.raheenhouse.ie/">Raheen House</a> is a very charming <span class="caps">XIX</span> century Georgian House. One of those places you normally see only in movies: tapestries on the walls, old armchairs, stuffed heads over the doors (an african buffalo, a huge deer, an antelope, and some more)&#8230; you get the picture. Unfortunately it can only accomodate 120 people, so it isn&#8217;t a very popular location for wedding receptions in Ireland, because the number of people invited at Irish weddings ranges from 150 to 300. We were about 60 in total, nevertheless the dining hall looked quite full and lively, with 7 big tables covering all the room.</p> +<p>As soon as we got there, my best man was informed by the staff that he <em>had to</em> introduce the bride and groom. <em>&#8220;What? No, wait! What do I say&#8230; how&#8230; what? Fabio, come back!&#8221;</em> he freaked out, but as soon as I wrote down the two lines he was supposed to say in English everything was OK. Not only did he introduce us properly, he also made a <em>terrific</em> speech: he obviously gave it a lot of thought and it sounded just perfect.</p> +<p>After he spoke, it was my dad&#8217;s turn. Now, my dad speaks perfect French but never got a chance to learn and practice English (yet), so not only he had to write down his entire speech, he also had to annotate the pronunciation of <em>every</em> word. He managed fine though. It felt a little bit long, but he said really wonderful and touching words about Roxanne and I, our respective families, and countries. I&#8217;ll publish it soon on the Internet, for posterity&#8217;s sake.</p> +<p>The last three speeches were Jim&#8217;s (the father of the bride), who did great as always, without reading anything, right on the spot. And so did Roxanne and I: we basically just said a few words thanking all the guests for coming, and half of them for helping us with the wedding as well. Every speech (except mine and Roxanne&#8217;s) was characterized by subtle and very discreet exhortations to produce progeny (<em>&#8220;get on with it!&#8221;</em>), but other than that they were fine.</p> +<p>After all the traditional obligations, we finally started our dinner. The food was delicious and extremely tasty: Raheen House is renown for that, as we were told, but we honestly weren&#8217;t 100% sure until we started trying it. And there was also <em>plenty</em> of it, so everyone felt really satisfied towards the end of the meal. So satisfied that we decided to postpone the cake till later (see below) and indulge with wine instead.</p> +<p>Wine, right. They were going to charge us 20€ per bottle for some weird Chilean or Australian stuff. Silly and almost offending, especially considering that my family has been producing wine for family and friend&#8217;s use for at least three generations! This was my dad&#8217;s primary concern until we left for Ireland: &#8220;You sort the restaurant out, because I&#8217;m going to bring some bottles, no matter what&#8221;. He shipped over <em>96</em> special bottles of our 2005, 2006, 2007 and 2008 vintages. Ninety-six. We used about 25 of them for the meal and the rest of the evening, then we gave one to almost every guest, three to the staff of the restaurant, a few more to other hotel and B&amp;B owners, six to each uncle of the bride, etc. etc. None came back to Italy, that&#8217;s for sure.</p> +<p>Right after the meal the band came in, and we got ready to dance. Roxanne and I had to start with our First Dance, of course, then everyone else slowly joined in. The group was playing a mixture of traditional Irish music, ballads and rock &#8216;n&#8217; roll: they were amazing, and especially the Italian&#8217;s were really impressed.</p> +<p>Not as impressed as when they noticed uncle Martin dancing. I&#8217;ve never seen <em>anyone</em> in my life dancing so vigorously and wildly in my life. He has his own special technique that cannot be described with words. I&#8217;ll try to post a video of him soon. He really felt the rythm and never missed a step. Like a whirlwind he dragged everyone in, dancing with him: first his daughters and sons, then his brothers, the he thought he&#8217;d take my auntie for a spin, then the bride (well, mostly her dress), then even me! I don&#8217;t remember much, I think I was in the air at one point, and then all over the place&#8230;</p> +<p>Everyone of course joined in and started drinking and dancing for the whole evening. When the band performed the last two songs, I just remember a <em>huge</em> circle of nearly all the guests holding hands dancing around Roxanne and I, then coming closer, then far, then closer again. It was definitely the wildest night in our whole life.</p> +<h3 id="honeymoon">The honeymoon</h3> +<p>The day after we slowly recovered. We didn&#8217;t sleep much, but we managed to get up and have breakfast with some of the guests at the hotel, before they started heading back. Then we decided to go shopping in town: it was basically Roxanne and I, plus her brothers, her parents, and my parents. Not much of a honeymoon, as my mum pointed out, but we didn&#8217;t mind.</p> +<p>After spending the following day saying goodbye and thanks to all the relatives, we finally headed to Co. Galway, in Connemara. We booked three nights in the fabulous <a href="http://www.abbeyglen.ie/">Abbeyglen Castle</a>, highly recommended. Our superior room had a fireplace, a four-poster bed and jacuzzi bath: the bare essentials for a honeymoon really. Roxanne and I really enjoyed those three days, finally alone in the most breathtaking and romantic area of Ireland. Three days weren&#8217;t enough, really, but we&#8217;ll eventually go back there hopefully: maybe Sir Paul Hughes, proprietor of the castle, will still remember <em>&#8220;the bride and groom&#8221;</em>, as he kept calling us throughout our brief, but very pleasant stay.</p> +<p>Exactly as auntie Noelle said, everything was over in a blink: the ceremony, the reception, the honeymoon&#8230; everything went back to normal, eventually. It took a while to get used to our normal life: we had to go on a shopping spree before we went back to work&#8230; let&#8217;s say the money we got as present from most of the guest was well spent in a 42&quot; <span class="caps">LCD</span> HD TV, surround sound system, etc. etc.</p> +<p>&#8230;And we still have our other half of the honeymoon, too! Probably Miami Beach and Bahamas, next November.</p> +<h3 id="photos">Photos</h3> +<p>Our wedding photos were taken by <a href="http://www.patmccoole.ie/">Pat McCoole</a>, who did a truly amazing job portraying the magic of our special day.</p> +<p><embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="600" height="400" flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fh3rald%2Falbumid%2F5359762418204291649%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></p> +<h3 id="trivia">Trivia</h3> +<ul> + <li>On the wedding day, it rained non-stop from 12 am to 7 pm.</li> + <li>The groom drove for a total of 1758.7 Km in 14 days.</li> + <li>On his stag night, the groom only drank 2.5 pints of Guinness (almost everyone else had 10, on average).</li> + <li>The night before the wedding, the groom slept only from 5:30 to 7:30.</li> + <li>Only the middle tier of the wedding cake was eaten on the wedding day. The top tier was eaten during the following days by relatives and the bottom tier was shipped to Italy, together with the Bride&#8217;s dress.</li> + <li>The father of the bride decided to change into more comfortable clothes right after the ceremony. He borrowed a waistoat and a jacket for the speech.</li> + <li>Uncle Martin danced with a lot of people after the meal, including the bride, her father, and the groom.</li> + <li>When he arrived at the church, the groom immediately realized he left the mass booklets and the confetti in the back of his car, at home. They were eventually brought to the church by a cousin of the bride just a few minutes before she arrived.</li> + <li>At the very start of the ceremony, the groom told the priest to tell the best man to get a mass booklet so that he and the bride can follow the mass properly. After 30 seconds of lip-reading and signalling, the best man understood and fetched one of the infamous booklets.</li> + <li>The bride forgot her change of clothes in uncle John&#8217;s car, who had to drive in early in the morning or she would have had her breakfast in her wedding dress.</li> +</ul> +<h3 id="quotes">Famous quotes</h3> +<blockquote> +<p>&#8220;This journey feels like going to Lourdes: you come back and your life changed forever.&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8212; The best man, when he arrived in Killenaule.</p> +</blockquote> +<blockquote> +<p>&#8220;Is there a garage around?&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; Auntie Isa while waving a car mirror, when she arrived in Killenaule</p> +</blockquote> +<blockquote> +<p>&#8220;Do I really have to do a speech? Are you sure?&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; The best man, when he met the groom in Ireland.</p> +</blockquote> +<blockquote> +<p>&#8220;My preciousssss!&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; The best man, when he was given the rings in custody.</p> +</blockquote> +<blockquote> +<p>&#8220;She&#8217;s the most calm and organized bride in history.&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; Auntie Noelle, about the bride on the wedding day.</p> +</blockquote> +<blockquote> +<p>&#8220;You could tell he was panicking on the phone&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; Auntie Noelle, about the groom on the wedding day.</p> +</blockquote> +<blockquote> +<p>&#8220;Potatoes, potatoes, potatoes&#8230;&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; The father of the bride to the groom, during the traditional handshake of the wedding rehearsal.</p> +</blockquote> +<blockquote> +<p>&#8220;Potatoes, potatoes, potatoes&#8230;&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; The groom to the father of the bride, during the traditional handshake of the wedding ceremony.</p> +</blockquote> +<blockquote> +<p><strong>Best man:</strong> &#8220;[&#8230;] this is the first time for me to speak in public, in front of an <em>English</em> audience [&#8230;]&#8221;<br /> +<strong>Audience:</strong> &#8220;Irish! <span class="caps">IRISH</span>!!!&#8221;<br /> +<strong>Best man:</strong> &#8220;&#8230;oh, right, Irish! Sorry&#8230;&#8221;<br /></p> +</blockquote> +<blockquote> +<p>&#8220;I need another shirt!&#8221;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; Uncle Martin, after about 2 hours of continuous dancing with almost all the guests.</p> +</blockquote>
A contents/articles/11.html

@@ -0,0 +1,34 @@

+----- +title: Meet some Cake(PHP) bakers! +content-type: article +timestamp: 1144767780 +tags: cakephp +----- +<p>I should write more. I noticed that I since I decided to take a break from <a href="http:www.zzine.org">zZine Magazine</a> I more or less stopped writing &#8211; and started <em>baking</em> again with <a href="http://www.cakephp.org/">CakePHP</a>. As a result I finally recoded this website and <em>refreshed</em> a little bit my almost-rusty baking skills.</p> +<p style="float:left;"><img src="/img/pictures/cakephp.png" alt="" /></p> +<p>Why not taking advantage of this and write more about CakePHP then? After all, my last <a href="/articles/view/cakephp/">article</a> turned out well enough and some people even bookmarked it online on del.icio.us and ma.gnolia&#8230; Now it&#8217;s a bit out of date, I must admit: it was based on a pre-beta release of the framework, and we&#8217;re (more or less) stable now. <br /> +A lot of things changed in the Bakers Community since then! At the time the <a href="http://wiki.cakephp.org/">wiki</a> barely started and there was no <a href="http://manual.cakephp.org/">manual</a> whatsoever, only my long and perhaps <em>slightly</em> boring article describing Cake&#8217;s functionalities. Now there things are much better for newcomers: they have a continuously growing community to rely upon, both on the Google user group and on <span class="caps">IRC</span> (#cakephp on FreeNode counted 63 members today, while back in the day 20 was a big number). There are also a few people who started blogging and starting websites about CakePHP: while I was the first to write an article about Cake I was <em>the last</em> so far to start a blog :/ Oh well, nobody&#8217;s perfect!</p> +<p>The first site I came across &#8211; although not a blog really &#8211; is Graham Bird&#8217;s <a href="http://grahambird.co.uk/cake/">Cake for Beginners</a>. When someone asks me some basic questions about CakePHP I send him there because first of all they&#8217;ll find a short <span class="caps">FAQ</span> about the framework, i.e. something everybody should know before even start thinking about learning Cake. Similarly, the guy has a <a href="http://grahambird.co.uk/cake/glossary/">Glossary</a> in progress to help those souls who feel lost in Cake&#8217;s terminology. If you don&#8217;t consider yourself a total beginner anymore, the <a href="http://grahambird.co.uk/cake/tutorials/">Tutorials</a> section can be a very interesting read: I wanted to add some <span class="caps">AJAX</span> bits to my site, but the documentation about this seemed pretty scarce, so I headed to the <a href="http://grahambird.co.uk/cake/tutorials/ajax.php">Ajax Task List</a> tutorial and it really helped.</p> +<p>On the blogs front, on the other hand, <a href="http://cakebaker.42dh.com/">Cake Baker</a> seems to be the most active: I&#8217;m starting to check this one often (OK, I&#8217;d better subscribe to the <span class="caps">RSS</span> feeds, perhaps) because it seems to be <span class="caps">THE</span> best place to get the latest news about everything concerning CakePHP: The author seems to post quite frequently (there&#8217;s always a new post every 1-3 days maximum) includes short code snippets when necessary and report news when there&#8217;s anything to report.</p> +<p><a href="http://sentino.wordpress.com/">Sentino</a> is also an interesting place to learn new things about CakePHP: the only problem is that the author seems to post less frequently&#8230; the blog seems to have some sort of &#8220;milestone&#8221; schedule, publishing something when there&#8217;s something big enough to justify a post. If you want to subscribe to a less frequent blog with only the essentials about Cake, this is a good choice.</p> +<p><a href="http://rossoft.wordpress.com/">RosSoft</a> unlike the others mentioned up to now has a much more technical approach: no news about Cake or anything, just some <span class="caps">REALLY</span> useful real-world example of Cake helpers, components etc. etc., with <span class="caps">FULL</span> source code to cut and paste. Really handy if you need something specific, truly excellent for beginners to have a look at how Cake classes should be written. <br /> +Among the most interesting fully working snippets:<br /> +<a href="http://rossoft.wordpress.com/2006/03/29/ip-to-country-component-geo-location/">IP-to-country component</a> <br /> +<a href="http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/">Poor man&#8217;s cron component</a><br /> +<a href="http://rossoft.wordpress.com/2006/03/16/image-auth-component/">Image Auth &#8211; <span class="caps">CAPTCHA</span> component</a></p> +<p style="float:right;"><img src="http://xcite-online.de/spliceit/themes/SpliceIt/logo.png" alt="" /></p> +<p><a href="http://www.thinkingphp.org/">ThinkingPHP</a> is another &#8220;technical&#8221; Cake blog, with interesting code snippets and thoughts about our favourite <span class="caps">PHP</span> framework. For those who don&#8217;t know or don&#8217;t remember him (yes, like me&#8230;), he&#8217;s the author of <a href="http://xcite-online.de/spliceit/">SpliceIt!</a>&#8230; what?</p> +<blockquote> +<p>SpliceIt!&#8217;s mission is to provide a clean and light-weight code base for people who want to create complex webapps faster then ever. The things we want to provide are:<br /> + &#8211; User/Right Managment<br /> + &#8211; Theming Support<br /> + &#8211; i18n<br /> + &#8211; Url Aliasing<br /> + &#8211; and most notabily: Modularization of often used Code Segments</p> +</blockquote> +<p>i.e. something I should have checked before recoding this website. I&#8217;ll definitely keep this in mind for the next release of h3rald.com.</p> +<p style="float:left;"><img src="http://rdos.rd11.com/img/rd11/rdlogo.gif" alt="" /></p> +<p><a href="http://rd11.com/posts">Posts@ rd11</a> a.k.a. gwoo [and seth]&#8216;s blog. Moment of silence. Gwoo is CakePHP&#8217;s project manager (respect+) and one of the lead developers of CakePHP and he also actually uses Cake for his website and blog instead of WordPress :)<br /> +What can I write about him. It&#8217;s difficult. I&#8217;ll avoid all possible pseudo-religious comparisons but when I say that <em>he created CakePHP</em> I think I say it all. The code he used for his blog is part of a collection of open-source, Cake-powered tools all prefixed with rd- or Cake, available on <a href="https://cakeforge.org/projects/rdos">CakeForge</a>. I personally think that looking at his sample applications can be one of the best way to learn how to bake <em>properly</em>, and yes, I <strong>did</strong> check them out before coding this site for the second time. Demos are <a href="http://rdos.rd11.com/">online</a>.</p> +<p>That&#8217;s it. These are perhaps the most well-known bakers and/or Cake bloggers on the planet. There are certainly others, maybe even in other languages, but now I&#8217;d better stop writing now, because this is a rather long blog post. Sorry. I&#8217;m new to blogging and I just can&#8217;t help myself: especially with Cake, I need to write lenghty texts!<br /> +More to come&#8230;</p>
A contents/articles/12.html

@@ -0,0 +1,66 @@

+----- +title: Choosing the right IT job +content-type: article +timestamp: 1144928828 +tags: personal +----- +<p>The time has come. The times when I used to meander around reading stuff on the Net and writing about whatever I wanted are over. Incidentally, the world may end, <em>your</em> laptop could explode and I could knock at your door in a few minutes asking for money, imagine that!</p> +<p>Nothing of the above, alright, bad joke, but sooner or later the time to <em>start doing something</em> comes, at some point you ought to start making some real money. It&#8217;s time to settle down, my fiance&eacute; are eager to get our own independence, move to our new house (which we&#8217;re still doing up) etc. etc. Fair enough. I spent the last five months wasting my time looking for a job, a <em>proper</em> job having something to do with <acronym title="Information Technology"><span class="caps">IT</span></acronym> and finally something seems to be possible.</p> +<p><em>Either nothing or everything</em> &#8211; I may even say that: now I have to face a difficult choice between two job proposals that seem both fairly interesting. <br /> +<em>&#8220;Go wherever you can get more bucks, you nutter!&#8221;</em> &#8211; Well, there&#8217;s more to it.<br /> +Let&#8217;s examine now the two similar but yet different realities I have to choose from. Maybe you&#8217;ll never be in my situation, but I hope this can help at least those who experienced or could experience something similar someday.</p> +<p><em><strong>Working under Uncle Bill&#8217;s wing</strong></em><br /> +<img src="/img/pictures/genova.jpg" alt="" /> Not Microsoft. No, not directly at any rate. I&#8217;ve recently been contacted by a well known multi-national company which does almost anything ranging from computers, phones, electrical stuff to huge self-aware robots designed to conquer new worlds&#8230; Not quite, but let&#8217;s just say that this image contributes to give an idea of a Corporate-type reality.</p> +<p><em>Preliminaries</em><br /> +I happen to be an Italian whose English skills go a bit beyond the <em>&#8220;Hello, me Italian and like to do friendship with you&#8221;</em>, I applied in the above (un)mentioned company as <em>Software Tester</em> and got contacted twenty days afterwards about a possible position as <em>Technical Writer</em>. It makes perfect sense. Well, at any rate I was pleased and I went to the pre-selection which was something like a pre-<span class="caps">GCSE</span> English test with a bunch of &#8220;technical&#8221; questions (&#8220;What does <span class="caps">HTTP</span> mean?&#8221;&#8230;).<br /> +Thanks to our Merciful God I passed it (and thus avoided endless teasing by my British fiance&eacute;), and they wanted to have a proper interview with me today.<br /> +I went there and came back a few hours ago, and I think it wasn&#8217;t too bad, let&#8217;s say I may stand good chances but as normally happens in such companies in the end it was just something like <em>Thank you for coming, we&#8217;ll call you by the end of April</em>. Although I mentioned that I recently had some other job offer obviously they couldn&#8217;t give a damn: as any other big company, they need to interview all the possible candidates to be sure they pick the right one, and that&#8217;s fair enough.</p> +<p><em>The job</em><br /> +In the remote eventuality they decide to take me on board, I&#8217;d be part of a Documentation Team in charge of writing technical documents, manuals and silly jokes &#8211; perhaps &#8211; about some semi-classified huge internal semi-intelligent corporate framework. <br /> +Now, although some people may already start to feel bored even at thinking about a job like that, I think this role would fit me perfectly. I love writing. I love researching. I love crating documentations, howtos, reports and any other boring (for other people) stuff! And they want me to write in English, not in Italian, which is &#8211; it may sound weird &#8211; a true relief for me. <br /> +At the interview I had a chance to talk about my <a href="/articles/">articles</a> and they seemed interested in this activity of mine&#8230; I even mentioned my <a href="/articles/view/cakephp/">CakePHP article</a> and they say they&#8217;re gonna check it out. Oh well, this site&#8217;s stats are always one Firefox tab away from my current main browsing tab, so you can bet I&#8217;ll be tracking that.</p> +<p><em>The contract and the salary</em><br /> +<em>Classified</em>. They didn&#8217;t say anything, as usual, but presumably it should be a permanent (or semi-permanent) contract with all the contributions, health insurance, taxes etc. paid. And free cookies. Yum!<br /> +Salary&#8230; well, it shouldn&#8217;t be too bad, anyway.</p> +<p><em>PROs</em></p> +<ul> + <li>I&#8217;ll be doing something I really enjoy: writing in English</li> + <li>Steady job, steady contract, more security</li> + <li>Corporare Environment</li> + <li>I can show off with my friends who are still studying pointless stuff and tell them I&#8217;m working for <company name removed></li> +</ul> +<p><em>CONs</em></p> +<ul> + <li>There&#8217;s a risk I&#8217;ll lose my individuality</li> + <li>The salary could be lower than expected &#8211; at least initially</li> + <li>They&#8217;ll get back to me at the end of this month, and I have to give an answer to someone else before that</li> + <li>My friends and fiance&eacute; will probably hassle me to give them free goodies they think I&#8217;ll get from the company</li> +</ul> +<p><em><strong>Working in a &#8216;cool place&#8217;, and fly high</strong></em> <br /> +<img src="/img/pictures/lambruschini.jpg" alt="" /> Nope, sorry, the <a href="http://www.cakefoundation.org/">Cake Software Foundation</a> unfortunately is not hiring. The alternative is a small company in my city, Genoa, which recently merged with a slightly bigger company based in Milan, which <em>might</em> merge with a big national company involved in producing some successful (here in Italy and even abroad, a little bit) TV programs. Network involved are Italy&#8217;s national channels, good ol&#8217; pal Berlusconi&#8217;s channels, Sky Italy and (drums) <span class="caps">MTV</span>.<br /> +Cool, innit? What do they do? Well, interaction between mobile phones and TV through software and networks. Polls, <span class="caps">SMS</span> chat services, <span class="caps">WAP</span> application downloads, &#8220;take matey out of Big Brother&#8217;s house&#8221;, <span class="caps">SMS</span>/<span class="caps">MMS</span> blind dates related to some well known TV programs, tele-voting at Sanremo Festival etc. etc.</p> +<p><em>Preliminaries</em> <br /> +Their first interview was the most unusual I&#8217;ve ever had, and I <a href="/blog/view/9/">already wrote</a> about it: they even asked me to solve a riddle. Then they wanted to meet me again and showed me how they work in two different areas (see next section). They are really chilled out, friendly, they seem alright, even the main boss who deals with the company&#8217;s financial side, which is always a plus. <br /> +By the way, they already offered me the job, and I&#8217;ll have to give an answer next Tuesday &#8211; that&#8217;s the bad part.</p> +<p><em>The Job</em><br /> +The Lead Developer of the company apparently seemed satisfied enough with my knowledge and Java skills. A first possibility for mewould be working for them as full-time Java Developer. Coding. Wake up, go to work, Code for eight hours, go home, sleep/other things, wake up, go to work&#8230;<br /> +It would be a good experience, and other people would choose this immediately over anything else. Coding what? Parsing algorythms for the <span class="caps">SMS</span> we receive, data manipulation, storage, re-formatting etc. etc.<br /> +The other possibility which they suggested after noticing my ability to write and research would be 2nd Level Help Desk. Get dozens of technical emails every day, file reports, notify developers when something goes wrong, propose solutions, implement solutions, monitor the systems and even execute queries on the production server on the fly, in real time (eeek!). <br /> +This could sound boring/annoying/scary but since I&#8217;m a freak I think it&#8217;s an interesting prospective. Perhaps not as qualifying as being a Java Developer, perhaps not.</p> +<p><em>The contract and the salary</em><br /> +1200-1250 (or more) &euro;/month, after tax. Which in my country is considered a more-than-reasonable pay, especially for a first job. Differnt form of contract, from consultant-with-<span class="caps">VAT</span> to renewable yearly projects, which is probably what I&#8217;d go for. Contributions/taxes paid, kind of, holidays and other vacancies included, kind of.</p> +<p><em>PROs</em></p> +<ul> + <li>Perhaps better salary</li> + <li>I know exactly what they offer, they told me their offer in detail</li> + <li>Chilled out environment</li> + <li>Perhaps I can sneak and read my desperate friends&#8217; <span class="caps">SMS</span> when they try to pull birds</li> +</ul> +<p><em>CONs</em></p> +<ul> + <li>Less steady contract, less security</li> + <li>I&#8217;ll hardly ever use my English skills, perhaps</li> + <li>They <span class="caps">NEED</span> a yes or no by next tuesday</li> + <li>My friends will probably hassle me to spy on other people&#8217;s <span class="caps">SMS</span> traffic and/or make them win TV contests</li> +</ul> +<p>Here&#8217;s where I stand. I can&#8217;t complain, alright, but I must choose and act carefully. I&#8217;ll sleep on it.</p>
A contents/articles/13.html

@@ -0,0 +1,13 @@

+----- +title: Baking a new CakeArticle +content-type: article +timestamp: 1144938060 +tags: cakephp|writing +----- +<p>Too right. Enough being a lazy writer, it&#8217;s time to seriously produce something. I could sit here and pretend that long blog posts can make up for the lack of new articles, but I&#8217;d like to write something <em>proper</em> and new. Judging by the latest stats people come here hoping to find either a blog <em>entirely</em> devoted to CakePHP or some CakePHP related content. Well, actually they can <a href="/tags/CakePHP/">find</a> quite a bit, but I&#8217;d like to be able to sport more Cake-related articles, bookmarks, and posts. My main problem is that I could add ten bookmarks about Cake right away, but the <em>latest addition</em> showed on the front page would feature only bookmarks, which would be bad (yes, I do worry about silly things). At the moment this blog is the second easiest way to provide fresh content frequently enough to encourage visitors to come back, but articles could be even better.</p> +<p style="float:left;"><img src="/img/pictures/baking_bear.png" alt="" /></p> +<p>Without further ado, I hereby announce that <em>I am working on some new articles on CakePHP</em>, at least one. I&#8217;d like to write something technical about CakePHP&#8217;s advanced features, because that&#8217;s where the current documentation is lacking, at the moment: associations, caching, some advanced components&#8230; they are topics which seem to interest those bakers who already baked their first cake and are now looking for some more icing.</p> +<p>Interested? Good! Sadly, that&#8217;s not what I&#8217;m going to write now, at least not the first article I&#8217;ll be releasing. Please stop calling me names, there&#8217;s no need to say that I&#8217;m just a lazy coward who doesn&#8217;t want to get his hands dirty and write some tough stuff. And stop pulling those sad faces! Think about&#8230; new bakers. There are new people learning about Cake and I know there are, I just discovered <a href="http://www.480x.com/2006/04/12/eureka/">one</a> yesterday almost by chance: he seems to be really enthusiastic about Cake, judging by his <a href="http://www.480x.com/2006/04/13/eureka-part-deux/">latest post</a> (OK, nevermind the pic).<br /> +Those people are mostly more-or-less experienced <span class="caps">PHP</span> programmers who want to find an answer to all their development problems and annoyance. Well, my good friends, the answer lies in Cake. Cake can save us all and bestow powerful blessings of Good <span class="caps">PHP</span> Design and Well-structured Programming upon our messy spaghetti code!</p> +<p>I almost considered writing a humorous article about Cake, but luckily I changed my mind. My old <a href="/articles/view/cakephp/">CakePHP article</a> is already a few months old and was written when Cake was in pre-beta. I feel it&#8217;s time for a more up-to-date howto and introduction to our framework, something maybe not as lenghty but easily readable by almost anyone interested in starting to learn about Cake.</p> +<p>Baking lessons. Yes, that&#8217;s it. I&#8217;m currently writing an article divided in ten lessons which could potentially turn casual cowboy coders into (apprentice) bakers. That could be easy for those already enlightened by <acronym title="Object Oriented Programming"><span class="caps">OOP</span></acronym> and <acronym title="Model-View-Controller"><span class="caps">MVC</span></acronym>, and perhaps more difficult for others: at any rate, I&#8217;ll try my best.</p>
A contents/articles/14.html

@@ -0,0 +1,40 @@

+----- +title: CakePHP hybrids +content-type: article +timestamp: 1145001300 +tags: cakephp|webdevelopment|php +----- +<p>When I first talked to gwoo, CakePHP&#8217;s project manager, I asked him if Cake had any potential <em>limitations</em>. I asked him &#8211; I was kidding actually &#8211; wether it would be possible to build an application like Gmail using the framework and he &#8211; very seriously &#8211; simply said <em>&#8220;yes, why not?&#8221;</em>. <br /> +I repeat myself when I say that CakePHP leaves plenty of freedom to developers within the bounds of its <span class="caps">MVC</span> structure: once you grasp the basic logic behind it, your possibilities are endless. I don&#8217;t want to act as a Ruby on Rails fanatic and boast that <em>you can do anything with CakePHP</em> and things like that, but I can certainly say that CakePHP can be <em>extended</em> and <em>integrated</em> with other collections of scripts, frameworks and projects. With limitations, of course: you probably don&#8217;t want to force an integration between CakePHP and another <span class="caps">MVC</span>/Event Driven/Whatever framework, simply because it would be rather pointless and potential conflicts may occur.</p> +<p>What I keep finding online is other open source projects adopting CakePHP as <em>backend</em> and <em>structure</em>. I&#8217;m sure there are many examples which could be mentioned here, but I chose two in particular: one has been around for a few months and the other is just born.</p> +<p style="float:left;"><img src="/img/pictures/amfphp.jpg" alt="" /></p> +<p><a href="http://amfphp.org/"><span class="caps">AMFPHP</span></a> is quite an interesting project:</p> +<blockquote> +<p>&#8220;[it] is an open-source Flash Remoting gateway. It&#8217;s fast, reliable, 100% free and open-source. Flash Remoting is a technology built into the Flash player core that enables sending data between the server and the client seemlessly.&#8221;</p> +</blockquote> +<p>In other words, it makes lifes much easier for developers who&#8217;d like to integrate their flash animations and script more tightly into their <span class="caps">PHP</span> application. If you are curious to see some results, head off to <span class="caps">AMFPHP</span> <a href="http://amfphp.org/showcase.html">showcase</a>.<br /> +Cool, but what has this project to do with CakePHP? Well, gwoo recently created <a href="http://cakeforge.org/projects/cakeamfphp/">CakeAMFPHP</a>, a CakeForge project which just yesterday reached its <a href="http://rd11.com/posts/view/21">0.4.0 release</a>, and it&#8217;s fully compatible with <span class="caps">AMFPHP</span> 1.2.3 and CakePHP 0.10 final.<br /> +Here&#8217;s an excerpt taken from CakeAMFPHP <span class="caps">README</span>.txt file:</p> +<blockquote> +<p>&#8220;[&#8230;] <br /> +1) get CakePHP 0.10 final (http://cakephp.org)<br /> +2) get amfphp 1.2.3 (http://amfphp.org)<br /> +3) get the <span class="caps">UFO</span> js http://www.bobbyvandersluis.com/ufo/<br /> +4) put amfphp into /app/vendors<br /> +5) put cakeamfphp into vendors<br /> +6) put the cake_gateway.php in /app/webroot<br /> +7) put the cakeamfphp.php in /app/views/helpers<br /> +8) put CakeMySqlAdpater.php in /app/vendors/amfphp-core/adapters<br /> +9) Voila: NetServices.setDefaultGatewayUrl( &#8216;http://localhost/cake_install/cake_gateway.php&#8217;);<br /> +Access the service browser through<br /> +http://localhost/cake_install/vendors/cakeamfphp/cakebrowser/&#8221;</p> +</blockquote> +<p>The installation doesn&#8217;t seem too painful at all. And &#8211; guess what &#8211; gwoo recently updated a very informative tutorial showing how to create a simple &#8211; but still impressive &#8211; bullettin board with CakeAMFPHP.</p> +<p><em>&#8220;Cool, but I never liked flash, what about <span class="caps">AJAX</span>?&#8221;</em></p> +<p style="float:left;"><img src="/img/pictures/qooxdoo.gif" alt="" /></p> +<p>CakePHP has a nice <span class="caps">AJAX</span> helper to be used in conjunction with <a href="http://prototype.conio.net/">prototype</a>, but there are truly a lot of libraries, mini-frameworks, pre-built applications to create interactive desktop-like user interfaces. Some people may already know <a href="http://qooxdoo.oss.schlund.de/">qooxdoo</a>,</p> +<blockquote> +<p>&#8220;[&#8230;] an advanced open-source JavaScript-based <span class="caps">GUI</span> toolkit. qooxdoo continues where simple <span class="caps">HTML</span> is not enough. This way qooxdoo can help you implement your <span class="caps">AJAX</span>-enhanced web 2.0 application &#8211; easier than ever before.&#8221;</p> +</blockquote> +<p>In a recent <a href="http://groups.google.com/group/cake-php/browse_thread/thread/ba219c64cd794764/1d77973293514618?lnk=raot">discussion</a> on CakePHP user group someone suggested the possibility to integrate qooxdoo with CakePHP. Apparently qooxdoo people were <a href="http://www.nabble.com/Re%3A-qooxdoo-PHP-framework-project-p3799302.html">evaluating</a> various <span class="caps">MVC</span> frameworks, and Cake was obviously listed together with two other Rails clones for <span class="caps">PHP</span>. The good news is that <a href="http://cakeforge.org/users/a100rk/">100rk</a> just started a new project called <a href="http://cakeforge.org/projects/cqx"><span class="caps">CQX</span></a>, which &#8211; although still in pre-alpha a development demo is already available, and it <em>shows off</em> most of qooxdoo&#8217;s features&#8230; <a href="http://cqx.100rk.org/trunk/">Take a look</a></p> +<p>Best of luck to 100rk and his brand new project, I really hope to see more of it soon!</p>
A contents/articles/15.html

@@ -0,0 +1,66 @@

+----- +title: I18n +content-type: article +timestamp: 1145106900 +tags: cakephp|webdevelopment +----- +<p><em>&#8220;CakePHP will officially support Internationalization (i18n) from version 2.0&#8221;</em>. That is to say: not right now. That doesn&#8217;t mean we have to wait, no chance! I&#8217;m Italian and there are plenty of bakers speaking a language other than English who might want to develop a multi-lingual website.</p> +<p>I did, <a href="http://v60.h3rald.com/">once</a>, and the final result wasn&#8217;t too bad in the end: every page of the site (except the articles) could be translated into Italian. Before examining my solution (which is far from optimal) I&#8217;d like to mention an excellent CakePHP package which allows basic (mostly statuc) i18n.<br /> +It looks like I missed an important baker in my recent <a href="/blog/view/11">blog post</a>: <a href="http://www.noswad.me.uk/">Andy Dawson</a>, creator &#8211; among other things &#8211; of the <a href="http://cakeforge.org/snippet/detail.php?type=package&amp;id=2">Locale Package</a>, available at CakeForge. His solution actually came out after H3RALD.com v60 was already developed so I didn&#8217;t use it for my own site.<br /> +At a first glance Andy&#8217;s solution truly solves basic l18n problems in an elegant way: the most important code snippet is the <a href="http://cakeforge.org/snippet/download.php?type=snippet&amp;id=74">Locale Component</a> which provides the following functionalities:</p> +<ul> + <li>automatic language detection based on browser&#8217;s UserAgent string</li> + <li>loading of locale files</li> + <li>setting of customizeable (translated) messages</li> +</ul> +<p>The getString() method provided in the locale component is actually used through the double underscore function, which is already defined (but not yet implemented) in the standard CakePHP file <code>cake/basics.php</code> (yes, this is a small core hack). Andy&#8217;s double underscore function can take five parameters:</p> +<pre><code>function __($msgId, $MessageArgs=NULL, $capitalize=1, $punctuate=0,$Code=NULL) +{ + require_once(COMPONENTS.'locale.php'); + $Locale = LocaleComponent::getInstance(); + return $Locale-&gt;getString( $msgId, $MessageArgs, $capitalize, $punctuate, $Code ); +}</code></pre> +<p>These parameters are:</p> +<ul> + <li>a &#8220;message id&#8221; or the message itself</li> + <li>some parameters which can be passed to the message</li> + <li>the message&#8217;s capitalization: + <ul> + <li>0 = no change</li> + <li>1 = first letter of first word</li> + <li>2 = fist character of all words</li> + </ul></li> + <li>the message&#8217;s punctuation: + <ul> + <li>0 = &quot;&quot;</li> + <li>1 = .</li> + <li>2 = !</li> + <li>3 = ?</li> + </ul></li> + <li>the language code, if you need to override your page&#8217;s language</li> +</ul> +<p>This is a convenient method which can be used everywhere, both in your controllers and in your views, to translate simple pre-stored messages. Where are those messages stored? In various locale files which must be placed in <code>app/controllers/components/messages/</code> and look like this:</p> +<pre><code> $messages = Array ( + 'LocaleSetTo'=&gt;"Site locale set to UK English", + 'LocaleChangeTo'=&gt;"Change site locale to UK English", + // Time related messages + 'ago' =&gt; "%s ago", + 'ages' =&gt; "a long time ago (%s)", +)</code></pre> +<p>The locale package also comes with a <em>Language Controller</em> you can use to handle language changes, and a useful rewrite of the <em>Time Helper_. Andy recently updated his <a href="http://wiki.cakephp.org/tutorials:i18n">i18n tutorial</a> available on CakePHP Wiki, a very interesting read on how to quickly add i18n support to yout first Cake blog (yes, the one described in the <a href="http://wiki.cakephp.org/tutorials:blog_tutorial">Blog Tutorial</a>_-</em>1).</p> +<p>So far so good. The Locale Package provide some basic multi-lingual support in an efficient way, and I&#8217;d certainly use it if I decide to (re-)develop a multi-lingual site, but unfortunately this does not fully solve the problem.<br /> +If you want <strong>full</strong> i18n, for sure you&#8217;d like to have all the contents of your website translated, which is &#8211; normally &#8211; dynamic and maybe stored in a database. That was the case of my old website: all the pages are dynamic, not static, so I had to think about something else. <br /> +Since I only had plans to develop a <em>dual</em> language site, I opted for a very lazy (but yet effective) solution: each table &#8211; more or less &#8211; had &#8220;duplicate&#8221; fields, something like this:</p> +<ul> + <li>id</li> + <li>title_en</li> + <li>title_it</li> + <li>text_en</li> + <li>text_it</li> + <li>created</li> + <li>modified</li> +</ul> +<p>I basically defined a global $lang variable set to &#8220;en&#8221; by default and then I accessed the record&#8217;s fields (for example in views) like this:</p> +<p><code>echo $data['Project']['text_'.$lang]</code></p> +<p>Ugly, perhaps, but did the job. The good (or bad) thing about this technique was that I could modify the contents of a project, for example, regardless of the current language: in my add/edit view, I chose to generate <em>all</em> the fields of a table and therefore modify all the fields of a project without switching to the other language.</p> +<p>How will Cake support locales? Will we have &#8220;localized&#8221; database tables (and models?) Only time will tell&#8230;</p>
A contents/articles/16.html

@@ -0,0 +1,19 @@

+----- +title: Databases supported by CakePHP +content-type: article +timestamp: 1145251800 +tags: cakephp|webdevelopment|databases +----- +<p>One of the most recurring questions on CakePHP User Group is probably <em>&#8220;Does Cake support X database?&#8221;</em>. Sure, most of us tend to use just MySQL for our websites and applications, but in certain situations some more <em>exotic</em> database support makes the difference. A partial answer to the question above could be <em>&#8220;Yes, probably, at least partially&#8221;</em>: CakePHP offers support for some database &#8220;natively&#8221; (i.e. Cake folks made some <em>ad hoc</em> database drivers), others through either <a href="http://adodb.sourceforge.net/">ADOdb</a> or <a href="http://pear.php.net/package/DB"><span class="caps">PEAR</span>::DB</a>.</p> +<p>CakePHP seems to use a <em>multiple level</em> database abstraction: in other words, popular abstraction layers like ADOdb or <span class="caps">PEAR</span>::DB have been wrapped in a &#8220;driver&#8221; which basically extends the DboSource class (which is the most high level database abstraction). Some people don&#8217;t like the idea, because this means that the could be some performance issues, for one, and also that inevitably not <em>all</em> features offered by either ADOdb or <span class="caps">PEAR</span>::DB are used. In my very, very, very modest opinion (I&#8217;m not an expert on this matter), this solution focus on achieving good database compatibility leaving the doors open for further tinkering, if needed.</p> +<p style="float:left;"><img src="/img/pictures/postgres.png" alt="" /></p> +<p>Having said this, yes, the possibilities are good that your favorite database is supported by CakePHP, more or less. Of course, as repeatedly pointed out by some CakePHP core developers, Cake dev team didn&#8217;t and is not going to test <em>every</em> database with Cake, using either of the two abstraction layers, but users are more than welcome to do so.</p> +<p>Let&#8217;s now have a look at what is <em>known to work</em> with Cake:</p> +<p><strong>MySQL</strong> works fine, and is currently recommended as <em>preferred</em> database solution. What about <strong>MySQLi</strong>? Well, thanks to mappleJoe there&#8217;s a (PHP5 only!) <a href="http://cakephp.org/pastes/show/770e73e77e4d7a3d32c2f3de3f175512">driver</a> ready to be used.</p> +*PostgreSQL*&#8217;s support is continuously improving. Something may work, something may not: the good news is that the folks who are using it are <a href="http://groups.google.com/group/cake-php/browse_thread/thread/85a29ab6ec6826a0/8eecea26ba53e1fd?q=postgres&amp;rnum=1#8eecea26ba53e1fd">sharing their thoughts</a> with the rest of us. +<p style="float:right;"><img src="/img/pictures/sqlite.gif" alt="" /></p> +<p><strong>SQLite</strong> is supported natively, or so it seems&#8230; what about the newest SQLite3? Yes, probably: there&#8217;s a quick <a href="http://www.thompsonlife.net/index.php?section=9">howto</a> on ThompsonLife.net to make it work through the dbo_pear driver.</p> +<p><strong>Access</strong> works through the ADOdb driver, as reported in CakePHP <a href="http://wiki.cakephp.org/docs:databases">wiki</a> (thanks ivanp).</p> +<p><a href="http://www.filemaker.com/">FileMaker</a> is getting there: things aren&#8217;t that easy, but bdb is doing <a href="http://groups.google.com/group/cake-php/browse_thread/thread/572d8dd2ba4cbdf7/dca851c795247c0b?q=database&amp;rnum=2#dca851c795247c0b">all his best</a> to make it work, good luck!</p> +<p>Neil Fincham was also trying to develop a custom driver to support <a href="http://www.pervasive.com/">Pervasive</a> through a <a href="http://www.unixodbc.org/">unixODBC</a> driver. Best of luck!</p> +<p>For other databases, check ADOdb&#8217;s <a href="http://phplens.com/adodb/supported.databases.html">list of supported databases</a> and use the <code>dbo-adodb</code> driver, or use <span class="caps">PEAR</span>::DB (for fbsql, ibase, informix, msql, mssql, mysql, mysqli, oci8, odbc, pgsql,sqlite and sybase) using the <code>dbo-pear</code> driver.</p>
A contents/articles/17.html

@@ -0,0 +1,16 @@

+----- +title: New CakePHP Manual (with associations!) +content-type: article +timestamp: 1145342820 +tags: cakephp +----- +<p>Gustavo Carreno just <a href="http://groups.google.com/group/cake-php/browse_thread/thread/4e13231cc383b9bb/6414184c1058fadb#6414184c1058fadb">announced</a> a new release of the <a href="http://cakeforge.org/frs/?group_id=53&amp;release_id=82">CakePHP Offline Manual</a>. Personally I was extremely happy to download this new release because it finally contains documentation and howtos related to CakePHP&#8217;s Model Associations, which is perhaps one of the most used <em>advanced</em> CakePHP features.<br /> +So I&#8217;ll have no excuses not to learn how to use them, great&#8230;</p> +<p>The manual is available in the following formats:</p> +<ul> + <li>Windows compressed <span class="caps">HTML</span> (.chm)</li> + <li><span class="caps">PDF</span></li> + <li><span class="caps">HTML</span> (multiple pages or single page)</li> +</ul> +<p>Furthermore, the CakePHP <span class="caps">API</span> is also available for download in .chm format, thanks to Mladen Mihajlovic.</p> +<p>Well done guys. Really useful for people like me who are on dialup sometimes :)</p>
A contents/articles/18.html

@@ -0,0 +1,69 @@

+----- +title: Textiling +content-type: article +timestamp: 1145605143 +tags: writing +----- +<p>Once upon a time I used <a href="http://en.wikipedia.org/wiki/BBCode">BBcode</a>. <a href="/bookmarks/view/cyberarmy">CyberArmy</a> and all its affiliated sites adopted it as <em>de-facto</em> standard for forums and articles, so consequently more or less all my articles are bbcoded. <br /> +I could copy and paste the <em>BBcodeHelper</em> I coded for this site, and it could be quite an interesting read for some people&#8230; well, tough luck: today I&#8217;d like to talk about <a href="/bookmarks/view/textile-reference/">Textile</a> instead, which now I consider <em>the answer</em> to all text formatting problems.</p> +<p>If what I wrote up to here doesn&#8217;t make sense to you, I&#8217;m rambling about the apparent necessity and the undeniable need of web developers, content managers, and writers to use something else other than <span class="caps">HTML</span> for adding style and formatting text. What&#8217;s wrong with <span class="caps">HTML</span>? Nothing, it&#8217;s just too &#8220;tiresome&#8221; to use: you have to remember to close all tags, break lines, use the <code>&lt;strong&gt;</code> tag every time you want <strong>bold text</strong>, etc. etc.<br /> +Some people even freak out when you tell them that they have to use <span class="caps">HTML</span> in their text: &#8220;it&#8217;s just <em>waaaaaay too difficult</em> to learn and use&#8221; &#8230;things like that.</p> +<p>Whether you are scared to learn <span class="caps">HTML</span>, you don&#8217;t want to, or you know it but you&#8217;re too lazy to seriously thinking about manually use a markup language to write your article, I can say that you&#8217;ll definitely become addicted to Textile. What? <em>&#8220;<acronym title="What You See is What You Get"><span class="caps">WYSIWYG</span></acronym> <span class="caps">HTML</span> editors?&#8221;</em> &#8211; C&#8217;mon, let&#8217;s at least <em>try</em> to be serious :)<br /> +Why BBcode doesn&#8217;t help enough? Well, simply because I don&#8217;t see why <code>[i]this[/i]</code> is easier than <code>&lt;i&gt;this&lt;/i&gt;</code>: unless you have a particular phobia for angular brackets, it seems quite similar to me!</p> +<p>What about <code>_this_</code> instead? You use only two additional characters instead of seven. <span class="caps">SEVEN</span>. If I only want italcized text I honestly can&#8217;t imagine myself using more than two extra characters. It&#8217;s natural. It&#8217;s human.</p> +<p style="float:left;"><img src="/img/pictures/pear2.gif" alt="" /></p> +Precisely. Textile is a <em>&#8220;Humane web text generator&#8482;&#8221;</em>, it&#8217;s simple, elegant and produces standard compliant <span class="caps">XHTML</span> code. <a href="http://www.textism.com/about/">Dean Allen</a> should be worshipped by entire generations of web developers for inventing something so easy to use and so <em>elegant</em> at the same time. Maybe not worshipped, but for sure respected. +<p>I won&#8217;t copy and paste the extremely useful <a href="http://cakeforge.org/projects/textilehelper/">TextileHelper</a> for CakePHP either, simply because it&#8217;s 4085 lines long and it would be pointless: you can just get it and use it.</p> +<p>I&#8217;ll just include some examples of textile formatting&#8230;</p> +<table> + <tr> + <td> <strong>Textile Code</strong> </td> + <td> <strong>Result</strong> </td> + </tr> + <tr> + <td> <code>*text*</code> </td> + <td> <strong>bold</strong> text </td> + </tr> + <tr> + <td> <code>_text_</code> </td> + <td> <em>italicized</em> text </td> + </tr> + <tr> + <td> <code>@text@</code> </td> + <td> <code>fixed width</code> text</td> + </tr> + <tr> + <td> <code>"text":url</code> </td> + <td> <a href="/">linked</a> text </td> + </tr> + <tr> + <td> <code>!path/to/image!</code> </td> + <td> image </td> + </tr> +</table> +<p>These are just some trivial examples. With textile you can also format text blocks, add custom <span class="caps">CSS</span> code and even float images or text! Tables? Sure, how do you think I created the table above?</p> +<pre><code> +| *Textile Code* | *Result* | +| @*text*@ | *bold* text | +| @_text_@ | _italicized_ text | +| &lt;code&gt;@text@&lt;code&gt;| @fixed width@ text| +| @"text":url@ | "linked":/ text | +| @!path/to/image!@ | image | +</code></pre> +<p>The simplest and most intuitive way possible!</p> +<p>Regardless, Textile is not perfect and may have some quirks, at least the CakePHP helper: the_undefined pointed out in a <a href="http://www.thinkingphp.org/2006/03/22/textile-a-personal-love-of-mine/">blog post</a> that external links are opened in the same window, so he provided a patch to the textile helper to handle this situation.<br /> +I also noticed that sometimes empty <code>style=""</code> and <code>class=""</code> attributed are generated, which don&#8217;t do any particular harm, but they are not needed either&#8230; so here&#8217;s a quick fix to improve your Textile experience in CakePHP: You can use this function ideally in your customized textile helper, <code>$data</code> should be the return value of TextileHelper&#8217;s <code>process()</code> method.</p> +<pre><code> +function _fixTextile($data) +{ + $patterns = array( '//', + '/style=""/', + '/class=""/', + '/ &gt;/'); + $replaces = array($this-&gt;base, + '', + '', + '&gt;'); + return preg_replace($patterns, $replaces, $data); +} +</code></pre>
A contents/articles/20.html

@@ -0,0 +1,55 @@

+----- +title: In memory of Vittorio Cevasco (1916-2006) +content-type: article +timestamp: 1146022560 +tags: personal +----- +<p>Yesterday my grandpa passed away, due to an aggravation of his health condition, breathing problems and various other complications. He died in hospital, on Liberation Day, the Italian national holiday celebrating the liberation of our country from the nazi-fascist regime by the Allied troops and partisans on April 25th 1945. He died exactly 61 years after that day.</p> +<p>I&#8217;d like to remember my grandpa today, because he most certainly deserves it, as he was a really extraordinary person.</p> +<p><em>&#8220;Yes, I&#8217;m sure he was, isn&#8217;t everybody extraordinary in some way?&#8221;</em></p> +<p>Definitely: everybody is special, and people tend to say that especially when someone passes away. In my grandpa&#8217;s case, actually I can say that in a slightly more absolute sense: his life was truly uncommon and very active.</p> +<p><strong>A very active life</strong></p> +<p style="float:left;"><img src="/img/pictures/grandpa.jpg" alt="" /></p> +<p>Vittorio Cevasco, my grandfather, was certainly the most active member of my family. We&#8217;re talking about a man who was still able to drive a car up to last September (he was nearly 90 years old), and used to drive 500 Km on the motorway and mountain roads every year to go on vacation: he went to the same place, Mals Vinschgau, near the Italian-Austrian-Swiss border for over fifty years. He never had particular troubles to walk, and just in the past months started using a walking stick&#8230; before that he used to walk around the city by himself everyday, in his endless meanderings. He always had something to do: visit friends, go to public offices, go to our house in the countryside &#8211; he still used to cultivate the land with potatoes, tomatoes and basil as a hobby until a few months ago &#8211; and so on: he was really a busy man.<br /> +I can certainly say that I never though he was really old until after his wife, my grandma, died, about a year ago. Since then he really aged, and quickly, as she probably was one of the main reasons of his existance.</p> +<p>When he was &#8220;young&#8221; (i.e. less than 80) he used to <em>compete</em> with the lift in his flat running down the stairs. Everyone else was taking the lift, but he always chose to go on foot down the stairs, to keep in exercise. His other exercise was cultivating our land in Sessarego, near Bogliasco (Genoa, Italy), as a hobby more than anything, providing us with fresh <em>biological</em> products like that extraordinary basil essential to make our very tasty local <a href="http://www.pesto.net/eng/index.php">pesto sauce</a>.<br /> +He always tried to convince me to do some work there, and he actually taught me various tips and secrets which will hopefully be useful in near future. Sadly, when he was alive I wasn&#8217;t too keen on the idea of cultivating and maintain our land from time to time&#8230; but I kind of changed my mind recently, and I know he realized that just a few days before he died.</p> +<p>After <span class="caps">WWII</span> he did various things, he even was erhm&#8230; somehow active in <em>certain international import/export activities</em> of watches from Switzerland to Italy &#8211; quite a common thing back in the day, especially considering that the border was at just a few hours drive.<br /> +Later on he became an estate agent, working for a local office and then helping out some friends running their activity. In 2001 he hit his own personal record selling a fancy villa worth one billion of the old Italian Lire &#8211; which convert to approx. 500,000 Euro, but at the time it was much bigger money than that. With the commission generated by that sale he bought a brand new Ford Fiesta: he was 85 years old.</p> +<p>But no, these are not the most extraordinary episodes of his life of course. He could fly &#8211; literally.</p> +<p>He was one of the first man in Italy and the the first in Genoa area to get a flying license, back in 1934. A news which made the local papers at the time, and we still have that article somewhere. He wanted to become a civil pilot, but he never did: the Country needed him to protect our sky, when Italy joined the War in 1941.</p> +<p><strong>The Aviator</strong></p> +<p style="float:left;"><img src="/img/pictures/sessarego.jpg" alt="" /></p> +<p>My grandpa lived the early years of his youth in the village of Sessarego, where my great-grandfather bought an old house, after taking part in <a href="http://www.italian-american.com/garib-it.htm&#39;s">Giuseppe Garibaldi</a> expedition at Marsala (1860) fighting for the Italian independence (he&#8217;s listed among <a href="http://www.italian-american.com/garibal.htm">the ones</a> who actually landed there).<br /> +There his parents used to have a few cows and produce milk, and one of his tasks was milking delivery&#8230; no scooters or cars, at the time, of course, and certainly not for a teenager like him: he often had to carry the milk barrels up and down the hill <em>on foot</em>, and I&#8217;m talking about 1-2 Km with at least 30-40 kilos on your shoulders!</p> +<p>But my grandpa&#8217;s plans were much different: he wanted to fly away, and high &#8211; literally. You can imagine the face of my grand-grandfather when he expressed his wish to become a pilot! Nobody ever did that, in the area, and becoming a pilot was, at the time, like becoming an astronaut in the seventies.<br /> +The price of the license was really high at the time, 1,200 Lire. That would be like at least 30,000 Euro now, especially considering that his parents weren&#8217;t exactly rich. In the very end, my father supported him and provided as much money as he could afford: 1000 Lire.<br /> +But he still needed 200 Lire, so after hassling the flying instructors he signed an agreement stating that if they anticipated him the money he&#8217;d have paid them back once he started working: it was clear in fact that he&#8217;d have became a military pilot, as the Regime needed people for their brand new aircrafts, and the was felt imminent.<br /> +He paid them back, eventually, after passing both the civil and military tests. He became a sergeant for the <em>Regia Aviazione</em> (Royal Airforce), with a salary of 20 Lire/month, ten of which went to the flying school, for many months, but he was still earning some very decent money.</p> +<p>One of the most peculiar things about my grandpa was his memory: he was always able to tell you the story of his life, all the events, with the same details and <em>all the exact dates</em>, on every occasion. Even when we took him to the hospital, a few weeks ago, when we asked the nurse if he was self-conscious she said: <em>&#8220;Yes&#8230; well, he was talking a few hours ago, but I don&#8217;t know if he was raving or what&#8230; he said he was a pilot, and that he used to fly at 350Km/h&#8230;&#8221;</em></p> +<p style="float:right;"><img src="/img/pictures/r2002-main.jpg" alt="" /></p> +<p>Damn right. His old <a href="http://www.comandosupremo.com/Re2002.html">Re 2002</a> was able to fly at 350 Km/h if pushed, at a standard altitude of 35,000 m, while carrying a 500Kg bomb. It was <em>his</em> plane, and he never forgot that, even a few days before he passed away. He&#8217;d tell you all the stats, the mechanics, the technical details and all the tricks to perform acrobatic maneuvers if you asked him&#8230; Not that actually anybody ever did, because <em>every</em> time something reminded him of that, even slightly, he&#8217;d start talking about the old days when he was commanding his squad patrolling the Italian borders.</p> +<p>Last year, after my grandma died and he didn&#8217;t feel like driving 500Km to go to the mountains (for the first time in his life), I had to drive his <em>Fiesta</em> myself in my first long driving journey. At first I wasn&#8217;t too sure I&#8217;d have enjoyed the drive, partly because of the long distance and partly because I was going to be alone with my grandpa for about six hours, and I was afraid of not be able to find enough topics of conversation&#8230;</p> +<p>That fear went away almost instantly right a few minutes after we started the journey.<br /> +When we got on the motorway, I started complaining that my dad was going slightly over the limit with his brand new Peugeot 307: <em>&#8220;Look, he&#8217;s already going at 140km/h and we just started the journey!&#8221;</em></p> +<p><em>&#8220;Cent&ucirc;c&auml;ranta chilumetri l&#8217;&ucirc;a&#8230; &ucirc; m&euml; aeruplannu p&ucirc;eiv&auml; f&acirc; &iuml; trex&euml;ntusinc&ucirc;anta c&ucirc;mme ninte!&#8221;</em><br /> +[140 kilometers per hour&#8230; my plane could easily do 350!]</p> +<p>He normally used to speak in <em>zeneise</em> (&#8220;Genovese&#8221;), Genoa&#8217;s dialect, mixed with some Italian <em>if he really had to</em>. That was it: if you started talking about speed, technology, engines, history or any other topic which was <em>slightly</em> related to his plane, the war, the regime etc. he always started off talking about his past and his plane, ignoring everything else. <br /> +My grandma used to get kinda annoyed about it&#8230; on every occasion, if he had a chance, he&#8217;d start talking about <em>that particular day in 193x/4x</em> and so on: we all knew that, and actually I enjoyed listening to his stories, mostly because they were genuine and authentic relics of an old and glorious past. I think in his mind he wanted us all to remember him in that way, to always keep in mind that he was a pilot and how he enjoyed it, even when he went in jail for it, even when his plane was taken down&#8230;</p> +<p style="float:left;"><img src="/img/pictures/Re2002.jpg" alt="" /></p> +<p>On that day right after he was assigned to a new base, they asked him to perform some exercises in the air, loops and all sort of acrobatics: <em>&#8220;&euml; s&ouml;lite c&ouml;se che s&euml; d&ucirc;vi&euml;iva f&auml; in t&#8217;&euml; l&#8217;avi&auml;si&ucirc;n&#8221;</em> [the usual things you had to do in the airforce].<br /> +He was just starting practicing the Re 2002 at the time, but he quickly found out that it was <em>extremely</em> maneuvrable, at least to the standards of the time: the equivalent of a top range today&#8217;s fighter.<br /> +He started off with some usual things, performing various twists in the air, loops, etc. etc. until he had to end his exhibition with a dive from an altitude of 10,000m down at maximum speed to a limit of 1500m&#8230; On that particular day a colonel from another base and some other high-ranking officer were down on the ground near the aircraft to enjoy the show, and check that everything was performed correctly. My grandpa was aware of that, so he decided to perform a great show especially for them that day: he went up to 10,000m, and then dove down accelerating, helped by gravity&#8230; he went down and down, faster and faster, people down on the ground were staring at him waiting for him to pull up the plane, but nothing, he still went down and down so that quickly the small crowd of captains and colonels got scared and run away in every direction: <em>&#8220;He&#8217;ll crash, he&#8217;ll crash!&#8221;</em> <br /> +He did not crash, not that day&#8230; he went down up to slightly less than 100m and <em>then</em> pulled up the plane: ar real wonderful <em>extreme</em> performance. Now imagine this beast of a plane coming down at 300Km/h and accelerating, making a terrible noise typical of the engines of the time and then <em>pull up suddenly</em> right above your head: one more second and he wouldn&#8217;t have been able to tell that story.<br /> +He was called by the commander of the base who told him: <em>&#8220;Cevasco, you&#8217;re hell of a skilled pilot, but now I have to put you in jail for a day for not obeying your orders of staying above 1500m&#8221;</em> &#8211; That, I reckon, was one of the best days of my grandpa&#8217;s life.</p> +<p>He was never captured, but his plane was taken down by an English <em>Spitfire</em> in the South of Italy. The war was nearly finished, and there were just those little air fights from time to time. He really risked a lot that day, and managed to attempt an emergency &#8220;landing&#8221; completely destroying his plane along as part of his jaw, which was alright after a few months. <br /> +Since then he never flew again, and managed to escape to be re-called in duty. But he did like flying back with his memories to those glorious days.</p> +<p>A few years ago my dad showed him Microsoft&#8217;s <em>&#8220;Flight Simulator 98&#8221;</em>, and some other flying games. He was amazed at the graphic, but not so satisfied with the whole <em>simulation</em> thing: not even close to reality, too damn easy.</p> +<p><em>&#8220;C&auml;u m&euml;, te v&ucirc;eive vedde t&iuml;e a f&auml; v&ucirc;l&aacute; &ucirc; m&euml; aeruplannu&#8221;</em><br /> +[My dear, I&#8217;d have liked to see you trying to fly <em>my</em> plane]</p> +<p>&#8230;and that was it: the beginning of another journey back in time.</p> +<p>He always had a very practical view of life and especially of technology. He wouldn&#8217;t take you seriously and would not be interested in knowing about programming and the Internet, unless it could produce some concrete result:</p> +<p><em>&#8220;Ti che ti st&ucirc;ddi da insegn&euml; e che ti st&euml; sempre davanti a-&ucirc; cumputer, nun te puri&euml;sci truv&auml; &ucirc;n sistemm&auml; de an&auml; in t&#8217;&euml; a banca e piggi&euml; qualche mili&ucirc;n the Euro?&#8221;</em><br /> +[You that you&#8217;re studying to become an engineer and that spend so long in front of the computer, couldn&#8217;t you find a way to get into a bank and get out some million of Euro?]</p> +<p>He&#8217;d have loved me to become a [rich] hacker, probably&#8230; But the last time I saw him, last Friday, he seemed happy enough to hear that I was just about to start working.</p> +<p>He realized that I finally found a good job after my studies, and then my dad told him Roxanne and I would have moved to the countryside, in Sessarego&#8230; He made a big effort to move the muscles of his mouth in a large smile: he was happy.</p>
A contents/articles/21.html

@@ -0,0 +1,108 @@

+----- +title: Birthday present? Web space, please... +content-type: article +timestamp: 1146142020 +tags: website|review +----- +<p>Today is my birthday! <a href="/blog/view/20/">Not too happy</a>, but still my birthday after all. What presents did I get from my relatives and friends? Well, various things, but I told my parents and uncles I actually needed some web space&#8230; <em>&#8220;What? Didn&#8217;t you have the hosting sorted out?&#8221;</em><br /> +Well, I had, up to a few days ago when my friends and hosting provider, DeWayne Lehman, decided to close down his <a href="http://www.block-house.com">company</a>. The reason being, to cut a long story short, that he can&#8217;t keep up with competition: he doesn&#8217;t have enough customers, and he can&#8217;t afford server upgrades, while other companies are literally giving space away.<br /> +That was a pity, not only because Block House used to host various non-profit orgs and initiatives, but also because the guy who run it was an excellent admin, always offering excellent support.</p> +<p>Anyhow, in the end I&#8217;ll have to transfer all five of my sites to a new host, so here we go again: <em>what&#8217;s the best hosting company?</em><br /> +Obviously it depends a lot on what you&#8217;re looking for, and here&#8217;s what I need:</p> +<ul> + <li>At least 4GB of space</li> + <li>At least 30GB/month bandwidth</li> + <li><span class="caps">PHP</span> of course, but also other languages like Perl, Python and Ruby (+ Rails support)</li> + <li>MySQL databases&#8230; at least 10-20</li> + <li>Be able to host 5-6 sites minimum</li> + <li>Subdomains allowed (10 in total?)</li> + <li><span class="caps">FTP</span> <em>and <span class="caps">SSH</span></em> access</li> + <li>Subversion, if possible</li> +</ul> +<p>All this for less than 10$/month, ideally 5$, on shared hosting. I already made my choice and if you&#8217;re reading this post it means everything worked fine, but anyway, let&#8217;s have a look at what the market can offer for my needs. I only went for US-based hosts: Italian hosts are terrible and US hosts are normally more reliable and cheaper.</p> +<p style="float:left;"><img src="/img/pictures/dreamhost.gif" alt="" /></p> +<p>The first hosting company I was tempted by was <a href="http://www.dreamhost.com">DreamHost</a>. They can literally sell you anything but their mother, at stupidly cheap rates for what you get (apparently):</p> +<ul> + <li>20GB of space</li> + <li>1TB (!) bandwidth</li> + <li>PHP4, PHP5 Perl, Python and Ruby + RoR support</li> + <li>Unlimited databases</li> + <li>Unlimited hosted domains</li> + <li>Unlimited hosted subdomains</li> + <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li> + <li>Subversion and <span class="caps">CVS</span></li> + <li>&#8230;and more</li> +</ul> +<p>For 7.95 if you pay two years in advance. And the first time you can get up to 97$ off by using one of the thousands referrer&#8217;s coupons available on the net. OK, where&#8217;s the catch? Well, there&#8217;s a <a href="http://futurosity.com/231/why-dreamhost-sucks">bad review</a> about them which points out that their reliability is not too great, for example, and that the seem to be rather dodgy in general. &#8220;They are overselling, they&#8217;ll soon enforce <span class="caps">CPU</span> restrictions&#8221; etc. etc. <br /> +<em>&#8230;let&#8217;s move along</em></p> +<p style="float:right;"><img src="/img/pictures/rails.gif" alt="" /></p> +<p>I might try out Ruby on Rails someday, so perhaps I thought it would be wise to choose a host supporting it, for a change. The first Rails friendly I thought about was <a href="http://www.railsplayground.org">RailsPlayground</a>, which started off as <span class="caps">FREE</span> Rails host and then ended up offering interesting commercial hosting plans. They are not bad, and I&#8217;d have probably gone with them if I had only one site to manage: for 60$ a year you get:</p> +<ul> + <li>3GB of space</li> + <li>30GB bandwidth</li> + <li>PHP4, PHP5 Perl, Python and Ruby + RoR support</li> + <li>Unlimited databases</li> + <li>Unlimited add-on domains</li> + <li>Unlimited hosted subdomains</li> + <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li> + <li>Subversion and <span class="caps">CVS</span></li> + <li>&#8230;and more</li> +</ul> +<p>Well, the only reason why I didn&#8217;t go with them was that I did slightly more space, only that. The plan for 5GB of space costs 11$/month, which was too expensive for my liking.</p> +<p style="float:left;"><img src="/img/pictures/textdrive.gif" alt="" /></p> +<p>Since we&#8217;re talking about Rails, why not <a href="http://www.textdrive.com">Textdrive</a>? Founded by 200 IT professional, hosts high quality sites, it&#8217;s the official Rails host&#8230; An &#8220;elite&#8221; solution, here&#8217;s what you get:</p> +<ul> + <li>Use Apache and Lighttpd web servers side-by-side</li> + <li>Host PHP4 and PHP5 web pages and applications</li> + <li>Host a weblog using Textpattern, Wordpress, MovableType, Typo, etc</li> + <li>Host Ruby and Ruby on Rails applications (including <span class="caps">FCGI</span> and hundreds of gems)</li> + <li>Host Perl applications (including 100&#8217;s of Perl modules)</li> + <li>Host Python applications like Django</li> + <li>Manage your code base with version control (Subversion, <span class="caps">SVK</span>, Darcs, Monotone &amp; Arch)</li> + <li>Share iCal files over WebDAV</li> + <li>Mount a WebDAV drive on your desktop (like iDisk)</li> + <li>Easily create free subdomains with wildcard <span class="caps">DNS</span></li> + <li>Store your Basecamp file uploads over <span class="caps">SFTP</span></li> + <li>Access your account via <span class="caps">SFTP</span> and <span class="caps">SSH</span></li> + <li>Add domains, unlimited <span class="caps">IMAP</span> and <span class="caps">POP</span> mail boxes and mail aliases through a control panel</li> + <li>Check your email through Webmail</li> + <li>Host Mailman mailing lists complete with archives</li> + <li>Use MySQL (default), PostgreSQL, SQLite and Berkeley databases</li> +</ul> +<p>Plans start at 12$/month for 1GB of space and one website&#8230; The 3GB one is 40$/month, for 20 sites in total. Too bad it&#8217;s too expensive for me as they are truly the top for shared hosting &#8211; I think.</p> +<p><a href="http://www.hostgator.com/">Host Gator</a>, which seems to be one of the most frequently recommended at SitePoint.com forums, is not bad either. They have a &#8220;hatchling&#8221; plan for 3,5GB at 6.95, which wasn&#8217;t bad, but it only allows one domain to be hosted. The &#8220;Baby&#8221; plan allows unlimited domains and is 9.95$/month, which is kinda dear. You get:</p> +<ul> + <li>5GB of space</li> + <li>75GB bandwidth</li> + <li>PHP4, PHP5 Perl and Python</li> + <li>Unlimited databases</li> + <li>Unlimited add-on domains</li> + <li>Unlimited hosted subdomains</li> + <li><span class="caps">FTP</span> access</li> + <li>&#8230;and more</li> +</ul> +<p>No <span class="caps">SSH</span>, no <span class="caps">SVN</span> and no Rails: out.</p> +<p><a href="http://www.site5.com/">Site5</a> is also one of SitePoint&#8217;s favourite, but still has limitations on the number of sites. I would have got the SuperHosting <span class="caps">XTREME</span>, for 7,77$/month:</p> +<ul> + <li>11GB of space</li> + <li>400GB bandwidth</li> + <li>PHP4, PHP5 Perl, Python, Ruby + RoR support</li> + <li>Unlimited databases</li> + <li>5 domains hosted</li> + <li>Unlimited hosted subdomains</li> + <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li> + <li>&#8230;and more</li> +</ul> +Not bad, a little bit too much for only 5 sites&#8230; I needed 6, too bad :/ +<div style="float:right; padding:3px;"><script src="http://www.bluehost.com/src/js/h3rald/CODE2/488x160/1.jpg"></script> </div> <p>This site is currently hosted on <a href="http://www.bluehost.com">BlueHost</a>, a hosting company established in 1996, which seems to be reliable enough (not many complaints on the net) and seems serious enough. They don&#8217;t offer subversion and WebDAV for &#8220;security reasons&#8221; and in order to get a shell account you have to send them a copy of an ID card. Annoying? Well, perhaps for some: this made me understand that they don&#8217;t allow just anybody to get <span class="caps">SSH</span> access unconditionally, and I didn&#8217;t mind. I sent them a scansion of my ID card and I got a friendly support email after a few minutes, confirming that it was activated. Here&#8217;s what I got:</p> +<ul> + <li>15GB of space</li> + <li>400GB bandwidth</li> + <li>PHP4, PHP5 Perl, Python, Ruby + RoR support</li> + <li>20 MySQL databases + 10 PostgreSQL databases</li> + <li>6 domains hosted in one account (easier for me!)</li> + <li>20 subdomains + 20 parked domains</li> + <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li> + <li>&#8230;and more</li> +</ul> +<p>For 6,65$/month, 2 years pre-payment. One of the good things is that they are not fussy about giving the money back if you cancel. Anyhow&#8230; let&#8217;s hope for the best, so far, so good.</p>
A contents/articles/22.html

@@ -0,0 +1,108 @@

+----- +title: Ten minutes on Rails (while eating Cake) +content-type: article +timestamp: 1146317340 +tags: cakephp|rails|webdevelopment +----- +<p>Today I decided to do something different, something I&#8217;ve been dying to do since before coming across CakePHP: give Rails a <em>proper</em> try. Like many other <span class="caps">PHP</span> developers out there, when <a href="http://www.rubyonrails.org">Ruby on Rails</a> came out I felt damn jealous and terribly tempted to learn Ruby <em>only</em> to start using such an amazing web development framework. At the time I actually even started reading various tutorials about it, and I was literally amazed at how RoR revolutioned the way of developing web applications.</p> +<p style="float:left;"><img src="/img/pictures/rails.gif" alt="" /></p> +<p>One of the main problems which made me &#8211; sadly &#8211; abandon Rails was Ruby itself: personally I&#8217;ve never seen a programming language with a cleaner and more elegant syntax, but also &#8211; at least at the time &#8211; there weren&#8217;t many hosts supporting it. LuckilyI found CakePHP quickly after that&#8230;<br /> +Now however, more and more hosting companies boast full Rails support, and so when recently I <a href="/blog/view/21/">had to move</a> to a new host, I made sure it was Rails-friendly, <em>just in case I wanted to give Rails another try, someday</em>.<br /> +Oh well, the temptation was so strong that today, only a two days after switching to my new host, I felt I <em>had</em> to try it, I <em>had</em> to taste something different than the usual Cake.</p> +<p>I decided to (re-)read and follow the <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">OnLamp tutorial</a> about RoR, step by step, once again. I quickly typed <code>rails cookbook</code> from my shell and voil&aacute;, rails silently creates the skeleton of my application:</p> +<p><span class="caps">README</span><br /> +Rakefile<br /> +app/<br /> +components/<br /> +config/<br /> +db/<br /> +doc/<br /> +favicon.ico<br /> +index.html<br /> +lib/<br /> +log/<br /> +public/<br /> +script/<br /> +structure.txt<br /> +test/<br /> +tmp/<br /> +vendor/</p> +<p>That&#8217;s familiar: it&#8217;s very similar to what CakePHP&#8217;s directory structure used to look like. Now Cake <em>evolved</em> and adopted its own schema, which &#8211; I must say &#8211; seems more functional than RoR&#8217;s, at least at a first glance:</p> +<ul> + <li>app/ + <ul> + <li>config/</li> + <li>controllers/</li> + <li>models/</li> + <li>plugins/</li> + <li>tmp/</li> + <li>vendors/</li> + <li>views/</li> + <li>webroot/</li> + </ul></li> + <li>cake/ + <ul> + <li>config/</li> + <li>docs/</li> + <li>libs/</li> + </ul></li> + <li>vendors/</li> +</ul> +<p style="float:right;"><img src="/img/pictures/cakephp.png" alt="" /></p> +<p>Cake felt the necessity to divide what you can mess with (<code>app/</code>, <code>vendors/</code>) from what you&#8217;d better not touch (<code>cake/</code>). Rails just left everything on the same level.</p> +<p>After creating my database and the necessary tables I have to edit <code>config/database.yml</code>, which corresponds to Cake&#8217;s <code>app/config/database.php</code>. Then things start to become a bit different from Cake, as Rails offers some very handy built in scripts which can be used to automatically create your application&#8217;s files, i.e. executing <code>ruby script/generate controller Recipe</code> creates the controller and other bits:</p> +<pre><code>exists app/controllers/ +exists app/helpers/ +create app/views/recipe +exists test/functional/ +create app/controllers/recipe_controller.rb +create test/functional/recipe_controller_test.rb +create app/helpers/recipe_helper.rb</code></pre> +<p>And so on. Anyhow&#8230; I followed the tutorial and yes, it was a nice read. CakePHP borrowed a lot from Rails but not everything. Inevitably Ruby&#8217;s syntax is less verbose and looks very very clean:</p> +<p>&lt;% highlight :ruby do %&gt;<br /> +class RecipeController &lt; ApplicationController<br /> + scaffold :recipe</p> +<p>def list<br /> + @recipes = Recipe.find_all<br /> + end</p> +<p>def edit<br /> + <code>recipe = Recipe.find(</code>params[&#8220;id&#8221;])<br /> + @categories = Category.find_all<br /> + end<br /> +end<br /> +&lt;% end %&gt;</p> +<p>While CakePHP&#8217;s, simply because it uses <span class="caps">PHP</span> and not Ruby, looks less pretty:</p> +<p>&lt;% highlight :php do %&gt;<br /> +class RecipesController extends AppController<br /> +{<br /> + var $scaffold;</p> +<p>function list()<br /> + {<br /> + $this&#8594;set(&#8216;recipes&#8217;, $this&#8594;Recipe&#8594;findAll());<br /> + }</p> +<p>function edit($id)<br /> + {<br /> + $this&#8594;set(&#8216;recipe&#8217;, $this&#8594;Recipe&#8594;find(&#8220;id = $id&#8221;));<br /> + $this&#8594;set(&#8216;categories&#8217;, $this&#8594;Category&#8594;findAll());<br /> + }</p> +<p>}<br /> +&lt;% end %&gt;</p> +<p>CakePHP Development Team did a great job translating some of Rails functionalities into <span class="caps">PHP</span>, and the while CakePHP&#8217;s syntax is <strong>much</strong> cleaner if compared to PHP&#8217;s standard spaghetti-code approach, Ruby just looks much more clear, sorry. <em>Imagine a world without funny unnecessary brackets, pointless semicolons and where everything just looks better</em>: that&#8217;s Ruby.</p> +<p>Sigh. Now I do understand why Rails was built in Ruby and not in <span class="caps">PHP</span>: simply because a PHP&#8217;s Rails would have been outscored by its &#8220;Ruby port&#8221;!</p> +<p>One thing I liked about Rails which has not been ported in Cake (yet) is a somehow smarter way of scaffolding. While the Ruby code above actually works, the CakePHP&#8217;s edit method doesn&#8217;t, or better, it does but not as expected: when you remove <code>var $scaffold</code> the scaffold is just plain gone, and you have to code everything yourself, while in Ruby you can leave the scaffold and then develop methods one by one, and still be able to use scaffolded methods if you didn&#8217;t define the custom ones.</p> +<p>The other thing I noticed about RoR is that it definitely handles errors better! This is probably another language issue. I basically forgot to set a category for the recipes, and when executing my custom list of recipes I got a very, very well structured error page showing something like:</p> +<p>&lt;% highlight :ruby do %&gt;<br /> +NoMethodError in Recipe#index</p> +<p>Showing app/views/recipe/index.rhtml where line #18 raised:</p> +<p>You have a nil object when you didn&#8217;t expect it!<br /> +The error occured while evaluating nil.name</p> +<p>Extracted source (around line #18):</p> +<p>15: &lt;% @recipes.each do |recipe| <span>&gt;<br /> +16: <tr><br /> +17: <td>&lt;</span>= link_to recipe.title, :action =&gt; &#8220;show&#8221;, :id =&gt; recipe.id <span>&gt;</td><br /> +18: <td>&lt;</span>= recipe.category.name <span>&gt;</td><br /> +19: <td>&lt;</span>= recipe.date <span>&gt;</td><br /> +20: </tr><br /> +21: &lt;</span> end <span>&gt;<br /> +&lt;</span> end %&gt;</p> +<p>I took a screenshot of the page, because it was too nice: <a href="/img/pictures/rails_error.jpg">check it out</a>. This error page really tells you what&#8217;s wrong, and even prints the lines of code around the error! It also lets the developer check the full backtrace and every sort of information&#8230; Can we have this in CakePHP please? I actually started to develop something like this, but seemed quite hard to do in <span class="caps">PHP</span>.</p>
A contents/articles/23.html

@@ -0,0 +1,67 @@

+----- +title: A look at Symfony +content-type: article +timestamp: 1146483766 +tags: frameworks|php|cakephp +----- +<p>CakePHP is <span class="caps">THE</span> perfect <span class="caps">PHP</span> framework, so <em>we</em> don&#8217;t need anything else. Oh well, no. I personally love CakePHP, but I do believe other <span class="caps">PHP</span> frameworks can be interesting and maybe even useful, so today I thought I&#8217;d have a look at the <a href="/bookmarks/view/simfony/">Simfony Project</a>. This framework seems to be mentioned here and there on the Net in many different ways, someone said it can do wonders, some said it&#8217;s more advanced, others said something like <em>&#8220;qcodo sucks.. cake stinks.. symfony rocks!!!!!&#8221;</em>, so it <span class="caps">OUGHT</span> TO be pretty cool, definitely.</p> +<p style="float:left;"><img src="/img/pictures/symfony.gif" alt="" /> <em>Know thy enemy</em> someone said (OK, bad joke), so let&#8217;s have a look at this interesting alternative to CakePHP. <em>No dude, not another <span class="caps">MVC</span>-like, pseudo-Rails, <span class="caps">AJAX</span>-worshipping framework!</em> Yes, another one. Actually Symfony is more than that: while people <em>can</em> say CakePHP is similar to RoR for some features and for the strong <span class="caps">MVC</span> architecture, Symfony chose another road. Yes, <span class="caps">MVC</span> is still there, but the first thing I noticed after reading their <a href="http://www.symfony-project.com/tutorial/my_first_project.html">beginners&#8217; tutorial</a> was that one of the things which Symfony seems to use quite regularly (and Cake doesn&#8217;t)is code generators. Things like executing <code>symfony propel-build-sql</code> or even <code>symfony propel-generate-crud frontend post Post</code> from command line to generate your code automagically, which CakePHP &#8211; except for our little <em>bake</em> script &#8211; doesn&#8217;t use. <br /> +<em>See? Simfony is <span class="caps">MUCH</span> better and <span class="caps">MUCH</span> more advanced than Cake!</em> No, hang on a minute&#8230; I just listed one thing which Symfony has more than Cake, is there any more? Yes, there is, for now: i18n &#8211; internationalization. Symfony comes with native multi-lingual support and Cake doesn&#8217;t &#8211; yet &#8211; although there are rumors that i18n for Cake 2.0 is <em>almost done</em>. This is not speculation, re-read the sentence: First off I&#8217;m referring to Cake <em>2.0</em> (which means it will take a while) and also I read it in the <a href="https://trac.cakephp.org/wiki/Proposals/2.0ToDoList">Cake 2.0 ToDo List</a>.</p> +<p>One of the most recurring and yet pointless critiques to CakePHP from Symfony enthusiasts is that the sites developed with CakePHP look terrible. I perfectly agree, look at <a href="http://www.h3rald.com/">this</a> and tell me if the developer is not a complete and hopeless idiot when it comes to design and look &#8216;n&#8217; feel!<br /> +I do agree that some CakePHP sites (mine, mainly) don&#8217;t look too good, and probably the Cake Software Foundation should pay me to put it offline. I also agree that the Symfony website looks nice and is more pleasant to the eye than CakePHP&#8217;s, but I do hope that the old &#8220;design contest&#8221; doesn&#8217;t get forgotten&#8230;</p> +<p style="float:right;"><img src="/img/pictures/askeet.gif" alt="" /> The Symfony team also did something truly remarkable: a comprehensive tutorial, an advent calendar, some great free source code to download and a fully functional Web 2.0-compliant online application <em>all in one</em>. I&#8217;m referring to <a href="/bookmarks/view/askeet/">Askeet</a>, a Symfony-powered website which has been built from scratch using the framework and its development is well documented in <a href="http://www.symfony-project.com/askeet">twenty-four tutorials</a>. In one move these guys made an interesting website, some useful documentation and self promotion&#8230; what can I say: for next Christmas we&#8217;d better chain PHPnut, gwoo, nate &amp; the others to their chairs, close them in a small room and force them to code something like that in twenty-four days.<br /> +If I were to mention something which Symfony did well I&#8217;d certainly say the <a href="http://www.symfony-project.com/content/documentation.html">documentation</a>. Screencasts, tutorials, advent calendars, a book, a wiki, <span class="caps">API</span> etc. etc. All done, and all good, I must admit that. The good news is that CakePHP is slowly catching up, and now the <a href="http://manual.cakephp.org">manual</a> looks pretty decent.</p> +<p>OK, enough flattering and let&#8217;s talk about something I didn&#8217;t like about Symfony. I downloaded the thing and it turns out it&#8217;s 1.2MB in size, <em>a hell of a framework!</em> After extracting the beast I had a look inside and found three directories: <code>data</code>, <code>lib</code> and <code>bin</code>. Not bad. I opened <code>bin</code> and found the three magic symfony scripts, alright; I opened <code>data</code> and found nine directories, I opened <code>lib</code> (the real deal) and found 25 directories! These guys maybe never heard of something called <em>&#8220;an organized directory structure&#8221;</em>, or perhaps I&#8217;m just too used to Cake&#8217;s logic and essentiality.<br /> +Browsing around I found something like 247 .dat files defining country names and currencies in all the languages of the world, script.aculo.us and prototype libraries, javascript calendars and other wonders&#8230; Weeeeheee! <br /> +The good thing is that Symfony seems to include pretty much everything you&#8217;d ever need, the bad thing is that <em>personally</em> I will never use any of the thirteen Chinese-related .dat files in th i18n directory. This philosophy is exactly the opposite to Cake: at first i got pissed off when I noticed that CakePHP doesn&#8217;t include prototype by default, but then I realized that if they started include <em>everything</em> you <em>might</em> need <em>someday</em> we&#8217;d end up like&#8230; like Symfony, with 1.2MB of stuff 500KB of which &#8211; at least &#8211; will most likely not be of any use for the average developers.</p> +<p>The other dangerous consequence of including more and more stuff is the so called <em>widget-temptation</em>: If you include script.aculo.us you <span class="caps">MUST</span> show off and offer some weird toy someone <em>may</em> use&#8230; well, Symfony seems to go in that direction, and someone compared it to component-driven frameworks like eZ Publish rather than more general-purposes projects. I&#8217;m sure the <a href="http://www.symfony-project.com/content/book/page/generator.html">admin generator</a> can be damn handy, but what happens if I&#8217;m a terribly annoying guy who&#8217;d like to tweak it and change it so that it fits <em>my</em> needs? In Cake&#8230; well, there&#8217;s nothing &#8220;official&#8221; included in the core, and when you find a third-party helper or component you feel you can take a look and poke around, extend it, or change it totally. It&#8217;s all up to the developers and their needs: personally think that widgets are useful, but some times people like a bit more flexibility.</p> +<p>So the overall impression of Symfony is that &#8211; regardless its arguable, self-proclaimed, <em>enterprise-ready</em> status &#8211; it is rather complex, with a steep(er) learning scheme which doesn&#8217;t justify the extra features.</p> +<p>From the <a href="http://www.symfony-project.com/tutorial/my_first_project.html">My first Symfony project</a> tutorial:</p> +<blockquote> +<p>So, the weblog will handle posts, and you will enable comments on them. Edit the file sf_sandbox/config/schema.xml and paste the following configuration:<br /> +<small><br /> +<pre><code> +&lt;?xml version="1.0" encoding="UTF-8"?&gt; +&lt;database name="propel" defaultIdMethod="native" noxsd="true"&gt; + &lt;table name="weblog_post" phpName="Post"&gt; + &lt;column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" /&gt; + &lt;column name="title" type="varchar" size="255" /&gt; + &lt;column name="excerpt" type="longvarchar" /&gt; + &lt;column name="body" type="longvarchar" /&gt; + &lt;column name="created_at" type="timestamp" /&gt;</p> +</blockquote> +</table> + +<table name="weblog_comment" phpName="Comment"> +<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" /> +<column name="post_id" type="integer" required="true" /> +<foreign-key foreignTable="weblog_post"> +<reference local="post_id" foreign="id"/> +</foreign-key> +<column name="author" type="varchar" size="255" /> +<column name="email" type="varchar" size="255" /> +<column name="body" type="longvarchar" /> +<column name="created_at" type="timestamp" /> +</table> +</database> +<p></code></pre><br /> +</small><br /> +This code is longer to read than to explain: It describes two tables Post and Comment.</p> +<p>NO! Sorry, no. This is <span class="caps">NOT</span> simple. It is logic, clear and makes perfect sense, it&#8217;s not that I&#8217;m retarded and I can&#8217;t write or read <span class="caps">XML</span> files, it&#8217;s just unnecessary. You create this and then call the slave-script to create the model and the corresponding database table&#8230; This is exactly the <em>enterprise</em> way of doing things CakePHP made me forget. <em>Convention over configuration</em>. Not hundreds of configuration files.</p> +<p>But there&#8217;s more: you can even configure your views with some simple <code>.yml</code> (!) file:<br /> +<pre><code> +default: + http_metas: + content-type: text/html; charset=utf-8 + metas: + title: The best weblog ever + robots: index, follow + description: symfony project + keywords: symfony, project + language: en +</code></pre></p> +<p>Sure, it&#8217;s good. It helps, and it&#8217;s certainly useful, but I&#8217;d rather code a custom component to do the same thing with a few arrays. Again, this is arguable.<br /> +Validation is done through .yml files, and you can configure your administrator backend through a .yml file too! Cake has .ini-based <span class="caps">ACL</span>, and that&#8217;s about it: if I don&#8217;t want to use them I don&#8217;t use them. <br /> +Clearly you probably don&#8217;t have to edit all settings in the configuration files, but I just don&#8217;t like the approach, personally.</p> +<p>Oddly enough, Symfony&#8217;s slogan seems to be &#8220;professional web tools for lazy folks&#8221;&#8230;</p> +<p>It all depends on what you need. For <em>my</em> needs I chose CakePHP, and <a href="https://trac.cakephp.org/wiki/Cake/About">here&#8217;s why</a>.</p>
A contents/articles/24.html

@@ -0,0 +1,49 @@

+----- +title: CakePHP 1.0 released +content-type: article +timestamp: 1146625560 +tags: cakephp|webdevelopment +----- +<p>As <a href="http://digg.com/programming/CakePHP_1.0_has_been_released">Digg</a>_ points out, the first <em>stable</em> version of CakePHP was released, yesterday. I should have posted yesterday about it, and no, I didn&#8217;t forget: I was just busy downloading the new version, have a look at the new site, talk to people etc.</p> +<p>Anyhow, it&#8217;s ready, just baked and smells damn good. Go get it if you didn&#8217;t already, it&#8217;s available at <a href="http://cakeforge.org/frs/?group_id=23">the usual place</a>, even this time you won&#8217;t be disappointed. CakePHP now reached the 1.0 milestone, in a way which reminds me a lot about Mozilla Firefox: a lot of people were already using it <em>before</em> it went stable officially!</p> +<p style="float:left;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> +<p>The CakePHP Team has been humble enough not to declare their product <em>stable</em> before the time. I personally considered CakePHP stable <em>enough</em> since RC2&#8230; and considering that this site and many others have been built on alpha, beta and RC version, I think people can get an idea of Cake&#8217;s reliability.<br /> +Nothing (too) new came out the oven this time: CakePHP 1.0 is mainly a bugfix release, with all the features we&#8217;ve learnt to love. It&#8217;s just <em>better_: a lot of things have been fixed, model associations work better, etc. etc. You can read the <a href="http://cakeforge.org/frs/shownotes.php?group_id=23&amp;release">changelog/announcement</a></em>id=85 or have a look below for a quick summary of the new features and most interesting fixes:</p> +<pre><code> +Revision: [2420] +Added fix for Ticket #320. +Fixed Model::save() so it will only allow a model to save itself. +Fixed Model::save() when saving a HABTM association + +Revision: [2437] +Adding fix for Model::findNeighbours(). +Was returning all associations and fields. Now recursive +is set to 0 and only returns the prev and next keys array + +Revision: [2456] +"Enables use of Controller::$data in addition to Controller::$params['data']" + +Revision: [2490] +Fixing a bug that occurs when connecting to two different +databases on the same server, and enabling cross-database +model associations + +Revision: [2491] +Adding Microsoft SQL Server driver [EXPERIMENTAL] + +Revision: [2577] +Adding $alias property to enable future Oracle support + +Revision: [2625] +Bringing all DB drivers up to date + +Revision: [2653] +Adding check for custom error class in app/. +Added check for AppController::appError(); will be called if this method +is in AppController. +</code></pre> +<p style="float:right;"><img src="/img/pictures/cakesite.png" alt="" /></p> +<p>If you&#8217;re not too excited about this new release, maybe you should have a look at <a href="http://www.cakephp.org">www.cakephp.org</a>. Different? Damn right it is: it looks like someone listened to our prayers for a new website design. The merciful soul is <a href="http://www.nolimit-studio.com/">Armando Sosa</a>, the winner of CakePHP&#8217;s design contest. He&#8217;s a latin-american web designer who had the <span class="caps">GREAT</span> idea of thinking about an <em>innovative</em> design for the Cake site&#8230; Actually my dad didn&#8217;t think that way: <em>&#8220;That&#8217;s not new, that way of advertising was all over the place when I was a kid!&#8221;</em> And he&#8217;s right, Armando thought that a fifties-like template would have been perfect for Cake. Forget all the smooth, roundy-and-chubby, toons-like &#8220;official&#8221; Web 2.0 designs (beta), the new Cake site needs to stand out of the crowd&#8230;</p> +<p style="float:left;"><img src="/img/pictures/fonz.jpg" alt="" /></p> +<p><br /><br /> +<em>Heyyy! Well done guys&#8230;</em></p>
A contents/articles/25.html

@@ -0,0 +1,22 @@

+----- +title: Digg Effect - the day after +content-type: article +timestamp: 1146794340 +tags: web20|webdevelopment|internet +----- +<p>&#8230;So it turns out that my <a href="http://www.h3rald.com/articles/view/rails-inspired-php-frameworks/">last article</a> appeared on <a href="http://www.digg.com">Digg</a> homepage. <br /> +This was quite a pleasant surprise: I didn&#8217;t expect that an article submitted to <em>my own site</em> could make it that far! I thought you&#8217;d need a relatively well-known website, mafia&#8217;s support, some divine intervention and a terrific amount of luck, but it seems that sometimes an interesting article about an interesting subject can be enough. I&#8217;ll probably write a more detailed report of what happened soon, in another article rather than a blog post, but for now I just wanted to post a short summary here.</p> +<p>Two days ago I decided to write a roundup of the six Rails-inspired <span class="caps">PHP</span> frameworks, CakePHP, Symfony, <span class="caps">PHP</span> on Trax, Code Igniter, Biscuit and Pipeline. The reason for this was that I couldn&#8217;t find anything comparing all of them and such comparison could have been useful for some new <em>bakers_. OK, I confess, when I started writing the article I thought I&#8217;d submit it to Digg and see what happens: I saw that another <a href="http://www.phpit.net/article/ten-different-php-frameworks/">roundup</a> made it to the first page and people were quoting it everywhere on the net. It&#8217;s a nice article, but &#8211; in my humble opinion &#8211; not too exhaustive. <br /> +Then I read a comment by someone to the <a href="http://digg.com/programming/CakePHP_1.0_has_been_released">digg</a></em> of the latest Cake release stating:</p> +<blockquote> +<p>Yes, they are similar &#8211; both were inspired by Rails, but Cake has gone further to differentiate themselves. Here&#8217;s a decent (but not great) overview of some frameworks: http://www.phpit.net/article/ten-different-php-frameworks/</p> +</blockquote> +<p>At that point, I thought that another round up, perhaps more Cake-centric, was in order. The other reason was that in one of my recent <a href="http://www.h3rald.com/blog/view/23/">blog posts</a> I tried to compare CakePHP and Symfony, but obviously my emotions got in the way and in the end I noticed I was kinda <em>attacking</em> Symfony. That was a blog post though, and that&#8217;s half-allowed, but I felt that I should have written a slightly more objective <em>article</em> mentioning also all the other competitors.</p> +<p>Anyhow, right when I went to submit my article to Digg, it turns out that another guy wrote <a href="http://digg.com/programming/5_Next_Generation_PHP_Frameworks">a similar round up</a>, which made it to Digg&#8217;s homepage. That was an annoying cohincidence, but in the end things didn&#8217;t go too bad: his roundup was more generic, while mine was more specific and detailed.</p> +<p style="float:left;"><img src="/img/pictures/dugg_detail.png" alt="" /></p> +<p>After submitting my article the reaction wasn&#8217;t instantaneous&#8230; 5, 7, 10, 13 diggs in the first two hours. Then shortly I made it to 30 and when the 40th visitor dugg it my article was moved to the first page!<br /> +I immediately noticed it when I refreshed my stats page: a minute before my girlfriend was here telling me &#8220;oh look, over 400 visitors&#8230; not too bad&#8221;. Then I refreshed the page and it said <em>539</em>, I refreshed again and said 600-something&#8230; eeep&#8230; Digg effect!</p> +<p>A special praise goes to my new hosting company, <a href="http://www.bluehost.com/track/h3rald/CODE5">BlueHost</a>: the server didn&#8217;t go down and it managed the extra traffic fine! A good test for CakePHP as well, since I built this site with it.</p> +<p>So here I am&#8230; over 5000 visitors read my article, about 600 people dugg it, nearly 40 people commented it on digg.com and 20 directly on my site. And &#8211; except for the usual <em>Rails-is-better-than-anything-else</em> comments &#8211; they were generally positive. Over 250 people bookmarked on del.icio.us and many blogs mentioned it in many different countries.</p> +<p>Money? Didn&#8217;t make much with adsense at all: programmers <em>don&#8217;t</em> click on ads!<br /> +Bandwidth? About 1GB was gone in the first five hours, now is obviously slowing down: oh well, I still have another 398GB available till the end of the month :P</p>
A contents/articles/26.html

@@ -0,0 +1,107 @@

+----- +title: bake.php - Easy baking for lazy folks +content-type: article +timestamp: 1146922980 +tags: cakephp|frameworks +----- +<p>When I first tried Ruby on Rails I was literally amazed by the <em>generator</em> script. Yes, I was young and inexperienced then (six/seven months ago), but you must admit that getting a controller, a model, all the basic views generated automatically by</p> +<p><code>rails script/generator scaffold Posts</code></p> +<p>is not a bad thing. Especially if the same script allows you to create model, views and controller separately and other things. <a href="http://www.symfony-project.com/">Symfony</a> and <span class="caps">PHP</span> on Trax already tried to port this functionalities, with mixed results. What about Cake? Oh well, yes, we do have something like that&#8230; something rather different, but still something: the <code>bake.php</code> script.<br /> +This cute little thing is located in the <code>cake/scripts/</code> folder and can be used &#8211; hear, hear &#8211; from command line. You can run Ruby and Perl scripts, so yes, you can actually run <span class="caps">PHP</span> from command line, although it&#8217;s not its primary purpose.</p> +<p><img src="/img/pictures/bake.jpg" alt="" /></p> +<p>Cool then, let&#8217;s open a *nix shell, Windows command prompt, etc. etc., go into the <code>cake/scripts/</code> folder and run:</p> +<p><code>php bake.php</code></p> +<p>Assuming that the php executable is in your <em><span class="caps">PATH</span></em> environment variable &#8211; if not, either you add it or you&#8217;ll have to type something like:</p> +<p><code>D:SERVERphpphp.exe bake.php</code></p> +<p>depending on where your php executable is. You&#8217;ll be be greeted by a &#8220;<span class="caps">CAKEPHP</span> <span class="caps">BAKE</span>&#8221; text, and then you&#8217;ll be asked a few questions. One thing to realize before proceeding any further: bake.php is <em>not</em> a generator, not in the traditional &#8220;Rails&#8221; sense, anyway. It&#8217;s rather a handy but more verbose dialogue-based configuration script &#8211; which will also generate <em>something</em> eventually if you provide all the necessary details.<br /> +A different approach, which may be good or bad according to your taste: personally I think we should also have something faster to use, like a Rails generator, and I opened a <a href="https://trac.cakephp.org/ticket/768">ticket</a> about it, but let&#8217;s see what bake.php can do, for now.</p> +<p>The answer is&#8230; nearly anything. It annoying enough to please, but if you follow its directions it can do a prettu decent job in the end, it&#8217;s far from being sentient, but let&#8217;s say it&#8217;s smart enough for a script. First of all if you try it out on a fresh Cake install it will notice that you haven&#8217;t configured your database yet, so it will ask for a hostname, username, password, database name etc. etc. and generate your <code>app/config/database.php</code> for you, not a bad start.</p> +<p>Once that&#8217;s done &#8211; and it won&#8217;t go on unless you configure a (MySQL only?) database &#8211; you can proceed with the rest. You can start creating either a controller, model or view; I tried a <code>Posts</code> controller, for example. The script then asks quite a few questions:</p> +<ul> + <li>The controller&#8217;s name</li> + <li>Whether it will use other models besides posts</li> + <li>Whether you want to include any helper</li> + <li>Whether you want to include any component</li> + <li>Whether you want to generate the base <span class="caps">CRUD</span> methods</li> +</ul> +<p>Then finally it generates the damn thing. The result is good enough:</p> +<p><small><br /> +<pre><code> +&lt;?php +class PostsController extends AppController +{ + //var $scaffold; + var $name = 'Posts';</p> +<p>function index()<br /> + {<br /> + $this&#8594;set(&#8216;data&#8217;, $this&#8594;Post&#8594;findAll());<br /> + }</p> +<p>function add()<br /> + {<br /> + if(empty($this&#8594;params[&#8216;data&#8217;]))<br /> + {<br /> + $this&#8594;render();<br /> + }<br /> + else<br /> + {<br /> + if($this&#8594;Post&#8594;save($this&#8594;params[&#8216;data&#8217;]))<br /> + {<br /> + $this&#8594;flash(&#8216;Post saved.&#8217;, &#8216;/posts/index&#8217;);<br /> + }<br /> + else<br /> + {<br /> + $this&#8594;render();<br /> + }<br /> + }<br /> + }</p> +<p>function edit($id)<br /> + {<br /> + if(empty($this&#8594;params[&#8216;data&#8217;]))<br /> + {<br /> + $this&#8594;set(&#8216;data&#8217;, $this&#8594;Post&#8594;find(&#8216;Post.id = &#8217; . $id));<br /> + }<br /> + else<br /> + {<br /> + if($this&#8594;Post&#8594;save($this&#8594;params[&#8217;data&#8217;]))<br /> + {<br /> + $this&#8594;flash(&#8216;Post saved.&#8217;, &#8216;/posts/index&#8217;);<br /> + }<br /> + else<br /> + {<br /> + $this&#8594;set(&#8216;data&#8217;, $this&#8594;params[&#8216;data&#8217;]);<br /> + $this&#8594;validateErrors($this&#8594;Post);<br /> + $this&#8594;render();<br /> + }<br /> + }<br /> + }</p> +<p>function view($id)<br /> + {<br /> + $this&#8594;set(&#8216;data&#8217;, $this&#8594;Post&#8594;find(&#8217;Post.id = &#8217; . $id));<br /> + }</p> +<p>function delete($id)<br /> + {<br /> + $this&#8594;Post&#8594;del($id);<br /> + $this&#8594;redirect(&#8216;/posts/index&#8217;);<br /> + }</p> +<p>function postList()<br /> + {<br /> + $vars = $this&#8594;Post&#8594;findAll();<br /> + foreach($vars as $var)<br /> + {<br /> + $list[$var[&#8216;Post&#8217;][&#8216;id&#8217;]] = $var[&#8216;Post&#8217;][&#8216;name&#8217;];<br /> + }</p> +<p>return $list;<br /> + }<br /> +}<br /> +?&gt;<br /> +</code></pre><br /> +</small></p> +<p>It&#8217;s more or less the same with models and views: it will still ask a lot of questions and in the end generate the thing. <br /> +This behaviour is more advanced than a standard generator, you can include helpers and components already, if you want, but do you <em>really</em> want that? For models it even asks if you want to include particular associations and validation rules! Personally, I&#8217;d rather a generator script which generates something <em>immediately</em> and accepts maybe some parameters to further customization, like:</p> +<p><code>php bake.php scaffold Posts</code><br /> +<code>php bake.php controller Posts</code><br /> +<code>php bake.php model Posts</code><br /> +<code>php bake.php model Posts</code><br /> +<code>php bake.php controller Posts helper +Html -Time,Javascript</code><br /> +<code>php bake.php model Posts assoc +hasMany comments,tags</code></p> +<p>Bah&#8230; just some random thoughts. How about custom-made generators (<a href="http://wiki.rubyonrails.org/rails/pages/AvailableGenerators">Rails-inspired</a>)?</p>
A contents/articles/27.html

@@ -0,0 +1,49 @@

+----- +title: rdBaker - Bake your CakePHP application online +content-type: article +timestamp: 1147081800 +tags: cakephp +----- +<p>Right after my <a href="/blog/view/26">last blog post</a> I decided to log on #cakephp on irc.freenode.org as usual, and gwoo pops in and says &#8220;h3raLd, you didn&#8217;t review rdBaker yet!&#8221;<br /> +That&#8217;s right, I didn&#8217;t yet, so I may as well do it today.</p> +<p>I remember hearing about rdBaker months ago, waaay before CakePHP 1.0, way before the RCs, I remember someone mentioning it on CakePHP user group in right after the bake.php script was created. <em>&#8220;How about having an online baking utility?&#8221;</em> &#8211; and that&#8217;s precisely what rdBaker is, a more <span class="caps">PHP</span>-ish version of bake.php, which runs like any other <span class="caps">PHP</span> scripts: in your browser.</p> +<p>This cute little thing is obviously available for free on <a href="http://cakeforge.org/frs/?group_id=13&amp;release_id=74">CakeForge</a> and is part of <a href="http://www.rd11.com">gwoo</a> &#8217;s <a href="http://cakeforge.org/projects/rdos/">rdOpenSource</a> project which includes various other Cake-powered applications.<br /> +I personally recommend new (and old) bakers to download them and play with them, try to understand how they were coded, because they can really teach you <em>a lot</em> on how to code a CakePHP application or website properly.</p> +<p>So anyway, get your copy of rdBaker, unzip it and have a look at the <code>README.txt</code> file for the installation instructions:</p> +<quote> +<p>1. Place rdBaker in the root along side /cake_install/app.<br /> +2. chmod /cake_install/rdBaker/tmp to 0777<br /> +3. launch http://localhost/cake_install/rdBaker/</p> +</quote> +<p>Not too hard, innit?</p> +<p><img src="/img/pictures/rdbaker.jpg" alt="" /></p> +<p>Good. So you try accessing something like <code>http://localhost/php/test/cakephp/cake_test/rdBaker/</code> (that&#8217;s on my own local <span class="caps">WAMP</span> server) and you&#8217;ll get a nice page asking you to &#8220;supply your ingredients&#8221; via a simple form. <br /> +Unlike its command line cousin, rdBaker doesn&#8217;t require you to fill in <em>all</em> the fields, but just the full path to the save directory (which is normally already filled in) and of course the name of the model (Post, User, Comment).<br /> +Then you can select the type of output and choose whether you want to generate an empty controller, a scaffolded one or the <em>full</em> option including all the most common <acronym title="Create, Retrieve, Update, Delete"><span class="caps">CRUD</span></acronym> methods.<br /> +Finally &#8211; if you like &#8211; you can enter any association or valitation rules for your model, then press the <em>Bake it!</em> button and voil&aacute;, in you&#8217;ll find three directories (controllers, models and views) in your save directory containing all the <acronym title="Model View Controller"><span class="caps">MVC</span></acronym> entities you need regarding a particular model:</p> +<pre><code> + rdBaker Result Array +( + [0] =&gt; notes_controller.php created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpcontrollers + [1] =&gt; note.php created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpmodels + [2] =&gt; index.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [3] =&gt; add.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [4] =&gt; edit.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [5] =&gt; view.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes +) +</code></pre> +<p>But there&#8217;s more! By checking the appropriate checkbox, you can get all the stuff packed in a zip file!</p> +<p>Not bad at all, and fast as well.</p> +<p>Now the bad things&#8230;<br /> +The script works fine, but there&#8217;s something which could be improved, perhaps:</p> +<ul> + <li>If you choose to put everything in a zip file, the file will be named &#8220;baked_by_rdBaker.zip&#8221; &#8211; not a big deal, but maybe it could be personalized according to the model name entered.</li> + <li>Regardless you want to add validation rules to your model or not, you&#8217;ll <em>always</em> find some validation rules for a <em>title</em> and <em>body</em> field. I checked and they are hardcoded in the template file (rdBaker/views/helpers/templates/full/model.txt):<br /> +<pre><code> + var $validate = array( + 'title'=&gt;VALID_NOT_EMPTY, + 'body'=&gt;VALID_NOT_EMPTY); +</code></pre></li> + <li>In the baked index.thtml view, there will always be a column named &#8220;Title&#8221;. This, again, is hardcoded in the template.</li> +</ul> +<p>Other than these things, everything seems to work fine. A really nice script!</p>
A contents/articles/29.html

@@ -0,0 +1,11 @@

+----- +title: Writing more articles... +content-type: article +timestamp: 1147580760 +tags: website|writing +----- +<p>Yes, I know, I&#8217;ve been slaking a little bit, and haven&#8217;t posted on my blog in a while. Well, I actually <em>didn&#8217;t</em> slack at all in these days getting ready to start my job, looking for a damn fitted kitchen for my house and&#8230; writing more articles.</p> +<p>Nothing special, and nothing too technical, to be honest, but equally interesting. First of all I updated my <a href="/articles/view/ie-lovers-guide-to-firefox/">An IE Lover&#8217;s Guide to Firefox</a> a little bit and people at SpreadFirefox.com and <a href="http://www.firefoxfacts.com/">FirefoxFacts</a> liked it. Glad to hear that, unfortunately some guy who wrote about <a href="http://mywebpages.comcast.net/SupportCD/FirefoxMyths.html">Firefox Myths</a> wasn&#8217;t too impressed, but at any rate he read it anyway.</p> +<p>OK, this wasn&#8217;t a new article at all, but <a href="/articles/view/the-internet-philosopher/">this one</a> is fresh, at least. It&#8217;s about a Swedish guy who decided to emigrate to India pursuing an ideal: writing for his own opinions and ideas. And he gets paid for that too! After reading more about him on his <a href="/bookmarks/view/ropix">website</a> I decided to write something about him. An interesting and rather unusual read. Pity that some sections of his homepage are in Swedish only.</p> +<p>Finally, yesterday I felt inspired and decided to write <a href="/articles/view/social-bookmarking-services">another roundup</a> featuring ten popular social bookmarking websites. Trying all those services was fun, with a few exceptions of course. The bad news is that there are already various reviews about social bookmarking sites and thus the Digg folk doesn&#8217;t seem to be particularly interested in <a href="http://digg.com/software/Ten_popular_social_bookmarking_services_reviewed">reading another one</a>, but hey! After all I can&#8217;t expect of getting dugg for every roundup I write, can&#8217;t I?</p> +<p>That&#8217;s about it. And what about the CakePHP article I promised <a href="/blog/view/13/">long ago</a> to CakePHP beginners? It&#8217;s done, written and ready to be published! Unfortunately the magazine I submitted it to is taking quite a bit to review it and &#8211; most important &#8211; to tell me whether they&#8217;ll publish it or not. Let&#8217;s hope for the best.</p>
A contents/articles/31.html

@@ -0,0 +1,83 @@

+----- +title: Watch out: CakePHP screencasts +content-type: article +timestamp: 1148132820 +tags: cakephp|tutorial +----- +<p>Tutorials are great, articles are helpful, manuals are essential and the <span class="caps">API</span> is your best friend, but there&#8217;s still something missing there&#8230; Unfortunately podcasts are not yet available, but the CakePHP team is proud to announce the creation of two <a href="http://cakephp.org/pages/screencasts">screencasts</a> in an effort to help new bakers familiarizing with CakePHP&#8217;s concepts. <br /> +This is old news now, the screencasts section came together with the <a href="/blog/view/24">site overhaul</a> but I only got a chance to take a look at them (one of them only, to be totally honest) recently, and so here&#8217;s a spoil&#8230; erhm, a <em>detailed</em> description of John Anderson&#8217;s screencast about the <a href="http://manual.cakephp.org/chapter/18">Blog Tutorial</a>.</p> +<p style="float:left;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> +<p>There&#8217;s something I&#8217;ll never do: a screencast. Recording every mouse movement, every word or piece of code typed in half an hour? No way! And what happens if I mistype something? People will keep pointing out the fact that I was starting to type <code>&lt;/h2&gt;</code> to close a <code>&lt;/h1&gt;</code> tag, or that I waited an eternity like five full seconds before deciding what to do. I guess I&#8217;m quite paranoid&#8230; John did it, and he did it well. Using just bash, vim and Safari he was able to record an excellent 30-minutes screencast featuring the blog tutorial. <br /> +Before people start complaining that the blog tutorial should be completed in fifteen minutes, keep in mind that John&#8217;s screencast is meant to show everything clearly to new users, via a trial and error approach if necessary.</p> +<p>Here&#8217;s what happens in the screencast, nothing new if your read the blog tutorial, but still interesting, especially if you&#8217;re new to Cake. Unfortunately there&#8217;s no audio, but the video talks by itself and John will occasionally write some comments here and there.</p> +<p><em><strong>0:01 &#8211; 5:00</strong></em></p> +<ul> + <li><span class="caps">SVN</span> checkout to get the latest CakePHP version</li> + <li>make app/tmp writeable</li> + <li>execute queries (table posts)</li> + <li>insert some test posts</li> + <li>create database config file: modify 3 lines of database.php</li> + <li>CakePHP is now able to connect to database</li> + <li>create app/models/post.php model</li> + <li>create posts_controller.php [John uses Vim as preferred <span class="caps">PHP</span> editor]</li> + <li>try to access /posts/, error: missing method index()</li> + <li>create function index() in postscontroller.php able to fetch posts</li> + <li>refresh, missing index view</li> + <li>create index.thtml displaying the raw posts array</li> +</ul> +<p><em><strong>5:01 &#8211; 10:00</strong></em></p> +<ul> + <li>index.thtml: display posts with table and foreach iteration</li> + <li>add hyperlink in index.thtml to view posts</li> + <li>access /posts/view/1 &#8594; missing method view()</li> + <li>add view() method in postscontroller.php</li> + <li>create view.thtml to display</li> + <li>Raw view post with pre tags and print_r()</li> +</ul> +<p><em><strong>10:01 &#8211; 15:00</strong></em></p> +<ul> + <li>display post properly with <code>&lt;p&gt;</code> tags</li> + <li>add link in index.thtml to add a post</li> + <li>missing method &#8594; add()</li> + <li>add add() in controller</li> + <li>missing view [trial and error, trial and error&#8230;]</li> + <li>create add.thtml, using the Html Helper to create input tags easily</li> +</ul> +<p><em><strong>15:01 &#8211; 20:00</strong></em></p> +<ul> + <li>add.thtml (continued)</li> + <li>testing add form</li> + <li>view added post</li> + <li>start adding another (for validation purposes) [stop before submitting]</li> + <li>modify post.php model, valid_not_empty for title and body</li> + <li>modify view to trigger validation <code>$html-&gt;tagErrorMsg()</code></li> + <li>test: no body, message displayed</li> + <li>test: no title, message displayed</li> + <li>add another post, everything works</li> + <li>[pause: five seconds]</li> + <li>back to the controller, create delete() function</li> +</ul> +<p><em><strong>20:01 &#8211; 25:00</strong></em></p> +<ul> + <li>delete function (continued)</li> + <li>add &#8220;Actions&#8221; table column in index.thtml, with link delete post</li> + <li>delete two posts</li> + <li>take a breath</li> + <li>add link in index.thtml to edit post</li> + <li>refresh page, mouse over edit links&#8230;</li> + <li>back to controller, add edit function [we learnt abour CakePHP errors alright]</li> +</ul> +<p><em><strong>25:01 &#8211; 27:38</strong></em></p> +<ul> + <li>pause, 5 sec [should I write edit.thtml from scratch]</li> + <li>copy add.thtml as edit.thtml</li> + <li>change just the title and form action</li> + <li>[pause: 3 sec]</li> + <li>test edit link</li> + <li>edit a post</li> + <li>move around, switch views</li> + <li>edit config/routes.php</li> + <li>set default route to posts/index</li> + <li>refresh &#8211; all done!</li> +</ul> +<p>That&#8217;s it. All in a 40MB .mov file. Download it from <a href="http://www.archive.org/download/CakePHP_BlogTutorialJohn/BlogTutorial.mov">here</a>.</p>
A contents/articles/32.html

@@ -0,0 +1,24 @@

+----- +title: Writing Tools +content-type: article +timestamp: 1148561820 +tags: writing|tools +----- +<p>Since in these days (and even more in near future) I&#8217;m really writing a lot I thought it would be good to share my thoughts on some writing programs and tools I started using for writing these blog posts, articles, and more.</p> +<p>I&#8217;m going to examine a few applications which I find useful for different tasks, since I recently came to the conclusion that I cannot use the same editor for everything I write: some magazines require a .doc document, others want just plain text, my site uses the truly excellent <a href="http://http://www.textism.com/">textile</a> markup, zZine Magazine used BBcode, other site use their own &#8220;proprietary&#8221; styles and so on. One could just give up and use Notepad &#8211; or better, <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> &#8211; for everything, while someone else like me might opt for various applications according to the task.</p> +<p>One of the few essential requirements for a <em>writer</em> is some spell checking functionality. Sad but true, this is enough to leave the most popular multi-purpose programming editor out: programmers don&#8217;t need a spell checker, a highlighter for their favourite language is more than enough. <br /> +I will not mention all the applications I tried to find the Perfect Editor, and I&#8217;ll just focus on the programs I ended up using in the end. Some may be well known, others may not, anyway, here we go.</p> +<p style="float:left;"><img src="/img/pictures/wp/bill.jpg" alt="" /></p> +<p><a href="http://www.microsoft.com/office/preview/default.mspx">Word 2007 Beta 2</a> &#8211; Yes, I know that OpenOffice is free and OO Writer works great, but perhaps at work you&#8217;ll be asked to use MS Word. Some editors may require that as well, and their templates may not be correctly rendered by OpenOffice, so in the end you&#8217;ll still have to use Redmond&#8217;s most popular Word Processor &#8211; <em>if you have it</em>. If you got it with your laptop (I didn&#8217;t) or your auntie gave you 300$ to buy it you&#8217;re all set, but if you don&#8217;t? <br /> +Oh well, yes, OpenOffice is the right choice perhaps, but at least until February 2007 uncle Bill lets you try the bleeding (quite literally) edge of all the commercial word processors: Word 2007 beta 2. You can download the whole Office Suite (and more) for free, <a href="http://www.microsoft.com/office/preview/beta/overview.mspx">run</a>. I did it yesterday and well, it&#8217;s nice to try this brand-new piece of eye candy. the interface is completely new, you won&#8217;t find the usual drop down menu but with some imagination you&#8217;ll manage to save/create/open a new document by clicking on the big roundy Office logo on the top left corner. More user friendly? Perhaps, once you get used to it. It <span class="caps">STILL</span> doesn&#8217;t have a tabbed interface, so you <span class="caps">STILL</span> have to clutter your taskbar if you want to keep more than one document open. <br /> +At any rate, it does the job, exactly in the same way as it did in the previous versions. <br /> +I use it if people ask me to, and for writing stuff which doesn&#8217;t need to be formatted with a particular markup or style but rather look nice and have pictures embedded.</p> +<p style="float:right;"><img src="/img/pictures/wp/writely.gif" alt="" /></p> +<p><a href="/bookmarks/view/writely/">Writely</a> &#8211; Now this is much more fun. A <em>online</em>, <span class="caps">AJAX</span>-powered word processor recently acquired by Google. IT&#8217;s currently in closed beta, but I was lucky enough to get an account before they closed registrations and I can invite people to use it.<br /> +It&#8217;s nice. It&#8217;s nice if you have to work with MS Word documents or create <span class="caps">PDF</span> files, and it supports the most essential features offered by desktop word processors, plus some more, really convenient functionalities. <br /> +It can import MS Word documents pretty well and also any kind of text file, so that you can edit it online anytime and anywhere. You can star, tag, archive, edit and delete your documents in a really easy way and &#8211; which is one of its killer features &#8211; you can grant access to certain documents to collaborators for editing or viewing. Other word processors out there offer similar features, but Writely is by far the nicest to use and perhaps even the more advanced. I recently wrote a couple of articles about CakePHP (coming soon-ish to some online magazines near you) and then gave access to gwoo and PhpNut for editing, so that they could check the code snippets, in particular: it was a success. Magazine editors were happy and impressed as well.<br /> +Another really wonderful feature is <em>version support</em>. I discovered this recently: when you edit a document and save it, Writely automatically creates a new version of it, storing the old ones as well, so that you can even compare them to highlight differences if you wish: a great feature to keep track of the editing process and know exactly who edited which. When I noticed it that was it, Writely has become my online <em>repository</em> for my articles and writings.</p> +<p style="float:left;"><img src="/img/pictures/wp/cream.png" alt="" /></p> +<p><a href="/bookmarks/view/cream-editor">Cream</a> &#8211; I discovered this a while ago, and it&#8217;s perhaps the most multi-purpose editor out there. It&#8217;s built on top of Vim (respect+) but it has a friendlier interface by default, and that&#8217;s exactly what I&#8217;m using right now for typing this post. The reasons are simple: it supports <span class="caps">ANY</span> kind of file format and any character encoding. There&#8217;s an highlighter for everything, including BBcode and textile, and of course you can make your own. It also includes spell checking on-the-fly which is missing in many simple editors. <br /> +Whenever I have to write something which requires some particular formatting or markup I use Cream, it does the job pretty well, and whenever I feel brave I can always switch to &#8220;expert&#8221; view and challenge my vi skills ;)</p> +<p>That&#8217;s pretty much what I use for writing articles, posts, and other documents&#8230; I tried other alternatives like RoughDraft or similar programs but I&#8217;m now really happy with these three applications. Commercial &#8220;writer&#8217;s programs&#8221;? There are some out there, but who wants to spend 40$ or more for something which offer less than MS Word when you can use OpenOffice and Writely for free?</p>
A contents/articles/33.html

@@ -0,0 +1,104 @@

+----- +title: Information Mapping +content-type: article +timestamp: 1149221400 +tags: productivity|writing +----- +<p>As I thought, my job also represents a great opportunity to learn new things. I don&#8217;t mean only new technical stuff, but also a great deal of tips, best practices and methods to efficiently write documentation material in proper English. Some theory about <a href="http://www.infomap.com/">Information Mapping</a> was by far the most interesting topic I learnt about this week.</p> +<h3>What is Information Mapping?</h3> +<p><strong>Definition<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup></strong> <br /> +<blockquote>The Information Mapping method is a research-based approach to the analysis, organization, and visual presentation of information.</blockquote></p> +<p><strong>Information Mapping is media independent</strong><br /> +<blockquote>The method is both subject matter and media independent; that is, it can be applied to the subject matter of any industry, and it can be presented on paper, on a computer screen, verbally, or in a multimedia presentation. </blockquote></p> +<p><strong>Key Concepts</strong><br /> +<blockquote>Information Mapping is an integrated set of easy-to-learn principles, techniques, and standards. It enables authors to break complex information into its most basic elements and then present those elements optimally for readers. The result is a set of precisely defined information modules that are consistent from author to author and document to document.</blockquote></p> +<p><strong>Purpose</strong><br /> +<blockquote><br /> +The method helps writers analyze, organize, and present information with clarity focus and impact. Information That Works. The goal of the analysis component is to determine the</p> +<ul> + <li>purpose</li> + <li>audience needs, and</li> + <li>information types.</li> +</ul> +<p>The goal of the organization is to create an overall structure for the information, based on the results of your analysis. Finally, the goal of the presentation component is to format the information to make it clear and accessible to your audience.</p> +</blockquote> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> Contents were taken from <a href="http://www.infomap.com/index.cfm/TheMethod/">InfoMap.com</a> and were re-formatted and re-organized into an information map.</p> +<h3>Key Concepts</h3> +<p><strong>Introduction</strong><br /> +<blockquote>The Information Mapping method relies on some important principles according to which information should be organized. This method also defines new units of information to replace paragraphs, sections and chapters and tries to divide information into a few main set types, each with its own rules and structures.</blockquote></p> +<p><strong>Principles</strong><br /> +<blockquote></p> +<table> + <tr> + <td> <strong>Name</strong> </td> + <td> <strong>Explanation</strong> </td> + </tr> + <tr> + <td> Chuncking </td> + <td> Writers should group information into small, manageable units. </td> + </tr> + <tr> + <td> Relevance </td> + <td> Writers should make sure that al information in a chunck relates to one main point (function or purpose). </td> + </tr> + <tr> + <td> Labeling </td> + <td> Writers should provide a label for every unit of information. </td> + </tr> + <tr> + <td> Consistency </td> + <td> Writers should use similar labels, word, formats for similar subject matters. </td> + </tr> + <tr> + <td> Integrated Graphics </td> + <td> The use of tables, images, diagrams and lists is encouraged. </td> + </tr> + <tr> + <td> Accessible Detail </td> + <td> Documents should provide sufficient details where necessary, to make the information more accessible for the readers. </td> + </tr> + <tr> + <td> Hierarchy </td> + <td> Small, relevant units of information should be organized into a hierarchy. </td> + </tr> +</table> +</blockquote> +<p><strong>Information Types</strong><br /> +<blockquote></p> +<table> + <tr> + <td> <strong>Name</strong> </td> + <td> <strong>Definition</strong> </td> + </tr> + <tr> + <td> Procedure </td> + <td> Set of steps to obtain a specified outcome </td> + </tr> + <tr> + <td> Process </td> + <td> A series of changes through the time for some purpose </td> + </tr> + <tr> + <td> Structure </td> + <td> Something which can be defined into multiple parts </td> + </tr> + <tr> + <td> Concept </td> + <td> Group of physical objects, conditions, relations, &#8230; </td> + </tr> + <tr> + <td> Principle </td> + <td> Statement of what should be done, assumptions </td> + </tr> + <tr> + <td> Fact </td> + <td> Statement presented with no supporting evidence </td> + </tr> + <tr> + <td> Classification </td> + <td> The sorting of a group of specimen into classes </td> + </tr> +</table> +</blockquote> +<p><strong>Conclusion</strong><br /> +<blockquote>Although it may initially seem too schematic, Information Mapping is a valid method to organize and present information to those readers who just need &#8220;facts&#8221; without any unnecessary distraction. This method it is used with some modifications in many technical manuals and documentation written by many companies.</blockquote></p>
A contents/articles/34.html

@@ -0,0 +1,64 @@

+----- +title: Akelos Framework: too good to be true? +content-type: article +timestamp: 1149931560 +tags: frameworks|php|webdevelopment|review +----- +<p>Someone recently added a comment to my article about <a href="/articles/rails-inspired-php-frameworks/">Rails-inspired <span class="caps">PHP</span> frameworks</a> pointing out that I forgot another Rails-like framework, in my round-up. He obviously posted a link to this rather mysterious Rails port in <span class="caps">PHP</span> and spam or not, I&#8217;d like to thank this guy for letting me know of the existance of <a href="/bookmarks/view/akelos-framework">Akelos</a>, a new <span class="caps">PHP</span> framework which seems simply too good to be true.</p> +<p style="float:left;"><img src="/img/pictures/frameworks/akelos_framework.png" alt="" /></p> +<p>Let me just spend a few words more before writing more about it though. First off, it&#8217;s not available yet. OR at least it doesn&#8217;t seem to be: the author is planning to release his work to the Open Source community but&#8230; well, he&#8217;s a bit concerned about the current &#8220;<span class="caps">PHP</span> Framework War&#8221;: he wouldn&#8217;t like to end up like <a href="http://subway.python-hosting.com/">Subway</a> or just be slagged off by those merciless reviewers who enjoy write round-ups and comparisons about frameworks. <a href="http://www.bermi.org/page/about_me">Bermi Ferrer</a> is &#8220;just&#8221; a talented <span class="caps">PHP</span> developer who decided to create his own framework and he really enjoyed doing so, nothing more, nothing less.</p> +<p><em>&#8220;I considered other <span class="caps">PHP</span> ports of Ruby on Rails, but we could not find all we needed on them. One feature that I needed on the core was internationalization and Unicode support, so I decided to roll my own framework trying to keep most of the original rails interface so most of its documentation could work for it.&#8221;</em></p> +<p>Where did I hear that? Nothing new: it&#8217;s always the same story of frameworks not being as we want them to be etc., it&#8217;s human. And yes, it&#8217;s <em><strong>another</strong></em> attempt to port Ruby on Rails to <span class="caps">PHP</span>, and a damn good one &#8212; or so it seems.</p> +<p><small>Before proceeding any further, I&#8217;d like to write a short warning for a few people who may or may not want to pop in and start commenting about the Rails-is-better-than-any-<span class="caps">PHP</span>-clone issue: <strong>If I see a single comment slagging off this framework (or any other) only because it&#8217;s a port of Rails to <span class="caps">PHP</span>, it will be deleted, may it be David Heinemeier Hansson himself</strong>. Stop it, no seriously, I think it will be counter productive for Rails in the end: I really like RoR and I love the way it works, and yes, I think Ruby is definitely the best language to do that sort of things, <span class="caps">EVERYBODY</span> <span class="caps">KNOWS</span> <span class="caps">THAT</span>. Please, please, save us poor <span class="caps">PHP</span> developers the usual preaching.</small></p> +<p style="float:right;"><img src="/img/pictures/frameworks/bermi_ferrer.png" alt="" /></p> +<p>Right, back to Akelos now. Curious as I am I immediately checked out the official page and all i found was a pretty long list of features which made me dribble, literally&#8230; ooops!</p> +<p>Let&#8217;s just quote the most juicy ones, shall we?</p> +<p>Active Record [&#8220;Model&#8221;]</p> +<ul> + <li>Associations</li> + <li>Callbacks</li> + <li><strong>Transactions</strong></li> + <li><strong>Finders</strong> [ <code>$Project-&gt;findFirstBy('language AND start_year:greater', 'PHP', '2004');</code> ]</li> + <li>Versioning</li> + <li>&#8230;</li> +</ul> +<p>Action Controller [&#8220;Controller&#8221;]</p> +<ul> + <li>Filters</li> + <li>Pagination</li> + <li>Mime Type</li> + <li>Mime Response</li> + <li><strong>Code Generation</strong></li> + <li>Response handler</li> + <li>&#8230;</li> +</ul> +<p>Action View [&#8220;View&#8221;]</p> +<ul> + <li><strong>Templates (using Sintags)</strong></li> + <li>Web 2.0 javascript using prototype and script.aculo.us</li> + <li>Helpers</li> + <li>Partials</li> + <li><strong>Template Compilers</strong></li> + <li>&#8230;</li> +</ul> +<p>And then more Akelos-only goodies:</p> +<ul> + <li><strong>Multilingual Models and Views</strong></li> + <li><strong>Locale alias integrated on <span class="caps">URLS</span> (example.com/spanish will load the es_ES locale)</strong></li> + <li>Database migrations using DB Designer files</li> + <li><strong>Pure <span class="caps">PHP</span> support for Unicode (no extensions required)</strong></li> + <li><strong>Unit Tested source code</strong></li> + <li>Code Generators</li> + <li>Built in <span class="caps">XHTML</span> validator</li> + <li>Automated locale management</li> + <li><strong>Clean separation from <span class="caps">HTML</span> and Javascript using <span class="caps">CSS</span> event selectors.</strong></li> + <li>Ajax file uploads</li> + <li><strong><span class="caps">AFLAX</span> integration</strong></li> + <li>Dojo Rich Text Editor</li> + <li>Format converters</li> + <li>File handling using <span class="caps">SFTP</span> for shared host running Apache as user nobody (as most CPanel server do)</li> + <li><strong>Distributed sessions using databases</strong></li> +</ul> +<p>Impressed? I was, honest. And I&#8217;m talking as a CakePHP fanatic here, and I must say that if this framework can really offer all this <em>and</em> &#8212; and this is what really matters &#8212; is also as simple as Cake to learn and well performing&#8230; well, this is definitely going to be quite a promising player in the &#8220;<span class="caps">PHP</span> Framework War&#8221; (but is not a real war, is it?), although the author is quite worried about that:</p> +<p><em>&#8220;I&#8217;m also concerned about the <span class="caps">PHP</span> Framework war, I don&#8217;t want to play that game. Building this Framework was a great experience, it works great for me and it has helped me to become a better programmer so I don&#8217;t want to spend my time discussing about if this is better or not than other solutions. That&#8217;s the reason I&#8217;ll first look for great developers interested in the Framework to help me releasing it.&#8221;</em></p> +<p>Really, this will be an interesting project to check out, once it goes open source, and yes, I really wish Bermi all the best. Good luck, <a href="http://www.bermi.org/projects/akelos_framework">Akelos Framework</a>.</p>
A contents/articles/36.html

@@ -0,0 +1,20 @@

+----- +title: ITALIA - CAMPIONE DEL MONDO! +content-type: article +timestamp: 1152688740 +tags: italy +----- +<p><em><strong>Italy has won the World Cup!</strong></em></p> +<p>It doesn&#8217;t matter if Zidane first scored on a totally unfair penalty kick at the 7th minute and then, totally out of his mind, headbutted Materazzi&#8230; WE <span class="caps">WON</span>, <span class="caps">AND</span> WE <span class="caps">KICKED</span> <span class="caps">THEIR</span> <span class="caps">ASS</span>, end of story :)</p> +<div align="center"> +<p><img src="/img/italy/worldcup.jpg" alt="" /> </div></p> +<blockquote> +<p style="float:left;"><img src="/img/italy/grosso.jpg" alt="" /></p> +<p>&#8220;Italy beat France 5-3 in a penalty shoot-out to win the World Cup after an absorbing 1-1 draw in Berlin.</p> +<p style="float:right;"><img src="/img/italy/italy1.jpg" alt="" /></p> +<p>Fabio Grosso scored the winning goal after France&#8217;s David Trezeguet missed.</p> +<p>Playing his last game before retiring, Zinedine Zidane&#8217;s career ended in disgrace after he was sent off for crazily headbutting Marco Materazzi.</p> +<p>Zidane had put France ahead early on with a coolly-taken chipped penalty, before Materazzi levelled with a header from an Andrea Pirlo corner.<br /> +The result caps an incredible period for Italian football, with the domestic game embroiled in a corruption scandal similar to 1982 when they last won the World Cup. &quot;</p> +</blockquote> +<p><a href="http://news.bbc.co.uk/sport2/hi/football/world_cup_2006/4991652.stm">Read More</a></p>
A contents/articles/37.html

@@ -0,0 +1,26 @@

+----- +title: Some updates +content-type: article +timestamp: 1153789620 +tags: website|cakephp +----- +<p>Quite a bit of time passed since the last blog post, and I&#8217;m actually sorry about that, but as I thought, I don&#8217;t have as much free time as I used to be. Work is work, after all!<br /> +This post will be multipurpose as actually I bluid up a few things to write about in the last few days&#8230; erhm, ok, <em>weeks</em>.</p> +<h3>New Website Design</h3> +<p>Something different eh? Yep, definitely! Some time ago I started a small project called <a href="/projects/view/h3rald-redesign">h3raLd.com Re-design</a> hoping that some <span class="caps">GFX</span> guru could provide a new template for this website, and actually in the end I decided to accept the work of <em><strong>Bartus F. Teipel</strong></em> a Brazilian CakePHP enthusiast.<br /> +Bartus is obviously (<span class="caps">MUCH</span>) more talented than me when it comes to design, and I was amazed at the quality of the template he provided, in a really short time. <br /> +Unfortunately he didn&#8217;t yet provide a link to his main website/portfolio, but for now all I can show you is his website for party pics, <a href="http://www.circuscircus.com.br/">CircusCircus</a>.</p> +<p>The new template sports a more contemporary Web2.0-ish look which I like a lot, and Bartus used libraries like <a href="http://prototype.conio.net/">prototype</a>, <a href="http://moofx.mad4milk.net/">moo.fx</a> and <a href="http://www.html.it/articoli/niftycube/index.html">Nifty Corners Cube</a> for the <span class="caps">AJAX</span> effects and functionalities. <br /> +A really outstanding work, thanks Bartus!</p> +<h3>The CakePHP Herald project has been completed</h3> +<p>With my <a href="http://www.h3rald.com/articles/view/cakephp-first-bite/">latest article</a> about CakePHP published on SitePoint, the <a href="/projects/view/cakephp-herald/">CakePHP Herald</a> project was completed.<br /> +I must say that I really enjoyed writing all those articles about CakePHP, and the only thing I regret is not to have written anything (yet) about some more advanced topic about CakePHP. This was mostly due to &#8211; again &#8211; lack of time to focus on advanced topic and produce some quality examples.</p> +<p>However, judging by the positive feedback I received about the articles, I am really happy of the final result: even more people discovered the power of CakePHP and became <em>bakers</em>. Happy baking to all of you!</p> +<p><em>So&#8230; no more articles about Cake?</em> Maybe not for a while, I think I&#8217;ll be rather busy in the following months. Curious? Read on :-)</p> +<h3>My biggest and most important project</h3> +<p>I actually got really pissed off with Larry, Garret &amp; the other Master Bakers because of what they wrote on the <a href="http://cakeforge.org/forum/forum.php?forum_id=244">announcement</a> for the latest CakePHP release:</p> +<blockquote> +<p>&#8220;[&#8230;]In other news, some new articles were published on Sitepoint <sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> and in the International <span class="caps">PHP</span> magazine <sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup>. Fabio Cevasco <sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> is the man behind these articles. Together with Fabio, we will be writing a book that will be published [&#8230;]&#8221;</p> +</blockquote> +<p>After all this time I spent <em>trying desperately not to say a word about it</em> they came out and heralded it out of nowhere. Sigh&#8230; they ruined the surprise effect! Oh well, it&#8217;s too late now, isn&#8217;t it?</p> +<p>So yes, when I say that I&#8217;m spending at least 60% of my time (at work and at home) writing I really mean it. The rest? Well, I do have a lovely girlfriend after all!!!</p>
A contents/articles/38.html

@@ -0,0 +1,84 @@

+----- +title: Akelos is real, after all... +content-type: article +timestamp: 1154475180 +tags: frameworks|php|webdevelopment|review +----- +<p>Bermi Ferrer kept his promise, and even if a few were skeptic on the <a href="/blog/view/34/">pre-announced</a> features of his upcoming Akelos framework, last week he sent me a &#8220;development preview&#8221; and a few days ago he opened the development <span class="caps">SVN</span> repository to the public:</p> +<p><a href="svn://akelos.org/trunk" target="_blank">svn://akelos.org/trunk</a></p> +<p>Go, get it: it&#8217;s worthwhile (see below).</p> +<p>&#8220;[&#8230;] The Akelos Framework is an open-source port of Ruby on Rails to the <span class="caps">PHP</span> programming language.<br /> +The main goal of the Akelos Framework is to help programmers to build multilingual database-backed web applications according to the Model-View-Control pattern. It lets you write less code by favoring conventions over configuration.&#8221;</p> +<p>At the Akelos Framework Features page you can find detailed information about what has been already implemented into the framework.</p> +</blockquote> +<p>I think it says it all, well almost. Some people will undoubtedly be disgusted by yet-another-hopeless-Rails-clone: <em>not again!</em> I hear them crying&#8230;</p> +<p>Well, yeah, I think this &#8211; to be honest &#8211; should be the last attempt someone makes to port Rails to <span class="caps">PHP</span> or at least port <em>some features and the overall philosophy</em>, like <a href="/bookmarks/view/cakephp">CakePHP</a> did: there are honestly too many for one single language. Look at Python, <a href="http://www.djangoproject.com/">Django</a> seems to be the only &#8220;Rails-inspired&#8221; framework available and everyone is happy with it, while as a general rule <span class="caps">PHP</span> folks are never happy with what they already got.</p> +<p>Bermi is undoubtedly one of them, and that&#8217;s the reason he decided to code his very own Rails-inspired framework for <span class="caps">PHP</span>, which is, to date, the most remarkable of the ones I left out (it wasn&#8217;t available at the time) in my <a href="/articles/rails-inspired-php-frameworks/">article</a>.</p> +<h3>Confirmed Features &amp; Contents</h3> +<p>So well, although I didn&#8217;t really have a proper chance to play with Akelos I can certainly herald some of its &#8211; verified, this time &#8211; features.</p> +<p>For one, it&#8217;s huge. Take Cake, add <em>every excellent, useful third party library or class you can possibly thing of</em> and you&#8217;ll get Akelos. No kidding. The unzipped source of the whole framework is a massive 16MB, 8.5 of which constitute the <code>vendors</code> folder. What&#8217;s in it? Well, all this:</p> +<ul> + <li>ADOdb</li> + <li>Domit</li> + <li><span class="caps">FPDF</span></li> + <li>Excel (reader library)</li> + <li>Hyper Estraier full-text search system</li> + <li>Inutio <span class="caps">XML</span>-<span class="caps">RPC</span> Library</li> + <li><em>Many</em> <span class="caps">PEAR</span> packages</li> + <li>PHPCodeAnalyzer</li> + <li>PHPmailer</li> + <li>SimpleTest</li> + <li>A Simple <span class="caps">PHP</span> <span class="caps">YAML</span> Class</li> + <li>Textile</li> +</ul> +<p>Then, similarly, all the state-of-the-art Javascript/<span class="caps">AJAX</span> hyper-hyped libraries are included:</p> +<ul> + <li><span class="caps">AFLAX</span></li> + <li>Behaviour</li> + <li>Builder</li> + <li>various Scriptaculous packages</li> + <li>Prototype</li> + <li>FileUploader (by the author, using prototype)</li> + <li>Window</li> + <li>EventSelectors</li> +</ul> +<p style="float:left;"><img src="/img/pictures/frameworks/akelos_framework_logo.gif" alt="" /></p> +<p>Good, well, kind of: that&#8217;s just what <em>others</em> did, but it&#8217;s worth noting that it&#8217;s all there and &#8211; apparently &#8211; integrated with the framework, hopefully not too tightly. But people are fussy, and do not get excited easily anymore, long gone are the early days of Rails, when the whole Internet shake at hearing about <em>code generators</em>&#8230; Aye, there are in Akelos as well, of course!</p> +<p>Coming to the more juicy stuff, <em>lo&#8217; and behold, ye contents of /lib folder (with comments):</em></p> +<ul> + <li>AkActionController (controller)</li> + <li>AkActionView (view)</li> + <li>AkActionWebservice (Web services)</li> + <li>AkActiveRecord (model)</li> + <li>AkAdodbCache (content caching)</li> + <li>AkCharset (utf8 support, includes <em>all</em> mappings)</li> + <li>AkConfig (load config settings)</li> + <li>AkConverters (conversions!) + <ul> + <li>DBDesigner &gt; AkelosDatabaseDesign</li> + <li>Excel &gt; Array (bi-dimensional)</li> + <li>Excel &gt; <span class="caps">CSV</span></li> + <li><span class="caps">HTML</span> &gt; <span class="caps">RTF</span></li> + <li><span class="caps">HTML</span> &gt; Text</li> + <li>Word &gt; Unicode</li> + <li><span class="caps">PDF</span> &gt; Text</li> + <li>Xdoc &gt; Text</li> + </ul></li> + <li>AkHeaders (<span class="caps">HTTP</span> headers, redirections)</li> + <li>AkImages (Image operations, resizing)</li> + <li>AkLocalize (Localization, countries and timezones)</li> + <li>AkInflector</li> + <li>AkLogger</li> + <li>AkFtp</li> + <li>AkInstaller</li> + <li>AkRouter</li> + <li>AkZip</li> + <li>&#8230;</li> +</ul> +<p>Well, it&#8217;s all there, at any rate. The best way to know if it all works, and <em>how</em> it works, is simply to try it out: <a href="http://www.akelos.org/">www.akelos.org</a>.</p> +<h3>Remarks</h3> +<p>As I said earlier, Akelos looks like <em>CakePHP on steroids</em>: agreed, the Cake philosophy of &#8220;no we-may-use-it code in the trunk&#8221; has been <em>completely</em> (and intentionally) ignored, but this is our chance to peek at what CakePHP could have become if such philosophy didn&#8217;t become a lifestyle for the Cake Dev Team. <br /> +Akelos code is Rails-inspired, so yes, it&#8217;s <em>very</em> similar to Cake, although with some rough edges and some re-used parts, but it&#8217;s the work of <span class="caps">ONE</span> person with no community support (yet), don&#8217;t forget. Remarkable.</p> +<p>And he needs co-developers, by the looks of it, so there you are then: there&#8217;s <em>your</em> chance!</p> +<p>My personal opinion about it? Well, I think Akelos can learn from CakePHP and vice-versa: a merge? Well, at least it would reduce the number of Rails-inspired framework for <span class="caps">PHP</span> and <em>possibly</em> meet the needs of more people: those who want just the essentials, as a framework, and those who like to be <em>virtually almighty</em> and be able to do anything, <em>if they wanted to</em>.</p> +<p>Two flavours of the same framework? <em>CakePHP</em> and <em>cAkePHP</em> (note the case)? Bah, let&#8217;s stop raving now, shall we?</p>
A contents/articles/39.html

@@ -0,0 +1,22 @@

+----- +title: Why I like Netvibes +content-type: article +timestamp: 1158551460 +tags: web20|ajax|review +----- +<p>The so-called &#8220;<span class="caps">AJAX</span> Start Pages&#8221; are not a new concept anymore, and like for almost any other offspring of Web 2.0 there is more than one to chose from. Hence the increasing number of comparative reviews on the Web nowadays (Yes, I&#8217;m guilty of that too). I soon learnt that for any &#8220;good and useful thing&#8221; on the web there are at least <em>n</em> clones: consider for example social bookmarking, community-powered news sites, php frameworks&#8230;<br /> +And no, you can&#8217;t use the word clone because it has a strong negative connotation nowadays so let&#8217;s just say that whenever someone comes up with a new idea, others examine it, process it and in a few weeks (days?) some <em>very, very similar application</em> comes out, and it&#8217;s <em>better</em> than the previous one. <br /> +Now, I don&#8217;t know exactly whether <a href="http://www.netvibes.com/">NetVibes</a> was one of the first <span class="caps">AJAX</span> Start Pages created or not, but at any rate &#8211; in my very, very, very humble opinion, is the most advanced and the most usable of <a href="http://www.techcrunch.com/2005/12/07/ajax-desktops-wont-stop/">the lot</a>, and an essential tool for lazy folks like me who want to keep up-to-date with what&#8217;s going on without having to visit dozen of websites everyday.</p> +<p style="float:left;"><img src="/img/pictures/netvibes.jpg" alt="" /></p> +<p>I can see people jumping up and down shouting &#8220;Pageflakes is better&#8221;, &#8220;Protopage kicks a$$&#8221; etc. etc. Well, yes, probably, as you like: different people like different things, and when it comes to <span class="caps">AJAX</span> Start Pages there&#8217;s really a lot to choose from: 3spots has an excellent (and complete, I believe) <a href="http://3spots.blogspot.com/2006/03/ajax-or-flash-startpages-or-homepages.html">list</a> of all the start pages currently available on the Net, so yes, you can try them out yourself and make out your mind :)</p> +<p>I made up my mind long ago after experimenting a few of those. Why Netvibes? OK, let&#8217;s see:</p> +<ol> + <li><strong>Fast to load</strong>: Netvibes is fast. Relatively fast, of course, for sure is not as fast as a plain, old-style html page, but I think it&#8217;s perhaps one of the fastest <span class="caps">AJAX</span> start pages ever created. As they <a href="http://blog.netvibes.com/?2006/08/17/75-the-future-of-netvibes">pointed out</a>, with a 15 million investment performance can only get better&#8230;</li> + <li><strong>Tabbed pages</strong>: After tabbed browsing, tabs within a single page seem to gain popularity. Netvibes allows you to create more than one page to prevent cluttering and general chaos: you can create a tab for CakePHP feeds, one for some cute <span class="caps">AJAX</span> widgets you&#8217;ll never use, another for al that Web 2.0 rubbish you&#8217;ll never read &#8212; that&#8217;s what I do at least.</li> + <li><strong>Smart Google Module</strong>: Finally Netvibes has a <em>proper</em> Google search module, which enable users to search with Google and view results <em>on Netvibes</em> instead of opening up a browser tab.</li> + <li><strong><span class="caps">RSS</span> done right</strong>: Their <span class="caps">RSS</span> reader is nice: by clicking on a feed title it opens up a <em>virtual window</em> inside the page with the whole story and a menu with links to the other stories included in the feed. This is the most convenient way to read whole articles like TechCrunch&#8217;s ones without leaving the page (and without loading the heavy TechCrunch UI).</li> + <li><strong>Public <span class="caps">API</span> for modules</strong>: For those who &#8211; unlike me &#8211; has some proper free time and would like to develop their own module, the <a href="http://eco.netvibes.com/developers/">Netvibes Mini Module <span class="caps">API</span></a> is public&#8230;</li> + <li><strong>Ecosystem</strong> : Netvibes <a href="http://eco.netvibes.com/">Ecosystem</a> includes hundreds of modules and podcasts and thousands of feeds and tabs which can be integrated into any Netvibes page with a single click. Some of my favourites: <a href="http://eco.netvibes.com/modules/3492/xe.com-currency-converter">XE</a> Currency Converter, <a href="http://eco.netvibes.com/modules/3709/quick-translator">Quick Translator</a>, <a href="http://eco.netvibes.com/modules/6776/google-map">Google Map</a> <a href="http://eco.netvibes.com/modules/91/daily-cartoons">Daily Cartoons</a> and <a href="http://eco.netvibes.com/modules/6/bitty-browser">Bitty Browser</a>. <br /> +CakePHP feeds? <a href="http://eco.netvibes.com/?type=all&amp;q=cakephp">Loads</a>!</li> +</ol> +<p>Enough?</p>
A contents/articles/40.html

@@ -0,0 +1,22 @@

+----- +title: Introducing "CakePHP Recipes" +content-type: article +timestamp: 1162441500 +tags: cakephp|writing +----- +<p>Despite all my efforts to keep the whole thing quiet for the time being, a few days ago I entered the words &#8220;CakePHP Recipes&#8221; in Google and discovered &#8211; to my astonishment &#8211; that my new book about the CakePHP framework is already for (pre)sale in many popular online bookstores.</p> +<p>Up to now I never made any formal announcement myself (although the Cake Software Foundation already did, months ago), nor gave out any juicy details about it, but maybe now the time has come to post something more about it. Yes, I am indeed writing a book about the CakePHP framework, and yes, you can already buy it but no, you can&#8217;t phisically get it simply because it&#8217;s still in progress (miracles of the modern publishing industry!).</p> +<p style="float:left;"><img src="/img/cakephp-recipes/cover.jpg" alt="" /></p> +<p>I&#8217;d like to point out that I&#8217;m not the <em>only</em> author of the book: all the code examples and snippets included in the book is provided by the Cake Software Foundation staff, in the person of Larry E. Masters and Garrett J. Woodworth mainly, who will also act as technical editors and first reviewers of the book, together with other trusthworthy CakePHP core developers.<br /> +It is our intent to produce an enjoyable and yet very useful book which will hopefully help CakePHP enthusiasts to use the framework in real-world situations: the book will not focus on theory but on practice, by providing a lot of interesting &#8220;recipes&#8221; on how to implement a particular functionality in a CakePHP web application.</p> +<p>Why should you get it? Here are some reasons:</p> +<ul> + <li>It is a book written <em>by</em> programmers <em>for</em> programmers</li> + <li>All the code included in the book has been created and tested by the creators of the framework</li> + <li>Part of all the revenues generated by the book (including royalties) will go to the Cake Software Foundation, and hopefully contribute to improve our already excellent framework.</li> +</ul> +<p>Very special thanks to <a href="http://www.peachpit.com/">Peachpit Press</a> for giving me and the Cake Software Foundation this chance to</p> +<p>More to come&#8230;</p> +<blockquote> +<p><strong><span class="caps">UPDATE</span></strong>: This book <a href="http://www.h3rald.com/blog/42">has been canceled</a> and therefore will <span class="caps">NEVER</span> be available in bookshops or online stores.</p> +</blockquote>
A contents/articles/41.html

@@ -0,0 +1,8 @@

+----- +title: Comments temporarily disabled +content-type: article +timestamp: 1168149180 +tags: website +----- +<p>As a few of you might have noticed, I decided to disable comments on all the sections of this site, as a temporary measure against spam.</p> +<p>Hopefully I&#8217;ll try implementing something more effective and less drastic soon, but meanwhile this seems the quickest way to get rid of approx 600-800 spam comments per week.</p>
A contents/articles/42.html

@@ -0,0 +1,13 @@

+----- +title: Too many cooks spoil the Cake book +content-type: article +timestamp: 1173231900 +tags: cakephp|writing +----- +<p>I am sorry to announce that my upcoming book, CakePHP Recipes, will not be published anymore. As a matter of fact, it wasn&#8217;t finished because some of the people involved failed to comply with the terms of their contract in delivering material which was suitable for publication.</p> +<p>To quote an email I received from my publisher a few days ago,</p> +<p><em>&#8220;[&#8230;] The Cake Software Foundation has informed us they are withdrawing from the CakePHP Recipes project, and returning the advances they&#8217;ve received. This means we can no longer count on them for support, nor can we package the book as an official title.</em></p> +<p><em>After careful consideration, we have determined that this renders the book no longer viable for us. So, regrettably we must cancel your contract as well. Please understand that we have no quarrel with your performance; you have been responsive and communicative for the entire time. [&#8230;]&quot;</em></p> +<p>This is a huge disappointment to me, in particular because I am not responsible for the cancellation. It was going to be my very first book to be published, and due to someone else&#8217;s misjudgement and lack of motivation it will never be available to the readers.<br /> +I do not want to put the blame the whole Cake Software Foundation for this: nearly every person involved in the project did his best in reviewing parts of the book or offering me support. Regrettably this wasn&#8217;t enough: unfortunately it seems that someone didn&#8217;t like the idea of me writing the book and kept doubting not only my coding skills but also my ability as a writer all along.</p> +<p>It is sad to see how certain individuals fail to understand the importance of marketing and public relations not only when working on a team project but also in ordinary life, but it is truly disappointing to see how the thoughts and opinions of a single individual affect the work of a whole team.</p>
A contents/articles/43.html

@@ -0,0 +1,18 @@

+----- +title: Time for a diet... +content-type: article +timestamp: 1173437940 +tags: cakephp|rant|writing +----- +<p>My fianc&eacute;e keeps telling me that too many cakes are not good for me, and I never listen: I always liked cakes! I <strong>did</strong> like the CakePHP&#8482;<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> framework too, once, and I <strong>did</strong> write <a href="http://www.h3rald.com/projects/view/cakephp-herald">some articles</a> about it in the past, and I believe at least a bunch of Bakers found them useful, especially at the time.<br /> +I do believe the Cake&#8482; Software Foundation<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> quite liked having their framework featured on popular websites like php|architect and SitePoint, and I believe that I contributed &#8211; to some extent &#8211; to make it one of the most popular frameworks available for the <span class="caps">PHP</span> programming language.</p> +<p>Unfortunately though someone decided that two of such articles and my personal website were no longer worth a mention on CakePHP official website frontpage. To me, this makes sense since the two CakePHP-related series which are being published by <span class="caps">IBM</span> are much more up-to-date than my articles, and thus deserve such a mention instead.</p> +<p>Oddly enough, I took a screenshot of the CakePHP website just yesterday <em>&#8220;by chance&#8221;</em> and my articles were still there:</p> +<p><img src="http://www.h3rald.com/img/pictures/cake-promo/cakephp-08032007.png" alt="" /></p> +<p>&#8230;while this morning they weren&#8217;t anymore:</p> +<p><img src="http://www.h3rald.com/img/pictures/cake-promo/cakephp-09032007.png" alt="" /></p> +<p>Of course I can&#8217;t provide any proof that I took the screenshot yesterday, and of course I don&#8217;t have any proof of the fact that someone in <span class="caps">CSF</span> may have thought that due to my recent <a href="http://www.h3rald.com/blog/view/42/">bad behavior</a> my articles didn&#8217;t deserve to be publicized anymore. I am confident that the Cake Software Foundation always does its best in keeping its site up-to-date, and I am glad that yesterday&#8217;s accident reminded them that there were far better articles which needed to be featured on their site. At least I <em>finally</em> did something good for the community!</p> +<p>Sarcasm apart, I feel I owe an apology for blowing this whole thing out of proportions: I disclosed embarassing details about our past project which &#8211; for the sake of the framework &#8211; should have never been made public, perhaps.<br /> +I want all of you to know that I still think that CakePHP is the best <span class="caps">PHP</span> framework ever made and I genuinely think that Larry E. Master did outstanding work in all this time, along with the rest of <span class="caps">CSF</span> members and contributors. Best of luck for your future editorial and development projects.</p> +<p>Since now my contributions are no longer &#8220;officially recognized&#8221;, I think I&#8217;d better to move on devoting my attention to something else.</p> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> &#8220;CakePHP&#8221; and &#8220;Cake&#8221; <em>seems</em> to be registered trademarks of the Cake Software Foundation Inc. I&#8217;m not sure if I&#8217;m allowed to use them in this blog &#8212; If anyone has any problem with it, please let me know.</p>
A contents/articles/8.html

@@ -0,0 +1,9 @@

+----- +title: New site operative +content-type: article +timestamp: 1144335420 +tags: website|webdevelopment|cakephp +----- +<p>Yes, it works. Perhaps it&#8217;s a tiny bit slower than expected but the new h3raLd.com seems to work.<br /> +I&#8217;ll probably find some new exciting bugs to fix in the next few hours, as usual &#8211; that will be annoying but perfectly normal.</p> +<p><del>The good thing is that the new template seems to load faster, mostly due to the fact that I hardly used images</del> &lt;- [not true, te new site appears to be slower, maybe not due to the images], at any rate, let&#8217;s see how it goes. I can imagine I&#8217;ll have to implement some sort of caching system for the tagging system in particular, but fortunately <a href="http://www.cakephp.org/">CakePHP</a> apparently comes with a built-in caching mechanism for views, models etc. etc. although the documentation available seems to be <a href="http://groups.google.com/group/cake-php/browse_thread/thread/f0f96751bb61bc7b/bcb43c97e91923c7?q=caching&amp;rnum=1#bcb43c97e91923c7">scarce</a> at the moment, and I&#8217;ve been to lazy to investigate any further.</p>
A contents/articles/9.html

@@ -0,0 +1,15 @@

+----- +title: Riddle me this... and you'll get the job! +content-type: article +timestamp: 1144419238 +tags: personal +----- +<p>Today I had my <em>n^th^</em> job interview. Yes, I&#8217;m getting used to them by now, and it&#8217;s becoming quite entertaining: if they <em>paid</em> me for just take interviews I&#8217;d do that for all my life quite happily! <br /> +But since that&#8217;s not going to happen I&#8217;d better get a move on and find a so called <em>real job</em>. Actually this time it wasn&#8217;t the usual complete waste of time and this company <em>nearly</em> made me a proper offer: they&#8217;re gonna see me again next week, so let&#8217;s hope for the best.</p> +<p>The interview was one of the best ever, no doubts. They were friendly enough, they seemed to like me enough and they were even entertaining enough&#8230; one thing which actually <em>never</em> happened to me before: they asked me to solve a sort of pseudo-IQ-test(an annoying semi-pointless riddle, in other words), and here&#8217;s a rough translation from Italian, the comments within square brackets are mine:</p> +<blockquote> +<p><em>You&#8217;re alone in a pitch black room [&#8230;nice intro, eh?] and the only thing you have are two fuses of different length and a lighter [thank God for that, now it&#8217;s all much better]. You know that both the fuses can burn in exactly one hour each, although there&#8217;s no proportional law which bonds the lenght of the fuses to the time necessary to burn them; how can you measure 45 minutes, exactly?</em></p> +</blockquote> +<p>I solved that, eventually, and I got the job! Weheee!</p> +<p>No, more or less, but not quite&#8230; I&#8217;m gonna see them again, and evaluate their offer along with the other(s).</p> +<p>The solution of the riddle? NO <span class="caps">CHANCE</span>! Go and figure it out, it&#8217;s not hard.</p>
A contents/articles/a-look-at-drupal.html

@@ -0,0 +1,7 @@

+----- +title: A look at Drupal +content-type: article +timestamp: 1137048164 +tags: php|webdevelopment|review +----- +<em><strong>Important Notice:</strong> This article is about changes occurring to zZine Magazine's site[1]. At the time of writing, <a href="http://www.zzine.org">www.zzine.org</a> uses the old site, and not the Drupal-based one presented in this article, which is currently under construction[18].</em><br /><br />"Why can't we log who edits the articles?"<br />"Can we send newsletters?"<br />"We should really have a members' area..."<br /><br />zZine.org[1] is a scratch-built site, coded from the ground up to offer zZine journalists, editors and readers all the functionalities and features they wanted. I'm not totally against sites being coded from scratch, but what happens if something needs to be fixed, or new functionalities have to be implemented and you realize that the code cannot be extended or patched easily?<br /><br /><strong>Case Study: zZine Magazine</strong><br /><br />zZine Magazine is an online magazine which publishes not only IT-related and other articles on a weekly basis, but also monthly publications containing CyberArmy[2] digests, special columns, and featured articles. A team of journalists, researchers, editors, publishers and outside contributors has access to the zZine site to write, submit, and edit articles, manage publications and perform various other tasks through a password-protected administration area. This is common to approximately 75% of the websites on the Internet: they have a front-end to present content to the general public and a semi-hidden administration backend which is normally more difficult and tedious to code. That's why someone started developing <em>Content Management Systems</em>[3]: ready-made, fully-featured administrative back-ends for creating and managing almost any kind of website, from blogs to eCommerce portals.<br /><br />Could a CMS be used for zZine Magazine? Probably - zZine doesn't need any innovative or advanced features, just a bunch of commonly-used functionalities like:<br /><ul><br /> <li>Add, delete, edit and publish articles</li><br /> <li>Customizable user permissions, ideally role-based </li>(writer, editor, publisher, etc.)<br /> <li>Creating and managing monthly publications</li><br /> <li>Editor's tests</li><br /> <li>User signups, notifications, etc.</li><br /> <li>RSS feed generation</li><br /> <li>Sending newsletters to subscribers</li><br /> <li>Logging user actions</li><br /></ul><br />Some members of my team raised some concerns regarding the usage of a CMS, which were mostly based on our past experience with just a particular product and not CMSes in general. Everybody agreed that if we were to go back to a CMS, we <em>had</em> to choose the <em>best</em> this time: something flexible, easy to use, fast, search-engine friendly, and extensible. I spent some time researching CMSes, because while I knew that there's no such thing as the best CMS, there was certainly a CMS that was best for our needs.<br /><br /><br /><strong>Making the right choice</strong><br /><br />In the past, I had played around with Xoops[4] when I first thought about creating websites, and I used Mambo[5] for some other sites. I admit that I never actually spent time creating complex Mambo components and modules, but I must say that in the end I felt somehow tied to third-party modules and unable to understand how they really worked: Mambo seemed to give developers too much freedom, and had neither a solid API nor conventions to follow, at least when I used it.<br /><br />So I decided to have a look around again, starting from the two most important sites people should look at when choosing the most suitable CMS for their work. <br />The first site is CMS Matrix[6] which - as the name implies - provides a really handy <em>matrix</em>, or chart, to compare the various features offered by nearly all CMS available, both proprietary and open-source.<br /><br />I remember choosing Mambo last time I used the matrix simply because it appeared to be one of the most feature-rich. This is actually something <em>not</em> to do when choosing a CMS: always concentrate on what your site needs rather than what the CMS is able to offer. Otherwise, you run the risk of having too much to work with.<br /><br />The other important website to visit when choosing a Content Management System is OpenSourceCMS[7], which basically allows you to try a demo of every open source CMS online. This is perhaps more useful, but also much more time-consuming: it's better to narrow down the list of possible CMSes after checking CMS Matrix and then try each one rather than just picking one at random.<br /><br />At this point, an experienced CyberArmy staff member[8] suggested Drupal[9]. I asked her why, and she simply said that it seemed to be the best choice according to zZine's needs, as it basically offered all the features we were looking for, either natively or through modules. She also admitted to be biased, as she's actually <em>part of Drupal's documentation team</em> and involved with Drupal development[10].<br /><br />Before making any kind of commitment, I checked out Drupal's website to see how they organized things, and I was quite impressed. I immediately noticed the Handbooks section[11], which contains all the official Drupal documentation and it seemed pretty much complete. No "under construction", "please write content here" or "we're a new project, help us write the documentation" notes, just a load of good-quality documentation, including a fully documented and <em>stable</em> API![12] <br /><br />This surprised me, because some projects I came across, even really good ones, lacked a proper documentation section. I think this is a common problem with new open source projects, and Drupal for this reason gave me the impression to be quite mature and useable already. After visiting the very clear and organized Downloads Section[13], I downloaded the CMS and a few modules and installed it on my laptop.<br /><br /><br /><strong>Installation</strong><br /><br />Drupal needs three things to run:<br /><ul><br /> <li>A web server - Apache is fine, and ISS is reported to be working</li><br /> <li>PHP - Either version 4 or 5, Drupal started supporting PHP5 since 4.6.0 release</li><br /> <li>A PHP-compatible database - MySQL or PostgreSQL is recommended</li><br /></ul><br />I used a WAMP[14] installation to test Drupal. First of all, I created a MySQL database, granting ALL privileges to the database user accessing the Drupal database. When I uploaded the site to the remote server, later on, I had some problems because the LOCK TABLES privilege wasn't granted by the host. Drupal requires this, so I had to contact my host to solve the problem. I then imported the database scheme located in the <em>database</em> directory under the installation directory and modified the configuration settings (sites/default/settings.php) to allow Drupal to access the database. Installation complete.<br /><br />Drupal was now up and running with the default configuration settings, with a minimum of fuss. For all the details concerning the installation process, consult the exhaustive documentation.[15] I didn't read it when I installed it, but it can really be useful in some situations.<br /><br /> There are actually two non-critical things to consider if you're planning to use Drupal for a medium-sized project: the first involves changing a few settings on php.ini, in particular increasing the amount of memory allocated to PHP from 8MB to 16MB, especially if you're planning to use either a lot of simple modules or a few complex ones, and the second is setting up your crontab to execute <em>http://www.yoursite.com/cron.php</em> every hour or so. This is required by some semi-essential modules like the site-wide search, but a common alternative (if you don't want to setup the <em>cron</em> task manually) is the poorman's <em>cron</em> module[15], which I used myself and found to be workable. <br /><br /><br /><strong>Keeping your site under control</strong><br /><br />Perhaps one of the best things Drupal has to offer is a rock-solid general-purpose administrative backend. The first thing I found in the backend which really impressed me (and that also I never found in another CMS) is the ability to create <em>custom</em> role-based user accounts and access permissions for <em>everything</em>: every module can be configured so that, for example, not all people can see its output and just a few can administer and modify it.<br /><br />For zZine, I created four types of accounts:<br /><ul><br /> [*]<em>Administrator</em> - Able to access everything and change every setting of the site<br /> [*]<em>Publisher</em> - Able to write, edit and publish every kind of content on the site, but not able to administer user accounts, permissions and similar administrator-only tasks.<br /> [*]<em>Editor</em> - Able to write and edit anything on the site, but not to publish it.<br /> [*]<em>Writer</em> - Able to write articles, blogs and similar content, but in some cases not allowed to edit it.<br /></ul><br />These were precisely the account types I was looking for in a CMS. Granted, other products offer them by default, but having pre-defined account types is one thing, and being able to customize them completely is another.<br /><br />User accounts are great, but sometimes it's good to know what the users of your sites are doing as well. On our old site we had user accounts for editors and administrators, and even if only a few people had access we had no way to determine who edited an article or who published something unless that person told us. Drupal comes with a radical solution to this: Almost every action is automatically logged by the <em>watchdog</em> core module. Every website error, every page not found, and every PHP or MySQL error is logged, as well as every content submission or modification. Page accesses, meanwhile, can be logged through the statistics module. <br /><br />Themes & Templates<br /><br />"We shouldn't use a CMS: I don't want zZine to have the overly used *nuke-style look." I've heard this too many times. Sometimes people associate the word "CMS" with "lack of original design", and that's not true by any means, especially for Drupal. Of course, there are plenty of ready made themes[16] which can be freely used or modified for any Drupal-based site. <br /><br />I must confess that when I first saw the themes section I feared that Drupal "themes" used their own template engine, like some CMSes do nowadays, but I was wrong: currently Drupal supports some template engines[17] but also pure PHP-based ones. Theme engines do their job wonderfully and can offer some interesting features, but templates written natively in PHP tend to perform better, simply because there's no extra parsing or additional overhead involved.<br /><br />I decided to have a look at a standard PHP theme. Basically, it's nothing more than a PHP-enriched xHTML file and its corresponding stylesheet. There are a few functions which must be used to perform particular tasks, like showing the main navigation links, but nothing too hard to understand. It's also <em>very</em> customizable. In fact, we're already working on a custom zZine theme, which doesn't seem any harder than coding a standard xHTML template. As design should always be the last thing to worry about, I decided to use a temporary template I created by slightly modifying an existing one.[18]<br /><br /><br /><strong>To switch or not to switch?</strong><br /><br />When creating a new site for an organization which already has one, there's something very important to consider: <em>what happens to the old data</em>?<br />Assuming the old site was dynamic and using a database of some sort, there are three possibilities:<br /><ul><br /> <li>Don't bother doing anything: any data on the old site will not be transferred to the new one.</li><br /> <li>Make the old website available somewhere else as an </li><em>archive</em> of old documents.<br /> <li>Import all the data from the old site to the new one. </li><br /></ul><br />Obviously we went straight for the third one, which is the most difficult to implement, but it was necessary: there were over 1000 articles on the old site-<br /><br />Of course, in reality, I didn't even mention the possibility of using Drupal until I figured out a way to import the old data into the new database structure. Never praise features or convince people to switch unless you're 100% sure you can handle the situation. Luckily for me, it turned out that everything could be imported easily enough.<br /><br />The first difference I found between Drupal and zZine was that we didn't really have proper user accounts. Every article had an author, but it was stored as a field in the article's record, and that was all. Drupal, on the other hand, supports (and perhaps requires) user accounts - everything present on the site must be written or edited by an existing user.<br /><br />The solution I cam eup with was rather drastic: I created about 120 user accounts, retrieving usernames from the articles and inserting them through a custom PHP script into Drupal's user table. Of course, those users never registered on the new site[18], so I didn't personalize the accounts at all: I simply put a notice on the first page asking everyone who contributed to zZine before to contact me in some way to enable their account with a valid email address.<br /><br />After this initial difficulty, importing articles was relatively easy. Pretty much every type of content in Drupal is, in its simplest form, a <em>node</em>. Nodes have a title, which is a teaser generated automatically from the body text, and an author (the node table in the database has more fields, but these are the key ones for us). Essentially, Drupal's two default models for writing <em>stories</em> and <em>pages</em> write data to this table only. The most important thing to understand about Drupal is that almost every module used to create <em>something</em> on the site - an article, a blog entry, even songs - will use the node table, and add everything else on other tables. This makes the whole system much easier to administer: every node can potentially be extended <em>in any way</em> by third party modules! <br /><br />What about categories? Well, Drupal has become famous for its taxonomy module: whereas most CMSes only support, or in fact <em>impose</em>, a one- or two-level hierarchy for categories, Drupal's taxonomy module supports the creation of as many different terms to describe data as you can think of. Each piece of content (categorization can be applied to <em>any</em> node, and since almost everything is a node-) can belong to none or <em>n</em> different categories, which can be nested in a <em>n</em>-level hierarchy. Since the zZine articles were already divided into categories, I imported all of them directly into Drupal. On the old zZine site, every article could have at most one category, which is fine, but it's good to know that we can now configure the system to support a more advanced categorizing system.<br /><br />After importing the articles, the last important thing to transfer to the new site were the zZine Publications. Publications are what we call the article collections that we release as an issue every month. I could have created a new module for this, and it wouldn't have been that hard, but there was already an excellent module for that. This was pure luck, but the <em>epublish</em>[19] module seemed like it was tailored specifically for our needs.<br /><br /><br /><strong>Drupal API and Modules</strong><br /><br />We were lucky enough to be able to use existing modules for the main functionalities of our site, but in some cases you might not be able to find <em>exactly</em> what you're looking for.<br /> <br />In our case, even if we could have used the <em>story</em> module, which is part of the default installation, for zZine articles (stories have a body, a teaser, a title and an author, exactly like our articles) we decided not to. I wanted our editors and writers to know what to use when submitting articles, and the name "stories" sounds a bit too ambiguous for my liking. So, I decided to have a look at the standard story module to see how modules work, and create something similar.<br /><br /><em>Note: I'm curious by nature and I didn't read anything in the Drupal API[12], or about developing custom modules; I looked at the story module without any prior knowledge of Drupal's conventions.</em><br /><br />All I found in the story module was a bunch of functions like:<br /><code><br />/**<br /> * Implementation of hook_node_name().<br /> */<br />function story_node_name($node) {<br /> return t('story');<br />}<br /></code><br /><br /> which seemed to be enough to tell the Drupal core what to do. I was used to Mambo components, where developers have more liberty to do what they want, including outputting HTML code anywhere. Drupal is nothing like that; on the contrary, it has its own structure and coding conventions that developers have to follow when creating custom modules. Even if a simple function like the one above is fully commented, it has to have a standard indentation (two spaces) and an obviously standardized name. I noticed that all the functions similar to this one started with "<em>story_</em>", so I created a new file named <em>zzarticle.module</em>, copied and pasted the story module code into it, and changed every function accordingly, like this:<br /><code><br />/**<br /> * Implementation of hook_node_name().<br /> */<br />function zzarticle_node_name($node) {<br /> return t('zZine Article');<br />} <br /></code><br />Trivial enough, and it worked fine! I put my shamefully copied module in the /modules directory and I was able to create "zZine Articles" (which were nothing but stories with a different name).<br /><br />At this point I decided to have a proper look at the API, and read about hooks:<br /><br /><fieldset><blockquote><em>"Drupal's module system is based on the concept of "hooks". A hook is a PHP function that is named foo_bar(), where "foo" is the name of the module (whose filename is thus foo.module) and "bar" is the name of the hook. Each hook has a defined set of parameters and a specified result type.<br /> To extend Drupal, a module need simply implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and call that hook in all enabled modules that implement it. [-]"</em></blockquote></fieldset><br />A <em>hook</em> was used for the previously mentioned function, and this was diligently commented:<br /><br /><code><br />/**<br /> * Implementation of hook_node_name().<br /> */<br /></code><br /><br />This made me understand how Drupal is actually geared towards developers and at the same time suitable for non-technical users. Wait a minute, what if someone is not familiar with PHP and still needs custom modules and features? Is there any way to extend Drupal without having to physically code new things? Yes, there is, and two modules come to mind:<br /><ul><br /><br /> [*]<em>Webform</em> - allows the creation of any kind of web form. Users can customize field types, values, labels and messages. The module also provides ways to process forms by either saving data to the database or emailing it, which we can use for things like the Editor's Test and surveys.<br /> [*]<em>Flexynode</em> - This module is simple and powerful - it allows users to create their own content types without coding a single line. In my example, I cloned the story module to create the zZine Article content type. This is easy to do, and functional, but what happens if someone wants to include an additional field to the article submission form? I can probably do this using hooks, but if I was lazy I could do the same thing with the <em>flexynode</em> module. I actually used this module for our podcast section[20], and it did an excellent job.<br /></ul><br /><br /><strong>Conclusions</strong><br /><br />For now I must say I'm very happy with what Drupal has to offer, and if there's something we need for the site, we can code it ourselves and then integrate it into Drupal. <br />One of the major strengths of this CMS is definitely its developer-friendliness: while other CMSes mainly focus on users at the price of limiting extensibility and trapping developers into predefined modules, Drupal even encourages developers to integrate their code into the existing structure, opening virtually unlimited possibilities. Granted, it may seem difficult to understand at first, some people I talked to told me that 'Drupal is too complex' or has a rather steep learning curve, but I just think everything becomes clearer after reading parts of the vast documentation section: this is the only price to pay, and believe me, it is definitely worthwhile.<br /><br /> <br /><strong>Notes</strong><br /><small><br />[1] zZine Magazine: <a href="http://www.zzine.org">http://www.zzine.org</a><br />[2] CyberArmy Community: <a href="http://www.cyberarmy.net">http://www.cyberarmy.net</a><br />[3] Content Management System, Wikipedia page: <a href="http://en.wikipedia.org/wiki/Content_management_system">http://en.wikipedia.org/wiki/Content_management_system</a><br />[4] Xoops - Official Page <a href="http://www.xoops.org/">http://www.xoops.org/</a><br />[5] Mambo - Official Page: <a href="http://www.mamboserver.com">http://www.mamboserver.com</a><br />[6]CMS Matrix: <a href="http://cmsmatrix.org/">http://cmsmatrix.org/</a><br />[7] Open Source CMS: <a href="http://opensourcecms.com/">http://opensourcecms.com/</a><br />[8] Snarkles's CyberArmy Profile: <a href="http://www.cyberarmy.net/~snarkles">http://www.cyberarmy.net/~snarkles</a><br />[9] Drupal - Official Page: <a href="http://www.drupal.org">http://www.drupal.org</a><br />[10]Webchick's Drupal Profile: <a href="http://drupal.org/user/24967">http://drupal.org/user/24967</a><br />[11] Drupal - Handbooks: <a href="http://www.drupal.org/handbooks/">http://www.drupal.org/handbooks/</a><br />[12] Drupal API: <a href="http://drupaldocs.org/api/head">http://drupaldocs.org/api/head</a><br />[13] Drupal Downloads: <a href="http://www.drupal.org/project/">http://www.drupal.org/project/</a><br />[14] WAMP Server Package: <a href="http://www.wampserver.com">http://www.wampserver.com</a><br />[15] Drupal - Installing and Upgrading documentation: <a href="http://drupal.org/node/258">http://drupal.org/node/258</a><br />[16] Drupal - Themes: <a href="http://drupal.org/project/Themes">http://drupal.org/project/Themes</a><br />[17] Drupal - Theme Engines: <a href="http://drupal.org/node/509">http://drupal.org/node/509</a><br />[18] zZine Beta site: <a href="http://beta.zzine.org">http://beta.zzine.org</a><br />[19] Drupal - ePublish module: <a href="http://drupal.org/project/epublish">http://drupal.org/project/epublish</a><br />[20] zZine Podcasts: <a href="http://beta.zzine.org/podcasts">http://beta.zzine.org/podcasts</a><br /></small><br />
A contents/articles/academic.html

@@ -0,0 +1,111 @@

+----- +title: Thoughts about the Italian Academic Education +content-type: article +timestamp: 1120768200 +tags: italy|personal|rant +pdf: true +----- + + <section class="section"> +<p>I found this article today, buried in my mailbox. I wrote it just over five years ago, the evening after failing the last, insignificant exam necessary to get my degree in IT Engineering.</p> +<p>I eventually passed the damn thing, got my B.Sc., and found a great job right afterwards, while all my former fellow students were still studying pointless crap. Maybe some of them are still studying pointless crap right now, and they&#8217;re still living with their parents.</p> +<p>I was very lucky. If I didn&#8217;t fail that exam perhaps I would have kept studying for my master&#8217;s degree for years, and maybe today I wouldn&#8217;t even have a job, or be married!</p> +<p>I decided to re-publish this article because it&#8217;s part of what I am, and I&#8217;m not ashamed of it. I corrected a few of the most obvious spelling and grammar mistakes, but I didn&#8217;t edit it or censor it otherwise.</p> +<p>It may be a senseless rant, but my opinion of the Italian Education System is still the same: If I&#8217;ll have a child who wants to study anything technical someday, I&#8217;ll tell him/her to get the hell out of Italy and go abroad to study in a <em>real</em> university.</p> +<p style="padding-left:15em;"><strong>Fabio Cevasco</strong> &#8212; <em>Saturday, July 31st 2010</em></p> +<section class="section"> +<header><h1 id="h_1" class="toc">The Pre-computer Age</h1></header> +<p>Who am I? I&#8217;m just an Italian student taking the last exams to obtain my B.Sc. in IT Engineering. Obviously I&#8217;m quite interested in Information Technology and everything concerning computers or the Internet, and &#8211; believe it or not &#8211; this probably came from my parents&#8217; original dislike of computers themselves.</p> +<p>in Italy, unlike in most of the other capitalistic countries of the world, kids tends to listen to their parents until they reach their &#8220;full maturity&#8221;, i.e. 25 years of age at least (by the way, I&#8217;m 22), so, to cut a long story short, I was allowed to have a computer at home when I was 16 years old. I couldn&#8217;t believe it when the technician brought it at home: sure I&#8217;d seen a computer before in my life, but that was mine, and I could use it to do something amazing, as I dreamt many times.</p> +<p>The point is, from another point of view, that I felt behind already compared to my friends who were already boasting their records at various computer games. Fools.<br /> +On another note, I was a bit different from other Italian kids: I always liked writing and reading in English since I was 6, because I found the language to be quite amazing or even magic for the way it sounded, as I used to say to my friends. Friends &#8211; the Italian ones, that is &#8211; who never really understood me totally, and in particular my<br /> +passion for the Anglo-Saxon cultures: for them, writing and reading in English were just boring and difficult things you had to do at school, while I enjoyed reading The Tempest by Shakespeare when my English teacher didn&#8217;t even teach me the past tense, yet. A fool?</p> +<p>My passion for the English language was soon noticed by my parents, who let me go to England a few times, to college: basically a fashonable way for english schools and travel agencies to rob honest families, promising them that their kids would have learnt a new language enjoying themselves. Result: the kids enjoyed their holiday a lot, but basically always spoke Italian to each other (and even to English people over there) and the families were happy when they came back because after spending so much money they must have learnt something&#8230;</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Using the Computer and the Internet</h1></header> +<p>Back to that amazing and weird magic box called computer: I immediately enjoyed experimenting new stuff, playing with Windows (for me the word &#8220;Linux&#8221; at the time would have sounded not too different from some names of medicines my grandparents were taking), and even playing games, why not, but in English of course, because I never<br /> +really liked Italian translations (yes, we even dub video games!).<br /> +I remember my biggest fear was not being able to catch up with my friends who had a computer for years: I was so obsessed with that that I often stayed on the PC more than the 2-3 hours allowed by my parents, when they were away. Some time later, and relatively recently, I discovered that I catched up relatively soon, without even noticing it.</p> +<p>I&#8217;ve been allowed to access the Internet when I turned 18, because my parents were scared it could be just another bad thing, and still I found myself behind if compared to my friends, who&#8217;ve been surfing the web long before.</p> +<p>Only now I notice that perhaps my parents made me discover new things about PCs which my friends never bother learning, even now that they&#8217;re graduating. I remember my mum calling me for a silly pseudo-scientific divulgative program where they were describing this new, totally free operating system different from Windows who was supposed to work much better. &#8220;It said the name before&#8230; it&#8217;s Luxi&#8230; lixi&#8230; lunis&#8230;&#8221; &#8211; Linux.</p> +<p>When I had access to the Internet my life really changed. I do believe that unlike my friends I used the Internet for its very purpose: sharing knowledge, or, in my case, just learning. I also made a vow to myself: to surf <span class="caps">ONLY</span> (unless I had to) English/International websites; a vow which I&#8217;m keeping still nowadays, which seemed utterly illogic<br /> +to my friends and Italians in general.</p> +<p>Immediately a whole new universe opened to my eyes: I quickly learnt how to keep up-to-date on the recent events regarding computers, I learnt some rudiments of Internet and Hacking Culture (thanks <span class="caps">ESR</span> for all your papers) and the Open Source movement, and linux, etc. and I noticed two things:</p> +<ul> + <li>I was definetely catching up with my friends&#8217; &#8220;knowledge&#8221; in computing</li> + <li>I would have <span class="caps">NEVER</span> ever managed to learn even 1/10 of all you need to know about computers: the same as in life, and I was happy with it.</li> +</ul> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">The Pre-academic Period</h1></header> +<p>In the meantime I was studying in a Liceo Scientifico, a kind of scientific high school where basically they make you study all sort of subjects (from geography, to maths to phylosopy, to Latin) mainly focusing &#8211; they say &#8211; on Science-related disciplines. For those who don&#8217;t know, in Italy you don&#8217;t get to choose what you want to study: in<br /> +High School and University they let you choose basically a type of school, but subjects and courses cannot be changed, apart from a few exceptions.<br /> +I &#8220;chose&#8221; a particular type of scientific school (&#8230;the exception!) where basically I agreed to study an additional subject &#8211; Computer Science &#8211; in addition to all the rest, for a total of more than 30 hours per week. I studied a lot then, because my parents taught me that Culture was important, and that &#8220;if you&#8217;re ignorant you can&#8217;t do anything nowadays&#8221;. No, my parents weren&#8217;t ignorant themselves, my dad is a Mechanical Engineer and my mum a Latin/History/Italian professor &#8230;and yes, that helped my forma mentis a lot.</p> +<p>I studied a wide range of subjects, including something totally irrelevant with my favourite ones: English and Computing (note: I say &#8220;Computing&#8221;, not Maths), and I did quite well in the end, graduating from High School with a mark of 100/100. While I was studying Latin, Phylosophy and alikes I was thinking that at least at University I&#8217;d have studied something really more specific.<br /> +Until the end I was undecided on which faculty to choose, whether IT Engineering or Foreign Languages. I was very fond of English and languages in general, but I primarly liked computers, so I thought that if I studied IT Engineering I&#8217;d have learnt more about computers and my already half-decent knowledge of the English language would<br /> +have helped me in my studies (&#8220;Now they <span class="caps">REQUIRE</span> a good knowledge of English, at university&#8221;) and in my future, when I&#8217;d have started working. <span class="caps">FOOL</span>.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Alice in Wonderland</h1></header> +<p>That was it, I remember exactly when I went to sign my pre-enrollment papers: IT Engineering. I was so happy to have made it! Now finally I would have studied what I was meant to.</p> +<p>On a side note, I was never too good at Maths, I don&#8217;t know why. I just didn&#8217;t like it because it felt too theorethical for me, and not as useful as I thought,<br /> +especially for programming. In High School I was taught a bit of the Pascal 3 programming language, and that turned out to be perhaps one of the most useful things I&#8217;ve ever studied.</p> +<p>The first disappointment came from the courses that they setup for the first year: two <span class="caps">BIG</span> Maths-oriented exams in particular, and Chemistry(!). What Chemistry has to do with Computer Science remained a mystery to me, people claimed that we might be asked in the future to do some programs to help studying the structure of matter and doing<br /> +chemical analysis&#8230; yes, and following the same logic I should have been studying the structure of languages, because AI programs and translators would certainly become key applications in the future.</p> +<p>Oddly enough, they made us just study Chemistry.</p> +<p>&#8220;But next year will be better&#8221; &#8212; I was thinking, after getting fairly poor results in the Maths exams &#8212; &#8220;next year we&#8217;ll study something more exciting&#8221;.</p> +<p>Economics.</p> +<p>They made us study Economics because they think that it&#8217;s useful to know something about finance and salaries, especially when you start working. That makes sense, to an extent, of course, and it was kind of interesting even. But still I didn&#8217;t study anything really useful.</p> +<p>This is a little lie, actually, because we actually had two programming exams (out of 17) in which they taught us a bit of C++, and <span class="caps">THAT</span> was interesting, and I even managed to get 30/30 out of the last one: I liked it.</p> +<p>I actually remember when the teacher came in, and insisted for us to use a unix emulator (Cygwin) to compile our C++ programs: people thought that &#8220;emulators&#8221; were used for running games released for a gaming console on the PC, and what the hell was unix? It looks like &#8211; they said &#8211; a bad copy of <span class="caps">DOS</span> with more difficult commands. (No comment)</p> +<p>I lived my years at University (three, counting this one which will be the last one) feeling superior to my friends for knowing more about computers but at the same time inferior to them when it came to exams: I didn&#8217;t really like most of the subjects, especially some rather abstract mathematical models which <span class="caps">COULD</span> BE useful, but &#8211; let&#8217;s<br /> +say it all &#8211; most people outside Italy don&#8217;t really give a sh&#8230;illing about. What&#8217;s the point in learning the demonstration of Cauchy theorem? Just use it maybe, and it would have a sense&#8230; No, they wanted you to study the demonstration and tell them about it, without missing a passage, which normally &#8211; for 2/3 of people at least &#8211; meant<br /> +&#8220;learn it by heart&#8221;.</p> +<p>Also, unlike in other countries, professors are more similar to Gods than clever people, apart from a few exceptions. Every professor decides how the students have to take the exams, some of them opt for having some <em>compitini</em> (little tests) during the semester and then the average mark on all of them (normally two or three) represents the<br /> +exam&#8217;s final mark: that&#8217;s the best, probably, but it could also mean that people can cheat trying to copy from their collegues, etc.</p> +<p>Normal, get on, it&#8217;s Italy!</p> +<p>Some professors might allow you to use the notes you took during classes, but that&#8217;s often considered a bad thing because people can potentially copy from one another (&#8220;What&#8217;s that piece of paper, is it your friend&#8217;s?&#8221; &#8211; &#8220;No, it&#8217;s part of my notes&#8221;), and they often do. On the other hand, if a professor doesn&#8217;t allow notes to be used, students<br /> +normally do their best to sneak and use them anyway.</p> +<p>This is Italy, after all, the place where everything can be sorted out if you&#8217;re cunning enough.</p> +<p>But why do some people cheat? Oh well, simply because either you devote 3 full years of your life to studying pointless crap and forgetting that you&#8217;re wasting the best years of your existence, or you have to do something to pass 10 exams a year. Because we <span class="caps">REALLY</span> do take 10 exams a year.</p> +<p>My girlfriend (who&#8217;s English and living in Italy, by the way) told me that her brother wanted to study Computing at University but switched to Politics &amp; Journalism because they wanted him to learn Java on the very first year. I&#8217;ve never been taught Java &#8212; I had to learn it all by myself for my final thesis (see below) &#8212; but instead I learnt a ton of demonstrations of theorems and mathematical models. Great, isn&#8217;t it?</p> +<p><em>&#8220;But you knew you were going to take those exams, because they are publicly available before enrolling&#8221;.</em></p> +<p>That&#8217;s true and it makes sense, and I probably should have chosen Computer Science instead of IT Engineering if only it was considered equally important. In Italy if you study Engineering you can (after taking yet another exam) become an Engineer, which &#8212; unlike other countries &#8212; is not a competent person who knows how to fix stuff and can solve problems. Rather, he&#8217;s someone who got an important academic title who is treated like a demi-god because he knows (or should know) what&#8217;s a differential system and how can be solved but &#8212; sometimes &#8212; doesn&#8217;t know how to use it.</p> +<p>But he&#8217;s an Engineer, and he can find work when others can&#8217;t.</p> +<p>To explain this concept to non-Italian, I can summarize all this with the following:</p> +<p>In Italy Academic (Skool) Titles rulez &#8211; You ain&#8217;t got none? You ain&#8217;t nothin&#8217; coz I got one and I own you.</p> +<p>And that&#8217;s that. In Italy knowledge is dead. (This is an exaggeration, but please try to get my point).</p> +<p>If you need to be competent in something, when you&#8217;re working you&#8217;ll have to do a practical course (even paying for it yourself) if some &#8220;knowledge&#8221; is needed. If there&#8217;s no risk that things can blow up, you can remain ignorant.</p> + +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">The Vanishing Cheshire Cat</h1></header> +<p>Up to today I could leave with it, I knew that abroad the situation was hopefully different, but I started to cope with the fact that I would have got my B. Sc. and in addition I knew more stuff than some of the others who got the degree at the same time. A few months ago I had just a few exams left and I started going to the lab for my thesis project, with a friend of mine.</p> +<p>At that point &#8212; oddly enough &#8212; I was told to develop an application in Java, using some libraries, and actually make something fully functional and (somewhat) useful. I couldn&#8217;t believe it! I was happy on one side, and angry on the other, because <span class="caps">NOBODY</span> ever taught us about Java or about creating an useful application.</p> +<p>The Ph.D. Student who was appointed to help us with the project told us: &#8220;That&#8217;s the way it works, it&#8217;s normal that you don&#8217;t know Java, but you know a bit of C++, and now it&#8217;s time to research&#8221;. That was again very shocking: it was the first time that someone ever told me something like this, and in the end we agreed on the project.</p> +<p>Despite the fact we had to implement some new features and test them relatively at the last minute, we succeeded in developing the program. In particular, I actually played an important part being the one who actually researched something on Java already, and knew more about programming.</p> +<p>Oddly enough, my collegue would have graduated with a higher mark than me, even if he originally thought that &#8220;<span class="caps">SSH</span>&#8221; was nothing but a sound used to shut people up and that <span class="caps">HTML</span> was a proprietary standard introduced by Microsoft having something to do with web pages. If you&#8217;re reading all this mate, don&#8217;t get angry at me: I have nothing against you, I just hate the System, as usual.</p> +<p>He still probabally thinks that POP3 is something like the name of a band and that a shell can be found only at the sea. Mate, it&#8217;s not your fault, don&#8217;t blame me if I say this, blame the System!</p> +<p>I mean, I don&#8217;t consider myself an expert, but at least I&#8217;m better than that. I met students, at uni, who haven&#8217;t the faintest idea of what a sever was. And that&#8217;s pretty sad, if you ask me.</p> +<p>Let&#8217;s now come to the end of this apparently endless flow of thoughts: I still had an exam to pass in order to get the degree. Such exam counts 3/180 of the whole stuff we had to study in these three years (it is literally quantified like this on paper), and it&#8217;s about Digital Controls. Cool, you may think, but it actually means <span class="caps">MORE</span> mathematical models to solve complex(?) situations, more theorems and other crap, even if &#8212; I admit &#8212; I had to take exams worse than this one.</p> +<p>I admit I constantly underestimated the exam and took it various times without passing it: &#8220;it&#8217;s so small, I&#8217;ll have to pass it eventually&#8221;.</p> +<p>This was just the way of thinking they made us adopt, nothing more, nothing less.</p> +<p>I was quite busy testing my program and writing the thesis in this period, although we were literally told not to worry too much about it: &#8220;just google a bit on the net, copy and paste, and change some words if you feel guilty&#8230;&#8221;</p> +<p>To the guy who told me to do so: it&#8217;s just an example that is bad to read, but it&#8217;s true, you can&#8217;t deny it. I don&#8217;t blame you, because you&#8217;ve really taught me a lot about working on &#8220;proper&#8221; projects (and this is <span class="caps">NOT</span> sarcastic, really), I blame the System.</p> +<p>In the meantime I spent days running around here and there trying to sort out all the bureaucracy necessary to have all the papers ready for my degree, and I also talked to the professor who commissioned the project: he&#8217;s by far the most helpful and altruistic professor I&#8217;ve ever met, and obviously offered his complete availability for helping<br /> +us for the preparation of the degree.</p> +<p>I just needed to pass my last exam. It was the last one, not as complex as others I took, and this time I studied more than the previous times&#8230;</p> +<p>I didn&#8217;t pass it.</p> +<p>I don&#8217;t blame the professor, because probably he&#8217;s the only one who&#8217;s normal in the whole lot: he&#8217;s like me, I think, because I suspect he&#8217;s aware that abroad students don&#8217;t cheat and professors are not &#8220;flexible&#8221; on marks. I got 12/30, and I didn&#8217;t pass, that was it, I didn&#8217;t know his subject enough and he didn&#8217;t feel he had to help me to get the degree at all. And he&#8217;s right. I can&#8217;t blame him, but I DO blame such a &#8220;flexible&#8221; system which in the end is totally absurd. I learnt the hard way that I shouldn&#8217;t have &#8220;trusted&#8221; the Italian Way, because it has flaws.</p> +<p>Oddly enough, people who can&#8217;t even connect a network cable get their B.Sc., and all I get after spending months learning useful things and developing is just a load of B.S.</p> +<p>I learnt my lesson and I&#8217;ll probably re-take the exam, pass it, and maybe get the degree: my collegue and friend just emailed me telling me that I <span class="caps">HAVE</span> to help him doing the missing chapters of the thesis because he can&#8217;t write them, he&#8217;s not good at writing stuff, and doesn&#8217;t know what to write either. He&#8217;ll get his B.Sc. on September 23rd, provided that I actually decide to help him.</p> +<p>I hope people who read this can understand my frustration apart from blaming me for being &#8220;lazy&#8221; when it came to exams and expecting help when technically I didn&#8217;t deserve it. I probably won&#8217;t win the nobel prize or get rich like those two american students who own the most profitable Internet business ever conceivable. I&#8217;m not as special, and I don&#8217;t deserve anything special, and I never dreamt about it.</p> +<p>All I dreamt was being able to learn, and do something useful. It looks like it will remain just a dream, here in Italy.</p> + +</section> + +</section>
A contents/articles/akelos-interview.html

@@ -0,0 +1,63 @@

+----- +title: An Interview with the creator of the Akelos Framework +content-type: article +timestamp: 1184814120 +tags: php|rails|cakephp|frameworks +----- +<p>I <a href="http://www.h3rald.com/blog/34">already</a> <a href="http://www.h3rald.com/blog/38">covered</a> the Akelos <span class="caps">PHP</span> framework in the past, but for those who don&#8217;t know it, Akelos seems to be one of the few <a href="http://www.h3rald.com/articles/rails-inspired-php-frameworks">Rails-inspired <span class="caps">PHP</span> frameworks</a> still worth mentioning, besides CakePHP and Symphony of course.</p> +<p>I recently has a look at their recently-relaunched <a href="http://www.akelos.org/">community website</a> and I noticed this phrase:</p> +<blockquote> +<p>&#8220;Being port of Ruby on Rails to <span class="caps">PHP</span> Akelos is also optimized for programmer happiness and sustainable productivity&#8221;</p> +</blockquote> +<p>Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to <span class="caps">PHP</span>, an attempt to help <em>&#8220;Ruby on Rails developers who need to code in <span class="caps">PHP</span>&#8221;</em>, among others. Of course Akelos is not Rails, simply because Ruby is (thank God for that!) not <span class="caps">PHP</span>, however I decided to find out more, and I asked Bermi a few questions, which he promptly answered.<h4><em>There are a lot of frameworks for <span class="caps">PHP</span>, perhaps too many: why did you decide to create Akelos rather than using one of the existing ones?</em></h4></p> +<p>I started coding <a href="http://www.akelos.org/">Akelos</a> back in 2004 for our internal developments. At that time I only found very few frameworks out there like <a href="http://www.mojavi.org/">Mojavi</a> and <a href="http://ez.no/">eZ Publish</a>. These frameworks were not my ideal of an <a href="http://en.wikipedia.org/wiki/Agile_software_development">Agile development</a> environment, so I decided to brew my own solution.</p> +<p>After reading <a href="http://www.martinfowler.com/books.html">Patterns of Enterprise Application Architecture</a> it was clear to me the kind of framework I wanted <a href="http://www.akelos.org/">Akelos</a> to become, so I started to implement some of the design patterns from the book into Akelos.</p> +<p>During the summer of 2005 I had a look into other <span class="caps">PHP</span> frameworks like <a href="http://www.cakephp.org/">CakePHP</a>, <a href="http://phpontrax.com/"><span class="caps">PHP</span> on Trax</a>, and <a href="http://www.bennolan.com/biscuit/">Biscuit</a> but none of them was more complete or easier to use than what Akelos was already at that time.</p> +<p>Then I used <a href="http://www.rubyonrails.org/">Rails</a> for one small personal project and immediately found that <a href="http://www.akelos.org/">Akelos</a> interfaces, conventions and philosophy were close to the Rails approach. <a href="http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html">Rails ActiveRecord</a> implementation was impressive, better than mine and much much better than other existing <span class="caps">PHP</span> implementations, so I first ported the ActiveRecord code using <a href="http://adodb.sourceforge.net/"><span class="caps">PHP</span> AdoDB</a> as the database abstraction layer.</p> +<p>After that point, whenever I had a problem to solve while coding my customers applications I turned to Rails and they usually had the most elegant solution available. So I did like the idea of digging into Rails code to learn more Ruby and bringing Rails magic to the <span class="caps">PHP</span> world. It also helped the fact that Rails inline documentation is excellent so it could be easily adapted for Akelos.</p> +<h4><em>What&#8217;s new since last time I posted about Akelos?</em></h4> +<p>The biggest change is the direction that the project has taken. Until now we have not dedicated time to promote Akelos, we just used it for our internal projects and we have been adding features as needed without a fixed roadmap or advocacy.</p> +<p>Now this has changed. More and more developers are using Akelos and contributing functionalities they miss from Rails. After some serious contribution proposals and many developers telling us how much they like Akelos, we decided to take the time to build a nice community site which includes <a href="http://forum.akelos.org/">forums</a>, a <a href="http://wiki.akelos.org/">wiki</a>, a new <a href="http://www.akelos.org/docs/tutorials/booklink">tutorial</a> and <a href="http://www.akelos.org/screencasts">a screen-cast</a>.</p> +<p>There are also some improvements like:</p> +<ul> +<li>Sintags, now accepts ruby-like calls to helper methods from the views.</li> +<li>Action Webservice, a component for creating and consuming Web Services easily.</li> +<li>Action Mailer, which allows you to receive and send (directly or in delayed mode) emails from within your application. (this is almost ready to ship)</li> +<li>Acts as tree behavior for Models.</li> +<li>Many performance improvements.</li> +<li>Many small contributions and bug fixes.</li> +<li>Code base reduced from 16MB to 9MB.</li> +</ul> +<h4><em>From the new site, it seems that Akelos is &#8211; or aims to be &#8211; a port of Rails for <span class="caps">PHP</span>. Is that true? Do you aim to target Rails developers as possible users of the framework in situations in which &#8220;they have no choice&#8221; but to use <span class="caps">PHP</span> instead of Ruby?</em></h4> +<p>Akelos has ported many Ruby on Rails components keeping their interfaces and functionality whenever it was feasible to port the Ruby code to <span class="caps">PHP</span>. It might be considered a port in the sense of functionality, but there are some Rails strengths that rely on the Ruby language and that are impossible to port to <span class="caps">PHP</span>. However, Ruby developers will find that Akelos is the <span class="caps">PHP</span> framework with is the closest to Rails.</p> +<p>On the other hand, many <span class="caps">PHP</span> developers have moved to Ruby because <span class="caps">PHP</span> lacked a hyper-productive and fun-to-use framework like Rails for building complex applications. That is no longer the case, and those who excel at <span class="caps">PHP</span> can start being productive from day one by using Akelos. In this way, Akelos target users are those who already know <span class="caps">PHP</span> and need to build complex applications that can run on almost any cheap shared hosting using a solid foundation based on good coding practices and widely accepted conventions.</p> +<h4><em>What Rails features are missing in Akelos?</em></h4> +<p>A standalone webserver like WebBrick, <span class="caps">RJS</span>, has and belongs to many through associations, string/number/date extensions and Active Resource.</p> +<p>Ruby-powered features like modules, runtime class overriding and blocks will never be available in Akelos.</p> +<p>Scaffolds in Akelos work by generating code, I found quite useless to enable $scaffold = true; and have magic functionality that you can&#8217;t modify, so I decided not to invest my time on that one.</p> +<h4><em>I noticed quite a few generators available for Akelos, do they work as a Rails developer may expect them to work?</em></h4> +<p>The ones that are available do pretty much the same as in RoR.</p> +<h4><em>How does Akelos compare to other similar <span class="caps">PHP</span> frameworks like, say, CakePHP? What features does Akelos offer which Cake doesn&#8217;t offer and vice-versa?</em></h4> +<p>I&#8217;m not aware of Cake&#8217;s functionalities. At the time I started porting Rails my feelings about CakePHP were that they missed the simplicity point in favor of architectural discussions that lead to confusing code, but that was long ago.</p> +<p>Akelos (and Rails) do not implement <span class="caps">ACL</span> like Cake does, as that is a business logic component that varies too much from one case to other, it has no place inside the framework.</p> +<p>Akelos is built with internationalization in its core. You can even internationalize your Models by prefixing the column name with the locale.</p> +<p>I think that Cake only has an act_as_tree behavior on models while Akelos has Tree, Nested Set, and List. Akelos also implements handy features from Rails like <a href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a>, <a href="http://www.martinfowler.com/eaaCatalog/lazyLoad.html">lazy loading</a>, <a href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html">table inheritance</a>, counters, automatic transactions, really powerful validations, calculations&#8230;, and I think most of these advanced features are still missing on Cake, but maybe I&#8217;m wrong.</p> +<h4><em>Did you include unit tests for all the framework classes?</em></h4> +<p>The main components are fully unit tested, and no new code or patch gets into the trunk without unit tests.</p> +<h4><em>Did you or someone do any performance test or benchmarks on Akelos already?</em></h4> +<p>During the last month a lot of code was refactored to improve performance with the help of <a href="http://xdebug.org/">Xdebug</a>, <a href="http://kcachegrind.sourceforge.net/">Kcachegrind</a> and <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab</a>. We significantly improved the performance in one of our most complex intranet applications, a <a href="http://www.basecamphq.com/">basecamp</a>-like system.</p> +<p>Akelos also implements caching at many levels, so it&#8217;s very easy to increase performance as we did with a new <span class="caps">CMS</span> that can handle +200 requests per second using <a href="http://www.apache.org/">Apache</a> in a cheap shared server environment.</p> +<h4><em>Why should a <span class="caps">PHP</span> developer choose Akelos over another <span class="caps">PHP</span> framework?</em></h4> +<p><a href="http://www.akelos.org/docs/tutorials/booklink#mvc">Akelos <span class="caps">MVC</span> implementation</a> and <a href="http://www.akelos.org/docs/tutorials/booklink#workflow">workflow</a> are really easy to understand.</p> +<p>In Akelos all the methods and interfaces are thoroughly selected, so whenever you need to do something you just need to type what you think. Default options are selected with care so you don&#8217;t need to set any configuration unless you want to modify the default behavior.</p> +<p>Coding multilingual applications, building complex relationships within models, distributing databases changes within your development team, building Ajax interfaces, unit testing your code and many other common tasks for <span class="caps">PHP</span> developers are really simple to accomplish when using Akelos.</p> +<p>Akelos is designed to work on PHP4 and PHP5 and it comes with an easy web installer you can adapt for your application. It has functions for working with files and directories in common situations when the web server runs as a different user.</p> +<p>And one of the main reasons for choosing Akelos is that it makes coding fun and lets you focus on solving user problems rather than wasting your time in repetitive technical annoyances. When coding with other developers the <em>convention over configuration philosophy</em> helps everybody to understand exactly how everything works and where to find things.</p> +<h4><em>Is there any website using Akelos already?</em></h4> +<p>The <a href="http://www.thechemicalbrothers.com/">Chemical Brothers</a> new website which has been developed by <a href="http://www.3ev.com/">3rd Eye Vision (3ev)</a> is using Akelos. </p> +<p>The <a href="http://www.akelos.org/">Akelos.org</a> site is running a <span class="caps">CMS</span> named Editam which we will release as Open Source in a near future.</p> +<p>Some small websites like <a href="http://www.fundaciocaixacarlet.com/">Fundacio Caixa Carlet</a> and many intranet/extranet sites that we&#8217;ve been coding during the last 2 years.</p> +<h4><em>What are your future plans for Akelos? Anything new on the way?</em></h4> +<p>A new manual, and a better <span class="caps">API</span> interface are the main priorities right now.</p> +<p>Continuing bringing Rails functionality as needed.</p> +<p>Releasing our sister project Editam <span class="caps">CMS</span> which will help developers who need to add functionality on the top of a <span class="caps">CMS</span> using a solid <span class="caps">MVC</span> framework like Akelos.</p>
A contents/articles/apache2-upgrade.html

@@ -0,0 +1,25 @@

+----- +title: Beware of sudden upgrades! +content-type: article +timestamp: 1198132860 +tags: website|rails +----- +<p>Yesterday I got a rather annoying early Christmas present: when visiting my site, I noticed that the raw source code of my dispatch.fcgi file (yes, I&#8217;m on shared hosting with FastCGI, for now) was displayed &#8220;as it is&#8221; instead of being interpreted.</p> +<p>After the initial moment of anger and stress (I immediately realized it was BlueHost&#8217;s fault, not mine), I opened two tickets and went to bed, hoping to see everything solved in the morning.</p> +<p>Unluckily it wasn&#8217;t the case, so I posted on BlueHost forum trying to be as polite as possible complaining because the issue wasn&#8217;t being dealt with. It turns out that for such issues you&#8217;re supposed to use the &#8220;Live Chat&#8221; feature instead of the tickets, so that&#8217;s what I did.</p> +<p>After a quick chat with &#8220;Christian&#8221;, it turns out that BlueHost decided to perform a server upgrade &#8220;silently&#8221; upgrading to Apache2, PHP5, MySQL4.1, etc. etc.<br /> +Cool, pity that nobody told me that!</p> +<p>I was expecting some sort of <span class="caps">PHP</span> upgrade (not that I care like that), which was supposed to happen according to the last BlueHost newsletter:</p> +<blockquote> +<p><em>&#8220;To alleviate any issues in the future with certain scripts that only run on one<br /> +version of <span class="caps">PHP</span> we have developed the ability to run PHP4 and PHP5 on the same server<br /> +simultaneously. This will be rolled out to all users in the next couple of weeks. Some<br /> +servers already have this ability while most will see it in the next two weeks.&#8221;</em></p> +</blockquote> +<p>But&#8230; hang on? Does it say anything about migrating to Apache2? I don&#8217;t think so! What&#8217;s worse, is that quite a few things changed with Apache2, in particular the way FastCGI handlers are declared:</p> +<div class='text'><pre><code># Apache 1.3: +AddHandler fastcgi-script .fcgi + +# Apache 2: +AddHandler fcgid-script .fcgi</code></pre></div><p>See? Different. This is due to the fact that <a href="http://wiki.rubyonrails.org/rails/pages/Debian+mod_fastcgi+Notes"><code>mod_fcgid</code> is used instead of <code>mod_fastcgi</code> on Apache 2</a>.</p> +<p>The fix was easy, of course, and now my site is up and running again (and actually running faster)&#8230; but, I wonder, why the hell wasn&#8217;t I informed? Is it acceptable? It sounds like I might end up on a <span class="caps">VPS</span> sooner than expected, unless BlueHost doesn&#8217;t roll out some new exciting feature soon, as I think it might&#8230;</p>
A contents/articles/back-from-holiday.html

@@ -0,0 +1,10 @@

+----- +title: Back from holiday +content-type: article +timestamp: 1188442740 +tags: personal|website|writing +----- +<p>I&#8217;m back. I was so eager to go on holiday that I didn&#8217;t even bother writing a post about it, too bad. I actually when on holiday for a week but I thought I&#8217;d take three weeks off from my blog duties in favor of laziness and relax, but unfortunately my laptop decided to go wrong as well, so I didn&#8217;t actually manage to relax that much.</p> +<p>Now everything is fine. I still have to send in my laptop for assistance but it&#8217;s usable at least, and I finally found the time (and the money) to buy a desktop PC. I always wanted to build my own, actually, but in the end I decided to opt for a pre-made Fujitsu Siemens, mainly for economic reasons and time constraints. I won&#8217;t publish the specs, but it&#8217;s alright for me and my fianc&eacute;e.</p> +<p>So what now? Well&#8230; the usual: more posts will soon be added to the <a href="/tags/simplyonrails">Simply On Rails</a> series, a Ruby-related article is on the way (it will be edited by the excellent <a href="http://www.cyberarmy.net">CyberArmy</a> Publication Editing Staff this time), I may venture in a site upgrade whenever they decide to release version 4.2 of Typo which is supposed to be imminent and I&#8217;ll eventually complete another pet project of mine, but that will take more time&#8230;</p> +<p>Stay tuned.</p>
A contents/articles/best-practices-tech-writers-editors-review.md

@@ -0,0 +1,85 @@

+----- +title: Book Review: Best Practices for Technical Writers and Editors +content-type: article +subtitle: Simply all the books your Documentation Team needs +timestamp: 1366519425 +tags: books|review|techcomm +----- + +I've been working in Technical Communications for nearly seven years now, first and foremost Technical Writer and more recently as Documentation Manager. In other words, my work revolves around manuals and online helps, authoring tools and guidelines, documentation standards and… you get the picture. + +And yet, although I write articles and develop [documentation tools](/gliph/) in my free time as well, I rarely write about my job on this site. But when I was offered the opportunity to read and review [Best Practices for Technical Writers and Editors](http://www.informit.com/store/best-practices-for-technical-writers-and-editors-video-9780132929660), I just couldn't resist. + + +### Contents + +*Best Practices for Technical Writers and Editors* is a bundle comprised of three must-read ebooks, specifically aimed at Technical Communications professionals: + +* [IBM Style Guide, The: Conventions for Writers and Editors](http://www.informit.com/store/ibm-style-guide-conventions-for-writers-and-editors-9780132101301) +* [Developing Quality Technical Information: A Handbook for Writers and Editors, 2nd Edition](http://www.informit.com/store/developing-quality-technical-information-a-handbook-9780131477490) +* [DITA Best Practices, Video Enhanced Edition: A Roadmap for Writing, Editing, and Architecting in DITA](http://www.informit.com/store/dita-best-practices-video-enhanced-edition-a-roadmap-9780132929646) + + +#### IBM Style Guide + +Every Documentation department needs a style guide. Even though different organization normally have different set of rules, conventions, guidelines and *house styles*, Documentation Managers often resort to a third-party guide, and the IBM's is definitely one of the most popular choices. + +Within my company, the manager that came before me chose the Microsoft Style Guide: the main reason being that our division develops a set of products that run on Microsoft systems and follow Microsoft guidelines when it comes to designing interfaces. + +The Microsoft Style Guide is great, but if you chose the DITA route it may not be the best choice, because it simply doesn't mention it at all (at least the edition we have). If your organization adopted the [DITA](http://dita.xml.org/) standard, the IBM Style Guide is probably the best choice: IBM has practically created the standard, and this book includes frequent references to it (which are actual links to the other two books within this bundle most of the time, anyway). + +Even though I wouldn't start revolution in my company by adopting the IBM Style Guide right now, I would still recommend it to anyone who needs a new style guide: it is very clear and concise, easy to consult, and it even includes some chapters on how to structure content and how to write for different audiences, topics which are covered more in-depth in *Developing Quality Technical Information*. + + +#### Developing Quality Technical Information + +If you need a book to teach someone how to write technical documents, this is your Bible. I absolutely love this book (we have the first edition at work), and it is a must-read for all new and experienced writers. + +*Developing Quality Technical Information* covers three main aspects of technical authoring, each made up of three distinct characteristics which constitute _quality_ technical information: + +* Easy to use + * Task orientation + * Accuracy + * Completeness +* Easy to understand + * Clarity + * Concreteness + * Style +* Easy to find + * Organization + * Retrievability + * Visual effectiveness + +If you can master all of these, your documentation will be spotless. Each aspect is described in detail, with a plethora of examples. Every section of the book contains an one or more exerpts of fictituous documentation which goes through one or more rewrites to satisfy the requirements for a particular aspect. + +But by far the most useful feature of this book is the checklists at the end of every chapterm andI highly recommend printing them out and keeping them at end, at all times: Technical Writers can use them as reference while writing, whilr Editors and Managers can use them to evaluate/grade technical documents. + + +#### DITA Best Practices + +The primary goal of this book, as the title says, is to provide some *best practices* on writing using the DITA standard. However, do not fear: it does not assume any prior DITA knowledge and will walk you through the basic of topic-based authoring (and the threee main topic types: concept, task, and reference) then moving on to architecting content using DITAMAPS, content reuse, linking and conditional processing. + +This book will teach you all you need to know about DITA to write good documentation using the proper tags at the right time. Even if you (think that you) already know DITA, you'll definitely learn something new, like how to use the how to use the *toc*, *print*, and *printonly* elements as an alternative to conditional processing, or what to put in a *shortdesc* element. + +It does not go too in-depth when it comes to tools &ndash; that would be beyond the scope of the book &ndash; although it does mention [Information Architecture Workbench](http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2009-09-02+13:57:13.308214R&S_TACT=&S_CMP=) (open source, Eclipse-based) for modeling content via ditamaps and [XMetal](http://xmetal.com/) is always featured in all the code sample screenshots. + +### Format + +This ebook is available in EPUB format, and is optimized for the iPad. This shouldn't stop you from downloading it if you own a Kindle, it just means that you'll have to spend a few minutes converting it to AKV using [Calibre](http://calibre-ebook.com/). + +What you do loose when you convert the book bundle to another format is the videos that come with *DITA Best Practices* &ndash; which you wouldn't be able to play anyway. At that point, you may as well save a few bucks and get the [standard edition](http://www.informit.com/store/best-practices-for-technical-writers-and-editors-collection-9780132929653) instead, which doesn't include the videos. + + +### Conclusion + +If you have just been hired as Documentation Manager and you need three essential books that will govern how your team writes ad structures documentation following one of the leading XML documentation standards, this bundle is definitely for you (and for your writers and editors). + +Also, the fact that these three books are not merely glued together in one but contain handy cross references to each other is definitely a good thing &ndash; if you need *all three* books, that is. + +In my case, my company adopted the Microsoft Style Guide long ago, and our documentation has been written following *their* best practices and *their* stylistic conventions. Surely consulting another style guide doesn't hurt, but it may potentially generate some confusion especially with neophite writers. Furthermore, if your company does not plan to adopt DITA or uses another standard like [DocBook](http://www.docbook.org/), you won't really need *DITA Best Practices* either… + +In short, this is a great bundle if you really need all the three books, but if only need one or two, it obviously makes more sense to just get what you need separately. + + + +
A contents/articles/boolean-search.html

@@ -0,0 +1,7 @@

+----- +title: Understanding Boolean Search +content-type: article +timestamp: 1134215836 +tags: internet|google +----- +These days, it is necessary to use a search engines to find the information you want. When the World Wide Web was smaller, search engines weren't an essential websurfing tool, but once the Web started growing exponentially, and hosting literally billions of documents and files, even normal searches aren't enough to find important information, especially when it is not readily available. So, I'm going to show you a more powerful way to search.<strong>Learning how to search</strong><br /><br />Imagine yourself in the shoes of someone who has never used the Internet before. That's pretty rare nowadays, but it does happen. Take my dad, for example, who recently asked me something like "Where can I find a map of the Internet?". I explained that there wasn't any such thing because the Web is too dynamic to be mappable, and that's why we use search engines.<br /><br />I introduced him to Google [1], and he has since started to use search engines regularly. He didn't have much luck on his first few tries, but eventually he learned how to search properly.<br /><br />Searching the web is easy (just type in a word and hit enter), but finding stuff can be tricky, especially if you don't know enough about a subject to narrow your search down. Most people (including myself) tend to find what they're looking for only after multiple searches: we start with a general item, check the results, and restrict the next search based on what we learned from the previous one. While this is generally successful, every once in a while you will find yourself oging in circles.<br /><br />Let's look at a sample situation: I want to learn Ruby on Rails [2] and I want a free host to try it out. So, I go on Google and type something like: <br /><br /><em>ruby on rails free hosting</em><br /><br />I immediately find various blog entries referring to a project that aims to offer free hosting to try out the Ruby-based framework "Rails Playground". [3] It seems to be the perfect solution - they offer, completely free, enough space to try out Rails. It's a pity they recently decided to close new account registration, so now the whole thing is useless.<br /><br />Variants of the search query mentioned above bring up stuff related to Rails Playground. The project became so well-known that almost every Rails-related blog mentioned it at some point as the only place offering free hosting supporting Rails. Since it is useless now, is there a way to prevent Google (or other search engines) from displaying Rails Playground related results? Yes!<br /><br />You would need something like this: <br /><br /><em>rails free hosting -playground -railsplayground</em><br /><br />In this new query I excluded the words "playground" and "railsplayground" using a minus sign before them so I would find other results that didn't refer to the project. In the end, I didn't actually find any other free hosting that supported rails, but I did find the following: <br /><br />- a company which offers free rails hosting for testing purposes (until they officially launch their service) <br />- a guy who offered some space on his private server for testing rails (no longer available) <br /><br />Although I didn't find anything equivalent to Rails Playground, I didn't waste time either going in circles or scrolling through tons of pages trying to find something else. Actually, most people know how to exclude (or include) words in Google searches but they rarely do it. Furthermorte, most people don't know that there are many more search functions available on almost all the popular search engines. These functions, like the minus sign, are called Boolean operators.<br /><br /><br /><strong>A few words about Boolean algebra: </strong><br /><br />Boolean searches get their name from George Bool[4], the inventor of Boolean algebra[5], which is a particular algebraic structure involving three fundamental operators: AND, OR and NOT. If you attended any math class or course you should be already familiar with it. If not, here is a short summary of some of the concepts I will discuss in upcoming sections.<br /><br />Using Boolean searches (rather than Boolean algebra), the expressions A, B, C, etc. can be considered words, and "A &lt;Boolean operator B" can be considered search queries.<br /><br />- A AND B: pages must contain both words A and B.<br />- A OR B: pages must contain either the word A or the word B<br />- NOT A: pages must not contain the word A<br /><br />Trivial. Now let's see some more examples:<br /><br />- (A OR B) AND (NOT C): here I used brackets to create nesting, which causes expressions within brackets to be carried out before the rest, so the query means: "search for pages containing either A or B but which do not contain C".<br /><br />- (A OR (C AND D)) AND (NOT (F OR G)): similar but more complex than the previous: "search for pages containing either A or both C and D. Additionally, only F or G can be present, or neither of them".<br /><br />In some applications, like electrical circuits, NOR, NAND and XOR operators are also used to express Not OR, Not AND and eXclusive OR. As for search engines, only some of them support the XOR operator. A XOR B means that pages can contain either A but not B or B but not B.<br /><br /><br /><strong>Boolean search and Google</strong><br /><br />After reading this you might want to try typing Boolean expressions like "(food AND for) AND (cats OR DOGS) AND (NOT birds)" into a search engine, but that won't work. A Boolean expression typed "as is" rarely works on a search engine (it isn't supported because it's considered to be not user friendly enough). Google in particular adopted a more intuitive way[6] of performing Boolean searches. <br /><br />For starters, you almost always perform a Boolean search when searching something on Google simply because they decided (like most major search engines have) to automatically include the AND operator unless OR is specified.<br /><br />Searching the phrase "food for dogs" actually corresponds to "food AND for AND dogs" (using the proper Boolean expression). Presumably, this was done to prevent the search engine from delivering too many (and usually inconsistent) results. The other possibility (the default in MySQL's FULLTEXT boolean search[7]) would be to use the OR operator by default. Thus, searching for "food for dogs" might deliver results about food for cats, other pets, or even food in general. <br /><br />To improve the precision of their searches, Google also implements automatic exclusion for common words (like "for" in the example below). However, on occasion, a common word needs to be included in a search. To be fair,usually you will find what you are looking for, even with common words excluded. Nevertheless, to force Google to include a word, just add a plus symbol before it, like "+for".<br /><br />Similarly, a minus in front of a word (rails free hosting -playground -railsplayground) forces Google to exclude a word from the search query: in other words, the minus sign is Google's version of the Boolean NOT operator.<br />In order to transform the Boolean expression that I used at the start of this chapter - (food AND for) AND (cats OR DOGS) AND (NOT birds) - into a proper query accepted by Google, I have to write: "food for" "cats OR dogs" -birds. The OR operator <em>must</em> be specified, and anything in parentheses roughly corresponds to quotation marks because Google searches for the exact phrase enclosed in the quotation marks (also evaluating an OR operator, if present).<br /><br />The biggest limitation of Google when it comes to Boolean searches is the lack of support for nested expressions. Something like (food AND (NOT for)) AND (cats OR dogs) AND (NOT birds) cannot be translated into something like <em>"food -for" "cats OR dogs" -birds</em> because Google will not evaluate the "-" operator if it is enclosed in quotation marks. Something more complex like:<br /><br /><em>((food AND for) AND (cats OR DOGS) AND (NOT birds)) OR ((stuff AND for) AND (goats OR horses) AND (NOT (cows OR bulls)))</em><br /><br />cannot be translated into a Google-friendly query. Normal people probably won't ever do that complicated a search, but you never know...<br /><br /><br /><strong>All the other search engines, strategies and conclusions</strong><br /><br />There are various articles (see [8][9][10]) about how Boolean search has been implemented in various major search engines and AltaVista[11], AlltheWeb[12] and MSN Search[13] seem to support Boolean search features better than Google. All of them support the standard Boolean operators, as well as the "+" and "-" symbols, but apparently only MSN Search[13] seems to support full Boolean search queries with nesting: I actually managed to execute my previous complex example: <br /><br /><em>((food AND for) AND (cats OR DOGS) AND (NOT birds)) OR ((stuff AND for) AND (goats OR horses) AND (NOT (cows OR bulls)))</em><br /><br />and I got some decent results. The only (understandable) exception is that I had to specify +for to have the word "for" included.<br /><br />Although Boolean search is useful, it is not the only way to get relevant results as quickly as possible. Additional thinking is required to prepare a query properly. In everyday life, you won't really use heavily nested queries, simply because other methods are more effective. If you're interested in learning how to search I'd recommend a very informative article available at Waikato University[14].<br /><br />I found out that a mix between making multiple search attempts and using basic Boolean queries (word exclusion in particular) can deliver pertinent results fairly readily. Suppose you've heard something regarding a person named Halley who contributes to an IT-related community and that someone mentioned the word "kernel" when talking about him, and you remember that it wasn't referring to Linux. You could come up with something like: <br /><br />Halley kernel -Linux<br /><br />Et voila': Halley's CyberArmy Profile[15] appears as the first search result in Google! If you typed just <em>Halley</em> you wouldn't have found the right one right away; you would probably get more information about the Halley's Comet or the astronomer Sir Edmund Halley. If you typed <em>kernel Halley</em> you'd have found something about Kernel Halley on zZine first and then on CyberArmy lower down in the search results.<br /><br />Boolean search can be useful, but it must not be abused. Google's decision to implement only partial Boolean support without standard Boolean operation was probably the best choice to achieve both pertinent results and user-friendliness. <br /><br /><strong>Notes and further resources</strong><br />[1] Google Inc.: <a href="http://www.google.com/">http://www.google.com/</a><br />[2] Ruby on Rails framework: <a href="http://www.rubyonrails.org/">http://www.rubyonrails.org/</a><br />[3] Ruby Playground: <a href="http://www.railsplayground.com/">http://www.railsplayground.com/</a><br />[4] George Bool, Wikipedia Page: <a href="http://en.wikipedia.org/wiki/George_Boole">http://en.wikipedia.org/wiki/George_Boole</a><br />[5] Boolean Algebra, Wikipedia Page: <a href="http://en.wikipedia.org/wiki/Boolean_algebra">http://en.wikipedia.org/wiki/Boolean_algebra</a><br />[6] Google Help on Advanced Search: <a href="http://www.google.com/help/refinesearch.html">http://www.google.com/help/refinesearch.html</a><br />[7] MySQL FULLTEXT boolean search: <a href="http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html">http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html</a><br />[8] Search engines that implement boolean search (outdated): <a href="http://searchenginewatch.com/facts/article.php/2155991">http://searchenginewatch.com/facts/article.php/2155991</a><br />[9] Boolean Searching on the Internet: <a href="http://library.albany.edu/internet/boolean.html">http://library.albany.edu/internet/boolean.html</a><br />[10] How to choose a search engine or directory: <a href="http://library.albany.edu/internet/choose.html#logic">http://library.albany.edu/internet/choose.html#logic</a><br />[11] AltaVista Special Search Terms: <a href="http://www.altavista.com/help/search/syntax">http://www.altavista.com/help/search/syntax</a><br />[12] AlltheWeb Query Language: <a href="http://alltheweb.com/help/faqs/query_language#2">http://alltheweb.com/help/faqs/query_language#2</a><br />[13] MSN Search: <a href="http://search.msn.com/">http://search.msn.com/</a><br />[14] "The Assignment Process: Search Strategies": <a href="http://www.waikato.ac.nz/library/learning/g_strategies.shtml">http://www.waikato.ac.nz/library/learning/g_strategies.shtml</a><br />[15] Halley's CyberArmy Profile: <a href="http://www.cyberarmy.net/~Halley/">http://www.cyberarmy.net/~Halley/</a><br />
A contents/articles/cakephp-first-bite.html

@@ -0,0 +1,7 @@

+----- +title: The CakePHP Framework: Your First Bite +content-type: article +timestamp: 1152842580 +tags: cakephp|tutorial|review +----- +<p>According to a recent study, <span class="caps">PHP</span> is one of the most popular programming languages in the world. In spite of this, <span class="caps">PHP</span> is often criticized for its inconsistent naming conventions, its lack of important features as compared to other languages (like namespaces) and its inherent disorganization. Furthermore, <span class="caps">PHP</span> is very easy to learn, and this has often led to the common misconception that most <span class="caps">PHP</span> developers are inexperienced and that their code is therefore prone to security vulnerabilities and exploits.<a href="http://www.sitepoint.com/article/application-development-cakephp">Read the full article</a> on <a href="http://www.sitepoint.com/">SitePoint.com</a></p>
A contents/articles/cakephp-overview.html

@@ -0,0 +1,8 @@

+----- +title: An overview of the CakePHP framework +content-type: article +timestamp: 1148997020 +tags: cakephp|review|tutorial +----- +<p><em>&#8220;There are many frameworks available for the <span class="caps">PHP</span> programming language nowadays, and especially a lot of <span class="caps">RAD</span> (Rapid Application Development) frameworks which aim to make web development faster, less tedious and more organized. CakePHP was one of the first frameworks to port the <span class="caps">RAD</span> philosophy &#8211; which became so popular after Ruby on Rails &#8211; to the <span class="caps">PHP</span> programming language. CakePHP v1.0 is now one of the most popular and intuitive solutions for <span class="caps">PHP</span> programming, let&#8217;s discover why&#8230;&#8221;</em></p> +<p><a href="http://hades.phparch.com/ceres/public/article/index.php/art::cakephp::overview">Read the full article</a> on <a href="http://hades.phparch.com/artemis/main/">php|architect article repository</a></p>
A contents/articles/cakephp.html

@@ -0,0 +1,7 @@

+----- +title: CakePHP - A 'tasty' solution for PHP programming +content-type: article +timestamp: 1134057819 +tags: cakephp|review|frameworks|webdevelopment +----- +Web developers can either love or hate PHP, and one of the criticisms of this easy-to-use programming language which is repeated over and over on IRC, forums and blogs is that "PHP is disorganized".<br />Is this really true? If so, is there any possible way to write a PHP application in a logical and clean way? Read on...Every web developer has certainly heard of PHP. Some people like it and consider it a powerful and easy-to-use way to create complex websites or web applications, while others are convinced that it is merely a bad copy of Perl. Opinions are certainly mixed on the matter.<br /><br />One thing to keep in mind when reading criticisms of PHP is its origins, as therein lies the crux of the matter. PHP was created as a form interpreter, initially offering only a <em>very limited</em> range of functionality. Its main purpose was to make life easier for web developers who wanted to do simple tasks, like manipulating form data.<br /><br />People liked the concept - PHP was free and it quickly became popular among developers. More functionality was added and continues to be added with each new release, and PHP is now one of the most popular and powerful programming languages available for web development.It is relatively easy to learn, compared to Perl, ASP, or JSP, and it can be used for almost anything[1].<br /><br />The sheer simplicity of the language was most likely the cause of the enormous amount of exploits discovered through the years which earned PHP the label "<em>too dangerous to use in 'proper' applications</em>". The danger, however, lies not in the language itself, but rather in the <em>way</em> developers make use of the language: PHP's simplicity makes writing bad or exploitable code extremely easy. Furthermore, PHP's ability to be placed within any HTML page with the greatest of ease tempted developers to write ever-increasing amounts of 'spaghetti code', which by its very nature is neither organized nor clean code, and certainly does not help a developer learn how to write organized or clean code.<br /><br />These problems, however, can be solved. There are many ways to go about doing this, but the easiest, most effective way is to create a framework[2]. <br /><br /><br /><strong>Bringing Order to Chaos</strong><br /><br />After learning some PHP myself, I remember noticing that my applications were growing in a disorganized and uncontrollable manner. Things tended to be added at the last minute, and bugs were fixed and patched 'on the fly' wherever they occurred. PHP lacked the structure that is present in most other programming languages. I remember reading the word <em>framework</em> for the first time not too long ago while I was downloading a Windows Update of the .NET framework[3]. That inspired me to start searching the Internet for a 'PHP framework'. That led me to an interesting blog entry[4] where a solution was proposed - a solution to <em>bring order to chaos</em>:<br /><br /><fieldset><blockquote><br />[...] The answer is simple: create our own class library, some kind of framework, the PHP framework. The similar in many ways to that one which is already well known to Java or .NET programmers. We could set the standards, structure and main guidelines. [...]<br /></blockquote></fieldset><br /><br />That blog post made me think about developing my own framework, until I noticed that there were many projects already in progress, and some in fact completed; the end result being a fully functional PHP framework. I read a lot about some of them[5], and abandoned the idea of developing my own, because as a good developer, I believe I should never re-invent the wheel. So I kept looking. I found Pear[6], although that's more a repository of PHP classes with a common standard than a framework, while I was looking for THE solution to developing many types of applications, not merely how to do one thing in particular.<br /><br />I came across a very promising project named Prado[7], which won the latest Zend contest, and was considered the best PHP5 application of the year. It is a masterpiece of coding and PHP5 usage, so I tried to learn it. I even developed a website with it.<br /><br />Prado lets the developer design the application without imposing any ready-made components, but I found its event-driven[8] approach neither easy to learn nor suitable for everyday web applications. I did not like the idea of having to code a reaction to every event (like a click on a button or different phases of page rendering): that is the approach that ASP takes, and at least in that respect, Prado seems to be inspired by the .NET framework. Event-driven programming is suitable for GUI development and desktop-based interfaces, but not for web applications.<br /><br />After trying Prado, I was still unsatisfied, so I once again began my search for a solution to improve my programming. My meanderings took me to Ruby on Rails[9], one of the most recent examples of technology hype on the Net. At the same time,to a certain extent, it is also a successful tool. <br /><br /><br /><strong>The Rails Phenomenon</strong><br /><br /><fieldset><blockquote><br />"Rails is a full-stack, open-source web framework in Ruby for writing real-world applications with joy and less code than most frameworks spend doing XML sit-ups."<br /></blockquote></fieldset><br /><br />That sounded like what I was looking for, and I started reading more about it in the vast and varied help sections[10] available both on and off of the official site. The Rails team did an outstanding job promoting and marketing the framework, and also in providing comprehensive textual documentation (and even video tutorials) to help both beginners as well as experienced programmers get started with it.<br /><br />Briefly, Rails uses Ruby's object oriented programming, in conjunction with the MVC pattern and various automated scripts (generators), to help developers program their applications quickly and in a solid and organized way. However, as that is neither clear nor convincing, let's spend a few moments on the MVC Pattern[11], which will also be useful to understanding the following sections.<br /><br />MVC stands for <strong>M</strong>odel <strong>V</strong>iew <strong>C</strong>ontroller: these three words enclose - and this is just a personal opinion - all the wisdom and philosophy of web development, describing - once again, in my opinion - the three most logical parts a web application <em>should</em> be divided into to achieve code robustness, order and power, all at the same time. Let's look at what each of the component parts mean in detail:<br /><br /><ul><br /><li>Model: The model represents the very essence of the </li><em>information</em> and <em>content</em> of a web application. Imagine this as an object able to gather the information and content of your webpages from a particular resource, such as a database. The model is the only entity able to access resources.<br /><li>View: The view is an attempt to separate the most unstable part of an application: the user front-end. A view is only responsible for presenting the information that the Model gathered. A view does nothing but format the output, and can be compared to a template or report. In all MVC frameworks for web applications, only view files contain </li>(X)HTML code, and mostly only that. They can therefore be changed <em>at any time</em> without having to touch a single line of the business logic of your application.<br /><li>Controller: The controller is the 'brain' of the application. Consider it to be the only part of your program that can 'think' and manage the other parts. Controller files are the only ones able to </li><em>order</em> the Model to gather information and then pass the information obtained to the view for display. <br /></ul> <br /><br />Although the MVC seems to make things more complicated, that is part of the objective. Since one of the advantages (and weaknesses) of PHP was its simplicity, the MVC adds complexity to bring more order and logic to the design process. The three entities are separated for just that reason, and trying to put them together can result in potential disasters, since it causes the whole pattern to fail.<br /><br />Coming back to Rails, I was quite impressed by the features it offered, but there was a small problem: the Ruby programming language itself. I experienced some difficulties in setting up the environment properly, and I also discovered that most standard hosting companies do not offer Ruby hosting plans as standard. Hosting issues aside, I would have had to learn Ruby in order to master Rails, and I really did not have the time for that: I had to develop a website quickly and easily, preferably with languages I already knew.<br /><br />After deciding to abandon Rails (for the moment, anyway), I was amazed by the number of projects in other programming languages that try to emulate the famous Ruby framework, to the point of being considered <em>clones</em> or ports of it to another language. To my knowledge, the <em>Rails disease</em> contaminated the following programming languages:<br /><br /><ul><br /><li>PHP</li>[12]<br /><li>Python</li>[13]<br /><li>Java </li>[14]<br /><li>Perl </li>[15]<br /></ul><br /><br />I said <em>disease</em> because Rails developers think that Ruby on Rails was made in Ruby for a reason, namely that Ruby offered some unique features that were not available in other languages. I will not delve into that topic here; more information is available[16] for those who are interested. However, suffice it to say that there are some Rails ports in PHP that were immediately attacked because of the fact or legend that the creator of Rails originally wanted to develop his framework in PHP and then switched to Ruby. Let's examine one of those PHP frameworks in detail.<br /><br /><br /><strong>CakePHP: Just Another Rails Clone?</strong><br /><br />I chose to learn CakePHP (or "Cake")[17] mainly because it offered more features than the other two PHP alternatives. It also seemed to be a more original and actively developed project. In particular, I'd like to quote one of CakePHP's developers, from when he introduced the framework in a comment to a blog post[16]: <br /><br /><fieldset><blockquote><br />"While it's difficult to copy Rails in PHP, it's quite possible to write an equivalent system. I like the terseness of Ruby code, but I need the structure that Rails provides, how it makes me organize my code into something sustainable. That's why I'm ripping off Rails in Cake."<br /></blockquote></fieldset><br /><br />Cake's developers (bakers?) are developing their own framework which uses many principles of Ruby on Rails, revisited and re-proposed in an extremely flexible and easy to use PHP tool, rather than simply trying to port Rails to PHP. I also liked the fact that they bothered to choose an original name for their project, unlike others: there are too many "<insert language here>-on-Rails" frameworks, and while the whole "Rails" thing is innovative and catchy the first time, it loses its appeal quickly when people use the word everywhere just because it is "fashionable".<br /><br />Quoting from CakePHP's website:<br /><br /><fieldset><blockquote><br />"Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility." <br /></blockquote></fieldset><br /><br />That sounds like the Holy Grail for PHP developers, and I must admit I'm quite impressed myself after using it on various little projects, but is it really all true? What are Cake's features? Are there any limitations?<br /><br /><br /><strong>The Ingredients</strong><br /><br />So what is Cake? In the previous sections, I introduced some general concepts and ideas common to Ruby on Rails and CakePHP, but nothing in particular was said about the structure of the framework itself. Let's now turn to that and discuss it in some detail, particularly as it pertains to Cake.<br /><br />The first thing to understand about Cake (and Rails as well) is that one of their aims was to avoid editing long and complex configuration files in order to run the environment. The approach in this sense is to use <em>conventions</em> over <em>configuration</em>. This may sound terribly restrictive, but in reality it proved to make things much simpler. After all, I said I wanted to use a framework because I needed a solid structure to base my applications on, not that I needed to be able to create and personalize my own structure and system. Cake uses some simple rules in order to run properly, and the easiest way to explain them is through Cake's directory structure, which represents the skeleton of every CakePHP application.<br /><br />/<br />---app/<br />------config/<br />------controllers/<br />---------components/<br />------models/<br />------plugins/<br />------views/<br />---------elements/<br />---------errors/<br />---------helpers/<br />---------layouts/<br />---------pages/<br />------webroot/<br />---------css/<br />---------files/<br />---------img/<br />---------js/<br />---cake/<br />------config/<br />---------inflections/<br />------docs/<br />------libs/<br />---------controller/<br />---------generator/<br />---------model/<br />---------view/<br />------scripts/<br />---tmp/<br />------cache/<br />------distro/<br />------logs/<br />------tests/<br />---vendors/<br /><br />I expanded only the first three levels of the tree, although there are more levels in the <em>/cake/</em> directory. They won't be considered here simply because the <em>/cake/</em> directory contains CakePHP's internal libraries, which normally will not be modified when developing an application. The <em>/tmp/</em> directory also will not be elaborated upon either, because it is only used to store temporary files. However, the <em>/vendor/</em> directory should contain third party scripts and libraries that you may want to use in your application, but they are not normally integrated with Cake's framework. 95% of your application will reside within the <em>/app/</em> directory, which we therefore need to examine in greater detail.<br /><br /><span style="text-decoration:underline;"><em>/config/</em></span><br />When I said that Cake strives to use conventions over configuration, I really meant it. This directory does not contain thousands of configuration files, only five very small ones. They represent the only items which <em>might</em> need to be configured. <br /><br /><ul><br /><li>acl.ini.php: This file must be edited only if you plan to use Cake's default ACL </li>(access control list) system for your application. It sets permissions for the application, so it should be used to list every group, user, and their respective rights. This can be useful for small sites with a few well known users, but for anything else, you should develop your own ACL or authentication system that relies on a database. <br /><li>core.php: This file can be edited to change some default options, such as the level of the error messages and notices that the application will output. This comes in very handy while developing an application.</li><br /><li>database.php.default: This should be renamed to database.php and edited if you plan to use any databases with Cake. The settings are fairly straightforward, and include the type of database used </li>(mysql, postrgres, sqlite, or any other supported by the AdoDB library[18]), username, password and database name.<br /><li>paths.php: Unless you are very particular, you should leave this file alone. It tells Cake where to look for CSS files, images, controllers, etc. If you are planning to adopt Cake's directory structure - which is the most logical option - you can ignore this.</li><br /><li>routes.php: Following Rails' example, CakePHP features a "routing system" for user-friendly URLs. By default, your URLs will look like this: </li><em>http://sitename/controller-name/action-name/eventual/action/parameters</em>, which is a really nice way to organize a site, but you may want to change something if you have particular requirements. <br /></ul><br /><br /><br /><span style="text-decoration:underline;"><em>Controllers</em></span><br />As mentioned previously, a controller represents the "brain" of the MVC pattern, the part which controls what the other parts are doing. Imagine a controller like a section of your site: its name will be present on the address bar, and each of these sections will have a file named <something>_controller.php, and will also contain a class named SomethingController that extends the AppController class. This class will have some methods that correspond to some standard actions like <em>index</em> (the default action called when you access the <a href="http://sitename/controller/">http://sitename/controller/</a> page) or other user-defined ones like <em>add</em> or <em>list</em> or <em>admin</em>, depending on the application. As a general rule, you want to add any 'business logic' you want to implement in your application in controllers - for example, calculations or a database query that produces a result. <em>Then</em> once all the mess is done, the result (usually an array or a variable) is passed to the view (see <em>views</em> below). <br /> <br />If this is starting to sound too technical for you, I recommend reading a tutorial[19] available on the CakePHP website about creating a simple blog application. The tutorial will explain most of Cake's basics, including how to pass a variable from a Controller to the corresponding view <em>($this-set('variableNameInView', $variable))</em> and other useful things.<br /><br />Recently <em>Components</em> have been added to CakePHP, and quoting from the corresponding wiki page[20]:<br /><fieldset><blockquote><br />"Components are the preferred way to provide additional functionality to your controller. To make a component available you would add var $component = array('myComponent') inside of your controller's definition, add your file to the /app/controllers/components, name your class MyComponent, and create your methods."<br /></blockquote></fieldset><br /><br /><br /><span style="text-decoration:underline;"><em>Models</em></span><br />A model is an object able to access the database. In Cake's terms, that is any class extending the AppModel class. That class is directly under the <em>/cake/</em> directory (along with the previously mentioned AppController class), and can be moved to the <em>/app/</em> directory and modified if you want to add some particular site-wide behavior to it which will be inherited by all models extending it.<br /><br />In even simpler terms, you need to create a Model class for every table you're planning to use in your database. A convention in Cake says that database table names should be plural and that the corresponding model should be singular. If you use a table named 'mice', your model should be named 'mouse': Cake is smart enough to understand irregular plurals through an <em>Inflector</em> class.<br /><br />Creating a model class for basic use is trivial:<br /><br /><br />class Post extends AppModel<br />{<br /> var $name = 'Post';<br />}<br /><br /><br />Then you'll be able to access the model (and therefore the database) from a controller via simple instructions like $this->Post->findAll(). This instruction will query the database and return all records within the Posts table in your database. You can also perform more complex operations, and also specify SQL queries to execute, if you need to, but remeber that models can only be accessed through controllers! If you need some information stored in your database to be displayed on a view, execute the query from the controller and pass it to the view as per the MVC pattern. It can prevent you from cluttering views with business logic and thereby making code updates much harder.<br /><br /><br /><span style="text-decoration:underline;"><em>Views</em></span><br />Views are used to present information gathered with a model and a controller to the public. They are mostly HTML pages with some PHP tags in them, prints of variables and maybe some <em>foreach</em> loops. Nothing more than that should be used in a view!<br /><br />Views must be placed in this directory and obey the following conventions:<br /><br />1. They must be named after a controller's action to allow the controller to refer to a particular view automatically. The same view can be used by multiple controllers, but it must be either set manually or through a layout (see below).<br />2. Views referring to an action of a particular controller must be placed under a subfolder named after the controller.<br />3. All views must have a .thtml extension.<br /><br />Any site-wide view, like the site's template, must be placed under the <em>layouts</em> subfolder. In particular, the default.thtml file in the folder represents the global template for your application: page titles and specific pages (views) will be invoked automatically by using $title_for_layout and $content_for_layout respectively.<br /><br />Similarly to what was said about components, <em>helpers</em> can be used to extend views functionalities[20]:<br /><br /><fieldset><blockquote><br />"Helpers are all about the view. You know about the helpers in Cake, but you need a little bit more. You want to have your own methods to display formatted info. To achieve this, you need to add var $helpers = array('myHelper').<br /><br />Now, throw your myhelper.php file into the /app/views/helpers/, create the class MyHelper, and $myHelper is available in the view." <br /></blockquote></fieldset> <br /><br />Cake comes with some very useful default helpers to create links and HTML tags, import JavaScript, create forms, and use AJAX code easily. Unlike most other frameworks, Cake neither has nor uses a third party template engine (like Smarty[21]) for views, but helpers can be used to achieve similar results more quickly than an engine can.<br /><br /><br /><span style="text-decoration:underline;"><em>Plugins</em></span><br /><br />Plugins are user-developed enhancements for Cake. Unlike the files placed under the <em>vendor</em> directory, a plugin is an application specifically made to be used within the CakePHP environment. At the moment this feature is still under development.<br /><br /><span style="text-decoration:underline;"><em>Webroot</em></span><br /><br />If you read carefully what I wrote above about routes, you might be wondering if <em>every</em> page must have a controller and a view in order to be displayed properly. What about images, JavaScript and CSS files? The answer is this directory: everything you place here will not be seen as part of the MVC-based environment; CSS files can be stored in the <em>/css</em> folder, Javascript under <em>/js</em>, and so on. Additionally, some helpers can provide a easier way to access or display images, scripts, CSS, etc.<br /><br /><br /><span style="text-decoration:underline;"><em>Other Features</em></span><br />Cake offers even more than this; the latest releases have introduced a few more Rails-inspired features:<br /><br /><ul><br /><li>Scaffolding: Do you want to test your application without spending time writing all the CRUD </li>(Create, Read, Update, Delete) code? That's where the concept of scaffolding comes in: by setting a few variables in the right places[22], Cake will generate basic mechanisms to add, edit, list, and delete records in your database, along with all the associated view files. You won't have to code a single form, as everything will be generated automatically by the framework according to SQL field types.<br /><li>Bake: Another Rails-inspired feature revisited in PHP. Rails uses a set of scripts and in particular the </li><em>rake</em> utility to instantaneously create the foundation for a Rails application with scaffolds already in place. CakePHP offers the same functionality through the <em>bake</em> utility, which is currently available as either a batch file or a PHP script.<br /><li>ACL: As previously mentioned, Cake comes with a ready-made Access Control List </li>(ACL) system, which can be extended and used to restrict particular areas of a Cake application to certain users or user groups.<br /><li>Compatibility: CakePHP is fully compatible with both PHP and PHP5.</li><br /></ul><br /><br /><br /><strong>Meet the Bakers</strong><br /><br />After reading all these things about CakePHP and its framework, you may have some questions, or be curious about some aspect of the project. PHPNut and gwoo, two of CakePHP's creators and lead developers, offered to answer some questions exclusively for zZine readers. This interview took place on Oct. 26th, 2005, in #dev-cakephp on irc.freenode.org.<br /><br /><em><span style="text-decoration:underline;">h3rald</span>:</em> Thanks to both of you for allowing me to interview you about your project, CakePHP. Where did the name come from, anyway?<br /><br /><em>PHPnut:</em> The original project was started by Michal Tatarynowicz aka Pies (hence the name), and when I saw his release, last March, I decided to contact him. I told him that the company I own supports projects like Cake, and also that I was in the process of developing something along the same lines. <br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Is Cake released under the GPL? How many developers are helping out?<br /><br /><em>gwoo:</em> Cake is released under the MIT license, and the development team is composed of me and PHPnut, plus four other contributors. Then there's the Documentation Team, currently 3-5 people. Documentation has to follow the releases, so it usually lags behind a bit: we made so many modifications in the recent release that the Doc Team has a lot to catch up on, but it's getting there.<br /><br /><em>PHPnut:</em> With this release you will see that the docs are going to be much better. The code is very stable now, and hopefully very little changes on that.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Some people, at first glance, may think that Cake is a PHP port of Ruby on Rails. How true is that? What are the differences and similarities between these two frameworks?<br /><br /><em>PHPnut:</em> Cake started as a port, but has evolved into something more: we discussed using the concepts that RoR offered and including them in a framework for users of PHP. I have used PHP for a number of years, and I am comfortable with it; this is where my passion is, and I think people who use Cake have those same passions as we developers do.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> I read once that Rails was developed in Ruby because only Ruby can offer certain functionalities and features...<br /><br /><em>gwoo:</em> I would disagree, and I think that is proven in what we have done: sure RoR has a built in server and some other nice things, but PHP is everywhere.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Some developers, especially Perl programmers, tend to consider PHP an "inferior" language sometimes. What do you think of that?<br /><br /><em>PHPnut:</em> My name says what I think about them all.<br /><br /><em>gwoo:</em> PHP is a web programming language; that's what it was designed for, and that's what it does best: It all boils down to what you are comfortable with.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Did you try any other PHP frameworks, MVC-based (Mojavi, for example), or event-driven, like Prado? What do you think about them? In what ways can Cake be better or worse?<br /><br /><em>gwoo:</em> They are all so complex, in my opinion, and I tried nearly all of them. Cake breaks apart the MVC and handle the CRUD in a logical way, and Cake syntax is super easy to learn.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Ruby on Rails has been ported to various languages, including Java and Python. There are three PHP frameworks inspired by the famous Ruby project: Biscuit, PHP on Tracks and CakePHP. What do you think of that? Any chance of a merge? Did you have a look at them?<br /><br /><em>gwoo:</em> You forgot Symfony[27], a PHP5-only port: I tried it but it seems much harder to learn than Cake.<br /><br /><em>PHPnut:</em> I could be wrong, but I think these other projects are behind us in ease of use, in what the framework is capable of doing, and in features, not to mention community support.<br /><br /><em>gwoo:</em> I tried all of the PHP ports of Ruby on Rails and none of them has the features, the community,or a lexicon as good as Cake's.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Why don't you consider CakePHP a port? In what way is it evolving from Rails?<br /><br /><em>PHPnut:</em> Rails and CakePHP share a lot: MVC pattern, Active Record pattern...but we're not strictly following Rails, and we're able to think by ourselves. Recently we changed the directory structure, and in my opinion our is more functional than the Ruby on Rails one.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> What can Cake be used for? What kind of projects? Are there any limitations?<br /><br /><em>gwoo:</em> Personally I think that Cake is the most extensible framework out there for PHP: with components, helpers and vendor access you can do anything you want!<br /><br /><em>PHPnut:</em> We are limited only by what a web server (generally Apache, but IIS seems to work as well) and a database can do. We may be limited by PHP itself, but we twist that in our own little sick ways sometimes.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Any thought about AJAX? I saw some nice demos made with Cake. What do you think of this new trend in web development? Some people consider it the future, while others are concerned about compatibility, and still others are relatively indifferent to it. What about you?<br /><br /><em>gwoo:</em> AJAX can be very useful in creating an application, but should not be overused. People have become very comfortable with how the Web works:i f you start doing tons of drag and drop and no refreshes, users will feel lost in how to operate the site.<br /><br /><em><span style="text-decoration:underline;">h3raLd</span>:</em> Thank you very much for your time, both of you. Is there anything you'd like to add to this interview? Something you'd like to say to users interested in trying out Cake?<br /><br /><em>PHPnut:</em> Come and enjoy: we are here to help...<br /><br /><em>gwoo:</em> ...And plan to be here for a very long time!<br /><br /><br /><strong>Let's cook...</strong><br /><br />One of the most positive things about CakePHP is that even though it is a fairly new project (most of the code is 100% useable already,but they still consider the projectto be in the 'alpha' stage), it's maintained by many dedicated developers and PHP enthusiasts. I was amazed to see how the whole documentation evolves and is quite literally updatedon a daily basis. <br />Anybody can contribute to the framework or simply test it and share their experiences.<br /><br /><span style="text-decoration:underline;"><em>CakePHP Wiki</em></span><br /><br />Anybody can register an account for free and contribute tutorials and documentation to the new CakePHP Wiki[23]. This is currently the most up-to-date source for documentation files and tutorials.<br /><br /><span style="text-decoration:underline;"><em>CakePHP User Group</em></span><br /><br />If you need assistance or you want to contact the Cake developers or other Cake users, you can post a message on their Google User Group[24]: people will reply with useful comments, usually on the same day, and the developers <em>do</em> listen to user suggestions.<br /><br /><span style="text-decoration:underline;"><em>CakePHP IRC Channel</em></span><br /><br />If you want to offer (or receive) real-time assistance, feel free to join #cakephp on FreeNode (irc.freenode.org). I went there disguised as a total newbie (it wasn't much of a stretch) and they helped me a lot, explaining basic concepts of the framework and pointing me to the right documentation files.<br /><br /><span style="text-decoration:underline;"><em>CakePHP Development</em></span><br /><br />Experienced PHP developers are more than welcome to contribute to the project. People may be accepted to the core development team if they have sufficient knowledge and spare time, or alternatively,components or code can be submitted through the newly created CakeForge[24]. <br /><br /><br /><strong>...Or Just Eat</strong> <small><em> by Marc Abramowitz</em></small><br /><br />If you don't feel ready to contribute and you'd like to try out the framework first, it can be downloaded directly from the CakePHP site[25] as either a <em>release</em> or a <em>nightly</em> build: the zip file is less than 300KB.<br /><br />I wanted to include a <em>success story</em> written by Marc Abramowitz, an experienced PHP programmer who decided to adopt CakePHP as a framework to use in a production environment: he persuaded his colleagues to use it and they all seem happy with it. He writes:<br /><br /><em>For the past few years, I've done quite a bit of work in PHP, working on production code that runs on a very high traffic web site. PHP has served us well, as it is easy to write and read, quite efficient, and easy to integrate with existing C++ code as the site grew.<br /><br />Lately, there has been a lot of buzz in the web development community about Ruby on Rails. Like many others, I took some interest in Ruby on Rails because I was intrigued by the apparent power and elegance of Ruby and because I wondered if a Model/View/Controller (MVC) framework like Rails would help enforce a more consistent code structure that would make the code easier to understand and maintain. Additionally, I wondered if an MVC framework would enable very rapid prototyping.<br /><br />Some people are very wary of frameworks that impose structure, as they like to have the freedom to do things however they want. However, there is a tradeoff between structure and flexibility. If you're working on a small team or a relatively small project, then you may not find structure to be very helpful; you may even find that it gets in your way. <br /><br />However, as teams and projects get larger, structure becomes more and more valuable, as it enforces consistent patterns of how to do things and rather than being something that limits, it in fact liberates, because it abstracts away the small details and allows us to therefore concentrate on the larger problem. Think of the lines that are painted on our roadways - although they add structure, we don't find them to be limiting. On the contrary, they help us to drive without worrying about crashing into each other at every moment - they free us from being concerned with small details so that we can concentrate on getting where we're going.<br /><br />Rapid prototyping appeals to me, because I find it helps me to better present my ideas for new apps and features. A mockup can only go so far - there is no substitute for a working prototype. When clients get their hands on a functional prototype, they get a better idea of what is possible and it forces them to clarify their requirements for the product. This results in a better dialogue between the developer and the client, which leads to better upfront decisions, more stable requirements, less stress, and a better product.<br /><br />So, Rails appealed to me not only because of the potentially valuable structure that it could add, but also because it could enable rapid prototyping. However, I knew that there was no chance of Rails being used for production code in my organization, because we run some very high traffic web sites that require the utmost in efficiency. We are also by and large a PHP shop.<br /><br />However, when my manager approached me and asked me to develop a database-backed internal tool, I thought of Rails again. I then considered the fact that I would probably someday have to hand this app off to someone else, and that someone would probably know PHP but not Ruby. Heck, even I had several years of experience with PHP (including writing some PHP extensions) but I had only done a little bit of reading about Ruby, and I also had no practical experience with it.<br /><br />Furthermore, with PHP I had access to a large number of PHP extensions that wrapped various internal libraries. So PHP was the natural choice. Ideally, I wanted to use PHP with a Rails-like MVC framework that would facilitate rapid development, and this is what led me to CakePHP.<br /><br />I began by downloading CakePHP 0.9.2 and following the sample tutorial that walks you through creating a simple blog application (note that at the time of this writing, the current version of Cake is now 0.10.0.1076, so some of the details of using Cake have changed). I was pleased to find that the process was quite similar to the process for Rails. One difference that I noted was that Rails tutorials always emphasize using scripts to generate models, controller, and scaffolds, whereas the Cake tutorial walked me through explicitly writing out all the code. I noticed that the Cake download came with a script called "bake" which looked like something that could potentially do some of the code generation, but since it wasn't mentioned in the tutorial, I chose not to use it.<br /><br />The process of creating a first application using the tutorial was quite easy. Here are the steps in brief (consult the tutorial for more details):<br /><br />1. Create the database table. Cake requires tables to have some extra<br />fields:<br /> - id, an auto_increment primary key<br /> - created, a datetime<br /> - updated, a datetime<br />2. Configure Cake to access the database by editing the config/database.php file<br />3. Create a model class which extends AppModel (a Cake provided class)<br />4. Create a controller class which extends AppController (a Cake provided class) and write one or more controller methods<br />5. Create a view which is a PHP file with a .thtml extension and is meant to be mostly HTML with very little embedded PHP - typically just echoing of variables and some simple control structures like <em>foreach</em>.<br />Cake also provides some simple convenience methods that write out certain HTML constructs for you.<br /><br />That's it! That alone is enough to create a basic but functional application. The tutorial goes on to show you how to add additional functionality to the blogging app. After that there's a shorter, more advanced tutorial that shows you how to add a few more things to the blogging app.<br /><br />Once I had gotten comfortable with Cake by following the tutorial, I proceeded to write my own application. Getting started was easy - I followed the same steps as in the tutorial to create my first table, model, controller, and views, then my second table, model, controller, and views. Then my app got a bit more complicated. I needed to have many-to-many relations and more elaborate queries than the default ones that Cake provides. I began to worry that Cake would break down here. I had heard people grumble that MVC frameworks like Rails and Cake were great for little toy apps that only do CRUD (Create, Read, Update, Delete), but that they couldn't handle complex queries using joins and the like. I poked around in the Cake source code and was pleased to find that there were nice lower level methods that allowed me to bypass the Cake defaults and do whatever custom queries I liked. For example, I wrote something like this in one of my models:<br /><br />function index(){<br /> return $this-findBySql(<br /> "SELECT id, title, AVG(rating) avg_rating, MIN(rating) min_rating, MAX(rating) max_rating, COUNT(rating) num_ratings " .<br /> "FROM ideas LEFT JOIN ratings ON ideas.id =<br />ratings.skill_id " .<br /> "GROUP BY id " .<br /> "ORDER BY title");<br /> }<br /><br /><br />So what I have is a model that does <em>not</em> have a one-to-one mapping with a single table. It actually retrieves data from more than one table.<br /><br />Over time, I picked up a few more Cake concepts. For example, at some point we decided that every page of the app would have a similar look and feel with a particular masthead and logo, and all the pages in one section of the site would show tabs for all of the various views with the currently selected tab highlighted. At first, I just used the same code at the top of each of my views to display the masthead, logo, and tabs. This, of course, became a pain when I needed to change the layout, since I needed to make the same change in several different views.<br /><br />Then one day I realized that Cake had a concept of layouts, which are high level templates in <em>app/views/layouts</em> that define the basic structure of pages. The individual views are just content that gets embedded in these high level layout templates. So I took the common masthead and logo, put it in my default layout, and removed it from the individual views. Now when I wanted to change the look of the masthead, I only had to do it in one place. For the tabs, I discovered the concept of elements. I placed the code for my tabs in <em>apps/views/elements/tabs.thtml</em>. Then the tabs could be displayed in any template using:<br /><br /><?php echo $this-renderElement('tabs') ?<br /><br />Rather than stick the above statement in all of the many pages that were supposed to display tabs, I created a new layout in <em>apps/views/layouts/tabbed.thtml</em> (which uses renderElement to render the tabs). Then I used<br /><br />$this-layout = "tabbed"<br /><br />in the controller to tell it to use the tabbed layout rather than the default (non-tabbed) layout.<br /><br />After a couple of days of work on this application, it was time to demo it to the VP, who was very impressed with what I was able to accomplish in such a short period of time. It was brought up that before I took on the project they had asked some other folks how long it would take them to build it in Java and they had said that it would take on the order of months what I had built in a couple of days. Morals of the story:<br /><br />1. Cake is very lightweight and productive<br />2. Cake might be very beneficial to your career<br /><br />Eventually, I was assigned to another project and my manager wanted me to transition my Cake project to another engineer, who was experienced with PHP but not with Cake. I sat down with the new engineer and in about 20 or 30 minutes of explanation and walking him through the code,<br />he felt ready to code. Not only did he feel that he knew enough to start working with the application, I could tell from the smile on his face that he was very impressed by the power and succinctness of Cake, which was the same reaction that I initially had. After a couple of days, I checked back with him and he had made a remarkable amount of progress on the application - there were a ton of new pages and features.<br /><br />So you see, Cake is a very productive environment. For a very small investment in the initial learning curve, you can get a significant increase in productivity.<br /></em><br /><br /><strong>...And the icing?</strong><br /><br />So that's what CakePHP is about. The project may only have just entered alpha stage, but the code is already very stable and useable, as PHPnut, gwoo and Marc said. So what's going to be included in the beta and stable releases? I researched a bit and asked the developers, and here's how Cake will probably evolve in the following months:<br /><br /><ul><br /><li>Cake's built-in </li><strong>data-validation</strong> capabilities will be extended. A validator class - which already exists, by the way - will be extended to include more data types and expressions to be validated before being stored in a database. <br /><li>A new default </li><strong>ACL system</strong> will be included and will support database access and .ini files as well. <br /><li>The </li><strong>AJAX</strong> helper class and AJAX support will be enhanced, featuring unobtrusive JavaScript and ALA behavior[28].<br /><li>Multiple applications with the same core files. In the future developers will be able to create their own Cake application which could be placed in the app/plugins directory and be seamlessly integrated and auto-linked to other Cake applications.</li><br /></ul> <br /><br />After learning all this about Cake and after trying it out myself, I really think that I have found the solution to all of my PHP web development problems. CakePHP can really help PHP developers a lot if properly used and understood. Still not convinced? Just try it out then, will you?[17]<br /><br /><br /><strong>Notes and Related Resources</strong><br /><br />Special thanks to:<br /><br /><ul><br /><li>Larry E. Masters aka PhpNut and Garrett J. Woodworth </li><strong>gwoo</strong> for providing all the answers to my questions and contributing to create such a wonderful tool for the PHP community.<br /><li>Marc Abramowitz for sharing his experiences with the CakePHP framework and providing the content for the '...let's eat' section.</li><br /></ul><br /><br /><small><br />[1] PHP functions reference, <a href="http://www.php.net/manual/en/funcref.php">http://www.php.net/manual/en/funcref.php</a><br />[2] Framework, Wikipedia Page - <a href="http://en.wikipedia.org/wiki/Framework">http://en.wikipedia.org/wiki/Framework</a><br />[3] .NET framework overview - <a href="http://msdn.microsoft.com/netframework/technologyinfo/default.aspx">http://msdn.microsoft.com/netframework/technologyinfo/default.aspx</a><br />[4] "PHP Framework", delorian's blog, PHP Community - <a href="http://www.phpcommunity.org/node/100">http://www.phpcommunity.org/node/100</a><br />[5]Some popular PHP frameworks: Mojavi (<a href="http://www.mojavi.org/">http://www.mojavi.org/</a>), phpMVC (<a href="http://www.phpmvc.net/">http://www.phpmvc.net/</a>), BlueShoes (<a href="http://www.blueshoes.org/">http://www.blueshoes.org/</a>), Seagull (<a href="http://seagull.phpkitchen.com/">http://seagull.phpkitchen.com/</a>).<br />[6] PEAR - <a href="http://pear.php.net/">http://pear.php.net/</a><br />[7] Prado - PHP Rapid Application Development Object-Oriented, <a href="http://www.xisc.com/">http://www.xisc.com/</a><br />[8] Event Driven Programming, Wikipedia Page - <a href="http://en.wikipedia.org/w/index.php?title=Event_driven_programming">http://en.wikipedia.org/w/index.php?title=Event_driven_programming</a><br />[9] Ruby on Rails, Official Page - <a href="http://www.rubyonrails.org/">http://www.rubyonrails.org/</a><br />[10] Ruby on Rails, Doumentation - <a href="http://documentation.rubyonrails.com/">http://documentation.rubyonrails.com/</a><br />[11] Model View Controller, Wikipedia Page - <a href="http://en.wikipedia.org/w/index.php?title=Model-View-Controller">http://en.wikipedia.org/w/index.php?title=Model-View-Controller</a><br />[12] PHP frameworks inspired by Rails: <a href="http://phpontrax.com/">http://phpontrax.com/</a>, <a href="http://flinn.activeintra.net/biscuit/">http://flinn.activeintra.net/biscuit/</a>, <a href="http://www.cakephp.org/">http://www.cakephp.org/</a><br />[13]Python frameworks inspired by Rails: <a href="http://fanery.sourceforge.net/">http://fanery.sourceforge.net/</a>, <a href="http://fanery.sourceforge.net/">http://fanery.sourceforge.net/</a>, <a href="http://subway.python-hosting.com/">http://subway.python-hosting.com/</a><br />[14]Java framework inspired by Rails: <a href="https://trails.dev.java.net/">https://trails.dev.java.net/</a><br />[15]Perl frameworks inspired by Rails:<br /><a href="http://search.cpan.org/dist/Catalyst/lib/Catalyst/Manual/Intro.pod">http://search.cpan.org/dist/Catalyst/lib/Catalyst/Manual/Intro.pod</a>, <a href="http://perlonrails.org/index.php/Main_Page">http://perlonrails.org/index.php/Main_Page</a> <br />[16] "Rails Clones: Blood suckers or useful drones?", RedHanded - <a href="http://redhanded.hobix.com/cult/railsClonesBloodsuckersOrUsefulDrones.html">http://redhanded.hobix.com/cult/railsClonesBloodsuckersOrUsefulDrones.html</a><br />[17] CakePHP - Rails-inpired PHP framework, <a href="http://www.cakephp.org/">http://www.cakephp.org/</a><br />[18] AdoDB, PHP Database Abstraction Layer - <a href="http://adodb.sourceforge.net/">http://adodb.sourceforge.net/</a><br />[19] CakePHP blog tutorial - <a href="http://wiki.cakephp.org/tutorials:blog_tutorial_-_1">http://wiki.cakephp.org/tutorials:blog_tutorial_-_1</a><br />[20] Extending CakePHP - <a href="http://wiki.cakephp.org/tutorials:extending_cake">http://wiki.cakephp.org/tutorials:extending_cake</a><br />[21] Smarty, PHP Template Engine - <a href="http://smarty.php.net/">http://smarty.php.net/</a><br />[22] Scaffolding a Blog, CakePHP Wiki - <a href="http://wiki.cakephp.org/tutorials:scaffolding_a_blog">http://wiki.cakephp.org/tutorials:scaffolding_a_blog</a><br />[23] CakePHP Wiki - <a href="http://wiki.cakephp.org/">http://wiki.cakephp.org/</a><br />[24] CakePHP Google User Group - <a href="http://groups.google.com/group/cake-php">http://groups.google.com/group/cake-php</a><br />[25] CakeForge - <a href="http://cakeforge.org/">http://cakeforge.org/</a><br />[26] CakePHP Downloads Page - <a href="http://cakephp.org/downloads/">http://cakephp.org/downloads/</a><br />[27] Simfony, PHP5 framework - <a href="http://www.symfony-project.com/">http://www.symfony-project.com/</a><br />[28] ALA behavior - <a href="http://bennolan.com/behaviour/">http://bennolan.com/behaviour/</a><br /></small><br />
A contents/articles/choosing-the-right-blogging-platform.md

@@ -0,0 +1,298 @@

+----- +title: Choosing the Right Blogging Platform +content-type: article +subtitle: Or why I am still going to use Nanoc for the foreseeable future +timestamp: 1398607426 +tags: writing|internet|webdevelopment +----- + Every so often I wonder whether I should ditch my current blogging platform and try something new and shiny that just came out. Luckily, normally I come back to the same conclusion: I don't need to change anything, I just need to find the time and the will to write about something. + + This time is no different, but I thought I'd write a roundup of platforms, services, and tools that you can use for blogging or managing your personal sites. Note that this roundup is by no means exhaustive (like most roundups) -- it's just a quick overview of the pros and cons of a few systems that I've been researching on lately. Maybe it will be useful to someone. + +### TL;DR + + * Don't care about having "your own platform" but just want to get published somewhere? &rarr; [Medium][medium] + * Do you want a full-fledged blog and the possibility to extend it? &rarr; [WordPress][wp] + * Do you want to blog with markdown and Dropbox? &rarr; [Scrivaner][wp] + * Do you want something simple and hassle-free but also suitably geeky and hackable? + * ...in Ruby? &rarr; [Nanoc][nanoc] (but I am very partial to Nanoc, so probably I guess [Middleman][middleman] is awesome too) + * ...in Python? &rarr; [Pelican][pelican] + * ...in NodeJS? &rarr; [Metalsmith][metalsmith] + +### Evaluation Criteria + +Here's the list of features I am typically looking for in a blogging platform: + + * It must be sufficiently mature and stable, OR extremely simple to use and hack + * It must not lock me in forever. Hosted is OK, as long as I don't feel my content is trapped in any way. The platform must at least provide a way to export content, and preferably a way to import fairly heterogenous content into it. + * I like experimenting with multiple markup languages (that's just me I guess) -- so support for multiple types of content sources (Markdown, Textile, plain HTML, etc.) is a plus. + * It must be extensible in some way, and allow me to change the look and feel + * A nice and shiny web editor and an IOs app is a plus, although not mandatory + + +### Blogging Engines and Services + +These are third-party sites offering a (free) way to create an manage your own blog, complete with comments, draft management, and all the bells and whistles (well, most of). All of them offer a *hosted* option, and a few of them give users the possibility to download the software and run it on your own server. + + +#### [WordPress][wp] + +WordPress is the de-facto blogging platform. It is the blogging plaform a lot of people end up with because at the end of the day it does the job pretty well. It is also the blogging platform a lot of people are trying to replace with something else because they find it too bloated, heavyweight or complex. + +If you want a solid blogging platform, go for it -- you can have your blog hosted via [WordPress.com](https://wordpress.com/) or download it from [WordPress.org][wp] and run it on your own service. + +Pros &amp; Cons: + + * &#x2714; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2718; Does not require server-side code to work + * &#x2718; Does not require a database to work + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2714; Provides an WYSIWYG editor and an administration area + * &#x2714; Supports one or more IOs/Android apps for authoring content + +#### [Tumblr][tumblr] + +If you want something more lightweight than WordPress and you don't care about having your content hosted on someone else's platform, Tumblr could be a good fit for you. Unlike similar platforms, it allows you to completely customize the look and feel of your site (if you are sufficiently proficient with HTML and CSS, obviously), but of course it cannot be used for something other than blogging... or you cannot extend it in any way. + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a -- hosted] + * &#x2714; Does not require a database to work [n/a -- hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2714; Supports one or more IOs/Android apps for authoring content + +#### [Medium][medium] + +One of the most popular *next generation* blogging platform. Medium aims empower and encourage authors to write high-quality content and publish it on... well, yes, Medium.com. Unlike all the other services and software mentioned in this article, this is the only one that does not offer (and apparently has no plans to offer) the possibility to claim your own space via a custom domain or simiular. + +I was *extremely tempted* to try out Medium (and I did in fact, but very briefly) because of its lean and powerful web editor and because of the sense of consistency that it conveys, but I decided to stay away, at least for now. [Marco Arment][marco-platform] summarizes the problem with Medium very well: + +> Treat places like Medium the way you’d treat writing for someone else’s magazine, for free. It serves the same purpose: your writing gets to appear in a semi-upscale setting and you might temporarily get more readers than you would elsewhere, but you’re giving up ownership and a lot of control to get that. + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2718; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a -- hosted] + * &#x2714; Does not require a database to work [n/a -- hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content [but they are planning to add support for authoring to their existing app] + +#### [Svbtle][svbtle] + +Svbtle started as a blogging platform restricted to a restricted circle of *elite* bloggers. Medium didn't exist back then, so maybe some of you looked at those Svbtle blogs with a little bit of envy at the time. + +The good news is that Svbtle is now open for all, and even *you* can now be part of the game. While this was a good move on many fronts, it makes this platform less of a special thing: the magic is over. That being said, I seriously considered switching to Svbtle (or at least creating a new Svbtle blog) especially because -- unlike Medium -- it allows and encourages users to use their own domain, while still not allowing custom look and feel... but it makes sense for that they're trying to do. + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a -- hosted] + * &#x2714; Does not require a database to work [n/a -- hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content [No app, but their mobile site works pretty well] + +#### [Ghost][ghost] + +The much-touted, midly-overhyped, [NodeJS][nodejs]-powered WordPress killer. Although not quite finished yet (release 0.4 at the time of writing) Ghost is a very promising next-generation blogging platform. + +In this period I am experimenting a lot with NodeJS, so this looked appealing... but in the end I didn't want to go down the route of having to host a non-static site for H3RALD.com. + +Pros &amp; Cons: + + * &#x2714; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2718; Does not require server-side code to work + * &#x2718; Does not require a database to work + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content + +### Blogging Tools Powered by Other Services + +These are lightweight blogging services that *piggy-back* other services like [Dropbox][dropbox] or [Evernote][evernote]. Typically more limited in functionality, these services are however worth a shot if you want a simple way to blog and you already use one of the required services. Keep in mind that if you choose this route you're committing to not one, but TWO different third-party services for your blogging needs. + +#### [Calepin][calepin] (Dropbox) + +If I remember correctly this one was the very first Dropbox-powered blogging platform. The idea is simple: use [Dropbox][dropbox] to store your content, and publish it using a separate service (which must have sufficient privileges to access the necessary dropbox files). + +Although Calepin's creator originally [announced](https://twitter.com/calepinapp/statuses/192336999720550401) the shutdown of the service back in 2012 ([open sourcing](https://github.com/jokull/calepin) the original source code -- thanks!), Calepin seems to be alive and well now. + +All you need to do is write your blog posts in markdown within a specific folder of your Dropbox, and Calepin will do the rest. Compared to its main competitors (see below), Calepin is very minimalist by nature (you cannot customize the look and feel of your site, for example) but it still has its own appeal, mainly because it is extremely simple to use (as in *no configuration whatsoever*). + +Pros &amp; Cons: + + * &#x2714; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2718; Does not require server-side code to work [if you choose to host your own] + * &#x2714; Does not require a database to work + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2718; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content [Although you can use any Dropbox-enabled markdown editor app with it] + +#### [Skrivr][skrivr] (Dropbox) + +Similar to Calepin, but adds a bit more features (and a bit more complexity to the process), namely support for custom themes, with its own templating engine. Currently invite only (but I got an invite after a while). + +Personally, I feel that this service is somewhat in the middle between Calepin and Scriptogram (see below) -- If I had to choose, I'd go for one of the other two. + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a: Hosted] + * &#x2714; Does not require a database to work [n/a: Hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2714; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content [Although you can use any Dropbox-enabled markdown editor app with it] + +#### [Scriptogram][scriptogram] (Dropbox) + +The high-end platform within this category. Like Skrivr, Scriptogram offers support for more customizations for your Dropbox-powered blog, but it looks a bit more polished and user-friendly. + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a: Hosted] + * &#x2714; Does not require a database to work [n/a: Hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2714; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content [Although you can use any Dropbox-enabled markdown editor app with it] + +#### [Postachio][postachio] (Evernote) + +Unlike the previosly-mentioned services, Postachio does not relies on Dropbox as its data source, but it uses [Evernote][evernote] instead. Pretty neat, and similar to Scriptogram or Skrivr feature-wise (theme support, templates with custom tags, etc.). The main drawback? You need an Evernote account to use it -- and if I was going to use Evernote for blogging as well, I'd definitely choose to upgrade to a premium account. + +Not happening for now, but good if you live in an Evernote-centric ecosystem already (maybe you use Evernote as your main todo list as well, besides using it for all your note-taking needs). + +Pros &amp; Cons: + + * &#x2718; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work [n/a: Hosted] + * &#x2714; Does not require a database to work [n/a: Hosted] + * &#x2718; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2714; Can be easily customized without using addons or themes + * &#x2718; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2714; Supports one or more IOs/Android apps for authoring content [the Evernote app...] + +### Static Site Generators + +Static site generators allows you to manage a blog or web site relatively effortlessly while not relying on a third-party service. This blog is [powered by][h3rald-nanoc] one of them: [nanoc][nanoc]. + +The basic idea behind every static site generator is simple: manage all your content in flat-files (normally using a lightweight markup language like markdown) and then use a script (in Ruby, Python, NodeJS, or many others...) to *compile them* into a static web site, relying on third-party services for all the interactive bits, if any (most notably comments, via [Disqus][disqus]). + +According to [StaticSiteGenerators.net][ssg], there are 240 of them, so obviously I'm not going to cover them all here -- I'll limit the roundup to the most popular ones and/or those I am experienced with. + +To save myself some copying and pasting, the Pros &amp; Cons of *all* the static site generators (using the same list that I have been using to compare other services) is the following: + + * &#x2714; Can be installed on your own server + * &#x2714; Can be used with your own domain + * &#x2714; Does not require server-side code to work + * &#x2714; Does not require a database to work + * &#x2714; Provides support for multiple lightweight markup languages (Markdown, Textiles, etc.) + * &#x2714; Can be easily customized without using addons or themes + * &#x2714; Supports interoperability with other platforms (import/export/convert content to other formats) + * &#x2718; Supports one or more IOs/Android apps for authoring content + + +#### [Jekyll][jekyll] + +Apparently, Jekyll is *the most popular* static site generator by... number of stars on its Github repo. Which isn't really fair because Jekyll powers Github pages and has been heavily marketed by its creators and supporters as the easiest way to set yourself free from Wordpress or a similar *heavyweight* blogging platform. + +Truth is, it is if you plan to use Github Pages as well -- if not, you may as well use one of the others that offer much more customization (assuming that you need more customization, that is). If you like it but you want something more suitable for a blog, you may want to check out Octopress instead. + +#### [Octopress][octopress] + +Although the Octopress site has not been updated since... 2011 (!), the Github repo shows recent activity and the project seems still very popular. It is basically Jekyll on steroids, with a lot of blogging-related goodies. + +#### [Nanoc][nanoc] + +Nanoc is the static site generator that still powers this web site. Overall, I am still very happy with it because it can do everything I need (and because I already have a working site running on it of course!). I already wrote about it in the past, and while nanoc (and my site) evolved a lot meanwhile, most of the [original article][h3rald-nanoc] remains valid today. + +#### [Middleman][middleman] + +I admit I didn't try this one yet, but judging from the number of people that starred it on Github this is the most popular static site generator written in Ruby (after Jekyll and Octopress). It seems to be feature-packed (including native support for i18n) and well worth a look. + +#### [Pelican][pelican] + +The Python counterpart of Jekyll. Never tried it personally, but it seems solid and a valid choice if you are a Pythonista. Oddly enough, it also powers the [Calepin.co][calepin] web site (and by reflection all Calepin-powered blogs in existance). + +#### [DocPad][docpad] + +If you are already familiar with [NodeJS][nodejs] and you want to use something *extremely powerful and versatile* as your static site generator, Docpad is the answer. It provides all the features of other static site generators, but it comes with a hige amount of [plugins](http://docpad.org/docs/plugins) to do pretty much anything and more, including executing scripts/templates in other programming languages. Obviously it just runs external problems to accomplish this, but still, this could be appealing to some folks (and piss off others). + +Drawbacks? Well, it Looks somewhat complex. + +#### [Metalsmith][metalsmith] + +If DocPad is powerful and complex, Metalsmith is still powerful but *incredibly* simple. Its [core](https://github.com/segmentio/metalsmith/blob/master/lib/index.js) is less than 200 lines of codes (OK, not including all the third-party libraries it requires, like many other NodeJS modules, anyway), and everything else is a plugin. + +One of the catchphrases of the project is actually *everything is a plugin*, and they mean it: all Metalsmith does is providing a way to pipe a set of source files through plugins to produce a set of output files. I've been using it for some other projects for a while and making plugins is very simple, and the existing ones can be easily combined to obtain a static-site geerator. + +### Conclusions + +For the time being, I decided not to switch to another platform and stick to Nanoc. Why? Because it *just works*. Anyhow, I did seriously consider a lot of the blogging platform I covered in this roundup. + +In particular, I've been tempted to at least start using **Medium** regularly, mainly because of its fantastic post editor, and because of the high-quality content network it is becoming. But again, writing for medium would be like writing for a magazine for free: the fact that you cannot use a custom domain or effectively build your own identity was enough to put me off. + +**Svbtle** is slightly better on the customization front (at least it allows custom domains) but didn't convince me. I may use it for a *secondary* blog though. + +For what concerns **Dropbox-powered services**... the idea is really cool, but I don't feel comfortable in depending on *two* third-party services for my blog. + +...Then there's static site generators. I came to the conclusion that they are by far the most flexible option for small/medium sized personal web site. At this stage, I could probably have switched to something different, maybe powered by NodeJS (I am using Ruby less and less nowadays) like **Metalsmith**... but why bother? I'd have had to port a lot of the customizations I implemented in Ruby to Javascript with no particular benefit, at least not in the short term anyway. + +What do *you* think? What blogging platform are you using, and why? + + +[marco-platform]: http://www.marco.org/2013/08/05/be-your-own-platform +[postachio]:http://postach.io/ +[evernote]:http://evernote.com/ +[posthaven]:https://posthaven.com/ +[blogger]:https://www.blogger.com/ +[skrivr]:http://skrivr.com/ +[jekyll]:http://jekyllrb.com/ +[calepin]:http://calepin.co/ +[search]:https://www.google.com/search?hl=en&q=blogging+platforms +[ghost]:https://ghost.org +[metalsmith]:http://www.metalsmith.io +[docpad]:http://docpad.org +[nanoc]:http://nanoc.ws +[octopress]:http://octopress.org +[ssg]:http://staticsitegenerators.net +[pelican]:http://blog.getpelican.com +[wp]:https://wordpress.org +[tumblr]:https://www.tumblr.com +[gulp]:http://gulpjs.com +[grunt]:http://gruntjs.com +[svbtle]:https://svbtle.com +[posterous]:http://help.posterous.com +[typepad]:http://www.typepad.com +[squarespace]:http://www.squarespace.com +[skrivr]:http://skrivr.com/ +[scriptogram]: http://scriptogr.am/ +[medium]:https://medium.com/ +[nodejs]:http://nodejs.org +[dropbox]:http://dropbox.com/ +[middleman]:http://middlemanapp.com/ +[pelican]:http://blog.getpelican.com/ +[disqus]:http://disqus.com/ +[h3rald-nanoc]:/articles/take-back-your-site-with-nanoc/ +
A contents/articles/concatenative-020.html

@@ -0,0 +1,31 @@

+----- +title: Concatenative 0.2.0 released +content-type: article +timestamp: 1240126920 +tags: ruby|concatenative +----- +<p>Version 0.2.0. of the <a href="/concatenative">Concatenative</a> <span class="caps">DSL</span> has been <a href="http://rubyforge.org/frs/?group_id=8068&amp;release_id=33575">released</a>.</p> +<p>Here are some highlights from the changelog:</p> +<ul> + <li>Implemented new combinators: + <ul> + <li>binrec</li> + <li>split</li> + <li>twodip</li> + <li>threedip</li> + </ul></li> + <li>Performance improvements: + <ul> + <li>Stack is never copied.</li> + <li>No symbol/string conversion when processing words.</li> + </ul></li> + <li>Pseudo-namespace support (e.g. :kernel/:while and :math/:factorial)</li> + <li>~ and &lt;= operators to unquote and define words, respectively.</li> + <li>No more uppercase words!</li> +</ul> +<p>Oddly enough, I realized that it is possible to defined methods named after reserved words like &#8220;while&#8221; or &#8220;if&#8221;, so now all the concatenative words (combinators) in <code>kernel.rb</code> are now defined <em>without</em> a leading undersore. Similarly, there&#8217;s no real need to use <span class="caps">UPPERCASE</span> symbols, so as a result, method lookup is significantly faster and will use less resources.</p> +<p>Here&#8217;s how the lookup works. Say you have the following program:</p> +<div class='ruby'><pre><code>[[1,2,3], [4.5.6], :concat]</code></pre></div><p>If <code>:concat</code> has been defined by the user (<code>:concat &lt;= [...]</code>), that definition will be used, otherwise the <code>Concatenative::Kernel</code> combinator <code>concat</code> will be called. If you want to use the corresponding Ruby method, all you have to do is specifying the arity explicitly using the <code>|</code> operator.</p> +<p>To remove any ambiguity, it is now possible to specify the <em>namespace</em> of a word explicitly, e.g. :kernel/:concat or :ruby/concat. The <code>/</code> operator simply concatenates the two symbols together (<code>:"kernel/concat"</code>) and sets the namespace (<code>:kernel</code>) and name (<code>:concat</code>) of the new symbol. <code>:kernel</code> and <code>:ruby</code> are not meant to be used when defining new words, but you can use anything else you like, for example :math/:factorial or :local/:a, etc.</p> +<p>As I pointed out in the <a href="/articles/concatenative-programming-in-ruby">first article</a> about concatenative, even with the new performance improvement a concatenative program still runs slower than a standard Ruby program, but at least now you won&#8217;t run out of stack space (the <em>Ruby</em> stack, in this case) too soon.</p> +<p>If you have any issues to report, feature requests, etc., feel free to use <a href="http://github.com/h3rald/concatenative/issues">GitHub</a> to do so.</p>
A contents/articles/concatenative-programming-in-ruby.html

@@ -0,0 +1,116 @@

+----- +title: Concatenative programming in Ruby +content-type: article +timestamp: 1238221440 +tags: ruby|concatenative|programming +----- +<p>A while ago, I sat down examining a few <a href="http://www.h3rald.com/articles/10-programming-languages">alternative programming languages</a> I might decide to learn someday. Each of those languages has its own peculiarities, and I didn&#8217;t choose them randomly, I chose them based on their popularity, power, paradigm and how actively they are developed.</p> +<p>I included <a href="http://factorcode.org/">Factor</a> as the only representative for <em>concatenative programming</em>, an interesting way to write programs, but seldom used in &#8220;recent&#8221; languages (except for Factor and a few others).</p> +<h3>The Joy of concatenative programming</h3> +<p>If you have absolutely no clue on what I&#8217;m talking about, you should consider looking at the home page for the <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy.html">Joy Programming Language</a>, or maybe just the <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy/j00ovr.html">overview</a>: it should be enough to tikle your curiosity.</p> +<p>Joy is often considered the <em>canonical</em> concatenative programming language: a basic &mdash;but working&mdash; implementation of a simple programming language to illustrate the fundamentals of concatenative programming. Joy looks like this:</p> +<p><code>2 3 + dup *</code></p> +<p>This simple programs computes the sum of 2 and 3, pushes it on the stack, duplicates it (using the <code>dup</code> combinator) and then multiplies the two values, obtaining 25 as a result.</p> +<p>Let&#8217;s slow down a second. Here&#8217;s what happens, exactly:</p> +<table> + <tr> + <th>Element entered </th> + <th>Stack contents</th> + </tr> + <tr> + <td> 2 </td> + <td> <sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup> </td> + </tr> + <tr> + <td> 3 </td> + <td> [2 3] </td> + </tr> + <tr> + <td> + </td> + <td> <sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> </td> + </tr> + <tr> + <td> dup </td> + <td> [5 5] </td> + </tr> + <tr> + <td> * </td> + <td> <sup class="footnote" id="fnr25"><a href="#fn25">25</a></sup> </td> + </tr> +</table> +<p>Got it? Let&#8217;s take it one step further. When you enter <code>dup</code> and then <code>*</code>, you are effectively computing the square of a number, so we can define the function <code>square</code> simply as:</p> +<p><code>square == dup *</code></p> +<p>In Ruby, this would be:</p> +<div class='ruby'><pre><code>def square(x) + x*x +end</code></pre></div><p>What&#8217;s unusual here? &mdash; Simple, there are no <em>variables</em> involved. Joy doesn&#8217;t need any explicit variable or <em>formal parameters</em> of any sort.</p> +<p>There&#8217;s more. Take the following code:</p> +<p><code>[1 2 3 4] [dup *] map</code></p> +<p>The <code>map</code> combinator expects a list and a <em>quoted program</em> (the same one used to compute the square) and produces a new list containing the result of that program applied to each element of the original list. Basically the equivalent of:</p> +<div class='ruby'><pre><code>[1,2,3,4].map { |e| e*e }</code></pre></div><p>Do you notice anything different? &mdash; Yes, Joy doesn&#8217;t need blocks or lambdas either, it uses <em>quoted programs</em> instead, which are nothing but slightly fancier lists (or arrays, as you like).</p> +<p>Let&#8217;s recap then, Joy doesn&#8217;t need of:</p> +<ul> + <li>lambda functions or blocks (quotation does the trick)</li> + <li>explicit parameters (everything you need is on the stack)</li> + <li>variable assignments (same as above)</li> + <li>explicit recursion (provided you can use combinators like linrec, primrec, binrec, etc.)</li> +</ul> +<p>I would consider this one of the best examples of <em>programming minimalism</em>: an incredibly simple syntax, a very small set of rules, but a good deal of power.</p> +<h3>Ruby objects on the stack</h3> +<p>After reading about Joy, I realized that implementing something similar in Ruby would be an interesting mini-project (let&#8217;s say a week of lunch breaks) to understand more about concatenative programming. It would also be pointless, too: a stack-based programming language implemented on top of one of the most high-level programming languages you can find isn&#8217;t going to be fast, is it? Nevertheless, it would still be interesting.</p> +<p>Ruby offers everything you need to build a Joy-like <span class="caps">DSL</span>:</p> +<ul> + <li>You can use arrays as &#8230;arrays, but also as quoted programs, and to model the stack itself.</li> + <li>You can use integers, strings, etc. as themselves</li> + <li>You can use Symbols as functions (we&#8217;ll get to this in a minute)</li> +</ul> +<p>If you think about the following expression in postfix notation:</p> +<p><code>2 2 +</code></p> +<p>We <em>could</em> translate it into infix notation (<code>2 + 2</code>), because Ruby supports it, but it&#8217;s not general enough. What you could do is this though:</p> +<div class='ruby'><pre><code>2.send(:+, 2)</code></pre></div><p>Message sending. I can see all the SmallTalk sympathizers drooling already. Well yes, In Ruby, <em>everything</em> is an object, so <em>everything</em> has a receiver and maybe some parameters. In other words, every method call can be reduced to the following syntax:</p> +<div class='ruby'><pre><code>receiver.send(method, *params)</code></pre></div><p>In this way, it is safe to assume that everything has a receiver, which could be understood as a function parameter, and may have 0 or more parameters. Take the following then:</p> +<div class='ruby'><pre><code>[2, 2, :+]</code></pre></div><p>It&#8217;s not too different from Joy, and it&#8217;s still Ruby code. All you have to do is use something to do the following:</p> +<ul> + <li>Take an array, and examine each item: + <ul> + <li>If it&#8217;s an object (non-Symbol), then push it on top of the stack.</li> + <li>If it&#8217;s a Symbol, then do something different, i.e.: + <ul> + <li>Find its receiver and its parameters and call a method.</li> + <li>Manipulate something on the stack.</li> + </ul></li> + </ul></li> +</ul> +<p>In this case, we have to find :+&#8217;s receiver and its parameter and we&#8217;re sorted.</p> +<p>Unfortunately Ruby&#8217;s <code>arity</code> method isn&#8217;t that reliable. For example: <code>"test".instance_method(:sub).arity</code> returns -1, while it should return &#8220;2&#8221; to be useful. So we have no choice but find a way to pass the method&#8217;s arity explicitly, in some cases.</p> +<p>For example like this:</p> +<div class='ruby'><pre><code>["Ciao, Fabio", /Ciao/, "Hello", :sub|2]</code></pre></div><p>If we define a | operator for the Symbol class, it&#8217;s not too bad after all. It&#8217;s heavy, but in this way we can use <em>any</em> Ruby method in postfix notation.</p> +<h3>Introducing the Concatenative Ruby <span class="caps">DSL</span></h3> +<p><a href="/concatenative">Concatenative</a> is a simple Ruby <span class="caps">DSL</span> for concatenative programming. You can write concatenative programs inside ordinary Ruby arrays and execute them by calling either <code>Array#execute</code> or <code>Kernel#concatenate</code>, like this:</p> +<div class='ruby'><pre><code>require 'concatenative' + +concatenate( + 10, + [0, :==], + [1, :+], + [:dup, 1, :-], + [:*], + :linrec + )</code></pre></div><p>This simple program calculates the factorial of 10. As you can see, no matter how unusual it may look, it is perfectly valid Ruby code and it is equivalent to the following Joy code:</p> +<p><code> +10 [0 =] [1 +] [dup 1 -] [*] linrec +</code></p> +<p>Granted, Joy looks better, but that&#8217;s the tradeoff for not writing a parser for Joy syntax, after all. <br /> +Looking at the code above, there are a few things to keep in mind when programming with Concatenative:</p> +<ul> + <li>You are using Ruby arrays, so you have to use commas, at least</li> + <li>functions, operators and combinators (let&#8217;s just call them <em>words</em>) are available as Ruby symbols</li> + <li>The arity of all Ruby infix operators has been already set to &#8220;1&#8221; by concatenative using the <code>set_arity</code> method (which simply stores the arity of a particular symbol in a constant hash)</li> + <li>You can specify explicit arities using the | operator (<code>:gsub|2</code>, or <code>:join|1</code>)</li> + <li>Unless the arity has been specified, an arity of 0 is assumed.</li> + <li>You can define your own concatenative functions using the <code>Symbol#&lt;=</code> method, which expects a quoted concatenative program.</li> +</ul> +<h3>Performance issues</h3> +<p>In its current form, Concatenative can be very slow, as show the &#8220;benchmarks&#8221; provided in the /examples folder, especially if you use recursive combinators. This is understandable because everything is implemented in pure Ruby, which is totally unsuitable for low level stuff.</p> +<p>If you are interested, you are more than welcome to submit patches and suggestions to improve Concatenative&#8217;s performance, or, if you feel brave enough, you could help me create a C extension instead: things would become much faster then.</p> +<p>At any rate, feel free to play with it. You can get the source from <a href="http://github.com/h3rald/concatenative/tree/master">GitHub</a>, you can get the gem from <a href="http://rubyforge.org/projects/concatenative/">RubyForge</a> and you can submit ticket through <a href="http://github.com/h3rald/concatenative/issues">GitHub</a> as well.</p>
A contents/articles/design-patterns-in-ruby-review.html

@@ -0,0 +1,107 @@

+----- +title: Book Review: Design Patterns in Ruby +content-type: article +timestamp: 1207885260 +tags: ruby|review|books +----- +<p>I finally got my hands on a shiny new copy of <em>Design Patterns in Ruby<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup></em>. The book itself is not brand new and it was already widely praised by many different people online, so I wanted to take a look for myself.</p> +<p>To my surprise, the book is a hardcover edition, which makes it look more professional and more durable than the average programming book<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>. It&#8217;s also smaller and shorter than the average programming book<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup> (340 pages), which makes it much easier to carry around and less intimidating to read. It&#8217;s also <em>not</em> meant to be a reference book, so it is actually pleasant an easy to read all in one go, as you&#8217;ll soon find out.</p> +<p>What is it about? &mdash; well, design patters in the Ruby language of course. But it&#8217;s not the usual brainwash of programming theory you would expect by a typical book on patters, it has <em>plenty</em> of examples of real code. When I say <em>real code</em> I don&#8217;t mean the usual Dog/Cat/Horse/&lt;insert animal here&gt; classes or juke-box simulations which don&#8217;t work at all etc. etc., I mean actual snippets from well known Ruby applications, like RubyGems, FXRuby and, of course, Rails.<br /> +OK well, there&#8217;s an exception perhaps: Russ <em>did</em> include a few wild life simulations (ponds with frogs and similar), but it&#8217;s only for your own good, and for the sake of tradition.</p> +<p>Anyhow, let&#8217;s start from the beginning&#8230;</p> +<h3>Part I: Patters and Ruby</h3> +<p>The first part of the book serves as a general introduction to the other two parts. If you know the basics of both design patterns and Ruby, you can safely skip this as you won&#8217;t find anything of overwhelming interest here.</p> +<p>Personally I really liked <strong>Chapter 1</strong> though, &#8220;Building better Programs with Patterns&#8221;, in which Russ does a great job in summarizing the original GoF book<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> into four points:</p> +<p style="float:right;"><img src="/files/design_patterns_in_ruby.jpg" alt="" /></p> +<ul> + <li><em>Separate our the things that change from those that stay the same.</em></li> + <li><em>Program to an interface, not an implementation.</em></li> + <li><em>Prefer composition over inheritance.</em></li> + <li><em>Delegate, delegate, delegate.</em></li> +</ul> +<p>Also, although it does not come from the Design Patterns book but from building real systems, the author adds the <span class="caps">YAGNI</span> (You Ain&#8217;t Gonna Need It) principle<sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup> as a reminder to resist the temptation of implementing things which <em>may</em> be needed <em>later on</em>, even if they are not needed right now.<br /> +The chapter ends with an outline of the patterns which will be presented throughout the book: 14 out of the original 23 patterns by the Gand of Four will be discussed in Part II and 3 bonus &#8220;Ruby-only&#8221; patterns will be examined in Part <span class="caps">III</span>, as a special treat.</p> +<p><strong>Chapter 2</strong> (<em>Getting started with Ruby</em>) feels perhaps a bit out of place. As others pointed out<sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup>, why does a book on advanced Ruby programming techniques include a 35-page-long introduction on the Ruby language? The answer was given by Russ himself in an interview<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup>:</p> +<blockquote> +<p>&#8220;The reason that I included the introductory chapter about Ruby in there was to make the book accessible to folks with little or no Ruby background.<br /> +Now honestly, I don’t think that you could come to my book with no background in Ruby and walk away from it an expert Ruby programmer &mdash; it’s not really that kind of introductory book.<br /> +But I do think that someone with experience in other languages could read my book and come away knowing about Ruby, understanding what all the shouting is about.&#8221;</p> +</blockquote> +<p>I admit, I skipped this chapter during my first reading because I was eager to move on to the main part of the book, but I did read it afterwards (I had to write this review after all!). It&#8217;s quite a nice introduction aimed at the average .<span class="caps">NET</span>/Java developer: Russ provides a step-by-step presentation of the main features of the language while holding the reader by hand when something weird or scary comes about:</p> +<blockquote> +<p>The slightly strange-looking syntax in this code is actually a tip-off something deep and important: In Ruby, everythng &mdash; and I mean <em>everything</em> &mdash; is an object.</p> +</blockquote> +<p>Of course Chapter 2 won&#8217;t turn you into a Ruby guru, but it definitely fulfills one of the author&#8217;s goals: bringing developers of other languages closer to Ruby, and give them a tiny taste of how Ruby can be <em>wickedly powerful</em>.</p> +<h3>Part II: Patterns in Ruby</h3> +<p>Part II constitutes the bulk of the book, describing 14 GoF patterns in 220 pages. The patterns covered are the following:</p> +<ul> + <li>Template Method</li> + <li>Strategy</li> + <li>Observer</li> + <li>Composite</li> + <li>Iterator</li> + <li>Command</li> + <li>Adapter</li> + <li>Proxy</li> + <li>Decorator</li> + <li>Singleton</li> + <li>Factory Method</li> + <li>Abstract Factory Method</li> + <li>Builder</li> + <li>Interpreter</li> +</ul> +<p>Why not covering all 23? Well, because to be honest, they are rarely used in Ruby. Furthermore, in some cases some of the ones examined in the book may feel a bit <em>unnatural</em> to the average Rubyist: how many times did you ever think about using an External Iterator when <code>each</code> is normally available as default internal iterator for any Array-like class?</p> +<p>Each chapter in this part is devoted to a particular pattern and it is organized in more or less the same way, as outlined in the following sections.</p> +<h4>Introduction and Personal Anecdotes</h4> +<p>Most chapters start with a personal anecdote involving the author: it may be a memory related to his first job at the local grocery store (Chapter 8), or about the day he decided to buy his son a bike (Chapter 14):</p> +<blockquote> +<p>&#8220;I remember the day we bought my son his first bike.&#8221; [&#8230;] I spent hours trying to pull together a minor junkiard of parts according to instructions that would have baffled the entire National Security Agency. As it turned out, picking the bike was the easy part: putting it together was the real challenge.</p> +</blockquote> +<p>This was used to introduce the Builder pattern, and how to use it to configure objects which include different logical parts.<br /> +Personally I find this technique particularly useful to introduce a particular problem from a different, more mundane prospective instead of starting off with an abstract theorethical description of the pattern itself. <br /> +The anecdote is then followed by the description of the actual programming problem for which the specific pattern will be used.</p> +<h4>Description of the Pattern and Initial Implementation</h4> +<p>An initial implementation of the pattern in Ruby will be provided more or less immediately after the introduction of each chapter, often accompanied by a simple <span class="caps">UML</span> diagram.<br /> +This implementation normally has quite a few conceptual flaws, which are then examined and corrected step-by-step the chapter to obtain a more &#8220;Ruby-friendly&#8221; solution.</p> +<h4>A More Rubyfied Version of the Pattern</h4> +<p>The final implementation of each pattern is often very different from the initial attempt, and it may contain quite a lot of Ruby-specific code. The author does an excellent job in suggesting pattern implementations which often use blocks, <code>Proc</code> objects or method redefinitions when needed, to make the code more succint and more readable at the same time, as all Ruby code should be.</p> +<p>By doing so, even people who are still learning Ruby will understand how to use some very useful Ruby idioms which can be a bit difficult to grasp otherwise.</p> +<h4>Using and Abusing &lt;Pattern&gt;</h4> +<p>Patterns are often overused and misused, and some people normally end up wondering if they should be used at all, after all. This section (present as a matter of fact in <em>every</em> chapter of part II an <span class="caps">III</span>) examines the pitfalls of the pattern and the most common mistakes developer make when applying it.<br /> +It is by far the most useful section of each chapter, and that&#8217;s what I&#8217;ll be reading and re-reading every time I&#8217;m thinking about using a particular pattern in my code. As a matter of fact, these sections make you realize that <em>every</em> pattern has its own inherent flaws and dangers, and that it is far from being a Silver Bullet. Even when you&#8217;re <em>supposed</em> to use a pattern to accomplish something, be aware that <em>something nasty</em> can happen unless you&#8217;re extra careful: this, perhaps, is the true Golden Rule conveyed throughout the whole book.</p> +<h4>&lt;Pattern&gt;s in the Wild</h4> +<p>This is another very interesting section which is included in every chapter of part II and <span class="caps">III</span>. After describing what a pattern does, how it <em>can</em> be used and how it <em>should</em> be used, you&#8217;ll finally find some interesting examples taken from real world applications.<br /> +By &#8220;real world application&#8221; I mean something like ActiveRecord<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup> (Observer, Command, Adapter, &#8230;), DRb<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup> (Proxy) or FXRuby<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup> (Composite), for example, i.e. important programs and libraries which are used in production environments.<br /> +Personally, I was really glad to find such examples in this book: it definitely helps you feeling design patterns as something more practical and useful than pure software architecture theories.</p> +<h4>Wrapping it Up</h4> +<p>&#8220;Wrapping it Up&#8221; is the title of the last section of each chapter of Part II and <span class="caps">III</span>. It&#8217;s basically a summary of the whole chapter and thus a useful way to recap the most important concepts. I found this section particularly useful when using the book as a design pattern reference, after reading it for the first time: this section provides a quick and essential overview of each pattern &#8212; and the most important DOs and DON&#8217;Ts, too.</p> +<h3>Part <span class="caps">III</span>: Patterns for Ruby</h3> +<p>By the time you get to Part <span class="caps">III</span> you&#8217;ll definitely feel that Ruby can do <em>more_. Some of the Ruby implementation of certain patterns described in the book make extensive use of blocks and Proc objects, and the @method</em>missing@ method (although potentially dangerous unless extra care is taken) gives us a more immediate way to obtain delegation, for example when creating Proxies. <br /> +Also the fact that objects can be modified at runtime by adding and removing methods &#8220;as needed&#8221; seems quite an underused feature in traditional patterns, simply because those patterns were first conceived for languages which are very different from Ruby and are perhaps less <em>liberal</em> than Ruby when it comes to dynamic features<sup class="footnote" id="fnr10"><a href="#fn10">10</a></sup>.</p> +<p>These particular Ruby features can be used (and abused, of course) to implement more Ruby-esque patterns, such as the ones included in this part of the book:</p> +<ul> + <li>Internal Domain-Specific Languages</li> + <li>Meta-Programming</li> + <li>Convention Over Configuration</li> +</ul> +<p>These are just examples, of course some may complain because the Active Record or <span class="caps">ORM</span> pattern are missing, but this is understandable as it may be considered too specific compared to the others. <br /> +Each pattern is examined in detail, and I particularly like way the <span class="caps">DSL</span> pattern was described: Chapter 16 explains how to develop a simple but effective Ruby <span class="caps">DSL</span> from scratch for creating file backups. This can be particularly useful for people who never tried creating DSLs before, but also for developers who tried, but want to improve their skills.</p> +<p>Chapter 18 (Convention Over Configuration) is sufficiently clear and detailed, perhaps even too much if you already know how Rails was developed (and all the hype which follwed).</p> +<p>On the other hand, I was a bit disappointed by Chapter 17 (Meta-Programming). Maybe it&#8217;s because I built up extremely high expectations about it while reading the rest of the book, but it just felt too short and not detailed enough for my liking. If I had to write such a chapter (which would have been actually very hard), I would have started from an excellent post by Ola Bini<sup class="footnote" id="fnr11"><a href="#fn11">11</a></sup> which introduces <em>eleven</em> meta-programming techniques, and built up content and examples from there. The only reason why &#8212; I think &#8212; Russ didn&#8217;t do it in his book was length/balance constraint: a <em>properly detailed</em> chapter about meta-programming in Ruby could easily take up over forty pages!</p> +<h3>The Verdict</h3> +<p>As I said in the beginning: this is not meant to be a complete, in-depth, reference book on everything you may want to know about design patterns in Ruby. That&#8217;s why, as a matter of fact, you can actually read this book all the way through without getting utterly bored. Russ uses an informal, yet appropriate style to turn potentially complex, theorethical computer science principles into easy-to-understand, <em>useful</em> tools which can truly improve the way you code.</p> +<p>The whole book flows very very nicely. I actually recommend reading this book in sequence, without skipping chapters, because each pattern is described in a way that is somehow linked to the following ones, so that you can understand and learn about the pros and cons of each one in a more natural and useful way.</p> +<p>OK, I would have loved to see Part <span class="caps">III</span> as long as Part II, probably, but overall I&#8217;m very, very satisfied of what the book taught me. The only problem is that it also made me suddenly realize all the naive design mistakes I&#8217;ve been making when coding in Ruby, so I&#8217;ll now feel compelled to fix at least some of them&#8230;</p> +<p>Definitely a worthwhile read, I just hope to see more books like this, or even a second edition of this one soon!</p> +<h3>Notes</h3> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> <a href="http://www.informit.com/store/product.aspx?isbn=0321490452">Design Patterns in Ruby</a> by Russ Olsen, Addison Wesley Professional, 2007.</p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> Think of <a href="http://www.pragprog.com/titles/ruby">Programming Ruby: The Pragmatic Programmer&#8217;s Guide, 2nd Ed.</a> by Dave Thomas with Chad Fowler and Andy Hunt, Pragmatic Programmers, 2004.</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.informit.com/store/product.aspx?isbn=0201633612">Design Patterns: Elements of Reusable Object-Oriented Software</a>, by By Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides (a.k.a. the <em>Gang of Four</em>), Addison Wesley Professional, 1994.</p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> For more information on the <span class="caps">YAGNI</span> principle, visit <a href="http://www.xprogramming.com/Practices/PracNotNeed.html">You&#8217;re <span class="caps">NOT</span> gonna need it</a>, Ronald E Jeffries.</p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> See <a href="http://on-ruby.blogspot.com/2007/12/design-patterns-in-ruby-review.html">Design Patterns in Ruby, a review</a>, <em>On Ruby</em>blog.</p> +<p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> See <a href="http://on-ruby.blogspot.com/2008/01/russ-olsen-interview.html">Russ Olsen Interview</a>, <em>On Ruby</em>blog.</p> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> <a href="http://ar.rubyonrails.com/">ActiveRecord</a> is an implementation of the Object-Relational Mapping (<span class="caps">ORM</span>) pattern used by the Ruby on Rails framework.</p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> Distributed Ruby, see <a href="http://chadfowler.com/ruby/drb.html">Intro to DRb</a> by Chad Fowler.</p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> <a href="http://www.fxruby.org/">FXRuby</a>, a graphical toolkit written in Ruby.</p> +<p class="footnote" id="fn10"><a href="#fnr10"><sup>10</sup></a> This can be a good or bad thing depending on the way you look at it, and what you want to use the language for. The fact that Ruby is dynamically typed makes it easier to do things which are totally impossible in C++ or Java, but it also introduces a whole new set of potential dangers.</p> +<p class="footnote" id="fn11"><a href="#fnr11"><sup>11</sup></a> <a href="http://ola-bini.blogspot.com/2006/09/ruby-metaprogramming-techniques.html">Ruby Metaprogramming Techniques</a>, Ola Bini: Programming Language Synchronicity.</p>
A contents/articles/distributed-programming-with-ruby-review.html

@@ -0,0 +1,99 @@

+----- +title: Book Review: Distributed Programming with Ruby +content-type: article +subtitle: Just what you need to get started with the right tools to build large and scalable applications in Ruby +timestamp: 1277206200 +tags: review|books|ruby +pdf: true +----- + + <section class="section"> +<p>Back when I read <em><a href="http://www.pragprog.com/titles/ruby/programming-ruby">Programming Ruby</a></em> for the first time, I distinctly remember a short reference to <a href="http://ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html">dRb</a>, the <strong>D</strong>istributed <strong>R</strong>u<strong>b</strong>y library included in the Standard Library.</p> +<p><em>&#8220;Cool!&#8221;</em> &#8212; I thought</p> +<p>&#8230;and that was pretty much it. The documentation for DRb was pretty much nonexistent (at the time), I didn&#8217;t need it, so I pretty much forgot about it altogether until this book came out.</p> +<p><em><a href="http://www.informit.com/store/product.aspx?isbn=0321638360">Distributed Programming with Ruby</a></em> fills a very particular niche of the Ruby programming world: <em>distributed</em> programming. Moreover, this book is somehow <em>justified</em> by the scarce documentation on the subject:</p> +<blockquote> +<p>Although these libraries [DRb and rinda] have been included with Ruby for many years now, they have received little or no attention (or documentation). This has led to a lot of <span class="caps">FUD</span> (fear, uncertainty, and doubt) about what these libraries can and cannot do, and when they are appropriate to use (if at all).</p> +</blockquote> +<p style="padding-left:4em;">&#8212; Mark Bates, <em><a href="http://www.informit.com/store/product.aspx?isbn=0321638360">Distributed Programming with Ruby</a></em></p> +<p>But there&#8217;s more. This book gives the reader a complete overview of what&#8217;s out there, in the Ruby world, to support distributed programming. This includes quite a few gems and libraries besides the ones provided in the standard library.</p> +<section class="section"> +<header><h1 id="h_1" class="toc">Overview</h1></header> +<img src="/img/pictures/distributed-programming-with-ruby.jpg" style="float:right;" /> + <p>The book is organized into four parts, each dealing with a particular set of Ruby libraries related to distributed programming.</p> +<p>The author, <a href="http://www.metabates.com/">Mark Bates</a>, does a good job maintaining a sort of continuity in the examples throughout the book: you&#8217;ll get accustomed to a <em>Logger</em> class of some kind being punctually re-implemented more or less once per chapter, using a different library.</p> +<p>Additionally, the libraries described in the book are ordered by &#8220;reverse preference&#8221; in each part of the book, so normally the libraries described later on in a part fix some of the shortcomings of the preceding ones.</p> + + + + <section class="section"> +<header><h1 id="h_2" class="toc">Part I: Standard Library</h1></header> +<p>This part is the most important of all: it gives you the very basics about Distributed Programming and it describes the &#8220;building blocks&#8221; (<a href="http://ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html">DRb</a> and <a href="http://ruby-doc.org/stdlib/libdoc/rinda/rdoc/index.html">Rinda</a>) used in nearly all the other libraries described in the book. If you want you can skip some chapters in the other parts of the book, but make sure this part is crystal clear in your head before proceeding any further.</p> + +</section> + + <section class="section"> +<header><h1 id="h_3" class="toc">Part II: Third-Party Frameworks and Libraries</h1></header> +<p>If you read part I, you&#8217;re probably a bit disappointed by DRb and Rinda and the amount of code you have to write to make simple things work in a distributed environment. The good news is that there are some Ruby gems out there that can make life simpler:</p> +<ul> + <li><a href="http://seattlerb.rubyforge.org/RingyDingy/">RingyDingy</a></li> + <li><a href="http://rufy.com/starfish/doc/">Starfish</a></li> + <li><a href="http://github.com/markbates/distribunaut">Distribunaut</a></li> + <li><a href="http://github.com/mperham/politics">Politics</a></li> +</ul> + +</section> + + <section class="section"> +<header><h1 id="h_4" class="toc">Part III: Distributed Message Queues</h1></header> +<p>In this part, the author introduces more in detail the concept of distribute message queues, and also the technologies and protocols available not only in the Ruby world but elsewhere. It focuses on two libraries:</p> +<ul> + <li><a href="http://rubyforge.org/projects/starling/">Starling</a>, originally used by Twitter.</li> + <li><a href="http://github.com/tmm1/amqp"><span class="caps">AMQP</span></a>, an implementation of the <a href="http://www.amqp.org/"><span class="caps">AMQP</span></a> protocol in Ruby, that can be used in conjunction with <a href="http://www.rabbitmq.com/">RabbitMQ</a>, an Erlang-based messaging system.</li> +</ul> + +</section> + + <section class="section"> +<header><h1 id="h_5" class="toc">Part IV: Distributed Programming with Ruby on Rails</h1></header> +<p>The book ends somewhat abruptly with this last part that deals with distributed programming in the Rails world. It feels a bit like a last-minute addendum that I would have left for an appendix, nevertheless it briefly introduces <a href="http://backgroundrb.rubyforge.org/">BackgrounDRb</a> and <a href="http://github.com/tobi/delayed_job">Delayed Job</a>.</p> + +</section> + +</section> + +<section class="section"> +<header><h1 id="h_6" class="toc">Technical Analysis</h1></header> +<p>Unlike other technical books, this one can (must?) be read sequentially. Generally each chapter focuses on a library, describes how to install it and use it, and highlights its pros and cons. Typically, the &#8220;cons&#8221; are solved in the following chapter by another library, and so on&#8230;</p> +<p>The book is not meant to contain a full technical reference of each library, and it&#8217;s quite short (256 pages), so you really get the most out of it if you read it all, from start to finish. I didn&#8217;t realize there were so many different libraries in this particular niche of Ruby programming, and Mark does a good job demistifying some of them.</p> +<p>One thing that really struck me out of this book is the focus on gems. We&#8217;re not talking about <em>mainstream</em> frameworks like Rails or Merb here, but rather of some rather specialized, smaller libraries that fullfill very specific tasks. Personally, I don&#8217;t remember any other Ruby book doing this in the same way, and I was quite happy about it.</p> +<p>On the other hand, gems are a double-edged sword: while some of them are really cool and well-maintained, others may disappear tomorrow with no prior notice. I was actually very surprised to see even some of the <em>quirks</em> of these gems documented in the book:</p> +<p><strong>p91</strong>: <em>&#8220;Notice that we added client { } to the bottom of the server file. The reason for this appears to be a bug or flaw in the Starfish architecture.&#8221;</em></p> +<p>Really? Hasn&#8217;t it be fixed now? Apparently not, that&#8217;s the way it works, so no, you can&#8217;t blame the author of the book for this.</p> + + <section class="section"> +<header><h1 id="h_7" class="toc">Formatting and Readability</h1></header> +<p>As I pointed out earlier, this book is somehow meant to be read sequentially, and Mark does a good job making sure you don&#8217;t get bored. Chapters and sections are quite short and there&#8217;s a good text/code ratio: the examples are short and clear, and you don&#8217;t have to try them out yourself, because most of the time the author does it for you. It&#8217;s not infrequent for the author to tell you to run &#8220;wrong&#8221; code, but that&#8217;s a great way to show you how to do the right thing right afterwards.</p> +<p>Sidebars and boxes are used properly and they do provide actual value-added content: some information on a non-Ruby technology, some tips and tricks on how to run things smoothly, etc. On the other hand, one thing I couldn&#8217;t stand were the <em>endnotes</em>. I must say I don&#8217;t like endnotes at the best of times, but when they are pointless I just can&#8217;t suffer them. Each chapter has its own fair share of endnotes, but unfortunately most of them are just URLs to Wikipedia pages or RubyForce/GitHub projects: I would have preferred the URLs inline with the rest of the text, but that&#8217;s just me.</p> + +</section> + <section class="section"> +<header><h1 id="h_8" class="toc">Style and Contents</h1></header> +<p>Mark has a nice, informal writing style. Exactly what you expect from a programming book nowadays, even if sometimes it feels a bit too informal:</p> +<p><strong>p86</strong>: <em>&#8220;I think I understand what Eric means by all that. However, that is as deep as the documentation goes on the subject. I have not been able to test what I think he means, so I won&#8217;t make any grand promises about what the library can and cannot do in regards to expiring/renewing registrations.&#8221;</em></p> +<p>Although this is not something you&#8217;d see in a professional book everyday, it definitely helps to connect with the reader: Mark is one of us after all, even if he happens to have created quite a few <a href="http://github.com/markbates">interesting projects</a>, like the Mack framework, the Distribunaut library (which is also mentioned in his book, but in a very impartial way) and Configatron. From his book you understand that he&#8217;s neither one of those rockstar developers nor one of those famous authors who just writes books for a living: he&#8217;s a competent programmer who knows quite a bit about a particular, but relevant, niche of Ruby programming.</p> + +</section> + +</section> + +<section class="section"> +<header><h1 id="h_9" class="toc">Final Thoughts</h1></header> +<p>This is one of those books I&#8217;d like to see a second edition of. Partly because there are some relatively new gems which have been left out (<a href="http://github.com/kwi/BrB">BrB</a>, for example), partly because this is a rather hot topic at the moment, and different solutions are popping out at a rather extreme rate.</p> +<p>The decision to write about mainly about gems was bold but necessary, and I&#8217;d really like to see more authors doing that, but with extra care. From reading this book, you understand that there&#8217;s no <em>silver bullet</em> when it comes to Distributed Programming, but rather different tools to do different jobs.</p> +<p>The thing I missed the most? A proper conclusion to the book. You&#8217;re left with two chapter about Rails-specific libraries which could have easily become appendixes, and nothing else. I would have liked a sort of &#8220;summing up&#8221; end chapter (re-)highlighting the pros and cons of each library and a sort of feature matrix.</p> +<p>Nevertheless, it was well worth my time and it proved to be a very good resource to get started in writing distributed Ruby programs.</p> + +</section> + +</section>
A contents/articles/efficient-ruby-code-shortcut-review.html

@@ -0,0 +1,41 @@

+----- +title: Book Review: Writing Efficient Ruby Code +content-type: article +timestamp: 1200890820 +tags: ruby|review|books +----- +<p style="float:right;"><img src="/files/efficient_ruby_shortcut.jpeg" alt="" /></p> +<p>The second shortcut from Addison-Wesley Professional series I&#8217;m going to review is called <a href="http://www.informit.com/store/product.aspx?isbn=0321540034">Writing Efficient Ruby Code</a>. A very promising title, especially considering that this book is only 50 pages long.</p> +<p>As usual, this shortcut can be intended as a sort of programmer-friendly detailed cheatsheet: like the other ones in this series it sports a monitor-friendly landscape layout and does not go to deep into the details unless strictly necessary to understand a particular concept.</p> +<h3>The Author</h3> +<p><a href="http://railsexpress.de/blog/">Dr. Stefan Kaes</a>, the author, contributed a lot to improve Ruby on Rails&#8217; performance by refactoring portions of its core and try to &#8220;get maximum speed out of performance-critical sections of code&#8221;. This short but interesting shortcut groups together a lot of performance tweaks, tips and tricks but also some &#8220;anti-patterns&#8221; Kaes was able to identify through his career as programming teacher Ruby software consultant and key Rails contributor.</p> +<h3>The Contents</h3> +<p>Like with the previously-covered <a href="/articles/mongrel-shortcut-review">Mongrel shortcut</a>, <em>Writing Efficient Ruby Code</em> always goes straight to the point when it comes to identify problems. The first one mentioned is of course that the <em>Ruby Interpreter is Slow</em>, most people are aware of that, due to their direct experience or because this argument is normally used by non-Rubyists to argue the language&#8217;s usability in commercial projects. What you may not know is why that is so, and that&#8217;s where the first part of this book comes into play.</p> +<blockquote> +<p><em>&#8220;Ruby is a highly dynamic language: Almost all language entities are first-class citizens in that they can be created, changed, and destroyed at runtime. This comprises classes, modules, methods, constants, and class and instance variables. Only local variables are second-class citizens in Ruby: Whether a name refers to a local variable is determined at parse time.</em></p> +</blockquote> +<p>This makes Ruby extremely flexible, but also more complex. Whever you use a name to refer to an object, Ruby has to search for the object it refers to, and this costs in terms of processing time.</p> +<p>As a matter of fact, one of the most recurring tips in the book to improve code performance is the following:</p> +<p style="text-align:center;"><strong>Method calls are expensive, use variables directly when possible.</strong></p> +<p>Keep this in mind: <code>self.something</code> is <em>not</em> the same as <code>@something</code>. The end result is the same, but the first way costs more in terms of performance because Ruby has to look up the method name.<br /> +Similarly, <strong>local variables <em>should</em> be introduced as a way to &#8220;cache&#8221; the result of method calls</strong>. Often you may feel &#8220;guilty&#8221; to introduce a new variable and keep calling the same method over and over: this should definitely be avoided.</p> +<p>Other useful tips include, for example:</p> +<ul> + <li>Use syntax constructs (e.g. assignments) as expressinons. Use evaluation precedences.</li> + <li>Use interpolated strings <code>"... #{string_variable}"</code> (there&#8217;s also no performance difference if constant strings are used between <code>"</code> or <code>'</code>)</li> + <li>Use operators which update the data structure without copying it (when possible). Use <code>update</code> or <code>merge</code> to update hashes.</li> + <li>Iterating using <code>for a in A</code> is slightly faster than performing the same iteration using <code>each</code>, (it is the opposite in Ruby 1.9 though)</li> + <li>do not use <code>return</code> unless you have to</li> + <li>test in order of expected case frequency</li> + <li>Use parallel assignment (<code>a, b = 5, 6</code>) where applicable</li> + <li>If a module gets included in only one other class (or module), it’s preferable to open the class instead.</li> +</ul> +<p>I deliberately chose not to elaborate any further on the tips listed above because otherwise I&#8217;ll give a big chunk of the contents of the book itself. If you know Ruby enough, you may already know why such reccommendations make sense, but if you don&#8217;t, <em>Writing Efficient Ruby Code</em> can be a short but very interesting read.</p> +<h3>The Good</h3> +<p>For each of the 30 &#8220;coding patterns&#8221; (and consequent anti-patterns) described in the book, the author does a great job explaining the reasons of doing something in a particular way, also through examples and benchmarks, where possible.</p> +<p>Furthermore, this <em>shortcut</em> can really be useful to grasp a few difference between Ruby 1.8.5, 1.8.6 and 1.9 in terms of performance: not all the patters apply to all Ruby implementations, and when that&#8217;s the case it is clearly stated.</p> +<h3>The Bad</h3> +<p>My only complaint about the book is probably the lack of details and more &#8220;specialized&#8221; patterns. Everything (except for a few Rails-specific tips) normally apply to Ruby <em>as a whole</em>, without going deeply to analyze specific libraries or third-party gems. As a result, once you get the general idea, some of the patters may seem pretty obvious or a logic consequence of others.</p> +<p>It is also true that this is meant to be a <em>shortcut</em>, not a comprehensive analysis on code optimization techniques which can be applied to specific cases: something like this would require much more than 50 pages!</p> +<h3>The Bottom Line</h3> +<p>Read it, re-read a few bits of it to make sure you grasp the most important concepts, and keep its table of contents in front of you as a reminder when refactoring your code!</p>
A contents/articles/firefox-lovers-guide-to-opera.html

@@ -0,0 +1,198 @@

+----- +title: A Firefox Lover's Guide to Opera +content-type: article +subtitle: An in-depth review of the Opera browser, with the eyes of a Firefox enthusiast +popular: true +timestamp: 1198847940 +tags: browsers|review|opera|firefox +----- +<blockquote> +<p><strong>Note:</strong> This article can be considered a sequel for <a href="http://www.h3rald.com/articles/ie-lovers-guide-to-firefox">An IE Lover&#8217;s Guide to Firefox</a>, which described Firefox through the eyes of an Internet Explorer fan. Similarly, this article describes Opera&#8217;s features from the point of view of a user &ndash; myself &ndash; who has been using Firefox for years and is now considering another browser switch.</p> +</blockquote> +<p>I am a Firefox fan. I&#8217;ve been using Firefox since it was named &#8220;Firebird&#8221; and calling it &#8220;stable&#8221; was a big overstatement. Firefox dragged me out of Internet Explorer, and that was definitely one of its biggest achievements.</p> +<p>Because I&#8217;m addicted to trying out new tools, however, I always kept testing new browsers I discovered here and there. K-Meleon, Flock, Sleipnir&#8230; When Safari came out for Windows I immediately installed it and used it for about 2 hours, only to realize that it wasn&#8217;t &ndash; and it still isn&#8217;t &ndash; usable at all, mainly due to sporadic crashes.</p> +<p style="float:right;"><img src="/files/opera/fast.jpg" alt="" /></p> +<p>Similarly, I&#8217;ve been trying out <a href="http://www.opera.com/">Opera</a> periodically, as new releases came out, but again it didn&#8217;t seem to work for me. The biggest complaint I had was its inability to render heavily-ajaxified web sites properly. However, now it seems that the Opera Development Team made a big effort to improve the browser, and I was pleased to notice that <a href="http://www.opera.com/products/desktop/next/">Opera 9.5b</a> (&#8220;Kestrel&#8221;) doesn&#8217;t seem to have this sort of problems at all.h3. Planning the Switch</p> +<p>Firefox has extensions. Plenty of them actually. Some are useful, like the newish Del.icio.us one made by Yahoo, and also crappy ones you&#8217;ll never use unless you want to have a fancy button on one of your over-cluttered toolbars which enables you to interface more easily with X or Y web services you hardly ever use.</p> +<p>By contrast, Opera never attempted to add full-blown extension support to its venerable and yet very powerful browser. Instead, they kept building more and more features right into its core, being careful not to undermine the browser&#8217;s two proverbial qualities: <em>speed</em> and <em>stability</em>. What seemed a doomed philosophy at first turned out to be a good thingin the long run. More and more people are getting more and more worried about Firefox&#8217;s memory issues and begin to <em>wander off</em> to explore new things, exactly like I did.</p> +<p>The first step to switch from Firefox to Opera is to reduce the number of Firefox extensions to the bare minimum you need:</p> +<ul> + <li>Colorzilla</li> + <li>Web Developer</li> + <li>MeasureIt</li> + <li>Search Status</li> + <li>Gmail Manager</li> + <li>Secure Login</li> + <li>Del.icio.us</li> +</ul> +How many extensions do you <em>actually</em> use? Here&#8217;s a short analysis for the ones above: +<ul> + <li>The first three are related to Web Development only, which means that I don&#8217;t need them unless I&#8217;m doing some web-development tests during which I&#8217;m always going to have more than one browser open anyway. <strong><span class="caps">UPDATE</span>:</strong> there are a few <a href="http://widgets.opera.com/search/?order=name&amp;q=ruler">Ruler</a> widget which can be used instead of MeasureIt <em>(thanks <strong>Ameer</strong>)</em>.</li> + <li>SearchStatus gives me Alexa Rank and Google Pagerank: I think I can survive without those for a while. <strong><span class="caps">UPDATE</span>:</strong> if not, there&#8217;s always <a href="http://www.puzzleclub.ru/files/seobar/">SEObar</a> <em>(thanks <strong>Ameer</strong>)</em>.</li> + <li>I use Gmail Manager because my girlfriend uses Gmail on the same computer. I&#8217;m switching to Opera and she&#8217;ll stick with Firefox, so no problem there&#8230;</li> + <li>Secure Login? It&#8217;s called <em>Wand</em> and it has been built-in into Opera for the last decade or so.</li> + <li>Del.icio.us &ndash; OK, I won&#8217;t be able to access my favorite tags as quickly, but <a href="http://erlang.no/2005/10/06/delicious-opera-buttons-2/">someone</a> already came out with a few handy buttons for a better integration with the popular social bookmarking service.</li> +</ul> +<blockquote> +<p><strong><span class="caps">UPDATE</span>:</strong> For a list of the features provided by Firefox extensions which are included in Opera, see Rijk&#8217;s <a href="http://files.myopera.com/Rijk/blog/extensions.html">Top 150 Popular Firefox Extensions and Opera</a></p> +</blockquote> +<p style="float:right;"><img src="/files/opera/opera_navigation.png" alt="" /></p> +<p>Because I&#8217;m addicted to betas, I immediately downloaded <a href="http://www.opera.com/products/desktop/next/">Opera Kestrel</a>, i.e. Opera 9.50 beta 1. I never actually liked Opera&#8217;s default theme, so I started looking around for <strong><a href="http://my.opera.com/community/customize/skins/">new skins</a></strong> (yes, eye-candy matters sometimes) and came across the Ximple series by <a href="http://my.opera.com/community/customize/skins/author/?id=serafins">serafins</a>. In particular, <a href="http://my.opera.com/community/customize/skins/info/?id=3835">2nd thought &#8211; Jimple</a> quickly became my favorite.</p> +<h3>Tabs</h3> +<p><em>&#8220;Opera is the Web pioneer that delivered tabbed browsing in 2000 [&#8230;]&#8221;</em></p> +<p>Opera tabs <em>feel</em> stable and mature. Why? Probably because tabs are used more consistently to open not only web pages but also:</p> +<ul> + <li>Downloads (&#8220;Transfers&#8221;)</li> + <li><span class="caps">RSS</span> feeds</li> + <li>Notes</li> + <li>Emails</li> + <li>Bookmarks</li> + <li>Widget Management</li> + <li>Contacts</li> + <li>History</li> + <li>Page Links</li> +</ul> +<p>I think this is a great feature and Firefox should definitely consider it: v3.0 comes with new download and bookmark managers, but they&#8217;re still dialogs. Yes, I know, there&#8217;s probably some extension which allows you to display them in the sidebar, but that&#8217;s not the point: Opera brings more consistency to the overall browsing experience by using tabs wherever they should be used.</p> +<p>Additionally, Opera tabs&#8230;</p> +<ul> + <li>Can be rearranged, exactly like Firefox tabs</li> + <li>Can be restored, if closed accidently, by re-opening them from the Trash can</li> + <li>Can be locked, meaning that they can&#8217;t be closed accidently</li> + <li>Can be duplicated</li> + <li>Can be saved in groups (sessions) and re-opened later on</li> + <li>Can be restored if Opera crashes</li> +</ul> +<h3>Speed Dial</h3> +<p>When you open Opera for the first time, and <em>whenever you open a new empty tab</em> the Speed Dial is displayed. What I originally thought it was one of the most annoying things introduced by Opera 9 turned out to be actually useful and very addictive.</p> +<p>The idea behind it is simple:</p> +<ul> + <li>Show a default page with 9 slots</li> + <li>Allow users to drag links to those slots</li> + <li>Display preview of each slot (which is cached and can be updated by refreshing the page)</li> + <li>Allow users to quickly access pages saved in the Speed Dial via CTRL+1 .. CTRL+9 or simply by clicking them.</li> +</ul> +<p>Simple and effective. Once you get going with it, you&#8217;ll overcome the initial feeling of imposition and you&#8217;ll use it more and more: I literally can&#8217;t live without it now!</p> +<h3>Right-click goodies</h3> +<p>While I was testing Opera, my girlfriend came along and asked me to look something up on <a href="http://www.imdb.com/"><span class="caps">IMDB</span></a>. I normally had <span class="caps">IMDB</span> as custom search engine in Firefox, but unfortunately Opera didn&#8217;t seem to allow users to customize their search engines&#8230;</p> +<p>Totally wrong. Not only Opera lets you add any search engine to the search bar, it also does it with style and in the easiest way possible:</p> +<p style="float:right;"><img src="/files/opera/search_engines.png" alt="" /></p> +<ol> + <li>Go to your search engine or any website with a search form</li> + <li>Right click the search field</li> + <li>Click <strong>Create Search&#8230;</strong></li> + <li>Specify a name and a keyword for your search engine</li> +</ol> +<p>Done. You&#8217;ll now be able to search that particular site directly from the search bar. As you can see, I added Wikipedia, <span class="caps">IMDB</span> and even the <a href="http://www.uesp.net/wiki/Main_Page">Unofficial Elder Scrolls Pages</a> in this way.</p> +<p>Besides creating searches, Opera lets you do a lot by right-clicking anywhere on a page:</p> +<ul> + <li><strong>Block Content</strong>: Right-click an empty area of any webpage and select <strong>Block Content</strong> to select which ads, scripts and images will be blocked from now on.</li> + <li><strong>Validate</strong>: Validate the <span class="caps">HTML</span> source code of the current page.</li> + <li><strong>Translate</strong>: Translate the current page into a foreign language with just two clicks.</li> + <li><strong>Open With</strong>: Open the current page in another browser installed on your system.</li> + <li><strong>Edit Site Preferences&#8230;</strong>: Choose to block/allow cookies and popups, identify Opera as another browser, set a different encoding, enable/disable scripts, images, flash, etc. These setting apply to the <em>current web site only</em>.</li> + <li>View source, reload page every X seconds/minutes, send by email, etc.</li> +</ul> +<h3>Widgets</h3> +<p><a href="http://widgets.opera.com/">Opera Widgets</a> must not be considered as Opera&#8217;s counterpart to Firefox extensions. Instead, Opera Widgets can be used as <em>poor man&#8217;s Vista Gadgets</em> on Windows XP, and they do their job most remarkably.</p> +<p>I&#8217;m personally very fond of these ones:</p> +<ul> + <li><a href="http://widgets.opera.com/widget/3683/">The Free Dictionary</a></li> + <li><a href="http://widgets.opera.com/widget/8461/">Wikipedia</a></li> + <li><a href="http://widgets.opera.com/widget/3687/">Calendar</a></li> + <li><a href="http://widgets.opera.com/widget/4513/">Whois Widget</a></li> + <li><a href="http://widgets.opera.com/widget/3689/">Currency Converter</a></li> + <li><a href="http://widgets.opera.com/widget/5118/"><span class="caps">HTML</span> Entities</a></li> + <li><a href="http://widgets.opera.com/widget/7206/">Twitter</a></li> +</ul> +<p>They all have a common trait: they all behave as standalone programs, as they should be. The Wikipedia one, for example, can display Wikipedia entries directly inside the widget, unlike some others which just take you to Wikipedia, which is rather pointless.</p> +<p>Although widgets live within Opera, they can be displayed &#8220;always behind&#8221;, which means they&#8217;ll be glued to your desktop and therefore will be visible whenever Opera and other applications are minimized.</p> +<p>Needless to say that anyone brave enough can make widgets for Opera by following a simple <a href="http://dev.opera.com/articles/view/opera-widgets-specification-1-0/">Widget Specification</a>.</p> +<h3>Everything you can do on the Internet</h3> +<p>The term <em>browser</em> applied to Opera is somehow misleading. Personally I would have called it something like &#8220;Internet Suite&#8221;, because that would be a better choice due to the features it offers and the things it can do.</p> +<p>Traditionally speaking, a web browser can be used to browse web pages, read feeds (sometimes) and navigate through <span class="caps">FTP</span> directories. Here&#8217;s what Opera can handle:</p> +<p style="float:right;"><img src="/files/opera/files.png" alt="" /></p> +<ul> + <li>Web Pages &ndash; No need of explanations here.</li> + <li><span class="caps">FTP</span> &ndash; <span class="caps">FTP</span> directories are listed very clearly, overriding server&#8217;s settings with a more user-friendly layout.</li> + <li>Local Files &ndash; This was a surprise for me. Typing <code>file://</code> will automatically load a list of the drives currently available on your machine. Similarly, auto-completion for directory and file names is supported! I almost started using Opera as my everyday&#8217;s file manager (almost).</li> + <li>Feeds &ndash; An embedded feed reader can be used to subscribe to <span class="caps">RSS</span>/Atom feeds and view them&#8230; in a tab, of course.</li> + <li>E-mails &ndash; Opera <em>is</em> also a pretty decent email client. As of version 9.5 full <span class="caps">IMAP</span> support has been added, which definitely makes the difference.</li> + <li><span class="caps">IRC</span> &ndash; Opera can be used as an client, which works pretty well. Who needs ChatZilla anymore?</li> + <li>News &ndash; Opera can be used to signup and retrieve news from newsgroups.</li> + <li>Gopher/<span class="caps">WAIS</span> &ndash; Although not used everyday, Opera can handle these old protocols as well.</li> + <li>BitTorrent Files &ndash; By default, Opera can act as a BitTorrent client as well, so you can just open .torrent files through the program and then monitor the download progress in the Transfers window, like with any other normal download. While this feature is indeed useful, it is also possible to <a href="http://www.opera.com/support/search/view/840/">disable it</a> and still use your favorite BitTorrent client.</li> +</ul> +<h3>Portability and Synchronization</h3> +<p>Let&#8217;s spend some words about <em>portability</em>. Sure, there are two &#8220;Portable Opera&#8221; apps out there, and they work well enough, but one thing I&#8217;d like about a web browser is the ability to synchronize my preferences, customizations, themes, passwords etc. etc. across multiple computers. <br /> +Firefox is <a href="http://labs.mozilla.com/2007/12/introducing-weave/">getting there</a>, although the technology is still at a very early stage.<br /> +Opera is doing something similar through <a href="http://link.opera.com/">Opera Link</a>, which allows you to synchronize automatically your Bookmarks, your Personal Bar and your Speed Dial. All you need is to get a (free) Opera account, login to Opera Link and enable the synchronization feature from the <em>File</em> menu. From now on every time you&#8217;ll modify your Speed Dial or Bookmarks, the changes will be sent to your Opera Link page. Similarly, whenever you start using opera somewhere else, if you login to your Opera Account you should be able to synchronize your Bookmarks and Speed Dial.</p> +<p>Here are some thoughts on this type of technology:</p> +<ul> + <li>It&#8217;s not totally private yet. While it&#8217;s great to be able to sync bookmarks and speed dial, the problems arise when you finish using your friend&#8217;s computer for example&#8230; what happens to the bookmarks you just sync&#8217;ed? The only way to delete them would be to have your friend to log in to his Opera account and re-sync them. Not enough privacy for my liking.</li> + <li>Your passwords, notes, widgets, etc. etc. cannot be synchronized yet, but that will hopefully be possible in near future.</li> + <li>Sync&#8217;ing bookmarks is pointless for me. Although Opera still hopes to compete with Del.icio.us &amp; Co., that will be very hard to achieve. I stopped using in-browser bookmarks long ago.</li> + <li>Link seems and interesting feature considering that Opera is available on virtually <em>any operating system</em> and a lot of different devices (mobile phones, Nintendo DS &amp; Wii, &#8230;).</li> +</ul> +<p>At any rate, it is still possible to &#8220;carry around&#8221; your personal opera settings by following the instructions provided on <a href="http://help.opera.com/Windows/9.50/en/backup.html">this page</a> which explains pretty much everything you need to know aboud Opera files and local storage.</p> +<h3>Advanced Features</h3> +<p>Opera looks more &#8220;polished up&#8221; than Firefox in most cases. The superb usage of tabs for nearly everything is one example, and another one is the possibility to apply skins (themes) on-the-fly, without having to restart the browser. <br /> +Firefox <em>can</em> do this via the <a href="http://labs.mozilla.com/2007/12/personas-for-firefox/">Personas</a> extension, but Opera had this built-in for a long time.</p> +<p>To apply a new skin:</p> +<ol> + <li>Go to the <a href="http://my.opera.com/community/customize/skins/">Skins Directory</a></li> + <li>Download a skin you like</li> + <li>Opera will download and apply the skin immediately, <strong>and it will ask you whether you want to keep it or not</strong>. If you choose not to, it won&#8217;t save it in your profile (very useful for quick previews). Neat.</li> +</ol> +<p>Another quality opera always excelled to is accessibility. Besides using the interface in the traditional way, it is also possible to:</p> +<ul> + <li><strong>Use <a href="http://www.opera.com/products/desktop/mouse">mouse gestures</a></strong> &ndash; I wasn&#8217;t a big fan of this until I bothered reading the excellent documentation Opera provided for them (which is significantly better than <a href="http://www.mousegestures.org/">the Firefox&#8217;s equivalent</a>). It can be quite useful at times.</li> + <li><strong>Use <a href="http://www.opera.com/products/desktop/keyboard/">keyboard shortcuts</a></strong> &ndash; Believe it or not, you can literally <a href="http://www.opera.com/support/tutorials/nomouse/">use Opera without a mouse</a>.</li> + <li><strong><a href="http://www.opera.com/products/desktop/voice/">Speak</a> to it</strong> &ndash; Opera&#8217;s voice integration is getting better and better. Not only you can effectively <a href="http://www.opera.com/support/tutorials/voice/">tell your browser what to do</a>, you can also use the built-in text-to-speech function (Windows only) to have it read entire pages for you. It actually works quite well and it can parse punctuation well enough to apply the right intonation. Just for fun, I had it read it an Italian page&#8230; and it actually worked as expected: it was like listening to an American reading an Italian text using US pronuntiation!</li> +</ul> +<p>Finally, power users will be delighted of the way opera lets you hack the program settings, as you can:</p> +<ul> + <li>Use <strong>Tools &gt; Quick Preferences</strong> to block/unblock popups, cookies, Java applets, images, etc.</li> + <li>Use <strong>Tools &gt; Advanced</strong> to access detailed information concerning cookies, cache (it lists every image/object cached!), plug-ins, Wand passwords, etc.</li> + <li>Use <strong>Tools &gt; Appearence&#8230;</strong> to access and manage appearance-related settings, like skins, toolbars, buttons and panels</li> + <li>Use <strong>Tools &gt; Preferences&#8230;</strong> to access general preferences (all the rest)</li> + <li>Type in <strong>opera:config</strong> to view and tweak Opera&#8217;s internal settings, somehow like Firefox&#8217;s about:config, but much cleaner and easier to use.</li> + <li>Download the <strong><a href="http://dev.opera.com/tools/">Developer Console</a></strong> to have a simpler alternative to Firefox&#8217;s Web Developer Toolbar extension, to view <span class="caps">DOM</span> elements, <span class="caps">CSS</span> and Javascript information.</li> +</ul> +<h3>Annoyances</h3> +<p>After using as main browser for a few weeks now, I can say that it&#8217;s great but not perfect yet. It&#8217;s very advanced, faster and more mature than any other browser, of course,but there are a few things which should be fixed or improved.</p> +<p>In particular:</p> +<ul> + <li><strong>It&#8217;s not open source</strong> &ndash; This may not matter to someone, but some people consider this an essential requirement for their browser, and that&#8217;s why Firefox is their most obvious choice. Although Opera is free, it is proprietary software after all, which means is definitely not as open as you may want it to be. Personally I&#8217;m not too bothered, as I&#8217;m starting to think that too much openness may lead to too many unuseful and bloated extensions and make the program somehow &#8220;unpredictable&#8221; and heavy.</li> + <li><del><strong>No address bar search</strong> &ndash; Amazingly, only Firefox seems to have this feature built-in. I&#8217;m referring to the ability to type whatever in the address bar to be redirected to the site returned by a Google&#8217;s <em>I&#8217;m feeling lucky</em> search. It is possible to emulate this feature in Opera by creating a custom search for <em>I&#8217;m Feeling Lucky</em> and assign it a short keyword like &#8220;l&#8221;. In this way, for example, typing in <code>l h3rald</code> should lead you to this website. Not quite as immediate as in Firefox though.</del></li> + <li><del><strong>No find as you type</strong> &ndash; Another big disappointment for who comes from Firefox or Safari: Opera still uses a dialog box to perform page searches.</del></li> + <li><del><strong>No spell clecking</strong> &ndash; Again, both Firefox and Safari now offer text fields spell checking. Opera doesn&#8217;t yet.</del></li> + <li><del><strong>No <span class="caps">HTML</span> mail composer</strong> &ndash; Opera&#8217;s built-in mail client can display <span class="caps">HTML</span> emails but doesn&#8217;t yet allow users to create them.</del></li> + <li><del><strong>Auto-start widgets?</strong> &ndash; This is a feature enhancement Opera Dev Team should consider: allow users to configure certain widgets to start automatically when Opera starts.</del></li> + <li><del><strong>Google Reader + Flash problems</strong> &ndash; Sometimes I experiences some scrolling problems when reading news which contain embedded flash movies on Google Reader.</del></li> + <li><strong>Corporate Sites</strong> &ndash; Unfortunately some corporate web site do not support Opera or are not displayed correctly in Opera. Unfortunately there&#8217;s nothing much we can do about it but trying to &#8220;mask&#8221; Opera as another browser (via <strong>right-click &gt; Edit Site Preferences&#8230;</strong>)</li> + <li><del><strong>Default Browser Problems</strong> &ndash; Setting Opera as default browser on Windows doesn&#8217;t seem to set the file icons accordingly (or worse, it resets them to the default file icon).</del></li> +</ul> +<p><strong><span class="caps">ERRATA</span>:</strong></p> +<ul> + <li>It is possible to have Opera to redirect you to the right after typing a few words in thr address bar by setting Google&#8217;s &#8220;I&#8217;m feeling lucky&#8221; as default search engine <em>(thanks <strong>EJ902</strong>)</em>.</li> + <li>Spell Checking is <a href="http://www.opera.com/support/tutorials/opera/spellcheck/">supported</a> via <span class="caps">GNU</span> Aspell <em>(thanks <strong>cvm</strong>)</em> or by using <a href="http://opera.gt500.org/ospell/">Ospell</a> for inline spell checking <em>(thanks <strong>Dava</strong>)</em>.</li> + <li>Find as you type can be triggered by pressing <code>.</code> and typing <em>(thanks <strong>cvm</strong>)</em>.</li> + <li>It is possible to auto-start widgets by saving a session with all your widget open and reloading it at every startup [CTRL+F12 &gt; General &gt; Startup &gt; Continue saved sessions] <em>(thanks <strong>Tamil</strong> &amp; <strong>Ameer</strong>)</em>.</li> + <li>As of the <a href="http://my.opera.com/desktopteam/blog/">latest snapshot</a>, setting Opera as default browser and handler for <span class="caps">HTML</span> files doesn&#8217;t cause any problems <em>thanks <strong>Ayush</strong>)</em>.</li> +</ul> +<h3>Conclusion</h3> +<p>Despite the few annoyances listed in the previous section, Opera 9.5 beta 1 truly impressed me. I was waiting for Opera to get better before switching and now I&#8217;ve not been using Firefox for a few weeks.<br /> +Although Opera offers a lot of features, there&#8217;s still room for improvements, especially for what concerns integration with third party services: I would really like to see some sort of integration with del.icio.us, and that could be possible via widgets at least. <br /> +Regarding the new Opera Link feature, it looks very promising and a potential competitor for Mozilla Weave even though it will be used mainly to get more and more users to register to the Opera community (I did, at least), which is indeed very active any way.</p> +<p>To conclude this article, which still barely scratches the surface of this very powerful application, I&#8217;d like to praise two more things about Opera:</p> +<p><span style="float:right; margin:3px;"><br /> +<script type="text/javascript"> +digg_url = 'http://digg.com/software/A_Firefox_Lover_s_Guide_to_Opera'; +</script> +<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script><br /> +</span></p> +<ul> + <li>Their website network, and in particular their truly excellent documentation knowledge base, which is very comprehensive of references, tutorials and interesting articles. I am a full time technical writer myself, and I&#8217;ve hardly ever come across better documentation.</li> + <li>Their extensive <a href="http://www.opera.com/docs/specs/">support and compliance to web standards</a>, which makes Opera the most advanced browser ever made.</li> +</ul> +<p>If you&#8217;ve not tried Opera before, or if you&#8217;ve always dismissed it because &#8220;X browser is better&#8221;, you may want to <a href="http://www.opera.com/products/desktop/">give it another shot</a>: for me it was definitely worthwhile!</p>
A contents/articles/firefox3-revealed.html

@@ -0,0 +1,20 @@

+----- +title: Firefox 3 Revealed +content-type: article +timestamp: 1213670760 +tags: firefox|browsers|writing|review|books +----- +<p>When the SitePoint staff asked me to write an article summing up all the new features of Firefox 3, I gladly accepted: I wrote about Firefox before, and I thought it was just going to be a 2-3 hours job maximum. <br /> +After diving deeper into Firefox 3 development, reading dozens of different blogs and scouting Mozilla&#8217;s web sites, I realized I was wrong: Firefox 3 introduced <em>a lot</em> of new things, and keeping track of all of them, I admit, was quite a hard task.</p> +<p>Nevertheless, I wrote the article and delivered it to SitePoint in time fore the release, but my editor &#8220;complained&#8221; that 8,300+ words was about 3 times over the minimum requirements for a feature article! <br /> +<em>&#8220;I don&#8217;t really think that people can read the whole thing online&#8221;</em> &mdash;, he said, and I somehow agreed.</p> +<p>In the end, they decided to pack my &#8220;article&#8221; into a 30-pages <span class="caps">PDF</span> eBook which can be downloaded <em>absolutely free of charge</em> from SitePoint web site as well, so here it is:</p> +<p style="float:left;"><img src="/files/ff3-revealed.png" alt="" /></p> +<p><br /><br /> +<span style="font-size: 1.5em;"> <strong><a href="http://firefox.s3.sitepoint.com/ff3-revealed.zip">Firefox 3 Revealed</a></strong> </span></p> +<p>If you prefer though, you can still read the article directly on SitePoint, <a href="http://www.sitepoint.com/article/firefox-3-whats-new-whats-hot">here</a>.</p> +<p>This guide aims to give you a comprehensive overview of virtually <em>all</em> the new features and improvements introduced by Firefox 3.</p> +<p><br /><br /></p> +<p>I would like to thank the whole SitePoint staff for giving me the opportunity to write this eBook, and in particular <strong><a href="http://magain.com/blog/">Matthew Magain</a></strong> for his help and support (and for creating the <span class="caps">PDF</span> on a Sunday evening!).<br /> +Additionally, I would also like to thank the Mozilla Development Team for their awesome job with Firefox 3 and everyone else who made this eBook possible.</p> +<p><strong>Update:</strong> Feel free to <strong><a href="http://digg.com/software/FireFox_3_Revealed_Free_ebook_from_SitePoint">digg</a></strong> this eBook!</p>
A contents/articles/from-firefox-to-deer-park.html

@@ -0,0 +1,7 @@

+----- +title: From Firefox to... Deer Park? +content-type: article +timestamp: 1132509930 +tags: firefox|browsers|review +----- +On May 31st 2005 the Mozilla Foundation silently released the Deer Park browser... no, it's not another name change for Firefox, but the codename they gave to the long-awaited 1.1 release of the free, famous, award-winning browser. Actually what we have for now is just a non-feature complete developer preview release of the new milestone, the first alpha release, in other words. The alpha release nevertheless seems to be fully functional and already useable.ETAs for the actual stable version are not given as usual, but we should expect another alpha candidate soon hopefully (They wrote "June" on the <a href="http://www.mozilla.org/projects/firefox/">roadmap</a>, and we're already in July). Anyhow, this developer-oriented preview release can be <a href="http://www.mozilla.org/projects/firefox/">downloaded</a> and installed on Windows, Linux, and Mac OS X systems plus eventually, <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/deerpark/alpha1/contrib/">Solaris and others</a>. The decision of using the codename Deer Park instead of naming the release Firefox 1.1 alpha 1 or something of the like was made to avoid the havoc which occurred before the official release of Firefox 1.0 (which was codenamed "Phoenix" by the way,) when some websites offered a late preview release as the actual new version to download.<br />This time when you install and run the program the Firefox name has been substituted with Deer Park Alpha 1, so for example Deer Park is used in the browser's title bar and in the "About Deer Park Alpha 1" menu under "Help". The icon they used for this testing release is not even the usual firefox icon - it represents a plain blueish globe with no fox whatsoever. They have definitely put in effort this time to avoid confusion.<br /><br />Furthermore, when the browser is installed it does not overwrite your existing firefox installation, simply because (on windows) it's installed under a directory named "Deer Park Alpha 1". As a side note, the process is "firefox.exe", so you cannot run Firefox and Deer Park at the same time: you'll just open another window of the browser which is already running. Having said this, let us now examine what is new in this developer's release.<br /><br /><strong>Fixed bugs</strong><br />Like any other Firefox Release, Deer Park comes with several <a href="http://www.squarefree.com/burningedge/releases/1.1a1.html">Bug Fixes</a>. On the official changelog there are many bugs reported to be fixed, sometimes they are hardly noticeable but I experienced some of them when browsing some websites and also when creating applications myself:<br /><br />- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=103638">103638</a> - Targets with same name in different windows open in wrong window with javascript.<br />- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=97283">97283</a> - Mouse wheel scrolling does not work for elements such as div using overflow - auto or scroll.<br />- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=251986">251986</a> - Keyboard scrolling does not work for elements such as div using overflow - auto or scroll.<br />- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=245829">245829</a> - Download manager progress and title do not update correctly, wrong number of files and percentage after finishing or cancelling a download.<br /><br />These are in my opinion the most notable of the notable bugs which have been fixed in this release. I was particularly relieved when I noticed that all the issues regarding scrolling divs or similar elements had been resolved. Also, it must be noted that Deer Park seems overall slightly faster than Firefox 1.0.4 (Note: I also have a Pentium II, that is why I could notice that probably). The speed increase is most probably caused by the base for Deer Park being the Mozilla 1.8 Beta 2 code, which is almost 1 year newer than what used for Firefox 1.0.<br /><br /><br /><strong>New Features</strong><br />Although announced as a non-feature complete release, it comes with some new and useful features. The new feature list includes nothing too extraordinary for now and they are all somehow minor changes but they really do represent some improvements. Perhaps the two most obvious features introduced with this release are the <em><strong>Sanitize Deer Park</strong></em> and the <em><strong>Report Broken Sites</strong></em> functions. The first one is accessible through the Tools menu and basically allows you to delete the Browsing History, Saved Form Information, Saved Passwords, Download History, Cookies and Cache. Actually you can accomplish the same feat via Options->privacy, but with Sanitize you need just one click. Convenience I suppose?<br /><br />The Report Broken Sites feature is reachable via the Help menu and basically starts a short wizard that you can use when you notice something wrong with a website. You just have to provide the url of the website, the problem you experienced (Browser not supported, cannot login, plugin not installed, other content missing, odd behaviou, odd appearence, etc.) and an optional description and email and then the report will be submitted to the Mozilla Deleopers.<br /><br />Additional features included are also <em>Image thumbnails as Tab icons</em>, used when viewing a single image with firefox, not a shocking feature really but it's just a little (tiny) bit of eyecandy I guess. Furthermore, when you try accessing an FTP server anonymously and that server doesn't allow anonymous access, you are prompted to provide appropriate credentials (before it just didn't let you in)... another little improvement, which probably will not change your life, but it's nice to know that it's there.<br /><br />Another more notable feature only for linux and mac users though allows changes made in the Preferences menu to be applied immediately without restarting your system. Using Windows on the other hand, they improved the option interface with a more extensive use of tabbed interfaces, and also additional options concerning tabbed browsing (BUT in my opinion the <a href="https://addons.mozilla.org/extensions/moreinfo.php?id=158&application=firefox">tabbrowser preferences</a> extension is still necessary to achieve certain behaviours).<br /><br />Regarding something more technical, among the so-called developers features there are various improvements regarding CSS support, in particular CSS2's <a href="http://www.w3.org/TR/CSS21/generate.html#quotes-specify">quotes nesting</a> and even some new CSS3 (!) features, like <a href="http://www.w3.org/TR/css3-multicol/">Multi-column layouts</a> the :only-child selector, overflow-x and overflow-y properties and even various new <a href="http://www.w3.org/TR/css3-ui/#cursor">cursors names</a>.<br />Even more news from Mozilla suggests that Deer Park already supports some functions for resolution-independent scalable vector graphics (SVG 1.1), but it's obviously just experimental, and even scriptable bitmap drawing surface (<a href="http://developer-test.mozilla.org/docs/Drawing_Graphics_with_Canvas">Canvas</a>). Last but not least, even support for <a href="http://www.w3.org/MarkUp/Forms/">Xforms</a> is already possible in Deer Park through a <a href="http://www.mozilla.org/projects/xforms/">related project/extension</a>. <br /><br /><br /><strong>Final Thoughs</strong><br />Again the Mozilla Foundation - with this fully functional but yet incomplete preview release,- seem to be always improving their foundations, and always offering support for new technologies and features before others. This release has certainly seen some great improvements, on the other hand hardly anything changes for website developers with this release. It is without a doube that websites are viewed better with Deer Park than with Firefox 1.0.4 or IE or any other browser for that matter. But it is impossible to even start planning at this stage for the development of a publicly accessible site using for example SVG graphics and Xforms, as visitors using other browsers will not be able to see any "magic" in them, or perhaps even view them at all.<br /><br />It's always the same paradox of web-development: where on one side of the coin there are new and better products are available, a website/online application should be accessible by at least 90-95% of visitors. Unfortunately, for now though 90-95% of all internet users seem to use <em>some other product</em> instead of Firefox or Deer Park... But that's another story!<br />
A contents/articles/getting-started-with-lithium.html

@@ -0,0 +1,88 @@

+----- +title: Getting Started with Lithium +content-type: article +timestamp: 1256654880 +tags: li3|php|tutorial +----- +<p>So <a href="http://li3.rad-dev.org/">Lithium</a> is now officially out, and its 0.1 release can be freely <a href="http://rad-dev.org/lithium/versions">downloaded</a> from the official web site or by cloning the Lithium git repository. The good news is that although not many web hosts offer <span class="caps">PHP</span> 5.3, you can try it out youself, locally and with minimum effort.</p> +<h3>Requirements</h3> +<p>According to the <a href="http://rad-dev.org/wiki/guides/setup">Lithium Wiki</a>, to develop applications with Lithium you need:</p> +<ul> + <li>A web server, like Apache or <span class="caps">IIS</span></li> + <li><span class="caps">PHP</span> 5.3.0 or higher</li> + <li>Git (not required, but all example projects are on git repos, so you may as well have it)</li> +</ul> +<p>For this tutorial, more specifically, you need to download (just download, don&#8217;t install anything!):</p> +<ul> + <li><a href="http://code.google.com/p/mongoose/">mongoose</a>, a tiny, standalone (as <em>in one single file</em>), cross-platform web server.</li> + <li><a href="http://www.php.net/downloads.php#v5"><span class="caps">PHP</span> 5.3.0</a>, not the installer, the zip package.</li> + <li><a href="http://rad-dev.org/lithium/versions">Lithium</a> (version 0.1, at the time of writing)</li> + <li>The <a href="http://rad-dev.org/li3_docs">li3_docs plugin</a>.</li> +</ul> +<p>To get the li3_docs plugin you need to <a href="http://rad-dev.org/users/add">register</a> on rad-dev.org, and clone the li3_docs git repository. If you don&#8217;t have git installed or you don&#8217;t want to read <a href="http://spheredev.org/wiki/Git_for_the_lazy">another awesome tutorial</a> to install it and learn how to use it, I&#8217;ll save you the hassle and let you download the plugin from <a href="/files/li3_docs.zip">here</a>, for this time ony.</p> +<p><b>Note:</b> This tutorial assumes that you are on Windows. If you are not, some things may be a bit different depending on your platform.</p> +<h3>Setting up the environment</h3> +<p>Choose a directory on your sistem (let&#8217;s call it <b>D:\lithium_test</b> from now on). We&#8217;ll do everything in here, and you can move it anywhere you like afterwards, even on a <span class="caps">USB</span> stick, without breaking anything.</p> +<ol> + <li>Unzip Lithium in <b>D:\lithium_test</b>, so that it contains the following files and directories: + <ul> + <li>app/</li> + <li>libraries/</li> + <li>.htaccess (it won&#8217;t actually be used in this tutorial)</li> + </ul></li> + <li>Unzip <span class="caps">PHP</span> 5.3.0 somewhere and copy the following files to the <b>D:\lithium_test</b> folder: + <ul> + <li>php5.dll</li> + <li>php-cgi.exe</li> + <li>php.ini (just get php.ini-development from the <span class="caps">PHP</span> package and rename it)</li> + </ul></li> + <li>Copy the mongoose-2.8.exe executable in <b>D:\lithium_test</b> and rename it to <b>mongoose.exe</b> for convenience.</li> + <li>Create a <b>mongoose.conf</b> file containing the following lines:</li> +</ol> +<div class='text'><pre><code>cgi_interp php-cgi.exe +cgi_ext php</code></pre></div><p>If you did everything correctly, your <b>D:\lithium_test</b> directory should contain the following:</p> +<ul> + <li>app\</li> + <li>libraries\</li> + <li>.htaccess</li> + <li>mongoose.exe</li> + <li>mongoose.conf</li> + <li>php-cgi.exe</li> + <li>php.ini</li> + <li>php5.dll</li> +</ul> +<h3>Running Lithium</h3> +<p>Double click <b>mongoose.exe</b> and point your browser of choice to <a href="http://localhost:8080/app/webroot/index.php">http://localhost:8080/app/webroot/index.php</a>. You should see the Lithium temporary homepage (yes, I expected something fancier too):</p> +<p><img src="/img/pictures/lithium/temp_homepage.png" alt="" /></p> +<p>Now, let&#8217;s see if we can get the li3_docs plugin running as well:</p> +<ol> + <li>Unzip <b>li3_docs.zip</b> and copy the <b>li3_docs</b> folder in <b>D:\lithium_test\app\libraries\plugins</b>.</li> + <li>Open <b>D:\lithium_test\app\config\bootstrap.php</b> and add the line: <code>Libraries::add('plugin', 'li3_docs');</code> at the end. I actually found this commented out already (line 80).</li> +</ol> +<p>Go to <a href="http://localhost:8080/app/webroot/index.php?url=docs">http://localhost:8080/app/webroot/index.php?url=docs</a>, you should see something like this:</p> +<p><img src="/img/pictures/lithium/li3_docs.png" alt="" /></p> +<p>Congratulation, you&#8217;re now running your first Lithium application!</p> +<h3>Fixing URLs</h3> +<p>Once the initial excitement wears off you&#8217;ll notice that none of the links on the docs page works.</p> +<p>That&#8217;s because the mongoose web server does not support <span class="caps">URL</span> rewriting (and Lithium needs it badly right now), so we have to change the way URLs are created. <a href="http://twitter.com/nateabele">@nateabele</a> gave me <a href="http://pastium.org/view/3a966c1446fcbd1d4f5a94d882256987">some tips</a> on how to do this; it&#8217;s very simple:</p> +<ol> + <li>Create a directory called <b>action</b> in <b>D:\lithium_test\app\extensions</b>.</li> + <li>Create a file called <b>Request.php</b>, containing the following:</li> +</ol> +<div class='php'><pre><code>&lt;?php +namespace app\extensions\action; + +class Request extends \lithium\action\Request { + + protected function _base() { + return '?url='; + } +} +?&gt;</code></pre></div><p>We&#8217;re basically extending the <code>\lithium\action\Request</code> with a custom class, telling Lithium how to create the base <span class="caps">URL</span>.</p> +<p>After doing so, open <b>D:\lithium_test\app\webroot\index.php</b> and change:</p> +<p><code>echo lithium\action\Dispatcher::run();</code></p> +<p>into:</p> +<code>echo lithium\action\Dispatcher::run(new app\extensions\action\Request());</code> +<p>In this case, we&#8217;re instructing the dispatcher to use our custom Request class instead of the default one.</p> +<p>Now everything should work as expected. Reload the docs page (<a href="http://localhost:8080/app/webroot/index.php?url=docs">http://localhost:8080/app/webroot/index.php?url=docs</a>) and verify that the links work by navigating to <code>Lithium</code>, then <code>action</code> and finally <code>Controller</code>.</p> +<p>Now you can use Lithium to display its own <span class="caps">API</span> locally (if things didn&#8217;t work out, there&#8217;s always <a href="http://li3.rad-dev.org/docs">http://li3.rad-dev.org/docs</a>).</p>
A contents/articles/git-for-the-locals.html

@@ -0,0 +1,51 @@

+----- +title: Git for the Locals +content-type: article +timestamp: 1216095480 +tags: programming +----- +<p><em>&#8220;This is a <strong>local</strong> shop for <strong>local</strong> people, we want no trouble here!&#8221;</em></p> +<p>&mdash; Edward, <a href="http://en.wikipedia.org/wiki/League_of_gentlemen">The League of Gentlemen</a></p> +<p>I&#8217;m normally quite cautious when it comes to IT novelties like new frameworks, new methodologies and similar, especially when it feels like they&#8217;re over-hyped. Especially nowadays, it is sometimes very hard to tell whether something new is over-hyped or really a Good Thing&#8482; without spending some time looking into it. And especially nowadays, finding the time to look into something new can be a real challange.</p> +<p>I deliberately didn&#8217;t look into Git properly since it went &#8220;mainstream&#8221; (maybe I shouldn&#8217;t use this word), but when <a href="http://www.spheredev.org/wiki/Git_for_the_lazy">this tutorial</a> came out I couldn&#8217;t resist. Sure, I knew Git was an amazingly fast distributed version control system, that <a href="http://github.com/">GitHub</a> offered free accounts, that all the cool guys were slowly starting to use it in place of Subversion, etc. etc.</p> +<p>What I didn&#8217;t realize though, that the most obvious advantage of this <span class="caps">DVCS</span> was the fact that it was <strong>distributed</strong>, i.e., it <em>didn&#8217;t need</em> a centralized server.</p> +<p>Let me repeat this: <strong>Git <em>doesn&#8217;t need</em> a centralized server.</strong></p> +<p>Really.h3. &#8230;But it&#8217;s not user-friendly!</p> +<p>If you&#8217;re a Windows user and you used Subversion before, chances are that you got accustomed to <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, too. TortoiseSVN is &mdash; in a way &mdash; a nice graphical fron-end to <span class="caps">SVN</span> which provides seamless Windows Explorer integration. <br /> +Git doesn&#8217;t have anything like that yet. There&#8217;s something in the works, sure, but nothing really comparable to TortoiseSVN. Therefore, you are <em>kindly suggested</em> to get on and use the command line for all your git stuff.</p> +<p>Oh well, I personally love using command line interfaces for certain tasks, event if I spend more time on Windows than on any other OS and well, the <span class="caps">DOS</span> prompt is no way near to bash &amp; Co.</p> +<p>For the <del>lazy gits</del> Windows users, <a href="http://code.google.com/p/msysgit/">MSysGit</a> is the answer to all your problems. <em>Officially</em> you have to install Cygwin and all its crap to be able to use Git on Windows. Not that Cygwin is bad, but I personally don&#8217;t like the extra layer it creates between you and an OS symulation which is not really what&#8217;s on your machine.It would be great if you could get all the Bash goodies natively, without the hassle.</p> +<p>that&#8217;s basically what you get for free when you install MSysGit: the best (to date) version of Bash you could possibly dream of for Windows, along with a few handy Gnu tools and of course all git commands.<br /> +In a few click, you&#8217;ll be able to use Git (and Bash!) right away: no tricks, no hassle, no kidding.</p> +<p>And stop moaning about the command line not being user friendly. You want a new repository <em>anywhere</em>? Just type in the following:</p> +<div class='text'><pre><code>git init +git add . +git commit</code></pre></div><p>This will create your new repository in the current directory, add all your files and filders recursively, and perform the initial commit. What&#8217;s so hard in this? Nothing. And it&#8217;s faster than <span class="caps">SVN</span>, for sure.</p> +<h3>Are you local?</h3> +<p>&#8220;Being local&#8221; has its own advantages: you know where you stand, you know what to expect, you don&#8217;t depend on other people. What I didn&#8217;t fully realize about Git is that it can be a 100% <em>local</em> repository.</p> +<p>The three Git commands I mentioned earlier can be used to create a repository <em>there</em>, exactly where you are: not on a server far, far away.<br /> +Let&#8217;s see what this means:</p> +<ol> + <li>You don&#8217;t need an Internet connection anymore to use a <span class="caps">VCS</span></li> + <li>You don&#8217;t get a .svn folder in <em>every</em> damn directory of your project, with a load of crappy files in it.</li> + <li>You get only a .git folder <em>at top level</em>, and that&#8217;s where your repository actually is. Granted, there are going to be quite a few files in there, but they&#8217;re not going to be scattered all over the place</li> + <li>You can physically copy your repository anywhere and still use it</li> + <li>You don&#8217;t need to signup to GitHub for an account, if you only want your own <span class="caps">VCS</span></li> +</ol> +<p>OK, this is an extreme scenario, but sometimes you may want your <em>own</em> local repository for your stuff. You may want a place to version your documents, or a place to version your own little pet programming project nobody knows about.<br /> +With Git, you can get all the advantages of a <span class="caps">VCS</span> (and an <em>incredibly fast</em> <span class="caps">VCS</span>) without having to setup any server infrastructure: just install Git on your machine, and you&#8217;re done. No server processes, no hassle.</p> +<h3>Don&#8217;t connect, synchronize</h3> +<p>All the information your repository needs is stored in that little .git folder, nowhere else. You can copy your files and that folder, and you&#8217;ll still get your repository back wherever you are. Maybe you can zip it before copying it, and then unzip it where you need a <span class="caps">VCS</span>, event.</p> +<p>I tried using some synchronization utilities like SyncToy or RoboCopy on Windows to keep my files synchronized on multiple computers: it all started off from the fact that I can&#8217;t use <span class="caps">SSH</span> at work, so I wouldn&#8217;t be able to push my commits back to a central repository online like GitHub.</p> +<p>So here&#8217;s what I did:</p> +<ol> + <li>I setup a local repository for my project on a local folder at work.</li> + <li>I started working on my project, did a few commits.</li> + <li>After performing the last commit for the day (you are encouraged to commit often by Git, really), I synchronized that folder with my <span class="caps">USB</span> key, via SyncToy.</li> + <li>Back at home, I used SyncToy again to synchronize my files (including the repository) between the <span class="caps">USB</span> key and my home computer.</li> + <li>Performing a <code>git status</code> showed that some files have been modified (all of them, actually): that&#8217;s because Git detected that they weren&#8217;t the same files which were committed, presumably because of different timestamps etc.</li> + <li>All I did was a <code>git reset --hard</code> to get <em>exactly</em> the same files I committed at work, with absolutely no information loss.</li> +</ol> +<p>Isn&#8217;t it a bad thing to move your git folder back and forth and let another program to synchronize files within it? Maybe, but it seems to work so far. A safer option, in this case, may be zipping the folder before synchronizing it, just to be sure.</p> +<h3>Conclusion</h3> +<p>Git can do much more than this. Git offers some really interesting branching features, for example, which I didn&#8217;t mention in this article, of course, like several dozens of other commands. What I tried to point out was that Git can be used by <em>anyone</em>, as a fast, simple and very effective private <em>local</em> repository. In case you need one, that is (if you are really <em>local</em>).</p>
A contents/articles/glyph-020-released.html

@@ -0,0 +1,76 @@

+----- +title: Glyph 0.2.0 Released +content-type: article +subtitle: Featuring single-file compilation, programmatic usage and auto-regeneration, and more +timestamp: 1273417200 +tags: glyph|ruby|opensource +----- + + <section class="section"> +<p>I am very pleased to announce the second release of the <a href="/glyph/">Glyph Document Authoring Framework</a>. For those who don&#8217;t know, Glyph is a pure-Ruby, extensible solution to author documents like books or articles using a simple, fully-customizable markup language.</p> +<p>Since the <a href="/articles/introducing-glyph/">first release</a>, came out, last month, a lot happened. Plenty of bugs were fixed and new features implemented, as shown by the <a href="http://github.com/h3rald/glyph/blob/master/CHANGELOG.textile">changelog</a>. Here&#8217;s a brief rundown of the most notable changes.</p> +<section class="section"> +<header><h1 id="h_1" class="toc">What Glyph code looks like</h1></header> +<p>Earlier this week I <a href="http://blog.h3rald.com/making-a-custom-vim-syntax-file">blogged</a> about my new <a href="http://github.com/h3rald/stash/blob/master/.vim/syntax/glyph.vim">Glyph vim syntax file</a>. I&#8217;ve been using it for a while, and all I can say is that it really helps! Here&#8217;s what it looks like:</p> +<p><img src="/img/pictures/glyph_syntax.png" /></p> +<p>I&#8217;m sorry for the Emacs and TextMate folks, but I only use Vim, so I only made a Vim syntax file. Anyhow, Glyph grammar is very simple, so rolling out your own syntax file for your favorite editor shouldn&#8217;t be too hard.</p> +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Notable features</h1></header> +<section class="section"> +<header><h1 id="h_3" class="toc">Single-file compilation</h1></header> +<p>Perhaps the most life-changing feature in this release is the possibility of compiling a single Glyph source file into an <span class="caps">HTML</span> or <span class="caps">PDF</span> file. This means you no longer need to create a full-blown project for writing a short article: just create a file anywhere and run <code>glyph compile filename.glyph</code>on it!</p> +<p>The good thing is that with this new release you can also define snippets, configuration settings, and even macros right into your Glyph files, so you can do almost anything without having to create a project or fiddle with <span class="caps">YAML</span> files.</p> +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Programmatic usage</h1></header> +<p>The second most notable feature is the possibility to use Glyph as a Ruby library, i.e. as you&#8217;d use a filter like RedCloth or MarkDown. Additionally, it is also possible to compile single files programmatically, so you can, for example, create <span class="caps">PDF</span> files for your articles from the same source file. Don&#8217;t believe me? Feel free to click the <em>Download <span class="caps">PDF</span></em> and <em>View Source</em> links on this very page to see for yourself&#8230;</p> +<p>For those of you using the awesome <a href="http://nanoc.stoneship.org">nanoc</a> static site generator, here&#8217;s a few source files you may want to take a look at:</p> +<ul> + <li><a href="http://github.com/h3rald/h3rald/blob/master/lib/glyph-data.rb">lib/glyph-data.rb</a> &#8212; How to update configuration settings.</li> + <li><a href="http://github.com/h3rald/h3rald/blob/master/lib/glyph-filter.rb">lib/glyph-data.rb</a> &#8212; a simple Glyph filter.</li> + <li><a href="http://github.com/h3rald/h3rald/blob/master/Rules">Rules</a> &#8212; a rule using the <code>Glyph#compile</code> method to generate <span class="caps">PDF</span> files.</li> +</ul> +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">Auto-regeneration</h1></header> +<p>Another very interesting feature is the possibility to auto-regenerate your output files automatically whenever a source file is changed. Just run <code>glyph compile --auto</code> and you&#8217;re away. I&#8217;d like to thank <a href="http://koraktor.github.com">Sebastian Staudt</a> for proposing, implementing, and testing this feature.</p> +</section> +<section class="section"> +<header><h1 id="h_6" class="toc">Conditional macros</h1></header> +<p>Finally, although it may worry some, I added the possibility to evaluate conditional expressions directly in Glyph. The syntax is a bit verbose due to the extreme simplicity of Glyph parser, but it does the job:</p> +<p><code> +?[and[ + eq[$[document.output]|pdf]| + eq[$[tools.pdf_generator]|prince] + ]| + style[pagination.css]] +</code></p> +<p>The snippet above can be used to include the <code>pagination.css</code> stylesheet only when generating a <span class="caps">PDF</span> file with Prince <span class="caps">XML</span>.</p> +</section> +</section> +<section class="section"> +<header><h1 id="h_7" class="toc">What&#8217;s next?</h1></header> +<p>Release 0.3.0 is currently being planned, and so are its <a href="http://github.com/h3rald/glyph/issues">features</a>. For now, I&#8217;d like to thank the following individuals for contributing to Glyph:</p> +<ul> + <li><a href="http://www.jabbslad.com">Jamie Atkinson</a> (Jabbslad), for spotting and fixing some bugs and providing feedback.</li> + <li><a href="http://koraktor.github.com">Sebastian Staudt</a> (koraktor), for spotting and fixing some bugs, proposing and implementing new features.</li> +</ul> +<p>In particular, Sebastian is working on <a href="http://wiki.github.com/h3rald/glyph/feature-bibliography-support">bibliogaphy support</a> for Glyph, looking forward to it!</p> +<p>Although still in its infancy, Glyph is becoming more and more usable everyday. If you are interested, you can contribute in many different ways to the project, such as:</p> +<ul> + <li>By participating to discussions on the <a href="http://groups.google.com/group/glyph-framework">user group</a> (it&#8217;s a bit quiet of there for now&#8230;)</li> + <li>By spreading the word on Twitter, on your blog, or wherever you like.</li> + <li>By installing it, using it, reporting bugs and proposing new features (it&#8217;s just a <code>gem install glyph</code> away!).</li> + <li>By actually contributing to its development (it&#8217;s <a href="http://wiki.github.com/h3rald/glyph/contribution-guidelines">easy</a>!).</li> +</ul> +<p>Additionally, if you don&#8217;t like coding:</p> +<ul> + <li>feedback on the current documentation and on the <a href="http://github.com/h3rald/glyph/raw/master/book/output/pdf/glyph.pdf">Glyph book</a> is appreciated</li> + <li>if you are good with <span class="caps">CSS</span>, I&#8217;m looking for some nice new <span class="caps">CSS</span> styles to include in the standard Glyph distribution.</li> + <li>if you&#8217;re good with graphics, Glyph needs a good-looking logo&#8230;</li> +</ul> +<p>Any form of contribution will be credited in some way, e.g. by links and tweets.</p> +</section> + +</section>
A contents/articles/glyph-030-released.html

@@ -0,0 +1,84 @@

+----- +title: Glyph 0.3.0 Released +content-type: article +subtitle: The third release of the Glyph Authoring Framework features dramatic speed improvements, and much more +timestamp: 1276431000 +tags: glyph|ruby|opensource +----- + + <section class="section"> +<p>The third release of <a href="/glyph/">Glyph</a> is out!</p> + +<p>For those checking it out for the first time, Glyph is a <em>Rapid Document Authoring Framework</em> focused on extensibility and content reuse. For an example of what Glyph can do, have a look at Glyph's <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">free PDF book</a>.</p> + +<p>This release brings more stability to Glyph, more speed, and features affecting Glyph's core functionality. As a consequence, some <a href="http://github.com/h3rald/glyph/issues/closed#issue/121">incompatibilities</a> had to be introduced &ndash; but after all, better now than later.</p> + +<section class="section"> +<header><h1 id="h_1" class="toc">New parser and performance improvements</h1></header> +<p>This release's big news is the brand new <a href="http://yardoc.org/docs/h3rald-glyph/glyph/parser">Glyph Parser</a>. Until this release, Glyph relied on the awesome <a href="http://treetop.rubyforge.org/">Treetop</a> library for parsing Glyph language. Treetop is great when it comes to creating language parsers effortlessly, but it can add quite a bit of an overhead especially when using <a href="http://groups.google.com/group/treetop-dev/browse_thread/thread/15ff7659b2efbeed">dot star</a> patterns.</p> + + <p>So I ran a few benchmarks and in the end decided to write my very own (first!) parser from scratch using just the <a href="http://ruby-doc.org/core/classes/StringScanner.html">StringScanner</a> class, which is part of Ruby Standard Library. It took me a bit to get used to it, but in the end I managed to create something able to produce an Abstract Syntax Tree exactly the way I wanted.</p> + + <p>After adding the new parser, Glyph became significantly faster. This doesn't mean it's as fast as, say, RedCloth, but I it can be used to process long books in just a few <em>seconds</em> rather than <em>minutes</em>.</p> + +</section> + +<section class="section"> +<header><h1 id="h_2" class="toc">Macro Attributes</h1></header> +<p>Glyph now supports named attributes as well as positional parameters. This is particularly handy when you want to create macros with a lot of optional arguments: in this case, positional parameters are not great. As a result, for example, the <code>section</code> macro now takes an optional <code>title</code> and <code>id</code> attributes, rather than two parameters</p> + + <p>Attributes look like macros, but they all start with a <code>@</code> character. For example, see the the following image, showing this very section:</p> + + <img src="/img/pictures/updated_glyph_syntax.png" /> + +</section> + +<section class="section"> +<header><h1 id="h_3" class="toc">Full XML support</h1></header> +<p>Once macro attributes became available at parser level, having Glyph to produce arbitrary XML code became extremely easy. By default, now if Glyph doesn't find a macro it assumes you're inputting an XML tag of some kind, so you can write:</p> + + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>p[This is a paragraph with some em[emphasized] text.] +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>img[ +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @alt[Glyph Code] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> @width[50%] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @height[50%] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> @src[glyph_code.png] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span>]</pre></div> +</div> + + + <p>And get the following HTML code back:</p> + + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;p&gt;</span>This is a paragraph with some <span class="tag">&lt;em&gt;</span>emphasized<span class="tag">&lt;/em&gt;</span> text.<span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n2" name="n2">2</a></span><span class="tag">&lt;img</span> +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> <span class="attribute-name">alt</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">Glyph Code</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> <span class="attribute-name">width</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">50%</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> <span class="attribute-name">height</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">60%</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> <span class="attribute-name">src</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">glyph_code.png</span><span class="delimiter">&quot;</span></span> +<span class="line-numbers"><a href="#n7" name="n7">7</a></span><span class="tag">/&gt;</span></pre></div> +</div> + + + <p>...and none of the macros used in the previosu Glyph code snippet are actually defined in Glyph. Among other things, this means that <em>you don't have to</em> use Textile or Markup within your Glyph code unless you absolutely need to (e.g. for lists, which would be a bit verbose to create using just Glyph markup).</p> + +</section> + +<section class="section"> +<header><h1 id="h_4" class="toc">Improved <code>include</code> macro and "safe mode"</h1></header> +<p>The <code>include</code> macro now <em>must</em> take an path to a file relative to the <code>text/</code> directory of your project, <em>or</em> it can also be used to include (and <em>evaluate</em>) ruby code within your <code>lib/</code> directory. Moreover, you can now use the <code>include</code> macro even when compiling single Glyph files.</p> + + <p>Now, while evaluating Ruby code in an external file can be quite handy, is also quite insecure. For this reason, it is now possible to use Glyph programmatically in "safe mode", thereby forbidding the usage of certain <em>unsafe</em> macros.</p> + +</section> + +<section class="section"> +<header><h1 id="h_5" class="toc">What's next?</h1></header> +<p>Sooner or later I'll have to implement support for generating multiple files in output. This would make it possible to make the <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">Glyph book</a> available online as a collection of separate HTML file, for example, or, later on, maybe even compiled into a (ugh!) CHM file.</p> + + <p>Additionally, HTML5 support is also on the horizon: given the current Glyph architecture, it will be relatively easy to have Glyph macros to produce HTML5 code instead of XHTML. LaTeX support, on the other hand, is a completely different game, mainly because I'm not familiar with it, so if anyone feels creative and would like an easier way to produce reusable LaTeX code, <a href="http://github.com/h3rald/glyph/">get forking</a> and contact me!</p> + +</section> + +</section>
A contents/articles/glyph-040-released.html

@@ -0,0 +1,69 @@

+----- +title: Glyph 0.4.0 Released +content-type: article +subtitle: Featuring web output, HTML5 support, stats, wkhtmltopdf, and much more +timestamp: 1283535900 +tags: glyph|ruby|opensource +----- + + <section class="section"> +<p>This new release of Glyph introduces an unusually large number of features, improvements and bugfixes. Not so much in terms of new macros maybe (no index or bibliography support for now, but it will come, don&#8217;t worry!), but rather&#8230; pretty much everything else!</p> + +<section class="section"> +<header><h1 id="h_1" class="toc">Web Output</h1></header> +<p>By far the biggest feature of this release is support for multi-file output, i.e. the possibility to transform your book into a web site. You&#8217;ve asked for it, I needed it too, and now it&#8217;s finally here.</p> +<p>An example? Sure. Take the <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">Glyph Book</a> (now a 98-page <span class="caps">PDF</span> file) for instance. My only regret was that a long <span class="caps">PDF</span> is quite heavy to digest and peruse, especially if you&#8217;re in a hurry. It would be so much nice to have it available online, in chunks of more manageable size.</p> +<p>Well, <a href="/glyph/book/">here it is</a>. That&#8217;s the very same document, split in several <span class="caps">HTML</span> files with a custom layout that matches this site&#8217;s. The good news is that you can do it too:</p> + +<div class="code"> +<pre> +<code> +section[ + @title[This title is compulsory] + @id[random_section] + @src[topic_file.glyph] +] +</code> +</pre> +</div> + <p>Note the <code>@src</code> attribute? It basically includes the specified topic file. So by creating a <code>document.glyph</code> file like <a href="http://github.com/h3rald/glyph/blob/master/book/document.glyph">this</a>, you can create a tidy table of contents (not a single <code>include</code> macro) <em>and</em> get a website for free. Glyph, as usual, takes care of anything for you, especially links between topics. Just link away like you did so far, nothing changes from previous versions, it will just work as expected (<a href="/glyph/book/compiling/compiling.html#web_output">read more</a>).</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">HTML5 Output</h1></header> +<p>Compared to Web output, HTML5 support was trivial and only took a few hours to implement and test. You can now produce single-file HTML5-compliant documents (<code>html5</code> output format) or even HTML5-compliant web sites (<code>web5</code> output). Just using <code>section</code> tags instead of <code>div</code> tags made it worth it.</p> +<p>Of course, the default <span class="caps">CSS</span> files have been updated to be compatible with HTML5 output too.</p> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">Project Statistics</h1></header> +<p>Anoher big thing was a shiny new command, <code>glyph stats</code>, which brings &#8212; guess &#8212; stats. No more chasing after bookmark references, just type <code>glyph stats --bookmark=#web_output</code> and you&#8217;ll know where the <code>#web_output</code> bookmark was defined <em>and</em> what links to it. Similar stats are available for:</p> +<ul> + <li>macros</li> + <li>links</li> + <li>files</li> + <li>snippets</li> +</ul> +<p><code>glyph stats -m</code> tells me that I used 3236 macro instances throughout the Glyph book. Just so you know.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Custom tasks and commands</h1></header> +<p>&#8220;Glyph is extensible&#8221;, &#8220;Glyph lets you create your own macros&#8221;, &#8230;great, but kinda limited right? No more. Glyph now lets you create <em>custom Rake tasks</em> and even <em>custom commands</em>.</p> +<p>Have a look at <a href="/glyph/book/extending/commands_tasks.html">this page</a> for more information on what you can do and how. You can now extend Glyph in any way you like (including adding custom output formats) without having to touch its core, just do it <em>within your own project</em>.</p> + +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">wkhtmltopdf</h1></header> +<p>Last but not least, you no longer need Prince <span class="caps">XML</span> to produce <span class="caps">PDF</span> file. Granted, Prince is awesome and the <span class="caps">PDF</span> it produces are very, very nice&#8230; but if you want to produce PDFs commercially and want to same some money, you can now use <a href="http://code.google.com/p/wkhtmltopdf/">wkhtmltopdf</a>: it&#8217;s <em>free</em> and <em>open source</em>, and it keeps getting better and better.</p> + +</section> +<section class="section"> +<header><h1 id="h_6" class="toc">...and more to come!</h1></header> +<p>After this release I&#8217;m going to take a small break from Glyph. Nothing major, I just want to redesign my site (again) and find the time to write a proper Glyph tutorial. This doesn&#8217;t mean that development will be halted or anything, just that it will take a few months for Glyph 0.5.0 to come out.</p> +<p>Meanwhile, there may be bugfix releases (depends how many bugs turn up). It would be a good time to come out of the closet and propose/vote on new <a href="http://github.com/h3rald/glyph/issues">features</a>!</p> +<p>Hope you enjoy using Glyph 0.4.0, and if you need anything or feel social, remember that the doors of the <a href="http://groups.google.com/group/glyph-framework">Glyph User Group</a> are always open!</p> + +</section> + +</section>
A contents/articles/glyph-050-released.html

@@ -0,0 +1,107 @@

+----- +title: Glyph 0.5.0 Released +content-type: article +subtitle: Featuring Calibre integration, macro composition, Turing-completeness, and more +timestamp: 1314559080 +tags: glyph|ruby|opensource +----- + + <section class="section"> +<p>Too much time passed since the last Glyph release. Way too much. Finally I found the time and will to tidy up the last few remaining bugs, update the docs, and release it!</p> +<p>This new release was mainly focused on extending the features of Glyph as a <em>language</em>. Besides a few improvements that make writing Glyph code easier and more readable (e.g. macro composition), Glyph is now Turing-complete. It supports iterations, recursion, variable assignments, basic arithmetics&#8230; you can even write a program to compute the factorial of an integer, if you wanted to.</p> +<p>Additionally, it also features enhanced content reuse through fragments and output-independent macros, and a few bugfixes.</p> + +<section class="section"> +<header><h1 id="h_1" class="toc">Calibre Integration</h1></header> +<p><a href="https://github.com/tammycravit">Tammy Cravit</a> proposed (and more or less implemented) an interesting new feature: integrate <a href="http://calibre-ebook.com/">Calibre</a> to generate ebooks in <span class="caps">EPUB</span> and <span class="caps">MOBI</span> format from Glyph&#8217;s native standalone <span class="caps">HTML</span> output format.</p> +<p>Although the support is still somewhat rough, you can, as a matter of fact, generate ebooks with Glyph, using Calibre.</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Macro Composition</h1></header> +<p>This release features an update at syntax-level: the possibility of &#8220;composing&#8221; macros, thereby eliminating nesting provided that containers take only one parameter and no attributes. What? This:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> not[output?[pdf]]| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre></div> +</div> + + +<p>Can be written like this:</p> + + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> not/output?[pdf]| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre></div> +</div> + + +<p>In this case, the <code>not</code> macro was composed with the <code>output?</code> macro, thus removing one level of nesting.</p> +<p>Additionally, I used this features to create an <code>xml</code> macro dispatcher that can be used to render raw <span class="caps">XML</span> tags, and an <code>s</code> macro dispatcher that basically is able to call nearly all the instance methods of the Ruby String class. So you can write things like <code>s/sub[This feature makes my life easier|/my/|your]</code> and similar.</p> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">Turing-Completeness</h1></header> +<p>As of this version, Glyph can be considered <em>Turing-complete</em>, as it satisfies the following <a href="http://c2.com/cgi/wiki?LanguageRequirementsForTuringCompleteness">requirements for Turing-completeness</a>:</p> +<ul> + <li>A conditional construct, implemented via the <code>condition</code> macro.</li> + <li>Variable assignment, by setting the value of snippets using the <code>snippet:</code> macro and of attributes using the <code>attribute:</code> macro.</li> + <li>(infinite) iteration implemented through the new <code>while</code> macro or recursion, which is possible thanks to the new <code>define:</code> macro.</li> + <li>A memory model which emulates an infinite store: there are no enforced limits on attribute/snippets allocations and number of algorithms or parameters.</li> +</ul> +<p>Plus, Glyph now understand basic integer arithmetic:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>def:[factorial| +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> ?[ +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> eq[{{0}}|0]|1| +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> multiply[ +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> {{0}} | factorial[subtract[{{0}}|1]] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span> ] +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre></div> +</div> + + <p>Not that you <em>need</em> to be able to calculate factorials in your documents, but know that now you <em>can</em>. An you can also define lexically scoped variables, err&#8230; <em>attributes</em>, like this:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>let[ +<span class="line-numbers"><a href="#n2" name="n2">2</a></span> @:[a|bits] +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> @:[b|bobs] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span> section[ +<span class="line-numbers"><a href="#n5" name="n5">5</a></span> @title[Something more about attributes] +<span class="line-numbers"><a href="#n6" name="n6">6</a></span>Attributes are like lexically scoped variables. You can use them to store @[a] and @[b]. +<span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre></div> +</div> + + <p>Handy enough.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Embeddable fragments</h1></header> +<p>Too lazy to create snippets? Feel the urge to re-use something you already wrote somewhere? Use a <em>fragment</em> and embed it, as follows:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>Snippets and fragments ##[good_way|are a good way to reuse] small chunks of content, +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>while the include and load macros <span class="error">&lt;</span>=[good_way] entire files.</pre></div> +</div> + + <p>&#8230;And you can also use a new <code>load</code> macro, to embed entire files without performing any evaluation (like <code>include</code> does).</p> + +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">Incompatibilities with previous versions</h1></header> +<p>To sum up:</p> +<ul> + <li><code>snippets.yml</code> is no more, define all your snippets inside your document instead.</li> + <li>New &#8220;invisible space separator&#8221;: <code>\/</code> instead of <code>\.</code>. Because it&#8217;s slightly prettier, nothing else.</li> + <li>The <code>rewrite:</code> macro has been replaced by the <code>define:</code> macro, which also allows recursion, so be careful!</li> + <li>If you want to render raw <span class="caps">XML</span> tags, use <code>xml/tag_name</code> instead of <code>=tag_name</code>.</li> + <li>No more <code>match</code> macro, use <code>s/match</code> instead.</li> +</ul> +<p>For the full list of the issues fixed in this release, see the <a href="http://www.h3rald.com/glyph/book/changelog.html">Changelog</a>.</p> +<p>Hope you&#8217;ll enjoy this new release of Glyph. If you want to contribute, go ahead and <a href="https://github.com/h3rald/glyph">fork the repo</a>!</p> + +</section> + +</section>
A contents/articles/google-apps-for-your-domain.html

@@ -0,0 +1,67 @@

+----- +title: Google Apps for your domain: a shared hosting killer service? +content-type: article +timestamp: 1156737060 +tags: google|internet|ajax|web20|review +----- +<p>A while ago Google started offering services like <a href="http://mail.google.com/mail/">Google Mail</a> (Gmail) and <a href="http://www.google.com/calendar/">Google Calendar</a> to domain owners. Sure everyone likes Gmail, but one of the few bad things about it is that it never feels &#8220;unique&#8221;: your email address is always gonna be <something><code>gmail.com or &lt;something&gt;</code>googlemail.com. Not a big deal? Well, sure, not really, but it really depends on the people using the service and how fussy they are:</p> +<ul> + <li>small/medium business wouldn&#8217;t like this: @gmail.com gives farless credibility than @domain.com</li> + <li>When using Gmail with the Send As feature, messages will be sent &#8220;on behalf of&#8221;, and this can potentially mess things up as some spam filters don&#8217;t like it.</li> +</ul> +<p>Now it seems to be <a href="http://seattlepi.nwsource.com/business/1700AP_Google_Business_Applications.html">official</a>: Google is starting to offer customizable services to anyone who wish to sign up for it, not only as a restricted beta service.<br /> +What does this mean? Well, it can be the (free and easy) definitive web solution for small business, kids, grandmas and everyone who wants to establish a presence on the web by paying only the annual domain renewal fees&#8230;</p> +<h3>Included applications</h3> +<p>Note the title: <a href="https://www.google.com/a/">Google Apps</a> for your domain, not only Gmail. Here&#8217;s what you get:</p> +<ul> + <li><a href="http://mail.google.com/">Gmail</a> &#8211; You know what it offers: a state-of-the art <span class="caps">AJAX</span> interface, speed, reliability, very effective spam filter, loads of space, tagging (labels) stars and all the rest.</li> + <li><a href="http://www.google.com/calendar/">Google Calendar</a> &#8211; One of the best online calendar available. Features and <span class="caps">AJAX</span> interface, full integration with Gmail, ability to create private and public calendars, reminders,</li> + <li><em>Google Chat</em> &#8211; Google&#8217;s instant messenger, available through <a href="http://www.google.com/talk/">Google Talk</a> desktop application or online, seamlessly integrated in your Gmail interface.</li> + <li><a href="http://pages.google.com/">Google Web Pages</a> &#8211; aka Google&#8217;s page creator, easily create webpages using Google&#8217;s <span class="caps">WYSIWYG</span> online editor.</li> +</ul> +<p>Now, try imagining these four services combined and (almost) fully customizable&#8230; Still no idea? Well, keep reading for a list of all the included features.</p> +<h3>Included Features</h3> +<p>In order to use Google Apps for your domain, you must of course own a domain. The next step involves changing your domain&#8217;s MX entry to &#8220;<span class="caps">ASPMX</span>.L.<span class="caps">GOOGLE</span>.<span class="caps">COM</span>&#8221;, and follow the instructions to create an administration account for your Google applications, and after a while every email sent to your domain&#8217;s accounts will be routed to your new Google-powered inbox. Similarly, in order to use Google Page Creator on your domain, you&#8217;re required to change the <span class="caps">CNAME</span> record of your <span class="caps">DNS</span> to &#8220;ghs.google.com&#8221;.</p> +<blockquote> +<p>Note: in order to avoid inconveniences especially if a lot of users use your domain&#8217;s email, it is recommended that you pay attention on Google&#8217;s instructions on how to set the whole thing up. For further information refer to the official <a href="https://www.google.com/a/FAQ"><span class="caps">FAQ</span></a>. In order to be able to use Google Page Creator on your domain, you must setup an <span class="caps">URL</span> to publish your webpages: of course do <span class="caps">NOT</span> set this to &#8220;www.yourdomain.com&#8221; or any subdomain currently in use or your visitors will access the pages you created with Google Page Creator.</p> +</blockquote> +<p>Here&#8217;s what you get:<br /> +<img src="/img/pictures/gmail-hosted/gmail.png" alt="" /> <br /> +For a bigger image click <a href="/img/pictures/gmail-hosted/gmail_full.png">here</a>. Let&#8217;s now have a look at what are the main differences from the standard Gmail.</p> +<p><u><em><strong>Include your own logo</strong></em></u><br /> +<img src="/img/pictures/gmail-hosted/logo.png" alt="" /></p> +<p>Your own logo will be displayed on the upper left corner of every page. And this is truly sweet. All you have to do to change it is uploading a 143&#215;59 <span class="caps">PNG</span> or <span class="caps">GIF</span> image from your domain management panel (see below).</p> +<p><u><em><strong>Use your company name instead of Google&#8217;s</strong></em></u><br /> +<img src="/img/pictures/gmail-hosted/links.png" alt="" /></p> +<p>Besides a custom logo, it is possible to set a company name to be used instead of &#8220;Google&#8221; or &#8220;Gmail&#8221; in page titles and links. I chose &#8220;H3RALD.com Mail&#8221; and that&#8217;s displayed everywhere, including on the sign-in page.</p> +<p><u><em><strong>Control Panel</strong></em></u><br /> +All the custom settings can easily be managed through an easy-to use control panel:</p> +<p><img src="/img/pictures/gmail-hosted/options_panel.png" alt="" /></p> +<p>It&#8217;s really easy to use and has wizards to setup all the included services and options like setting up user accounts, settings etc.</p> +<p><img src="/img/pictures/gmail-hosted/domain.png" alt="" /></p> +<p><u><em><strong>User Accounts</strong></em></u><br /> +Through the control panel you can add new users and modifying existing user accounts to access your services. You can create administrators who are able to access administrative domain-wide settings, and standard users. Every user gets 2048MB of space for their emails, and that&#8217;s pretty generous considering that it seems that you&#8217;re able to create around 25 user accounts.</p> +<p>Already have a list of users you&#8217;re like to import? Just save them in <span class="caps">CSV</span> format and upload them.</p> +<p>Would you like to be able to contact all your users at once, e.g. via a newsletter? Google thought about this as well, and you can create your own personal newsletters which can be sent out automatically to your @yourdomain.com email accounts.</p> +<p><u><em><strong>Internal Messaging System</strong></em></u><br /> +But there&#8217;s more. We all know Google Talk: yes it&#8217;s nice, but probably <span class="caps">MSN</span> has more features, smileys and all the rest but it still remains a perfectly usable instant manager, which also allows file transfer. Your users can use Google Talk to communicate with each other <em>or</em> simply chat through their webmail interface, More features? Well, for example <a href="https://www.google.com/support/hosted/bin/answer.py?answer=34143">you can setup Google Talk to work on federated networks</a>.</p> +<p><u><em><strong>Appointments/Projects management</strong></em></u><br /> +Google Calendar is an excellent online calendar, and now you can use it within your own domain as well. This means, for example, that it can be used to set your company&#8217;s appointments, reminder, project deadlines by creating an unlimited number of custom calendars to share with your collaborators.</p> +<p><u><em><strong>Design your own site</strong></em></u><br /> +I know a lot of restaurants, shops and people who would like to have a small site for their business or activity, but they can&#8217;t develop web application themselves. So the most obvious solution is to hire some professional web developer to rip them off&#8230; erhm, to create a website for them. Now it is not necessary: by setting the correct <span class="caps">DNS</span> parameters, you can allow users to create their own webpages using a foolproof and advanced web editor powered by Google: <a href="http://pages.google.com/">Google Page Creator</a>. <br /> +I didn&#8217;t set it up on my own domain, but a preview of what you can do with Google Page Creator is available <a href="http://h3rald.googlepages.com/home">here</a>.</p> +<h3>Scenario</h3> +<p>After considering all this, I came to the conclusion that what Google did can help a lot of people and at the same time prevent some evil webmaster to charge them hundreds of Euro (they really get away with it!) for basic &#8220;websites&#8221; with &#8220;three or more static pages&#8221;.<br /> +All you have to do is buy your own domain, and that can be as cheap as 8$ per year, the rest comes for free, from Google:</p> +<ul> + <li>The best webmail interface you can possibly imagine</li> + <li>Nearly unlimited space for everything</li> + <li>A truly effective spam filter</li> + <li>About 25 fully-featured user account, possibly more if you ask nicely</li> + <li>Your own &#8220;corporate instant messenger&#8221;</li> + <li>Your own calendar to manage appointments, meetings etc.</li> + <li>An intuitive and advanced web page creator &#8211; not like Geocities</li> +</ul> +<p>All this for free. Yes, with ads (I&#8217;m not here to discuss <a href="http://www.gmail-is-too-creepy.com/">privacy concerns</a>), but after all they&#8217;re not displayed on your main site.</p> +<p><em>What about Server Side technologies for my sites?</em></p> +<p>OK kid, now that would be a little bit too much, even if I can foresee some possible &#8220;Google Web Widgets&#8221; at some point. &#8220;Create your <em>interactive and dinamic</em> website within minutes, no programming knowledge required&#8221;&#8230; that would be great (for Google) and bad (for freelance web developers). One thing at a time, after all G(od|oogle) has the whole eternity to fulfill his Goals.</p>
A contents/articles/google-chrome.html

@@ -0,0 +1,165 @@

+----- +title: Chrome - Google did it again! +content-type: article +timestamp: 1220401860 +tags: browsers|review|google +----- +<p style="float:left;"><img src="/files/google-chrome/chrome-logo.jpg" alt="" /></p> +<p>It looks like there&#8217;s a <a href="http://www.google.com/chrome">new open source browser</a> in town. As usual, nearly everything about it <a href="http://blogoscoped.com/archive/2008-09-01-n47.html">leaked</a> <a href="http://www.techcrunch.com/2008/09/01/first-public-screen-captures-of-google-chrome/">before</a> its <a href="http://www.google.com/chrome">release</a>. Every blog that matters is talking about it, so if you didn&#8217;t hear anything about it, you&#8217;d better take a look yourself. Don&#8217;t be fooled by the usual <a href="http://www.techcrunch.com/2008/09/01/meet-chrome-googles-windows-killer/">senseless ravings</a> of some weird, overly-hyped blogger though: a <em>browser</em> just came out, nothing more and nothing less. It&#8217;s not the end of Windows, it&#8217;s not the end of the Internet, it&#8217;s not the end of the world as we know it. It&#8217;s just a new player in the Browser Wars.</p> +<p>I particularly recommend reading the official <a href="http://books.google.com/books?id=8UsqHohwwVYC&amp;printsec=frontcover#PPP1,M1">Google Comic Book</a> about Chrome, however I included some of the most interesting parts of it in this article. It&#8217;s a nice 40-page comic booklet explaining how the browser works in a friendly way&#8230; I found it quite amusing and an interesting way to <del>leak</del> distribute info on a new project.</p> +<h3>Getting the damn thing</h3> +<p>You can freely download Google Chromm from <a href="http://www.google.com/chrome">here</a>. You&#8217;ll get a tiny 474KB setup file which installs the browser automatically. When I say automatically I mean automatically: you double click it, and it won&#8217;t ask <em>anything</em>: it will just install it in Program Files by itself. Idiot proof. Clever. Some people may like it, I damn hated it.</p> +<p>I downloaded it and installed it fine from home, on Vista, and it was blazing fast (on <em>Vista_, imagine!). I tried to do the same thing from work and I couldn&#8217;t. The damn installer is supposed to pick up the proxy settings from your default browser, but if the proxy uses authentication (like 99% of corporate proxies) it simply won&#8217;t work. As far as I know, there&#8217;s <a href="http://groups.google.com/group/google-chrome-help-troubleshooting/browse">no way around this</a></em>thread/thread/4c07ec5124f2eebc.</p> +<p>This is the reason why this article won&#8217;t have any chrome screenshots&#8230; to protest against Google&#8217;s stupid way of doing things &#8220;too user-friendly&#8221;.</p> +<p><strong>Update 1:</strong> Actually, it is now possible to download the full Chrome setup from <a href="http://cache.pack.google.com/chrome/install/149.27/chrome_installer.exe">here</a> (Thanks <a href="http://www.thecrazyaustralian.com/installing-google-chrome-behind-a-proxy/">Crazy Australian</a>).</p> +<p><strong>Update 2:</strong> After installing Chrome, if your company uses an automatic proxy script you won&#8217;t be able to browser web sites using Chrome. If that&#8217;s your case, make sure you change IE&#8217;s proxy settings by specifying your proxy address and port explicitly.</p> +<h3>How Google &#8220;re-invented&#8221; the browser</h3> +<p>Why did Google bother? Officially because&#8230;</p> +<p><em>&#8220;[&#8230;] we believe we can add value for users and, at the same time, help drive innovation on the web.&#8221;</em><br /> +(from <a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html">Google Blog</a>)</p> +<p>In practice, a Google-branded browser makes sense especially because of the services offered by the search giant right now: nearly <em>every kind</em> of web application, from mail clients to <span class="caps">RSS</span> readers.</p> +<p>The philosophy of Google Chrome is fairly simple: the Web has changed since the nineties, we now have full-fledged applications instead of crappy hypertexts with animated GIFs, therefore browsers must change, too.</p> +<p>Every major browser has a fairly long development history. Think of Firefox: version 3? Not really: try adding up at least 7 versions of Netscape before that. Internet Explorer <strong>8</strong>, Opera <strong>9.5</strong>, &#8230;<br /> +Safari is probably the newest of the lot, but still not quite right.</p> +<p>All major browsers <em>evolved</em> through the years, but they never really changed: so why not to start from scratch?</p> +<p>Starting from scratch has a lot of advantages:</p> +<ul> + <li>You can learn from other people&#8217;s mistakes, and try to fix them</li> + <li>You can <em>get things right</em> from the very start</li> + <li>You do not have to worry about breaking compatibility with previous versions</li> + <li>People won&#8217;t have extremely high expectations, and they&#8217;ll be prepared for a relatively unstable product</li> +</ul> +<p>Obviously building a browser from the ground up is not a weekend project, but things changed since the nineties and starting fresh does not necessarily means re-inventing the wheel!</p> +<h3>An &#8220;old&#8221; Rendering Engine</h3> +<p>Let&#8217;s just say that the main work was already done for Google by the <a href="http://webkit.org">WebKit</a> guys. The rendering engine which now powers Safari, the Nokia Series 60 browser, Gnome&#8217;s Epiphany, Adobe <span class="caps">AIR</span> has been picked by the Google guys for Chrome.</p> +<p style="float:right;"><img src="/files/google-chrome/chrome-javascript.gif" alt="" /></p> +<p>This is a fairly obvious choice, if you ask me. Why?</p> +<ul> + <li>Presto (Opera&#8217;s engine) is proprietary</li> + <li>Trident (IE&#8217;s engine) is proprietary, and it sucks</li> + <li>Gecko (Mozilla&#8217;s engine) is open source, but a bit bulky</li> + <li>WebKit is open source, and arguably the fastest rendering engine to date</li> +</ul> +<p>The rendering engine, after all, may be considered one of the most important parts of the browser: it&#8217;s responsible of what users see, after all. <br /> +Google made the right choice, in my opinion: WebKit is also the most &#8220;embeddable&#8221; and lightweight engine available, and it is also used on the Android platform for this very reason.</p> +<h3>A &#8220;new&#8221; Javascript</h3> +<p>Mozilla has a <a href="http:http://www.mozilla.org/js/spidermonkey/Javascript">fast</a> engine, which will soon become <a href="http://ejohn.org/blog/tracemonkey/">much faster</a>. WebKit has a <a href="http://webkit.org/projects/javascript/">blazing fast</a> Javascript engine too, don&#8217;t forget. So why Google didn&#8217;t just use that?</p> +<p>&#8230;Because they wanted something <em>much</em> faster than that, in their own way (as someone already <a href="http://null-logic.net/blog/2008/09/02/javascript-performance-comparison-with-chrome/">pointed out</a>).</p> +<p>Meet <strong>V8</strong>, Chrome&#8217;s very own Javascript Virtual Machine. When reading the Chrome Comic, I was particularly impressed of two improvements introduced by this new javascript VM:</p> +<p style="float:right;"><img src="/files/google-chrome/chrome-javascript-gc.gif" alt="" /></p> +<ul> + <li>It actually compiles Javascript to machine code via a Just-In-Time compiler (<span class="caps">JIT</span>). This means that whenever you refresh a page containing Javascript the browser won&#8217;t re-interpret the whole script, but it will simply run the compiled version of it which was generated the first time the page was loaded. New concept? Not really, Mozilla is going <em>exactly</em> in the same direction with their own engine, and <span class="caps">JIT</span> compilation will be added as of Firefox 3.1.</li> + <li>V8&#8217;s incremental garbage collection looks like a much better alternative to the current conservative garbage collection methods used for Javascript. Because of V8&#8217;s new concept of Hidden Class Transitions, V8 knows <em>exactly</em> when something is no longer needed and thus it is able to garbace-collect it more effectively.</li> +</ul> +<p>While there has been some initial <a href="http://nexus.zteo.com/2008/09/01/google-chrome-an-index-of-what-developers-need-to-know-good-and-bad/">skepticism</a> on this new Javascript implementation, it looks like Google did it right. If you don&#8217;t believe it you can <a href="http://code.google.com/apis/v8/intro.html">download</a> V8&#8217;s C++ code and try it out yourself.</p> +<h3>One Process per Tab</h3> +<p>Google Chrome is the first multi-process browser. The idea is that <em>each tab</em> (because you can&#8217;t do browsers without tabs, these days, right?) has its own phisical process and it is therefore independent from each other.</p> +<p style="float:right;"><img src="/files/google-chrome/chrome-processes.gif" alt="" /></p> +<p>Hang on, isn&#8217;t that what IE 5 did? A new instance of the browser for each window? No, not quite: there&#8217;s a single instance of the browser and <em>multiple</em> tab instances. Each tab is independent in the sense that it has its own address bar, but it&#8217;s just a tab, at the end of the day.</p> +<p>This is what Internet Explorer could have done, <em>before</em> Internet Explorer 7, as an answer to the traditional concept of tabs promoted by Mozilla and Opera.</p> +<p>Actually, it turns out that <a href="http://blogs.msdn.com/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx">this is <em>exactly</em> what&#8217;s planned for Internet Explorer 8</a>, as <a href="http://www.sriramkrishnan.com/blog/2008/09/thoughts-on-new-browser-wars.html">someone</a> already pointed out!</p> +<p>Additionally, Google thought of building in a mini task manager to let users monitor the <span class="caps">CPU</span> and memory usage of each tab. This is interesting, but it has a few implications discussed later on in this article.</p> +<p>What&#8217;s truly remarkable about this is that each tab seems to have an initial overhead of 1-2KB, which of course grows according to the site it loads. You can see all this in the task manager, which also picks up similar stats for any other browser running at the same time on your machine. <br /> +This was another clever move by Google: by looking at their own task manager, and running more than one browser together, you have everything you need to instantly compare browser performance (thus discovering that Chrome does an outstanding job, it seems).</p> +<p>What&#8217;s also remarkable about Chrome&#8217;s tabs is the way you can interact with them:</p> +<ul> + <li>You can move them around smoohtly, exactly like with Safari</li> + <li>You can detach them by drag and drop</li> + <li>You can re-attach them by drag and drop (which is truly awesome!)</li> +</ul> +<h3><del>AwesomeBar</del> <em>OmniBox</em> and <del>Speed Dial</del> <em>New Tab Page</em></h3> +<p>Did you like Mozilla&#8217;s AwesomeBar? Well, I personally did, others didn&#8217;t so much. Meet OmniBox&#8482; Google&#8217;s very own, semi-sentient address bar which really understands you.</p> +<p>Here&#8217;s what you can do with it:</p> +<ul> + <li>Type in URLs and view web sites (it would be damn funny if it couldn&#8217;t do that)</li> + <li>Get <del>extra Google crap</del> useful suggestions while typing. This includes, but it is not limited to: + <ul> + <li>Pages you visited</li> + <li>Bookmarks</li> + <li>Popular pages (guess who decides that&#8230;)</li> + </ul></li> + <li>Custom searches: search <span class="caps">IMDB</span>, Wikipedia, Amazon and google itself with a few clicks</li> +</ul> +<p><img src="/files/google-chrome/chrome-bar.gif" alt="" /></p> +<p>Unlike Firefox&#8217;s AwesomeBar, Google&#8217;s OmniBox seems more &#8220;evolved&#8221;: it doesn&#8217;t get too much in your way, it lets you go where you want to go, and it&#8217;s smart about searching. Apparently Mozilla is already planning to remove the search bar completely and incorporate it in the AwesomeBar&#8230; but Google released it first, sorry guys.</p> +<p>The other handy thing they <del>stole</del> kindly borrowed from Opera is the <em>New Tab Page</em>, basically like Opera&#8217;s Speed Dial, but with two interesting things:</p> +<ul> + <li>It displays the nine <em>most visited</em> pages: you don&#8217;t have to configure it!</li> + <li>It displays search boxes for the most visited sites where you searched something on.</li> +</ul> +<p>While I really like how this works (it requires no configuration whatsoever), I kinda miss dragging my favorite pages in the New Tab Page. If you come from Opera, you&#8217;ll miss this too: the pages I have in my speed dial are <span class="caps">NOT</span> necessarily the pages I visited the most!</p> +<p>I guess I&#8217;ll get used to it, though&#8230;</p> +<h3>Relax, it&#8217;s Google!</h3> +<p>Google is not Evil&#8482;. Google is good to everyone, from their own employees to developers and end users: and the funniest part of this whole thing is that everything they make <em>looks</em> good for you. You have absolutely no reason to fear Google.</p> +<p>They did it again: they apparently released a new browser which definitely looks inherently more secure than competitors. <br /> +Here&#8217;s why:</p> +<ul> + <li>It has an <em>Incognito</em> mode, which lets you browse everything you want without logging anything anywhere.</li> + <li>It confines popups to the tab they belong, minimized. You can then seletively decide to drag them out and promote them to their own window.</li> + <li>Each tab is sandboxed: i.e., it has no rights to write anything to your PC. Absolutely no chance. When plugins for Java and Flash are used, however, this doesn&#8217;t apply.</li> + <li>Chrome continuously downloads lists of malicious sites, so that you&#8217;re protected against phishing in real time.</li> +</ul> +<p style="float:left;"><img src="/files/google-chrome/chrome-blame.gif" alt="" /></p> +<p>Now, if everything goes wrong, you know it&#8217;s definitely <em>someone else who did it</em>. If you read the comic book between the lines, you&#8217;ll notice a not-so-subtle message to the end users:</p> +<ul> + <li>The browser is sandboxed, so if anything goes wrong, blame others (Adobe for Flash, Sun for Java, Microsoft for some other crap)</li> + <li>You can monitor the resource consumption of each tab, <em>ergo</em> what <em>each website</em> uses. This means that if a site is slow is definitely the web developer&#8217;s fault.</li> +</ul> +<p>This is basically what <a href="http://ejohn.org/blog/google-chrome-process-manager/">John Resig</a> immediately pointed out when the comic came out.</p> +<h3>How it feels</h3> +<p>Google Chrome is clearly a very nice product to use. It&#8217;s as intuitive as IE for the average Windows user, it has the best of Firefox and Opera features and it&#8217;s even more sleek than Safari. The UI, in my opinion, is a true masterpiece and feels well though out.</p> +<p>Everything is aimed to be intuitive and does not get in your way: it just works. You want to download a file? You can just do it, without worrying about where to save it: it will appear in a &#8220;download bucket&#8221; at the bottom of your tabs, and you can just drag and drop what you downloaded anywhere you like, if you need to.<br /> +Why nobody thought of this before?</p> +<p>Even the program settings are simple to understand. The Options dialog is divided in &#8220;Basics&#8221;, &#8220;Minor Tweaks&#8221; and &#8220;Under the Hood&#8221;. The idea is that anyone can understand the Basics, some people may tweak a bit more, and only geeks may want to go beyond that. This is particularly evident in the Italian translation (it comes bundled with 40 localizations, by the way), where they translated &#8220;Under the Hood&#8221; with &#8220;Roba da smanettoni&#8221; which means something like &#8220;Stuff for people who fiddle with PCs&#8221;. I personally found this translation a bit irritating, but anyway&#8230;</p> +<h3>Media Coverage and Target Audience</h3> +<p>The overall impression is that Google wanted to target end users with this browser, but also appeal geeks, too. This makes sense from a marketing point of view. While 90% of geeks switched from IE to another browser, ordinary people are still stuck with IE. Why? Because alternative browsers have gained a reputation of being geek-friendly (which, by popular belief, does not mean user-friendly).</p> +<p>Google&#8217;s marketing strategy is quite clear, and it doesn&#8217;t seem to be failing on any point:</p> +<ul> + <li>They targeted Windows first, because that&#8217;s what the bulk of IE aficionados uses.</li> + <li>They did their best to make it as user-friendly as possible: the sleek <span class="caps">GUI</span>, the comic book, etc.</li> + <li>They spread the world like crazy: every blog is talking about it, but also major news sites like <span class="caps">BBC</span> and <span class="caps">CNN</span>. When I got to work, a collegue of mine asked me if I tried the new Google browser and if I read the comic. She heard it at the radio. Here <em>in Italy</em>!</li> + <li>At the same time, they made the whole thing open source, released APIs and emphasized this, so that &#8220;computer fiddlers&#8221; couldn&#8217;t resist.</li> +</ul> +<p>To me, it looks like Google Chrome stands a good chance to succeed where others have failed: drive most of the Internet population away from Internet Explorer.</p> +<h3>Open Source, testing and quality</h3> +<p>Google is well known for its massive infrastructure. Moreover, Google is the only &#8220;entity&#8221; (let&#8217;s call it that way, shall we) who <em>knows</em> and <em>visited</em> almost every web page on the Internet. If something is not &#8220;on Google&#8221;, it may well not exist at all: this is not strictly true, but it&#8217;s the user perspective and ad the end of the day that&#8217;s all that matters.<br /> +Google, as a consequence, has virtually unlimited resources (compared to any other possible competitor) and virtually unlimited knowledge of the Internet, which makes automated testing no more than a joke.</p> +<p>From the Google Chrome Comic:</p> +<p><em>&#8220;Within 20-30 minutres of each new browser build, we can teswt it on tens of thousands of different web pages&#8221;</em></p> +<p>&#8230;and that&#8217;s certainly not an understatemend: you can believe that.</p> +<p><img src="/files/google-chrome/chrome-tests.gif" alt="" /></p> +<p>Google seems very concerned of building a &#8220;rock-solid&#8221; browser rather than being the coolest guy in town, and that&#8217;s a good sign. Google is <em>smart</em>, remember?</p> +<p>As if it weren&#8217;t enough, the entire thing (the rendering engine, the javascript implementation and the whole code of the broswer) is 100% open source which means, in a nutshell:</p> +<ul> + <li>Free testers</li> + <li>Free developers</li> + <li>Good publicity</li> +</ul> +<p><img src="/files/google-chrome/chrome-os.gif" alt="" /></p> +<p>If things go as planned, Chrome may become the most widely tested piece of software in the world. Let&#8217;s just see how the community takes this.</p> +<h3>Why it matters</h3> +<p>Everyone seems to have gone crazy about Chrome, even long before it was made available. Why does it matter, anyway? Isn&#8217;t it just a browser, at the end of the day? Well, yes, but:</p> +<ul> + <li>It&#8217;s 100% open source. If you like something of it, you can get it, modify it, bundle it in another project and redistribute it. Give it a few weeks and extensions which use some of Google&#8217;s new <span class="caps">API</span> will flock to the &#8217;fox like crazy.</li> + <li>It&#8217;s small, fast and very promising. Sure, it&#8217;s not perfect, but <span class="caps">YOU</span> can help improving it. Get it?</li> + <li>It&#8217;s on Windows, so it will reach the majority of Internet users&#8230; in theory.</li> +</ul> +<p>Last but not least, it comes bundled with <a href="http://gears.google.com/">Gears</a>, i.e. what Google would like you to use for RIAs. That&#8217;s perhaps the only &#8220;subliminal&#8221; message they are trying to send to their users (for now, at least).<br /> +As a matter of fact, nothing prevents them from using Chrome as a way to promote their technology and products. But at the same time nothing prevents a random developer to just fork the project and distribute a <em>neutral</em> and unbranded version of Chrome.</p> +<p>See? Google is not evil at all, it&#8217;s just smarter than others.</p> +<h3>The Bottom Line</h3> +<p>Google showed us once more that their &#8220;innovation&#8221; can be summarized with the following:</p> +<p><em><strong>&#8220;Do not invent new things, just make them better&#8221;</strong></em></p> +<p>They didn&#8217;t invent Internet search: they just made it better and smarted. The same philosophy applies to Chrome, too. Some examples? Sure:</p> +<ul> + <li>They didn&#8217;t create a new rendering engine, they used an existing one</li> + <li>They analyzed Safari&#8217;s neat <span class="caps">GUI</span> tricks and implemented something even better.</li> + <li>They added an IE8-like domain highlight in the <span class="caps">URL</span>.</li> + <li>They got the Firefox&#8217;s AwesomeBar and improved it.</li> + <li>They got Opera&#8217;s Speed Dial and improved it.</li> + <li>They got IE8&#8217;s one-process-per-tab architecture and improved it.</li> + <li>They didn&#8217;t think of a Javascript <span class="caps">JIT</span> first, they just made it widely-available first.</li> + <li>They didn&#8217;t think about merging the address bar with the search bar, Mozilla announced it first, but Google released it before they did.</li> + <li>Safari 4 allows users to create shortcuts for their favorite web apps, but unfortunately it&#8217;s only out for developers&#8230;</li> +</ul> +<p>Google did it, again. Exactly as planned.</p>
A contents/articles/google-earth.html

@@ -0,0 +1,7 @@

+----- +title: Software Review: Google Earth +content-type: article +timestamp: 1134215339 +tags: review|google +----- +Almost every person on Earth has seen an image taken from a satellite at least once in his or her life: now imagine putting all those images together to make a sort of "patchwork world"...this is unfortunately not as simple as gluing atlas maps together, because height, resolution and orientation must be considered. However, "A computer could do all that"...and so it happened!<strong>In the beginning...</strong><br /><br /><br /><a href="http://www.nasa.gov/home/index.html?skipIntro=1">Nasa.gov</a> has always been one of the most famous and most visited websites in history, and among the resources you can find there, besides the pictures of space-related objects and phenomena that everyone flocks to, are satellite pictures of Earth. <br />Perhaps one of the most wonderful things NASA did software-wise was the realization of an open source software called <a href="http://worldwind.arc.nasa.gov/index.html">WorldWind</a>: <em>"World Wind lets you zoom from satellite altitude into any place on Earth. Leveraging Landsat satellite imagery and Shuttle Radar Topography Mission data, World Wind lets you experience Earth terrain in visually rich 3D, just as if you were really there."</em><br />A really cool thing indeed, if you ask me. So cool that people from all over the world started downloading and using it, causing problems on NASA's server for the project, which was extremely busy or even unreachable. The download is now mirrored on Sourceforge, download.com, and Wayne State University, but the server problem has to do with getting to the server to access the images. So why bother downloading if you know it doesn't actually work, regardless of the reason?<br /><br />The alternative, until a year or so ago, was a product created by "Keyhole Corp." - I won't bother posting a link to the site, you'll read why below. Guys from Keyhole basically created a similar program that was much faster, with no server timeouts and better image resolution. Of course, they thought they could charge for it, and I believe that back in the day some people actually paid $70 for what was seen afterwards as a piece of software with a great potential that was never tapped.<br /><br /><br /><strong>Google enters the scene</strong><br /><br />"Hey, look! It works! Now let's get it and do it better!" - This is, in a nutshell, Google's policy in the last 2 years or so: they find relatively small(er) companies that produced something with potential, buy it, and they either improve and resell the product, or give it away for free, getting income from advertising. It happened before, with Picasa and Blogger, for example, and now, with Keyhole as well (for a pretty complete list of Google's acquisitions and possible future targets, have a look <a href="http://www.kuro5hin.org/story/2005/6/12/143721/743">here</a>).<br />This is not a bad thing for the end user, because often new Google-branded products are free or discounted, and Google is happy because it can still make a huge profit from it: if you ask me, that's a much better policy than Microsoft's ("Create something which doesn't work, try to patch it eventually, force people to use it"), at least from a certain point of view.<br /><br />Anyhow, Google <a href="http://www.google.com/press/pressrel/keyhole.html">purchased</a> Keyhole Corp. on October 27th, 2004. The next day, Google said "let's drop Keyhole's price to 30 bucks" - And Google saw that it was good.<br /><br />Then everything went (almost) silent, until June 18th, 2005, seven months and one day since the acquisition of Keyhole, Google officially <a href="http://slashdot.org/article.pl?sid=05/06/28/1733229&amp;from=rss">released</a> a new product, called <a href="http://earth.google.com/">Google Earth</a>. <em>"Thus the heavens and the earth were finished, and all the host of them" [Gen. 2:1]</em><br /><br /><br /><strong>Welcome to a brand new world</strong><br />Pseudo-biblical jokes apart, Google's new Earth can be downloaded and installed FOR FREE! Go and <a href="http://desktop.google.com/download/earth/index.html">get it</a> because it's interesting, but please don't click on the link I provided before because you'll find out that Google won't let you download it, because they got too many requests, so... <br />So that's why, also thanks to Google, I found some <a href="http://www.majorgeeks.com/download4659.html">Major Geeks</a> mirrors and got it from there. The file is 10 MB, so if you have 56K dial-up don't bother, because it needs at least a 128Kbps connection to run correctly. Below are the minimal system requirements, the recommended ones, and what my PC has. As you can see, processor speed actually doesn't matter if you have a good video card and a good Internet connection.<br /><br /><em>Minimal Configuration</em><br /> * Operating system: Windows 2000, Windows XP<br /> * CPU speed: Intel? Pentium? PIII 500 MHz<br /> * System memory (RAM): 128MB<br /> * 200MB hard-disk space<br /> * 3D graphics card: 3D-capable video card with 16MB VRAM<br /> * 1024x768, 32-bit true color screen<br /> * Network speed: 128 kbps ("Broadband/Cable Internet")<br /> <br /><em>Recommended Configuration</em> <br /> * Operating system: Windows XP<br /> * CPU speed: Intel? Pentium? P4 2.4GHz+ or AMD 2400xp+<br /> * System memory (RAM): 512MB<br /> * 2GB hard-disk space<br /> * 3D graphics card: 3D-capable video card with 32MB VRAM or greater<br /> * 1280x1024, 32-bit true color screen<br /> * Network speed: 128 kbps ("Broadband/Cable Internet")<br /><br /><em>h3raLd's crappy PC's Configuration</em> <br /> * Operating system: Windows XP<br /> * CPU speed: Intel? Pentium? PII 350 MHz<br /> * System memory (RAM): 256MB<br /> * 30 GB hard-disk space<br /> * 3D graphics card: nVidia GeForce II MX 32MB VRAM<br /> * 1024x768, 32-bit true color screen<br /> * Network speed: 1240 kbps<br /> <br />I downloaded it, installed it, and it worked fine on my PC. Please note that Google has been pretty specific regarding the compatible OSes, basically only Windows 2000/XP are supported: very old systems (Windows 95/98/Me and alike) and very new systems (Windows Server 2003, X-x64) are not meant to be able to run it. Mac users shouldn't bother trying, while Linux users will be glad to read that it's supposed to work under <a href="http://appdb.winehq.org/appview.php?versionId=3254">wine</a> (rated "bronze").<br /><br />Let's suppose you installed the program and you're running it. If you don't want to try it because you are still unsure if it's worth or not, you can have a look at this <a href="http://newrecruit.org/archives/2005/may/googlekeyhole">article</a>, and in particular at the screenshots. <br />I found it quite easy to use, as are nearly all Google applications; the interface is quite pretty and does the job. You'll immediately notice the main panel where the world and images will be shown, then there's a bottom panel mainly used for navigation, while on the right the three main functions of the program are clearly presented in 3 tabs ("Fly to", "Local Search" and "Directions"), together with two other tabs below for adding/removing details from the map and managing your saved places and results.<br /><br />As it's a Google product, one of the most handy features is the search engine. You can put in a city, town, even street or building, restaurant, or place of interest, and the program should be smart enough to find it and take you there. With the "Fly Now" feature it's possible to just center the view on one place, for example. The resulting map will be at a certain height, depending on what term you searched for. You can now zoom in or out with your mouse wheel or with the buttons provided in the navigation panel, and you'll see the map updating. This is a gradual process and depends mainly on your connection speed, but also the available RAM, the video card, and the processor speed. <br /><br />As it's still a relatively new product, don't expect to find everything... or better, you can find (nearly) everything, but it might not be at the highest resolution, for example, and thus appear blurred on zoom. Currently the USA, the UK, and Western Europe are the places with the most details. In particular, in the major cities of the US you can also see a 3-D re-creation of the buildings which, even though in plain gray, actually reproduce the real shape of the element. <br />Furthermore, in the navigation panel you can also tilt up and tilt down the view! So the end result is a map which is half real and half virtual.<br />If you search for another place, you will not be taken there instantaneously, but instead Google Earth zooms out appropriately and moves around the globe to where the new place is and zooms in appropriately: a really nice effect.<br /><br />Also keep in mind that you can add or highlight details on the map, like grids, roads, names, places to see, restaurants, stadiums, railroads, boundaries and borders, different types of schools, earthquake areas, and - even if the satellite maps used can be up to three years old - statistical data about Cloud Coverage and a lot of other things.<br /><br />The other two functions, "Local Search" and "Directions" allow you, respectively, to perform a search restricted to the area (i.e. Trafalgar Square - London, UK) and get directions between two places, highlighting the suggested path. Also, all places you see can be saved, marked, and printed: wonderful.<br /><br /><br /><strong>Limitations and Opinions</strong><br /><br />As a Beta, Google Earth does come with limitations: as I wrote earlier, only USA, UK, and Western Europe are (almost) fully supported, but you can already get some pretty decent pictures from 200 miles up anywhere in the world. Another limitation is that since the images often come from different satellites, "patches" can be seen sometimes, where part of a picture of an area is darker or lighter than another.<br /> <br />However, you can't really complain about this software, because it's free and obviously Google's server seems to be always available, unlike NASA's. f you want more, Google Earth is available as a Plus edition (20$) and Pro edition (400$), with more <a href="http://earth.google.com/product_comparison.html">features</a> and support. <br />What of Microsoft? Well, Microsoft is said to be planning to "strike back" during this summer, with <a href="http://www.google.com/url?sa=U&amp;start=1&amp;q=http%3A//blog.searchenginewatch.com/blog/050523-125208&amp;ei=hy3EQpqoGcmciALB8vinCw&amp;sig2=ZNIj3_KWXuDMr4_2WmrCNA">MS Virtual Earth</a>, let's just wait and see...<br />
A contents/articles/h3rald-71.html

@@ -0,0 +1,18 @@

+----- +title: Introducing H3RALD.com v7.1 +content-type: article +timestamp: 1225081740 +tags: website|rails +----- +<p>I finally decided to redesign my web site. About 2 years passed since last time and I think this was long overdue: a lot of people liked the black <em>Nitefall</em> theme, but a lot of people found a bit too dark for their liking.</p> +<p>I decided to go for something more <del>boring</del> traditional this time: white background and only black header and footer. I think the new design improves the overall readability of the site, also because this time I kept thing simple:</p> +<ul> + <li>No more sidebars &ndash; Who needs them anyway? Who wants to see my <a href="http://www.delicious.com/h3rald">delicious bookmarks</a> on <em>every single page</em>? Who wants to see that annoying Web 2.0-ish tag cloud listing all the tags I&#8217;ve ever used from 2006 onwards? I suddently realized that the right column was nothing more than wasted space, so I removed it altogether.</li> + <li>No more differentiation between <em>articles</em> and <em>blog posts</em> &ndash; As a matter of fact, I&#8217;m not posting little pointless tidbits everyday, it&#8217;s more likely just once a week or even once a month. When I post though, I tend to make it worthwhile both for me and the readers by writing about something which may interest people, for a change. In short: this may not be a &#8220;traditional blog&#8221; anymore, just a publishing platform for my articles.</li> + <li>No more &#8220;previews&#8221; &ndash; From now on, only the title of each articles is displayed in the home page, in the archives and even when searching. If you want to read an article, all you have to do is click on its title. No more &#8220;Read More&#8221; links.</li> + <li>Just three main pages: <a href="">Home</a>, <a href="/archives">Archives</a>, and <a href="/about">About</a>. Although there may be some more for special projects, at some point.</li> + <li>Use the <a href="/archives">Archives</a> to find my articles. There you&#8217;ll find a list of the 20 most used tags, a search form, and a timeline listing <em>all</em> my articles from 2006 onwards.</li> + <li>Use the tiny palette on the left side of each page to perform common actions like bookmarking, scroll up and down, etc. You can read more about it on the <a href="/about">About</a> page.</li> +</ul> +<p>I hope you like the new design, or at least I hope it makes my articles more readable. However, I&#8217;m open to suggestions, as usual.</p> +<p>P.S.: I dropped with Internet Explorer 6 compatibility According to my stats, less than 5% of my visitors use it, so it&#8217;s not worth the extra hassle.</p>
A contents/articles/h3rald-81.html

@@ -0,0 +1,51 @@

+----- +title: H3RALD.com v8.1 Released +content-type: article +subtitle: Featuring a a brand new newspaper-like design, powered by HTML5 and CSS3 +timestamp: 1285243465 +tags: website|webdevelopment +----- + + <section class="section"> +<p>Just <a href="/articles/take-back-your-site-with-nanoc">over a year ago</a> I released the 8th version of this web site. The biggest change then was abandoning the Rails-powered <a href="http://wiki.github.com/fdv/typo/">Typo</a> blogging platform in favor of <a href="http://nanoc.stoneship.org/">nanoc</a>, arguably the most versatile static site generator out there.</p> +<p>A year later, I am still very happy with nanoc, hence there&#8217;s no need for another major release. Nonetheless, I decided to improve the site&#8217;s overall design and image, making it (hopefully) easier to use and more pleasant to the eye.</p> +<p>I always had a problem finding the right theme for my web site. I always wanted to find something related to the word <em>herald</em>, so in the last release I went for a herandry-oriented theme. For this release, I decided to go for a newspaper-style layout: after all, the word <em>herald</em> is often used in newspaper titles, and I picked the name &#8220;h3rald&#8221; after the <a href="http://global.nytimes.com/?iht">International Herald Tribune</a>.</p> +<p>Also, I was desperate to try out the new features offered by HTML5 and CSS3, and a newspaper layout seemed a good excuse to use columns.</p> +<section class="section"> +<header><h1 id="h_1" class="toc">Browser Compatibility</h1></header> +<p>Although I shouldn&#8217;t really say this, the site is meant to be viewed with a WebKit-based browser, really. It works in other (modern) browsers (read: no IE6), and it degrades more or less gracefully if a particular feature is not supported.</p> +<p>That being said:</p> +<ul> + <li>IE7 and IE8 just barely render it (Javascript is used to &#8220;patch&#8221; the <span class="caps">DOM</span> with the new HTML5 elements)</li> + <li>Firefox 3+ renders pretty much everything right.</li> + <li>Safari and Chrome render the site as it is actually meant to be rendered</li> +</ul> +<p>Nobody ever died from not being able to see CSS3 rounded corners anyhow. The most important thing about this site is its content, and I made sure that whatever browser you&#8217;re using you can still read it.</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Columns and hyphenation</h1></header> +<p>As I previously stated, I couldn&#8217;t wait to try out CSS3 columns so I kinda went crazy on the home page, but just there. Some may argue that they are not suitable for web use of course, but I think they contribute to give the site layout a unique feeling.</p> +<p>The problem with having columns is of course text alignment: justified text looks good, but unless you hyphenate text properly it shows a lot of blank space. Luckily, I discovered <a href="http://code.google.com/p/hyphenator/">hyphenator.js</a>, which solved the problem nicely.</p> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">CSS and layout improvements</h1></header> +<p>I made a point out of improving the old stylesheet to make the site easier to read and generally prettier. Beauty is in the eye of the beholder, but still, I think the new stylesheet brings some improvements, especially concerning text (the <a href="http://scripts.sil.org/gentium">Gentium</a> font is used throughout the site) and syntax highlighting.</p> +<p>Moreover, I worked on streamlining navigations across different sections of the site, in particular on article pages:</p> +<p><img src="/img/pictures/h3rald_81_article.png" /></p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Under the hood</h1></header> +<p>Besides appearence, the new site also features some improvements in its underlying business logic. In particular:</p> +<ul> + <li>Better nanoc <a href="http://github.com/h3rald/h3rald/blob/master/Rules">Rules</a></li> + <li>Improved <a href="/glyph/">Glyph</a> integration, by extending nanoc <a href="http://github.com/h3rald/h3rald/blob/master/lib/glyph_context.rb">RuleContext</a></li> + <li>Minor updates to the custom <a href="http://github.com/h3rald/h3rald/blob/master/tasks/site.rake">Rake tasks</a></li> + <li><a href="http://disqus.com/overview/">Disqus</a> comments</li> +</ul> + +</section> + +</section>
A contents/articles/h3rald-83.html

@@ -0,0 +1,139 @@

+----- +title: H3RALD.com v8.3 Released +content-type: article +subtitle: A new minimalist design, powered by Twitter Bootstrap +timestamp: 1356648094 +tags: website|webdevelopment +----- + + <section class="section"> +<p>One of the many things that really bothered me about my web site was the fact that it didn&#8217;t look good on my iPhone, or any small screen for that matter.</p> +<p>Years ago I <a href="http://www.alistapart.com/articles/responsive-web-design/">read about</a> responsive web design, media queries, etc., but I never had the will or the time to dive into the subject. Then <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a> came out, and it changed <em>everything</em>.</p> +<p>Not only Bootstrap provides a very solid <span class="caps">HTML</span> boilerplate and grid system, it also comes with some very nice and complete styles for every <span class="caps">HTML</span> element, a few Javascript-enhanced UI components, and best of all it is fully responsive.</p> + +<section class="section"> +<header><h1 id="h_1" class="toc">Getting to know Bootstrap & its CSS wizardry</h1></header> +<p>Redesigning H3RALD.com using Twitter Bootstrap turned out to be fairly easy. I headed up to the <a href="http://twitter.github.com/bootstrap/customize.html">Customize and Download</a> page and set a few variables like the font to use (the beautiful <a href="http://aldusleaf.org/crimson.php">Crimson text</a>), the link color and so on, and downloaded the lot.</p> +<p>I more or less completely forgot about my old <span class="caps">CSS</span> stylesheets and went with Bootstrap all the way. I was happy with a lot of the defaults, but I had to add a few rules and overrides for:</p> +<ul> + <li>headings</li> + <li>line heights</li> + <li>A few custom classes I use extensively, like add a <code>text-align: justify;</code> for the <code>hyphenate</code> class.</li> +</ul> +<p>Now, one of the cool things of Bootstrap is that it comes with smart defaults, and that it lets you add specific features to elements simply by adding a <span class="caps">CSS</span> class to them. Take a look at how <a href="http://twitter.github.com/bootstrap/base-css.html#buttons">buttons</a> are constructed, for instance. Normal button? Sure:</p> +<table> +<tr> +<td> +<div class="code"> +<pre> +<code> +&lt;button class="btn"&gt;Click Me!&lt;/button&gt; +</code> +</pre> +</div> +<p></td><td><button class="btn">Click Me!</button></td></p> +</tr> +</table> +<p>That&#8217;s grey with black text. Boring. Want it red? Sure, add the <code>.btn-danger</code> class:</p> +<table> +<tr> +<td> +<div class="code"> +<pre> +<code> +&lt;button class="btn btn-danger"&gt;Click Me!&lt;/button&gt; +</code> +</pre> +</div> +<p></td><td><button class="btn btn-danger">Click Me!</button></td></p> +</tr> +</table> +<p>Too big? No problem, make it smaller with <code>.btn-sm</code>, so we have:</p> +<table> +<tr> +<td> +<div class="code"> +<pre> +<code> +&lt;button class="btn btn-danger btn-small"&gt;Click Me!&lt;/button&gt; +</code> +</pre> +</div> +<p></td><td><button class="btn btn-danger btn-small">Click Me!</button></td></p> +</tr> +</table> +<p>Wouldn&#8217;t it be nice to have a nice icon in it? Add an empty <code>&lt;i&gt;</code> element with a suitable class and there you have a nice <a href="http://twitter.github.com/bootstrap/base-css.html#icons">Glyphicon</a> before the button text (or you can use other icon fonts, like <a href="http://fontawesome.io/">FontAwesome</a>).</p> +<table> +<tr> +<td> +<div class="code"> +<pre> +<code> +&lt;button class="btn btn-danger btn-sm"&gt;&lt;i class="fa fa-check"&gt;&lt;/i&gt; Click Me!&lt;/button&gt; +</code> +</pre> +</div> +<p></td><td><button class="btn btn-danger btn-sm"><i class="fa fa-check"></i> Click Me!</button></td></p> +</tr> +</table> +<p>&#8230;You get the picture. And it works surprisingly well &#8212; if you embrace its philosophy, that is. Just like Rails &amp; Co.: an <em>opinionated</em> framework.</p> +<p>The only thing that bugged me about all this was that by adding smart <span class="caps">CSS</span> classes to elements you&#8217;re actually specifying how something looks like by polluting <span class="caps">HTML</span> code. Granted, if your stylesheet doesn&#8217;t include a <code>.btn-inverse</code> your buttons won&#8217;t automagically become black, but you know what I mean. Although in a very nice way, by following Bootstrap&#8217;s way of doing things you are no longer separating content from presentation. And in the next six months, when I&#8217;ll ditch Bootstrap for something better, all the previews of the code snippets above won&#8217;t work unless I keep using the Bootstrap stylesheet or at least some of its button classes.</p> +<p>The real problems arise for the stylesheets provided for general elements. By default, Bootstrap styles tables with no borders or colors. What if I wanted just ordinary tables to be striped and bordered? Sure, I can add the <code>.table-striped</code> and <code>.table-bordered</code> classes to all tables, and that&#8217;s it. In <span class="caps">EVERY</span> table. Or of course undo bootstrap&#8217;s magic by overriding the <span class="caps">CSS</span> rules for ordinary tables, to include the rules specified for <code>.table-striped</code> and <code>.table-bordered</code>. Copy &amp; paste someone else&#8217;s code? Not nice.</p> +<p>Luckily, using <a href="http://sass-lang.com/"><span class="caps">SASS</span></a> finally paid off, and here&#8217;s how to do it in a nice and tidy way:</p> + +<div class="code"> +<pre> +<code> +@import "_bootstrap.scss"; +/* The bootstrap stylesheet - just changed its extension and prepended an underscore, nothing more */ + +table { + @extend .table; + @extend .table-striped; + @extend .table-bordered; +} +</code> +</pre> +</div> +<p>There you go. All tables (ordinary <code>&lt;table&gt;</code> elements with no silly classes attached) are now bordered and striped.</p> + +</section> + + +<section class="section"> +<header><h1 id="h_2" class="toc">Header & navigation bar</h1></header> +<p>As far as the main site header goes, I decided to use the same one for all pages, containing:</p> +<ul> + <li>The site logo</li> + <li>The search input box (powered by <a href="http://www.google.com/cse/">Google Custom Search Engine</a></li> + <li>A <em>responsive</em> navigation bar with links to all the main sections of the site</li> +</ul> +<p>As far as the navigation bar goes, that&#8217;s pure Bootstrap goodness, nothing new there (except the serif font), <a href="http://twitter.github.com/bootstrap/components.html#navbar">look it up</a>.</p> +<p>For the logo&#8230; Well, I had this nice plan of using just plain <span class="caps">CSS</span> and web fonts to make it (hell, it&#8217;s basically the word &#8220;H3RALD&#8221;, with the 3 slightly bigger and moved a bit). It worked mostly fine (in webkit browser and in Opera), but Firefox didn&#8217;t like it much, and IE&#8230; well, some old versions of IE don&#8217;t play nice with web fonts, so I decided to make a nice <span class="caps">PNG</span> image and stick it there instead. Less hassle, it works everywhere, job done.</p> +<p>The search input box was a bit more of a challenge. I read up on the new <a href="https://developers.google.com/custom-search/docs/element">Custom Search Element Control <span class="caps">API</span></a>, discovered that Google decided that web designers don&#8217;t know Javascript or <span class="caps">CSS</span> nowadays and proposed a new <span class="caps">API</span> that has numerous advantages like:</p> +<blockquote> +<ul> + <li>Easy to use syntax—no JavaScript knowledge required.</li> + <li>Custom Search elements (search boxes and results pages) are rendered based on settings stored on the <span class="caps">CSE</span> servers (along with any client-side customization). Server-side changes don&#8217;t require you to copy and paste any new code into your site<br /> +</blockquote></li> +</ul> +<p>Thanks Google. Now every time I change my stylesheet I have to remember to go back to your page and change the link colors etc. And if I decide to hide the page <span class="caps">URL</span> underneath the link in the results? I can&#8217;t. And that&#8217;s why I decided to reverse engineer their <span class="caps">CSS</span> and provide my overrides. Nasty, but at least I have some control! They&#8217;re all <a href="https://github.com/h3rald/h3rald/blob/master/content/styles/_vendor.scss">here</a>, if you are curious.</p> + +</section> + +<section class="section"> +<header><h1 id="h_3" class="toc">Other minor changes & tweaks</h1></header> +<p>Other changes from the previous design were relatively minimal:</p> +<ul> + <li>No more newspaper-style home page with five columns, two will suffice.</li> + <li>A brand new <a href="/tags/">Tags</a> page, listing&#8230; well, all the site tags that were previously in the <a href="/archives/">Archives</a> pages (now only listing articles by month of publication)</li> + <li>No more Links page. No need for it.</li> + <li>A new, minimalist <a href="/contact/">Contact</a> page, featuring some of the nice <a href="http://zocial.smcllns.com/">Zocial</a> font icons.</li> + <li>No more social buttons on pages. If you use social networks like Twitter, Facebook or Google+ you already know how to share items using bookmarklets or browser extensions. No need to plague my web site with their nasty buttons, badges, ribbons &amp; alike.</li> + <li>No ads! I have a full-time job, my site uses free and open source technologies, and I write because I like to do so, not to make money. And I can afford the few bucks necessary to pay the hosting provider. That&#8217;s why there are NO <span class="caps">ADS</span> on H3RALD.com anymore <sup>(*)</sup>.</li> +</ul> +<p><sup>(*)</sup>: For now, that is. Then I&#8217;ll probably change my mind, but until then enjoy the true no-ads experience!</p> + +</section> + +</section>
A contents/articles/h3rald-v7-overview.html

@@ -0,0 +1,29 @@

+----- +title: Back on Track... +content-type: article +timestamp: 1182515880 +tags: website|rails +----- +<p>&#8230;or better, on <a href="http://www.rubyonrails.org">Rails</a>_. <br /> +Yep, this 7th (!) version of the H3RALD website is powered by the overly-popular Ruby web framework <em>and</em> by the <a href="http://www.typosphere.org">Typo</a> blogging platform.</p> +<p>Nope, I decided not to re-develop my website entirely from scratch this time, although I was tempted to, for three simple reasons:</p> +<ol> + <li>My &#8220;coding time&#8221; is close to non-existent nowadays, and even with a framework like Rails re-developing a site from scratch would have taken at least <em>some</em> time, which at the moment I don&#8217;t have.</li> + <li>Typo is a fairly robust and feature-rich blogging platform, and after learning a little bit of Rails I could customize it to my needs straight away. URLs didn&#8217;t break thanks to Rails&#8217; routing system, migration was easy enough, and developing the missing bits (like a rudimentary BBCode parser and a TextLinkAds sidebar) wasn&#8217;t hard at all.</li> + <li>I wanted to take a break from my site, not code it again.<br /> +<em>Fair enough, but why the new site anyway?</em></li> +</ol> +<p>Again, there&#8217;s more than one answer:</p> +<ul> + <li>Lately I didn&#8217;t feel comfortable sporting a Cake-powered website \- that makes sense, to an extent, right? Good.</li> + <li>I got fed up with spam. I wanted to re-open comments but I didn&#8217;t want to implement spam protection for the old site.</li> + <li>To be totally honest, I got fed up with <span class="caps">PHP</span> itself as well, after trying out Ruby for a few days and ordering and reading the 2nd edition of the <a href="http://www.pragmaticprogrammer.com/titles/ruby/">PickAxe</a>, which I <em>highly</em> recommend.</li> +</ul> +<p>&#8230;But let&#8217;s say something about what&#8217;s new in this new release, shall we?</p> +<ul> + <li>A new, black (and red) theme. Something completely different. Probably not that good, but quite useful: Every day I check my site from my laptop at work, and if it looks like a big black blob I know that I have to regulate my monitor. I showed it to my parents on their old monitor, and they realized that perhaps it&#8217;s time to buy an <span class="caps">LCD</span> one&#8230;</li> + <li>Comments, trackbacks, desktop client support, theme support, a cool admin area and everything else Typo offers.</li> + <li>Full <span class="caps">RSS</span> feeds. With no ads. So you don&#8217;t need to see this black blob anymore, if you really don&#8217;t like it.</li> + <li>No projects or bookmarks, just my blog and my articles. Let&#8217;s keep it simple.</li> +</ul> +<p>More to come&#8230;</p>
A contents/articles/hastyscribe.md

@@ -0,0 +1,173 @@

+----- +title: Introducing HastyScribe +content-type: article +subtitle: A simple command-line application to generate self-contained HTML documents +timestamp: 1405881092 +tags: writing|hastyscribe|opensource +----- + +Did you ever have to write a document, but didn't want to (or couldn't) use MS Word or another WYSIWYG word processor? Yep, I agree: that's what [Markdown](https://daringfireball.net/projects/markdown/) is for. + +Luckily, there are a lot of editors that support Markdown out there (I just installed [MacDown](http://macdown.uranusjr.com/) myself), and they work great, most of the time. Unfortunately though, they often: + + * Generate [HTML](class:caps) _fragments_ instead of full documents + * Don't include a proper stylesheet + * Generate more than one file + +The last one on the list in particular, is true for all of them: the stylesheet may be embedded in the document, but if you want to use images, they are managed as separate files; and the same thing happens if you want to use custom fonts. That's how [HTML](class:caps) works, after all... right? Nope. + +The [Data [URI](class:caps) Scheme](http://en.wikipedia.org/wiki/Data_[URI](class:caps)_scheme) can be used to include data inline inside web pages. This means that the **src** attribute of an **img** can be set to a data [URI](class:caps) containing _the full image_ encoded in base64 instead of a traditional [URL](class:caps). It turns out that you can actually use data [URI](class:caps)s even in [CSS](class:caps) files, for example to embed web fonts instead of linking to the usual .woff, .ttf, .otf etc. &ndash; The only downside is that Internet Explorer 8 only supports data [URI](class:caps)s for images, and only up to 32,768 characters. But luckily these limitations are no longer present in IE9+. + +Anyhow, back to writing documents. Having read a bit about data [URI](class:caps)s and after doing a few tests with all major browsers I thought of creating a program that would: + + * parse markdown and generate [HTML](class:caps) code + * automatically embed all images in the [HTML](class:caps) files + * include a _gorgeous_ stylesheet, with beautiful fonts and awesome icons. + +That's how the concept behind [HastyScribe](/hastyscribe/) was born! + +(Note: my wife actually came up with the name HastyScribe &ndash; I am totally useless when it come to naming programs) + +### The Ingredients + +The first I decided was _not_ to create a GUI for this program. I wanted a command-line utility, and I wanted it to be also self-contained and cross-platform. I am a big fan of [Fossil](http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki) and [SQLite](http://www.sqlite.org/), and I wanted my utility to be tiny, have no dependencies, and run on both my Mac and my Windows computers (and on Linux of course, why not!). + +#### Nim Programming Language + +So I picked a programming language suitable to the task. The winner was [Nim](http://nim-lang.org/), because: + + * It is very elegant and very expressive, like a high-level programming language + * It generates C code that can be compiled on many platforms + * It produces very small executables + * It can work with existing C libraries + * My C is more than a bit rusty, but yes, someone else could have used C for this + * I really, really wanted to try building something with Nim + +#### Discount Markdown Library + +Then I went shopping for a Markdown library. At the time there weren't any in Nim, so I went looking for one implemented in C that I could use with Nim. I chose [Discount](http://www.pell.portland.or.us/~orc/Code/discount/) because of the unique features it offered compared to the competition, especially two of them: + + * Pseudo-protocols, e.g.: `[some text](class:some-class)` &ndash; useful to add a class to an inline element) + * Class blocks: <q>A blockquote with a first line of `> %class%` will become `<div class="class">` instead of a `<blockquote>`.</q> + +I know. I _know_. Those things are an insult to the very phylosophy of Markdown! Err... no, actually. I think David Parsons did an amazing job of adding those functionalities in a way that actually works really well with the rest of Markdown syntax. And besides, no one else had an alternative for class blocks (which are necessary to format things like notes or sidebars). + +#### Fonts! + +Next, I spent a considerable amount of time looking for suitable fonts. I wanted my utility to generate nice-looking documents, and therefore good fonts are essential. + +In the end, my choices were: + +* [FontAwesome][fa], the most obvious choice for all the icons. +* [Mr Bedfort](http://www.google.com/fonts/specimen/Mr+Bedfort), used as the base for the <span class="hastyscribe"></span> logo. +* [Source Sans Pro](https://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&code=1959) and [Source Code Pro](http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&code=1960), for all standard text and source code. + +[fa]:http://fortawesome.github.io/Font-Awesome/ + +### Developing HastyScribe + +The first thing to do was to make Discount work with Nim. It turned out to be relatively easy to do, because the Nim compiler calls a C compiler (clang or gcc, typically) after compiling Nim code to C, and the compiler call can be configured to link static C libraries to produce a single executable file. Just what I wanted. + +#### Compiling Discount + +So, compiling Discount (with all the options I needed to handle all the extra Markdown extensions) consists in running configure & make: + +> %terminal% +> ./configure.sh --with-tabstops=2 --with-dl=both --with-id-anchor --with-github-tags --with-fenced-code --enable-all-features +> +> make + +Easy peasy on my Mac (and I suspect on Linux too), on Windows as usual I ran into a couple of issues, but nothing huge. First of all you need [MinGW](http://www.mingw.org/), and in particular gcc and make. You can probably compile Discount with something else, but I felt more comfortable with MinGW anyway. + +The one thing I had to fix after running configure was on line 8 of mkdio.h &ndash; I had to change the following line: + +<pre><code class="c">typedef @DWORD@ mkd_flag_t; +typedef unsigned long DWORD; +typedef DWORD mkd_flag_t;</code></pre> + +There's probably a better way to go about this, but it did the trick and I got my **libmarkdown.a** both on Windows and then on Mac. I do have a Ubuntu machine at home but I hardly use it nowadays (I am normally happy with just my [Raspberry Pi](http://www.raspberrypi.org/) running Arch Linux ARM &ndash; but Nim doesn't run on ARM as far as I know). + +#### markdown.nim + +Next, I needed to be able to access Discount API to: + + * compile Markdown code into an [HTML](class:caps) fragment + * generate a Table of Contents automatically + * parse the Pandoc-style document headers (title, author, date) supported by Discount + + So I armed myself with [c2nim](https://github.com/h3rald/hastyscribe/blob/master/hastyscribe.nim) a handy little utility that can be used to convert C code into Nim. In practice, it is very handy for converting simple things like .h files, so I tried it on **markdown.h**. + + Didn't work in a totally automatic way, but it got me far enough that I could handle fixing the remaining bits, mostly consisting in name clashes due to Nim's rather unusual case-and-underscore-unsensitiveness and in a few pragmas to add here and there (`{.push importc, cdecl.}` at the start, for example). + +I also added two high level `md` functions that basically can generate an [HTML](class:caps) document with or without document headers. Here's one of them: + + proc md*(s: string, f = 0, data: var TMDMetadata): string = + var flags = uint32(f) + # Check if metadata is present + var lns = s.splitLines + var valid_metadata = false + var offset = 0 + if (lns[0][0] == '%') and (lns[1][0] == '%') and (lns[2][0] == '%'): + valid_metadata = true + else: + valid_metadata = false + if lns[0][0] == '%': + offset = 2 + if lns[1][0] == '%': + offset = 3 + var str = cstring(lns[offset..lns.len-1].join("\n")) + var mmiot = mkd_string(str, cint(str.len-1), flags) + if valid_metadata: + data.title = $mkd_doc_title(mmiot) + data.author = $mkd_doc_author(mmiot) + data.date = $mkd_doc_date(mmiot) + discard mkd_compile(mmiot, flags) + if (int(flags) and MKD_DOTOC) == MKD_DOTOC: + var toc = allocCStringArray([""]) + discard $mkd_toc(mmiot, toc) + try: + data.toc = cstringArrayToSeq(toc)[0] + except: + data.toc = "" + var res = allocCStringArray([""]) + discard mkd_document(mmiot, res) + result = cstringArrayToSeq(res)[0] + mkd_cleanup(mmiot) + return + +Anyhow, I managed to create a working [markdown.nim](https://github.com/h3rald/hastyscribe/blob/master/markdown.nim) that can be used as any other Nim library (provided that libmarkdown.a is available at compilation time). + +#### hastyscribe.nim + +Writing the code for HastyScribe itself wasn't too hard (Discount does all the heavy-lifting, let's be honest). + +At the beginning of [hastyscribe.nim](https://github.com/h3rald/hastyscribe/blob/master/hastyscribe.nim) you'll find a few `slurp`s &ndash; that yummy Nim proc is what's needed to physically embed all the assets in the executable, and that's why HastyScribe does not need any stylesheets or fonts lying around. + +For the implementation of the snippet functionality and for converting fonts and images into base64 to create the data [URI](class:caps)s I used Nim's [pegs](http://nim-lang.org/pegs.html) module. I chose this module simply because the [regular expression](http://nim-lang.org/re.html) module is an _impure_ (as in "not completely Nim code") module and requires PCRE as a dynamic library and... well, yes, it's the same self-contained obsession thing again, you guessed right. + +Anyhow, the pegs module did a great job with the snippet and image tag parsing. I didn't really even try to integrate this extra parsing within the Markdown code parsing done by Discount, and... well OK, I currently do two separate parsing passes: one before parsing Markdown, to parse snippets, which can therefore contain Markdown code, and another one after the Markdown code has been converted to [HTML](class:caps), to replace standard image (relative) URLs with data [URI](class:caps)s (no, I don't auto-download and convert remotely-hosted images... not yet anyway, so patches are welcome!). + +#### The stylesheet! + +Honestly, the Nim coding part wasn't the longest part of the development phase. If you look at the code stats on Github for the [HastyScribe](https://github.com/h3rald/hastyscribe) repository, it breaks down to the following: + + * Shell: 0.2% + * Nim: 17.1% + * [CSS](class:caps): 82.7% + +Yep. Most of the code is [CSS](class:caps) ([LESS](http://lesscss.org/) actually), and it did take a while to get it right. I used [normalize.css](http://necolas.github.io/normalize.css/) to start with, and I used part of the [FontAwesome][fa] LESS sources as well for the icon classes. The rest is all mine &ndash; but I did look for inspiration in GitHub's own stylesheet for the layout of notes and sidebars. + +I am happy enough with the result, but of course patches are more than welcome. + +Oh yes, and if you are looking for a cross-platform app to compile your LESS stylesheet and merge them automatically, try [Koala](http://koala-app.com/), it's a nice application that can combine and minify both [CSS](class:caps) and Javascript, it's cross-platform (written in Ruby I believe), open source, fun and easy to use, and works very well. + +### Conclusion + +And this is how HastyScribe was born. I have been using it for a few months (the development version) and I spent a lot of time perfecting it, adding features, and improving the stylesheet. + +It is something I needed myself desperately because I always wanted something able to create pretty documents out of Markdown files and that I could use both at work (on Windows) and at home (on OSX). I believe it fills a very specific niche and it will *not* therefore replace your Markdown editor/compiler any time soon &ndash; but if you are in a hurry and don't have time to spent hours creating a stylesheet that works for your needs, maybe this can help. + +An example document? Sure, here's the official [HastyScribe User Guide](/hastyscribe/HastyScribe_UserGuide.htm) (and here's the corresponding [source file](https://raw.githubusercontent.com/h3rald/hastyscribe/master/doc/HastyScribe_UserGuide.md)). + +If you're interested in giving HastyScribe a try, head over to the [project page](/hastyscribe/) and grab it. The pre-compiled binaries are only for Windows and Mac, but I think Linux/BSD/\*nix enthusiasts won't have any trouble compiling Discount and HastyScribe from source anyway! +
A contents/articles/herald-vim-021.html

@@ -0,0 +1,15 @@

+----- +title: herald.vim 0.2.1 released +content-type: article +timestamp: 1258029269 +tags: programming|vim +----- +<p style="float:right;"><img src="/images/herald.vim/0.2.1_release.png" alt="" /></p> +<p><span class="dropcap">I</span> just updated the <a href="/herald-vim-color-scheme/">Herald Vim color scheme</a> to improve the readability of delimiters and search results.</p> +<p>Delimiters are now red (the same color as operators) instead of yellow, so that you can tell the start and end of a string or regular expression more easily. Additionally, search results are no longer highlighted with black text on an orange background for two reasons:</p> +<ul> + <li>the orange background is a bit too strong</li> + <li>the black foreground causes letters to become <em>completely hidden</em> by the <em>cursorline</em> and <em>cursorcolumn</em></li> +</ul> +<p>Search results now have a gray background and a yellow background, as shown in the screenshot on the right.</p> +<p>If you have any constructive suggestion on how to improve this color scheme, don&#8217;t hesitate to add a comment to this post!</p>
A contents/articles/herald-vim-color-scheme.html

@@ -0,0 +1,31 @@

+----- +title: Herald (Vim Color Scheme) +content-type: article +subtitle: My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors! +popular: true +timestamp: 1245211860 +tags: programming|vim +----- +<p>I use <a href="http://www.vim.org">Vim</a> a lot. It&#8217;s my editor of choice when I code (mainly in Ruby), and also when I write my blog post and articles (mainly in Textile).</p> +<p>One thing I always liked about Vim was it powerful syntax highlighting: there&#8217;s probably a syntax highlighting file for every programming language ever created, even the new ones (<a href="http://force7.de/nimrod/index.html">Nimrod</a>? Sure, <a href="http://www.vim.org/scripts/script.php?script_id=2632">here</a>!).</p> +<p>Furthermore, Vim allows you to create color schemes, and that&#8217;s surprisingly easy to do. Everything you need to do is in the <a href="http://vimdoc.sourceforge.net/htmldoc/syntax.html">docs</a>, but that may put you off, so you can just start by editing an existing one &#8212; that&#8217;s what I did.h3. InfiniteRed Black</p> +<p>I&#8217;ve been using the <a href="http://blog.infinitered.com/entries/show/8">ir_black</a> color scheme for near enough a year. It&#8217;s an excellent color scheme, recommended especially for writing Ruby code:</p> +<p><img src="/images/herald.vim/ir_black_vim_example.png" alt="" /></p> +<p>I honestly thought this was the best Vim color scheme until I discovered Moria&#8230;</p> +<h3>Moria</h3> +<p>Recently I switched to <a href="http://www.vim.org/scripts/script.php?script_id=1464">moria</a>, mainly because I find it easier on the eyes. It&#8217;s a matter of taste, of course:</p> +<p><img src="/images/herald.vim/moria_vim_example.png" alt="" /></p> +<p>The trick is in the background: it&#8217;s not completely black. Still, I didn&#8217;t quite like the colors, so I decided to write my own&#8230;</p> +<h3>Herald</h3> +<p>Meet <strong> <a href="/files/herald.vim">herald.vim</a> </strong> (this is a direct link to the raw file, but you may also want to check my <a href="http://github.com/h3rald/stash/tree/master">stash</a> on GitHub or the <a href="http://www.vim.org/scripts/script.php?script_id=2684">script page</a> on Vim.org):</p> +<p><img src="/images/herald.vim/herald_vim_example.png" alt="" /></p> +<p>To sum up, here&#8217;s the <em>features</em> offered by this new color scheme:</p> +<ul> + <li>It&#8217;s easier to differentiate syntax elements; in particular reserved words like <code>if</code> or <code>end</code>, constants (symbols) and identifiers (instance variables).</li> + <li>Operators are highlighted and easier to notice.</li> + <li>Dark gray background and black column/row selectors.</li> + <li>Added highlight for titles (useful for Textile)</li> + <li>Comments do not stand out, unlike in most color schemes</li> + <li>Support for 256 color terminal (special thanks to <a href="http://www.frexx.de/xterm-256-notes/">Wolfgang Frisch</a> for providing all the info and tools required)</li> +</ul> +<p>So what do you think? Is it tool colorful perhaps? How would <strong>you</strong> improve it?</p>
A contents/articles/hlrb-review.html

@@ -0,0 +1,67 @@

+----- +title: Book Review: Humble Little Ruby Book +content-type: article +timestamp: 1191383580 +tags: ruby|review|books +----- +<p>After reading the very first paragraph of Mr. Neighborly&#8217;s <a href="http://www.humblelittlerubybook.com/">Humble Little Ruby Book</a> (<span class="caps">HLRB</span> for short, from now on) it was very clear to me that it was going to be quite an unconventional read:</p> +<blockquote> +<p>&#8220;Yes, there is a Chapter 0. There is a little bit of introductory stuff we need to talk about before <br /> +we set you loose on Ruby. You wouldn&#8217;t want to get psyched about a new gadget, get it home, <br /> +and then figure out you need batteries, a grapefruit, and the ability to speak three languages to <br /> +even open the box would you?&#8221;</p> +</blockquote> +<p>That reminded me immediately of <a href="http://poignantguide.net/ruby/">Why&#8217;s Poignant Guide to Ruby</a>. without a doubt. I don&#8217;t know how it is possible that two witty, crazy, and very inventive guys grew fond of the same programming language. Anyhow, to reassure a few of you, you won&#8217;t find any foxes or chunky bacon cartoons in <span class="caps">HLRB</span>, just some very well made (although still pretty unconventional) diagrams like this one:</p> +<p><img src="/files/hlrb_diagram.png" alt="" /></p> +<p>Got the picture? Good. Let&#8217;s move on&#8230;h3. Chapter 0: What&#8217;chu talkin&#8217; &#8217;bout, mister?</p> +<p>Chapter 0 is like an introduction to the book <em>and</em> a place to put all the boring stuff you have to talk about in a book about a programming language:</p> +<ul> + <li>What is Ruby?</li> + <li>Installation procedure (on Windows, Mac OS X and Linux)</li> + <li>Hello, World!</li> +</ul> +<p>Yes, you can skip this one safely without losing too much, unless of course you still need to install Ruby on your machine.</p> +<h3>Chapter 1: Welcome to Ruby.</h3> +<blockquote> +<p>&#8220;This section aims to introduce the syntactic sugar and linguistic misfortunes of Ruby in the <br /> +quickest manner that will still allow for a full education on the subject.&#8221;</p> +</blockquote> +<p>As the first two lines of this chapter say, it&#8217;s time to learn the basics of Ruby. You&#8217;ll be quickly guided through strings, numbers, collections and variables. Every section with tons of code examples for your to play with. You won&#8217;t find a full list of all the 876 methods of the String class, but you&#8217;ll certainly learn the 10 most common ones at least (numbers are random, so no, don&#8217;t count them). <br /> +Sure, yes, right, whatever&#8230; <em>if you really want</em> you can skip this chapter too, but if you are already a Ruby Guru there&#8217;s probably no need for you to read books about Ruby, right? Beginners need to read this chapter. It&#8217;s compulsory, really, and pretty enjoyable, too.</p> +<h3>Chapter 2: Break it down now!</h3> +<p>Or &#8220;learn how to segment your code&#8221; using methods, and&#8230; blocks &amp; <code>Proc</code> objects! Gosh. Our poor newbies will probably have a heart attack if they never heard about blocks and closures before. I almost got scared myself, because this is normally regarded as a pretty tough topic. Despite, at page 25 of the book you&#8217;ll have to face your fears and dive into it. You&#8217;ll survive, anyway.</p> +<p><strong>Purist Warning:</strong> Please be aware that sometimes the author may decide to use certain terms and construct which may not sound 100% right to your ears. Just move on, beginners will understand more things like <em>&#8220;Think of Proc objects as blocks that are pushed into variables.&#8221;</em> than anything else, guaranteed.</p> +<p>After this section you&#8217;ll finally be introduced to Ruby classes. Now, this can piss someone off, no doubt. Ruby is a <em>fully OO language</em>, so people <em>must</em> learn about classes before anything else. I must admit I was a bit confused by the ordering of the topics at first, but if someone comes from a non-OO background he&#8217;ll probably find this particular order more suitable. <br /> +This section will cover class and object basics in Ruby like defining classes, instantiating objects, access control, methods, attributes, scope, duck typing. Finally, you&#8217;ll briefly look into modules as well.</p> +<h3>Chapter 3: Hustle and flow (control)</h3> +<p>Finally, the author will deal with flow control. So things like <code>if</code>, <code>case</code>, conditional operators, loops and statement modifiers. In my opinion this section is truly excellent: it introduces all the control structures in a very simple and crystal clear way, often using flowcharts. A great chance even for absolute beginners to understand these basic but powerful concepts.<br /> +Towards the end of the chapter, you&#8217;ll also learn how exceptions work: a clever way to tell people &#8220;you have to learn how to use exceptions from the very beginning&#8221;. Really nicely done.</p> +<h3>Chapter 4: The system beneath&#8230;</h3> +<p>Here comes the juicy stuff. Up to now you learnt the usual boring things you need to know when learning a new programming language, now finally you learn how to do <em>real things</em>. The chapter is full of complete and meaningful code snippets which will answer nearly all the questions you may have (at this time):</p> +<ul> + <li>How do I read and write to a file?</li> + <li>How do I handle threads and processes?</li> + <li>How do command-line parameters and environment variables work?</li> + <li>How can I perform specific Windows-only operations, like reading and writing to the Registry? What about <span class="caps">OLE</span> automation?</li> +</ul> +<p>Some of the big books out there will not spend too much time talking about Windows-only libraries, but I found <span class="caps">HLRB</span> gives quite a comprehensive introduction about them.</p> +<h3>Chapter 5: Looking beyond home</h3> +<p>More juicy stuff. If you are looking for a tutorial to learn the basics about networking, from from sockets to <span class="caps">FTP</span> to <span class="caps">POP</span> and web services, look no further: this chapter does a very remarkable job introducing various network-related libraries, with the usual well written code examples.<br /> +If that&#8217;s still not enough, you&#8217;ll also have a chance to explore the wonderful world of distributed Ruby and of databases. Granted, this chapter won&#8217;t tell you about the 1567 methods available in ActiveRecord (buy a copy of <a href="http://www.pragmaticprogrammer.com/title/rails/">Agile Web Development with Rails</a> for this), but will tell you enough to get started.</p> +<h3>Chapter 6: It&#8217;s a Library!</h3> +<p>The final chapter will go more in depth on some more advanced topics, like:</p> +<ul> + <li>Strings</li> + <li>Regexp</li> + <li>Date &amp; Time</li> + <li>Hashing and Cryptography</li> + <li>Unit Testing</li> +</ul> +<p>Everything with more and more useful code snippets.</p> +<h3>The Appendices</h3> +<p>Last but not least, a <span class="caps">HUGE</span> collection of links and resources to learn more about Ruby, and a quick digression on C/C++ extensions&#8230; not much, but enough to wet your appetite.</p> +<h3>The bottom line</h3> +<p><span class="caps">HLRB</span> is not <em>the only</em> book you need to read about Ruby. It&#8217;s better to make this clear otherwise I&#8217;ll be hunted forever by Dave Thomas, Chad Fowler, <span class="caps">DHH</span> and all the other excellent Ruby hackers who also wrote very successful books (which I bought as well). <span class="caps">HLRB</span> is <span class="caps">LITTLE</span> and <span class="caps">HUMBLE</span>, after all: it doesn&#8217;t aim at becoming the official Ruby Bible anytime soon (although a bird told me it may get updated <em>someday</em> and include more stuff), but it is still a worthwhile reading.</p> +<p>And of course I came to the very end of this review without mentioning the most important thing: this little wonder is free. All you need is to register to InfoQ (for free) and grab your <a href="http://www.infoq.com/minibooks/ruby/">free copy</a>. If you want you can buy a printed copy for just $9.95, if you feel in a good mood (please do).</p> +<p>The most obvious strengths of this book are the abundance of code examples and very useful working snippets, and the unconventional style which makes it very readable and not boring at all. If I were to name some of its weaknesses (but only if you force me to), I&#8217;d say some parts should be expanded and more info on other libraries should be provided&#8230; but you never know what the future will bring us!</p> +<p>Well done, <a href="http://www.jeremymcanally.com/">Mr. Neighborly</a>!</p>
A contents/articles/holiday-house-for-rent.html

@@ -0,0 +1,12 @@

+----- +title: Holiday house for rent +content-type: article +timestamp: 1240530840 +tags: personal +----- +<p><img src="/images/sessarego/outside.jpg" style="float:left; border: 1px solid #B80000; margin-right: 10px;" /></p> +<p>Part of my family house in the countryside is now available for rent! It&#8217;s located in the small village of <a href="http://italia.indettaglio.it/eng/liguria/genova_bogliasco_sessarego.html">Sessarego</a>, a few minutes away from the coast, on the Italian Riviera.<br /> +We&#8217;ve been living there recently for 6 months when I started working and then moved to the city in order to be nearer to my workplace, but we still go there on holidays or on the odd week end, sometimes.</p> +<p>The house is fully furnished, it has been recently renovated, and offers all major comforts and services (utilities, TV, internet, phone, etc.). It can be ideal as a holiday house for writers, programmers, or anyone who would like to take a break from the chaotic city life without giving up all the commodities of modern life, such as the Internet.</p> +<div style="padding: 30px"></div> +<p><strong>For more information, see <a href="/holidays">this page</a> and feel free to <a href="/about">contact me</a> if you want to book your stay or you needmore details!</strong></p>
A contents/articles/ie-lovers-guide-to-firefox.html

@@ -0,0 +1,7 @@

+----- +title: An IE Lover's Guide to Firefox +content-type: article +timestamp: 1132940820 +tags: ie|firefox|microsoft|firefox|browsers +----- +This is an attempt to explain to Internet Explorer users what Mozilla Firefox is, what its features are and how it can be enhanced or customized. Although this article is written primarily for IE users, it will make interesting reading for any Firefox user who wants to try to convince even the most hopeless IE fan to adopt Firefox for everyday use. <br /><strong><span style="text-decoration:underline;">My Point of View</span></strong><br />After using Mozilla Firefox for at least 2 years, I must admit two things: I'm biased towards Firefox, and I just about forgot what IE is like. When you ask someone who's been using Firefox for a while why he likes it, he would probably say something like, "because Firefox is much better than IE." Then he would start boasting about Firefox's features, like tabbed browsing, security improvements, popup blocking, extensions and so on, without thinking that maybe an accustomed IE user would be overwhelmed by all these new things, and in the end, might become even more obstinate in using IE. <br /><br />From here on, I'll play the part - for teaching purposes only, of course - of an Internet Explorer lover: IE is the only browser I've ever tried, and it is the only thing you need to surf the Net. I also talked with some IE users I know and I actually opened the browser myself (once again, for teaching purposes), and visited some sites. <br /><br />Why not have a real IE Lover write this article? Well, I thought about it, actually, and the only answer I could come up with was: there's no such thing as an 'IE lover', only a lot of people who are too used to IE to want to switch to Firefox. So, I'd better write this all myself; after all, a long time ago, I was just like those people.<br /><br /><br /><strong>IE: I've used it for years and it does the job</strong><br /><br />When I bought my computer from my favourite retailer, I immediately asked him: "Can I go on the Internet with it? Do I need to buy any particular program to visit websites?" and I was told that I didn't need anything at all, because it was all included in <em>Windows XP</em>. I just had to click on the start button and choose "Internet" from the pop-up menu. "Straightforward," I thought. "Anybody can do that!"<br />I soon noticed that to browse the Internet, Windows used a program called Internet Explorer 6, which was actually part of the whole Windows infrastructure, somehow: it's the same thing, more or less, that I use to view directories on my hard drive, just online. This is the way it should be - so tightly integrated with the operating system that you hardly notice its presence!<br /><br />After a while, I learned some more about Internet Explorer, and I noticed that a lot of other applications could be integrated into it, like download managers and <a href="http://www.adobe.com/products/acrobat/readstep2.html">PDF viewers</a>. I also discovered that I could even <a href="http://www.microsoft.com/windows/windowsmedia/mp10/default.aspx">listen to music and watch videos</a> through my browser, directly from webpages.<br /><br />Then I discovered toolbars - and I wasn't entirely happy about them. I installed <a href="http://toolbar.google.com/index_2">Google Toolbar</a>, and I really enjoyed its features, but I noticed that some other toolbars seemed to be installed, even if I didn't want to: I think some other program asked me to install them or something; I don't really know. All I do now is just set Internet Explorer not to display them, and change my starting page back to what I want, because sometimes, for some reason, IE starts with a different page than what I want.<br /><br />All that aside, what I really like about IE is that I can use it for anything and everything, even updating Windows! Microsoft has another cool technology called ActiveX which allows me to download and install Windows security patches and upgrades automatically!<br /><br />I really don't understand how people can run an operating system other than Windows: the Web was <strong>made</strong> for Internet Explorer! It's even <a href="http://www.microsoft.com/mac/products/internetexplorer/internetexplorer.aspx?pid=internetexplorer">available for Macintosh</a>. <br /><br />A friend of mine told me he started using another browser called "Firefox" or "Firebird" or something, and he really likes it! He said it can be used on Windows, Macintosh, Linux, Solaris, and Unix, but when I asked him why it was so good, he told me, "Because it's better, and IE sucks." <br /><br />I don't understand how he can say that, especially because everyone I know uses Internet Explorer, Bill Gates made loads of money out of it, so it can't be that bad! Anyhow, I decided to give this Fire-thingie a shot.<br /><br /><br /><strong><span style="text-decoration:underline;">Face to Face with a Fox</span></strong><br />My friend told me to download this thing from a <a href="http://www.mozilla.org/products/firefox/">website</a>, because it's free. So what? IE is free, too, because it came with my PC. Anyhow, I figured I'd just go and download it so he'd leave me alone about it. I read that Firefox - that's its name - is a free browser developed by the <a href="http://www.mozilla.org">Mozilla Foundation</a> which has received a lot of <a href="http://www.mozilla.org/press/awards.html">awards</a> from various well-known computer-related websites and institutions. It also seem to have a promotional <a href="http://www.spreadfirefox.com/">website</a> that says it has been downloaded nearly seventy million times! All the geeks seem to use it, and they love it. Maybe it's really good, or maybe they just don't like Microsoft. <br /><br />When I ran Firefox for the first time, Internet Explorer warned me that it couldn't verify the authenticity of the download, or something like that, but it says that all the time when I download stuff.<br />The first thing that happened was that I was prompted to import my favourites from Internet Explorer. Great! I didn't want to lose all the sites I have had bookmarked for years. So far, so good.<br /> <br />There were no XP-related icons at all, just some weird ones I didn't like, especially the "Home Page" icon. It sucks compared to the one in IE. It doesn't integrate with Windows; it's just another application for browsing websites, like that <a href="http://www.netscape.com">Netscape</a> thing my friend made me try a few years ago. That at least had an email client and other things included with it. <br /><br />Firefox isn't worth the hassle: my favourite websites look "broken" and the thing is continuously complaining about plugins to view some pages. Some websites even tell me off now because I'm not using IE, in particular Microsoft, which doesn't let me update <a href="http://v4.windowsupdate.microsoft.com/en/thanks.asp?">anymore</a>. I switched back to IE after a few minutes of pointless struggle. <br /><br /><br /><strong>Here's What You Get</strong><br />Firefox and IE are two very different things, and I didn't like that, but I admit I had some prejudices, maybe because of the fact that my friend told me to download something and said it was better, and it really wasn't. So I decided to give both him and Firefox a second chance, and I asked him to explain to me why Firefox is better than Internet Explorer. <br />The first thing he mentioned was the different terminology used by the two browsers, which can be summarized as follows:<br /><code><br />| Internet Explorer | Firefox |<br />| Internet Options | Options |<br />| Temporary Internet Files | Cache |<br />| Favorites | Bookmarks |<br />| Address Bar | Location Bar |<br />| Refresh | Reload |<br />| Links Bar | Bookmarks Toolbar |<br />| Explorer Bar | Sidebar |<br />| Copy Shortcut | Copy Link Location |<br />| Save Target As | Save Link As |<br /></code><br />and that once you get used to the new terms, finding what you're looking for is easier than in Internet Explorer. <br /><br />My friend also said a new feature implemented by Firefox is <em>popup blocking</em>. So I told him that as of Service Pack 2, even Internet Explorer blocks popups (and before that, so did my Google Toolbar) but apparently Firefox had this feature long before Microsoft did. Good to know, but not really impressive.<br />What was more interesting was that Firefox lets you type in whatever you want in the Location bar, even if it's not a Web address, and you will still get the most relevant page available: for example, typing "firefox" takes me to <a href="http://www.mozilla.org/products/firefox/">http://www.mozilla.org/products/firefox/</a>. This is accomplished through Google's "<a href="http://www.google.com/help/features.html#lucky">I'm Feeling Lucky</a>" feature. IE doesn't do this: it gives me a search page for what I typed, or it tries to 'guess' the domain by adding a .com or .net after the word.<br /><br />Firefox still didn't really impress me: some nice tricks, but nothing that would make me want to switch. What started to make the difference was the <strong><em>Tabbed Browsing</em></strong> feature: I knew about it already, because IE started implementing that through the <a href="http://toolbar.msn.com/">MSN toolbar</a>, but it's a bit<a href="http://weblogs.mozillazine.org/asa/archives/008312.html">buggy</a>, so I didn't even try it. Firefox has had this feature since its very first <a href="http://www.mozilla.org/products/firefox/releases/0.1.html">release</a>, so I guess it they represents a fully-functional, stable, and key feature of the browser. Tabbed browsing introduces a new <em>philosophy</em> for browsing the web: there is only one browser window, but it can have multiple <em>tabs</em>, each displaying a different page. You can switch from one tab to another by clicking on the title (tab titles appear horizontally under the location bar), "Open Link in New Tab" by right-clicking on a link, and open empty tabs with either CTRL+T or from the <em>File</em> menu. It takes a while to get used to it, but after a while I couldn't really live without it!<br /><br />I then asked my friend why Firefox doesn't allow me to play music or videos or read pdf files, etc., and he said that I needed to install all the necessary <a href="https://pfs.mozilla.org/plugins/">plugins</a>. This is the most annoying thing about Firefox: you have to "feed" it and "teach" it things - a lot like a baby, really. If the analogy is truly valid, in the end it should be worth it, and I have the feeling that my Firefox will grow up well, if I'm careful.<br /><br />After learning about plugins, and teaching my little Firefox what to do with movies, songs and other types of files, I learnt that it had another really smart feature: outstanding, built-in <em>search capabilities</em>.<br />I had already noticed the small search bar on the top right, next to the location bar: it's basically a shortcut to Google Search. Cool, but I already had this in IE. One thing I didn't like about IE though, was that if I wanted to use a different search engine, like Yahoo or MSN, I had to install <em>another toolbar</em>, and I ended up with something like three different toolbars under the address bar, so I could hardly see the webpages I was browsing!<br /><br />Firefox apparently knows that people might need to use more than one search engine, so you can select other search engines by clicking on the little icon on the left of the aforementioned search bar. Yahoo, MSN, Wikipedia, and others are available, and <a href="http://mycroft.mozdev.org/download.html">others</a> can be installed easily. If you need a plugin for a search engine, and it doesn't exist yet, you can even make it yourself quite <a href="http://mycroft.mozdev.org/generator/">easily</a>.<br /><br />But let's come back a bit to when I ran Firefox for the first time: where did my IE Favourites go? Under the <em>Bookmarks</em> menu, obviously, and they even kept their folder structure. They can be organized through the <em>Manage Bookmarks</em> option, and indeed Firefox's <em>Bookmarks Manager</em>'s interface looks much cleaner and is easier to use than IE's. However, since all the imported bookmarks get dumped in a subfolder, it takes a little time to get them all up to the top level.<br /> <br />Firefox also implements <em>Live Bookmarks</em>: some sites, especially news-related ones like <a href="http://news.yahoo.com/">Yahoo News</a> and <a href="http://news.bbc.co.uk/">BBC News</a>, and <a href="http://slashdot.org/">Slashdot</a> offer <a href="http://en.wikipedia.org/wiki/RSS_%28file_format%29">RSS</a> feeds which are updated several times a day. With Firefox, you can <em>subscribe</em> to a particular site's RSS by clicking on the little square orange icon which appears on the status bar, and a <em>Live Bookmark</em> will be saved. They appear under the <em>Bookmarks</em> menu, in a specific folder, and also on your <em>Bookmarks Toolbar</em> which is under the location bar: clicking on one of them will show the corresponding site's current headlines. You can click on any of the headlines to read the full story/article.<br /><br />Even if my friend realised he just created another Firefox fan, he insisted on telling me a few words about Downloads and Options. Regarding Downloads, there's not much to say: Firefox incorporates a <em>Download Manager</em> that saves all files downloaded from the Net in a specific (selectable) folder, and keeps a history of all downloads. The download manager is opened automatically whenever a file is downloaded, and it also can be opened manually by selecting <em>Tools-Downloads</em>. The really handy part is that you can easily open a downloaded file or the folder it's in, or clear your download history all in one place. The drawback is that it stays open until you close it, and you have to click a button to clear the already downloaded files from the queue.<br /><br /><em>Options</em> is more complex to deal with, as Firefox does not rely on Windows' <em>Internet Options</em>. Firefox's Options (under the <em>Tools</em> menu) are more complete and better organized, as they are clearly divided into 5 main categories:<br /><br /><em>General</em><br />In this panel you can set up your starting page, fonts, colors, language, character encodings, whether or not Firefox is the default browser, and your connection settings.<br /><br /><em>Privacy</em><br />Here - and this is really much better than in IE, I must admit - you can clear and manage history items, saved form information, saved passwords, download manager history, cookies and the browser cache. You can clear everything with a single click, but you'll lose all your saved passwords and your history lists.<br /><br /><em>Web Features</em><br />This panel is for setting your preferences regarding popup blocking, software installation, images, Java and JavaScript.<br /><br /><em>Downloads</em><br />Here you can choose your download destinatination folder as well as set other download-related preferences, like setting particular file types to save to a particular folder.<br /><br /><em>Advanced</em><br />This panel is for - as the name implies - advanced preferences regarding accessibility, browsing, security, validation and certificates. You don't need to change anything here unless you've been told to or you know what you're doing.<br /><br /><em>Is That All?</em><br />That's what I thought, and although I was really impressed with Firefox, I was still missing some features that IE had, such as third party toolbars. My friend was about to go, but he quickly opened a pre-defined firefox bookmark: <a href="https://addons.mozilla.org/">Mozilla Update</a>. "Now you know how Firefox works: I'm sure you can work this out by yourself," he said, and left me with a door to another vast world to explore. The journey was far from over.<br /><br /><br /><strong>Extensions and Themes</strong><br />One aspect of Firefox that was a bit discouraging was the fact that once you install the browser you need to install this, download that, and configure the other thing. For any IE user (like me), this is a major hassle: before, I just wanted to browse the Net, and I didn't care what I was using or how I was using it. Now, I have to be aware of certain things, and more or less <strong>create</strong> the browser I need! On the other hand, this is sort of exciting, in the sense that unlike IE, Firefox can became whatever you want it to be.<br /><br />Even after using Firefox for a while, and even after my friend had explained all its nice features, I still felt that it was somehow incomplete. Luckily, Firefox has <em>extensions</em> and <em>themes</em>. The numerous <a href="https://addons.mozilla.org/extensions/?application=firefox">Extensions</a> enhance Firefox by adding new features which - honestly - I never thought were even conceivable to be included in a browser. Furthermore, Firefox also has <a href="https://addons.mozilla.org/themes/?application=firefox">Themes</a>, so you can change the browser into something completely different, with different icons, shapes and colors!<br /><br />It's worth it to mention some <em><strong>Extensions</strong></em> which really impressed me by the functionality or behaviours they added to Firefox:<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=10&application=firefox">Adblock</a><br />This extension blocks ads - if you don't want to see a banner on a certain site anymore, just right-click on it, select AdBlock, and it's gone! It also remembers your preferences for every URL or site. It's easily customizeable and useful.<br /> <br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=158&application=firefox">Tabbrowser Preferences</a><br />This adds a new category in your Options called Tabbed Browsing, where you can customize particular behaviours concerning tabs, like opening all addresses typed in the location bar in a new tab (focused or unfocused), forcing links to open in new tabs instead of new windows, and so on. <br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=220&application=firefox">FlashGot</a><br />I complained before that my download manager wasn't integrated with Firefox: this extension does that, and supports nearly every possible download manager and accelerators. It also has a built-in gallery to quickly see what file types you are downloading.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=743&application=firefox">CustomizeGoogle</a><br />This personalises Google-related sites and services, such as using <a href="http://www.google.com/webhp?complete=1&hl=en">Google Suggest</a> in every search, filtering content and ads, anonymizing data transmitted to Google, and much more.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=398&application=firefox">ForeCastFox</a><br />Get weather forecasts from all over the world displayed directly on your status bar or anywhere you want.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&category=Developer%20Tools&numpg=10&id=60">Developer Tools</a><br />This is THE ultimate solution if you are a web developer or interested in knowing more about webpages. With this extension you can:<br />- Disable <strong>anything</strong> with a single click (images, JavaScript, cookies, colors, animations, etc.)<br />- Get CSS information or modify a page's CSS<br />- Have fun with Forms (convert POSTs to GETs, show hidden fields, and so on)<br />- Perform image-related operations: show paths, attributes, outline particular images, etc.<br />- Get infos about various elements on a page<br />- Clear history, cookies, open java console, view document's source<br />- Outline particular elements (images, tables, etc.)<br />- Resize your browser to a custom or predefined resolution<br />- Validate a page (HTML, CSS, WAI accessibility, speed reports)<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=33">Googlebar</a><br />Clone of the IE Google Toolbar.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=270">Yahoo Companion</a><br />Clone of the IE Yahoo toolbar.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=219">FoxyTunes</a><br />Control your favourite media player (several programs supported) directly from Firefox!<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=16">ChatZilla</a><br />A complete, fully functional, easy-to-use IRC client which runs from Firefox.<br /><br /><a href="https://addons.mozilla.org/extensions/moreinfo.php?id=684">FireFTP</a><br />Fully integrated FTP client.<br /><br />There are actually many more extensions available from either the Firefox website or other <a href="http://www.extensionsmirror.nl/">portals</a> which can be very useful, depending on your needs, but there are also <strong>Themes</strong> which can change Firefox's look and feel completely, such as:<br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?id=7&application=firefox">Qute</a><br />This theme inspired Firefox default theme: "Icons designed to be modern, dynamic and fresh, with attention paid to usability and comfort over extended use".<br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?id=101&application=firefox">Silverskin</a> <br />"Your favourite browser with a silver skin (With the Qute icons by Arvid Axelsson)"<br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=414">Saferfox Xpanded</a> <br />"A full skin theme with a modern aqua design"<br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=213">Plastikfox Crystal SVG</a><br />"Plastik style from KDE with Crystal SVG icons" <br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=72">Noia (eXtreme)</a><br />"This theme is based on the Noia2.0 icon set by Carlitus."<br /><br /><a href="https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=548">Brushed</a><br />"A Brushed and Polished Browser Interface."<br /><br />Again, many more themes are available. There's something for everyone, really!<br /><br /><br /><strong>To switch or not to switch?</strong><br /><br />Yes, OK, it's not one of those questions which will keep you up at night, but for sure it can be a quandary. Personally, I decided to switch to Firefox gradually, while still viewing some sites in IE, because I think this can be a good compromise. The biggest problem is that even if Firefox supports Web standards (my friend said IE doesn't) some sites do not. Especially before Firefox, web developers apparently had to create their sites to be viewed correctly with Microsoft's browser. That's why some sites still have things like "This site is best viewed in Internet Explorer 6", or even, in some cases, they'll suggest you download the latest IE version, because <em>your browser is incompatible</em> when actually it's <em>the site</em> which is not compatible with <a href="http://www.w3c.org/">Web Standards</a>.<br />Furthermore, <a href="http://www.microsoft.com/com/default.mspx">ActiveX</a> is a non-standardized proprietary technology which Microsoft uses to make software components communicate and also provide complex functionalities necessary for things like Windows Update. Firefox doesn't support ActiveX, which has been exploited many times in the past (and still now): tough luck. Nowadays, Microsoft wants you to have Automatic Updates turned on, so you don't need to visit the Windows Update site anymore. As far as I'm concerned, I'm not too bothered by that, but if someday I need ActiveX technology, there's already a <a href="http://www.google.com/url?sa=U&start=1&q=http%3A//www.iol.ie/%7Elocka/mozilla/mozilla.htm&ei=cwnIQu_tBYqgiAKd9bGrCw&sig2=afi7r8Pa_YLozVo0JbGp9w">Mozilla Project</a> on it. Final note: If you need to switch back to IE for some reason, the <a href="https://addons.mozilla.org/extensions/moreinfo.php?id=35">IE View</a> extension can quickly give you the opportunity to do so, opening IE to view the page you're visiting.<br /><br />It looks like the Browser Wars have started again, and as a matter of fact, Firefox is becoming known for its features, innovations and <a href="http://www.mozillazine.org/">community support</a>. Switching can be scary, and people can try forcing you to do it, but you shouldn't listen to them: don't start using Firefox just because "it's cool" or "everybody uses it"; try it first, understand how it works, and spend time learning it, because it just might be worth it. <br /><br />One thing is certain: The existence of IE lovers is debatable, but there are over <a href="http://www.spreadfirefox.com">170 million</a> Firefox lovers. Go <a href="http://www.mozilla.org/products/firefox/">get it</a>! <br />
A contents/articles/im-on-twitter-anyway.html

@@ -0,0 +1,15 @@

+----- +title: I'm on Twitter, anyway... +content-type: article +timestamp: 1211101440 +tags: personal|review|programming +----- +<p>I&#8217;ve been neglecting my blog, I know. The truth is that I&#8217;m quite busy in this period: I have more responsibilities in my daily full-time jobs, my lunch breaks are getting shorter and I don&#8217;t have much free time. At any rate, here&#8217;s what&#8217;s going on:</p> +<ul> + <li>I&#8217;m writing a new article for an online magazine (assuming I&#8217;m gonna finish it)</li> + <li>I signed up for a freelance technical reviewing job, for a new Ruby book which will come out soon-ish</li> + <li>I&#8217;m getting ready to finally visit Rome (again), this time with my fiancée, for our fifth anniversary.</li> + <li>I&#8217;m slowly preparing a version 1.0 of <a href="http://code.google.com/p/redbook/">RedBook</a>, which involves quite a lot of refactoring (and hopefully better documentation and tests).</li> + <li>I&#8217;m trying to learn a little bit of Haskell: it seems to be one of the few non .<span class="caps">NET</span> languages able to produce standalone .exe files, nowadays&#8230;</li> +</ul> +<p>Last but not least, I now decided to use <a href="http://twitter.com">Twitter</a> regularly, so you can follow me <a href="http://twitter.com/h3rald/">there</a>, if you wish!</p>
A contents/articles/incomplete-guide-to-london.html

@@ -0,0 +1,165 @@

+----- +title: Fabio's (In)complete Guide to London +content-type: article +subtitle: Some (non-)essential tips on getting around, eating, and enjouing yourself +popular: true +timestamp: 1156307004 +tags: travelling +----- +<p>This summer I finally had a chance to spend <em>a whole week</em> in London. The city itself was not new to me, since I visited it 6 times before this one, but this summer was different, in a word: Roxy (my fiancee)&#8217;s brother Caspar was happy to host us at his place, for free.<a name="top"></a></p> +<h3>Table of Contents</h3> +<ul> + <li><a href="#pre">Preamble</a></li> + <li><a href="#trans">Transportation</a> + <ul> + <li><a href="#planes">Planes</a></li> + <li><a href="#trains">Trains, coaches and cabs</a></li> + <li><a href="#tube">The tube and buses</a></li> + </ul></li> + <li><a href="#food">Food</a> + <ul> + <li><a href="#rubbish">Rubbish Food</a></li> + <li><a href="#healthy">Healthy Food</a></li> + <li><a href="#brick">Brick Lane</a></li> + </ul></li> + <li><a href="#enter">Entertainment</a> + <ul> + <li><a href="#club">Clubbing</a></li> + <li><a href="#museums">Museums</a></li> + <li><a href="#theatres">Theatres</a></li> + <li><a href="#shop">Shopping</a></li> + </ul></li> +</ul> +<p><a name="pre"></a> <a href="#top">[Back to Top]</a></p> +<h3>Preamble</h3> +<p>This summer I finally had a chance to spend <em>a whole week</em> in London. The city itself was not new to me, since I visited it 6 times before this one, but this summer was different, in a word: Roxy (my fiancee)&#8217;s brother Caspar was happy to host us at his place, for free.</p> +<p>Although we obviously had to pay for our flight, transport, food, etc. etc., we didn&#8217;t have to pay for accommodation, which was indeed quite an achievement, considering the prices of hotels and flats in London. The bad news is that this Guide, although already lacking a lot of information (try describing everything you can do in London in a single, not-too-boring article), will not contain any particular hints and tips on how to find accommodation in one of the most interesting cities in Europe &#8211; unless of course you get to stay at Caspar&#8217;s place.</p> +<p><a name="trans"></a> <a href="#top">[Back to Top]</a></p> +<h3>Transportation</h3> +<p>Getting there is relatively easy and if you come from Europe there&#8217;s a quick answer to the universal traveller&#8217;s question:</p> +<p><em>&#8220;Is there any cheap, reliable and on-time airline?&#8221;</em></p> +<p><a name="planes"></a> <a href="#top">[Back to Top]</a></p> +<h4>Planes</h4> +<p>Yes, there is. Apparently some Irish man thought he could make millions by buying loads of Boeing 737-800 and selling cheap flight tickets to everyone going to or from London, and he actually did. <a href="http://www.ryanair.com">RyanAir</a> is the answer: a cheap-but-reliable airline which will make you arrive even early than you expected by paying tickets as low as 1p (plus 20-30 Euro airport taxes). Unfortunately they don&#8217;t provide full meals aboard, they don&#8217;t have any cutlery on board for you to steal, unlike <a href="http://www.britishairways.com/travel/globalgateway.jsp/global/public/en">BA</a><em>, and flight attendants are not hot either, unlike <a href="http://www.britishairways.com/travel/globalgateway.jsp/global/public/en">BA</a></em>, but since I&#8217;m happily engaged and Roxanne doesn&#8217;t fancy me stealing BA cutlery it&#8217;s better this way indeed. <br /> +Unfortunately we booked only a month before and thus the flight for both of us (return) was about 80 Euro in the end, but still not bad.</p> +<p>Luggage check? Not bad, unless you plan to arrive or depart right after an unfoiled bomb plot like I did: I had to take off my shoes, got checked everywhere, they emptied out my hand luggage, turned on and off my laptop and confiscated my gel-ink pen. Way to go!</p> +<p><a name="trains"></a> <a href="#top">[Back to Top]</a></p> +<h4>Trains, coaches and cabs</h4> +<p style="float:left;"><img src="/img/pictures/london/cab.jpg" alt="" /></p> +<p>The next question of the London newbie arriving in Stansted airport is:</p> +<p><em>&#8220;Cool, now I&#8217;m in the middle of nowhere in England, where&#8217;s London then?&#8221;</em></p> +<p>Nice innit? They sell you a cheap flight and then it seems you still have a 45-minutes journey to get to the actual city, and this is possible &#8211; apparently &#8211; only through the Stansted Express, the <em>fastest</em> way to get to London from Stansted. Dear as hell (about 25 <span class="caps">ENGLISH</span> <span class="caps">POUNDS</span> return, per head!). <br /> +Luckily there&#8217;s an alternative in the form of an endless amount coaches going from Stansted to London and vice-versa every now and then. I went with <a href="http://www.terravision.it/">Terravision</a> but there are many others. Significantly cheaper (34 Euro for two people return!).<br /> +The Stansted Express is the first example of how trains in the UK can be a lot dearer than you expect, especially if you come from Italy where you can go from Genoa to the Cinque Terre for as low as five Euro (for 100Km that is). Considering that Roxy and I spent about two pounds for about 15 Km to get from Victoria Station to Bromley South one way, well, yes, it is more expensive!</p> +<p>Once we got to Liverpool Street Station from Stansted with a load of (empty) suitcases, a weird pakistani guy in a a black leather jacket turns up out of nowhere and heads towards us. Damn airport regulations: unfortunately my almighty Victorinox pocket knife was in my suitcase. Luckily the guy approaches and simply asks:</p> +<p>Him: &#8220;Hey mate, need a taxi? &#8230;A taxi mate? A taxi?&#8221;<br /> +Me: &#8220;How much&#8221;<br /> +Him: &#8220;Where to?&#8221;<br /> +Me: &#8220;[Somewhere in Hackney]&#8221;<br /> +Him: &#8220;20 pounds&#8221;<br /> +Me: &#8220;Bye&#8221;</p> +<p>Just an unregistered cab driver. There are apparently millions around and they can spot a foreigner (especially Italians, it seems) from miles. Be prepared, and be aware that a cab from Liverpool Street for a 5-minutes drive in the night should not cost more than 6 pounds&#8230;</p> +<p><a name="tube"></a> <a href="#top">[Back to Top]</a></p> +<h4>The tube and buses</h4> +<p>Here are some tips for smooth travalling via the underground or buses:<br /> +1. Do not use a bus unless you can&#8217;t use the Tube for some particular reason (e.g. you need to go to Zone 3 or 4 and your Oyster card can be used only in zone 1 and 2)<br /> +2. Do not catch the Circle Line, always try a combination of two or more (e.g. District and Central) instead, because delays are frequent<br /> +3. Get down at Leicester Square if you&#8217;re going to Covent Garden: it&#8217;s just 300 metres away and Covent Garden station is small and packed<br /> +4. Always check whether the line you&#8217;re catching is marked with &#8220;Good Service&#8221;, try another route if there delays are expected<br /> +5. Keep right on escalators &#8211; there&#8217;s always some lunatic running up/down on the left side, from time to time, and trust me, he <span class="caps">WILL</span> mind being stopped for no valid reason<br /> +6. Mind the gap! (Especially at Bank station)<br /> +7. Mind the sweaty guys wearing suite and holding a briefcase, at peek hours, they can be deadly especially on escalators (See 5.).</p> +<p><a name="food"></a> &#8220;&gt; Back to Top &lt;&#8221;:#top</p> +<h3>Food</h3> +<p>I already noticed this during the previous visits: in London you can eat everywhere. Quite literally, both in the city centre and surrounding areas. If you can &#8211; and also if you feel brave enough to try at random &#8211; the areas surrounding the city centre are probably cheaper than the 4-million different food chains providing any kind of meal near Oxford Street &amp; Co. and possibly &#8211; arguably &#8211; more tasty.</p> +<p>If you dare to venture in the land of the Turkish/Bangladesh/Indian food shops you&#8217;re more than welcome to do so, but be prepared to a potentially long trial-and-error process: in the end you&#8217;ll eventually find the right one. Caspar recommended a particular one, and the <a href="http://www.astray.com/recipes/?show=Humus%20sandwich%20spread">humus sandwitch</a> was really great. Doner Kebab? Roxy insisted with the rumors they use roadkill for those (she&#8217;s vegetarian anyway) so she didn&#8217;t let me have one, aww.</p> +<p><a name="rubbish"></a> <a href="#top">[Back to Top]</a></p> +<h4>Rubbish Food</h4> +<p>I recently came across an interesting <a href="http://www.princeton.edu/%7Eina/infographics/starbucks.html">image</a> which gave me a better picture of how horrendously sick the world has become when it comes to rubbish food. <br /> +Yes, <a href="http://www.mcdonalds.com/">McDonald&#8217;s</a>, <a href="http://www.starbucks.com/">Starbucks</a> &amp; their nasty friends (<a href="http://www.pizzahut.com/">Pizza Hut</a>, <a href="http://www.kfc.com/"><span class="caps">KFC</span></a>, <a href="http://www.bk.com/">Burger King</a>&#8230;) are still there making millions at every corner, in London as well. Well, not quite: I noticed they were less last time, and apart from a few kids fretting for their <em>Happy Meal</em>, they weren&#8217;t so packed. I was pleased to notice that a load of new-ish healthier alternative are now available (see next section).</p> +<p><a name="healthy"></a> <a href="#top">[Back to Top]</a></p> +<h4>Healthy Food</h4> +<p style="float:right;"><img src="/img/pictures/london/pret.png" alt="" /></p> +<p>This was the relatively new surprise. Relatively new because I already noticed some of them last year, but this time I had a chance to try them all: they <em>healthy food gang</em>! This is the <span class="caps">REAL</span> food trend for London, it seems, and I was very glad about it.<br /> +The first one seems to have been <a href="http://www.pret.com/">Pret a Manger</a> a London-established company which is now spreading &#8211; apparently &#8211; in the US as well. They <a href="http://www.pret.com/about/">preach and believe</a> in the importance of healthy food and fight a silent &#8211; but effective &#8211; quest against aforementioned Rubbish Food Giants.</p> +<p>bq.<br /> +&#8220;Pret operates a bit like a restaurant. Every Pret has its own kitchen (except for one or two of the tiny ones). You won&#8217;t find &#8216;sell by&#8217; dates on our fresh sandwiches and salads. We don&#8217;t sell &#8216;factory&#8217; stuff. We offer our food to charity at the end of each day rather than keep it over.&#8221;</p> +<p>Sounds like a good plan. The food is indeed very nice and tasty and they even <em>apologize</em> for charging <span class="caps">VAT</span> when eating in. A carefully-thought marketing campaign or the just plain simple truth (Wot!)? Only time will tell, let&#8217;s hope for the best.<br /> +Another example of healthy food around London? Well, real, tasty <a href="http://www.westcornwallpasty.co.uk/flash.html">Cornish pasties</a> can be bought for a few quid around in the biggest stations and streets, for example. Freshly baked in Cornwall, and brought all over England the same day &#8211; or so they make out.</p> +<p><em>&#8220;Hey, what the hell is a pasty man?&#8221;</em><br /> +&#8220;Go back where you belong, you <a href="http://www.urbandictionary.com/define.php?term=emmet">emmit</a>!&#8221;</p> +<p>Roxanne and Caspar both lived in (West!) Cornwall for years, and they really appreciated their fellow pirates trying to take over the world.</p> +<p><a name="brick"></a> <a href="#top">[Back to Top]</a></p> +<h4>Brick Lane</h4> +<p><em>&#8220;Come in my restaurant&#8230; good food, cheap&#8230;&#8221;</em><br /> +&#8220;No.&#8221;<br /> +<em>&#8220;C&#8217;mon, I make a discount for you&#8221;</em><br /> +&#8220;How much?&#8221;<br /> +<em>&#8220;15% off&#8221;</em><br /> +&#8220;No way mate, last time it was 25% with a free round of drinks!&#8221;<br /> +<em>&#8220;You came here before? Impossible, we don&#8217;t do 25% off, we do 20% off maximum&#8221;</em><br /> +&#8220;No, 25% off, it was 25% off, but doesn&#8217;t matter, I&#8217;ll go somewhere else&#8230;&#8221;<br /> +<em>&#8220;No wait, 20% off and free drinks, ok?&#8221;</em><br /> +&#8220;25%&#8221;<br /> +<em>&#8220;OK, 25% and free drinks, but you come in OK? Good food!&#8221;</em></p> +<p>This is just an example of conversation between a guy working for a restaurant in <a href="http://www.visitbricklane.com/">Brick Lane</a> and a &#8220;potential customer&#8221;. Brick Lane (aka Banglatown) is a street in London which became popular for the moltitude of Indian/Bangladesh restaurants. There are literally dozens of them, and this fierce competition causes the owner to repeteadly offer &#8220;deals&#8221; to potential customers: getting 25% off the bill is not unusual, and sometimes if you can argue it well you can even get free drinks. Caspar took us to a really good place he went before, and the curry and rice and other typical dishes were absolutely fabulous. Price? 11 pounds per head for a filling (and spicy!) dinner.</p> +<p><a name="enter"></a> <a href="#top">[Back to Top]</a></p> +<h3>Entertainment</h3> +<p>So what can you do in London, other than meandering with the underground to get the most out of your Oyster card and eat out every day? Well, you can have fun of course! There&#8217;s loads to do for every taste. This is an <em>incomplete</em> guide, so I&#8217;ll just mention a few possibilities, but be aware that there&#8217;s much, much more than this.</p> +<p><a name="club"></a> <a href="#top">[Back to Top]</a></p> +<h4>Clubbing</h4> +<p>Each weekend, the following equation holds, for the average Londoner aged 20-30 at least:</p> +<p><code>100 pounds + Club + Friends = Loads of booze + Fun + Terrible hangover and amnesia the day after</code></p> +<p>That&#8217;s basically what the traditional Londoners (or maybe we shall generalise to all of England&#8230;) do every saturday night: they get trashed. Why? It&#8217;s not clever, it&#8217;s not good&#8230; but it&#8217;s bloody good fun!<br /> +Clubs, pubs and bars are the best place for this kind of activity: they are comfortable, there&#8217;s normally cool music on, air conditioning, totally hyper staff, and a huge bouncer too! <br /> +We went to <a href="http://www.ditchbar.com/">The Ditch</a>, a recently renovated place in Shoreditch (obviously). I must say I really liked the environment more than any club in Italy:</p> +<ul> + <li>Good music and deejay</li> + <li>Enough people inside, but not too crowded</li> + <li>Good drinks</li> + <li>Small &amp; comfy <span class="caps">VIP</span> room, obviously for us (no kidding)</li> + <li>A competent bouncer who kindly reminded us to &#8220;watch over&#8221; one of our friends, after she suddenly ordered four Vodka-RedBull at once&#8230;</li> +</ul> +<p>No wonders why Caspar &amp; his friends carefully picked this place as their ideal candidate for their own upcoming DJ mini-event in November: it&#8217;s an ideal place to spend your night.</p> +<p>Pity that English blokes (and birds too!) get way too trashed in the end: I reckon if you could place a single half-sober, decent-looking Italian guy in a club like that, he&#8217;d have pulled almost all the (decent-looking) girls available by the end of the night. I&#8217;ll definetely recommend some of my <em>free</em> (not as in software) friends to go over to London next summer.</p> +<p><a name="museums"></a> <a href="#top">[Back to Top]</a></p> +<h4>Museums</h4> +<p>Enough clubbing and equally shallow activities, let&#8217;s focus on culture, at once!<br /> +London is the best city in Europe (OK, <em>followed</em> by Paris) for museums, and the best thing is that they are (nearly) all free. This time we didn&#8217;t go to the <a href="http://www.thebritishmuseum.ac.uk/">National Gallery</a>, which hosts one of the most outstanding painting galleries in all over the world, because we already visited it too many times, so we went straight for the <a href="http://www.thebritishmuseum.ac.uk/">British Museum</a>. I originally went there a few years ago, and I forgot what was in it, exactly, and yes, I was amazed and perplexed at the same time:</p> +<p style="float:left;"><img src="/img/pictures/london/rosetta.jpg" alt="" /></p> +<p>I was amazed at the amount of stuff those British folks <em>nicked</em> from all over the world: I&#8217;m not talking about a few mummies from Egypt like we did in for our mini Egyptian museum in Turin, but rather stuff like the original sarcophagus of Cleopatra (&amp; others), the Rosetta Stone, the Ur Standard, whole monuments from Greece, gargantuan gateways from some Assirian city, and <em><span class="caps">ALL</span> <span class="caps">THE</span> <span class="caps">SCULPTURE</span> <span class="caps">DECORATIONS</span> OF ATHEN&#8217;S <span class="caps">PARTHENON</span>!</em> That was shocking really, but after all it was Napoleon who stole the Monna Lisa from us. Damn the French. (No discrimination intended, please mind the sarcasm)</p> +<p>The <a href="http://www.tate.org.uk/modern/">Tate Modern</a> was impressive as well for a few Dali&#8217;s and Kandinski&#8217;s paintings etc. etc., but I don&#8217;t think it can ever be as breath-taking as the other ones. I certainly don&#8217;t understand certain kinds of modern art, but I can&#8217;t understand how a random guy could get loads of money and ovation for the critics for putting a few basket-balls in a glass box. Clever.</p> +<p style="float:right;"><img src="/img/pictures/london/nh.jpg" alt="" /></p> +<p>To conclude this brief and silly overview of London&#8217;s most remarkable museums, let&#8217;s say something about the <a href="http://www.nhm.ac.uk/">National History Museum</a>. <br /> +First of all it must be noted that we have a decent equivalent in Genoa, so Roxy and I visited it not long prior to our departure for England. She liked it, and was impressed by the amount of stuffed animals on display, but she told me that the National History Museum in London was supposed to be <em>way better</em>.<br /> +We both expected, especially judging from outside this enourmous building which was built for the purpose, big halls full of taxidermist&#8217;s masterpieces, but alas, nothing like this at all. Yes, sure, there were a few stuffed animals here and there, and the minerals section was truly outstanding for completeness. The rest &#8211; in my very, very humble opinion &#8211; was a real insult to Science and to the dignity of the visitors over five years old.<br /> +They insisted in &#8220;renovating&#8221; the interior of a marvellous building, making almost every room pitch black only to allow a kid in a million to press a button to highlight a five-lines explanation for a absolutely pointless diagram. Well done. That was a real achievement, wasn&#8217;t it? I really don&#8217;t understand who could ever conceive such an abomination: a formerly very respected museum turned into a poorly-designed theme park.<br /> +OK, they probably wanted to involve younger generations into scientifical subjects through &#8220;interactivity&#8221;, and that&#8217;s understandable &#8211; in theory. In practice though, there are a few elements which weren&#8217;t obviously considered when developing such a subtly cunning marketing strategy:</p> +<ul> + <li>The average kid up to 5 years old enjoys pushing buttons, listening to sounds and looking at easy-to-understand (but <span class="caps">ARE</span> <span class="caps">THEY</span>?) pictures, but alas, can&#8217;t really bother to read, right?</li> + <li>The average kid over 5 years old would probably like reading some explanation about some weird phenomena, but alas, he really can&#8217;t be bothered to push button, move levers, etc. etc. only to highlight some text. Wake up dude, we never heard of Computer Graphics? Animation? even Educational Software, maybe with things like touchscreens etc. These kids are from the <span class="caps">XXI</span> century, not from the seventies ffs! Grow up (the museum&#8217;s managers, not the kids of course)!</li> + <li>Instead of ruining an historical building, they could have devoted just a few rooms to kids, investing in something slightly more amazing than out-of-fashin &#8220;interactive&#8221; toys.</li> +</ul> +<p><em>&#8220;Yes, but hey, we still have a huge queue of kids &amp; families at the entrance!&#8221;</em></p> +<p>And you know why? You know what are all these people queueing for? For a damn cheesy T-rex <a href="http://science.howstuffworks.com/animatronic.htm">animatronic</a>! Yes, really! And no, not the one from Jurassic Park, but only its rather shitty English-made cousin. <br /> +The funniest thing of the whole visit? They tell you to donate &#8220;at least&#8221; three quid for their wonders, same as for the British Museum and the National Gallery. You know what? I&#8217;d rather give <em>thirty</em> quid to a random kid if he promise not to visit such &#8220;museum&#8221;&#8230;</p> +<p><a name="theatres"></a> <a href="#top">[Back to Top]</a></p> +<h4>Theatres</h4> +<p>Luckily London theatres are still great. Unfortunately I didn&#8217;t have a chance to go to a musical this time, but I&#8217;ll definitely try to make it for one during my next visit. Adverts for the shows are all over the place, from streets to underground stations, and there are truly a lot of places where it is possible to buy tickets at discounted price while apparently buying full price tickets doesn&#8217;t seem to be possible&#8230;<br /> +Anyhow, not only we didn&#8217;t manage to go to a musical, but we also missed another theatrical performance by <a href="http://www.imdb.com/name/nm0001772/">Patrick Stewart</a>, who, for those who don&#8217;t know, happens to be one of the best Shakespearean actors alive&#8230; when he doesn&#8217;t <a href="http://en.wikipedia.org/wiki/Star_Trek:_First_Contact">fight against the Borg</a> or <a href="http://en.wikipedia.org/wiki/X-Men_(film)">plays funny tricks on a wheelchair</a>, of course (cheesy, cheesy joke).</p> +<p>Nevertheless we <em>did</em> manage to go and see a play, namely Shakespeare&#8217;s Antony and Cleopatra at the <a href="http://www.shakespeares-globe.org/navigation/framesetNS.htm">Globe</a>. The Globe Theatre is an almost-perfect reconstruction of the famous London Theatre where Shakespeare&#8217;s plays used to be acted. Like in the <span class="caps">XVII</span> century, you have two choices:</p> +<p>a. Book your seat (26 pounds)<br /> +b. Stand up on the ground, near the stage (5 pounds)</p> +<p style="float:left;"><img src="/img/pictures/london/globe.jpg" alt="" /></p> +<p>We obviously went for option b, of course, since we didn&#8217;t fancy the idea of paying that much &#8211; although it can be worthwhile. Only one thing to keep in mind: <em>always check the duration of the play you&#8217;re going to see beforehand</em> &#8211; if you don&#8217;t like standing up for a long time, you have to go for option a. <br /> +We obviously <em>didn&#8217;t</em> check how long the play was going to be &#8211; although we could have imagined it &#8211; so we ended up standing up for approx three hours (with a 15 minutes break). And you <em>have</em> to stand up, you can&#8217;t sit on the stairs and neither on the floor, and the staff is ready to enforce this rule at all costs: a 70-year-old lady brought a folded chair and decided to sit on it, only to be <em>kindly reminded</em> by the staff that it wasn&#8217;t allowed to do so. Go figure. <br /> +Anyhow, after all I must say it was the cheapest and the very best Shakespeare play I&#8217;ve ever been to so far, although I must also say that most of the ones I&#8217;ve been to before were acted in (yikes!) Italian (yes, we do dub theatrical works, <em>as well</em>). A really, really good idea for students and half-broke youth who shouldn&#8217;t be denied of the pleasure of watching Shakespeare&#8217;s masterpieces at the theatre. Please, keep it up.</p> +<p><a name="shop"></a> <a href="#top">[Back to Top]</a></p> +<h4>Shopping</h4> +<p>Last but not least, I felt compelled to include a short section about <em>shopping</em> in London. The universal answer to the question &#8220;Where can I find [insert random item here]&#8221; is normally <a href="http://www.oxfordstreet.co.uk/">Oxford Street</a>. When I visited it for the first time (I was about 14 years old, I believe) it all seemed huge&#8230; those never-ending malls et al, but now it just seems &#8220;normal&#8221;. Probably because now going to malls and megastores is just the plain normality, while in the nineties (in Italy) it was rather unusual. <br /> +Oxford Street has them all: computer shops, endless fashion shops, gargantuan bookshops etc. etc. <br /> +Biggest and most expensive shop in Oxford Street? Probably <a href="http://www.selfridges.com/">Selfridges</a> <br /> +Biggest bookshop? Definitely <a href="http://www.amazon.co.uk/exec/obidos/tg/stores/static/-/waterstones/waterstones-info/202-4070483-1661418">Waterstone</a> although the biggest bookshop in London (and in Europe) is the Waterstone one in Piccadilly, just round the corner.<br /> +<a href="http://www.harrods.com/Cultures/en-GB/homepageindex.htm">Harrods</a>? &#8211; it&#8217;s not far from there.</p> +<p>What if you like more traditional and less glamorous shopping? <a href="http://www.coventgardenlife.com/">Covent Garden</a> and its whereabouts is probably the best choice, also for souvenirs.</p> +<p>Had enough yet? Well, yes, let&#8217;s call it a day for this article, but be aware that there&#8217;s much, <span class="caps">MUCH</span> more to see and do in London than you can ever imagine. Unless you&#8217;re from the US, of course.</p>
A contents/articles/inline-introduction.html

@@ -0,0 +1,173 @@

+----- +title: RawLine - a 100% Ruby solution for console inline editing +content-type: article +timestamp: 1205128740 +tags: ruby|programming|opensource|rawline +----- +<p>One of the many things I like about Ruby is its cross-platform nature: as a general rule, Ruby code runs on everything which supports Ruby, regardless of its architecture and platform (yes, there are quite a few exceptions, but let&#8217;s accept this generalization for now).</p> +<p>More specifically, I liked the fact that I could use the <a href="http://tiswww.case.edu/php/chet/readline/rltop.html"><span class="caps">GNU</span> Readline library</a> with Ruby seamlessly on both Windows and Linux.<br /> +Readline offers quite a lot of features which are useful for those people like me who enjoy creating command-line scripts, in a nutshell, it provides:</p> +<ul> + <li>File/Word completion</li> + <li>History support</li> + <li>Custom key bindings which can be modified via .inputrc</li> + <li>Emacs and Vi edit modes</li> +</ul> +<p>Basically it makes your command-line interface fast and powerful, and that&#8217;s not an overstatement. Ruby&#8217;s own <span class="caps">IRB</span> can be enhanced by enabling readline and completion, and it works great &#8212; at least on *nix systems.</p> +<p>For some weird reason, some people had problems with Readline on Windows: in particular, things get nasty when you start editing long lines. Text gets garbled, the cursor goes up one or two lines and doesn&#8217;t come back, and other similar leprechaun&#8217;s tricks, which are not that funny after a while.</p> +<p>Apparently there&#8217;s no alternative to Readline in the Ruby world. If you wan&#8217;t tab completion that&#8217;s it, you&#8217;re stuck. Would it be difficult to implement <em>some</em> of Readline functionality natively in Ruby? Maybe, but the problem is that for some reason the Ruby Standard Library doesn&#8217;t have low level methods to operate on keystrokes&#8230;</p> +<p>&#8230;but luckily, the <a href="http://highline.rubyforge.org/">HighLine</a> gem does! James Edward Gray II keeps pointing out here and here that HighLine&#8217;s own <code>get_character</code> method does just that: it returns the corresponding character code(s) right when a key is pressed, unlike <code>IO#gets()</code> which waits for the user to press <span class="caps">ENTER</span>.</p> +<p>Believe it or not, that tiny method can do wonders&#8230;h2. Reverse-engineering escape codes</p> +<p>So here&#8217;s a little script which uses <code>get_character()</code> in an endless loop, diligently printing the character codes corresponding to a keystroke:</p> +<div class='ruby'><pre><code>#!/usr/local/bin/ruby -w + +require 'rubygems' +require 'highline/system_extensions' + +include HighLine::SystemExtensions + +puts "Press a key to view the corresponding ASCII code(s) (or CTRL-X to exit)." + +loop do + + print "=&gt; " + char = get_character + case char + when ?\C-x: print "Exiting..."; exit; + else puts "#{char.chr} [#{char}] (hex: #{char.to_s(16)})"; + end + +end</code></pre></div><p>A pretty harmless little thing. Try to run it and press some keys, and see what you get:</p> +<div style="font-family: Monospace"> +<p>Press a key to view the corresponding <span class="caps">ASCII</span> code(s) (or <span class="caps">CTRL</span>-X to exit).</p> +<p>=&gt; a <sup class="footnote" id="fnr96"><a href="#fn96">96</a></sup> (hex: 61)</p> +<p>=&gt; 1 <sup class="footnote" id="fnr49"><a href="#fn49">49</a></sup> (hex: 31)</p> +<p>=&gt; Q <sup class="footnote" id="fnr81"><a href="#fn81">81</a></sup> (hex: 51)</p> +<p>=&gt; &alpha; <sup class="footnote" id="fnr224"><a href="#fn224">224</a></sup> (hex: e0)</p> +<p>=&gt; K <sup class="footnote" id="fnr75"><a href="#fn75">75</a></sup> (hex: 4b)</p> +</div> +<p>Hang on, what are the last two codes? <em>A left arrow key on Windows</em>, apparently.</p> +<p><strong>Welcome to the wonderful world of input escape sequences!</strong></p> +<p>To cut a long story short, both Windows and *nix system &#8220;terminals&#8221; translate special keystrokes into sequences of two or more codes. This applies to things like <span class="caps">DEL</span>, <span class="caps">INSERT</span>, arrows, etc. etc.<br /> +For some ideas, check out:</p> +<ul> + <li><a href="http://www.microsoft.com/whdc/device/input/Scancode.mspx">Windows Scancodes</a> (Thanks <a href="http://64.223.189.234/node/92">Huff</a>)</li> + <li><a href="http://www.connectrf.com/Documents/vt220.html">VT220 Terminal Input Sequences</a> (Thanks <a href="http://www.grayproductions.net/">James</a>)</li> +</ul> +<p>Let&#8217;s now assume that we&#8217;re smart and we can write a program which can parse keystroke properly, including handling different input escape sequences according to the OS, what can it be used for?<br /> +Well:</p> +<ul> + <li>For normal characters, just print them back to the screen (<code>get_character</code> doesn&#8217;t print anything, it &#8220;steals&#8221; the keystroke)</li> + <li>For special characters, do something nice!</li> +</ul> +<p>We could setup <span class="caps">TAB</span> to auto-complete the current word according to an array of matches, or bind the up arrow to load the last line typed in by the user, for example, that&#8217;s basically something Readline does, right?</p> +<h2>RawLine: how it works and what it does</h2> +<p>I created a small project on RubyForge called <a href="http://rubyforge.org/projects/rawline/">RawLine</a> (not to be confused with RubyInline, a completely different thing altogether, sorry about that) to play around with the possibilities offered by the <code>get_character</code> method. The library is just a preview of things which can be done, but it&#8217;s already usable, provided that you&#8217;re brave enough to try it out, that is.</p> +<p>The basic idea behind RawLine is to be able to parse keystrokes properly on different platforms and re-bind them to a set of predefined, cross-platform actions or a user-defined code block.</p> +<h3>Basic line-editing operations</h3> +<p>The first challenge was to re-invent the wheel, i.e. re-bind keystrokes to their typical actions: a left arrow moves the cursor left, a backspace deletes the character at the left of the cursor and so on. Yes, because <code>get_characters</code> gives you the right character codes at the price of <em>cancelling their normal effects</em>, which is a great thing, as you&#8217;ll soon find out.</p> +<p>Printing a character on the screen was one of the easiest tasks (at first). <code>IO#putc</code> does the job pretty well: it prints a character out.<br /> +What about moving left? Easy: print a non-descructive backspace (\b) and hope it is really not destructive. I did some tests and it seems to do as it&#8217;s told and move the cursor back by one position.</p> +<p>Moving right was a little trickier: the easiest thing I found was to re-print the character under the cursor, which will then move the cursor forward (as naive as it may seem, it does the job!). If there&#8217;s nothing under the cursor, then we must be at the end of the line and it shouldn&#8217;t move anywhere, so there we go.</p> +<p>What if I move left a bit and then start typing normal characters? Well, everything is rewritten of course: this will be our &#8220;character replace mode&#8221;. Unfortunately users don&#8217;t like this behavior that much, so what I did was this:</p> +<ol> + <li>Copy all characters from the one at the left of the cursor till the end of the line</li> + <li>Print the character to be inserted</li> + <li>Re-print the previously-copied characters</li> + <li>Move the cursor back at the right place</li> +</ol> +<p>Again, a primitive solution which works seamlessly on all platforms, and yes, it&#8217;s fast enough that you don&#8217;t notice the difference.</p> +<p>As you may have guessed, this of course means that I always had to keep track of:</p> +<ul> + <li>The cursor position within the line</li> + <li>The text currently printed to the screen</li> +</ul> +<p>Backspace and delete were implemented in a similar way, you can figure it out yourself or look at the source code: I won&#8217;t bore you any further!</p> +<h3>History management</h3> +<p>The next step was to implement a history for both the characters inputted by the user (to allow undoing and redoing operations) and for the whole lines. This was just an ordinary programming exercise: a simple buffer with some extra controls here and there, nothing too scary.</p> +<p>So every &#8220;modification&#8221; to the current line being typed is saved in a line history buffer and all the lines entered are saved in another history buffer. All is left is to allow users to navigate through these buffers back and forth. <br /> +Nothing impossible: all I had to do was keeping track of the current element of the history being retrieved and then overwrite the current line with a new line stored in the buffer? How&#8217;s this line overwriting done? Same old:</p> +<ol> + <li>Move the cursor to the beginnig of the line</li> + <li>Print X spaces, where X is the line length, so that the characters are no longer displayed in the console</li> + <li>Move the cursor back to the beginning of the line</li> + <li>Print the new line.</li> +</ol> +<p>Easy and naive, as usual. But again, it works well enough.</p> +<h3>Word completion</h3> +<p>The other challange was word completion. The current implementation can be summarized as follows:</p> +<ul> + <li>If <span class="caps">TAB</span> (or another character, if you wish) is pressed, call a user-defined <code>completion_proc</code> method which returns an array and show the first element of the array (in this case I actually used a cyclic RawLine::HistoryBuffer, not an array)</li> + <li>If the user presses <span class="caps">TAB</span> again, show another match, and so <em>ad infinitum</em> if the user keeps pressing <span class="caps">TAB</span>.</li> + <li>If the user presses another key, accept the default completion and move on.</li> +</ul> +<p>Obviously this means that:</p> +<ul> + <li>RawLine has to keep track of the current &#8220;word&#8221;. A word is everything separated by a user defined <code>word_separator</code>, which can obviously modified at runtime, with care.</li> + <li>Regarding the <code>completion_proc</code>, typically you may want to return only the elements matching the word which is currently being written, so that&#8217;s given as default parameter for your proc. Exactly like with ReadLine, the only difference is that you can access other things like <em>the whole line</em> and <em>the whole history</em> in real time, which can be really handy at times!</li> +</ul> +<p>Here&#8217;s a simple example:</p> +<div class='ruby'><pre><code>editor.completion_proc = lambda do |word| + if word + ['select', 'update', 'delete', 'debug', 'destroy'].find_all { |e| e.match(/^#{Regexp.escape(word)}/) } + end +end</code></pre></div><h3>Custom key bindings</h3> +<p>All these pretty things are obviously bound to some keystrokes. If the key corresponds to only one code, everything is fine, but because special keys typically aren&#8217;t so it was necessary to implement a mechanism to track an escape key (e.g. 0xE0 and 0 on Windows and \e on Linux) and listen to further characters, in case a known sequence is found. Anyhow, the final result of the method used for character binding is the following:</p> +<p><code>bind(key, &amp;block)</code></p> +<p>Where key can be:</p> +<ul> + <li>A <code>Fixnum</code> corresponding to a single character code</li> + <li>An <code>Array</code> of one or more character codes</li> + <li>A <code>String</code> corresponding to an escape sequence</li> + <li>A <code>Symbol</code> corresponding to a known escape sequence or key</li> + <li>A <code>Hash</code> to define a new key or escape sequences</li> +</ul> +<p>So, in the end you can do things like this:</p> +<div class='ruby'><pre><code>editor.bind(:left_arrow) { editor.move_left } +editor.bind("\etest") { editor.overwrite_line("Test!!") } +editor.bind(?\C-z) { editor.undo } +editor.bind([24]) { exit }</code></pre></div><p>Which, for Rubyists, it&#8217;s far sexier and more flexible than editing an .inputrc file.</p> +<h3>How do I use it, anyway?</h3> +<p>A code example is better than a thousand words, right? So here you are:</p> +<div class='ruby'><pre><code>#!/usr/local/bin/ruby -w + +require 'rubygems' +require 'rawline' + +puts "*** Inline Editor Test Shell ***" +puts " * Press CTRL+X to exit" +puts " * Press CTRL+C to clear command history" +puts " * Press CTRL+D for line-related information" +puts " * Press CTRL+E to view command history" + +editor = RawLine::Editor.new + +editor.bind(:ctrl_c) { editor.clear_history } +editor.bind(:ctrl_d) { editor.debug_line } +editor.bind(:ctrl_e) { editor.show_history } +editor.bind(:ctrl_x) { puts; puts "Exiting..."; exit } + +editor.completion_proc = lambda do |word| + if word + ['select', 'update', 'delete', 'debug', 'destroy'].find_all { |e| e.match(/^#{Regexp.escape(word)}/) } + end +end + +loop do + puts "You typed: [#{editor.read("=&gt; ").chomp!}]" +end</code></pre></div><p>This example can be found in examples/rawline_shell.rb within the RawLine source code or gem package.</p> +<h2>Current status and availability</h2> +<p>I currently <a href="http://rubyforge.org/forum/forum.php?forum_id=22543">released</a> RawLine 0.1.0 on <a href="http://rubyforge.org/projects/rawline">SourceForge</a>, and it can be installed via:</p> +<p><code>gem install -r rawline</code></p> +<p>The RDoc documentation is available <a href="http://rawline.rubyforge.org/">here</a>.</p> +<p>Feel free to try it out. First of all try the <code>rawline_shell.rb</code> example, and see if it works on your machine. If it doesn&#8217;t than maybe you try re-binding some keys (use <code>key_tester.rb</code> to &#8220;reverse-engineer&#8221; your terminal&#8217;s input escape sequences), and let me know!</p> +<p>Status information and limitations:</p> +<ul> + <li>It has been tested on Windows (XP, using the usual command prompt) and on Linux (ZenWalk, using <span class="caps">XFCE</span> Terminal).</li> + <li>It can handle lines no longer than the maximum terminal width &#8211; 2. This is to ensure that the cursor never &#8220;falls down&#8221; to the next line.</li> + <li>On Windows, the cursor doesn&#8217;t blink immedialy when moving left, but it moves, don&#8217;t worry.</li> + <li>On Linux, you should really consider installing the <a href="http://raa.ruby-lang.org/project/ruby-termios/">Termios</a> library for a faster experience (otherwise <code>get_character</code> won&#8217;t parse characters correctly if you press and hold a key, and that, trust me, is a real mess!).</li> + <li>RawLine is very far from being a complete replacement for the ReadLine library, and it is currently in alpha stage.</li> + <li>Release 0.1.0 has been created after 2 weeks of sporadic coding during lunch breaks and week-ends.</li> +</ul> +<p>For any ideas on where to go from here, comments and feedback, just reply below or send an email to my usual email address.</p>
A contents/articles/inline-name-change.html

@@ -0,0 +1,18 @@

+----- +title: InLine name change: what's your opinion? +content-type: article +timestamp: 1206595800 +tags: ruby|programming|opensource|rawline +----- +<p>I&#8217;ve been kindly asked by the lead developer of <a href="http://www.zenspider.com/ZSS/Products/RubyInline/">RubyInLine</a> to change the name of my <a href="http://rubyforge.org/projects/inline/">InLine</a> project, due to potential confusion and conflicts.</p> +<p>This makes sense, and I&#8217;m ready to change the name of my project, although I&#8217;m not that good at choosing original and <em>smart</em> names, so well, any suggestion is more than welcome!</p> +<p>I was thinking of something like:</p> +<ul> + <li>RawLine</li> + <li>EditLine</li> + <li>RawInput</li> + <li>RubyInput</li> + <li>RubyLine</li> +</ul> +<p>I personally think that <strong>RawLine</strong> is probably the best option, but please, if have any better idea just speak up!</p> +<p>P.S.: &#8220;RedLine&#8221; is taken, unfortunately, otherwise it would have been my first choice since the beginning.</p>
A contents/articles/introducing-glyph.html

@@ -0,0 +1,79 @@

+----- +title: Introducing Glyph +content-type: article +timestamp: 1270834239 +tags: glyph|ruby|frameworks|writing +----- +<p>I&#8217;ve been writing technical documents for a living for the past four years, and I can tell you: there is no easy way to go about it.</p> +<p>For example, you can use:</p> +<ul> + <li><strong>a Word Processor</strong> like MS Word, for example &#8212; anyone can do that, right? Sure, but no, thanks: I strongly believe that Word Processors should not be used for writing technical documents as I firmly don&#8217;t believe GUIs are suitable for doing this at a professional level.</li> + <li><strong>a Document Authoring Software</strong> like Adobe Framemaker, Robohelp, etc. Still GUIs, only more complicated to use.</li> + <li><strong><span class="caps">XML</span>, like <span class="caps">DITA</span> or DocBook, or other markups</strong>, like ReStructuredText. Better, but still not easily extensible and flexible enough.</li> + <li><strong>your company&#8217;s tools</strong>, if you have them. That&#8217;s great if they are usable enough and the result makes your boss happy.</li> + <li><strong>LaTeX</strong>, and that&#8217;s probably your best option, if you know what you&#8217;re doing.</li> + <li><strong><span class="caps">XHTML</span> and CSS3</strong>, in conjunction with a <span class="caps">PDF</span> renderer like <a href="http://www.princexml.com/">Prince <span class="caps">XML</span></a> &#8212; that&#8217;s great if you know <span class="caps">HTML</span> and <span class="caps">CSS</span>, and you don&#8217;t mind hand-crafting the structure of the document.</li> +</ul> +<h3>Lightweight markups</h3> +<p>I love Textile and Markdown. When people aren&#8217;t looking, I even use them at work to generate <span class="caps">HTML</span> code, because it&#8217;s just so much faster. Textile in particular can be used as a drop-in replacement for <span class="caps">HTML</span> (and a bit of LaTeX, too), as it can produce most inline <span class="caps">HTML</span> tags effortlessly and some block-level tags, too.</p> +<p>For things like <code>&lt;div&gt;</code> tags and <code>&lt;tables&gt;</code> though, Textile is not the best thing in the world, so you normally end up falling back to <span class="caps">HTML</span>.</p> +<p>Another &#8220;problem&#8221; is that <strong>Textile</strong> or other similar lightweight markups cannot be extended easily, simply because they were not meant to be extended in the first place.</p> +<p>Moreover, if you are producing a book, Textile can&#8217;t help you if you want to generate things like a Table of Contents automatically or validate links: those things are simply not part of Textile&#8217;s job.</p> +<h3>How Glyph can help</h3> +<p style="float:right;"><img src="/img/pictures/glyph.png" alt="" /></p> +<p>There are a few projects on the Internet that tackle structured document generation. One of them is <a href="http://github.com/fnando/kitabu">Kitabu</a>, which looks promising and is able to produce pretty documents using Textile and Prince for <span class="caps">PDF</span> rendering&#8230; but again, it&#8217;s not extensible because it relies too much on Textile and Markdown.</p> +<p><a href="/glyph/">Glyph</a> is different. For one, it is much younger than any other, therefore it is most likely full of bugs.</p> +<p>Jokes aside, Glyph follows a much more radical approach, which consists in using a <em>macro language</em> on top of Textile or Markdown. The good thing about it is that this macro language is very simple to learn and &#8212; most importantly &#8212; very easy to extend.</p> +<p>Here&#8217;s an example:</p> +<div class='text'><pre><code>section[header[Something about Glyph] +You can use Glyph macros in conjunction + with _Textile_ or _Markdown_ to +produce HTML files effortlessly. + section[header[What about PDFs?|pdf] +Once you have a single, well-formatted HTML +file, converting it to PDF is +extremely easy with a 3rd-party +renderer like =&gt;[http://www.princexml.com|Prince]. + ] +]</code></pre></div><p>Which translates to:</p> +<div class='html'><pre><code>&lt;div class="section"&gt; + &lt;h2 id="h_1"&gt;Something about Glyph&lt;/h2&gt; + &lt;p&gt;You can use Glyph macros in conjunction with + &lt;em&gt;Textile&lt;/em&gt; or &lt;em&gt;Markdown&lt;/em&gt; to + produce HTML files effortlessly.&lt;/p&gt; + &lt;div class="section"&gt; + &lt;h3 id="pdf"&gt;What about PDFs?&lt;/h3&gt; + &lt;p&gt;Once you have a single, well-formatted HTML + file, converting it to PDF is + extremely easy with a 3rd-party renderer + like &lt;a href="http://www.princexml.com"&gt;Prince&lt;/a&gt;.&lt;/p&gt; + &lt;/div&gt; +&lt;/div&gt;</code></pre></div><p>Glyph macros can be used to:</p> +<ul> + <li>Generate block-level <span class="caps">HTML</span> tags not commonly managed by lightweight markups, like <code>head</code>, <code>body</code>, <code>div</code> and <code>table</code>.</li> + <li>Create and validate internal and external links.</li> + <li>Include and validate images and figures.</li> + <li>Automatically determine header levels based on the document structure.</li> + <li>Automatically generate a Table of Contents based on the document structure.</li> + <li>Store common snippets of text in a single <span class="caps">YAML</span> file and use them anywhere in your document, as many times as you need.</li> + <li>Store configuration settings in a <span class="caps">YAML</span> file and use them anywhere in your document, as many times as you need.</li> + <li>Evaluate Ruby code within your document.</li> + <li>Call macros from other macros (including snippets), carefully avoiding mutual calls.</li> + <li>Include text files in other text files.</li> + <li>Include the contents of configuration settings (author, title) in the document.</li> + <li>Filter input explicitly or implicitly, based on file extensions when including files.</li> + <li>Manage comments and todo items.</li> +</ul> +<p>An example Glyph project? Sure, Glyph&#8217;s own guide (<a href="https://github.com/h3rald/glyph/tree/master/book/">source</a> &#8212; <a href="http://cloud.github.com/downloads/h3rald/glyph/glyph.pdf"><span class="caps">PDF</span> output</a>).</p> +<h3>Technical Details</h3> +<p>Glyph is built on top of the following Ruby Gems:</p> +<ul> + <li><a href="http://github.com/davetron5000/gli">gli</a> &#8212; For the high-level command line interface.</li> + <li><a href="http://rake.rubyforge.org/">rake</a> &#8212; For the mid-level interdependent task layer.</li> + <li><a href="http://treetop.rubyforge.org/">treetop</a> &#8212; For parsing Glyph Language, whose grammar is <a href="http://github.com/h3rald/glyph/blob/master/lib/glyph/glyph_language.treetop">ridiculously simple</a>, but it seems to work so far.</li> + <li><a href="http://rubyforge.org/projects/extlib/">extlib</a> &#8212; Because I can&#8217;t leave without it.</li> +</ul> +<h3>Disclaimer</h3> +<p>Glyph is <strong>alpha software</strong> (hence the 0.1.0 version number) &#8212; handle with care and be aware that <em>everything</em> could change tomorrow. If you want to keep up-to-date and/or provide feedback, feel free to join <a href="http://groups.google.com/group/glyph-framework">Glyph&#8217;s User Group</a>.</p> +<h3>For more information&#8230;</h3> +<p>&#8230;head over to <a href="/glyph/">Glyph&#8217;s homepage</a>.</p>
A contents/articles/introducing-redbook.html

@@ -0,0 +1,24 @@

+----- +title: Introducing RedBook (and the new Code section) +content-type: article +timestamp: 1191024720 +tags: ruby|productivity|software|tools|redbook +----- +<p>I&#8217;m somehow pleased to announce the opening of a new section on this site. Nothing too big actually, it&#8217;s just a <a href="/code/">page</a> with a few (one for now) brief descriptions of open source programs and scripts I made and I&#8217;d like to share with my readers.</p> +<p>Don&#8217;t expect fancy stuff: (luckily) I don&#8217;t code for a living, I code for pleasure and I code small things. Lately I&#8217;ve been trying to write a small Ruby program able to log my daily activities and also display them in a pleasant enough way, so I started using my lunch breaks at work more constructively and I came up with <a href="/code/">RedBook</a> an interactive command-line program written in Ruby.</p> +<p>Main features:</p> +<ul> + <li>Log timestamped and <em>tagged</em> messages to a single <span class="caps">YAML</span> file</li> + <li>Load and display messages containing a certain string, or certain tags or within a time frame.</li> + <li>Calculate the time elapsed between two or more tasks.</li> + <li>Export loaded messages to <span class="caps">YAML</span>, <span class="caps">TXT</span> or <span class="caps">CSV</span> format.</li> +</ul> +<p>All done via command line via simple commands:</p> +<p><strong>&#58;log</strong> This is a test message <strong>&#58;tags</strong> test</p> +<p><strong>&#58;load</strong> <strong>&#58;last</strong> 30 <strong>&#58;from</strong> last week</p> +<p><strong>&#58;timecalc</strong> 2 5</p> +<p><strong>&#58;save</strong> test.txt</p> +<p>Thanks to the wonderful <a href="http://chronic.rubyforge.org/">Chronic</a> library, you can specify your time frames using natural language expressions like &#8220;8 in the morning&#8221;, &#8220;this tuesday&#8221;, &#8220;last month&#8221; and so on&#8230;</p> +<p>Here&#8217;s a screenshot showing RedBook in action:</p> +<p><img src="/files/redbook.png" alt="" /></p> +<p>RedBook is of course free, open source software licensed under the terms of the <span class="caps">BSD</span> license. It can be installed on any machine able to run Ruby and there&#8217;s also an <span class="caps">EXE</span> version for the lazy windows folks who don&#8217;t want to install Ruby, packed with <a href="http://www.erikveenstra.nl/rubyscript2exe/index.html">RubyScript2Exe</a>. A more in-depth article explaining how RedBook works <del>will hopefully be completed soon</del> is available <a href="http://www.h3rald.com/articles/redbook">:here</a></p>
A contents/articles/introducing-ruby-compendium.html

@@ -0,0 +1,16 @@

+----- +title: Introducing the Ruby Compendium +content-type: article +subtitle: An Essential Guide to the Ruby Ecosystem +timestamp: 1295802135 +tags: ruby-compendium|books|ruby +----- + + <section class="section"> +<p>Learning a programming language can be hard and time consuming. You normally have to go through a bunch of tutorials, ask questions, read books&#8230; Ruby is no exception: there are plenty of resources out there about it, but it is often hard to find what you&#8217;re looking for. So, as a weekend project, I decided to create a <em>Ruby Compendium</em>, a short book about the Ruby Ecosystem.</p> +<p>I guarantee that you <em>will not</em> be able to code in Ruby after reading this book. Yes, you read it right, this book is not about coding, it&#8217;s about learning what&#8217;s out there for you that can help you to learn how to program in Ruby. Information on Ruby implementations, versions, web sites, books, podcasts, a handful of Ruby gems to solve common problems&#8230; it&#8217;s all in there.</p> + +<p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>, and you can help improving it! It was written using my very own <a href="http://www.h3rald.com/glyph">Glyph Framework</a>, and the entire source code is available on <a href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> +<div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download (<span class="caps">PDF</span>)</a></div> + +</section>
A contents/articles/journotwit-review.html

@@ -0,0 +1,145 @@

+----- +title: JournoTwit - The best way to organize your tweets +content-type: article +timestamp: 1257434357 +tags: review|web20|internet|software +----- +<p>Since I started using <a href="http://www.twitter.com">Twitter</a> on a regular basis, I felt overwhelmed by the endless stream of data generated by the people I was following.</p> +<p>The official Twitter page quickly became inadequate to manage my tweets, so I began to search for an alternative through the myriad of Twitter clients available out there, both web and desktop based. After trying out a few desktop clients, I decided to restrict the search to web clients only: between work and home, I may use up to 4 different computers and 3 different operating system, and I really didn&#8217;t fancy the idea of keeping the <em>same</em> client up-to-date everywhere &#8212; even if such client existed.</p> +<p>Over the past months I tried dozens of different web-based Twitter clients, and narrowed the list of <em>must-have</em> features to the following:</p> +<ul> + <li>The interface should be simple to use and not too cluttered.</li> + <li>I should be able to categorize tweets in columns (&agrave; la TweetDeck).</li> + <li>I should be able to know, when visiting the site, how many <em>new</em> tweets I have to go through.</li> + <li>I should be able to mark tweets as read.</li> + <li>It should display media files (at least pictures) inline with the tweets.</li> + <li>The interface should provide all the most common twitter actions like reply, retweet, follow/unfollow, shorten url, upload pictures etc. etc.</li> +</ul> +<p>The good news is that I found at least <em>one</em> web-based client able to do all this: <a href="http://www.journotwit.com">JournoTwit</a>.</p> +<h3>Introducing JournoTwit</h3> +<p>JournoTwit was born &ndash; as many software projects &ndash; to scratch an itch:</p> +<blockquote> +<p>Probably the last thing anyone was expecting me to do &mdash; even myself, was to create my own twitter client. However, I&#8217;ve been a little fed up with not having the features I wanted and running 5 or 6 accounts, I was getting annoyed at using several different applications just to have them logged in concurrently. [&#8230;] In under 24 hours I put together a twitter client that functioned enough for me to call it my one and only. A few more days and I added in enough features that I felt it was good enough for public consumption. It is however, not perfect and I have plenty of improvements on my to do list for it.</p> +</blockquote> +<p style="padding-left:3em;"><cite><a href="http://www.spodesabode.com/discussion/280/journotwit-the-twitter-client-thats-not-just-for-journalists/">JournoTwit&#8217;s introductory post</a></cite> by Andrew Spode Miller (<a href="http://twitter.com/spode">@spode</a>)</p> +<p>After months of <em>public consumption</em>, JournoTwit became a feature-packed Twitter client able to compete with a lot of mainstream alternatives &ndash; albeit remaining always relatively unknown to the masses. You can call it a <em>niche</em> Twitter client, able to satisfy a few basic needs:</p> +<ul> + <li>The ability to manage multiple Twitter accounts at once.</li> + <li>The ability to categorize all incoming tweets automatically, according to the type of information within them.</li> + <li>The ability to keep track of unread tweets.</li> +</ul> +<p>These three features alone were enough to make JournoTwit my one and only Twitter client. And no, it&#8217;s not only for journalists and writers.</p> +<h3>Interface overview</h3> +<p>After logging in, JournoTwit looks like this:</p> +<p><img src="/img/pictures/journotwit/interface.png" alt="" /></p> +<p><b>Note:</b> I am using the <em> <a href="http://www.journotwit.com/edge/">edge</a> </em> version of JournoTwit, a sort of development snapshot with the latest features.</p> +<p>At the top, some more-or-less intuitive icons allow you to perform all the most common <em>global</em> actions:</p> +<ul> + <li>Tweet</li> + <li>Manual refresh</li> + <li>Mark all columns as read</li> + <li>Add new columns</li> + <li>Quick search</li> + <li>Edit settings</li> + <li>Logout</li> +</ul> +<p>Next to this global toolbar, there&#8217;s a list of links, each corresponding to a column. Clicking a link toggles the visibility of the corresponding column.</p> +<p>In each column, tweets are displayed in different column according to their state:</p> +<ul> + <li>Read</li> + <li>Unread</li> + <li>Selected</li> +</ul> +<p>You can select one tweet at a time by clicking the <strong>+</strong> icon. This toggles the tweet-specific actions:</p> +<ul> + <li>Reply</li> + <li>Send a direct message</li> + <li>Save as favorite</li> + <li>Retweet</li> + <li>Translate</li> +</ul> +<p>Pretty intuitive and easy to use, so far.</p> +<h3>Default columns</h3> +<p>When you login, you&#8217;ll notice that all your tweets are <em>not</em> presented in the traditional, disorganized single-column stream layout. Instead, they are <em>sorted automatically</em> into different columns, according to their type:</p> +<dl> + <dt>My Feed</dt> + <dd>All the tweets <em>you</em> sent. By default, this column is minimized.</dd> + <dt>No-Mention</dt> + <dd>All tweets containing your username without the &#8220;@&#8221;, i.e. every time someone mentions you sneakily, without sending you a reply.</dd> + <dt>Messages</dt> + <dd>All the direct messages you sent and received.</dd> + <dt>Mentions</dt> + <dd>All the tweets containing your twitter username (with &#8220;@&#8221;), such as replies to your tweets.</dd> + <dt>Statuses</dt> + <dd>All the tweets posted by people you follow that do not contain any link or cannot be categorized through other columns.</dd> + <dt>News</dt> + <dd>All the tweets posted by people you follow containing links to articles or non-multimedia web pages.</dd> + <dt>Retweets</dt> + <dd>All the retweets posted by people you follow.</dd> + <dt>Visual</dt> + <dd>All the tweets posted by people you follow containing links to pictures or videos. Where possible, media is displayed inside the tweet.</dd> + <dt>Audio</dt> + <dd>Same as above, but for audio items.</dd> + <dt>Chatter</dt> + <dd>Attempts to collect all conversations involving you or people you follow.</dd> +</dl> +<p>Surprisingly, these default columns are enough to make your Twitter experience easier and more manageable, without configure a single setting. They&#8217;re obviously not perfect: some images are not resolved automatically, for example, but it works well otherwise.</p> +<p>Still this may not be enough for your needs or maybe simply not the right thing. No problem: JournoTwit is extremely flexible when it comes to organizing and sorting out your tweets.</p> +<h3>Adding new columns</h3> +<p>All columns except for <em>Mentions</em> and <em>Messages</em> can be modified as you see fit. These two columns cannot be modified simply because there&#8217;s nothing you <em>need</em> to modify it, if you think about it. But they can be deleted, of course (and re-created in a blink, if you delete them by mistake).</p> +<p>Let&#8217;s go through the slightly geeky process of creating a column.</p> +<p>When you click the <b>Add New Columns</b> icon on the top-left corner you&#8217;ll be prompted to further clarify whether you want to add a&#8230;</p> +<ul> + <li>Set of Columns: i.e. the default columns provided by journotwit <em>or</em> a single column containing all the tweets. Useful if you mess things up and you want to start over again.</li> + <li>Preset Column: choose from many different columns according to your needs, from different tweet types to memes (#followfriday, #musicmonday, etc.).</li> + <li>Custom Column: create your own personal column, according to your specific needs.</li> +</ul> +<p>Because the overwhelming majority of my readers is composed by geeks, I&#8217;ll just describe how to create a custom column, so that you can fully understand the power of this tool, in the right hands.</p> +<h3>Adding a custom column</h3> +<p style="float:right;"><img src="/img/pictures/journotwit/custom_column.png" alt="" /></p> +<p>The creation of a custom column doesn&#8217;t take long, but there are quite a few things you can configure. First off, you have to specify whether you want the column to collect <em>local</em> or <em>global</em> tweets: local means the people you follow, while global means everyone on the planet. Simple enough.</p> +<p>Then comes the juicy geeky part: search terms and tags. Simply type a valid <a href="http://search.twitter.com/operators">Twitter Search query</a> in the textbox, so something like this:</p> +<p><code>from:jonobacon OR #ubuntu -jaunty</code></p> +<p>&#8230;will hopefully fetch all tweets posted by <a href="http://www.twitter.com/jonobacon">@jonobacon</a> or tweets about Ubuntu, but not related to the Jaunty Jackalope release. You can also add more text box and thus perform more search queries within the same column.</p> +<p>Then you can filter by tweet type, enabling or disabling Statuses, Visual, Links, Audio, ReTweets and Chatter. Useful to remove the noise (if you follow <a href="http://www.twitter.com/brentspiner">@brentspiner</a>, make sure you disable <em>ReTweets</em>&#8230;).</p> +<p>Finally, you only have to configure a few more settings:</p> +<ul> + <li>Whether you want to be alerted with a <em>beep</em> when there are new tweets in this column.</li> + <li>Whether you want the column to display tweets, a tag cloud or even an image slideshow.</li> + <li>The name of the column.</li> +</ul> +<p>That&#8217;s all. Simple enough. As a side note, the &#8220;No-Mention&#8221; column is nothing but a custom column in disguise: if you try to edit it, you&#8217;ll see it&#8217;s nothing but a search for &#8220;<em>username</em> -<em>@username</em> -from:<em>username</em>&#8221;.</p> +<h3>Other features and advanced settings</h3> +<p>For the tweakers, JournoTwit also exposes the a set of global settings you can modify to enhance your experience or disable annoying behaviors (depends how you look at it):</p> +<h4>Behavior</h4> +<ul> + <li>Unhide column when new tweets arrive? (default: yes)</li> + <li>Hide columns on Mark as Read? (default: yes)</li> + <li>Play alert sounds? (default: yes)</li> + <li>Animate when new items arrive? (default: yes)</li> + <li>Default #hashtags and search bar to a local search? (default: no)</li> + <li>Ignore Tag Coulds when marking all as read? (default: yes)</li> + <li>Ignore Slide Shows when marking all as read? (default: yes)</li> + <li>Warn when deleting columns? (default: yes)</li> + <li>Automatically translate tweets using Google Translate? (default: no)</li> + <li>Show &#8220;Did You Know?&#8221; messages on refresh? (default: yes)</li> + <li>Slide show transition time(s) (default: 5)</li> +</ul> +<h4>Display Adjustment</h4> +<p>If you are unsatisfied by JournoTwit&#8217;s default look and feel, you can change the fond size, the color theme (there are 18 possible choices) and even match the color of the icons with the current theme.</p> +<h4>Black Listing</h4> +<p>Straight from the contextual help:</p> +<blockquote> +<p>&#8220;Here you globally black list a #hashtag, such as #microsoft, or a search phrase such as &#8220;Windows 7&#8221;. Remember to separate them with a space and that you can block on a per column basis too.&quot;</p> +</blockquote> +<p>This is just what you need when you want to filter out pointless tweets. Use with care though!</p> +<h3>Conclusion</h3> +<p>Maybe it&#8217;s just me being a geek, but I think JournoTwit nailed it when it comes to making Twitter more productive: everything <em>just works, and fast</em>, unlike some of its more feature-boasting competitors. I have been using it on a daily basis for weeks, and I&#8217;ve never missed a single tweet since (unless <em>I explicitly wanted to do so</em>).</p> +<p>That being said, there are a few small features I&#8217;d like to see:</p> +<ul> + <li>I&#8217;d like to be able to mark <em>single tweets</em>, not entire columns, as read. In this way, when I go on vacation and come back, I can catch up with unread tweets more gradually, like I do with Google Reader.</li> + <li>I&#8217;d like to use shortcut keys to navigate the interface, like with Google Reader.</li> + <li>I&#8217;d like to configure tweets so that they only show up in one column, not in more than one (for example in Chatter, My Feed, and Mentions at the same time).</li> + <li>Support for Twitter Lists&#8230;</li> +</ul> +<p>I already told <a href="http://twitter.com/spode">@spode</a> about some of these, and he said he&#8217;ll look into it, we&#8217;ll see what happens. Anyhow, just <a href="http://www.journotwit.com">give it a try</a>, and see if you like it!</p>
A contents/articles/komodo-edit-review.html

@@ -0,0 +1,118 @@

+----- +title: A closer look at Komodo Edit +content-type: article +subtitle: A comprehensive review of the free editor from ActiveState +timestamp: 1195971780 +tags: review|programming|software +----- +<p><a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"><br /> +<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /><br /> +</a></p> +<p><em>What&#8217;s your favorite code editor?</em></p> +<p>This is a common question which still keeps popping up on community boards, mailing lists, comments, etc. Every programmer who writes code in some programming language normally has an editor of choice. Being realistic, most of the times it&#8217;s not only one program but several, depending on the language and on the features needed at the time.<br /> +Yes, great, but how do you choose your favorite editor?<br /> +By trying a lot of them of course: that&#8217;s what I&#8217;ve been doing since I started programming. Lately I&#8217;ve become fond of <a href="http://www.vim.org">Vim</a> (or better, gVim), although I have a few other editors I may recommend, e.g.:</p> +<ul> + <li><a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a></li> + <li><a href="http://intype.info/home/index.php">Intype</a></li> + <li><a href="http://scintilla.sourceforge.net/SciTE.html">SciTE</a></li> +</ul> +<p>Recently, however, I came across my <em>n^th^</em> &#8220;what&#8217;s your favorite editor&#8221; thread and someone mentioned <a href="http://www.activestate.com/Products/komodo_edit/">Komodo Edit</a>. I knew of it already, actually, but I never had a chance to give it a <em>proper</em> try. <br /> +ActiveState is well known mainly for two things:</p> +<ul> + <li>Their effort in offering a lot of commercial, windows-based Perl libraries</li> + <li>Their commercial <span class="caps">IDE</span>, Komodo <span class="caps">IDE</span>, which I personally tried quite a long time ago</li> +</ul> +<p>The problems of Komodo <span class="caps">IDE</span> are foundamentally two:</p> +<ul> + <li>It costs money &#8211; this is not great in a world where Eclipse and Netbeans are free</li> + <li>It is an <span class="caps">IDE</span> &#8211; which normally means <em>&#8216;heavy as hell&#8217;</em>.</li> +</ul> +<p>It&#8217;s a matter of taste and needs: some people feel more confortable with using an editor for certain tasks, while sometimes an <span class="caps">IDE</span> may be the best solution, despite its potential slowness and bulk.</p> +<p>Komodo Edit solves the above-mentioned problems because:</p> +<ul> + <li>It&#8217;s free</li> + <li>It&#8217;s an editor</li> +</ul> +<p>Actually I wouldn&#8217;t call it an editor, because it offers quite a lot of features which are normally absent in editors &#8212; it&#8217;s something in-between, which definitely deserves a try.</p> +<h2>User interface</h2> +<p>Komodo Edit&#8217;s interface is one of the most clear I&#8217;ve ever come across. It is organized in four main areas plus the top menu and toolbar (which only has the buttons you <span class="caps">REALLY</span> need, unlike Notepad++&#8217;s 31-button-bar).</p> +<p><img src="/files/komodo_main.png" alt="" /></p> +<p>The central area is for editing, the left pane is for the Project browser, the right one is for the Toolbox and the bottom pane is for command output. Luckily enough, a set of handy little buttons is provided in the toolbar to show and hide each pane. I normally only use the Project Browser and the main editing area, leaving the Toolbox and Command Output panes hidden, but that&#8217;s up to you really.</p> +<p style="float:left;"><img src="/files/komodo_show-hide_pane.png" alt="" /></p> +<p>Komodo Edit allows symultaneous editing of multiple documents, which means that it has tabs like most of the best editors out there. Furthermore, it is possible to have Komodo re-open the files edited in the last editing session, saving you a lot of time. Granted, a lot of <span class="caps">IDE</span> do, but this is <strong><span class="caps">NOT</span></strong> an <span class="caps">IDE</span>, remember? It&#8217;s an <em>editor</em>, or at least it is advertised as such.</p> +<p>In reality it has <em>most</em> of the power of a full-blown <span class="caps">IDE</span> though normally remaining under the 60K memory usage (out of 2GB of total <span class="caps">RAM</span>) &#8212; which is not that bad, considering what Eclipse and NetBeans need.<br /> +Out of all the <a href="http://www.activestate.com/Products/komodo_edit/edit_vs_ide.plex">extra features</a> offered by Komodo <span class="caps">IDE</span>, the only one I truly miss is the Code Browser. Other than that, it quickly became my editor/<span class="caps">IDE</span> of choice (when gVim isn&#8217;t looking, of course&#8230;)</p> +<p>Lets find out why&#8230;</p> +<h2>Editing features</h2> +<p>Komodo Edit comes with all the editing features of ever average editor, so <em>&#8220;[&#8230;] Code commenting, auto-indent and outdent, block selection, incremental search, reflow paragraph, join lines, enter next character as raw literal, repeat next keystroke and clean line endings on &#8220;save&#8221;.&quot;</em>, it uses Scintilla as main editing component, which makes it a close relative of Notepad++, Notepad2 and of course SciTE when it comes to understanding languages and syntax highlighting.</p> +<p>This is good, of course, as Scintilla is an excellent editing component, but &#8211; I have to say this &#8211; not as good as Vim when it comes to syntax highlighting (nothing is as good as Vim though, so I can&#8217;t really complain!).<br /> +As you can see from the screenshot I included earlier on, it is possible to change the default black-on-white color scheme to something more stimulating and energy-saving. This doesn&#8217;t mean I have to manually re-set the color of each element, it actually comes with a black-background scheme, which is handy.</p> +<h3>Supported Languages &amp; Syntax Highlighting</h3> +<p>Komodo Edit supports quite a few programming languages, which means it can recognize the most common ones (C, C++, Java, <span class="caps">PHP</span>, Python, Ruby, Perl) but it also smart enough to notice framework-specific syntaxes like Smarty, Django or <span class="caps">RHTML</span>.<br /> +Like every scintilla-based editors, it sports a nice <span class="caps">HTML</span> multi-highlighter which allows you to keep putting all the Javascript, <span class="caps">CSS</span> and server-side scripting into the same file, <span class="caps">GREAT</span>! No, you probably wouldn&#8217;t want to do that, but it&#8217;s a good thing to have.</p> +<h3>Auto-completion</h3> +<p>What makes this editor a really handy tool is its auto-completion capabilities. Why? well, because it supports:</p> +<ul> + <li>Ruby: require, class modules (on . and ::), class variables and methods, method calltips.</li> + <li>Python</li> + <li>Perl</li> + <li><span class="caps">PHP</span></li> + <li><span class="caps">XSLT</span></li> + <li><span class="caps">XML</span></li> + <li>Tcl</li> +</ul> +<p>Why is this so special? Well, because if you want this you normally need an <span class="caps">IDE</span>, and if you want it for Ruby <span class="caps">AND</span> Python <span class="caps">AND</span> Perl your choices are very limited. <br /> +I played with the Ruby auto-completion features quite a bit, and I&#8217;m actually really impressed.</p> +<p style="float:right;"><img src="/files/komodo_auto-completion.png" alt="" /></p> +<p>It can suggest what to write through calltips after a <code>require</code> directive, after a . and a ::, and hitting CTRL+SPACE (or just tab if you configure the right option) will auto-complete what you&#8217;re writing, be it a language keyword, a variable of any kind or a method. Additionally, it comes with &#8220;soft characters support&#8221;, which means it will try to match ( [ { when possible, allowing you to <em>write over</em> the completed character if you want to.</p> +<h3>Syntax Checking, Vi/Emacs key bindings and code folding</h3> +<p>The heading is almost self-explanatory here: Komodo Edit supports code folding (you can even chose the folding chracters!) for all its supported languages, syntax checking (it can detect and display errors before running the script, very useful in Ruby, and hard to find in other editors) and Vi/Emacs key bindings. <br /> +It also offers &#8220;vi emulation&#8221;, which is constantly improving through every release &#8211; so you won&#8217;t forget Vim&#8217;s keys when I don&#8217;t use it: very nice, and again, hard to find in other editors, nevermind IDEs!</p> +<h2>Projects and Tools</h2> +<p style="float:right;"><img src="/files/komodo_toolbox.png" alt="" /></p> +<p>The Project Browser and Toolbox are two features which are normally presents in IDEs and which are normally not found in editors. Granted, some editors like <a href="http://www.pspad.com/en/">PSPad</a> do indeed have &#8220;projects&#8221;, but most of the others don&#8217;t. A <em>project</em> in Komodo Edit is normally composed by:</p> +<ul> + <li>Some <em>Live Folders</em> including all the source files of the application you&#8217;re developing</li> + <li>An optional set of tools, commands, snippets and other goodies which may help you coding that particular application.</li> +</ul> +<p>It is possible to create these tools by clicking the <strong>Add Item to current project</strong> button in the Projects toolbar or by clicking the <strong>Add Item to Toolbox</strong> button just over the toolbox. <br /> +Either way, you can choose among the following:</p> +<h4>File/Remote File</h4> +<p>Add a file on your local machine or a remote file hosted on a server you configured via <strong>Edit &gt; Preferences &gt; Servers</strong>. Supported protocols are: <span class="caps">FTP</span>,<span class="caps">FTPS</span>, <span class="caps">SFTP</span>, <span class="caps">SCP</span>.</p> +<h4>Folder</h4> +<p>This will <em>not</em> link to a folder and import local files in Komodo, instead, it will create a container for other tools, not for local files.</p> +<h4>Live Folder</h4> +<p>On the contrary, a live folder links to an actual folder on your machines, and all files and directories inside it are automatically imported. Note that it is possible to choose to include or exclude certain files or directories from being imported by right-clicking the folder and editing its properties.</p> +<h4>Command</h4> +<p>This will create a shortcut to a command to execute. It is possible to specify its parameters, the directory where it will be run, whether its output will be displayed in the Command Output or in a newly-spawned console window, etc. etc.</p> +<h4>Snippet</h4> +<p>TextMate fans will love this. Komodo will let you create a code snippet for later use. Furthermore, it is possible to specify &#8220;tabstops&#8221; to automatically select certain words when tab is pressed (so you can effectively fill in only particular fields of the snippet).</p> +<h4>Template</h4> +<p>A simple but effective way to create code templates.</p> +<h4>Url</h4> +<p>A link which will open a given url.</p> +<h4>Open&#8230; Shortcut</h4> +<p>This will popup an <strong>Open File</strong> dialog in a direcxtory of your choice.</p> +<h4>Macro</h4> +<p>For those who require even more customization, it is also possible to record or code macros in Python or javascript, and then configure their key bindings and triggers.</p> +<h4>Custom Menu/Custom toolbar</h4> +<p>This was really impressive. Sure you can group all your tools in folders in your current project or you can create them in the toolbox to make them available all the time, but it would be cool if <em>the editor itself</em> could make those tools available by default in a toolbar or a menu. Well, that&#8217;s possible: all you need to do is create a new custom menu or toolbar and populate it with your tools by drag and drop. Very, very nice!</p> +<p>This mini-framework to create custom tools can be used to create project templates in a blink. To show this concept, Komodo Edit comes with a Rails template with almost all the tools you need when coding a Ruby on Rails application:</p> +<ul> + <li>Create/delete database</li> + <li>Generators</li> + <li>Migrations</li> + <li>Run server</li> + <li>Example view snippets</li> +</ul> +<h2>Conclusion</h2> +<p>Komodo Edit is an interesting editor which offers a lot of features which are normally only available in IDEs at a smaller memory footprint. Granted, when I want to jot something down I still prefer to fire up gVim, but for a serious coding session, Komodo is the right choice.<br /> +Its close attention to details and its ease of use make developing an even more pleasant experience, although perhaps there&#8217;s still room for improvement, if you&#8217;re really fussy.</p> +<p>Sometimes when you start getting used of its advanced features, the lack of a code browser seems a real shame, but after all, ActiveState must sell their <span class="caps">IDE</span> to someone at some point!</p> +<p>Another thing which I would have liked is the ability to create new syntax highlighting schemes, which Notepad++ and <span class="caps">VIM</span> both offer. Whydoes it bothers me so much? Well, because I&#8217;d like a <a href="http://textism.com/tools/textile/">Textile</a> syntax highlighting scheme for writing blogs and articles. <span class="caps">VIM</span> and Intype seem to be the only ones which offer it out-of-the-box, but there&#8217;s no trace of it in Komodo Edit.</p> +<p>Actually it is possible to create new syntax highlighting schemes and extend Komodo Edit via <a href="http://community.activestate.com/addons"><span class="caps">XUL</span> extensions</a>, exactly like Firefox. After a closer look, the Django syntax was added in this way.</p> +<p>Unfortunately there aren&#8217;t that many extensions available for Komodo Edit, yet, but the <a href="http://community.activestate.com/">Activestate Community</a> seems very active, so you never know. Additionally, the recently-started <a href="http://www.openkomodo.com/">OpenKomodo</a> is a new project created by ActiveState to &#8220;[&#8230;] create an open source platform for building developer environments. ActiveState has open-sourced elements of Komodo Edit, a free multi-language editor for dynamic languages based on Komodo <span class="caps">IDE</span>, to create the Open Komodo code base&#8221;. A new competitor for Eclipse and Netbeans will be available soon?</p> +<p><a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"><br /> +<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /><br /> +</a></p>
A contents/articles/leading-lean-software-development.html

@@ -0,0 +1,94 @@

+----- +title: Book Review: Leading Lean Software Development +content-type: article +subtitle: A lean leadership framework +timestamp: 1293455745 +tags: review|books|software +pdf: true +----- + + <section class="section"> +<p>If you already heard the names Mary and Tom Poppendieck, chances are that you already know what <em>Lean Software Development</em> is. If you don&#8217;t, start from <a href="http://en.wikipedia.org/wiki/Lean_software_development">this Wikipedia page</a>. Mary and Tom coined this term with their first book on the subject <a href="http://www.amazon.com/exec/obidos/ASIN/0321150783/poppendieckco-20">Lean Software Development: An Agile Toolkit</a>, that was followed three years later by <a href="http://www.informit.com/store/product.aspx?isbn=0321437381">Implementing Lean Software Development: From Concept to Cash</a>, and finally by this book: <a href="http://www.informit.com/store/product.aspx?isbn=0321620704">Leading Lean Software Development: Results Are not the Point</a>.</p> +<p>Unlike the two other books, this one is focused about making lean software practices succeed. In some way, it can be compared to <a href="http://www.h3rald.com/articles/succeeding-with-agile-review/">Succeeding with Agile</a>, but while Mike Cohn&#8217;s book focuses entirely on Scrum, this book has a much broader scope. Moreover, the book contains a lot of digressions and stories &mdash;even not directly related to software development&mdash; aimed at understanding particular aspects of Lean Software Development and the Lean movement in general.</p> +<p>The focus is, as the title suggests, on leadership: how can you be a good leader in these difficult, ever-changing times? How can you be agile without loosing your team? How can you improve the existing processes so that they can help you achieve your goals? If you ever asked yourself these questions, this is the right book for you&#8230;</p> + +<section class="section"> +<header><h1 id="h_1" class="toc">Structure and Organization</h1></header> +<p>This book is extremely well-structured. Its Table of Contents follows some very rigid rules which make this book one of the most organized texts I&#8217;ve ever come across. It is divided into six chapters, each organized as follows:</p> +<ul> + <li>A <em>snapshot</em> or an introductory story for the chapter&#8217;s main topic</li> + <li>Four <em>frames</em>, each describing a lean practice or personal quality</li> + <li>A <em>portrait</em> of a leader</li> + <li><em>Your Shot</em>, i.e. some questions and exercises for the readers</li> +</ul> +<p><img src="/img/pictures/books/leadingleanswdev.jpg" style="float:right" /></p> +<p>In total, the book contains 24 frames constituting the &#8220;Big Picture&#8221;, which is actually a very powerful framework for lean software leadership. You can read the book&#8217;s <span class="caps">TOC</span> <a href="http://www.poppendieck.com/llsd.htm">online</a> on the Poppendieck website and read the book&#8217;s Introduction (<a href="http://www.poppendieck.com/pdfs/LLSD_intro.pdf"><span class="caps">PDF</span> link</a>) on the whole concept of <em>framing</em> (yes, both the authors do love photography!).</p> +<p>When I started my career as a technical writer I used to love carefully-structured, simmetrical manuals. After a while, however, I understood that such rigorous structuring can even be dangerous if it becomes an obsession: you end up adding extra &#8220;padding writing&#8221; to make sections roughly match in length, or you start cutting down some other parts, for the same reason. Writing well-balanced books is hard, but I must say that the authors do a very good job with this book: it flows very naturally while keeping to its rigorous structure.</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Chapter 1: Systems Thinking</h1></header> +<p>The first chapter is about customers, what they want and the goals of your system. It describes some interesting high level concepts like <em>failure demand</em> and <em>policy-driven waste</em>, and how to spot opportunities to improve the process.</p> +<p>What I found particularly interesting was the usage of <a href="http://www.cps.gov.uk/publications/finance/process_mapping.html">process maps</a> to analyze an existing process and find bottlenecks or leaks (in terms of time). I was instantly sold on this practice after reading the success story of how a company manage to reduce the overall time to process and solve customer issues simply by connecting customers directly to developers instead of tech support engineers. This is something you can&#8217;t apply everywhere, but after creating a process map for that specific case, the solution was evident.</p> +<p>More generally speaking, this chapter provides a recipe/checklist outlining the sequence of the phases of process improvement and problem solving:</p> +<ol> + <li><em>Understand</em></li> + <li><em>Observe</em></li> + <li><em>Visualize</em></li> + <li><em>Evaluate</em></li> + <li><em>Implement</em></li> +</ol> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">Chapter 2: Technical Excellence</h1></header> +<p>This is the only chapter focusing primarily on technical topics and knowledge. It starts with a very lengthy digression on the history of programming methodologies, aimed at understanding <em>what works and what doesn&#8217;t</em>. Some examples of IT stuff that worked include the Internet, PCs and &#8230;Open Source Software.</p> +<p>This chapter provides a general overview on Software Development as a whole. It contains some interesting information on software complexity and dealing with architectural dependencies, comprehensive sections on testing and continuous integration, and just a half page on refactoring (understandable, seeing that there are already plenty of excellent books on the subject).</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Chapter 3: Reliable Delivery</h1></header> +<p>The <em>Race to the Sky</em> section at the beginning of Chapter 3 is by far the most fascinating of the non-IT stories included in this book. It describes the construction of the Empire State Building in 1930, how it was planned out, what strategies were followed, and why it succeeded (why <em>the construction</em> succeeded: the building itself remained totally unprofitable for quite some time).</p> +<p>There are <a href="http://en.wikipedia.org/wiki/Empire_State_Building#Further_reading">plenty</a> of books on the subject, but Tom and Mary Poppendieck well summarize the key points of this modern-day epic achievement: how to build the tallest skyscraper in the world in a single year. This story teaches us how to work under very tight deadlines, by designing a system to fit constraints, rather than estimating up-front.</p> +<p>This story was perfect to introduce, in the same chapter, concepts like <a href="http://en.wikipedia.org/wiki/Kanban">Kanban</a>, <em>pull scheduling</em> and <em>adaptive control</em>, which only recently have been seriously considered in the world of Software Development but they are becoming more and more relevant.</p> + +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">Chapter 4: Relentless Improvement</h1></header> +<p>Chapter 4 starts with a brief history of the checklist, which was invented in 1935, to be used by airplane pilots. It then moves on to its usage in hospitals, describing how checklists helped dropping infections caused by inserting central venous catheters incorrectly. Why all this? To focus on the concept of <em>process standards</em>, or better, how <em>we</em> can improve processes to accomplish our goals.</p> +<p>Basically, this us what Toyota does: regulations should not be written on stone, but they should reviewed and updated frequently for continuous improvement or <a href="http://en.wikipedia.org/wiki/Kaizen">Kaizen</a>.</p> +<p>Finally, this chapter also briefly introduces a few different ways to perform root-cause analysis, such as using <a href="http://en.wikipedia.org/wiki/Ishikawa_diagram">fishbone diagrams</a>.</p> + +</section> +<section class="section"> +<header><h1 id="h_6" class="toc">Chapter 5: Great People</h1></header> +<p>This chapter and the last one are actually focused on people and management. In this chapter, an unusual (for this kind of books, that is) but intriguing analysis on different countries using the following dimensions:</p> +<ul> + <li>power distance</li> + <li>individualism</li> + <li>masculinity</li> + <li>uncertainty avoidance</li> + <li>long-term orientation</li> +</ul> +<p>Turns out that individualism is abundant in the Western world but not so much in the Far East (who would have thought!), but the opposite applies to power distance. A bit stereotypical, if I may, but not too much: the results are not surprising, especially when it comes to considering different cultures as a whole. Once more, the focus is again on Toyota&#8217;s Kaizen and their culture of <em>respect for the people</em>.</p> +<p>On page 198, the meaning of the subtitle of the book (Results Are not the Point) is revealed: <q>developing the people and the system so that together they are capable to achieve successful results is the point</q>. Agile is precisely about this: focusing on the people.</p> +<p>But what about leaders? This is an aspect of the whole Agile philosophy that I keep stumbling upon: if you want <em>The Team</em> to be in charge, what happens to leadership? As I found out myself working in and with Agile Teams, often there&#8217;s a serious lack of strong leaders. <q>Leadership needs to be gently refactored into Agile</q>, that&#8217;s what Mary and Tom recommend. How? It depends on each specific case, but it must always be done <em>gently</em>.</p> + +</section> +<section class="section"> +<header><h1 id="h_7" class="toc">Chapter 6: Aligned Leaders</h1></header> +<p>The final chapter begins with the history of <em>Agile@IBM</em>, or how to turn the biggest software company in the world into a massive agile machine. It wasn&#8217;t a top-down decision, the <span class="caps">CEO</span> didn&#8217;t just wake up one morning and decided that everyone should go Agile. Quite the opposite: it was something that was <em>pulled</em> by developers rather than <em>pushed</em> at them.</p> +<p>In cases like this, companies should be focusing on developing people, including good leaders, instead of particular initiatives and processes. Leaders in turn should shift their focus from details to more high-level decisions. When it comes to facing changes, leaders should look at the <a href="http://www.bbrt.org/beyond-budgeting/bbprinc.html">12 principles</a> of the <a href="http://www.bbrt.org/"><span class="caps">BBRT</span></a> leadership model.</p> +<p>The final portrait, <em>Leaders at all Levels</em>, well summarizes the key to successful leadership: <q>leadership is about example, coaching and helping others to achieve their goals</q>.</p> + +</section> +<section class="section"> +<header><h1 id="h_8" class="toc">Final Thoughts</h1></header> +<p>If you&#8217;re looking for a manual on implementing Lean Software Development in detail, this is probably not the best book on the subject. If you&#8217;re a developer at the start of your career, with no management responsibilities, you&#8217;d want more technical juice, so probably you should read the other two books by the Poppendiecks on the subject first.</p> +<p>On the other hand, if you have been working in IT for a few years, and maybe you already started to climb up the corporate ladder, reading this book could make the difference between being successful leader or not. This book does not go very in-depth with any particular methodology or process, but it does provide an excellent overview of a lot of them.</p> +<p>To get the best out of <em>Leading Lean Software Development</em>, you should read it a least once sequentially, skipping the parts that are not relevant to you (right now), taking notes on the more interesting frames, and then go back over them to digest them properly. Do <em>not</em> skip the introduction of each chapter though, for one because they are always pleasant to read between frames, and also because they do teach some very important values or strategies that you <em>must</em> assimilate.</p> +<p>The general message that stands out when reading this book is <em>focus on people</em>. Customers, of course, but also employees: every single successful company mentioned in this book, from Toyota to Southwest Airlines, became successful because they always focused on developing people <em>first</em>, and <em>then</em> products.</p> + +</section> + +</section>
A contents/articles/litestore.md

@@ -0,0 +1,277 @@

+----- +title: Introducing LiteStore +content-type: article +subtitle: A tiny, lightweight, self-contained, RESTful document store +timestamp: 1442779305 +tags: webdevelopment|databases|litestore|opensource +----- +Lately I have become more and more interested in client-side single-page applications. Nowadays you can write your web apps in Javascript using your favorite framework, without any server-side logic, but you obviously still need: + + * some web service to retrieve and persist your application data. + * a web server to serve the source code and the static assets of your web application. + +NodeJS is probably one of the easiest backend to setup for prototyping SPAs. It is very easy to create a simple web server in Node and to implement a simple REST API using Express or a similar framework, but you still need to install node and write some code to wire up your backend. + +I wanted something even more lazy then that. I wanted a fully _self-contained_ program able to: + + * Serve static files + * Act as a simple JSON document store + * Provide a simple REST API to work with + * (bonus!) provide a way to pack web apps for easy distribution + +...and that's how I ended up developing _LiteStore_. + +[LiteStore](/litestore) is a lightweight, self-contained, RESTful, searchable, multi-format, NoSQL document store and web server. That sounds pretentious, but it is essentially an accurate description of what LiteStore is and does. + +It is built using the [Nim](http://nim-lang.org/) programming language and its Administration App (see below) is built using [Mithril](https://lhorie.github.io/mithril/), two relatively less-known projects, both of which I highly recommend if you want to take a break from more mainstream programming languages like C# or Java and Javascript frameworks like AngularJS or React. + + +### Downloading LiteStore + +The easiest way to understand what LiteStore does, is to try it out. Simply download a release package from the [GitHub repo](https://github.com/h3rald/litestore) (or from [here](/litestore) for your convenience) that is suitable for your operating system and architecture. + +The release package contains the following files: + +* **litestore** / **litestore.exe** &mdash; The LiteStore executable. +* **LiteStore_UserGuide.html** &mdash; The official user guide describing the program, its usage, architecture, API, etc. +* **data.db** &mdash; The default data store file, containing the LiteStore Administration App. + +That's all. No libraries to download, no installers, just an executable file. I love self-contained programs. + +### Running LiteStore + +To start a LiteStore server with the default settings: + +1. Open a command prompt in the directory containing the LiteStore executable and the data.db data store file. +2. Enter **litestore** in the command prompt. + +_or_ (on Windows): + +1. Double-click **litestore.exe** + +You should get a message similar to the following: + +<samp>2015-09-20 @ 05:03:36 INFO: LiteStore v1.0.0 started on 127.0.0.1:9500.</samp> + +...meaning that LiteStore is running on the specified address. + +If you open a browser and type <http://localhost:9500> you should get the following JSON response: + +``` +{ + "version": "LiteStore v1.0.0", + "datastore_version": 1, + "size": "4.83 MB", + "read_only": false, + "log_level": "info", + "directory": null, + "mount": false, + "total_documents": 77, + "total_tags": 18, + "tags": [ + { "$dir:admin": 77 }, + { "$format:binary": 14 }, + { "$format:text": 63 }, + { "$subtype:css": 3 }, + { "$subtype:html": 1 }, + { "$subtype:javascript": 36 }, + { "$subtype:octet-stream": 2 }, + { "$subtype:png": 8 }, + { "$subtype:svg+xml": 1 }, + { "$subtype:vnd.ms-fontobject": 1 }, + { "$subtype:x-font-otf": 1 }, + { "$subtype:x-font-ttf": 1 }, + { "$subtype:x-icon": 1 }, + { "$subtype:x-less": 10 }, + { "$subtype:x-markdown": 12 }, + { "$type:application": 41 }, + { "$type:image": 10 }, + { "$type:text": 26 } + ] +} +``` + +Congrats, LiteStore is up and running! + +### Digging Deeper... + +LiteStore is, first and foremost, a RESTful document store. Think CouchDb or MongoDb, but smaller, much smaller. Here's basically what happens when you run the **litestore** command: + +1. LiteStore checks for a file named **data.db** within the current directory and creates one if it doesn't exists. +2. LiteStore assumes that such file is a properly-formatted LiteStore data store file and tries to connect to it. +3. If all goes well, LiteStore starts a simple HTTP server on port 9500, ready to receive HTTP requests. + +(The path of the data store file, the port, etc. are all configurable settings &mdash; run [litestore -h](class:cmd) for more details) + +Now, if you access <http://localhost:9500> while LiteStore is running, you'll get JSON response listing some stats about the currently-loaded data store file, and some information on stored documents and tags, if any. The **data.db** file that ships with LiteStore already contains some documents. Well, actually it contains _a web application to administer LiteStore itself_. + +### The LiteStore Administration App + +Now try accessing the following URL: + +<http://localhost:9500/docs/admin/index.html> + +If all goes well, you should see the following page: + +![Info](/images/litestore/litestore_info.png) + +You are now viewing the LiteStore Administration App, a simple single-page application implemented on top of the [Mithril](https://lhorie.github.io/mithril/) Javascript framework. The cool part is that this application is stored within the **data.db** file and is being served by LiteStore itself. + +The LiteStore Administration App is an example of single-page application developed for LiteStore: it uses pretty much all LiteStore functionalities that are exposes by the LiteStore REST API. + +On the home page you can see the same stats displayed on LiteStore root URL (<http://localhost:9500>), but you can also click any of the tag links to view documents by tag: + +![Tag](/images/litestore/litestore_tag.png) + +...and clicking a document title will display the document content and tags: + +![Document](/images/litestore/litestore_doc.png) + +Note that it is also possible to create, upload, edit or delete documents and manage tags: + +![Document Operations](/images/litestore/litestore_doc_ops.png) + +But perhaps the best feature of this web app (and of LiteStore itself) is the full-text search capability: + +![Document Search](/images/litestore/litestore_search.png) + +By leveraging LiteStore search API (which in turn leverages SQLite exceptional [FTS4 extension](https://www.sqlite.org/fts3.html)), it is pretty easy to build fast search-oriented web applications. + +### Under the Hood + +By now you are probably wonder how this whole thing can work. This is best explained with a simple exercise: let's export and re-import the Administration App! + +First of all, stop the LiteStore instance by pressing <kbd>CTRL+C</kbd> within the prompt window. + +Now execute the following command, from the same directory where you started LiteStore: + +> %terminal% +> +> litestore -d:admin export + +LiteStore will create a directory called [admin](class:dir). If you browse its contents, you will find the full source code and assets of the LiteStore Administration App (also available in the LiteStore [Github repo](https://github.com/h3rald/litestore/)). + +Now delete the [data.db](class:file) file. Don't worry, you can always get a new one from a release package, at worst. + +Run LiteStore again, with no parameters: + +> %terminal% +> +> litestore + +If you access <http://localhost:9500> in your browser, you'll get the following response: + +``` +{ + version: "LiteStore v1.0.0", + datastore_version: 1, + size: "0.02 MB", + read_only: false, + log_level: "info", + directory: null, + mount: false, + total_documents: 0, + total_tags: 0, + tags: [ ] +} +``` + +This is basically saying that the datastore file is empty. And indeed LiteStore just created a new data.db file. If you try accessing the URL of the Administration App (<http://localhost:9500/docs/admin/index.html>) you won't go very far: + +``` +{ + error: "Document 'admin/index.html' not found." +} +``` + +As expected, because the datastore file is empty. + +Now stop LiteStore and execute the following command: + +> %terminal% +> +> litestore -d:admin import + +This command will import the contents of the [admin](class:dir) folder into the datastore file, creating documents and tags automatically. + +If you run LiteStore again, you'll see that everything is back in order, and you can access the Administration App again. + +### The HTTP REST API + +The HTTP REST API exposed by LiteStore allows you to retrieve documents in their original content type, so for example: + +* <http://localhost:9500/docs/admin/index.html> retrieves the contents of the [admin/index.html](class:kwd) document in HTML format. +* <http://localhost:9500/docs/admin/index.html?raw=true> retrieves the [admin/index.html](class:kwd) document in raw (JSON) format. + +This is why when you access the first URL you are able to see the app. + +Queries that return a list of documents, on the other hand, always return a JSON response. For example, <http://localhost:9500/docs?tags=$subtype:css&contents=false> returns all the documents whose subtype is set to [css](class:kwd) (without displaying their contents in this case): + +``` +{ + "tags": [ + "$subtype:css" + ], + "total": 3, + "execution_time": 0.0005269999999999997, + "results": [ + { + "id": "admin/styles/bootstrap-theme.min.css", + "created": "2015-09-20T06:23:10Z", + "modified": null, + "tags": [ + "$type:text", + "$subtype:css", + "$format:text", + "$dir:admin" + ] + }, + { + "id": "admin/styles/bootstrap.min.css", + "created": "2015-09-20T06:23:10Z", + "modified": null, + "tags": [ + "$type:text", + "$subtype:css", + "$format:text", + "$dir:admin" + ] + }, + { + "id": "admin/styles/litestore.css", + "created": "2015-09-20T06:23:10Z", + "modified": null, + "tags": [ + "$type:text", + "$subtype:css", + "$format:text", + "$dir:admin" + ] + } + ] +} +``` + +For all the details on the HTTP REST API, see [the guide](/litestore/LiteStore_UserGuide.htm#HTTP.API.Reference). + +### Conclusion + +LiteStore does not aim to be the _next big thing_ in the NoSQL document store landscape, but it shines when used as a simple and smart way to prototype single-page applications, or implement personal apps like a local Wiki. + +Personally, I use it whenever I have to prepare a quick demo for a proof-of-concept SPA, and I don't want to have to worry about the backend. The Administration App is a great starting point to see how to use the LiteStore API to build an application. Even if you don't have any experience with the Mithril framework (neither did I until I built this!), you can have a look at the [models.js](https://github.com/h3rald/litestore/blob/master/admin/js/models.js) file to see how to access pretty much every functionality exposed by the API. I also managed to wire up a quick and dirty AngularJS service to do something similar, and it wasn't too hard. + +I hope some of you will find LiteStore useful and will give it a shot. If you want to contribute, feel free to fork the [repo](https://github.com/h3rald/litestore/) and send me a pull request. It would be great to have some [Mithril](https://lhorie.github.io/mithril/) or [Nim](http://nim-lang.org/) expert to have a look at this and improve it! + + +### Credits + +Special thanks to the following individuals, communities and organizations that made LiteStore possible: + +* Dwayne Richard Hipp and all the contributors to [SQLite](http://www.sqlite.org/), the true gem that powers LiteStore. +* Andreas Rumpf and all the contributors to the [Nim Programming Language](http://nim-lang.org/), used to develop LiteStore. +* Leo Horie, for creating the [Mithril Javascript Framework](https://lhorie.github.io/mithril/), used to develop the LiteStore Administration App. +* The creators and contributors to the [Bootstrap](http://getbootstrap.com/) CSS and Javascript framework, used by the LiteStore Administration App. +* The creators and contributors to the [Ace Editor](http://ace.c9.io/), used by the LiteStore Administration App. +* Cristopher Jeffrey and all the contributors to the [Marked Javascript Library](https://github.com/chjj/marked) used by the LiteStore Administration App. + +
A contents/articles/log-apr-2009.html

@@ -0,0 +1,35 @@

+----- +title: Personal Log - April 2009 +content-type: article +timestamp: 1240891860 +tags: personal_log|ruby|books|wedding +----- +<p>April is tratidionally a rather busy month: Easter, public holidays, and &mdash; always &mdash; some deadline to meet at work. Moreover, my birthday is also in April which makes it even more busy! Let&#8217;s see what happened this year&#8230;h3. Using Ruby in a corporate environment</p> +<p>I&#8217;ve been using Ruby at work for a while now. I started off writing some automation script for my own needs, then someone noticed it and asked me if by chance I could develop some scripts for them, for automating part of their own job, and so on. My boss ultimately noticed it, and she liked the idea of me investing a small portion of my time to make other people save huge amount of <em>their</em> time, so now I am <em>officially</em> in charge of workflow improvements and automation (it&#8217;s even in my job description!).</p> +<p>This month a colleague of mine and I had to figure out a way to write some documents <strong>once</strong> in <span class="caps">XML</span> format and then produce different kind of outputs (other <span class="caps">XML</span> files, PDFs, etc.) using the <a href="http://dita-ot.sourceforge.net/"><span class="caps">DITA</span> Open Toolkit</a>. Originally we thought the toolkit would do most of the job, but we soon realized we needed to tweak and change a lot more than what we usually expected.</p> +<p>We ended up hacking together a <em>system</em> using:</p> +<ul> + <li><a href="http://office.microsoft.com/en-us/infopath/default.aspx">Microsoft Infopath</a> as <span class="caps">XML</span> editor for the end users (the company buys it by default, so no worries there)</li> + <li>A Ruby program to parse and manipulate the original <span class="caps">XML</span> and produce <span class="caps">DITA</span>-compatible <span class="caps">XML</span> files.</li> + <li>Some <a href="http://ant.apache.org/">Apache Ant</a> tasks available in the open toolkit to produce an <span class="caps">XSL</span>-FO file</li> + <li><a href="http://xmlgraphics.apache.org/fop/">Apache <span class="caps">FOP</span></a> to produce the <span class="caps">PDF</span> from the <span class="caps">XSL</span>-FO file&#8230;</li> +</ul> +<p>The thing seems to work fine (after a lot of tweaking), and I really enjoyed creating the Ruby program to <em>glue</em> everything together. I even got a chance to introduce my colleagues to the wonderful world of <a href="http://hobix.com/textile/">Textile</a> (they are so happy that they don&#8217;t want to use <span class="caps">WYSIWYG</span> editors anymore!).</p> +<h3>Easter in London</h3> +<p>As usual, Roxanne and I spent our Easter holidays in London, at her brother&#8217;s place. This year we actually had 9 days to go around <del>squandering money</del> spending <em>wisely</em> in food, books, clothes and entertainment.</p> +<p>Most notably, I managed to drag Roxanne to <a href="http://www.foyles.co.uk/">Foyles</a> and I got myself a copy of <a href="http://www.pragprog.com/the-pragmatic-programmer">The Pragmatic Programmer</a>, which I&#8217;m reading avidly. If it was up to me I was going to buy half of the computing section, but Roxanne <em>kindly pointed out</em> that I could get all of them from Amazon for half the price. <br /> +And she was right: for my birthday I preordered a copy of <a href="http://www.amazon.com/Programming-Language-Pragmatics-Third-Michael/dp/0123745144">Programming Language Pragmatics, 3rd Ed.</a>, which should be shipped soon.</p> +<h3>Wedding planning</h3> +<p>My spreadsheets for the wedding guests, wedding expenses (!) and &#8230;suit sizes are getting bigger and bigger. We managed to book a lot of flights to Ireland to my parents, us, relatives etc., but there are still quite a few things to do for the wedding. The most urgent thing to do right now is sending the invites: we had them printed with the words <em><span class="caps">RSVP</span> within May</em> on them, so they <em>have</em> to be out in one or two weeks at most.</p> +<p>The other thing which must be sorted soon are the suits. According to English (and Irish) tradition, the groom, the bestman, the father of the groom, the father of the bride and the ushers have to wear the same type of suit, with minor differences (the color of the waistcoats?). In my case, this means getting 7 (<span class="caps">SEVEN</span>) <em>morning suits</em> off eBay, in the right sizes! Hopefully I&#8217;ll be able to get them by the end of next week (if my bestman manages to let me know his sizes).</p> +<h3>XBox 360 Gaming</h3> +<p>Now that our new XBox 360 finally came through, Roxanne and I have a lot of hours of hard core week end gaming ahead of us! This, added to the physiological increase of stress due to the wedding, may result in a temporary slowdown of my coding and writing activities.<br /> +Right now we&#8217;re playing <a href="http://xbox360.ign.com/objects/949/949455.html">Mirror&#8217;s Edge</a>, <a href="http://xbox360.ign.com/objects/718/718963.html">Mass Effect</a>, and <a href="http://xbox360.ign.com/objects/746/746631.html">Unreal Tournment <span class="caps">III</span></a>. The last one was a special surprise present from Roxanne (<em>&#8220;&#8230;so we can kill each other!&#8221;</em> &mdash; she&#8217;s really lovely at times!).</p> +<h3>Other tech-related tidbits</h3> +<ul> + <li>I can&#8217;t wait to go to the cinema to watch <a href="http://www.imdb.com/title/tt0796366/">Star Trek XI</a></li> + <li>I started using <a href="http://www.shelfari.com/">Shelfari</a></li> + <li>I started using <a href="http://start.io">Star.io</a> as my personal, bare-bones start page.</li> + <li>I recently <a href="http://www.h3rald.com/articles/concatenative-020">released Concatenative 0.2.0</a>.</li> + <li>I&#8217;m currently evaluating the possibility to create a Ruby-based <em>Document Authoring Framework</em>. Stay tuned.</li> +</ul>
A contents/articles/log-feb-2009.html

@@ -0,0 +1,89 @@

+----- +title: Personal Log - February 2009 +content-type: article +timestamp: 1235736540 +tags: personal_log|ruby +----- +<p>This has been a rather busy month, hence the lack of general Internet activity. I really wanted to post some more articles to my site, but for one reason or another I had to procrastinate more and more, and here we are at the end of the month again.</p> +<h3>Recession time!</h3> +<p>I&#8217;ve always considered the current economic downturn as something happening <em>somewhere else</em>: <span class="caps">USA</span>, England, Ireland&#8230; but not in Italy, really: our country never boomed, we don&#8217;t go mental with loans and mortgages (or at least we didn&#8217;t use to), so there&#8217;s no real reason for a full-on recession period.</p> +<p>It turns out I was wrong. Other than the fact that our industries are more or less non-existant or already in debt, I didn&#8217;t consider that:</p> +<ul> + <li>Italians tend to panic a lot.</li> + <li>We have an awful lot of foreign business going on, a lot of multi-national companies opened up through the years lured by cheap workers and acceptable craftmanship.</li> + <li>Our government already <del>wastes</del> invests a lot of money regularly, every year, to fuel a colossal, <a href="http://dictionary.reference.com/browse/nepotistic">nepotistic</a>, pointless bureaucratic machine they insist on calling &#8220;State&#8221;.</li> +</ul> +<p>Result: the recession is starting to hit properly over here too. People are saving money, they don&#8217;t go out buying pointless crap, they are scared to ask for a raise at work&#8230; the usual. I work for a foreign company which has been, as were most, forced to save some money to compensate some not-so-good First Quarter&#8217;s revenues. This means less unnecessary expenses, less training, less travelling and less outsourcing, which didn&#8217;t help improving the daily work experiece. Personally, I&#8217;m not that affected by all this, nevertheless it made me bless the day my fiancée persuaded me to stop uni after my Bachelor&#8217;s Degree to get a very rewarding, not-so-stressful job.</p> +<h3>No &#8217;Net @ Home</h3> +<p>The most annoying thing of the month was (and still is) the lack of Internet access at our house. Let&#8217;s do a quick recap:</p> +<ol> + <li>After spending one year with Telecom Italia, Roxanne and I decided to change provider to save a bit of money and get more speed.</li> + <li>On <em>December 24th</em> we requested a contract with <a href="http://www.wind.it">Wind</a>, after they assured that we&#8217;d have the Internet back on in <em>just a few days, tops</em>.</li> + <li>On <em>January 5th</em> Telecom disconnected us.</li> + <li>On <em>January 12th</em> Wind sent me a mail telling me that there was going to be a <em>15-day delay</em> in the activation &mdash; well, at least they told us so! We waited.</li> + <li>On <em>February 2nd</em> I call Wind Customer Care hassling them to get a move on &mdash; just some minor delays, <em>it will only take a few days, tops</em>. We waited.</li> +</ol> +<p>Our new Internet line has been <em>in the process of being activated</em> ever since January 5th. Why? Because being a customer sucks, in Italy, and you can&#8217;t do much about it.<br /> +Let me quote one of the 13 phone calls I made:</p> +<ul> + <li>&#8230; 5 minutes on hold, stupid music in the background &#8230;</li> + <li>[Operator]: Good Evening Sir, I&#8217;m <random name>, how can I help you?</li> + <li>[Me]: Hello, I&#8217;m enquiring about the status of my Internet connection: I&#8217;ve been disconnected since the 5th of January&#8230;</li> + <li>[Operator]: Phone Number please?</li> + <li>[Me]: *** ******</li> + <li>&#8230; 2 minutes on old &#8230;</li> + <li>[Operator]: Name plase?</li> + <li>[Me]: Fabio Cevasco</li> + <li>[Operator]: Let me check&#8230;</li> + <li>&#8230; 6 minutes on hold, stupid music in the background &#8230;</li> + <li>[Me]: Any luck?</li> + <li>[Operator]: One moment please&#8230;</li> + <li>&#8230; 2 minutes on hold, stupid music in the background &#8230;</li> + <li>[Operator]: Sir, it says here that you are <em>in the process of being activated</em></li> + <li>[Me]: (you stupid idiot, I can check that on the Net in less than a minute) Yes, I know what, but why, exactly? It has been over a month&#8230;</li> + <li>[Operator]: Let me check&#8230;</li> + <li>&#8230; 3 minutes on hold, stupid music in the background &#8230;</li> + <li>[Operator]: There are some technical difficulties.</li> + <li>[Me]: What kind of technical difficulties?</li> + <li>[Operator]: I&#8230; I don&#8217;t think you can understand Sir, it&#8217;s technical&#8230;</li> + <li>[Me]: (!!!) I have a degree in IT Engineering, so yes, I think I can understand enough.</li> + <li>[Operator]: &#8230;well, there&#8217;s nothing I can do&#8230; it says we&#8217;re in the process of connecting you, it should be just&#8230;</li> + <li>[Me]: &#8230;a matter of a couple of days, yes, I know: it has been over a month though!</li> + <li>[Operator]: Sir, really, I can&#8217;t really do much about it, you&#8217;ll just have to wait</li> + <li>[Me]: Can you let me speak with the Technical Department?</li> + <li>[Operator]: No, sir, I can&#8217;t: you see, your <span class="caps">ADSL</span> line is not yet activated, they can&#8217;t do anything about it.</li> + <li>[Me]: Excuse me, but I&#8217;d like to know what the problem is, and how long it will take to activate the line.</li> + <li>[Operator]: Sorry sir, we don&#8217;t have this information, and we can&#8217;t commit to a specific date.</li> + <li>[Me]: (!!!) May I speak to someone who knows this? May I speak to your superior?</li> + <li>[Operator] No, you can&#8217;t speak to my superior. You&#8217;ll just have to wait, I&#8217;m sorry.</li> + <li>[Me]: Well, it has been over a month, and I don&#8217;t know if you realize that you were supposed to connect me in just a few days and&#8230;</li> + <li>[Operator]: Thank you for calling sir, have a good day.</li> +</ul> +<p>That barely conveys the frustration I felt and I&#8217;m still feeling now. I can&#8217;t even sue them: I could get 100 Euro at most after spending at least a couple of thousands in lawyer. So much for the land of sunshine huh?</p> +<h3>Programming in Ruby, again</h3> +<p>Some of you may be pleased to know I&#8217;m back coding in Ruby after slacking for months. It&#8217;s just the time of the year, I guess. <br /> +I&#8217;m also evangelizing the language quite a bit at work: after I wrote a few scripts on demand, I slowly lured one of my colleagues to Vim, the Texile markup and then finally the Ruby language. He&#8217;s going through the <a href="http://www.h3rald.com/articles/hlrb-review">Humble Little Ruby Book</a> and he&#8217;s loving it, so far. He&#8217;ll hopefully be fully assimilated in a few weeks at most, and after that there will be no going back!</p> +<p>This inspired me to start a full rewrite of <a href="http://www.h3rald.com/tags/redbook/">RedBook</a>, my little Ruby daily logger. It will feature a SQLite backend and Merb&#8217;s Datamapper to take care of the dirty work.<br /> +Unfortunately, even if the new sources are already available on <a href="http://github.com/h3rald/redbook/tree/master">GitHub</a>, it will take me approximately a few more weeks to complete all the plugins and more to finish the RDoc documentation and &mdash; hopefully &mdash; a fully-fledged user manual. It&#8217;s <strong>the</strong> pet project, after all&#8230;</p> +<p>On the other hand, it will take me considerably less time (a few days?) to release the next version of my <a href="http://www.h3rald.com/tags/rawline">RawLine</a> library, featuring:</p> +<ul> + <li>Ruby 1.9 support</li> + <li>A handy little function for filename completion</li> + <li>Readline emulation, i.e. just <code>include Rawline</code> and use it as if it was <span class="caps">GNU</span> Readline</li> +</ul> +<p>Of course this doesn&#8217;t mean RawLine is a complete, 100% Ruby port of the <span class="caps">GNU</span> Readline library, but it is definitely more Ruby-ish, more cross platform (try using Readline with Ruby on Windows&#8230;), and usable enough for most of the normal things, like:</p> +<ul> + <li>tab completion</li> + <li>line editing (but no vi or emacs mode yet, sorry)</li> + <li>history</li> + <li>quick and easy key bindings</li> +</ul> +<p>Once this comes out, I&#8217;ll be implementing features on-demand, as <span class="caps">GNU</span> Readline is huge and offers way too many things anyone would ever need. Patches and contributions are of course more than welcome, though.</p> +<p>For all my open source Ruby projects, after <a href="http://www.h3rald.com/articles/where-does-your-ruby-code-live">pondering the alternatives</a>, I decided to go with the following setup:</p> +<ul> + <li>My own site for the home pages of the projects</li> + <li>RubyForge for gem support and for RDoc documentation</li> + <li>GitHub as source code repository</li> + <li>LightHouse for issue tracking</li> +</ul> +<p>I hope it works out&#8230;</p>
A contents/articles/log-jan-2009.md

@@ -0,0 +1,53 @@

+----- +title: Personal Log - January 2009 +content-type: article +timestamp: 1232880660 +tags: personal_log|wedding +----- +Those who read my blog regularly may have noticed how I normally refrain from posting articles concerning my own life. I used to have a more blog-like web site, but things changed: _"Who would want to read about my life, anyway?"_ &mdash; That's what I always thought. Hence, I focused on writing general-interest, computer-related articles about programming in Ruby, about some IT book which came out, or about the latest chapter in the Browser Wars. You'll find all this in the [archives](/archives/). + +On the other hand, I thought it may be useful for my own sake to keep a more personal log of what happens in my life, so here it is, the first of hopefully many _personal log_ post, covering January 2009. ### Being social + +Call it a New Year Resolution or simply an unexpected change, I joined [Facebook](http://www.facebook.com) on December 31st 2008, after years of adamant opposition against the popular social network. +What I didn't realized is the amount of people who use it regularly. This may sound naive to the Americans reading this blog, but as an Italian, I was really shocked to discover that about 80% of the people I know here in Italy, here in _Genoa_ use it. + +When I started using Twitter, I really couldn't find many people I knew in "real life": [Andrea Gandino](http://www.andreagandino.com) was the only one I vaguely remembered from uni, but none of the people I knew from elementary school was there, of course! +Why's that? For one because Twitter has always been more geared towards geeks, and also because Twitter is _not available in Italian_. +Believe it or not, this makes the difference. Immediately after I joined Facebook _my dad_ joined it too, and found people he knew _from school_. + +Enough with the sensationalism now, Facebook is old news and the more I write about it the more I sound out-of-the-loop. Anyhow, I quickly discovered how annoying Facebook apps can be and I immediately learn how useful the Ignore button is. Are there people actually using those apps on a daily basis? I can't believe it. +Facebook is good for contacting people, that's about it. That's all I can say after 1 month of moderate usage. + +The other funny aspect of this is the way people react to my status updates and everything I allegedly put on there. Let's clarify this. I do NOT provide _any_ content just for Facebook: + +* I update my status every time I post on twitter +* I post a link every time I save a bookmark on delicious +* I post lengthy notes every time I post to my blog + +That's the truth. I consider it normal, but I find it amusing when some colleague of mine comments to my status asking _But... What is Data Mapper?_. No one on Twitter would do that. Simply because the wide majority of people who follow me on Twitter are Rubyists. + +What about [Twitter](http://www.twitter.com) then? I'm using it more than before (that's part of the same New Year Resolution) _and_ I am actually following some complete strangers! It's nice, in a way. I never did it before because I couldn't keep up with the tweets coming up, but now I can. Here's how: + +* Following [these](http://dblume.livejournal.com/112262.html) instructions I quickly crafted a special feed which now sits permanently in my Google Reader and updates me with all the tweets from everyone I'm following. +* I started using [Tweet Replies](http://www.tweetreplies.com/) so that every [@h3rald](http://www.twitter.com/h3rald) reply goes straight to my mail. It works perfectly. + +### Wedding Planning + +Let's move on to something much more important and life-changing. **I am getting married** this July, in Ireland, after 5 (five!) years of engagement with my beloved Roxanne. We've also been living together for over a year, and it has been awesome (so far), so we both decided it's the right time to tie the knot and get on with it! + +The wedding is just six months away and we'd better get something done, and quick. We already booked the church and the reception, so far, so the main things are sorted. We also attended our pre-nuptial course with our local priest, another 8 couples plus three quite obnoxious "expert" couples for 7 (seven!) weeks, every friday night (those people are nuts). If we survived this, we can survive everything, I tell you. + +Because we're getting married in Ireland, we have to take care of some extra things like taking my relatives abroad (it's definitely easier than bringing 70 _O'Mahoneys, Quinns, etc. etc._ here, that's for sure), organizing car rentals, et al. But it will be great, it will be fun, and I can't wait! + +### Writing and Programming + +On the programming side, I was actually thinking about learning [Haskell](http://www.haskell.org), once and for all. I have a deep admiration and respect for the language and what it can do, but I've always been somewhat overwhelmed by its functional purity, monads, and similar. After reading [Learn You a Haskell](http://learnyouahaskell.com/chapters) (an excellent read), I moved on to [Real World Haskell](http://book.realworldhaskell.org/read/), and I was understanding _everything_, amazingly. + +Then I decided to take a break and try coding a little bit in Ruby (I had to prepare a small script for work), and that was enough to motivate me to start working on [RedBook](http://www.h3rald.com/tags/redbook) again. I was determined to polish it up and put a shiny 1.0 badge on it, but I decided to stop and re-think the whole thing. I originally thought of it as a _simple_ daily logging program to record timestamped entries to a YAML file, but then added more and more features until I finally realized that _perhaps_I could have used SQLite as its backend. It turns out I was right: when I started coding RedBook about a year ago, I didn't know much about Ruby, andI didn't want to use a relational database because it seemed too unnecessary cumbersome for a beginner. It turns out I was totally wrong and [DataMapper](http://datamapper.org/) proved to be an excellent, simple and powerful choice. + +RedBook might be ready in a few months, when also _all its documentation_ is ready, too. As a technical writer, I really cannot afford to release any amateur pet project to the while without documentation, it would be a bad example, wouldn't it? +To make the whole thing more fun, I'll try (_try_ I said, I may change my mind) to write the RedBook Manual using [LaTeX](http://www.latex-project.org/). It shouldn't be too complicated as I'll need only 10% of its features, and hopefully the result will be pleasant enough to read. + +That's it for this month, I think. For those who think this is just a long note on my Facebook profile, check out [the real deal](http://www.h3rald.com/articles/log-jan-2009) on my [web site](http://www.h3rald.com) (did I say Facebook is _totally useless_ for web promotion?). + +
A contents/articles/log-jun-2009.html

@@ -0,0 +1,51 @@

+----- +title: Personal Log - June 2009 +content-type: article +timestamp: 1246235040 +tags: personal_log|vim|ruby|wedding +----- +<p>Welcome to yet another of my extremely boring, excessively fragmented <a href="/tags/personal_log">personal log</a> posts. I&#8217;m seriously thinking of dropping the whole series in favor of more frequent (and shorter) blog posts, starting from next year. This means you&#8217;ll probably have to read <em>another six</em> of these priceless gems, until december 2009.<br /> +As usual, feel free to skim through as each of the following <em>sections</em> is almost completely unrelated to the others.</p> +<h3>H3RALD Web Site v8.0</h3> +<p>It&#8217;s the time of the year, again. It doesn&#8217;t happen <em>every</em> year but it&#8217;s definitely a trend (hence the high version number): I&#8217;m going to redesign &amp; redevelop my web site.</p> +<p>This time is not the usual &#8220;Let&#8217;s pick another language and another framework and start from scratch&#8221;, but a rather more radical shift, and yet at the same time less painful. The idea is to transform H3RALD.com into a 100% static web site, without losing anything in functionality (gaining, if anything!).</p> +<p><a href="/http://tom.preston-werner.com/">Tom Preston-Werner</a> is definitely <em>not</em> the first person to <a href="http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html">blog like a hacker</a>, and his very own <a href="http://www.jekyllrb.com/">Jekyll</a> is definitely not the first static web site generator our there, nevertheless, he inspired me to embrace what seems to be one of the latest trend in developer&#8217;s blogs.</p> +<p>The idea is simple: turn all the blog posts and pages into static content, and rely on third party web services for things like comments, search etc. For a rather extreme by very interesting example, see <a href="http://tagaholic.me/">Tagaholic</a>.</p> +<p>The advantages of this approach are many:</p> +<ul> + <li>Free yourself from a database.</li> + <li>Free yourself from a resource-hungry, server-side app (<a href="http://wiki.github.com/fdv/typo/">Typo</a>, in this case).</li> + <li>Increase speed and reliability, without using caching or similar artifacts.</li> + <li>Keep everything under version control.</li> + <li>Don&#8217;t worry about breaking things when upgrading (even if the static content generator changes, it shouldn&#8217;t really break things).</li> + <li>Unleash the power of client-side scripting (namely, JQuery).</li> +</ul> +<p>For now, I&#8217;m just brainstorming a little bit on <a href="http://github.com/h3rald/h3rald-website/issues">GitHub</a>, feel free to participate. The first step is obviously choosing a static content generator, and atm Jekyll seems to be slightly ahead of Webby. Opinions?</p> +<h3>Glyph</h3> +<p>Did you ever want to write a short manual or a book, or even a long article? If so, chances are you gave LaTeX a shot and either fully embraced its philosophy or totally refused it. Sadly, I belong to the second category: I believe sequential documents like manuals or books should be easier to create simply by using <span class="caps">HTML</span>.</p> +<p>Whever I have a chance to actually start working on it, Glyph will become a <em>document authoring framework</em>, i.e. a way to create visually appealing documents in a simple way. All the ingredients are there, it&#8217;s only necessary to glue them together in a pretty form:</p> +<ul> + <li>Textile (and <a href="http://redcloth.org/">RedCloth</a>) to produce clean <span class="caps">HTML</span> code from a human-readable markup</li> + <li>CSS3 to specify page rules</li> + <li>A few rake scripts to produce a standalone <span class="caps">HTML</span> file, <span class="caps">TOC</span>, Index etc.</li> + <li>An internal <span class="caps">DSL</span> for the document structure and metadata</li> + <li><a href="http://www.liquidmarkup.org/">Liquid</a> for control flow, snippets and filters</li> + <li><a href="http://www.princexml.com/">PrinceXML</a> to generate a <span class="caps">PDF</span> from <span class="caps">HTML</span></li> +</ul> +<p>This project is still in planning stage, feel free to have a look at the <a href="http://github.com/h3rald/glyph/issues">issues/features page</a> on GitHub. Feedback is appreciated, as usual.</p> +<h3>Vim files &amp; <em>the Stash</em></h3> +<p>If you read the previous two sections of this post, you may have noticed that I&#8217;m growing more and more fond of git (and GitHub). Besides the repositories I already mentioned earlier on, I also created a personal <a href="http://github.com/h3rald/stash">stash</a>, which I&#8217;m using mainly to store some of my Linux dotfiles, article drafts and &#8230;Vim customizations.</p> +<p>If you&#8217;re looking for a color scheme for Vim, check out my very own <a href="/herald-vim-color-scheme">herald.vim</a>, and tell me what you think.</p> +<h3>Getting ready for the Big Step</h3> +<p>This will probably be my last post as a free man, as I&#8217;m getting married (civilly) on July 2nd and (religiously) on July 11th. <br /> +Luckily the photographer agreed to give us a CD with all the pictures taken on the big day, with no copyright restrictions attached to it (believe it or not, some photographers don&#8217;t allow you to republish <em>your own</em> photos unless you ask them first), so I&#8217;ll probably write a long post with pictures when we come back from our (half) honeymoon.</p> +<p>Everything is pretty much organized. We had troubles with the waistcoats we got from eBay: they were cut almost randomly to <em>resamble</em> waistcoats, but they weren&#8217;t so we had to re-order another lot of 7 sets (waistcoat, cravat <em>and</em> shirt this time) from another seller, this time UK-based. I seriously hope to get them in time.</p> +<p>On the 24th we&#8217;re having a party at our house. If you were invited, feel free to drop by, otherwise be prepared to be thrown out of the window (4th floor) by one of our ushers (Roxanne&#8217;s <em>big</em> brother). It&#8217;s probalby going to be about 30-40 people in the end, mainly because most of my office can&#8217;t come due to holidays they booked in advance.</p> +<p>What&#8217;s left to do now? Well:</p> +<ul> + <li>Send the bomboniere over to Ireland</li> + <li>Make sure my dad actually ships the 96 specially-bottled bottles of our own wine to uncle John, in Ireland.</li> + <li>Make sure uncle John doesn&#8217;t drink all the 96 bottles of wine before the wedding reception.</li> + <li>Make sure my best man understood that the speech he has do make <em>must</em> be in English, at least 3 minutes long and not too offensive to the groom.</li> + <li>Pay a huge, colossal heap of money for the whole thing. It&#8217;s going to cost us (and my dad) quite a bit, in the end. But it&#8217;s a once-in-a-lifetime experience, after all (getting totally trashed in a fancy hotel with all your family, including 2nd and 3rd grade cousins).</li> +</ul>
A contents/articles/log-mar-2009.html

@@ -0,0 +1,28 @@

+----- +title: Personal Log - March 2009 +content-type: article +timestamp: 1238385840 +tags: personal_log|wedding|ruby +----- +<p>Another month <em>without</em> the Internet at home. This is getting really annoying, and I decided to change provider, <strong>again</strong>, hoping that I&#8217;ll eventually get my broadband back, someday. Luckily I can still go online at work, but of course it&#8217;s not the same thing: my time on Twitter and Facebook is now basically limited to weekends only, when Roxanne and I go down to Tuscany to stay with her parents.</p> +<h3>Concatenative programming</h3> +<p>For some weird reason I became fond of the <a href="http://en.wikipedia.org/wiki/Concatenative_programming_language">Concatenative programming paradigm</a>. I started reading about <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy/j00rat.html">Joy</a> and then started to work on a Ruby <span class="caps">DSL</span> able to do the similar things: <a href="/concatenative/">Concatenative</a>. Another pet project &mdash; as if I didn&#8217;t have enough things to do already!</p> +<p>Some people seemed pleased about it, especially on <a href="http://www.reddit.com/r/ruby/comments/887kn/concatenative_programming_in_ruby">Reddit</a> and <a href="http://dzone.com/links/concatenative_programming_in_ruby.html">dzone</a>. The downside of it is that it&#8217;s still fairly slow if compared to Ruby code (which is not exactly fast, either!), so if I had some spare time I should really try to implement it as a C extension, maybe.</p> +<h3>Learning new programming languages?</h3> +<p>Incidentally, I&#8217;m still fighting with myself on whether to learn another programming language or not. At this point, learning <a href="http://www.factorcode.org">Factor</a> could turn out to be more natural than months ago. However, I would only learn new programming languages as a hobby, as I don&#8217;t need to do so for profit: luckily I&#8217;m still a happy technical writer and I enjoy my job.</p> +<p>I admit, I&#8217;m still looking for <em>the</em> perfect programming language which is fun to learn (not easy: fun), elegant, minimalist, fast, general purpose and cross platform (meaning Linux, Windows, and Windows Mobile as well). Of course there is no such thing out there and there will never be, so I&#8217;m still evaluating the current alternatives. Possible candidates are Haskell, Factor, some dialect of Lisp or C. <br /> +Why C? Well, because I didn&#8217;t do much with it since my first year at uni, and it could still be useful to write Ruby extensions or implement something at a lower level. After so much time getting spoiled by high level languages, I kinda miss the low level stuff. Ahhh where are all the pointers gone?!</p> +<p>On the other hand, I&#8217;m getting married soon, and I should use these months to help my wife-to-be a bit more with wedding planning (see next section). After all, I can always learn a new programming language <em>after</em> getting married, right? &#8230;<em>right?!</em></p> +<h3>Wedding planning</h3> +<p>Roxanne and I are slowly getting more and more things done for the wedding. Every attempt I made to introduce her to <a href="http://en.wikipedia.org/wiki/Getting_things_done"><span class="caps">GTD</span></a> failed miserably so far, or better, it worked too well: she is now getting used to make lists and deciding on our <em>next actions</em> for the weekend. <br /> +This weekend we booked our flights to Ireland, looked at cottages and hotels for the three days after the wedding (not the honeymoon yet, we&#8217;ll have a late honeymoon in autumn), chose the waistcoats for me, my bestman and the ushers, and &#8230;booked the wedding car!<br /> +Now, this turned out to be good fun! Take a look at <a href="http://www.alleventslimos.com/Wedding/rolls_silver_cloud.html">Ruby</a> (yes, yes, I know&#8230; ), a Silver Cloud II 1961 Rolls Royce which will be ours for (less than) one day!</p> +<h3>Other tech-related tidbits</h3> +<ul> + <li>I successfully migrated to Ubuntu 9.0.4 Jaunty. Everything works, except the flash plugin for Firefox.</li> + <li>I&#8217;m now using TweetDeck as my main Twitter client on both Windows and Linux.</li> + <li>I&#8217;m thinking of buying (after the wedding) an Eee PC (no Macs: Ubuntu is sleek and powerful enough &emdash;and free, too).</li> + <li>We finally got an XBox 360 from eBay, this time it came through the post.</li> + <li>Roxanne is thinking of buying a big <span class="caps">LCD</span> TV to go with it &emdash; I&#8217;m politely (and sadly) postponing till after the wedding.</li> + <li>After listening a <span class="caps">FLOSS</span> Weekly episode featuring it, I think I&#8217;ll get myself an <a href="http://arduino.cc/">Arduino Board</a> for my birthday.</li> +</ul>
A contents/articles/log-may-2009.html

@@ -0,0 +1,73 @@

+----- +title: Personal Log - May 2009 +content-type: article +timestamp: 1243744500 +tags: personal_log|programming|wedding +----- +<p>Yet another extremely busy month, as you can see from the total absence of blog posts and lack of tweets even. Things are getting pretty hectic at work now I guess: less people, more work, more responsibility, same money. They call it <cite>contingency</cite>; it&#8217;s the latest trend in the Western World, didn&#8217;t you know? I&#8217;m really not impressed. I can&#8217;t complain though I guess: I still enjoy my job very much and I know it could be much worse, so it&#8217;s just a matter of enduring until autumn &#8212; or so they say.</p> +<h3>Star Trek Premiere</h3> +<p>The month started with an event I&#8217;d been looking for for months: the <em>premiere</em> of Star Trek XI, aka &#8220;Star Trek&#8221;. It&#8217;s not that J.J. Abrahms couldn&#8217;t come up with a more original name (<em>Star Trek: Academy</em> used to be the working title, at one point), he simply wanted to tell the world that this movie was a new beginning, an elaborate way to start from scratch, to reboot what was more than once dubbed <em>a dying franchise</em>.</p> +<p>The movie was enjoyable &#8211; daring and a bit flamboyant &#8211; but still enjoyable nonetheless. I consider myself a Star Trek fan, and although it was <em>not</em> the usual Star Trek movie, I somehow liked Abrahms&#8217; bold revisitation of Roddenberry&#8217;s universe. Take a bunch of unknowns (Chris Pine) or semi-unknowns (Zachary Quinto), then add some spicy British humor (Simon Pegg) and some old friend (Leonard Nimoy) and throw in an awful lot of <span class="caps">XXI</span> century special effects: what you get is not the usual, let&#8217;s-all-rock-because-we&#8217;re-hit traditional Star Trek, of course, it&#8217;s an <em>alternate</em> version of it.</p> +<p>That&#8217;s precisely what the movie is meant to be: what Star Trek would have look like if it had been created in the <span class="caps">XXI</span> century. The timeline feels disrupted since the very first minute (nevermind the end!), with a Jim Kirk stealing his stepfather&#8217;s car. Chris Pine is an <a href="http://memory-alpha.org/en/wiki/James_T._Kirk_(alternate_reality)">alternate</a> Kirk, quite different from the original one, but not that bad. Zachary Quinto, on the other hand, is a true revelation: he definitely is the new Spock, and he couldn&#8217;t have been cast better. So is Simon Pegg as Scotty, but unfortunately he&#8217;s not involved enough.</p> +<p>The baddies were a bit of a letdown. Nero is a bit too flat, and his ship is way too fancy, no matter where it comes from. Clearly some Hollywood junkie wanted a big, invulnerable dark ship to bring havoc in the galaxy, but that is <span class="caps">NOT</span> a Romulan ship, period.</p> +<p>At any rate, I enjoyed the movie and I&#8217;m looking forward to the second one, which I hope it will be followed by many others.</p> +<p>Unfortunately in Italy Star Trek is not worshiped in Italy as in it is the US, which is very unfortunate&#8230; Roxanne and I decided to play along and go to the cinema half-dressed-up, but our friends Elora and Michelle came with a full-blown Uhura uniform! The whole cinema kept staring at us. It was a bit freaky, but fun (check out the pics on Facebook &#8212; if you can, that is, I won&#8217;t post them here!).</p> +<h3>Wedding Planning</h3> +<p>Just over a month to my wedding. Scared? You bet. Stressed out? Indeed. Roxanne and I managed to get most of the things organized in the end, luckily. In particular, this month:</p> +<ul> + <li>We went to the British Consulate in Milan, and applied to get Roxanne&#8217;s legal documents.</li> + <li>I bought and had the 7 vest sets delivered to Roxanne&#8217;s brother&#8217;s (Caspar) place, in London.</li> + <li>I ended up buying 8 (buy three, get one free) morning suits from <a href="http://www.marksandspencer.com/gp/product/B000N65ELG?extid=pg_msf&amp;247SEM">Marks and Spencer</a>, and had them delivered to Caspar&#8217;s place. He&#8217;ll be sending all the stuff over soon, hopefully.</li> + <li>Roxanne got the dresses for the maids of honor, and apparently we have to collect them on monday.</li> + <li>We sent all the invites we needed to send, but we&#8217;re still waiting for confirmations. It looks like it won&#8217;t be a big wedding, probably around to 60-70 people mark.</li> + <li>We ordered the <a href="http://weddings.about.com/cs/glossary/g/Bomboniere.htm">bomboniere</a>, they should come through soon.</li> + <li>Uncle John told us he had the music for the church and the reception sorted out.</li> + <li>We got the rings!</li> +</ul> +<p>We <em>still</em> have to organize a few things, namely:</p> +<ul> + <li>Write and print the prayer books</li> + <li>Book the flight for one of my ushers</li> + <li>Get some fancy gifts for the bestman and the rest of the people involved in the ceremony</li> + <li>Get married civilly here in Genoa</li> + <li>Organize a party at our place for the people who can&#8217;t come to the wedding</li> + <li>Do something else I can&#8217;t remember right now</li> +</ul> +<p>Yes, we are still busy as hell. I&#8217;m looking forward to it all, but I&#8217;ll definitely be much more relaxed when it&#8217;s all over!</p> +<h3>Home Internet: Epilogue?</h3> +<p>I got broadband at home, finally, after five months. Let&#8217;s do a quick recap:</p> +<ol> + <li>Last December I signed up to Libero Infostrada, and told them I wanted to disconnect from Telecom</li> + <li>In January I actually got disconnected from Telecom, got a new phone line contract, but the Internet was never activated.</li> + <li>I kept calling clueless operators on both ends pointlessly for 2-3 months.</li> + <li>I got pissed off with Libero, so in April I signed up to Tele2, telling them to disconnect me from Libero. They told me it would take at least 4 weeks.</li> + <li>Meanwhile, I signed up to 3g, and got an Internet <span class="caps">USB</span> key. At least I can go online, even if with a crappy <span class="caps">UMTS</span> connection.</li> + <li>After a month, Telecom rings me asking if I want to come back to them, promising I&#8217;ll have the Internet back on <em>soon enough</em>. Out of desperation, I accept and tell them to disconnect me from Tele2.</li> +</ol> +<p>Just when I was about to write a long post cursing Telecom and their perverted schemes to force their customers to stay with them, I receive a call from Libero and they tell me that the Internet is now activated! Unbelievable. Now all I have to do is send letters to all the other ISPs (they don&#8217;t do these things on the phone &#8212; clueless operators, remember?) telling them I don&#8217;t want anything to do with them anymore.</p> +<p>This is how broadband Internet works in Italy. Jealous?</p> +<h3>Nimrod</h3> +<p>Last month I decided I would stop programming until after the wedding and so I did (at least at home). Nevertheless, I still keep strive to keep up-to-date with everything concerning technology and in particular programming.</p> +<p>Out of all the tech news I came across throughout this month, the <a href="http://force7.de/nimrod/">Nimrod</a> programming language definitely struck me the most. A German guy came up with a new language &#8212; that&#8217;s not a big news, new programming languages are born every week, if not every day.</p> +<p>I believe Nimrod is different though. Basically, here&#8217;s why:</p> +<ul> + <li>It&#8217;s a mixture of Lisp, Python and C. It looks a bit like Python and it behaves like it (indentation matters), it allows the creation of macros, like in Lisp, and &#8211; this is what <em>really</em> matters to me &#8211; it compiles to plain C (which can then be compiled using <span class="caps">GCC</span> or whatever).</li> + <li>It is open source and can be used to produce commercially distributed executables.</li> + <li>The <a href="http://force7.de/nimrod/manual.html">manual</a> is simple to read (but with a few rough edges), and the language looks simple to learn.</li> + <li>The language is not yet complete, but it&#8217;s getting close to a 1.0 release. It works as advertised, nonetheless.</li> + <li>It offers a comprehensive standard library, and a <em>huge</em> amount of libraries and wrappers from everything from Windows <span class="caps">API</span> to <span class="caps">GTK</span> and Cairo.</li> + <li>It is cross platform, the Windows version even comes with a one-click installer.</li> + <li>It has garbage collection <em>and</em> it supports manual memory management, if you need it.</li> + <li>It&#8217;s statically typed, with type inference</li> + <li>It can generate standalone executables, with very little overhead (90KB for an hello world program).</li> +</ul> +<p>A language like this has been my secret dream for a long time. I thought no one would ever come up like this. I am really looking forward to give it a proper try someday. What&#8217;s wrong with it? For now, a few bits are missing (like native serialization), other than that someone pointed out the weird, rather extreme case insensitiveness of the language. Basically, case <em>and underscores</em> are ignored to <cite>allow programmers to use their own programming conventions</cite>. <br /> +Personally I don&#8217;t think this is that bad. After all, if you name your variables &#8220;a_thing&#8221; and &#8220;aThing&#8221; and you want them to mean different things, that&#8217;s bad programming style anyway. Nevertheless, as far as I know it&#8217;s the only language I know which offers such an extreme degree of flexibility in this sense.</p> +<h3>Learning new things</h3> +<p>This month I also found myself to be extremely eager to learn about new things. I&#8217;m still faithful to Ruby and all that, but I&#8217;m opening up to new possibility, for different things:</p> +<ul> + <li>I decided to start listening to slightly more technical podcasts, which are _not_related to tech news. In this way, I don&#8217;t have the pressure of having to listen to them on a regular basis. Other than <a href="http://twit.tv/FLOSS"><span class="caps">FLOSS</span> Weekly</a>, which is probably the best show about Open Source Software out there, I&#8217;m going to try out <a href="http://www.se-radio.net/">Software Engineering Radio</a> and <a href="http://thecommandline.net/">The Command Line</a>, both slightly more technical.</li> + <li>Because I decided to put my personal programming projects on hold, I&#8217;m having all sort of new ideas about even <em>more</em> projects I could start as soon as I can. No anticipations until after my wedding, of course.</li> + <li>I&#8217;m using Vim all the time now, both at work and at home. I feel confident with it, but I feel I still have a lot to learn, especially when it comes to marks, registers, etc. And I&#8217;m not yet ready to write an article about it &#8212; not the kind of article I&#8217;d like to write, anyway.</li> + <li>I&#8217;d like to learn more about Javascript and JQuery. I played around with it and <em>loved it</em>, but I really never used it for anything serious yet. This, however, may change in the future.</li> +</ul>
A contents/articles/ma.html

@@ -0,0 +1,7 @@

+----- +title: Ma.gnolia - Social bookmarking made (extremely) easy +content-type: article +timestamp: 1141476813 +tags: internet|review|web20 +----- +Social Bookmarking[1] is not something <em>new</em> anymore; in fact, some people say they've seen too much of it already (imagine that!). One of the worst things - or best, depending on your point of view - of the whole Web 2.0[2] hype is that everything evolves at least ten times faster than it did in good ol' Web 1.0 (if you let me use the term): there are <em>many, many more</em> web pages created everyday by literally <em>anyone</em>, from web developers to total newcomers to the Web, to amateurs who just want to share their content because it's 'cool'.<br />However, this is not a rant. Web 2.0 is inevitably going to become more and more user friendly, and you can't do anything about it. Why? Because it pays. Who's most likely to click on the flashy banner on page X featuring product Y not knowing that by doing so company Z will get a penny: your grandmother who is just now learning how to use the Internet or your brother who's majoring in computer science?<br />However, this is not necessarily a bad thing. I strongly believe that the Internet becomes a much more user-friendly place everyday, and, to put it bluntly, the web developers and companies who understand this will become popular and make money.<br /><br />I remember when I first read about social bookmarking: people were screaming here and there that you <em>had to</em> share your bookmarks on the Net, and this 'delicious'[3] thing was getting more and more popular. Then it became 'delirious'[4], and it was <em>better</em>, because it also meant <em>free</em>...then the shadows[5] came...<br />I was never a big fan of the whole concept, I admit, but an old friend of mine from a community[6] turned up and asked me to try a new website he coded in <em>Rails</em>[7]: a new social bookmarking service, simple to use and free: ma.gnolia[8].<br />I immediately felt the impulse to reply (as this happened on IRC[9])<em>"i.dont.give.a.sh.**"</em>. I really didn't want to try <em>yet another</em> social bookmarking thing, as I had had enough of it even before I started to grasp the whole concept properly. Hoever, since the guy is a friend of mine whom I respect a lot, especially for his skills and knowledge, I decided to give ma.gnolia a try, and here's what happened.<br /><br /><strong>A website which <em>smells good</em></strong><br />One of the things any Web 2.0 business cannot afford to overlook is the design and user interface of their product. It <em>does</em> matter! If you want to please your customers, make something that looks good. This is not a new idea at all[10], and it has been shown to work in many situations.<br />The first impression I had about the ma.gnolia website was similar to the one I had when visiting CSSZenGarden[11] for the first time: <em>code is poetry</em>. I particularly like the latest trend in web design, which preaches simplicity, functionality, clean-looking pages, xHMTL+CSS instead of other assorted bloat, pastel colors, rounded corners, and so on, and there are no rounded corners in ma.gnolia.<br />The ma.gnolia website succeeds in making the visitor feel comfortable: it doesn't clutter the page with pointless images or weird widgets, but limits itself to only the essential items needed for usability - logo, banner, essential navigation (bookmarks, tags, people, groups, messages, profile, support and tools), content, a few well placed and unobtrusive images and icons, and a footer with the same usual boring-but-necessary links (copyright, about, terms of service, privacy policy, contact us), nothing more. What else do you need?<br />People might disagree, of course, and it's certainly not the answer for all tastes: there are some people who really can't stand 'plain' websites, and they think that the whole philosophy is pointless: <em>De gustibus non est disputandum</em> (There is no accounting for taste). We had the same concerns two thousand years ago and the Romans got it right. Even the Romans would have agreed that ma.gnolia is easy to use, too plain or not.<br /><br /><strong>Quick features overview</strong> <br />The obvious first step before starting to use ma.gnolia is signing up for a (free) account. Right? Wrong. For non-committers, or casual, let's-try-it-and-see-what-happens users there's a (free) trial account. You can start using fully functional ma.gnolia right away, but unless you register, nothing you do will be permanent. This seems to be a new Web 2.0 trend as well; before, you needed to make everything free to get people's attention, now it must be free <em>and</em> not require registration. Makes perfect sense.<br /><br /><em><span style="text-decoration:underline;">Adding bookmarks</span></em><br />Trial or not, you can start adding bookmarks right away through the form on the front page, which is simple enough. As long as you didn't discover bookmarks (or <em>favorites</em> for the browser-impaired) the day before yesterday, you probably already have your little collection of bookmarks meticulously catalogued in many different folders. Well, you can import them into ma.gnolia in a few very easy steps, and that, believe me, will save time. Some people may think I'm wasting my time stating the obvious here, but when I tried del.icio.us the import feature wasn't available, and this was enough to make me walk away.<br /> <br />'Casual user', 'non-web-savvy', 'non-geeks': ma.gnolia obviously targets these types of people. Everything on the site is well-documented and easy to use. Ma.gnolia's project manager said in a recent interview[13]:<br /><br /><fieldset><blockquote><br /><em>[...] The rest of us muddle along for about 30 seconds, and if we still don't get it and aren't enjoying the experience, we leave, never to return. To avoid that fate -- to make the complex simple -- our lead IA Tanya Rabourn put in the hours and the iterations needed to make Ma.gnolia comprehensible to the non- expert. </em><br /></blockquote></fieldset><br /><br />This makes sense to me: Web 2.0 seems to be more user friendly, simply because a lot of non-geeks are browsing the web everyday and clicking on adverts.<br /><br />Once you import all your bookmarks, you'll have an almost exact copy of your bookmarks collection, now available online! If you don't want to share them, because you believe in anti-social bookmarking or you just want to have a backup, you can import all your bookmarks as "private", and you can toggle the status by clicking <img src="http://ma.gnolia.com/images/icons/privacy-on.gif" alt="" /> or <img src="http://ma.gnolia.com/images/icons/privacy-off.gif" alt="" />, whenever you like: the magic of Ajax[14] will do the rest. <br />You can also rate your bookmarks from one to five stars, but <em>only</em> yours: ma.gnolia is not a pointless competition to be the one who links the most and best websites.<br /><br /><em>What if I want to delete a bookmark?</em> Quick hint: <img src="http://ma.gnolia.com/images/icons/delete.gif" alt="" /><br /><br /><em><span style="text-decoration:underline;">Yes, you can tag as much as you like</span></em><br />No, there are no folders. Forget it. For me it started with Gmail[15] and it was shocking enough: there are no folders, but you can tag your messages. This can be disorienting for some, but once you have overcome the initial trauma, you will realize that tags can be better than folders in some cases. At any rate, Web 2.0 uses tags everywhere, so you'd better get used to it. A tag is basically a virtual label you can put on something - here, a bookmark - to make it belong to a defined group. Tags normally don't have a hierarchy like folders, and each item can have more than one tag. Simple. <br /><br />Unfortunately, you can't directly tag (or rate) bookmarks that you add from the main page, but since you'll normally be using some sort of <em>bookmarklet</em> for Ma.gnolia, it doesn't really matter. Also, at the moment, once you create a tag you can't rename it, but this feature will be added soon.<br /><br /><br /><em><span style="text-decoration:underline;">Connecting people</span></em><br />If you tried some other social bookmarking services before and you really enjoy the philosophy behind it, you'll be pleased to know that Ma.gnolia is even more social than others. When you register an account you can optionally disclose your real name, age, and gender, add an avatar, a webpage and so on, and you can create your own profile, just like anywhere else on the Internet.<br />Furthermore, Ma.gnolia allows <em>groups</em>: you can create, join, and leave a group of bookmarkers who share the same interests as you. Why would you want to do this? The answer to that question is simple and self-evident: because what is enjoyed by one person will likely be enjoyed by other people who share the same interests. Once you are part of a group you can send a bookmark to that particular group (<img src="http://ma.gnolia.com/images/icons/send-to-group.gif" alt="" />), or at least that's that ideal; if you just want to send a particular address to only one person you can do so (<img src="http://ma.gnolia.com/images/icons/send-to-contact.gif" alt="" />), provided that that person is already in your contact list, and to do so there's a specific button (not icon this time) in everyone's profile. <br />You'll notice a <em>Messages</em> link in the main navigation panel, and that's exactly where the bookmark (and only the bookmark) will go once you send it to your friend. At the moment you <em>cannot</em> send a traditional message to someone, unless you send it along with a bookmark. This might change in the future, depending on user feedback, as well as the addition of some place to actually have some sort of discussion and comments - or so I've been told.<br />I'd be happy to see more community-specific functionalities being implemented, but there are some inevitable risks if Ma.gnolia decides to take this road. I'll let them decide, but for now, Ma.gnolia is more social than other services, but less social than, say, a discussion board.<br /><br /><em><span style="text-decoration:underline;">Pages, stats and search</span></em><br />Perhaps one of the coolest features Ma.gnolia offers is the possibility of saving pages online. When you bookmark a web page, Ma.gnolia attempts to save an exact copy of that page on its server, so that you can access that resource even if it is deleted at the source, like an improved personal version of the WayBack Machine!<br />Two things need to be said - and yes, they might be obvious for some people:<br />1) Pages which require some sort of authentication cannot be saved; and<br />2) Saved copies cannot be viewed by people other than yourself.<br /><br />Another feature is the ability to access basic statistics regarding bookmarks and people: most viewed or most recent bookmarks, hot groups, hot tags, as well as featured linkers, i.e., people who Ma.gnolia chooses to be displayed in some pages. They are generally well-known members or institutions that use the service.<br />However, the search function disappointed me a little bit. There is a very entertaining story on their About page[17] on how Social Bookmarking is supposed to help people to find things on the Web, and the last part in particular is pretty informative:<br /><fieldset><blockquote>[...]In Ma.gnolia, people can save website addresses (or the 'url') and "tag" them with that words they think people need to find them in a search. That way, when somebody else searches a term, the websites that show up are only the ones that are good enough for real people to want to find them.<br />With Ma.gnolia, that's really all the work you have to do. Organizing is a thing of the past, since tags do the organizing for you. Magnolia will even suggest when to give certain tags to bookmarks based on how you tag other bookmarks, to keep things consistent and up to date. And since it's a website, your Ma.gnolia bookmark collection can be reached by you and your friends from anywhere, any time.<br />If searching was the first day of the web, finding what you want must be the second. Ready to discover how Found is the New Search? Give Ma.gnolia a try, and see what we mean.</blockquote></fieldset><br /><br />It seemed logical, so I tried it myself. I searched for "ajax framework", and nine of the ten results on the first page led to this document:<br /><br />ASP.NET AJAX framework comparison [18]<br /><br />This is undoubtedly an interesting document, but not what I was looking for, and I certainly didn't expect almost the entire first page to consist of the same document. I asked for an explanation of this apparently odd behaviour, and it appears that the developer is aware of this, and explained me why this <em>must</em> happen: if someone saved <a href="http://www.zzine.org">www.zzine.org</a> as "zZine Magazine" and another person saved it as "Microsoft", someone searching for Microsoft - provided that we don't show duplicate links anymore, will find a link to zZine Magazine as one of the first results, and it would not be relevant. This is due to the fact that the system searches tags, titles, and descriptions even if the URL is the same, or known. Still, I'd try to limit the number of identical results, at least by grouping together entries which have the same URL and title, or something along these lines.<br /><br /><br /><em><span style="text-decoration:underline;">Tools to play with</span></em><br />There's a whole section of the site devoted to <em>Support and Tools</em>, to make the whole thing even more user friendly. Regarding the support part, even the greenest of visitors to a social bookmarking site will have no problems, as everything is explained in very simple terms, and full of examples and tutorials. This can be an annoying read if you already know how social bookmarking works and if you're used to similar services, so my advice is: <em>geeks stay out of this section</em> - it will save pointless rants.<br />The upside of this is that if I send someone who has <em>never</em> used something like this before, he'll like it and definitely start using it; if you try this with del.icio.us, you'll have one less non-geek friend.<br /><br />Regarding the tools subsection, I already mentioned the excellent bookmark importer (which worked perfectly, but should probably warn in case a page cannot be imported due to a 404 error). Ma.gnolia also offers:<br /><br />- a del.icio.us importer<br />- del.icio.us to ma.gnolia GreaseMonkey script - to keep your del.icio.us and ma.gnolia synchronized<br />- a link roll generator, to share your bookmarks on your blog or page<br />- a universal bookmark exporter<br /><br />Additionally, and most importantly, various bookmarklets[19] which allow you to instantly add a bookmark to your ma.gnolia collection with a single click, just like adding an ordinary bookmark. Not new, but useful and essential.<br /><br /><br /><strong>Conclusions</strong><br />Ma.gnolia is definitely the best social bookmarking solution currently available for non-web savvy users. If you don't like having to spend more than five minutes figuring out how social bookmarking works, Ma.gnolia will become your new home, and you'll get addicted to it. I don't consider myself a total geek, and I honestly started using Ma.gnolia because it's simple and does the job...<br /><br />...or perhaps the website is just so easy to use and nice to navigate that makes it harder to browse away!<br /><br /><br /><strong>Notes</strong> <br />[1]Social Bookmarking, Wkipedia: <a href="http://en.wikipedia.org/wiki/Social_bookmarking">http://en.wikipedia.org/wiki/Social_bookmarking</a><br />[2]Web 2.0, Wikipedia: <a href="http://en.wikipedia.org/wiki/Web_2.0">http://en.wikipedia.org/wiki/Web_2.0</a><br />[3]del.icio.us Social bookmarking: <a href="http://del.icio.us">http://del.icio.us</a><br />[4]de.lirio.us Social bookmarking: <a href="http://de.lirio.us">http://de.lirio.us</a><br />[5]Shadows Social Bookmarking: <a href="http://www.shadows.com">http://www.shadows.com</a><br />[6]CyberArmy Community: <a href="http://www.cyberarmy.net">http://www.cyberarmy.net</a><br />[7]Ruby on Rails framework: <a href="http://www.rubyonrails.org">http://www.rubyonrails.org</a><br />[8]Ma.gnolia Social Bookmarking: <a href="http://ma.gnolia.com">http://ma.gnolia.com</a><br />[9]Internet Relay Chat, wikipedia: <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat">http://en.wikipedia.org/wiki/Internet_Relay_Chat</a><br />[11]Windows XP Official Page: <a href="http://www.microsoft.com/windowsxp/default.mspx">http://www.microsoft.com/windowsxp/default.mspx</a><br />[12]CSSZenGarden: <a href="http://www.csszengarden.com/">http://www.csszengarden.com/</a><br />[13]Darren Barefoot's Blog, Sugar Ma.gnolia, Blossoms Blooming:<br /> <a href="http://www.darrenbarefoot.com/archives/2006/02/sugar-magnolia-blossoms-blooming.html">http://www.darrenbarefoot.com/archives/2006/02/sugar-magnolia-blossoms-blooming.html</a><br />[14]Ajax, Wikipedia: <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">http://en.wikipedia.org/wiki/Ajax_%28programming%29</a><br />[15]Google Mail: <a href="http://mail.google.com/">http://mail.google.com/</a><br />[16]Archive.org: <a href="http://www.archive.org/">http://www.archive.org/</a><br />[17]Ma.gnolia - About: <a href="http://ma.gnolia.com/about">http://ma.gnolia.com/about</a><br />[18] Daniel Zeiss, "ASP.NET AJAX framework comparison": <br />http://www.daniel-zeiss.de/AJAXComparison/Results.htm<br />[19]Ma.gnolia - Bookmarkles directory: <a href="http://ma.gnolia.com/support/bookmarklets">http://ma.gnolia.com/support/bookmarklets</a><br />
A contents/articles/making-it-big-in-software.html

@@ -0,0 +1,107 @@

+----- +title: Book Review: Making it Big in Software +content-type: article +subtitle: A handbook for (almost) guaranteed success in IT +timestamp: 1285406501 +tags: review|books|software +pdf: true +----- + + <section class="section"> +<p>When this book came out, it was immediately followed by a lot of buzz. Positive reviews started popping up almost instantly, a lot of people blogged about it, it was surrended by a lot of&#8230; what&#8217;s that word again? Oh yes, <em>hype</em>. The title pissed me off really: who on Earth wants to title his book <a href="http://bit.ly/b08auR">Making it Big in Software</a>? Steve Jobs? Bill Gates?</p> +<p>No, just a guy named <a href="http://lightstone.x10hosting.com/">Sam Lightstone</a>. When I was offered a review copy, I was a bit reluctant to even bother: I thought it was one of those overly-hyped titles that claim to make you famous and successful, but all they do stating the obvious: work hard, be innovative, use your money wisely, etc. Well, this book is not one of them.</p> +<p>When I got my copy, I immediately read the author&#8217;s bio on the second-last page of the book: Sam Lightstone runs a site called <a href="http://makingitbigcareers.com/">Making it Big Careers</a> (again, I got instantly worried by this), <em>but</em> also happens to be one of the brightest minds in <span class="caps">IBM</span>, a <a href="http://en.wikipedia.org/wiki/IBM_Master_Inventor"><span class="caps">IBM</span> Master Inventor</a>, author and co-author of 30+ patents.</p> + +<p><img src="/img/pictures/books/making-it-big.jpg" class="right" /><br /> +The 17 exclusive interviews with software gurus, visionaries, minor and major deities of the IT world are definitely worth the 24.99$ this book costs <em>on their own</em>. This was one of the major selling points of the book itself (as the merry-looking pictures of Marissa Mayer, James Gosling, Steve Wozniak and John Schwarz on the cover suggest), but far from being the only one. The interviews are strategically placed throughout the book, as supporting material for the author&#8217;s advice: if you don&#8217;t believe him, you will believe those who <em>made it</em>. Anyhow, let&#8217;s say something about the book itself, shall we?</p> +<p><em>Making it Big with Software</em> is divided into three parts:</p> +<ul> + <li><strong>Part I: Fundamentals</strong> &#8212; all you need to know to get hired. Finish school, learn new things, and get a job in the Software industry.</li> + <li><strong>Part II: Leadership</strong> &#8212; tips on what to do to start climbing the corporate ladder, from junior to senior manager.</li> + <li><strong>Part <span class="caps">III</span>: Greatness</strong> &#8212; go beyond a successful career and become a luminary in IT, an example for future generations (and earn the big bucks).</li> +</ul> + + <section class="section"> +<header><h1 id="h_1" class="toc">Part I: Fundamentals</h1></header> +<p>After two introductory chapters, aimed at answering questions like &#8220;Why bother?&#8221; or &#8220;What do big shots in software do?&#8221;, the book starts analyzing what graduates get when they get out of school. I was really taken by the following paragraph, outlining the main difference between school and work:</p> +<blockquote> +<p>[&#8230;] although schools encourage students to do their own work, on penalty of expulsion or severe reprimand, professional work is saturated with the ubiquitous mantra of &#8220;teamwork.&#8221; In school, your success depends on individual effort, whereas professional life depends frequently on your ability to work in teams.</p> +</blockquote> +<p>So true. I never thought about it until I read it in this book. And this is a common causes of failure in the workplace: not being able to work in a team. It&#8217;s understandable: after years of striving to be the best, to do things for yourself, you&#8217;re suddenly asked to work for and with others.</p> +<p>The author gives junior graduates some useful tips to get a job in software development (or the software industry in general), with some useful tips on how to create a proper r&eacute;sum&eacute;, how to survive interviews, the usual. Hell I wish I had this book when I started!</p> +<p>Readers like me who already have a job should not dismiss this part. Maybe skim through the first few chapters, but towards the end there are some useful suggestions on how to build essential interpersonal skills and a nicely-written chapter about <em>career killers</em>.</p> + +</section> + + <section class="section"> +<header><h1 id="h_2" class="toc">Part II: Leadership</h1></header> +<p>The second part of the book opens with <strong>Chapter 9</strong>, Working the Org, which I found most amusing for the funny, but insightful, <em>Negotiating 101</em> section. Again, particular emphasis is put on non-technical skills, which are however essential for success. I particularly enjoyed reading this part of the book, because I could relate to it, being a Technical Leader myself.</p> +<p><strong>Chapter 12</strong> is a must-read, as the author himself says:</p> +<blockquote> +<p>If you read only one chapter in this book, this should probably be the one.</p> +</blockquote> +<p>If you never read anything about time management, you rhave to read this, as it helps you realize how much time you waste, why, and what you can do to improve the situation. I attended a course on the subject at work, a while ago, and I was shocked to read most of the stuff I learned at that course so tidily organized in no-nonsense prose in this chapter. Granted, it doesn&#8217;t substitute a time management course or practical experience with managing your priorities, but it is a good starting point.</p> +<p><strong>Chapter 14</strong> deals with <em>Zen and the critical art of balance [between work and personal life]</em>. The diagram on page 249 scared the hell out of me. Here it is, transposed in tabular form:</p> +<table> +<tr> + <th>Desired State</th> + <th>Current State</th> +</tr> +<tr> + <td>Work: 9 hours</td> + <td>Work: 13 hours</td> +</tr> +<tr> + <td>Sleep: 8 hours</td> + <td>Sleep: 6 hours</td> +</tr> +<tr> + <td>Travel: 1 hour</td> + <td>Travel: 2 hours</td> +</tr> +<tr> + <td>Family &amp; Leisure: 4 hours</td> + <td>Family &amp; Leisure: 1 hours</td> +</tr> +<tr> + <td>Chores &amp; Hygiene: 2 hours</td> + <td>Chores &amp; Hygiene: 2 hours</td> +</tr> +</table> +<p><em>Thirtheen hours</em>? Really? If <em>you</em> work 13-hour days then you have to read this chapter <em>and put it into practice</em> instantly or you&#8217;ll regret it. Luckily <em>I</em> manage to work most of the time for 8 hours a day (as everyone should, by law).</p> +<p>Another chapter I particularly enjoyed (and will re-read periodically) is <strong>Chapter16</strong>, which contains the best definition of leadership I ever came across:</p> +<blockquote> +<p>&#8220;Leadership is communicating to people their worth and potential so clearly that they come to see it in themselves.&#8221;</p> +</blockquote> + <p style="margin-left: 4em">&ndash; Stephen Covey</p> +<p>Again, this chapter teaches you the basics on leadership and management. If you didn&#8217;t take a course on the subject yet, it&#8217;s definitely worth a read.</p> + +</section> + + <section class="section"> +<header><h1 id="h_3" class="toc">Part III: Greatness</h1></header> +<p>I particularly enjoyed the first two chapters of this last part: <strong>Chapter 17</strong> and <strong>Chapter 18</strong> are about <em>innovation</em>, which I found to be the fastest and best way to get noticed in a company.</p> +<p>These two chapters won&#8217;t teach you to become a genius or an inventor, but they do provide help on the subject: why innovating is important, how to innovate and what to do once your idea gets a shape. The <em>Patenting</em>, <em>Publishing</em> and <em>Public Speaking</em> sections in chapter 8 are useful and practical, and deserve a good read. Again, the book does not go too in-depth, but the author provides just enough information to make you aware of the main issues.</p> +<p>The final chapters of the book felt a bit distant from my current work reality. Business talk, stock options, startups, acquisitions&#8230; They may interest some readers with an enterpreneurial mindset, but not me, at least not now. Nonetheless, business and politics pay a very important role in any IT job, so it&#8217;s wise to be aware of them.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">The Interviews</h1></header> +<p>The 17 interviews with software gurus, miracle workers and other extremely successful chaps make up for about the 20% of the book. They are carefully placed by the author in specific places of the book where they make the most sense (well, most of the time). Every person had to answer a similar set of questions, like &#8220;How did you get started in software&#8221;, &#8220;How do you stay on top of technology trends and innovation?&#8221; or &#8220;Technical leaders and executives are famous for being time-strapped. What strategies do you use to stay sane and use your time effectively?&#8221;.</p> +<p>Every interviews has at least one personal anecdotes. Some feel almost legendary, like the following:</p> +<blockquote> +<p>In 1967, at the age of 12, I dreamed of making a difference in the field of computer science. I went off to the local <span class="caps">IBM</span> office, literally knocked on their door, and said, &#8220;I will do anything for the summer-empty trash cans, you name it.&#8221; They said, &#8220;Go away kid.&#8221; But there was a sales guy who took pity upon me and threw me a nice Fortran IV [<span class="caps">IBM</span> Mathematical Formula Translating System] manual, with the expectation that I&#8217;d probably read it and get bored and never come back. But much to his surprise, I came back the following Monday and said, &#8220;Hey, this is cool! I just wrote a program and I want to run it.&#8221; The sales guy was so impressed that he found me an open computer to work on where I could teach myself how to keypunch, program, and debug for what I still recall as a delightful summer.</p> +</blockquote> + <p style="margin-left: 4em">&ndash; Grady Booch, <span class="caps">IBM</span> Fellow and Chief Scientist for Software Engineering, <span class="caps">IBM</span> Research</p> +<p>Every interview provides at least a good piece of advice for newcomers to the field. The last chapter of the book summarizes the interviews attempting to draw the profile of the successful IT professional: some founded their own companies, other climbed up the corporate ladder, a few contributed with key inventions (email, the Internet, &#8230;) that changed society as we know it. Different levels of greatness, and different ways to reach it: this is what this book is really about.</p> + +</section> +<section class="section"> +<header><h1 id="h_5" class="toc">Final Thoughts</h1></header> +<p><em>Making it Big in Software</em> is very well organized, in its three main parts. Unless you&#8217;re already the <span class="caps">CEO</span> of a multi-million-dollar company, you can learn something from this book, and even if you are, learning how other people <em>made it</em> is always beneficial.</p> +<p>It is not a specialized book, and as such it does not go in depth on anything specific. This is a good thing though, because after you read some of the chapters you feel motivated to learn more about this or that particular topic, skill or problem. In a way, it can be a good surrogate for more specialized books about r&eacute;sum&eacute; creation, job interviews, time management, leadership etc.</p> +<p>Overall, I recommend this book to everyone who wants to become successful in the software industry. Success can come to different degrees of course (or not come at all), but if you&#8217;re motivated enough and interested in your work, it is definitely within your grasp. <em>Be goal oriented</em>. It&#8217;s not enough, but it&#8217;s a good start.</p> + +</section> + +</section>
A contents/articles/mongrel-shortcut-review.html

@@ -0,0 +1,104 @@

+----- +title: Book Review: Mongrel Digital Shortcut +content-type: article +timestamp: 1197686520 +tags: review|books|rails|ruby +----- +<p>If you ever considered about developing an deploying a Rails application in the last year or so, you must have heard of <a href="http://mongrel.rubyforge.org/index.html">Mongrel</a> before. If you didn&#8217;t, I&#8217;d recommend you learn more about it because up to now it proved to be one of the few essential ingredients for deploying <em>scalable</em> Rails applications.</p> +<p>Mongrel is a creation of <a href="http://www.zedshaw.com/">Zed Shaw</a> who started writing a replacement for FastCGI to use with Rails, and ended up creating a brand new, <span class="caps">HTTP</span> web server who turned out to be one of the best things the Rails community ever saw happening.</p> +<p>It was created to be simple to use and configure, nevertheless it <em>does</em> require some skill to set it up and tune it. Documentation is there, along with plenty of blog posts, but there&#8217;s also an interesting <a href="http://www.informit.com/store/product.aspx?isbn=0321483502&amp;rl=1">book</a> from <a href="http://www.awprofessional.com/">Addison Wesley Professional</a> which is definetely worth a read.</p> +<p style="float:right;"><img src="/files/mongrel_shortcut.jpeg" alt="" /></p> +<p>&#8220;Mongrel: Serving, Deploying, and Extending Your Ruby Applications&#8221; &ndash; that&#8217;s the title of the book. A <em>Digital Shortcut</em>, 100-odd pages long, in <em>landscape</em> format to make it easier to read on a computer, straight to the point with no added sugar for just 15$ (<span class="caps">PDF</span> only). I must say Addison Wesley got it right: the book&#8217;s format is, as a matter of fact, <em>optimized for web developers</em>, especially those who can&#8217;t afford to read a 500-pages book covering everything about a subject just to find that one thing they don&#8217;t know about.<br /> +This <em>shortcut</em> can be seen, essentially, as an expanded cheatsheet which will teach you the basics about Mongrel and also give you plenty of advice on how to learn more about it.</p> +<p>Let&#8217;s have a closer look at it.</p> +<h3>Overview, Introduction &amp; Getting Started</h3> +<p>The first three <del>chapters</del> sections (there are no chapters, just <em>sections</em>) of the book are meant to be a gentle introduction to Mongrel and its world. The main author is <a href="http://www.informit.com/authors/bio.aspx?a=0260912e-6ed8-4ed1-882a-c357e644feec">Matt Pelletier</a>, but Zed Show&#8217;s contributions are definitely one of the book&#8217;s best selling points. <br /> +Zed&#8217;s thoughts are scattered here and there in many <em>sidebars</em> throughout the book (there&#8217;s at least one in each section): you&#8217;ll see an odd-looking face (Zed&#8217;s self-caricature) with some text next to it; when you read it, you&#8217;ll notice that they are <em>actually</em> Zed&#8217;s own thoughts, straight from his mind, with no editorial filter whatsoever in-between. <br /> +Be warned: the text included within the <strong>Zed Sez</strong> sidebars is highly opinionated, that&#8217;s precisely what Zed <em>feels</em> to say about something, and he&#8217;ll just say it: just the plain, simple thoughts of an experienced programmer. As the author explains in <strong>Section 1</strong>: <em>&#8220;[&#8230;] You may not agree with everything he says, but you probably should.&#8221;</em></p> +<p><strong>Section 2</strong> is a general introduction about Mongrel. It explains <em>what</em> it is, <em>when</em> and <em>why</em> it was made, and <em>how</em> it works. There&#8217;s nothing new to learn if you already used Mongrel before, probably, but it&#8217;s definitely the first thing to show to someone who&#8217;s new to Mongrel and its world, and possibly a bit skeptical about it. <br /> +The last subsection <em>&#8220;What can Mongrel do for me&#8221;</em> is an attempt to <del>brainwash</del> persuade you to fully embrace Mongrel and its philosophy, whether you are a developer, a sysadmin or even a manager: assertions like <em>&#8220;Mongrel is pretty damned secure.&#8221;</em> and <em>&#8220;Mongrel&#8217;s license is capitalist-friendly.&#8221;</em> will definitaly make some of you (managers) happy.</p> +<p><strong>Section 3</strong> is slightly more juicy than the previous one, as it explains how to install and use Mongrel. Basically that&#8217;s what everyone who ever used it already knows, but it&#8217;s still necessary for the book&#8217;s consistency, after all. After reading this section, you&#8217;ll probably have your first Mongrel up and running and serving your little Rails application&#8217;s pages, and you&#8217;ll begin to wonder why the hell you need to keep reading this book now that everything seems to work already&#8230;</p> +<h3>Section 4: Configurations</h3> +<p>&#8230;aka &#8220;a truly useful Mongrel cheatsheet&#8221;. This section dives deep(er) into Mongrel&#8217;s configuration by explaining what each start parameter does in detail. The parameters are presented in tabular form in a very well-organized way. As you would expect from an high-quality cheatsheet.</p> +<p>Then the author will explore a few commonly used deployment scenarios, in particular:</p> +<ul> + <li><strong>Standalone</strong> &ndash; The simplest configuration possible, with just one Mongrel instance serving both static and dynamic pages.</li> + <li><strong>mongrel&#95;cluster</strong> &ndash; How to use <em>&#8220;a pack of mongrels&#8221;</em> together to handle more traffic.</li> + <li><strong>Behind a static web server</strong> &ndash; The most common (and most scalable) option, used to serve static content faster using a front-end server and use Mongrel only to handle Ruby pages.</li> +</ul> +<p>Towards the end of the section, for the developer&#8217;s delight, the author will discuss two common, useful scenarios where Mongrel can be used:</p> +<ul> + <li><strong>Apache 2 + mod_proxy_balancer + mongrel&#95;cluster</strong></li> + <li><strong>Nginx + mongrel&#95;cluster</strong></li> +</ul> +<p>The difference here is that detailed instructions are provided on how to setup and configure each server, including example file sources. This can be particularly useful for the Nginx example, as most of the documentation for this fantastic, lightweight Mongrel fron-end is scattered around the web (or written in Russian in a <a href="http://sysoev.ru/nginx/">well known place</a>).</p> +<h3>Section 5: Production Deployment</h3> +<p>This section introduces one of the most important part of the life cycle of a Rails application: the deployment on a production server. The author is pretty honest about the whole subject:</p> +<blockquote> +<p><em>&#8220;You will not do this in a day. If you are expecting to code until 1 minute before your deadline and then simply point and click and have an instant server then you need to take some kind of<br /> +medication because you are violently hallucinating. You will need at least a week of 8 hours days to make sure your first deployment works and to have the time to do it right.&#8221;</em></p> +</blockquote> +<p>Sounds terribly true. Especially for larger projects demanding good performance under heavy traffic. Scared? Probably, if you never deployed a Rails application &#8220;properly&#8221; before, but at least the book comes to the rescue by providing an overview of what you need to perform a deployment and why it is such a complex and delicate process.</p> +<p>Not only this, but also a &#8220;Best Practices Rubric&#8221; is also provided for the developer&#8217;s own private enjoyement. It&#8217;s written as a list of questions like:</p> +<p><em>11. Do you have a shared location where you can document the deployment, such as a Wiki or <span class="caps">CMS</span>?</em><br /> +<em>12. Do you know how to use httperf or ab and know what the statistics mean?</em></p> +<p>After these 13 questions, the author provides the key to give a meaning to your answers:</p> +<blockquote> +<p><em>&quot;For each question you answer with &#8220;NO&#8221;, add 10 hours to your time estimate for completion. This may seem unrealistic, since saying &#8220;NO&#8221; to everything means it&#8217;ll take 190 hours (about one<br /> +month), but this estimate is actually low according to most first deployment experiences.&quot;</em></p> +</blockquote> +<p>If you answered &#8220;NO&#8221; too many times to these questions, you may want to read on through the next subsection which states 17 &#8220;worst practices&#8221;: an invaluable read for beginners!</p> +<p>But after all this section is not only about stating the obvious (&#8230;right?): a full example scenario is describedand examined throughly to give you an idea of how a deployment <em>should</em> be made, using three different machines:</p> +<ul> + <li>One for Apache (as a front-end to Mongrel)</li> + <li>One for the Mongrel cluster and the Rails application</li> + <li>One for the database</li> +</ul> +<p>Maybe something you&#8217;ll never do if you just want to run your grandma&#8217;s site on Rails, but certainly something you may want to start looking at if your grandma becomes really popular and your small server gets grounded by several thousands of visitors per day.</p> +<p>The last part of the section will give you a brief introduction on monitoring your applications and on which tools you should be using, although it does not discuss the subject in detail at all, it&#8217;s just meant to point you to the right direction.</p> +<h3>Section 6: Extending Mongrel</h3> +<p>This section digs deeper into the software code internals and describes <em>how to teach new tricks to your Mongrel</em>, i.e. how to extend its functionality.</p> +<p>Before you begin, though, don&#8217;t forget what Zed himself has to say about Mongrel&#8217;s simplicity:</p> +<blockquote> +<p><em>&#8220;I&#8217;ve always had a different aesthetic sense when I write my software. I value simplicity and directness and try to write software that follows this approach. I jokingly call it the Shibumi School of Software Structure. All I do is apply this rule: When given two possible designs with equal end results, pick the simpler one. I then ruthlessly strip the solution down to its finest elements, but no more.&#8221;</em></p> +</blockquote> +<p>Mongrel&#8217;s architecture is not that complex, and this section is sufficient to get you started by providing an overview of the main classes involved (HttpServer, HttpRequest, HttpResponse, HttpHandler, URIClassifier), and how they work together.<br /> +Note that the book won&#8217;t describe anything about the APIs of these classes. but after all, the project&#8217;s <a href="http://mongrel.rubyforge.org/rdoc/files/README.html">RDoc documentation</a> should cover all the details you need.</p> +<p>The rest of the section focuses on how to extend Mongrel, by:</p> +<ul> + <li>Writing custom handlers in Ruby</li> + <li>Creating custom filters to perform security checks, clean up requests and preliminary file processing</li> + <li>Creating plugins and distributing them as rubygems</li> +</ul> +<p>Two working examples are also provided:</p> +<ul> + <li>An example handler to deflate content (if the browser supports deflate)</li> + <li>An example &#8220;duck&#8221; plugin, to make Mongrel quack like a duck when it&#8217;s started (not the most useful thing in the world, but serves the purpose)</li> +</ul> +<h3>Debugging, Performance &amp; Security</h3> +<p>The last three sections deals with other important aspects concerning the deployment of your application, how to debug, how to improve performance and how to secure your application.</p> +<p><strong>Section 7</strong> introduces two debugging modes:</p> +<ul> + <li>Dash-Bee logging (-B)</li> + <li>USR1 logging (lighter)</li> +</ul> +<p>And also gives you an idea on what to look for when debugging an application. Nothing too detailed, granted, but enough to make sure you are pointed in the right direction.</p> +<p>Again, Zed&#8217;s wisdom and wit are remarkable:</p> +<blockquote> +<p><em>&#8220;These people&#8217;s problem is they suffer from Potpourri Turd Syndrome—a belief that their you-know-what don&#8217;t stink and smells like fine dew on freshly cut grass. Whenever there&#8217;s a bug, they go<br /> +running like kids in a candy store to other people&#8217;s code trying to find fault and just assume that it&#8217;s nothing they wrote.<br /> +[&#8230;]<br /> +When you run into a problem with your application, always assume it&#8217;s your fault first. Mongrel&#8217;s not perfect, but its code is minuscule compared to the size of Rails and most likely even your own appli-cation code. Mongrel also powers many large and medium deployments without any problems. If there&#8217;s an error, the evidence already says it&#8217;s in your code, so bite the bullet and start investigating it as if it&#8217;s your problem.&#8221;</em></p> +</blockquote> +<p>Similarly, <strong>Section 8</strong> is a short but useful overview on performance tips and tricks and deployment tuning. The most useful thing is probably the checklist of the &#8220;tuning process&#8221;, which illustrates the simple steps to take to tune your application.</p> +<p>Finally, <strong>Section 9</strong> addresses some common security concerns and clarifies how Mongrel deals with them. The answer is normally &#8220;Mongrel strictly does this&#8221; or &#8220;Mongrel doesn&#8217;t support this feature&#8221;. After all, you should have understood by now that Mongrel is an example of simplicity and that it deliberately does not aim to offer all the feature you&#8217;d expect by a server like Apache:</p> +<blockquote> +<p><em>&quot;As you probably see, Mongrel say, &#8220;No&#8221; in many places where most Web servers say, &#8220;Yes, OK.&#8221; Sometimes this is because no one using Mongrel has needed it yet, sometimes it&#8217;s because there&#8217;s a<br /> +better, simpler way to accomplish the same goal. Mongrel is a different kind of Web server, and frequently you can solve your problem with a different solution.&quot;</em></p> +</blockquote> +<h3>Conclusion</h3> +<p>If Mongrel is opinionated software, this is definitely an opinionated book which fully embraces the project&#8217;s philosopy of simplicity above everything else. It&#8217;s an interesting read and it won&#8217;t bore you to death by deliberately skipping long and potentially tedious subjects and adding interesting insights instead (like the Zed Sez sidebars). Perhaps it is a bit too direct towards certain people, who may get even get offended (as planned) by some of the author&#8217;s assertions.</p> +<p>Despite being a 100-pages book, this <em>shortcut</em> covers pretty much everything you need to know <strong>about Mongrel</strong>. It will <em>not</em> teach you everything about deployment, security, performance tweaks and debugging though: as the authors often state throughout the book, a lot of (big) books are available on those subject, and it wouldn&#8217;t make sense to even attempt to discuss them in this shortcut.</p> +<p>Similarly, you won&#8217;t find complex examples either, but that&#8217;s acceptable because simple examples are often the only thing you need to grasp the basics of a concept or feature, and then use them as a &#8220;scaffold&#8221; for your own code.</p> +<p>Globally, the book is well balanced and <em>optimized</em> for its size: lightweight introductory sections at first, then the &#8220;real juice&#8221; in the middle, and a few overview sections on advanced topics towards the end. You can read it easily in a few hours, perhaps less, and whenever you need to look something up in a hurry it will be fairly easy to locate.</p> +<p>A good read, and a <em>must</em> for everyone who wants to learn more about Mongrel or Rails deployment.</p>
A contents/articles/next-generation-dvds.html

@@ -0,0 +1,7 @@

+----- +title: Next generation DVDs +content-type: article +timestamp: 1134215626 +tags: review +----- +Get a full comparative and analytical view of the HD-DVD and Blu-Ray disc formats. Why do we need them? Are they the perfect answer? Which one of them (if any...) will eventually take the throne? The answers to all these questions (and more) are inside! <br /><strong>The endless quest for space</strong><br />I remember when I showed a 3.5" floppy disk to my dad and he said, "That's so small, and it can store 1.44MB of information! That's over a million bytes!" He was used to working with big tapes of data that probably held much less, so I guess a floppy disk a big shock for him, at the time. <br /><br />When I got my first computer, it had a CD-ROM drive, and the CDs were supposed to hold 500MB of data. They eventually started supporting more, and got up to 900 in the end. Finally, we got DVDs, which are able to store up to 4.7GB of data, and once people noticed they could write another layer of data, the capacity doubled. <br /><br />Over the years, storage devices have evolve, and it seems now more than ever that mankind is on an endless "quest for space" - not with NASA (which nowadays is being much more careful before sending out a shuttle), trying to go where no one has gone before, but with a bunch of leading OEM companies, IT industries and Hollywood studios trying to write unbelievable amounts of information on a 12cm disk made out of plastic and other lesser known materials. <br /><br />Furthermore, despite me persuading my family to buy a "new" DVD player, the industry now claims that this relatively new commercial technology is going to be dead: apparently we'll soon have disks capable of holding 15-25 GB of data <em>per layer</em>, which will come to the aid of High Definition TeleVision (<a href="http://en.wikipedia.org/wiki/HDTV">HDTV</a>) which will deliver images at 1920x1080 pixels (versus 640x480 pixels on a normal DVD). This means that you'll be able to see - with your brand new HDTV-capable home theater - the imperfections of Jessica Alba's skin when she's dancing in <em><a href="http://www.imdb.com/title/tt0401792/">Sin City</a></em> if you look close enough, which brings up another question: "who wants this kind of technology?" - if nothing else, you'll have to pay a lot for it!<br /><br />As I previously stated, the evolution in storage media is unstoppable and yet necessary at the same time: having more storage space available proved to be a key factor for computer development.<br /><br /><br /><strong>A New War has Begun</strong><br />As the history of the computer industry has shown us, when the possibility of innovation arises, there's never just one group who tries it out. In the past, this led to the determination of two or more <em>de facto</em> standards by competitors promoting similar solutions. Perhaps the most familiar cases in the recent past were the introduction of the VHS and DVD formats. The first standard - for VHS - was adopted after a "war" against Sony's Betamax format - which was supposedly technologically superior - and the determining factor (or one of the main ones, anyway) was that Sony, "jealous" of its proprietary format, didn't want to license support for it to all the Original Equipment Manufactors (OEMs), while JVC and Matsushita [Panasonic]'s VHS licenses were basically given to anyone who even remotely suggested adopting the format. <br /><br />Sony was involved in another "war", for the successor of the CD format: they pushed for their Multimedia CD (MMCD), while Toshiba had their Super Density CD (SD). Perhaps because Sony was wary of another defeat, history didn't repeat itself this time, and the two manufacturers agreed to develop a hybrid format which is now widely known as the Digital Versatile (previously "Video") Disk, or more commonly, the DVD.<br /><br />However, once again, Sony is proposing its own format for next generation DVDs, called <a href="http://en.wikipedia.org/wiki/Blu-ray_Disc">Blu-Ray Disc</a> (BD) and once again, it's opposed by Toshiba (and others) with the High Density Digital Versatile Disk (HD-DVD). Both formats aim to increase space by using a blue laser for writing instead of the traditional red one used for DVDs. Other than that, the two formats are (for now) quite incompatible with each other as they use two different approaches to this same technology. Most of the following technical information is taken from an <a href="http://www.cdfreaks.com/article/186/">article</a> that appeared on CDfreaks.com.<br /><br /><br /><strong>The Contenders: HD-DVD</strong><br />Let's now examine the first of the two contenders to the "throne": High Density Digital Versatile Disk (<a href="http://www.hddvd.org/hddvd/">HD-DVD</a>). This format was the one that appeared first and is mainly promoted by Toshiba, along with NEC and Sanyo. The capacity is around 15GB per layer and it could be defined - for its structure mainly - as an application of newer laser technology to the older DVD format. <br /><br /><em><span style="text-decoration:underline;">Disk structure</span></em><br />As the diameter of the disk is the same and the information is coded roughly in the same way, the areas of improvement obviously reside in optimizing the physical space of the disk to hold more information. As with CDs and DVDs, data on a disk is written in tracks following a spiral path, from the center to the border of the support: in a CD, the gap between the two rows of the track (the <em>Track Pitch</em>) was 780nm; then it was reduced for DVDs (650nm), and again for HD-DVDs (400nm), so that we can store more information in the same space (because there are more rows). In order to achieve this, the laser must be more sensitive to be able to detect tracks correctly (that's why the laser is now blue; blue has a smaller wavelength), and the lens that gathers and concentrates the light needs to be changed. The measure that defines the shape (convexity) of the lens is called <em>Numerical Amplitude</em>: for CDs, it is 0.45, 0.6 for DVDs and 0.65 for HD-DVDs. These "tweaks" made more space available on the disk, and HD-DVDs, as previously stated, can store up to 15GB single layer and 30GB in double layer.<br /><br />Another characteristic that makes HD-DVDs similar to DVDs is the amount of the disk which is used for actual data storage and the amount which is used as "protective coating": HD-DVDs are 1.2mm thick, with 0.6mm used to store information and 0.6mm for protection.<br /><br /><br /><em><span style="text-decoration:underline;">Information processing and error correction</span></em><br />Data sent through a channel is subjected to "noise" of various kinds, and a similar phenomena occurs when writing information on a support, so various ways of preserving the data and correcting possible errors were developed. HD-DVD, in particular, uses a particular type of modulation called ETM (Eight to Twelve Modulation), which is once again similar to the technique used in CDs and DVDs: each byte of data is converted into twelve bits, and all bits set to 1 must satisfy an RLL(1,10) code (all '1' bits must be separated by at least 1 and at most 10 zeros).<br />Furthermore, disks must be able to bear scratches and other damage which could potentially corrupt bytes. Personally, I found that CDs are much more scratch-proof than DVDs, partly due to the fact that when you scratch a DVD (don't do it, just trust me!) more bytes get corrupted because of a higher data concentration: imagine what will happen now with 3-5x more data in the same space!<br />HD-DVD has the same correction techniques and data containers as the DVD format, the only exception being that the <a href="http://en.wikipedia.org/wiki/Error-correcting_code">ECC</a> blocks on HD-DVDs are twice as large, resulting in a longer correctable burst error length (7.1mm, where DVD is about 6mm).<br /><br /><br /><em><span style="text-decoration:underline;">Writing formats and copy protection</span></em><br />Even though HD-DVD has so far been quite similar to DVD (except for the obvious differences in laser, lens, and track pitch caused by the technology), there's an exception concerning the Rewritable format: it can hold more data than the ROM format (20GB instead of 15). This has been achieved by employing some technologies used in DVD-RAM. Despite the improvement, it might represent a problem for OEMs, because it makes HD-DVD RW handling totally different from the read-only format.<br /><br />For protection against piracy and illegal copying in general, HD-DVD format abandons the Content Scrambling System (CSS) used in DVDs (which has been shown to be unsuccessful) in favour of AACS (Advanced Access Content System), which uses a completely different key scheme.<br /> <br />AACS has been introduced for both HD-DVD and Blu Ray formats, and it involves the so-called "device keys": a unique key is assigned to each player's model, and before playing a protected disk, the player will have to retrieve its key (encoded in a three-way tree on the disk). Obviously, if a particular key is cracked, the manufacturers will be informed and will update the key in newer disks (which won't play in the cracked player at all). The technology is quite controversial at the moment, because "protection" is achieved at a high price: if someone cracks the key of your player, it simply won't play newer HD-DVDs, even if you weren't actually involved in any illegal activity. Solutions are currently being debated.<br /><br /><br /><br /><strong>The Contenders: Blu-Ray Disks</strong> <br /><br />Where Toshiba's HD-DVD adopted a somewhat conservative strategy, basing itself more or less on the DVD standard, Sony decided to use a much more experimental approach for its <a href="http://www.bluraydisc.com/">Blu-Ray</a> (BD) format, which appears to be more technologically advanced and offer even more space. <br />Blu-Ray disks can hold up to 25GB of data per layer, and this represents a great leap over HD-DVD's 15GB, but this has been achieved at the price of compatibility. <br /><br /><br /><em><span style="text-decoration:underline;">Disk structure</span></em><br />In order to reach the capacity it does BD uses the same type of blue/violet laser of HD-DVD but - as a necessity - the <em>Numeric Amplitude</em> of the lens has been increased to 0.85 (vs. 0.65 on HD-DVD), and the <em>Track Pitch</em> has been decreased to 320nm, so the additional space is explained by noting that the distance between the spiral rows is even smaller!<br /><br />Furthermore, BD can vary the length of the "pits" where data is written; by reducing it, more space on the disk can be obtained. Currently BD has 3 sub-formats, corresponding to 3 different capacities (23.3, 25 and 27GB), and associated to three different pit lengths (160, 149, and 138nm respectively) while HD-DVD has a fixed pit length of 204nm.<br /><br />Another innovation was introduced regarding the amount of disk used for data and for protection: disks are still 1.2mm thick, but 1.1mm are used for data storage and only 0.1mm for the protective coating!<br /><br />This was necessary in order to achieve the improved values for NA and Track Pitch, because the laser goes through only 0.1mm of protection before reading the data, meaning it can be more sensitive, but this also means that BDs are MUCH more vulnerable to scratches than HD-DVDs. Luckily, TDK immediately announced a new hyper-resistant protective coating which can offer improved protection from scratches and still be 0.1mm thick. <br /><br /><br /><em><span style="text-decoration:underline;">Information processing and error correction</span></em><br />BD decided to adopt its own modulation system (instead of using ETM like HD-DVD), called "17PP". The acronym basically means that each "1" must be separated by 1-7 "0" bits [RLL(1,7)] and also that the modulated sequence must have the same parity as the original data plus additional rules.<br />Error correction is then achieved using two codes similar to the <a href="http://en.wikipedia.org/wiki/Reed-Solomon_code">Reed-Solomon</a> code: LDC (Long Distance Code) and BIS (Burst Indication Subcode). Without going into too much detail, these two proprietary techniques can achieve almost the same result as HD-DVD's ECC, being able to correct corrupted data up to more than 7mm, which is quite remarkable considering the particularly delicate disk structure.<br /><br /><br />Blu-Ray also introduces two new modulation methods: the first one is called ?MSK-cos? (Minimum Shift Keying ? cosine variant), which is a special frequency modulation, and the second one is called ?HMW? (Harmonic Modulated Wave), which consists of replacing parts of the sine wave with sawtooths.<br /><br /><em><span style="text-decoration:underline;">Copy protection</span></em><br /><br />BD originally proposed its own control system, BD-CPS, for copy protection, but recently seems to have opted for AACS. This means that the same situation arises for both formats: they are both planning on implementing an advanced exchange key-based system to fight piracy.<br /><br />As another anti-piracy method, both formats also introduce a sort of "signature" called a <em>Volume Identifier</em> which will be very difficult to duplicate on a cloned disk.<br /><br /><br /><strong>The World Takes Sides</strong><br /><br />After discussing the two formats sufficiently in depth, it's now possible to itemize the pros and cons of each format:<br /><br /><em><span style="text-decoration:underline;">HD-DVD</span></em><br />Pros:<br /><ul><br /><li>Backward compatibility with CD/DVD will be available soon</li><br /><li>Reduced production costs, both for disks and players - cheaper to buy</li><br /><li>Improved durability</li><br /><li>Available relatively soon on the market</li><br /></ul><br />Cons:<br /><ul><br /><li>Incompatible with the competitor's format</li><br /><li>Less space than competitor's format</li><br /></ul><br /><br /><em><span style="text-decoration:underline;">Blu-Ray</span></em><br />Pros:<br /><ul><br /><li>Backward compatibility with CD/DVD will be available soon</li><br /><li>More space than competitor's format</li><br /><li>Technologically more advanced, longer life-span</li><br /><li>Higher recording speed</li><br /></ul><br />Cons:<br /><ul><br /><li>Incompatible with the competitor's format</li><br /><li>More expensive to produce and to buy</li><br /><li>More vulnerable to scratches </li>(the TDK solution notwithstanding)<br /><li>Still relatively experimental</li><br /></ul><br /><br />At this point, HD-DVD seems to be the "natural" successor to the DVD format: it inherits already-tested technologies and offers acceptable improvements regarding capacity. On the other hand, Blu-Ray is an innovative alternative, which, while more technologically advanced, needs to be tested more fully and is more expensive because of its innovation. Manufacturers will have to have separate machinery to produce Blu-Ray disks, while it appears that only some tweaks in existing structures will be necessary to support HD-DVD production on a mass scale at contained prices.<br /><br />Obviously, all the industries with interests in these new magnetic supports took sides with one or the other format:<br /><br /><em>HD-DVD:</em>Toshiba, Sanyo, NEC, Paramount Pictures, Universal Pictures, New Line Cinema, Warner Bros Studios, Time Warner, and, apparently, <em><strong>Microsoft</strong></em>.<br /><br /><em>Blu-Ray:</em> DELL, HP, Hitachi, LG-Electronics, Mitsubishi Electric, Panasonic, Pioneer, Philips, Samsung, Sharp, Sony, TDK, Thomson, 20th Century Fox, Walt Disney, Texas Instruments, Sun Microsystems, Electronic Arts, and Vivendi Universal Games.<br /><br />HD-DVD is supported mainly by film studios (Paramount and Universal) and multimedia companies (Time Warner). This is expected, since these industries advocate a product which is cheap, tested, and reliable. On the other hand, Blu-Ray is supported by IT industries that see a new technology for improved capacity and high recording speed. However, Walt Disney and 20th Century Fox seem to support this format, and they represent a sizable share of the family entertainment movie business.<br /><br />Microsoft recently seemed to <a href="http://news.softpedia.com/news/Microsoft-Sides-With-Toshiba-Against-Sony-s-Blu-ray-3798.shtml">support HD-DVD</a> technology. This was predictable, at least to a certain extent: Microsoft and Toshiba have always had a strong and productive working relationship, and Microsoft is probably trying to oppose Sony, who will probably use Blu-Ray for its upcoming PlayStation 3. Microsoft will probably opt for HD-DVD for the XBox, but it's too soon to say, especially since the big names of video games (like EA) seem to support Blu-Ray.<br /><br /><br /><br /><strong>The End of the War</strong><br />So a new <em>Standards War</em> has begun, and it's still too soon to know how it will end. Recently, the possibility of a hybrid standard has seemed more plausible, even if Toshiba's format arrives on the market much sooner than Blu-Ray. Toshiba itself advocates a <a href="http://www.pcpro.co.uk/news/73241/hddvd-bluray-marriage-back-on.html">single standard</a>, but seems also keen on <em>seeing how it goes</em> first, when both the two products are on the market. <br /><br />Actually there's <a href="http://news.softpedia.com/news/The-chronicles-of-a-futile-battle-Blu-Ray-vs-HD-DVD-631.shtml">someone</a> who predicts a different ending for this war: no one format will win, especially if the "conflict" lasts for too long. There's a chance that <a href="http://www.techtree.com/techtree/jsp/article.jsp?article_id=57500">Holographic Versatile Disks</a> (HVD) will eventually destroy both contenders by offering, on the same disk, 1TB of space at 1Gbps transfer speed! <br />As a matter of fact, Japan's <a href="http://www.optware.co.jp/english/what_040823.htm">Optware Corp.</a> might be the revelation that <em>saves the world</em>... <br />
A contents/articles/obama-may-come-to-genoa.html

@@ -0,0 +1,21 @@

+----- +title: Barack Obama may visit Genoa (Italy) on October 12th +content-type: article +timestamp: 1218420540 +tags: politics +----- +<p>Barack Obama may visit Columbus&#8217; birthplace on October 12th 2008, and take part in the city&#8217;s celebration of the discovery of America, which is held in the city every year. As reported by <strong>Il Secolo <span class="caps">XIX</span></strong>, Genova&#8217;s local newspaper.</p> +<p>Although the invitation has not been officially accepted by the American Presidential Candidate, Genoa&#8217;s mayor <strong>Marta Vincenzi</strong> is working very hard to make it happen.</p> +<p><strong>Kerry Kennedy</strong> (Bob Kennedy&#8217;s daughter), is said to be in charge of liaising with Obama on the US side.</p> +<blockquote> +<p>&#8220;[&#8230;] Kerry Kennedy and her family &ndash; among the first and most unexpected of Obama&#8217;s supporters in his challange against Hillary Clinton &ndash; are said to be organising his visit to Genoa. It all started when Kerry came to the city at the beginning of July, for the Week of Human Rights initiative promoted by the city&#8217;s council. Kerry was introduced to Nando Dalla Chiesa&#8217;s &#8216;Columbus Day&#8217; program plan by Vincenzi .<br /> +<br /><br /> +The proposal of inviting Obama to Christopher Columbus&#8217; birthplace was immediate, and a significant move. <br /> +That could have important consequences, because Genoa has been involved in battles for civil rights in the last few months while also trying to restore its relationship with the United States, which have often been identified as a symbol of evil globalization since the G8 summit [held in the city in 2001].&#8221;<br /> +<br /><br /> +After Bush &ndash; the &#8220;king&#8221; president among the other 8 powers protected by the Red Zone [the restricted area of the city where the G8 summit was held] &ndash; a black presidential candidate who speaks of dialog and integration to the people of Genova (and obviously also tens of thousands of Italians), from De Ferrari Square [the city&#8217;s main square]. [&#8230;]&quot;</p> +</blockquote> +<p><em>&ndash; Translated from <a href="http://ilsecoloxix.ilsole24ore.com/genova/2008/08/11/1101689125257-indovina-chi-viene-genova.shtm">Indovina chi viene a Genova</a>, Giovanna Mari, August 11th 2008.</em></p> +<p>This could be a truly important occasion for Genova (and Italy) to re-establish dialog with the United States after the G8 summit (which cost the city a death and millions of Euro of damage caused by vandalism).<br /> +However, there is still no official confirmation that the event will take place at all, especially due to the upcoming Presidential Elections in the same period.</p> +<p>If he comes, I&#8217;ll definitely be there!</p>
A contents/articles/pagerank.html

@@ -0,0 +1,7 @@

+----- +title: The Green Bar +content-type: article +timestamp: 1134133434 +tags: google|internet +----- +Since 1998 SEO experts, webmasters, and even casual users spent ages trying to figure out the magic within that small green bar... but what's really behind Google's most famous invention?If you never experienced the sensation of looking at such a <em>green bar</em> before, then maybe you don't know what I'm referring to; I suggest downloading and installing the Google Toolbar[1]. This IE add-on (now available for the Firefox browser) was developed by Google years ago and still remains the most common way to view a website's <strong>PageRank</strong> through a simple bar with a variable length, according to a 10 point scale.<br /><br />I quietly mentioned the infamous word <em>PageRank</em> earlier, but what is it?<br />Some people think the idea of the word might come from a pun involving one of Google's co-founders (Larry <em>Page</em>), while others simply think it was the most obvious choice for a system which was supposed to <em>rank</em> pages according to importance and popularity. Anyhow, the only certain thing is that two (insert appropriate adjective here) students of Stanford University wrote a paper, in 1998, called "The Anatomy of a Large-Scale Hypertextual Web Search Engine"[3], in which, they discussed some interesting ideas for developing a large scale search engine using a particular algorithm they invented, which was supposed to help delivering the most relevant results for any search query provided by a user of the service.<br /><br />It is also certain that these two guys, Larry Page and Sergey Brin, eventually made an awful lot of money in the following years, developing and expanding an initially simple-looking website/web application with a funny name[4] and turning it into one of the biggest and most profitable businesses in the history of Computer Science. But let's now examine how PageRank works. <br /><br /><br /><strong>Deus ex machina</strong><br /> Google's co-founders kindly provided a short text summing up their innovative (and perhaps secret) technology[5]. In particular, one paragraph seems to offer a brief and simple explanation of how PageRank works:<br /><fieldset><blockquote><br /><em>PageRank relies on the uniquely democratic nature of the web by using its vast link structure as an indicator of an individual page's value. In essence, Google interprets a link from page A to page B as a vote, by page A, for page B. But, Google looks at more than the sheer volume of votes, or links a page receives; it also analyzes the page that casts the vote. Votes cast by pages that are themselves "important", weigh more heavily and help to make other pages "important."<br /></em></blockquote></fieldset><br /><br /> The first time I read this paragraph, I really experienced a feeling of admiration and ecstasy for these two enlightened minds who decided to bestow their priceless gift on the World Wide Web: a system which gives every page the due importance through a democratic system. Isn't it wonderful?<br /><br /> Of course there's (much) more to it than a short paragraph, and obviously this <em>explanation</em> wasn?t enough for those people (webmasters, SEO experts, kids creating their online family albums, etc.), who gradually became more and more interested in knowing further details about the system, hoping that it would have improved their placement in Google's search results. <br /><br /> Indeed, PageRank contributed to label some sites as <em>important</em> and gradually the number of ?PageRank 10? websites[6] began to rise, but generally remaining a prerogative of important names of the IT industry (Microsoft, Apple and obviously Google itself, for example). But how did such sites achieve that? How did the green toolbar grow so much for them and not as much for your grandma's personal webpage?<br /><br /> Soon enough, theories and speculations produced an approximation of the algorithm[7], which is generally thought to be an acceptable model to understand how the system works.<br /><br />Take the following equation:<br /><br /><em>PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))</em><br /><br />Where:<br /><br /><em>PR(A)</em> - The PageRank value of a certain page<br /><em>PR(Tn)</em> - The PageRank value of all pages linking to A<br /><em>C(Tn)</em> - The number of links present on page Tn<br /><em>d</em>(... - "damp factor", thought to be 0.85 <br /><br /> It now appears clear that the PageRank of page A depends on the number of pages linking to it. Furthermore, important factors taken into consideration are the <em>quality</em> of such pages (i.e. whether they have a high PageRank themselves or not) and the number of links present on each page, which causes the vote to be <em>divided</em> equally among them. <br /><br /> This is, in a nutshell, how PageRank is supposed to work. This is obviously a simple model, and there's actually a more mathematical/probabilistic approach[8] which goes beyond the scope of this article and requires some notions of probability theory.<br /><br /><br /><strong>Considerations and opinions</strong><br />With this model in mind, it's now possible to understand how (in a very simplified way) Google works: each month Google spiders search the web, and follow links from a page to another, keeping track of the "votes". PageRank is then calculated for every page and updated. This process normally takes a lot of time and, as a matter of fact, PageRank seems to be updated only every 4 months nowadays: these trimester updates normally causes a page to increase its rank by one (or more if you're lucky) level on the bar, or in some cases, lower it in the same way.<br /><br /> By taking a closer look at the formula proposed above, you'll notice that the maximum value of PR(A) is by no means equal to 10, as it depends on how many pages link to A and how many outbound links there are on such pages. As a matter of fact, people started speculating on the nature of the scale used for PageRank: on the toolbar it ranges from 0 to 10, while in reality a PageRank 10 (take Microsoft.com for example) should correspond to <em>some millions</em> in practice. <br /><br /> The most accredited theory is that the PageRank displayed on the green bar is the result of a sort of correspondence between real values and such 0 to 10 scale. Also, people suggested that such scale is in fact a base 5 (or 6) logarithmic scale. This would explain for example why it takes much longer to acquire PageRank 7 from PageRank 6 than acquiring PageRank 3 from PageRank 2.<br />For the non-mathematical minds, a <em>logarithmic scale</em> is a succession of numbers NOT incremented by "1" or a fixed quantity, but by an always-growing exponential factor: taking a base-10 logarithmic scale, values of 1,2,3 would correspond respectively to 10^1, 10^2 and 10^3 (10, 100, 1000).<br /><br /> For a long time Google seemed to use PageRank as an important factor for getting first places in search results, and it's still partly true: if you search for the keyword "Italy" you're likely to find some high PR sites as first results.<br /><br /> This resulted in all the possible forms of speculations: webmasters started asking money for publishing links on high PR pages, and similarly SEO experts started adopting various infamous tactics to obtain a high PageRank for their customers: this includes, for example, <em>link farms</em>[9].<br /><br />It's now clear that what is was believed to be a solution relying on the <em>uniquely democratic nature of the web</em> turned out to be a complete failure in that sense, because the very basis of the concept is wrong. Sad, but true, the WWW is by no means democratic at all. <br /><br /> Another complaint against PageRank was that new sites took ages to acquire <em>respectable</em> PageRank and therefore appear on the top of search results, no matter how wonderfully they were written. This is still partly true, as anyone can notice by searching Google, but the algorithm itself is continuously being tweaked both for stopping spammers and link farms, and also to favour those sites which provide relevant and appropriate content and are not up to some dodgy trick; I must admit that the situation is gradually getting better.<br /><br /><br /><strong>Case Study: ItalySimply.com and h3raLd.com</strong><br />I'm now going to discuss my own personal experience with PageRank applied to my two websites, ItalySimply[10] and h3raLd Labs[11]. While the second one is not currently advertised or promoted, because at the moment I don't have enough time for other web developing projects, with the first one I tried to follow a <em>SEO Strategy</em> trying to acquire PageRank and good placement in search engines.<br />You can see the result yourself: ItalySimply acquired PageRank 5 and h3raLd PageRank 4: not bad at all considering they are both two relatively new websites, ItalySimply being officially born in August 2004 and h3raLd Labs actually had some serious content from April 2005 on. <br /><br /> For ItalySimply, I even experienced a period of <em>PageRank 0</em> which lasted about 2 months: although according to Google all websites should have at least PR1, PR0 is used to penalize some <em>unusual</em> behaviour which in my case was a <em>302 - Temporarily Moved</em> redirect which was necessary to redirect users to a subfolder of the server. Later on I learned how this can be interpreted as a dodgy redirection by search engines[12], and why I was penalized by Google for this with a PR0. After noticing the mistakes, I immediately started a strategic link campaign; obtaining links from some good sites (also with high PR) related to mine, and PageRank for ItalySimply began to grow, from 0 to 3, then 4, and just recently 5.<br /><br /> At the same time, I re-designed h3raLd.com and noticed that it acquired PR1, because it was already listed in Google and didn't get any <em>vote</em> from other sites. I then decided to put a link to h3raLd Labs on <em>every</em> page of ItalySimply, which are now ranging from PR5 to PR2. <br /><br /> The result was an immediate growth of h3raLd.com in terms of PR, which reached an acceptable 4 without <em>any</em> link swapped, banner displayed on behalf of other sites, or anything as such. <br /><br /> The difference between the two sites though is much bigger than 1 point on PR, in terms of placement in search results: ItalySimply has some relatively interesting content and various pages, and it ranks good enough on MSN and Yahoo, and even Google, to an extent; h3raLd.com has just 4 pages and doesn't seem to appear at all in search engines, unless you search for something like "h3raLd". Again, this is a proof that nowadays PR doesn't mean immediate placement on the top of search results.<br /><br /><br /><strong>Final Considerations</strong><br /> Although PR is by no means the unique factor to determine search engine placements, it's still certainly important as a <em>co-factor</em>. As I said, it's still extremely difficult for a new page with low PageRank to place before a high-ranked one. Surely, if I decided to put something more interesting on h3raLd.com I would get better results than buying a new domain and creating a new site: old sites with high PR are still <em>naturally</em> inclined to rank better than new ones. Got that? Now, all you need to do is buy a really stupid domain name and create some pages for it, then think about it like a bottle of whisky; let it age for a while making it get some respectable rank: when you have a clever idea you'll have your ready-made place to promote it!<br /><br /><em>In Google we trust!</em><br /><br /><br /><br /><strong>Sources and related links:</strong><br /><br />[1] Google Toolbar, <a href="http://toolbar.google.com/">http://toolbar.google.com/</a><br />[2] Stanford University, <a href="http://www.stanford.edu/">http://www.stanford.edu/</a><br />[3] Lawrence Page and Sergey Brin, "The Anatomy of a Large-Scale Hypertextual Web Search Engine", Computer Science Department, Stanford University, <a href="http://www-db.stanford.edu/~backrub/google.html">http://www-db.stanford.edu/~backrub/google.html</a><br />[4] Google, <a href="http://www.google.com/">http://www.google.com/</a><br />[5] Google Technology, <a href="http://www.google.com/technology/">http://www.google.com/technology/</a><br />[6] List of PageRank 10 sites, <a href="http://www.searchenginegenie.com/pagerank-10-sites.htm">http://www.searchenginegenie.com/pagerank-10-sites.htm</a><br />[7] Ian Rogers, "The Google Pagerank Algorithm and How It Works", IPR Computing Ltd. <a href="http://www.iprcom.com/papers/pagerank/index.html">http://www.iprcom.com/papers/pagerank/index.html</a><br />[8] Pagerank, Wikipedia page, <a href="http://en.wikipedia.org/wiki/Pagerank">http://en.wikipedia.org/wiki/Pagerank</a> <br />[9] Link Farm, Wikipedia Page, <a href="http://en.wikipedia.org/wiki/Link_farm">http://en.wikipedia.org/wiki/Link_farm</a><br />[10] ItalySimply - Italy Real Estate Services and Relocation Help, <a href="http://www.italysimply.com/">http://www.italysimply.com/</a><br />[11] h3raLd Labs - Freelance Web Development, <a href="http://www.h3rald.com/">http://www.h3rald.com/</a><br />[12] "The Rundown on 301 and 302 redirects", September 10th, 2004, <br /><a href="http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html">http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html</a><br />
A contents/articles/perfect-browser.html

@@ -0,0 +1,7 @@

+----- +title: The Perfect Browser +content-type: article +timestamp: 1134135061 +tags: browsers +----- +So you finally decided to say goodbye to Internet Explorer, but now you feel lost in a multitude of browsers that all claim to be faster, more customizable, safer, or simply better than IE. Are they telling the truth? If so, which one is the perfect browser?<strong>Point of view, clarifications and scope of this article</strong><br /><br />So you're reading this article hoping to find out which is the <em>best</em> browser ever made? Well, you're wasting your time. There's no such thing as <em>The Perfect Browser</em>, despite the various attempts made by Mozilla Foundation, Opera, Microsoft and others. After trying out nearly all of the major browsers currently available, I came to this conclusion: the perfect browser is a relative term, dependent on the particular person you ask, if it exists at all. Contrary to popular belief, I myself am not a 100% Firefox freak, and I do not consider myself biased to the point of going around shouting that Firefox is the <em>"best browser ever made."</em> Granted, I do do that sometimes, but let's put my personal bias into some sort of perspective:<br /><br />Mozilla Firefox represents the most remarkable effort to create a <em>perfect browser</em>, but in some cases, and for some particular tasks, it may not be considered optimal by <em>some people</em>.<br /><br />Having said this, I hope I can convince you that I'm not <em>that</em> biased toward Mozilla's leading product, even if, as a matter of fact, nearly all the programs mentioned in this article are based on the Mozilla ('Gecko'? No, not quite... [1]) engine or a derivative. <br /><br />Originally, I was going to write a comparative review of Opera and Firefox, but in the end, I chose to broaden the scope a bit to include other products as well. There are already many articles and blog posts which have compared the two, either favoring Opera [2] or Firefox [3]. I also decided not to review browsers for platforms other than Windows, so there won't be any mention of Konqueror, Galeon, Safari, Camino, etc., which, although they are all interesting alternatives, go beyond the purpose of this article, which is to offer <em>Windows users</em> a small selection of alternative browsers.<br /><br /><br /><strong>Alternative Browsers</strong><br /><br />There are literally dozens of <em>alternative</em> browsers around. There are lists available online, and perhaps the most famous one is on Evolt.org [4], which can be considered comprehensive and accurate. Various statistics are available for objective comparisons of all the major browsers, for regarding for example speed [5] and overall performance and functionality [6], but even if such analyses are accurate, they are often not enough to fully evaluate a browser.<br /><br />In the following sections, we'll examine the following four free browsers, which are considered to be the most obvious alternatives to Internet Explorer. <br /><br />- Firefox<br />- Opera <br />- K-meleon<br />- Netscape<br /><br />I deliberately chose not to spend time on Slim Browser [7], Maxthon [8] (previously known as MyIE), or AvantBrowser [9], which are basically extensions built on top of Internet Explorer to add functionality to it. I also left out Mozilla's SeaMonkey [10], partly because of its alpha status, and partly because it is being marketed as an Internet Suite rather than just a web browser.<br /><br /><br /><strong>Why IE is 'bad'</strong><br /><br />'IE is crap', 'you MUST NOT use Internet Explorer', 'Internet Explorer is for n00bs'... how many times have you heard or read this? Some people tend to degrade Internet Explorer all the time, and the funny thing is, if one were to ask 'Why so?', approximately 40% would be unable to give a reply any more concrete than 'because Firefox is simply better' or 'because Opera owns!' or '[insert browser name here] simply can't be compared to IE!'.<br /><br />Now, all this may be true to a certain extent, but it certainly will not convince a person to switch browsers, and may even have the opposite effect: people will keep using IE no matter what! This is bad for the alternative browser market in general. It still looks like IE is used by 90% of people on the Internet and this will not change simply by telling all those people that they are "dumb" for using IE. There are sites whose only purpose is to make people abandon IE [11], but they discuss objective fact instead of opinionated propaganda. <br /><br />Personally, I decided not to use IE anymore because:<br /><br />- It's slow on my computer (which is old, as some of you may know)<br />- It's less secure than other browsers, and more vulnerable to malicious software and attacks, simply because it's used by the most people - that makes the BEST option for those who actually enjoy exploiting vulnerabilities, because it's not frequently patched [12].<br />- It's not very customizable<br />- It doesn't have (or support) additional features<br />- It deliberately breaks web standards or creates its own, which makes things difficult for web developers<br />- It's normally behind the supported technologies<br />- I hate the idea of using a proprietary browser imposed by Microsoft<br /><br />I could discuss each one of these reasons in more detail, but that would be an article in and of itself.<br /><br /><br /><strong>Firefox</strong><br /><br />The famous and multi-awarded Firefox [13] browser is now approaching the 1.5 release, and it's constantly improving both in security and features. Firefox quickly became Mozilla's leading product, ahead of the Mozilla Suite (which includes a browser, HTML editor, email client and address book), which is now being rebranded as <em>SeaMonkey</em> [10].<br /><br />On the other hand, Firefox is simply a web browser, and doesn't offer an email client or html editor anymore, which was obviously a choice made to improve the performance of the application and engine, which was normally quite bulky, especially on old hardware. This was a wise decision, and Mozilla/Netscape enthusiasts quite liked the idea of having a lightweight browser rather than a slow-performing suite of applications. However, someone who uses both Firefox and ThunderBird (Mozilla's standalone email client) will end up using nearly twice the amount of memory used by SeaMonkey alone: this is because you now have two separate applications, so you have to load the rendering engine <em>twice</em>.<br /><br />With Firefox, the Mozilla Foundation aimed to create a browser which would satisfy web developers by supporting the latest web standards and technologies, while at the same time offering new and interesting functionalities to end users.<br /><br />The Fox is not ideal for all types of users, but a constantly growing community of enthusiasts [14] is trying literally every way possible to promote it by targeting virtually all kind of audiences. <br /><br />In addition, its design makes it mostly secure; even if a few bugs slip by, they are not design flaws, merely implementation issues. When a bug is found, the Firefox development community works quickly to fix it, and usually has an excellent track record regarding that. However, the most important aspect of Firefox's security (on Windows, that is), is that it is not integrated into the system like IE is. Remote attacks on a Windows PC are mostly executed through IE, and the insecure design causes it to have unfixed critical bugs after five years of non-development, because Microsoft tends to shove bugs under the carpet whenever possible; half year, one year or even older unfixed bugs are not unheard of.<br /><br />To make it more readily apparent, statistics [12] [15] say that the maximum time IE is <em>not</em> in danger from to an unpatched vulnerability is 7 days, while for Firefox, it is well over 200.<br /><br />Another of Firefox's strong points is the ability to add various <em>extensions</em> and <em>themes</em> for all kind of necessities: improving web searches, getting localized weather forecasts, playing music, blocking adverts, tweaking webpages, composing webpages, etc.<br />Firefox is <em>extremely</em> customizable, and extensions don't affect the overall browser performance, as the actual overhead is minimal - this has been tested on a Pentium 2, so you can believe me.<br /><br />This is all very well and good, but the ability to customize a browser is not considered a good thing by all. This is because it tends to become a necessity - if Firefox didn't have extensions, it would still be better than IE for security and some features, but not amazingly so. Opera users found that Firefox without extensions could not match up to the features in Opera.<br /><br />After asking some IE users, it seems that Firefox can appear too <em>geeky</em> for the average user who only wants to surf the Net and doesn't really care about web standards and browser customization. After all, a lot of people may decide that they don't want to spend their time tweaking and personalizing a program to make it fit their needs, as they find it annoying.<br /><br />Finally, a slightly unpleasant thing about extensions is that almost every time a major update to the browser comes out, some of the installed extensions become unusable until their developers update them. In order to solve this problem, Mozilla Development Team is releasing public alphas and betas of every major milestone, to allow third party extension developers update their extensions in time for the stable release. As a consequence, to avoid trouble with extensions, I suggest non-developers stick with the stable releases and avoid updating to alpha or beta versions.<br /><br />Anyhow, all those people who don't like having to play around with extensions should just use Opera.<br /><br /><br /><strong>Opera</strong><br /><br />A few years ago I came across Opera's site [16], and I downloaded their <em>free</em> browser to try it out. At the time, Firefox wasn't a big thing, and the Mozilla/Netscape suites were too bulky for my liking, so I was looking for something lightweight and fast. That's the reason why the Opera team has always used the slogan <em>'the fastest browser on Earth'</em> to describe their product, and they seem to be right[5]. <br /><br />I actually didn't like it at first, because - at the time - it didn't offer anything better than IE <em>and</em> the company was more or less silently asking people to <em>pay</em> them to get rid of the annoying ads the browser displayed on the interface. Browsers are nothing but software, however, and I think the reason why they are (nearly) all free is because IE comes free with every Windows installation. <br /><br />Finally, Opera agreed with that same philosophy: while celebrating their 10 years of existence, Opera Software ASA decided initially to give away license codes to get rid of the ads, and then to finally stop annoying their users with ad banners and cut their licensing fee altogether [17]. Obviously, at that point, I was really tempted to give Opera another chance.<br /><br />I was impressed, indeed. Opera is actually a nice piece of software. It's really fast in rendering pages, it displays them correctly, respects web standards (they improved this quite a bit over the years), and it's fast even when pressing the Back and Forward buttons. Its interface is probably the best and cleanest ever made; it's easy to use even for novices even if some things (like keyboard shortcuts) are different.<br /><br />Speaking of features, it offers: <br /><br />- Tabbed browsing and integrated search like Firefox (and IE7)<br />- A truly remarkable technology able to make <em>any webpage</em> fit a window by zooming images in and out automatically<br />- A complete and fully working mail client<br />- An address book<br />- The ability to save browsing sessions<br />- Easily re-open closed tabs<br />- Skins<br />- A <em>magic wand</em> to fill in forms and logins automatically<br />- A built-in scratchpad/notepad<br />- Voice integration (yes, you can even speak to your browser now, imagine that!)<br />- SVG support - not that it really matters for now, but it's a cool thing to say nowadays<br /><br />All of this is included in an application which is - to my eyes - more lightweight than Firefox. But it's not perfect yet. Why? The reason is simple. It allows a certain degree of customization, but doesn't have 'extensions'. One thing is true though, as someone pointed out [18]: in most cases, for 'average use', Opera doesn't need extensions, because it already offers quite a lot of functionality that doesn't need to be extended. <br /><br />It also happens that the features listed above are the most commonly requested by the majority of users, and that was, in my opinion, a clever marketing move. <br /><br />There are still two things about Opera that put me off from using it, however. One is the lack of a built in <em>"I'm feeling lucky"</em> feature in the taskbar - even though there is a workaround [19]. The other is more serious, and it concerns compatibility. Even though the people at Opera Software are struggling more than ever to make it compatible with every site and technology - full Gmail support has recently been added - Opera cannot render some sites correctly. The most blatant example is Writely.com [20], which is a site offering a free ajax-based online word processor. It seems that Opera doesn't like Ajax too much for now.<br /><br /><br /><strong>K-meleon</strong><br /><br />Now let's talk about a piece of software which appears to have been forgotten by the majority of people in the world: K-meleon [21], a Windows-only, Mozilla-based browser. It is a prime example of how good software can be ignored by the masses, for three main reasons:<br /><br />- It wasn't conceived with the <em>average user</em> in mind<br />- There's another browser using the same technology which is considered to be better<br />- It apparently doesn't offer anything new or stimulating<br /><br />I would define it as a browser for true geeks. To unlock its secrets you need to play around with configuration files, hundreds of hidden settings, macros, and menus. However, it can be very gratifying for people who enjoy this sort of thing. There's just one little problem with it: people who enjoy tweaking an application as much as K-meleon needs to be tweaked normally prefer a more customizable operating system altogether, but the browser is strictly <em>Windows only</em>.<br /><br />I like it even if I don't have the time to play around with it as much as I would like to, and I think it is useful for some specific tasks. In particular, I found myself using it to upload pictures when updating one of my sites, and similarly repetitive jobs where all you need is a browser able to render a page quickly without using too much memory or CPU cycles. <br />K-meleon is built for Windows, and is therefore optimized for it, perhaps even more so than Firefox, and it's arguably nearly as fast as Opera. As far as I'm concerned, it's more lightweight than Opera and this makes it ideal as a <em>secondary browser</em> to run together with Firefox or Opera. Why would you want to do that? Well, suppose you have to check two different GMail accounts and reply to emails here and there: using a secondary browser to keep you logged in to another Google account is better than having to login and logout repeatedly.<br /><br />Something amusing (or maybe not) about K-meleon: it seems to have no security advisories [22] on Secunia as only one was submitted and quickly patched in 2004, and that was all. The impression is that the browser is just not very popular.<br /><br /><br /><strong>Netscape</strong><br /><br />Netscape [23] is perhaps one of the oldest browsers that is still alive. It used to be a full-on web suite (basically a rebrand of the Mozilla Suite), and thus featured a web browser (Netscape Navigator), a WYSIWYG HTML editor, a mail client, and an address book. It was never lightweight (due to all the applications bundled together), but it was a true all-in-one Internet suite, at the time.<br /><br />Nowadays people prefer having a separate email client or check their email online. They rarely need an address book, since email addresses and contact details are normally stored automatically by the mail client/web application. The average user probably won't use the HTML editor, and the web developer will choose a more professional/optimal solution than Netscape/Mozilla Composer.<br /><br />Furthermore, Mozilla <em>suddenly</em> started changing its roadmap, heavily marketing a standalone browser rather than an application suite, so people at Netscape thought it was the right time to do the same. Netscape now offers only a browser. It is based on Firefox, but has a lot of additional features. <br /><br />When the Netscape browser was launched in May 2005, it was supposed to represent a <em>new standard</em> for online security, but various vulnerabilities[24] were found just after release, which caused it to gain the totally opposite reputation. Everything was fixed quickly enough, but people weren't impressed by that (myself included). Furthermore, another incident occurred a few days later. Microsoft advised its customers to uninstall Netscape 8 from their system [25], because after installing it on Windows, Internet Explorer inexplicably became unable to render XML pages, displaying a blank page instead!<br /><br />Apart from these odd events - which indeed half ruined Netscape's reputation - the application itself isn't that bad; it's based on Firefox, after all.<br /><br />Differences from Mozilla's browser are obvious immediately after installation: Netscape opted for a sort of online install, in the sense that the installer, which is downloadable from the official site, starts the download of the actual components and then installs them. In the meantime, slides specially tailored for end users appear on the screen, introducing the main browser features. These slides provide entertaining and informative viewing for the user. <br /><br />The browser is shipped with two default themes, and the interface itself is rearranged: search bar on the left, four weird buttons on the right, and a magic <em>multibar</em> underneath. The multibar addresses a common issue with Firefox and IE - if you keep installing extensions and toolbars, the window used to display the page eventually becomes smaller. This new feature allows users to choose up to 10 different bars which can be selected in rotation with a single click.<br /><br />The real innovation, however, is the Security Center. It seems that these two magic words are now heavily used everywhere, as if they have some mystical power to reassure users and make them feel protected. In reality, the security center only tells you whether or not you can trust a site, based on Netscape's list of trusted sites or your preferences, and it automatically adjusts the browser security settings accordingly.<br /><br /><em>But isn't Netscape a Firefox based browser?</em><br /><br />Yes and no. Netscape can render using either Mozilla's engine or Internet Explorer's! Good or bad? Well, probably good in some cases, but rather annoying sometimes as it's <em>too smart</em>: I tried visiting Microsoft.com and without doing anything the rendering engine switched to IE automatically! It basically tries to guess which browser is better to render certain pages, and this can be problematic, especially if it renders as IE any page which uses ActiveX technology. This short term gain - <em>total</em> compatibility - is achieved by surrendering to IE flaws and maybe even giving no incentive for developers to abandon an IE-oriented web development: <em>'If Netscape can use an IE engine, why should I code using web standards?'</em> <br /><br />Fortunately, despite the effort made by the developers and marketing experts at Netscape Corp., the new browser is not convincing enough. It is also clearly heavier on resources than Firefox; while I was just surfing it started claiming more than 70MB of RAM, while Firefox normally uses half the amount. Personally, I think it's an interesting attempt to create a <em>perfect</em> browser, and it enriches Firefox with some new features which either are normally not available or require extensions, but it's not for me.<br /><br /><br /><strong>Summing up</strong><br /><br />As I said at the beginning (ruining all the suspense), there's no perfect browser; there's nothing universally accepted by everyone because everyone does different things. Personally, I'd advise using Firefox for general use, because it offers excellent compatibility, security and features. <br /><br />On the other hand, if you don't like extensions and you just need something to browse the Internet quickly, without the hassle of having to download additional components, go for Opera, although there are still some compatibility issues with it that need to be fixed. <br /><br />For Windows-based geeks, I'd recommend K-meleon: it's fast, simple, effective, and gives you plenty of things to play with to tweak almost every part of the browser. The project is not dead; a community of people are using it and providing patches, even if the leading developer is not able to do so.<br /><br />Netscape still needs some work, but it could be useful for quickly viewing a site on Firefox and IE, for example. It's also a little more user-friendly than Firefox. Those who are already accustomed to Firefox, however, are more likely to stick with it.<br /><br />Again, depending on what you do, what your needs are, and even your mood, one browser can be better than others. Personally, I use a variety of browsers: Firefox mostly, but K-meleon and Opera as well, and I like this combination as my <em>perfect browser</em>. What about you? <br /><br /><br /><strong>Credits</strong><br />Thanks to comet for providing appropriate thoughts and opinions regarding the browsers' security. <br /><br /><strong>Notes and Resources</strong><br /><small><br />[1] Clarification about the 'Gecko' engine: <a href="http://www.mozilla.org/newlayout/gecko.html">http://www.mozilla.org/newlayout/gecko.html</a><br />[2] 'One Week with Firefox, its Extensions and Opera', OsNews.com, by Mart'n Marconcini <a href="http://www.osnews.com/story.php?news_id=7562">http://www.osnews.com/story.php?news_id=7562</a><br />[3] 'Firefox 1.5 vs Opera 8.5', SonSpring Journal, 09/22/2005 - <a href="http://sonspring.com/journal/firefox-15-vs-opera-85">http://sonspring.com/journal/firefox-15-vs-opera-85</a><br />[4] Evolt.com, Browser list - <a href="http://browsers.evolt.org/">http://browsers.evolt.org/</a><br />[5] HowToCreate.com - Browser Speed Analysis -<a href="http://www.howtocreate.co.uk/browserSpeed.html#winspeed">http://www.howtocreate.co.uk/browserSpeed.html#winspeed</a><br />[6] 'Comparison of web browsers', Wikipedia page - <a href="http://en.wikipedia.org/wiki/Comparison_of_web_browsers">http://en.wikipedia.org/wiki/Comparison_of_web_browsers</a><br />[7] Slim Browser, Home Page - <a href="http://www.flashpeak.com/sbrowser/">http://www.flashpeak.com/sbrowser/</a><br />[8] Maxthon, Home Page - <a href="http://www.maxthon.com/">http://www.maxthon.com/</a><br />[9] AvantBrowser, Home Page - <a href="http://www.avantbrowser.com/">http://www.avantbrowser.com/</a><br />[10] SeaMonkey Project, Hope Page - <a href="http://www.mozilla.org/projects/seamonkey/">http://www.mozilla.org/projects/seamonkey/</a><br />[11] StopIE.com - <a href="http://www.stopie.com/">http://www.stopie.com/</a>, BrowseHappy.com - <a href="http://browsehappy.com/">http://browsehappy.com/</a><br />[12] Secunia vulnerabilities, Internet Explorer - <a href="http://secunia.com/product/11/">http://secunia.com/product/11/</a><br />[13] Firefox Home Page - <a href="http://www.mozilla.org/products/firefox/">http://www.mozilla.org/products/firefox/</a><br />[14] Spread Firefox website - <a href="http://www.spreadfirefox.com/">http://www.spreadfirefox.com/</a><br />[15] Secunia vulnerabilities, Mozilla Firefox - <a href="http://secunia.com/product/4227/">http://secunia.com/product/4227/</a><br />[16] Opera Browser, Official Website - <a href="http://www.opera.com/">http://www.opera.com/</a><br />[17] Opera becomes free, webpage - <a href="http://www.opera.com/free">http://www.opera.com/free</a><br />[18] Opera and Firefox extensions - <a href="http://virtuelvis.com/archives/2005/01/opera-and-firefox-extensions">http://virtuelvis.com/archives/2005/01/opera-and-firefox-extensions</a><br />[19] How to add 'I'm feeling lucky' to Opera - <a href="http://my.opera.com/community/forums/topic.dml?id=63620">http://my.opera.com/community/forums/topic.dml?id=63620</a><br />[20] Writely.com, free online word processor - <a href="http://www.writely.com/">http://www.writely.com/</a><br />[21] K-meleon Project, Sourceforge - <a href="http://kmeleon.sourceforge.net/">http://kmeleon.sourceforge.net/</a><br />[22] Secunia vulnerabilities, K-meleon - <a href="http://secunia.com/product/3684/">http://secunia.com/product/3684/</a><br />[23] Netscape Browser, Home Page - <a href="http://browser.netscape.com/ns8/">http://browser.netscape.com/ns8/</a><br />[24] 'Netscape fixes holes in 'security' browser', Zdnet - <a href="http://www.zdnet.com.au/news/security/0,2000061744,39192767,00.htm">http://www.zdnet.com.au/news/security/0,2000061744,39192767,00.htm</a><br />[25] Netscape 8 'breaks' IE, Zdnet - <a href="http://news.zdnet.co.uk/software/applications/0,39020384,39200178,00.htm">http://news.zdnet.co.uk/software/applications/0,39020384,39200178,00.htm</a><br /></small><br />
A contents/articles/pre-review-of-ie7.html

@@ -0,0 +1,7 @@

+----- +title: Pre-review of Internet Explorer 7 +content-type: article +timestamp: 1132939006 +tags: browsers|microsoft|ie +----- +Internet Explorer 6.0 was officially released on August 27th 2001, and it still runs on millions of computers across the world: it's probably the browser release which has lasted the longest in the entire history of the Internet! While I'm not sure if this is an "achievement" so much as it is an "imposition", Uncle Bill admitted that his latest baby, Internet Explorer 7, is due soon...<strong>In the Beginning</strong><br />Recently (5 months ago, that is) the aforementioned <em>"Microsoft Chairman and Chief Software Architect Bill Gates announced Internet Explorer 7.0, designed to add new levels of security to Windows XP Service Pack 2"</em>. This happened at the RSA Conference in San Francisco, and although I wasn't there, I can imagine that amongst the oohs and ahhs of the crowd, someone must have whispered "It's about time". <br /><br />Firefox, on the other hand, keeps its fans alive with pseudo-releases every so often, 1.0.4, 1.0.5 and so forth, which at least makes you <em>feel</em> like some progress is going on, be it a security fix or a new feature. Firefox will hopefully release version 1.1 <em>at any time</em> now, with various new <a href="http://www.zzine.org/read.php?op=view&item=1321">features</a> that Microsoft can only dream about. I think that when Bill created Internet Explorer 6, he probably commanded that it should be called "version 6.0" for ever and ever: fixes, service packs, and new features (popup blocking, etc.) have been added, but after 4 years I'm <em>still</em> running "Internet Explorer version 6.0".<br /><br />Version 7.0 is supposedly due soon, and - guess what - not only for Longhorn users (but where's Longhorn anyway?), but also for Windows XP SP2 users, there's great news: beta testing! If you run Windows 2000 it looks like you'll have to keep using IE6 until you get a "more advanced" version of your OS, but<a href="http://www.microsoft.com/windows/IE/ie7/default.mspx">Internet Explorer 7</a> is supposed to be "<em>freely downloadable, as always</em>" this summer. <br /><br />So what's new in IE7?<br /><br /><br /><strong>Discovering (and guessing) further details</strong><br />Although nothing was supposed to be known until the first beta release, according to what seems to be Microsoft's official procedure in these cases, after Bill's announcement, speculations on IE7's new features and improvements (and quirks?) began to spread across the Internet in various forms. <a href="http://blogs.msdn.com/ie/default.aspx">IEBlog</a> seems to be the most authoritative (and biased?) source to get information, simply because the folks there are those who ( supposedly) are planning and developing IE7. <br /><br />When the announcement was made, those guys wrote something like:<br /><fieldset><blockquote><br /><em><br />First, some basics: we?re committing to deliver a new version of Internet Explorer for Windows XP customers. Betas of IE7 will be available this summer. This new release will build on the work we did in Windows XP SP2 and (among other things) go further to defend users from phishing as well as deceptive or malicious software.<br /><br />Why? Because we listened to customers, analysts, and business partners. We heard a clear message: ?Yes, XP SP2 makes the situation better. We want more, sooner. We want security on top of the compatibility and extensibility IE gives us, and we want it on XP. Microsoft, show us your commitment.?<br /></em><br /></blockquote></fieldset><br /><br />That's so sweet! They are doing this for us, and they are listening to us...<br /> <br />Sarcasm aside, it was clear from the beginning that Microsoft wanted to focus more on security: maybe because of the stereotype of IE which has emerged through the years (IE = An easy way for bad people to do bad things to you), maybe because it was time to do it, or maybe because they got bored. The most likely reason, though, is commercial: Firefox's popularity has surged recently, and Microsoft felt an urge to open (Fire)fox-hunting season as soon as possible.<br /><br />Back in March, more details about this new amazing product began to <a href="http://www.microsoft-watch.com/article2/0,1995,1776290,00.asp">leak</a>, inevitably, and here are the new features that IE7 is supposed to have:<br /><ul><br /><li>Tabs</li><br /><li>International domain name </li>(IDN) support<br /><li>Transparent Portable Network Graphics </li>(PNG) support (finally!)<br /><li>Simplified printing from inside IE 7.0</li><br /><li>A built-in news aggregator. </li><br /><li>Somewhat extended support to CSS2 </li>(but not the whole standard)<br /></ul> <br /><br />Wonderful and incredible at the same time: is IE7 trying to emulate Firefox?<br /><br /><em>So, what will this wonder look like?</em> - Someone might wonder... And here are some leaked <a href="http://neowin.net/comments.php?id=29131&category=main">screenshots</a> that could be real enough. Impressive.<br /><br /><br /><strong>New support for old stuff</strong><br />Any Firefox user reading the features list above probably wasn't terribly impressed: everything mentioned there has been supported in Firefox for ages, but personally, I'm truly pleased to see that Microsoft finally decided to try to catch up with more advanced browsers (not just Firefox, but Opera as well) and web developers can relax a bit (maybe).<br /><br />There's a nice post on IEBlog regarding <a href="http://blogs.msdn.com/ie/archive/2005/04/26/412263.aspx">PNG Support</a>, where the guy who made the thing possible, Sam Fortiner, explains what he had to do and why.<br />It's widely known that PNG images currently aren't handled correctly in Internet Explorer: if they are transparent, in particular, they will show a grey-ish background instead of being transparent. I guess that's not a good thing to see, after trying to overlay PNG images, for example. As a result, web developers currently don't use the PNG format, nor its transparency support. With IE7's transparent PNG support, sites which seemed to only display properly in Firefox will appear equally beautiful in the new Internet Explorer. <br /><br />Tony Schreiner, on the same blog, provides a detailed explanation on his work concerning <a href="http://blogs.msdn.com/ie/archive/2005/05/26/422103.aspx">Tab Support</a>: tabs are a new thing for Microsoft, and for long it was feared that they could cause "confusion" among end users accustomed to the tabless policy of IE6 and of the whole Windows interface. Regarding this, I think that people at Redmond should thank firefox a million times for "pioneering" into the unexplored land of Tabbed Browsing: firefox has been using tabs since the very first release, and it was highly acclaimed for this. Eventually then, Microsoft folks released that people are not as stupid as they hoped they'd be, and <em>aren't</em> confused by tabs at all, so they decided to implement them in IE7.<br /><br />Tony gives away some technical details regarding IE7's implementation of tabs, which essentially consists of <em>"pushing a large part of what you see in IE6 into a tab"</em>, and let's hope it works. IE was born and evolved as a single-window browser, so this addition represents quite a challenge to Microsoft's way of thinking about User Interfaces... what's next then? Maybe Tabs in Windows Explorer as well? Maybe...<br /><br />Little is known about the other "new features", apart from CSS2 support, which will be described in the next paragraph. A built-in RSS aggregator? It's now acknowledged that Longhorn will have an extensive <a href="http://msdn.microsoft.com/longhorn/understanding/rss/default.aspx?pull=/library/en-us/dnlong/html/rsssupportinlonghorn.asp">RSS support</a> itself, so this seemed a logical addition to IE7.<br /><br /> <br /><br /><strong>The fear of uncertainty</strong><br />IE support for web standards, in particular CSS, has always been a hot topic for developers. <br /><br /><fieldset><blockquote><em>When we shipped IE 6.0, we finally fully supported CSS 1, and had some pieces of CSS2 implemented as well.</em></blockquote></fieldset><br /><br />That's honest, at least. Microsoft - so far - does not support CSS2, but at least offers full CSS1 support. As a personal note, I'd reword the previous as <em>"Microsoft does not want to fully support web standards because 90% of Internet users use IE, hence, they can make the laws"</em>. Cruel, but basically true: Microsoft does not care about web standards, and IE's lack of support can be used as a way to force developers to create websites which are IE-compatible rather than standards compatible. There's more information <a href="http://www.alttags.org/archives/2004/04/29/33/">here</a>.<br /><br />Words in an official <a href="http://blogs.msdn.com/ie/archive/2005/03/09/391362.aspx">post</a> don't bode well for the future either:<br /><fieldset><blockquote><em><br />Given the strong usage of IE in the corporate space as well as embedded in applications, we have a strong requirement for backwards compatibility with our previous behavior, compliant or not; that requirement does not mean ?don?t touch anything?, it is just a recognition that keeping our engine in sync across strict and quirks modes is challenging when quirks mode has to work nearly exactly the same as it always has. We will continue to improve our compliance under strict mode even when it breaks compatibility, and under quirks mode when it?s not damaging to our backwards compatibility.<br /></em></blockquote></fieldset><br /><br />Basically, this provides an excuse to not fully adopt web standards, which can be seen as legitimate or not, according to your browser preferences, so I'm not going to comment on that...<br /><br />In another article, <a href="http://www.microsoft-watch.com/article2/0,2180,1776935,00.asp">MicrosoftWatch</a>, reports that <em>"One partner said that Microsoft considers CSS2 to be a "flawed" standard and that the company is waiting for a later point release, such as CSS2.1 or CSS3, before throwing its complete support behind it".</em><br />Although this cannot be regarded as a 100% authoritative source, people started <a href="http://dean.edwards.name/weblog/2005/03/the-reason/">speculating</a> that IE7 could potentially become a dictator for other browsers (like its predecessor), because so many people still use the MS browser. It could help Microsoft, as it did in the past, so why shouldn't Bill take advantage of it?<br />
A contents/articles/project-gutenberg.html

@@ -0,0 +1,7 @@

+----- +title: Project Gutenberg: The What, When and Why +content-type: article +timestamp: 1134215728 +tags: writing|internet +----- +I always liked reading Shakespeare, and I always wanted to have a copy of every one of his plays, tragedies and sonnets on my bookshelf ready for consultation, but such things always seemed unrealistic because I had neither the space for them nor the time to find them all nor the money to spend on them when I did find them. <br />Now I can store the complete works of William Shakespeare directly on my mobile phone, and they take up as little as 1.4 MB compressed...<br /><strong>Origins</strong><br /><br />Even if you never heard the word ?e-book?[1] before, you can probably guess its meaning: <em>electronic book</em>, or a book in digital format. What you probably don't knoe is that people started copying books into digital format nearly as soon as computers were available to the public, and maybe even before: the first <em>e-book</em> was created in 1971.<br /><br />That year, a student at the University of Illinois named Michael Hart was given the equivalent of $100,000,000 (or $100,000, or $1,000,000 - there is no official estimation) in <em>computer time</em>. Basically, since he was friends with some of the operators at the Materials Research Lab, he was given an operator account on the Xerox Sigma V mainframe, which later became one of the 15 nodes that developed into the global network that eventually became the Internet. At that time, having that much computer time at your disposal was indeed a great privilege, and Hart felt that he had to use that time for something useful that could in theory generate a profit - not an easy task when you consider that only a limited amount of people in the world had access to a computer, and that those computers weren?t even connected together. <br /><br />Foreseeing an era where computers where interconnected and regular people had access to them, Michael Hart thought that virtually all texts and books could be made available in digital format, for free, to anyone who wanted to read them. Certainly, such a <em>project</em> seemed quite unrealistic and excessively time consuming at the time; nevertheless, he decided to start copying the first book himself, the Declaration of Independence of the United States, which he was carrying in his backpack.<br /><br />Project Gutenberg[2] was born with that one single text, and it has grown through the years. Today, there are more than 16,000 e-books available to download and read.<br /><br /><br /><strong>What is Project Gutenberg?</strong><br /><br />By that name, Michael Hart probably wanted to define the project?s scope and vision: an idea as revolutionary for the diffusion of literature as the invention of moveable type printing[3] in the 1450s. <br /><br />The mission of the project can be summarized as follows[4]:<br /><br /><div style="text-align: center;"><em> "To encourage the creation and distribution of eBooks."<br /> </em></div><br /><br />In order to achieve this, Project Gutenberg is set up such that <em>anyone</em> can contribute to it, in many different ways. It is run completely by volunteers, hundreds of people around the world who share the same ideals and believe that literature should be freely available to everyone at virtually no cost. <br /><br />The Internet serves this purpose magnificently: it is possible to download all of the over 16,000 free e-books from the Project Gutenberg website[5] in different formats and many different languages[6]!<br /><br />However, having such a large amount of books available within a few clicks can make people forget about how time consuming the process of making one single e-book is: originally, after acquiring a paper copy of the book, Gutenberg?s volunteers had to transcribe it themselves, typing every word from the beginning to the end. Then the book had to be checked for mistakes before it was accepted into the Project. <br /><br />Producing a single e-book can therefore take many people and many hours from beginning to end, and presumably this was one of the reasons why Project Gutenberg was criticized for being more of an utopian ideal than a tangible reality: every year since its creation people have doubted the project, accusing Hart of pursuing an impossible dream, and prophesying that fewer and fewer people would join the team and that there was no future for Project Gutenberg.<br /><br />Oddly enough, they were all wrong: not only is the Project still active today, but the number of books released every year has grown consistently over time, from a few dozen in the early days to thousands per year now.<br /><br /> More and more people became involved, partially because they share the same ideals and partially because it has always been easy to get involved[7]: Project Gutenberg strives to remove all the institutional barriers which could potentially interfere with members? motivation; they try not to impose any restrictions, and they don't support perfectionism. It is believed[8] that there shouldn?t be any <em>proper</em> or <em>standard</em> way to release e-books, but instead many different ways, to appeal to many tastes: the Project doesn?t support any particular standard for releasing ebooks, although it normally takes the simplest path. Therefore, the majority of the books are available in <em>Plain Vanilla ASCII</em>, i.e., texts are written using only ASCII characters, and bold, italicized or underlined words are capitalized instead. While this format has the most limitations, it is also the most portable.<br /><br />At this point, you might wonder why they don't just scan the original books, and make them available as image files or PDF files. While it would be much faster, it also has disadvantages, such as large file size and an inability to be displayed at particular resolutions; a scanned book probably wouldn't be readable on a PDA, mobile phone, or other equally small device. <br /><br />Nonetheless, scanners do play an important part nowadays in the process of making an e-book: texts are no longer copied manually if a printed edition already exists. Instead, they are scanned with OCR[9] and then proofread twice before being accepted. The (un)official procedure recommends scanning at least one page a day, having it proofread once by someone in charge of doing so (a ?junior? proofread), and then again by a more experienced member. This has undoubtedly sped up the process.<br /><br /><br /><strong>Not All Books Are Equal (for now)</strong><br /><br />By looking at some of the titles available on Project Gutenberg, you?ll notice that most of them are <em>classics</em> or relatively old works: for example, you won?t find the latest <em>Harry Potter</em>[10] available for download.<br /><br />Since <em>all</em> of the books at Project Gutenberg are free to download (more details of the license will be given later on), and therefore not subject to fees or copyrights, only books in the public domain[11] can generally be included in the Project.<br /><br />Public domain includes all those works of art whose intellectual property cannot be legally claimed or exploited by any person, institution or legal entity, and therefore belong to all mankind. In the case of books, copyright can expire <em>only if</em> some particular conditions subsist:<br /><br /><ul><br /><li>The work was created and first published before January 1, 1923, or at least 95 years before January 1 of the current year, whichever is later.</li><br /><li>The last surviving author died at least 70 years before January 1 of the current year.</li><br /><li>Neither a </li><em>perpetual copyright</em> is granted by the Berne Convention nor has a particular government (US or EU) passed a copyright term extension.<br /></ul><br /><br />Now we can see why there are not very many <em>new</em> publications available in the project, and that?s really frustrating for Michael Hart and other volunteers:<br /><br /><em> "In the USA, no copyrights will expire from now to 2019!!! It is even much worse in many other countries, where they actually removed 20 years from the public domain. Books that had been legal to publish all of a sudden were not. Friends told me that in Italy, for example, all the great Italian operas that had entered the public domain are no longer there... Same goes for the United Kingdom. Germany increased their copyright term to more than 70 years back in the 1960's. It is a domino effect. Australia is the only country I know of that has officially stated they will not extend the copyright term by 20 years to more than 70."</em>[12]<br /><br />After all these considerations, we can take a closer look at Gutenberg?s license[13] which comes in two different versions: <em>informative</em> and normative (?legalese?, as they call it), the latter of which is the real document. Luckily, the non-legalese version is simple and complete enough: basically PG releases books which are either in the public domain or ? if copyrighted ? the author gave express permission to re-distribute them. The difference lies in the fact that if you remove PG?s trademark and license from a book which is in the public domain, you can re-distribute it freely on your own, but if the book is copyrighted and permission to distribute was given <em>only</em> to PG, you?ll have to contact the author to obtain permission.<br /><br />Furthermore, anybody can use the PG trademark when distributing <em>verbatim</em> copies of a book, with no changes (re-formatting is allowed); if you want to charge money for the copies you distribute, you have to pay royalties to PG.<br /><br /><br /><strong>Satellite Sites and Similar Projects</strong><br /><br />Michael Hart was ? and still is ? an authentic pioneer in his field: he had the idea to create the largest free library on the Internet to <em>?Break Down the Bars of Ignorance and Illiteracy?</em>. A lot of people thought he wouldn?t achieve anything, but his dedication and perseverance were simply so exemplary that more and more people got involved, a few satellite sites were created and similar projects were started in all over the world sharing the same goals.<br /> <br />Hart is obviously aware of the fact that there are also some sites <em>selling</em> e-books, but he explains that neither those sites nor any other free online library should be considered a competitor to Project Gutenberg: they all contribute to the diffusion of e-books. <br /><br />One of the most important <em>satellite site</em> of PG is ?Distributed Proofreading?[14] which is now considered the main source of PG books: every month more than 100 books are proofread by hundreds of volunteers who can register on the site for free and then get added to the project. The key concept of this parallel organization is that a single book can be proofread by more than one person at the same time, and thereby speeding up a project which would be otherwise very difficult to coordinate.<br /><br />Another site which helps the main project is HWG, the HTML Writers Guild[15]. It aims to convert PG?s plain text ebooks into more feature-rich HTML documents: by using a mark-up language it is possible to add footnotes and it can be analyzed easily by automatic tools.<br /><br />Although Project Gutenberg releases well-known books in many languages, a few sites officially affiliated with the project were created to focus particularly on their regional literature and works. That?s the case for both Australia[16] and Germany[17], for example; they both focus on their own national heritage. Regarding the latter, they recently claimed their own copyright for their e-books, and thus a new foundation is in the process of being created: Project Gutenberg Europe[18] which aims, among other things, to address the myriad copyright issues and laws of the EU.<br /><br />Last but not least, there?s an interesting discussion[19] about similarities and differences between Project Gutenberg and Wikisource[20] a Wikipedia[21]?s sister project aiming to create a free repository of texts which are either in the public domain or licensed under the GFDL[22]. <br /><br />Wikisource people obviously noticed that their project was quite similar to PG, but with an important difference: their texts were formatted and freely editable by any user who was able to spot a mistake or inaccuracy; PG doesn?t offer this. In this context, Project Gutenberg was sometimes blamed for allowing inaccurate material to be included in the project: this was due to the fact that even if PG uses Distributed Proofreading website to proofread e-books, this is often not comparable to a wiki system. However, in PG's defense, wiki articles, being much more open, are subject to much more vandalism, and therefore must be more closely watched. One can imagine a high school student changing <em>Hamlet</em> to read "To be or not to be, who gives a crap." <br /><br />However, the members of Project Gutenberg have proposed a sort of mutual cooperation between PG and wikisource: wikisource should maintain a broader scope, focusing not only on literary works but also on quotations and other kind of texts, and at the same time provide some revised edition of some book to Project Gutenberg.<br /><br /><br /><strong>The Future of Project Gutenberg</strong><br /><br />Project Gutenberg demonstrated the ability to grow considerably during its over 30-year existence. During that same time, copyright laws were extended, and some new technologies tried to <em>intimidate</em> the Project, which seems to remain relatively unchanged. However, last year a long-awaited DVD containing all the Project's e-books was released, showing the world that PG can keep up with the progress of technology to a certain extent.<br /> <br />One aspect that makes PG a successful project even today is its ability to adapt: CD-ROMs and a DVD were released, OCR was almost immediately taken into consideration, and since last year, all e-books have been released in both plain text and HTML format: there are still no fixed standards or rigid guidelines, but common sense seems to prevail over chaos, and for now, the system works. <br /><br />So far, Michael Hart showed the entire world that a single person can do <em>a lot</em> when pursuing a noble goal. Call him an idealist, call him a dreamer, but he surely created something able to gratify and motivate him and his fellow volunteers forever:<br /><br /><em>?I can't think of anything more rewarding to do as a career than Project Gutenberg. It is something that will reach more people than any other project in all of history. It is as powerful as The Bomb, but everyone can benefit from it.?</em>[12]<br /><br /><br /><br /><br /><strong>Notes &amp; Further Readings</strong><br /><br />[1] Ebook, Wikipedia page ? <a href="http://en.wikipedia.org/wiki/Ebook">http://en.wikipedia.org/wiki/Ebook</a><br />[2] Project Gutenberg, Wikipedia page - <a href="http://en.wikipedia.org/wiki/Project_Gutenberg">http://en.wikipedia.org/wiki/Project_Gutenberg</a><br />[3] Movable type, Wikipedia page - <a href="http://en.wikipedia.org/wiki/Printing_press">http://en.wikipedia.org/wiki/Printing_press</a><br />[4] Project Gutenberg FAQ0 - <a href="http://www.gutenberg.org/about/faq0">http://www.gutenberg.org/about/faq0</a><br />[5] Project Gutenberg Official Website - <a href="http://www.gutenberg.org">http://www.gutenberg.org</a><br />[6] Project Gutenberg?s catalog - <a href="http://www.gutenberg.org/catalog/">http://www.gutenberg.org/catalog/</a><br />[7] Project Gutenberg?s volunteering page - <a href="http://www.gutenberg.org/info/volunteer">http://www.gutenberg.org/info/volunteer</a><br />[8] Project Gutenberg FAQ3 ? <a href="http://www.gutenberg.org/about/faq3">http://www.gutenberg.org/about/faq3</a><br />[9] Optical Character Recognition, Wikipedia Page ? <a href="http://en.wikipedia.org/wiki/Optical_character_recognition">http://en.wikipedia.org/wiki/Optical_character_recognition</a><br />[10] ?Harry Potter and the half-blood prince?, Scholastic Inc. website - <a href="http://www.scholastic.com/harrypotter/books/prince/index.htm">http://www.scholastic.com/harrypotter/books/prince/index.htm</a><br />[11] Public Domain, Wikipedia Page - <a href="http://en.wikipedia.org/wiki/Public_domain">http://en.wikipedia.org/wiki/Public_domain</a><br />[12] ?The Second Gutenberg Interview with Michael Hart?, Sam Vaknin, Ph.D. - <a href="http://samvak.tripod.com/busiweb29.html">http://samvak.tripod.com/busiweb29.html</a><br />[13] Gutenberg Project license ? <a href="http://www.gutenberg.org/license">http://www.gutenberg.org/license</a><br />[14] Project Gutenberg?s Distributed Proofreading - <a href="http://www.pgdp.net/c/default.php ">http://www.pgdp.net/c/default.php </a><br />[15] HTML Writers Guild Project Gutenberg ? <a href="http://gutenberg.hwg.org/">http://gutenberg.hwg.org/</a> <br />[16] Project Gutenberg Australia ? <a href="http://gutenberg.net.au/">http://gutenberg.net.au/</a><br />[17] Project Gutenberg Germany ? <a href="http://gutenberg.spiegel.de/">http://gutenberg.spiegel.de/</a><br />[18] Project Gutenberg Europe ? <a href="http://gutenberg.nl/">http://gutenberg.nl/</a><br />[19] Wikisource and Project Gutenberg, Wikisource page ? <a href="http://wikisource.org/wiki/Wikisource:Wikisource_and_Project_Gutenberg">http://wikisource.org/wiki/Wikisource:Wikisource_and_Project_Gutenberg</a><br />[20] Wikisource main page ? <a href="http://wikisource.org/wiki/Main_Page">http://wikisource.org/wiki/Main_Page</a><br />[21] Wikipedia main page ? <a href="http://www.wikipedia.org/">http://www.wikipedia.org/</a><br />[22] GNU Free Documentation License ? <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License ">http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License </a><br />
A contents/articles/project-windstone.html

@@ -0,0 +1,7 @@

+----- +title: CyberArmy Presents: Project WindStone +content-type: article +timestamp: 1134215963 +tags: internet|opensource +----- +I think most of the people who currently use the Internet have tried Microsoft Hotmail[1] at least once. Many of you probably don't use it anymore because you found something better, but the point is that Hotmail has been around for a long time, and so has its authentication method, MSN Passport, which is a universal login system used not only for Hotmail but also for many other non-Microsoft websites and services.<br />If you don't like the idea of using Microsoft-owned technology as an authentication system, we have an alternative for you... <strong>Show me your Passport</strong><br /><fieldset><blockquote>"Create your sign-in credentials (e-mail and password) once, then use them everywhere on the Microsoft Passport Network. You can even set the site to remember your credentials for you!"</blockquote></fieldset><br /><br />This is what the MSN Passport does, in a nutshell: it provides a <em>universal</em> login system so that members only need to remember their email address and one password in order to be authenticated on every site that uses the Passport technology. It has been adopted quite happily by some websites and portals[3], and particularly by merchant sites, who liked the idea of making life easier for their users. So far, so good.<br /><br />Like nearly every Microsoft technology seems to at one point or another, the MSN Passport became an object of criticism and concern, as shown in a 2002 MIT document[4]. The main problem is this: among the data collected by Microsoft upon a user's registration is a significant amount of personal information (such as age, date of birth, and addresses) which is stored on the Microsoft servers. What if someone gains access to that information? Who guarantees that that information will not be used by third parties? <br /><br />Aside from the privacy issues, some people are concerned about the system's internal security and by the fact that the system is entirely dependent on Microsoft servers to work:<br /><br /><fieldset><blockquote>"As more services and components depend on remote servers, functionality can grind to a halt if there is a failure on the centralized Passport system."[5]</blockquote></fieldset><br /><br />People have concerns, but what has been done? Are there any alternatives? Well, yes and no. Apparently the <em>Liberty Alliance Project</em>[6] was created to offer a valid and perhaps more democratic alternative to the Microsoft Passport:<br /><br /><fieldset><blockquote>"The Liberty Alliance Project was formed in September 2001 to serve as the premier open standards organization for federated identity and identity-based services. The Alliance is delivering specifications and guidelines to enable a complete network identity infrastructure that will resolve many of the technology and business issues hindering the deployment of identity-based Web services."[7]</blockquote></fieldset><br /><br />The project's founders (160 IT organizations, including Sun Microsystems and VeriSign) aim to create a <em>distributed</em> authentication system, as opposed to the <em>centralized</em> MSN Passport. This will undoubtedly solve some of the problems, but the system is still under development.<br /><br /><strong>Introducing Project Windstone</strong><br />CyberArmy[8] is obviously like neither Microsoft or Sun Microsystems; it's a community of volunteers whose aim is sharing their knowledge and making the Internet a better place. Volunteers don't get paid, but sometimes something gets done, and some projects are released to the general public. Among these is a system for (if you haven't guessed already)a system for universal user authentication, called Project Windstone[9].<br /><br />Project Windstone was developed by SoundWave on behalf of Special Operations and Security[10] to provide a universal authentication system that is easy to use and deploy on websites and in applications. Furthermore, the Windstone protocol is language-independent and functions via HTTP POST transactions between clients and the Windstone server, so virtually any website coded in any language or any application able to communicate with a web server can implement it.<br /><br />It seems great so far, but what can Windstone be used for? As previously said, it is a system to allow users to authenticate themselves with the same credentials on many different websites and share profiles and information between those websites at the same time. Furthermore, users can send each other private messages that can be retrieved on any website that implements Windstone, with the added benefit of all transactions taking place in a secure and private environment.<br /><br />On second thought, Windstone features seem to lead to some perplexity, especially among users who are particularly concerned about their own privacy: apparently a single centralized server is involved, and users can share their profile and send messages with each other, so what warranties does Windstone offers as far as privacy/security goes? Here's something which should reassure most of us:<br /><br /><ul><br /><li>The information provided by users in their public profiles is entirely up to their discretion: in other words, it's up to the user if they want to list their credit card numbers on their profile or talk about their cat, as the Windstone server itself does not require any specific personal information in order to create a profile.</li><br /><li>The username can be any valid email address submitted by the user.</li><br /><li>User profiles are available only after authentication with the Windstone server, and only if the person requesting the profile already knows the email address used by another user for Windstone services. Currently, Windstone does not implement any form of listing of existing users among the standard commands.</li><br /><li>The password chosen for user authentication is NEVER saved in any form; not within the client applications, not on the central server, and not in cookies. </li><br /><li> Data sent from client to server and vice-versa is encrypted.</li><br /></ul><br /><br /><strong>Some more technical details</strong><br />I am actually planning to implement the system on one of my sites, so I started reading the short but straightforward documentation[11] available on the Windstone site to learn more about how the system works, and it seems quite simple and able to do what it does in a logical way; the Windstone "standard" contains a bunch of commands[12] which are used by the clients (agents) and the server to request information exchange such as requests for initialization, possible server replies, and so on. Commands and data are sent using the following format (excerpt from the official documentation):<br /><br /><em><br />The format of this command string is as follows:<br /><br />AAAA.*BBBBBBBBBB.*CCCC::DDDDDDDDDDDDDDDDDDDD::EEEE::FFFFFFFFFF<br /><br />A. This is the command. Commands tell us what kind of request or response is being made with the command string. It also lets us know how many elements of data to expect (see F).<br /><br />B. This is the agent system identifier. Each website or IEP receives a unique alphanumeric ten (10) character identifier upon registration, which is used to identify this system within the network.<br /><br />C. This is the protocol version number. Generally, the version number will not change much, if at all, but it must be present. The protocol version goes with all command strings to let other systems and the Windstone server know what version of the protocol you are using. If certain versions are incompatible with each other, or if there is an upgrade or change to the protocol you are using, the version number will be used to determine that.<br /><br />D. This is the transaction identifier. Usually, this is not used, so the default information that should go here is six zeros ("000000"). The transaction identifier helps to link command strings into groups for processing and is most often used during the user login process.<br /><br />E. This is the sequence number. The sequence number, in conjunction with the transaction identifier, is used to put grouped command strings into their logical order. The sequence numbers have no specified numbering sequence, default start value, or length limit: the only requirement is that a sequence number must be in order from lowest to highest. When not using a transaction identifier or sequence number, the default information that should go here is a simple "X" (note that when "X" is being used in a command string by itself, it should always be capitalized).<br /><br />F. This is the data section. The data section is the heart of the command string. It is important to note that, at the minimum, all data sections need to be base-64 encoded prior to transmission - at no time should there be information in plain text format in the data section.<br /></em> <br /><br />Obviously, command strings can be manipulated to access each section separately and the manipulation can be done with virtually any programming language used on the client side. <br /><br />Normally, the client will send a command to the Windstone server to start the authentication process and then retrieve some information; the server will reply accordingly to the client's command strings with its own responses wrapped in command strings. Let's suppose a Windstone Agent is being used to perform the following actions:<br /><br />- Initialize the system<br />- perform a login<br />- retrieve user profile from the Windstone server <br /><br />In this simulation I will not use the actual command strings but just the codes for the various commands.<br /><br /><em><span style="text-decoration:underline;">Agent</span>: 0000 :: SETUP_INITIALIZE</em> - The Windstone agent sends a request to the server to initialize the authentication process, supplying the software identifier, the software type ("PC-Based" or "Web-Based"), the command landing URL and the URL to redirect logins to.<br /><br /><em><span style="text-decoration:underline;">Server</span>: 0002 :: SETUP_COMPLETE </em>- Everything looks good to the server, which replies with the following information: Unique agent identifier, primary authentication token, secondary authentication token, activation key, security code, shared encryption key (255 random characters, non-binary), registration completion date and time (epoch). These parameters will be used by the agent afterwards and are necessary to identify the agent on the Windstone server.<br /><br /><em><span style="text-decoration:underline;">Agent</span>: 1102 :: USER_LOGIN_REDIRECT</em> - The agent requests to start the authentication process and sends the email address of the user to the server along with the URL where the user's password will be entered.<br /><br /><br /><em><span style="text-decoration:underline;">Server</span>: 1105 :: USER_AUTH_SAVE</em> - User credentials are checked by the Windstone server. Everything is fine, so the server sends this response to the agent. The response contains the authentication token which will be used to authenticate the user during the session, as well as the user's display name.<br /><br /><em><span style="text-decoration:underline;">Agent</span>: 1107 :: USER_INFO</em> - The agent can now request the user's profile from the Windstone Server.<br /><br /><em><span style="text-decoration:underline;">Server</span>: 1108 :: USER_PROFILE</em> - After checking the user's authentication token, the server can now send the following information to the agent: Email address, display name, user "About Me" text, last login date and time, account created date and time, online status.<br /><br />This is just a simple example of how the Windstone protocol can be used; as mentioned earlier, there are various other commands[12] which can be used to perform various actions. <br /><br /><strong>Development and deployment</strong><br />The Windstone protocol is fully operational and can be implemented on any website or application able to communicate with a web server. The developer made a very basic PHP-based example of an Agent system available online[13]; it may not be a masterpiece of PHP coding (as the developer himself pointed out), but it can be useful in understanding how to develop a Windstone Agent System.<br /><br />If you'd like to start developing your own Agent System or you just want to create a Windstone account, it can be done on the Windstone registration page[14]: you'll be asked to provide an email address, a display name and a profile (the last two can be modified afterwards). Then the system will prompt you for a password, and an email will be sent to the address you provided to confirm and activate your account. Once you have an account, you can login to any website or application implementing the Windstone protocol, such as the Windstone website itself[15].<br /><br />Windstone is certainly not yet comparable to the MSN Passport technology - it's not used by a lot of important sites, and it's much simpler and offers fewer services, but it's undoubtedly an interesting approach to a free to use, secure and private system of universal user authentication.<br />Check it out![9] <br /><br /><strong>Notes and Resources</strong><br />[1] Microsoft Hotmail Service, <a href="http://www.hotmail.com">http://www.hotmail.com</a><br />[2] MSN Passport Network: <a href="https://accountservices.passport.net/ppnetworkhome.srf?vv=320&lc=1033">https://accountservices.passport.net/ppnetworkhome.srf?vv=320&lc=1033</a><br />[3] List of sites using MSN Passport, Passport@everything2: <a href="http://www.everything2.com/index.pl?node=passport">http://www.everything2.com/index.pl?node=passport</a><br />[4] "Microsoft .NET Passport and Wallet: Approach with Caution!", <a href="http://web.mit.edu/ist/isnews/v17/n04/170408.html">http://web.mit.edu/ist/isnews/v17/n04/170408.html</a><br />[5] "Microsoft Hailstorm and Passport", go-mono.com, <a href="http://www.go-mono.com/passport.html">http://www.go-mono.com/passport.html</a><br />[6] Liberty Alliance Project, Official Page, <a href="http://www.projectliberty.org/index.php">http://www.projectliberty.org/index.php</a><br />[7] Liberty Alliance Project, FAQs, <a href="http://www.projectliberty.org/about/faq.php">http://www.projectliberty.org/about/faq.php</a><br />[8] CyberArmy, Official Page, <a href="http://www.cyberarmy.net/">http://www.cyberarmy.net/</a><br />[9] Project Windstone, Official Page, <a href="http://windstone.x-mirror.com/v2/">http://windstone.x-mirror.com/v2/</a><br />[10] Special Operations and Security, official website, <a href="http://sos.x-mirror.com/">http://sos.x-mirror.com/</a><br />[11] Windstone Communications Protocol, Development Whitepaper, <a href="http://windstone.x-mirror.com/v2/development.php">http://windstone.x-mirror.com/v2/development.php</a><br />[12] Windstone Protocol Commands, <a href="http://windstone.x-mirror.com/v2/commands.php">http://windstone.x-mirror.com/v2/commands.php</a><br />[13] Example of PHP Agent System (ZIP file), <a href="http://windstone.x-mirror.com/v2/ws-testbed.zip">http://windstone.x-mirror.com/v2/ws-testbed.zip</a><br />[14] Windstone Registration, <a href="http://windstone.x-mirror.com/v2/register.php">http://windstone.x-mirror.com/v2/register.php</a><br />[15] Windstone Login Page, <a href="http://windstone.x-mirror.com/v2/login.php">http://windstone.x-mirror.com/v2/login.php</a><br />
A contents/articles/quick-overview-of-sqlite.html

@@ -0,0 +1,7 @@

+----- +title: A Quick Overview of SQLite +content-type: article +timestamp: 1132937558 +tags: review|databases +----- +A few months ago, my old hosting company started having problems with their servers. The servers would go down unexpectedly for 5-10 minutes on a relatively frequent basis, but for some weird reason... the MySQL databases were unusable for a couple of hours afterwards every time. "We had problems with MySQL, BUT the server was up, so we're still within the 99% uptime guarantee"... At the time I was thinking: "If only MySQL databases behaved like plain files..." <br /><br /><strong>What is SQLite?</strong><br /><br />When PHP5 was first released, I discovered SQLite: <em>"...a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine"</em> (as quoted from the <a href="http://www.sqlite.org">official site</a>). PHP5 offers native support to this little wonder, whose development actually started long before PHP5 was released, and can be used with many, many other programming languages.<br /> <br />SQLite organizes each database in a .db file, and implements most of the SQL 92 standards, to access the databases with no need of a server process running at the same time. Access is accomplished through standard reading/writing file operations.<br /><br />Let's examine the pros and cons of using SQLite in your web applications.<br /><br /><strong>Features</strong><br /><br />- SQLite is FREE &quot;for any purpose&quot;, <a href="http://www.sqlite.org/copyright.html">they say</a>.<br />- It doesn't rely on a server process to run<br />- You don't need to spend time configuring your installation, because there's nothing to configure!<br />- As there's no client-server negotiation, accesses to the database are much faster (2-3 times faster than a MySQL database)<br /><br />As a consequence of all this, there's actually no concept of &quot;users&quot; allowed to access the database; as I said, the actual data of each database is stored into a single file, and as such, it has permissions which regulate access. If a script has read or write access to the file, a read/write sql instruction can be executed on the database. You can therefore simply protect your databases as you would protect any other file on your server.<br /><br />- SQLite is small: the library is just 250KB, and takes care of everything, you don't need any other library or program to use it.<br />- SQLite can handle files up to 2 terabytes in size.<br />- SQLite implements most of the SQL 92 standard. This means you can usually use standard and well known queries to access it (with some exceptions, discussed in the next section).<br />- SQLite does not enforce datatype constraints. Is this a feature or a bug? Well, they call it a feature, but others may not agree. As a matter of fact, you can put a string into a field marked &quot;integer&quot; and vice versa, and furthermore, the string can be as big as you like! There's one exception to this rule, though. Columns marked as PRIMARY KEY must be of integer type. <br /><br /><br /><strong>Limitations</strong><br />Now that you have read all of the preceding material, and know that PHP5 supports SQLite natively, you might be thinking about putting MySQL in the bin and using SQLite for everything instead: it's smaller, faster, portable, simpler, and headache-free... it's love at first sight. Right?<br /><br />Well, the developers themselves decided to devote <a href="http://www.sqlite.org/whentouse.html">a page</a> to discuss when you should use SQLite and where you'd be better off sticking with your &quot;old&quot; database engine. Furthermore, being such a small and powerful piece of code, SQLite comes with some limitations which should be considered before starting to use it in a project:<br /><br />- Not all SQL queries and syntax are supported. For a full list, have a look <a href="http://www.sqlite.org/omitted.html">here</a>. The most notable things you'll miss in SQLite are: the inability (for now) to &quot;ALTER TABLE&quot; (you do this, they say, by creating a new modified table and deleting the old one), no VIEW, and no CHECK or FOREIGN KEY constraints (they are &quot;parsed but not enforced&quot;).<br /><br />- Syntax can be different sometimes. I noticed that, for example, in a JOIN between two or more tables, when accessing columns you ALWAYS have to specify &lt;table&gt;.&lt;column&gt;, whereas MySQL doesn't complain if there's ambiguity.<br /><br />- SQLite is not suitable for projects which requires a lot of semi-simultaneous writing operations. SQLite uses reader/writer locks: if there's someone reading from the database, writing to it is not allowed. This basically mean that multiple simultaneous read operations (SELECT x FROM ...) have higher priority than write operations (INSERT, UPDATE, ...), which are therefore delayed. <br /><br />- Do not use SQLite for big databases. Even though I said that (theoretically) databases up to 2 terabytes are supported, when your database is more than 1 GB, SQLite requires too much memory to run (256 bytes of RAM for each MB of database space, they say).<br /><br />- Generally, if your website gets lots of traffic, SQLite shouldn't be your primary database engine, for the issues mentioned above. php.net uses SQLite for its site, but only on certain parts of it. If you get fewer than 100,000 hits/day, SQLite should work fine - they say. So basically I can use for any site I make...<br /><br /><br /><strong>Conclusions</strong><br />Considering all features and limitations, SQLite is an excellent solution for small or medium websites, embedded applications, programs which only need a small database to function and shouldn't be bound to a server, temporary databases, testing, and the like. Always keep in mind that you're working with files, so keep them protected wherever you put them in your server (a connection is established simply by specifying the path to the file).<br /><br />Last but not least, if you're used to phpMyAdmin for administering your MySQL databases, there are similar tools for SQLite, such as <a href="http://www.sqlitemanager.org">sqlitemanager</a>.<br />
A contents/articles/rails-doc-first-look.html

@@ -0,0 +1,82 @@

+----- +title: Rails-Doc.org - A First Look +content-type: article +timestamp: 1213853400 +tags: rails|ruby|writing|review +----- +<p>When you decided to learn Ruby on Rails (if you did, that is), chances are that you bought a book. I did, too, actually: there are a lot of very interesting and fairly comprehensive books out there after all.</p> +<p>I actually never bought a book to learn <span class="caps">PHP</span>, in the past though. Why&#8217;s that? Well, for two simple reasons:</p> +<ul> + <li>The <a href="http://www.php.net/manual/en/"><span class="caps">PHP</span> manual</a> can easily be searched and provides enough documentation, in most cases.</li> + <li>When the documentation is not enough, there&#8217;s always plenty of comments by experienced developers to save your day.</li> +</ul> +<p>That being said, <span class="caps">PHP</span> is still an awfully disorganized language, but believe it or not, coming from <span class="caps">PHP</span> I didn&#8217;t find <a href="http://api.rubyonrails.org/">Rails documentation</a> useful enough simply because it didn&#8217;t have these two simple but very powerful features.</p> +<p>Sure, there&#8217;s the <a href="http://www.railsdocumentation.org/">Rails Documentation Project</a> which provides more organized docs, and <a href="http://www.noobkit.com/">Noobkit</a> does a nice job with its search-as-you-type feature&#8230; but still is not quite enough: you&#8217;d expect something much better than that for something like Rails!h3. Introducing Rails-Doc.org</p> +<p style="float:right;"><img src="/files/railsdoc_logo_sm.png" alt="" /></p> +<p><a href="http://www.rails-doc.org">Rails-Doc.org</a> focuses on providing a better interface to Rails documentation by offering two key features:</p> +<ul> + <li>A powerful, fast and useful document search</li> + <li>The possibility to add notes to Rails documentation</li> +</ul> +<p>When the app went live, I immediately registered (it&#8217;s free of course) and started playing with it&#8230;</p> +<h4>Search as you type&#8230;</h4> +<p>The first thing I did was trying the search features, of course. I started typing &#8220;rout&#8221; for Routing, and I was immediately shown a list of matches:</p> +<p><img src="/files/rails-doc_search.gif" alt="" /></p> +<p>It took a small fraction of a second to load the matches, which makes me think that definitely they have all the names indexed somewhere. Nevertheless, it was a pleasant surprise: normally, these search-as-you-type utilities are not that refined!</p> +<p>All you need to do is start typing at least three letters, and you get results, if any. <br /> +if you press <span class="caps">ENTER</span>, you get automatically redirected to the first result. This can be good, but maybe it would have been nicer to load a &#8220;traditional&#8221; list of results, but it depends on your taste, really.</p> +<h4>&#8230;or browse through the namespaces</h4> +<p>Alternatively, it is possible to browse the docs in the more traditional way, i.e. according to their class or module: the <strong>Browse</strong> page does just that: it lists <em>all</em> Rails classes and modules, regardless of the nesting. But there&#8217;s more: a little roundy icon precedes each class name, to indicate whether the documentation is present, and to what degree:</p> +<p><img src="/files/rails-doc_icons.gif" alt="" /></p> +<p>This is an interesting concept: in this way, in theory, people should contribute to the documentation where it&#8217;s more needed.</p> +<p>Each reference page is very neatly re-formatted: you can hardly imagine it&#8217;s actually the same content included in Rails&#8217; RDoc pages!</p> +<p><img src="/files/rails-doc_document.gif" alt="" /></p> +<p>Finally, another nice addition is the <strong>Related</strong> column, which lists links to other items which are related to the current topic:</p> +<p><img src="/files/rails-doc-related.gif" alt="" /></p> +<h3>Contribute, contribute, contribute!</h3> +<p>You have to register for something, don&#8217;t you? Yes. If you register, you can post notes to any document. Simple enough, all you have to do is to click the <strong>Add Note</strong> button and a form will slide down for you to fill in:</p> +<p><img src="/files/rails-doc_note1.gif" alt="" /></p> +<p>As you start typing, you&#8217;ll notice that a preview of the note is displayed instantly: as you can use SimpleMarkup to write notes, exactly like in RDoc, this feature can be very handy:</p> +<p><img src="/files/rails-doc_note2.gif" alt="" /></p> +<p>What if there&#8217;s no documentation for a particular class or method? You&#8217;ll get a warning like this one:</p> +<p><img src="/files/rails-doc_nodoc.gif" alt="" /></p> +<p>The idea behind this is that, if you provide some useful insights, they&#8217;ll eventually end up in Rails core documentation.</p> +<h3>An Short Interview with Mikael Roos, from Nodeta</h3> +<p>Before the application went live, I was lucky enough to get Mikael Roos to answer to some of my questions. Here&#8217;s the full interview&#8230;</p> +<h4>What are you actually trying to do on Rails-Doc.org?</h4> +<p>The initial goal of the project is to provide the existing documentation in a more accessible way, most importantly to provide a lightning fast search feature that gives weighted results based on the<br /> +quality and amount of documentation. This we have already accomplished, and all remaining issues are related to browser compatibility. Another initial goal is to present a smooth interface for creating inline notes to<br /> +the documentation so that Rails developers can post notes about certain methods etc. for themselves and others to draw knowledge from.</p> +<p>Our longer-term goal (N.B. we are an agile project, so long-term means, say, three months) is to provide a way for the active members of the Rails community to improve the existing documentation based on the posted notes<br /> +to create an extended documentation that could optimally even be made in to a patch and would find its way back into the actual Rails source.</p> +<p>Another clear and obvious goal is to keep improving the service steadily as we progress toward the goals that I mentioned above.</p> +<h4>Could you spend a few words on the &#8220;development process&#8221; followed by your company to develop this app? Did I read the word &#8220;Scrum&#8221; somewhere? Am I correct?</h4> +<p>Yes, our development process of choice is Scrum. The core team is only three members, one backend developer, one backed/frontend develope and one frontend developer/UI specialist. I feel the team is optimal in many ways.<br /> +The team also has a few more experienced developers who are primarily active in other projects to ask questions from, one of whom is also the acting product owner on the Rails-doc project (that&#8217;s me!).</p> +<h4>Did you develop it in three months, or&#8230;?</h4> +<p>The first release was developed in three <span class="caps">SPRINTS</span>, not months &#8211; so what I&#8217;m saying is the first release was developed in five weeks (first sprint was mostly introductory and lasted a week, the next two sprints, first<br /> +development and then stabilization, were two weeks each). However, it is a <span class="caps">FIRST</span> <span class="caps">RELEASE</span>, which means the app is by all means not complete, but since we make software in a very agile way, it&#8217;a all about &#8220;Ship, ship, ship!&#8221;.</p> +<h4>What is <a href="http://www.nodeta.fi">Nodeta</a>, exactly? My Finnish is a bit rusty nowadays&#8230;</h4> +<p>Nodeta is a software development company that focuses on web software. We employ a highly agile and effective process. We have worked both on light independent projects and in the environment of large global enterprises.<br /> +There are currently 10 Nodetans.</p> +<p>Rails-Doc.org is a pilot project for your new shiny app, ApiDock. Is it an open source app?</p> +<p>Unfortunately, I cannot go into details about APIdoc yet. What I can tell is that it is developed with Rails and that it won&#8217;t be open source, but rather it would optimally be offered as a service, which after all is what<br /> +the word &#8220;app&#8221; on the web means these days. Open source projects could however use it for free, sort of in the spirit of GitHub.</p> +<p>It will also most likely be separately targeted to larger companies.</p> +<h4>Can you give me more technical details about the way keyword search is performed? Are you indexing/tagging documentation beforehand?</h4> +<p>There will probably be a blog post on the <a href="http://blog.nodeta.fi">Nodeta blog</a> about the search and how it works after the first release comes out.</p> +<h4>What about the social side of it: you&#8217;re hoping people will contribute with notes, which will then be collected and integrated in the documentation correct? Do you have any moderation or anti-spam precaution?</h4> +<p>The quality of notes is judged in a social way. Notes can be thanked by other users and notes that get many thanks are showed in a more prominent way. Registration will be required in order to post notes and the registration will feature a captcha.</p> +<h4>Will contributors be credited somehow? Who can contribute and at what level?</h4> +<p>Anybody can post notes and good notes get thanks and thus so do their posters. Users that get lots of thanks will be later asked to become core users that can alter the extended documentation (not in the first<br /> +release.)</p> +<h4>You want to blow out competition and that you don&#8217;t want to fail: sounds a good plan! How is Rails-Docs different from other similar apps?</h4> +<p>We think that our app is the first that is serious about making things happen. We think about users first and above all at this stage our search feature is frankly unparallelled.</p> +<h4>Do you have DHH&#8217;s seal of approval? Will you? Is there any copyright issue with your domain name?</h4> +<p>Time will tell what <span class="caps">DHH</span> thinks. We did contact him just a few days ago to ask what his thoughts about all this are and are waiting for his comments. I doubt there is any wrinkles with copyright as Rails-doc itself is a completely non-profit project.</p> +<h4>What about doing something similar for the whole Ruby language? Ruby docs may also be easier, in a way&#8230;</h4> +<p>It is possible that we might do just that but right now it&#8217;s all about Rails.</p> +<h3>The Bottom Line</h3> +<p>Rails-Doc.org is definitely an interesting project, which has all the potential to become a powerful, Rails-powered service. Sure, it&#8217;s not open source and this can be a bit of a letdown for some: but after all people flocked to GitHub when it opened, didn&#8217;t they?</p> +<p>The search capabilities of Rails-Doc.org are definitely a very important step forward in making Rails documentation more accessible and easier to use, but the killer feature is definitely the possibility to add notes, if used wisely.</p> +<p>I&#8217;ll be watching this project closely and I&#8217;ll pay particular attention on what happens to the community&#8217;s contributions: will it really be useful? Will it really help creating documentation patches to Rails core? Only time will tell, of course.</p>
A contents/articles/rails-inspired-php-frameworks.html

@@ -0,0 +1,212 @@

+----- +title: Rails-inspired PHP frameworks +content-type: article +subtitle: A roundup of six different PHP frameworks inspired by Ruby on Rails +popular: true +timestamp: 1146661020 +tags: frameworks|review|cakephp|rails +----- +<p>There are various articles online examining many <span class="caps">PHP</span> frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called <em>&#8220;Rails-inspired frameworks&#8221;</em> anywhere on the web, so I decided to write my own&#8230;</p> +<blockquote> +<p><strong><span class="caps">IMPORTANT</span> <span class="caps">UPDATE</span>:</strong> I do no longer recommend the CakePHP framework anymore due to the <a href="http://www.h3rald.com/blog/42">unprofessionalism of some member of its development team</a>. My site is now powered by Ruby on Rails and I totally lost interest in <span class="caps">PHP</span> and any <span class="caps">PHP</span> framework. If you are looking for a decent web framework, try <a href="http://www.rubyonrails.org">Ruby on Rails</a> (for Ruby), <a href="http://www.djangoproject.com/">Django</a> (for Python) or <a href="http://catalyst.perl.org/">Catalyst</a> (for Perl).<br /> +I&#8217;m talking about those <span class="caps">PHP</span> frameworks who give at least part of their success to Ruby on Rails<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>, but don&#8217;t call them <em>clones</em> or <em>ports</em> as some of their creators may get offended.</p> +</blockquote> +<p style="float:left;"><img src="/img/pictures/rails.gif" alt="" /></p> +<p>Since Rails shocked the world with an easy-to-use, powerful and semi-sentient web development framework, web development is not the same anymore: everything must be done efficiently, quickly and you <em>have</em> to produce a Web 2.0 compliant public beta after X days/weeks/months or your work is simply not useful to anybody. Try doing that with the traditional <span class="caps">PHP</span> spaghetti code: you can&#8217;t, it&#8217;s too much, it will be too tangled up and in the end you&#8217;ll lose your mind trying to find that <em>small insignificant bug</em> which makes your web application completely useless.</p> +<p>Yes, you could use Rails, but maybe you don&#8217;t know or don&#8217;t want to learn Ruby, your host doesn&#8217;t support it, your boss loves <span class="caps">PHP</span> etc. etc. If you&#8217;re in this situation or you simply would like to know what&#8217;s going on at the <span class="caps">PHP</span> front of the Rails Clone War, you should keep reading this article.</p> +<p>I&#8217;d like to introduce &#8211; briefly &#8211; six Rails-inspired <span class="caps">PHP</span> frameworks and compare them with each other, to point out their features, their pros and cons.</p> +<blockquote> +<p><em><strong>Disclaimer:</strong> I&#8217;m a CakePHP<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> fan, this site has been built with CakePHP and I even wrote something<sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup> about it in the past. This makes me inevitably partial and more familiar with this particular framework, but I&#8217;ll try my very best to provide a relatively objective analysis. Obviously frameworks which are not based on the <span class="caps">MVC</span> architechture and that weren&#8217;t inspired by Ruby on Rails have not been included, so forget things like <span class="caps">PRADO</span>, Qcodo, eZComponents, or even Mojavi: it&#8217;s not that they are &#8220;bad&#8221;, they&#8217;ve just been left out because they are not pertinent to this article</em></p> +</blockquote> +<h3>CakePHP</h3> +<p style="float:right;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> +<p><strong>Website:</strong> <a href="http://www.cakephp.org/">www.cakephp.org</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> +<strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup><br /> +<strong>Download size (.tar.gz):</strong> 184KB<br /> +<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQlite, MS <span class="caps">SQL</span> + any other supported by ADOdb or <span class="caps">PEAR</span>::DB database abstraction layers<br /> +<strong>Beginner&#8217;s Tutorial</strong>: <a href="http://wiki.cakephp.org/tutorials:blog_tutorial_-_1">Blog Tutorial</a></p> +<p><strong>Official Description:</strong><br /> +<em>&#8220;Cake is a rapid development framework for <span class="caps">PHP</span> which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and <span class="caps">MVC</span>. Our primary goal is to provide a structured framework that enables <span class="caps">PHP</span> users at all levels to rapidly develop robust web applications, without any loss to flexibility.&#8221;</em></p> +<p><strong>PROs:</strong></p> +<ul> + <li>Lightweight, not bloated, containing only essential code</li> + <li>Runs both on PHP4 and PHP5</li> + <li>No configuration needed &#8211; except for a stupidly short database configuration file and a few constants which <em>can</em> be modified. You can literally start baking in less than five minutes</li> + <li>Extended table association support, allowing the creation of complex database architechtures</li> + <li>Extremely logical and functional directory structure: better than Rails, if you ask me.</li> + <li>Enhanced <span class="caps">AJAX</span> support through the <span class="caps">AJAX</span> and Javascript view helpers</li> + <li>useful &#8220;bake&#8221; command line script to generate parts of the code automatically</li> + <li>Very active community and plenty of <em>satellite sites</em></li> + <li>Suitable for every kind of website, from the small personal site to the advanced e-business application.</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>No &#8220;official&#8221; internationalization support for now, but it will be included in the next milestone.</li> + <li>It does not take fully advantage of PHP5 features</li> + <li>Official documentation still needs some some improvement, although now it seems pretty complete and exhaustive.</li> +</ul> +<p><strong>Comments:</strong><br /> +CakePHP is my personal favorite: easy to learn, easy to use,multi-purpose and not bloated. Cake&#8217;s philosophy is not to include unnecessary code in the framework unless it&#8217;s absolutely necessary for the framework itself, as a result, 3rd-party libraries are not included in the official releases, but may be seamlessly integrated with the framework <em>if developers need them</em>. <br /> +Cake&#8217;s success is partly determined &#8211; at least initially &#8211; by the fact that it can run fine with no limitations on PHP4, while other similar frameworks don&#8217;t. Although this may still be one of its most obvious strengths, it must be said that Cake seems to go in the right direction, taking only the best from Rails, without forcing developers into complex and pointless adaptations, and evolving into a great framework created <em>in <span class="caps">PHP</span>, for <span class="caps">PHP</span></em>.</p> +<h3>Symfony</h3> +<p style="float:right;"><img src="/img/pictures/symfony.gif" alt="" /></p> +<p><strong>Website:</strong> <a href="http://www.symfony-project.com/">www.synfony.project.com</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> +<strong>License:</strong> Symfony<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup><br /> +<strong>Download size (.tgz):</strong> 1255KB<br /> +<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, Oracle, MS <span class="caps">SQL</span> + any other supported by Creole database abstraction layer<br /> +<strong>Beginner&#8217;s Tutorial</strong>: <a href="http://www.symfony-project.com/tutorial/my_first_project.html">My first project</a></p> +<p><strong>Official Description:</strong><br /> +<em>&#8220;Based on the best practices of web development, thoroughly tried on several active websites, symfony aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure. [&#8230;]</em><br /> +<em>Symfony is an object-oriented PHP5 framework based on the <span class="caps">MVC</span> model. Symfony allows for the separation of business rules, server logic and presentation views of a web application. It also contains numerous tools and classes aimed at shortening the development time of a complex web application.&quot;</em></p> +<p><strong>PROs:</strong></p> +<ul> + <li>Fully featured framework, includes everything you might ever need (see CONs, below)</li> + <li>Full native internationalization support</li> + <li>Truly excellent documentation, tutorials, wiki, book, screencasts, <span class="caps">API</span>, real-world examples, etc. etc.</li> + <li>Code generators</li> + <li>Various &#8220;pre-built&#8221; modules/libraries for the most common tasks</li> + <li>It was not inspired only by Rails, but borrows concepts and practices from various other frameworks</li> + <li>Good community support</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>Seems too big compared to the others, too many &#8220;extras&#8221; which may not be useful to <em>all</em> developers</li> + <li>PHP5 only</li> + <li>Confusing and disorganized directory structure</li> + <li>Uses too many configuration files, not suitable for <em>simple</em> projects</li> + <li>Steep learning curve</li> +</ul> +<p><strong>Comments:</strong><br /> +Symfony is really an interesting framework: it&#8217;s perhaps the most <em>complete</em> in terms for features and documentation. The only problem I have with it is that it just seems too complex and rather difficult to learn if compared to the others, which can do <em>almost</em> the same things (or will soon be able to) in a <em><span class="caps">MUCH</span></em> simpler way. A nice blend of <span class="caps">MVC</span>, pre-built components, command line generators and <span class="caps">YAML</span>/Propel configuration files, but perhaps a bit <em>disorganized</em> in its internal structure, unlike its wonderful documentation and support section.</p> +<h3><span class="caps">PHP</span> on Trax</h3> +<p style="float:right;"><img src="/img/pictures/phpontrax.jpg" alt="" /></p> +<p><strong>Website:</strong> <a href="http://www.phpontrax.com/">www.phpontrax.com</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> +<strong>License:</strong> <span class="caps">MIT</span><br /> +<strong>Download size (.tgz):</strong> 843KB<br /> +<strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> +<strong>Beginner&#8217;s Tutorial</strong>: <a href="http://svn.phpontrax.com/wiki/HowToCreateATraxApplication">How to create a Trax application</a></p> +<p><strong>Official Description:</strong><br /> +<em>&#8220;Php On Trax (formerly Php On Rails) is a web-application and persistance framework that is based on Ruby on Rails and includes everything needed to create database-backed web-applications according to the Model-View-Control pattern of separation.&#8221;</em></p> +<p><strong>PROs:</strong></p> +<ul> + <li>Simple, logical, essential: a true RoR port to PHP5</li> + <li>Code generators, like Rails</li> + <li>Zero configuration (like Rails and Cake</li> + <li>Easy and logical directory structure (the same as Rails)</li> + <li>Supports table associations, but more in a way which is more similar to Ruby on Rails than Cake.</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>Lack of documentation compared to the others</li> + <li>Trying to port Ruby on Rails to <span class="caps">PHP</span>, ignoring why RoR was not built in <span class="caps">PHP</span> in the first place<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup></li> + <li>No internationalization or other advanced functionalities</li> + <li>PHP5 only</li> + <li>Small community</li> + <li><span class="caps">DBO</span> class based only on <span class="caps">PEAR</span>::DB</li> +</ul> +<p><strong>Comments:</strong><br /> +In my opinion this project aims too much to be a Rails-clone to acquire a proper consensus. Trying to port something to another language is not good, especially in the case of Rails and Ruby. This framework looks somehow like an old version of CakePHP, which evolved slightly but always remained anchored to its beliefs of building a Rails port for <span class="caps">PHP</span> (even in the name!). Some may say that this is a lost battle since the beginning &#8211; or better, since before it started &#8211; but others found that <span class="caps">PHP</span> on Trax can be the easiest way to switch from Ruby on Rails to a <span class="caps">PHP</span> equivalent. Who is going to do that? Well, Ruby programmers <em>forced</em> to develop in <span class="caps">PHP</span>, maybe. Not too good, but not too bad either.</p> +<h3>Code Igniter</h3> +<p style="float:right;"><img src="/img/pictures/codeigniter.jpg" alt="" /></p> +<p><strong>Website:</strong> <a href="http://www.codeigniter.com/">www.codeigniter.org</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> +<strong>License:</strong> CodeIgniter<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup><br /> +<strong>Download size (.zip):</strong> 609KB<br /> +<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, MySQLi, MS <span class="caps">SQL</span> + <span class="caps">ODBC</span><br /> +<strong>Beginner&#8217;s Tutorial</strong>: <a href="http://www.codeigniter.com/videos/ci_intro.mov">Hello World! Introduction to Code Igniter</a> [video]</p> +<p><strong>Official Description:</strong><br /> +<em>&#8220;Code Igniter is an Open Source Web Application Framework that makes writing kick-ass <span class="caps">PHP</span> programs simple as apple pie. [&#8230;] Designed to enable, not overwhelm, Code Igniter is a powerful <span class="caps">PHP</span> framework with a very small footprint, built for <span class="caps">PHP</span> coders who need a simple and elegant toolkit to create full-featured web applications.</em><br /> +<em>If you&#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&#8217;re tired of ponderously large and thoroughly undocumented frameworks that require rocket science to understand, Code Igniter might just be the right tool for you.&quot;</em></p> +<p><strong>PROs:</strong></p> +<ul> + <li>Good and organized documentation</li> + <li>Zero configuration (like Rails and Cake)</li> + <li>Includes various classes and libraries for common tasks</li> + <li>Compatible with PHP4 and PHP5</li> + <li>Medium-sized community</li> + <li>Intuitive directory structure</li> + <li>Ships with the full user guide included in separate <span class="caps">HTML</span> files</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>No full (&#8220;written&#8221;) tutorials except the videos!</li> + <li>Relatively new to the scene, but growing</li> + <li>Does not seem to support table associations.</li> +</ul> +<p><strong>Comments:</strong><br /> +People on the Net seem to be rather enthusiastic about this framework: where there&#8217;s a thread about the <em>big ones</em> (Cake and Symfony), there&#8217;s always, someone who pops in suggesting to try out Code Igniter. I personally think this can be a true bless for small/medium sized projects, however, I&#8217;d opt for CakePHP or Symfony for a large scale application: something is missing, e.g., most notably, table associations.</p> +<h3>Biscuit</h3> +<p style="float:right;"><img src="/img/pictures/biscuit.gif" alt="" /></p> +<p><strong>Website:</strong> <a href="http://biscuitproject.tigris.org/">biscuitproject.tigris.org</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> +<strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> <br /> +<strong>Download size (.zip):</strong> 240KB<br /> +<strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> +<strong>Beginner&#8217;s Tutorial</strong>: <a href="http://bennolan.com/biscuit/tutorial.html">Creating a simple application using the Biscuit <span class="caps">MVC</span> framework</a></p> +<p><strong>Official Description:</strong><br /> +<em>&#8220;The mission of this project is to port Ruby on Rails to PHP5 (minus the Ruby part ;-)&#8221;</em></p> +<p><strong>PROs:</strong></p> +<ul> + <li>Zero configuration, easy to deploy</li> + <li>Runs both on PHP4 and PHP5</li> + <li>Simple to learn</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>Still under development and incomplete</li> + <li>Offers a limited subset of the features and functionalities offered by competitors: no internationalization, no table associations, no scaffolding&#8230;</li> + <li><em>&#8220;Documentation coming soon&#8221;</em></li> + <li>Almost non-existent community</li> +</ul> +<p><strong>Comments:</strong><br /> +This project started as an attempt to create something simpler than CakePHP and more similar to Rails. I&#8217;m not sure whether the project is still active or not, since the last &#8220;release&#8221; on the former&#8217;s developer site is dated August 2005. Still in early stage &#8211; or dead.</p> +<h3>Pipeline</h3> +<p style="float:right;"><img src="/img/pictures/livepipe.jpg" alt="" /></p> +<p><strong>Website:</strong> <a href="http://livepipe.net/pipeline/">livepipe.net/pipeline/</a><br /> +<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> +<strong>License:</strong> Pipeline<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup><br /> +<strong>Download size (.zip):</strong> 288KB<br /> +<strong>Supported Databases:</strong> SQLite<br /> +<strong>Beginner&#8217;s Tutorial</strong>: none</p> +<p><strong>PROs:</strong></p> +<ul> + <li>Simple directory structure</li> + <li>Suitable for small projects</li> + <li>Comes with various ready-made components</li> + <li>Supports table relationships</li> +</ul> +<p><strong>CONs:</strong></p> +<ul> + <li>PHP5-only</li> + <li>Too restrictive: only SQLite supported, <em>kindly suggests</em> developers to use its built-in features only</li> + <li>No documentation or tutorials, just the <span class="caps">API</span></li> + <li>Not suitable for large projects</li> + <li>Almost non-existent community</li> +</ul> +<p><strong>Comments:</strong><br /> +This project mainly borrowed the <span class="caps">MVC</span> architecture and some basic concepts from Rails, creating a simple PHP5 framework with personal/small websites in mind: it offers various built-in components which can be handy to most of us, supports <em>only</em> SQLite, and basically tells developers what to do. In my opinion it&#8217;s not flexible enough to be compared to the others, and it&#8217;s simply not suitable for anything other than small websites.</p> +<h3>Conclusions</h3> +<p>My favorite framework still remains CakePHP, it&#8217;s simple and yet powerful, easy to learn and use, mature, well supported and continuously improving. Symfony &#8211; at the moment &#8211; seems to be the one with most features and the best documentation, and it is an excellent and well supported project. The only problem I have with it is the scary amount of configuration files necessary to create an application: CakePHP doesn&#8217;t need any and can be used for (almost?) equally complex projects.<br /> +Although I didn&#8217;t have a chance to try them out, <span class="caps">PHP</span> on Trax is certainly the most faithful port of Ruby on Rails to <span class="caps">PHP</span>, but it lacks some of the features CakePHP and Symfony offer. Code Igniter may not be as advanced as the others, but its community seems to grow and its simplicity may appeal more users in the future&#8230;</p> +<p>At any rate, developers should <em>always</em> choose the best framework for their needs: I tried to write a quick comparative analysis of these six Rails&#8217; &#8220;<span class="caps">PHP</span> children&#8221;, now it&#8217;s <em>your</em> turn, try out some of them, if you choose wisely you won&#8217;t be disappointed.</p> +<h3>Notes</h3> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> They are all distributed according to various Open Source licenses.</p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://www.rubyonrails.org">Ruby on Rails</a> &#8211; Ruby framework for web development</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.cakephp.org">CakePHP</a> &#8211; Rapid [<span class="caps">PHP</span>] Development Framework</p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> <a href="/articles/view/cakephp">CakePHP &#8211; A &#8216;tasty&#8217; solution for <span class="caps">PHP</span> programming</a>, originally published on <a href="http://www.zzine.org/articles/cakephp">zZine Magazine</a></p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> Open Source <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> +<p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> Symfony License:<br /> +<small><br /> +<blockquote><br /> +Copyright &#169; 2004-2006 Fabien Potencier<br /> +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &#8220;Software&#8221;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p> +<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p> +<p><span class="caps">THE</span> <span class="caps">SOFTWARE</span> IS <span class="caps">PROVIDED</span> &#8220;AS IS&#8221;, <span class="caps">WITHOUT</span> <span class="caps">WARRANTY</span> OF <span class="caps">ANY</span> <span class="caps">KIND</span>, <span class="caps">EXPRESS</span> OR <span class="caps">IMPLIED</span>, <span class="caps">INCLUDING</span> <span class="caps">BUT</span> <span class="caps">NOT</span> <span class="caps">LIMITED</span> TO <span class="caps">THE</span> <span class="caps">WARRANTIES</span> OF <span class="caps">MERCHANTABILITY</span>, <span class="caps">FITNESS</span> <span class="caps">FOR</span> A <span class="caps">PARTICULAR</span> <span class="caps">PURPOSE</span> <span class="caps">AND</span> <span class="caps">NONINFRINGEMENT</span>. IN NO <span class="caps">EVENT</span> <span class="caps">SHALL</span> <span class="caps">THE</span> <span class="caps">AUTHORS</span> OR <span class="caps">COPYRIGHT</span> <span class="caps">HOLDERS</span> BE <span class="caps">LIABLE</span> <span class="caps">FOR</span> <span class="caps">ANY</span> <span class="caps">CLAIM</span>, <span class="caps">DAMAGES</span> OR <span class="caps">OTHER</span> <span class="caps">LIABILITY</span>, <span class="caps">WHETHER</span> IN AN <span class="caps">ACTION</span> OF <span class="caps">CONTRACT</span>, <span class="caps">TORT</span> OR <span class="caps">OTHERWISE</span>, <span class="caps">ARISING</span> <span class="caps">FROM</span>, <span class="caps">OUT</span> OF OR IN <span class="caps">CONNECTION</span> <span class="caps">WITH</span> <span class="caps">THE</span> <span class="caps">SOFTWARE</span> OR <span class="caps">THE</span> <span class="caps">USE</span> OR <span class="caps">OTHER</span> <span class="caps">DEALINGS</span> IN <span class="caps">THE</span> <span class="caps">SOFTWARE</span>.</p> +</blockquote> +<p></small></p> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> Read the comments by David Heinemeier Hansson on <a href="http://www.37signals.com/svn/archives/000606.php">Ruby on Rails to Basecamp</a></p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> CodeIgniter <a href="http://www.codeigniter.com/user_guide/license.html">License Agreement</a></p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> Pipeline is licensed under the same terms as the Symfony framework [Copyright &#169; 2006 Picora Pipeworks <span class="caps">LLC</span>].</p>
A contents/articles/rails-os-killer-apps.html

@@ -0,0 +1,97 @@

+----- +title: Rails-powered Open Source Killer Apps, Anyone? +content-type: article +timestamp: 1225618860 +tags: rails|ruby|writing|rant +----- +<p>Lately I&#8217;ve been meandering around the web to find a good <span class="caps">CMS</span> for a family site I&#8217;d like to set up. <br /> +Why a <span class="caps">CMS</span>? Well, for a few simple reasons:</p> +<ol> + <li>I don&#8217;t have enough free time to fiddle with Rails and make my own (I&#8217;m an <em>Hobbyist Programmer&#8482;</em>: I code for fun and enlightment, not for money)</li> + <li>Even if I had the time, I&#8217;m <em>sure</em> there are plenty of CMSes out there which suits my needs.</li> +</ol> +<p>It turns out that reason #2 is not really applicable in this case, especially if we restrict the field to Ruby + Rails/Merb/&lt;insert cool <span class="caps">DRY</span> framework here&gt;.h3. Rails-powered CMSes</p> +<p><em>Name a Rails-powered <span class="caps">CMS</span>, quick!</em></p> +<p>Easy: <a href="http://radiantcms.org/">Radiant</a>.</p> +<p>Hmm, no. As much as I do like Radiant, it really cannot be considered a general-purpose <span class="caps">CMS</span>, can it? When it comes to build nearly-static sites in a clean and neat way I&#8217;d pick it any day, but it lacks quite a lot of community features like comments, ability to create forums, etc. etc. It does, however, support multilingual content in a rudimentary, yet effective way: create each translated page manually and use consistent <span class="caps">URL</span> conventions (/en/about, /it/about, etc.).</p> +<p>I&#8217;m not saying that there aren&#8217;t enough CMSes built on Rails, just that there&#8217;s no &#8220;killer app&#8221; in the pack. A &#8220;killer&#8221; <span class="caps">CMS</span> would be something as powerful as Drupal, but easier to use and more modular.</p> +<p>Here&#8217;s an incomplete list of the Rails CMSes I&#8217;m currently aware of:</p> +<table> + <tr> + <th>Name </th> + <th>First Impressions/Comments </th> + </tr> + <tr> + <td> <a href="http://radiantcms.org/">Radiant</a> </td> + <td> Mature, suitable for administering static sites </td> + </tr> + <tr> + <td> <a href="http://www.typosphere.org/">Typo</a> </td> + <td> Mature, one of the best blogging engines out there (my opinion is slightly biased though) </td> + </tr> + <tr> + <td> <a href="http://mephistoblog.com/">Mephisto</a> </td> + <td> Mature, blogging engine </td> + </tr> + <tr> + <td> <a href="http://rubricks.org/index_en.html">Rubricks</a> </td> + <td> Under development, basic features if compared to other non-Rails solutions </td> + </tr> + <tr> + <td> <a href="http://slateinfo.blogs.wvu.edu/">Slate</a> </td> + <td> Missing a lot of features if compared to competitors </td> + </tr> + <tr> + <td> <a href="http://beast.caboo.se">Beast</a> </td> + <td> Forum engine, extremely ligtweight </td> + </tr> + <tr> + <td> <a href="http://www.railfrog.com/">RailFrog</a> </td> + <td> Not sure if it&#8217;s still being updated, not so many features </td> + </tr> + <tr> + <td> <a href="http://zenadmin.org/en">Zena</a> </td> + <td> Alpha, looks promising although it doesn&#8217;t offer many features </td> + </tr> + <tr> + <td> <a href="http://simplelog.net/">simplelog</a> </td> + <td> Yet another blogging engine. Simple and easy to use </td> + </tr> + <tr> + <td> <a href="http://rcms.oopen.de/">oooopen rcms</a> </td> + <td> Early development stage (dead?), minimal feature set </td> + </tr> + <tr> + <td> <a href="http://www.geegocms.com/">Geego</a> </td> + <td> Multilingual, not so many out-of-the-box features </td> +</table> +<p><em>[Psst, if you know any other Rails <span class="caps">CMS</span> I missed out, mention it in a comment and I&#8217;ll update this table!]</em></p> +<h3>Developing Proprietary Web Applications with Rails</h3> +<p>What&#8217;s wrong with all of these? Normally one of three things: either they are mature, production-ready but focused on only one particular function (blog, forum, etc.), or they are still too new to be used seriously or they are slowly heading towards oblivion.</p> +<p>What&#8217;s going on here? Rails is a damn fine framework which offers all the modularity and power you need to build sites! Why isn&#8217;t there a fully fledged <span class="caps">CMS</span> to rival Drupal? <br /> +I think that part of the problem is that Rails is <em>too</em> good. <strong>Why build a <span class="caps">CMS</span> from scratch when you can develop a web site from scratch much more easily, tailored to your customer?</strong></p> +<p>Rails has been used to build a few &#8220;mainstream&#8221; sites like Twitter (no bashing please!), Basecamp, GitHub and many more. What do these sites have in common? <em>They are not open source</em>. You cannot deploy your own Twitter on your server (You can with <a href="http://laconi.ca/trac/">Laconica</a>, though), you cannot deploy your own Basecamp to your server (you can with <a href="http://www.projectpier.org/">ProjectPier</a>, an open source fork of <a href="http://www.activecollab.com/">ActiveCollab</a>).</p> +<p>It feels like that even though Rails itself is open source, <strong>there aren&#8217;t that many open source Rails-powered projects after all</strong>. Maybe there are, but they do not really compare with similar alternatives offered in other languages. This is the reason why, despite its utter ugliness, <span class="caps">PHP</span> is still the <em>Open Source King of the Web</em>, and that&#8217;s very, very sad in my opinion.</p> +<h3>Dreams on Rails</h3> +<p>The annoying thing is that Rails <em>is suitable</em> to build CMSes, and good ones, too! Take Radiant and Typo, for example: they both excel in their own ways, <em>in their own worlds</em>.<br /> +Theorethically speaking, <strong>there&#8217;s no reason why someone couldn&#8217;t develop a modular system to glue different components together</strong>: you&#8217;d need common user administration and common workflow, a few hooks, and a solid set of conventions on how to build third-party components.<br /> +Hell guys, the folks at Drupal developed a huge (and successful) product with a million different ways to extend it <em>in <span class="caps">PHP</span></em>. Even without using <span class="caps">OOP</span>! Every damn hook in the core is a <em>function</em>.</p> +<p>What does it take to do something like this using Rails, o Merb, or whatever else you like? You already have a very solid and consistent framework to build on (Rails), a way to automate tasks (Rake) and a language which lets you do everything you want, in a very elegant and organized way.</p> +<p><strong>Rails lacks successful open source projects, in particular CMSes</strong>. I wish someone could fix this: not by coding the <em>n^th^</em> <span class="caps">CMS</span> with the only two or three features you need, but by developing an <em>high level application framework</em> to build complex, dynamic and interactive web sites. Don&#8217;t even develop the whole damn thing: just come up with a set of conventions on how to extend a very basic core, and tell people how they can contribute, or even integrate existing applications into it.</p> +<p>The community will do the rest, hopefully&#8230; Or maybe are you too busy trying to roll out your newest, closed source startup?</p> +<p><strong>If someone decides to develop such a powerful, high-level framework and is determined to keep it user-friendly and open source, I hereby promise to write the documentation for it</strong>, articles, and books. And I&#8217;m not kidding.</p> +<h3>[<span class="caps">UPDATED</span>] A Glimpse of Hope</h3> +<p>A few of the commenters of this article brought up a few interesting points and actually gave me a little bit of hope. <a href="http://salesforceonrails.com/">Luigi Montanez</a> pointed out that Rails was built to help developers build web sites. For now, Rails deployment isn&#8217;t as seamless as end users would like it, so there&#8217;s no point creating a killer app for such users if they can&#8217;t even get it to run on their $2/month shared hosting environment.<br /> +Nevertheless, there seems to be at least <em>three</em> different open source &#8220;social network engines&#8221; powered by Rails:</p> +<ul> + <li><a href="http://portal.insoshi.com/">Insoshi</a></li> + <li><a href="http://www.communityengine.org/">Community Engine</a></li> + <li><a href="http://lovdbyless.com/">Lovd By Less</a></li> +</ul> +<p>These are not CMSes <em>in the early 2000&#8217;s sense</em>, obviously, but they do provide the basis to effectively build a late Web 2.0-ish community web site. Each one of these project seems stable and mature enough to be used in production, but surely not as well-known as many other <span class="caps">PHP</span>-based solutions.</p> +<p>On the other hand, <a href="http://priit.mx.ee/">Priit Tamboom</a> mentioned <a href="http://adva-cms.org/">adva cms</a>, a project still in alpha stage which aims to be more traditional and site-agnostic:</p> +<blockquote> +<p>&#8220;[&#8230;] Different from other Rails applications the all-engines approach of adva cms allows you to build your own applications on top of it. It also makes it very flexible and extensible: our plan is to make it possible to only pick those engines/features that you really need for your application and omit the rest. As they are still all designed to work together seemlessly and reuse each others functionality the whole plattform feels much more consistent to a collection of similar but separate Rails applications. [&#8230;]&#8221;</p> +</blockquote> +<p>This sounds <em>exactly</em> like what I was hoping would come out from the Rails community: something in between a web development framework and an high-level <span class="caps">CMS</span>. <br /> +I&#8217;m definitely going to try it out (it&#8217;s an ideal weekend project) and I&#8217;ll report back once I know more about it.</p>
A contents/articles/rails-to-italy.html

@@ -0,0 +1,11 @@

+----- +title: Rails to Italy 2007 +content-type: article +timestamp: 1183806900 +tags: rails|italy +----- +<p>So it looks like there will be a &#8220;Rails conference in Italy&#8221;, after all. In Pisa as well, and that&#8217;s maybe even less than 2 hours drive from where I live (Genoa)!</p> +<p><em>Sounds cool!</em></p> +<p>Well, the entrance fee put me off a bit, I daresay (€89 if you book before August 1st, more otherwise), but it would be great to go there.<br /> +They are actually looking for speakers too, pity that at the moment I don&#8217;t have anything prepared, but who knows&#8230; There&#8217;s free entrance (and beer) for speakers, apparently, which it wouldn&#8217;t be bad, but unfortunately my girlfriend would have to pay though, of course.</p> +<p>We&#8217;ll see what happens, for now I&#8217;m just going to promote the thing on my site (see the banner on the side).</p>
A contents/articles/randal-schwartz.html

@@ -0,0 +1,101 @@

+----- +title: A pizza with Randal Schwartz +content-type: article +subtitle: Talking about open source, programming, emacs and technical writing +popular: true +timestamp: 1289738129 +tags: opensource|programming|italy +pdf: true +----- + + <section class="section"> +<p>I am an avid <a href="http://twit.tv/FLOSS"><span class="caps">FLOSS</span> Weekly</a> listener. Sometimes I may fall behind by a few episodes, but I normally manage to catch up: Randal Schwartz&#8217; show is by far my favorite podcast.</p> +<p>You can imagine my reaction when I discovered that Randal was in Genoa, my city, ready to leave for yet another <a href="http://www.insightcruises.com/">InsightCruise</a>: I had to meet the guy, at all costs!</p> +<p>It turned out to be easier than I thought: I simply <a href="http://twitter.com/#!/h3rald/status/28962418438">asked him</a> if he fancied a pizza out on the way back from his cruise, and he said yes.</p> +<p>I also decided to invite <a href="http://www.agilesensei.com/">Claudio Perrone</a> as well, seeing that he&#8217;s back in Genoa on one of his Agile/Lean gigs. He said he didn&#8217;t know much about Perl, but he&#8217;d have liked to come as well. So there I was lining up a dinner out with two IT gurus at the same time.</p> +<p>Randal was staying at the <a href="http://www.hotelbristolpalace.it/">Bristol Palace Hotel</a>, and we met him at the lobby bar. In the end I persuaded my wife to come along as well, although she doesn&#8217;t know much about Perl either.<br /> +We shook hands with Capt. Neil [Bauman, of InsightCruises.com] and a few others of the cruise gang, then we were off to the restaurant.</p> +<p>It only took five minutes to realize that Randal was exactly like he sounds on his show: cheerful and chatty, eager to talk about technology and science. When you meet famous people face-to-face, there&#8217;s always a chance that they are not nice at all, but luckily this wasn&#8217;t the case: within minutes Randal was telling us all about <a href="http://news.motionx.com/category/motionx-gps/">MotionX-<span class="caps">GPS</span></a> (a very neat iPhone app that I highly recommend) like we had been buddies for ages.</p> + +After a rather bumpy bus ride (Italian evening drivers are well known for this), we got to <a href="http://www.ristorantepiedigrotta.it">Piedigrotta</a>, ordered some pizzas, and started talking. Little did we know that Randal loves talking and sharing stories about almost anything: we were chatting non stop for hours, and after dinner my wife and I invited everyone up to our place, to continue talking happily in front of a glass of our wine and... freshly-microwaved popcorn. + +Here's what we talked about, organized by topic for your convenience. I didn't record the conversation even if it would have made a hell of a show, but I'll do my best to quote him as faithfully as I can remember or paraphrase him without changing the meaning of his words. + +<aside class="important"> +<span class="note-title">Important</span>Randal, if you're reading this and you come across any misquotation, please let me know so I can amend them! + +</aside> + + +<section class="section"> +<header><h1 id="h_1" class="toc">Something more about Randal</h1></header> +<p><a href="http://www.stonehenge.com/merlyn/">Randal Schwartz</a> is a world-famous Perl guru, author of the <a href="http://www.oreillynet.com/pub/au/335">best Perl programming</a> on the market, and a very prolific <a href="http://www.stonehenge.com/merlyn/columns.html">column writer</a>.</p> +<p>Randal is not a full-time writer though (<q>&#8220;writing books doesn&#8217;t pay&#8221;</q>). His day job consists in being a &#8220;guru on-demand&#8221;: you can hire him to fix your code, refractor complex enterprise applications, or simply provide useful advice to IT managers. <br /> +Being the host of <span class="caps">FLOSS</span> Weekly is not a job, and Randal doesn&#8217;t do it for the money of course, but for passion: <q>&#8220;I&#8217;m trying my best to do one show per week, even when I am away&#8221;</q>, he said, and he does go off traveling around the world a lot!</p> +<p><q>&#8220;Once I was at home for 8 weeks and it felt really strange. I kept thinking I had to pack to go somewhere else&#8221;</q>. He&#8217;s been on nearly every Geek/Insight Cruises (51, if I remember correctly) and his <a href="http://www.stonehenge.com/merlyn/dot-plan.txt">travel plan</a> is always very busy.</p> +<p>I was extremely lucky to catch him on the way back from one of the few cruises in the Mediterranean! It must be a sign of some sort.</p> + +</section> + +<section class="section"> +<header><h1 id="h_2" class="toc">Open Source</h1></header> +<p>I have always tried to raise awareness about Open Source and Free Software among my friends, co-workers, and even managers. Sometimes it&#8217;s easy to make people realize that Free, Libre, Open Source Software matters, other times is much harder.</p> +<p>When Randal got half way through his pizza, I asked him if he had any tips on open source advocacy and on overcoming corporate resistance. I explained that the main concerns I get when I talk about open source in an enterprise environment are:</p> +<ul> + <li>the cost or support/training</li> + <li>the immaturity of the product and fear of it being abandoned at some point</li> + <li>overall, a high Total Cost of Ownership</li> +</ul> +<p>Randal was almost laughing at one point: <q>&#8220;why are people concerned about paying for support for open source software? Don&#8217;t they pay it already for proprietary applications?&#8221;</q>, also <q>&#8220;the chances for open source software being discontinued are the same, if not lower, than proprietary software. Plus, proprietary software often forces compulsory upgrades, and similar things that can eventually damage your business&#8221;</q>. Additionally, if I may add, in the unfortunate case that an open source project is abandoned or turns nasty, it is often forked, so at worst you always have the source code anyway.</p> +<p>Randal also pointed out that what really matters about an open source project is the community built around it. He mentioned that the <a href="http://www.mongodb.org/">MongoDb</a> guys that came on <a href="http://twit.tv/floss105"><span class="caps">FLOSS</span> Weekly #105</a> were really enthusiastic of having embraced open source. Unfortunately, some projects just don&#8217;t seem to get the whole idea behind open source at all: <em>community</em> vs. <em>enterprise</em> editions always makes me suspicious, and Randal agreed to an extent.</p> +<p><strong>In a nutshell, Open Source is not about the company or the license, it&#8217;s about the people and the community behind a project.</strong></p> +<p><q>&#8220;You should [re-]listen to one of my very first podcasts, the one with &#8221;http://www.webmink.net/&#8220;&gt;Simon Phipps</a>, the former Chief Open Source Officer at Sun&#8221;</q>, Randal told me in the end, and he&#8217;s right: <a href="http://twit.tv/floss39"><span class="caps">FLOSS</span> #39</a> is a must for anyone truly interested in the subject.</p> +<p>Seeing that Randal seemed to be perfectly happy to play with his iPhone, I went for the obvious question and asked him what he thought about Apple, and at the same time Claudio asked him what was his operating system of choice.</p> +<p><q>&#8220;OS X&#8221;</q>, admitted Randal, <q>&#8220;I use what gets the job done&#8221;</q>. In all things, there&#8217;s no point in being an extremist for the sake of argument, and being an open source advocate does not mean that you have to condemn every piece of proprietary software (at this point, Richard Stallman would have thrown up his pizza, had he been there &#8212;but he wasn&#8217;t).</p> +<p><q>&#8220;From a <span class="caps">GUI</span> point of view, Apple is still ahead of the competition: if others want to win, they have to come up with something better, and different. [&#8230;]Ubuntu is getting there, but not quite yet.&#8221;</q></p> +<p>Randal also pointed out the importance of contributing to open source projects: <q>&#8220;you don&#8217;t have to code, you can just provide feedback, submit bug reports, write documentation, or test&#8230; I am the one who checks if git builds on a Mac, for example&#8221;</q>.</p> + +</section> + +<section class="section"> +<header><h1 id="h_3" class="toc">Programming</h1></header> +<p>Programming was another major topic of our discussion. Randal, after all, is a living Perl legend having written 6 Perl books and over 250 magazine columns. Unfortunately I don&#8217;t know much about Perl, and neither does Claudio. I am quite open-minded about languages&#8212;although I am slightly favorable towards Ruby&#8212;so I enjoyed every little bit of the discussion anyway.</p> +<p>Most of the discussion was about Perl 6, which was recently featured on <a href="http://twit.tv/floss140"><span class="caps">FLOSS</span> Weekly #140</a>. After listening to what Randal had to say about it, I am definitely going to try it out at some point (hopefully skipping Perl 5 altogether). <br /> +<q>&#8220;We [Perl programmers] say that Ruby is an alpha version of Perl 6&#8221;</q> said Randal, joking about the similarities between the two languages and the amount of time it took to come up with a working Perl 6 (which to date is still unfinished). He reckons Perl 6 will be used in production for small and medium projects within a few months, and he&#8217;s going to write a book about it.</p> +<p>He then briefly described what makes Perl 6 so special. The top feature we were talking about was grammars: the language offers the possibility to create grammars to parse other languages and even Perl 6 itself. Moreover, the Rakudo implementation running on the Parrot VM aims to implement the full Perl 6 specification in Perl 6 itself <q>&#8220;[&#8230;] therefore, at run time, a program is able to access the its syntax tree itself&#8230;&#8221;</q>, he said, while playing with an imaginary Perl 6 parse tree in the air.</p> +<p>We then moved on to Smalltalk, and both Claudio and I asked him a few questions about it, in particular about the whole concept of <em>image</em>, particularly in reference to the Squeak implementation. We observed how many programmers of other languages (Ruby included) end up going back to the origins (Smalltalk) and how Smalltalk is far from dead. <q>&#8220;It&#8217;s only a matter of getting used to it&#8221;</q>, said Randal when I asked him how to work with a Smalltalk image and how to distribute it, <q>&#8220;you program as you would in any other language, you can communicate with the rest of the world just fine. What you get in Smalltalk that you don&#8217;t get in most other languages, is the ability to inspect and work with the underlying source code of the objects at run time, thanks to the amazing reflection features the language offers&#8221;</q>.</p> +<p>At one point I had to asked Randal what he though about Haskell, having tried to learn it three times without succeeding: <q>&#8220;I have tried <em>ten</em> times to learn it myself, with no luck&#8221;</q>, he said. At least I&#8217;m not alone!</p> +<p>The discussion then shifted towards tools, and then of course text editors. I just had to remind him that I am a Vim guy. Randal looked at me smiling, and said: <q>&#8220;That&#8217;s fine. You <span class="caps">WILL</span> join us. Sooner or later you will join us&#8230; join us&#8230;&#8221;</q>.</p> +<p>Randal&#8217;s involvement in Emacs dates way back to the end of the 80s, and he has been using it ever since. He even contributed to it, back then, by writing pp.el, the pretty printer module.<br /> +<q>&#8220;I posted my code to the emacs mailing list, and Richard Stallman himself replied asking if he could include my code in Emacs. If you read Emacs acknowledgements, I&#8217;m there as well&#8221;</q>, said Randal, proudly.</p> +<p>I confess I almost felt the urge to give Emacs another try. I often get hyped up about things like this. If I had received such a reply from Richard Stallman, I would have probably sworn not to touch the Editor of the Beast ever again.</p> +<p><q>&#8220;Just try out Org mode. I didn&#8217;t know it very well myself until I had a show about it, but now realize why people should always load up an Emacs instance just to run Org mode.&#8221;</q>, said Randal again, talking about yet another <a href="http://twit.tv/floss136">recent show</a>.</p> + +</section> + +<section class="section"> +<header><h1 id="h_4" class="toc">Technical Writing</h1></header> +<p>After our pizza, we all went back to my place, which is literally around the corner for the restaurant. It was only when we were happily starting the second glass of my family&#8217;s very own home-made wine that Randal looks at me and says: <q>&#8220;You know that I started off as a Technical Writer myself, don&#8217;t you?&#8221;</q></p> +<p>I was baffled. I did brush up on Randal&#8217;s life on his web site, Wikipedia and similar, like any good fan meeting his hero, but I never came across this tiny detail. This triggered yet another round of questions on my part, as I have been working full time as a technical writer for years now. Randal shared a couple of anecdotes about his early technical writing career.</p> +<p><q>&#8220;When I joined, I had a boss called Lyle. He used to say that the manual itself is <em>the</em> product. If it&#8217;s not in the manual, it simply doesn&#8217;t exist for the customer.&#8221;</q> A statement that can come handy as as a reminder for Product Managers, Project Leaders and similar when they try to belittle documentation, and for writers themselves, when they feel that they can be sloppy because no one cares.</p> +<p>I really enjoyed when Randal told us about his first encounter with his editor, Jack:</p> +<blockquote>&#8220;He was a big guy. 6 ft tall, with huge hands. He used to hold his pencil like this&#8230; [shows a fist grabbing a pencil] &#8230;he starts reading my first draft and crosses a word, then a paragraph, and another, and so on. Then he looks at me and says: &#8216;OK, what did you <em>really</em> want to say here?&#8217;<br /> +<br /> +I said &#8216;Well, that you set option -s to enable <span class="caps">XYZ</span>&#8217;, and he starts writing down on my document &#8216;Set option -s to enable <span class="caps">XYZ</span>&#8230;&#8217;, and so on.&quot;</blockquote> +<p>When you start as a Technical Writer, you often end up writing a lot trying to be thorough, making even really simple things complicated. Jack reminded me of a great editor that was hired at my company for a summer, and revolutionized the whole department by applying some principles and vocabulary of <a href="http://en.wikipedia.org/wiki/Simplified_English">Simplified English</a>. As it turns out, instructions written in a plain and simple language are far easier to understand than anything else.</p> + +</section> + +<section class="section"> +<header><h1 id="h_5" class="toc">Wrapping it up</h1></header> +<p>We spent the whole evening talking non-stop. We met at his hotel at 7:30 PM and I drove him back around 11 PM. The guy does talk a lot. Luckily, I got a chance to take a couple of pictures and get a funny autographed note, as long as I promised not to use it for cheques, that reads: &#8220;To Fabio, without whom this note will make no sense&#8221;.</p> +<p><img src="/img/pictures/rls/rls1_small.png" style="float:right;" /></p> +<p>There&#8217;s obviously a lot of stuff we talked about that I didn&#8217;t write about, mainly because I was trying to keep this article focused on IT-related topics. Before his cruise, Randal visited the <span class="caps">CERN</span> in Geneva, so for a good half hour we talked about the <span class="caps">LHC</span>, experiments, neutrinos being shot from Geneva and collected in Rome, things like that.</p> +<p>We also talked a lot about Randal&#8217;s day job, then about his company <a href="http://www.stonehenge.com">Stonehenge.com</a>, then his trip to England (and to the real Stonehenge); and we talked about Italy, both about good things (food?) and bad things (bureaucracy, backwards mentality mainly in relation to IT, lack of English speakers, etc.).</p> +<p>The evening couldn&#8217;t have gone better. Especially considering Randal and I don&#8217;t agree on some <span class="caps">EXTREMELY</span> important matters (programming languages and text editors). It was a great chance to learn from each other. I doubt he will be ditching Perl in favor of Ruby, but at least I hope to have made it very clear to him that Ruby is much more than Rails, at least for some of us.</p> +<p><code>sudo apt-get install emacs</code></p> +<p>Damn! Wrong terminal. Sorry about that&#8230;</p> + +</section> + +</section>
A contents/articles/rawline-020.html

@@ -0,0 +1,27 @@

+----- +title: New Release: RawLine 0.2.0 +content-type: article +timestamp: 1207107180 +tags: ruby|programming|opensource|rawline +----- +<p><del>InLine</del> RawLine 0.2.0 is out!</p> +<p>*Raw*Line is the new name for InLine, in case you didn&#8217;t guess. The name was changed to avoid name collision problems with the RubyInline project.</p> +<p>Here&#8217;s what&#8217;s new:</p> +<ul> + <li>Added /examples and /test directory to gem.</li> + <li>Escape codes can now be used in prompt.</li> + <li>It is now possible to use bind(key, &amp;block) with a String as key, even if the corresponding escape sequence is not defined.</li> + <li>Added Editor#write_line(string) to print a any string (and &#8220;hit return&#8221;).</li> + <li>Library name changed to &#8220;RawLine&#8221; to avoid name collision issues (Bug <a href="http://rubyforge.org/tracker/?func=detail&amp;aid=18879&amp;group_id=5622&amp;atid=21788">18879</a>).</li> + <li>Provided alternative implementation for left and right arrows if terminal<br /> +supports escape sequences (on Windows, it requires the Win32Console gem).</li> +</ul> +<p>In particular, I decided to provide an &#8220;optimized implementation&#8221; for the left and right arrows using escape sequences rather than shameful hacks. This is now possible because the Win32Console gem now enables <span class="caps">ANSI</span> escape sequences on Windows as well (weehee!).</p> +<p>So:</p> +<ul> + <li>If you&#8217;re on *nix all good, your terminal is smart and can understand escape sequences =&gt; the new implementation will be used.</li> + <li>If you&#8217;re on Windows and you installed Win32Console, your termnal is smart and can understand escape sequences =&gt; the new implementation will be used.</li> + <li>If you&#8217;re on Windows and you didn&#8217;t install Win32Console, then your terminal is stupid and it doesn&#8217;t understand escape sequences, so the old implementation will be used.</li> +</ul> +<p>The new implementation is significantly faster than the old one, on Windows at least, and the cursor now blinks properly when left or right arrows are pressed.</p> +<p>I re-emplemented only cursor movement because I&#8217;m still having some problems in getting the delete/insert escapes to work properly (or better: how I want them to work!).</p>
A contents/articles/rawline-030.html

@@ -0,0 +1,64 @@

+----- +title: RawLine 0.3.0 released — now with Readline emulation +content-type: article +timestamp: 1235890020 +tags: ruby|opensource|rawline +----- +<p><a href="/rawline">RawLine</a> 0.3.0 has been <a href="http://rubyforge.org/projects/rawline">released</a>. This new milestones fixes some minor bugs and adds some new functionalities, must notably:</p> +<ul> + <li>Ruby 1.9 support</li> + <li>A filename completion function</li> + <li>A new <span class="caps">API</span> very similar to the one exposed by the Ruby wrapper for <span class="caps">GNU</span> Readline</li> +</ul> +<p>Some of you asked for Readline compatibility/emulation and that was actually not too difficult to implement: all the bricks were already there, I just had to put them together in the right place.</p> +<p>The <code>RawLine</code> module (you can spell it &#8220;Rawline&#8221; as well, if you wish) now behaves like <code>Readline</code>. This means that you can now use RawLine like this (taken from examples/readline_emulation.rb):</p> +<div class='ruby'><pre><code>include Rawline + +puts "*** Readline Emulation Test Shell ***" +puts " * Press CTRL+X to exit" +puts " * Press &lt;TAB&gt; for file completion" + +Rawline.editor.bind(:ctrl_x) { puts; puts "Exiting..."; exit } + +Dir.chdir '..' + +loop do + puts "You typed: [#{readline("=&gt; ", true).chomp!}]" +end</code></pre></div><p>Basically you get a <code>readline</code> method, a <code>HISTORY</code> constant like the one exposed by Readline (Rawline&#8217;s is a RawLine::HistoryBuffer object though &mdash; much more manageable), and a <code>FILENAME_COMPLETION_PROC</code> constant, which provides basic filename completion. Here it is:</p> +<div class='ruby'><pre><code>def filename_completion_proc + lambda do |word| + dirs = @line.text.split('/') + path = @line.text.match(/^\/|[a-zA-Z]:\//) ? "/" : Dir.pwd+"/" + if dirs.length == 0 then # starting directory + dir = path + else + dirs.delete(dirs.last) unless File.directory?(path+dirs.join('/')) + dir = path+dirs.join('/') + end + Dir.entries(dir).select { |e| (e =~ /^\./ && @match_hidden_files && word == '') || (e =~ /^#{word}/ && e !~ /^\./) } + end + end</code></pre></div><p>You can find this function as part of the <code>RawLine::Editor</code> class. The result is not exactly the same Readline, because completion matches are not displayed underneath the line but inline and can be cycled through &mdash; which is one of Readline&#8217;s completion modes anyway.</p> +<p>A few methods of the <code>RawLine::Editor</code> class can now be accessed directly from the <code>RawLine</code> module, like with Readline:</p> +<ul> + <li><code>Rawline.completion_proc</code> &mdash; the Proc object used for <span class="caps">TAB</span> completion (defaults to FILENAME_COMPLETION_PROC).</li> + <li><code>Rawline.completion_matches</code> &mdash; an array of completion matches.</li> + <li><code>Rawline.completion_append_char</code> &mdash; a character to append after a successful completion.</li> + <li><code>Rawline.basic_word_break_characters</code> &mdash; a String listing all the characters used as word separators.</li> + <li><code>Rawline.completer_word_break_characters</code> &mdash; same as above.</li> + <li><code>Rawline.library_version</code> &mdash; the current version of the Rawline library.</li> + <li><code>Rawline.clear_history</code> &mdash; to clear the current history.</li> + <li><code>Rawline.match_hidden_files</code> &mdash; whether FILENAME_COMPLETION_PROC matches hidden files and folders or not.</li> +</ul> +<p>I bet you didn&#8217;t know these methods were even in the Readline wrapper, did you? Probably because of lack of documentation.<br /> +Anyhow, another very important difference beween Rawline and Readline is <code>Rawline.editor</code>, i.e. the default instance of RawLine::Editor used by the Rawline module itself.</p> +<p>This makes things easier if you want more control over the line which is being edited and the previously-edited lines. Sure, <code>Readline#completion_proc</code> exposes the current <em>word</em> being typed before hitting tab, and so does <code>Rawline#completion_proc</code> the difference is that if you access <code>Rawline.editor.line</code> you get a <code>RawLine::Line</code> object with all the information you could possibly need about the current line: the position of the cursor, the text, the order the characters were entered, etc. etc. <br /> +Now you can imagine why it took me a few minutes to write the <code>filename_completion_proc</code> method (and why it will take you even less time to write your own similar method if you wanna do something different): you can access not only the last word being typed but also the current <em>and previous</em> lines (through <code>Rawline.editor.history</code> or just <code>Rawline::HISTORY</code>)!</p> +<p>It must be said, as usual, that Rawline is <em>not</em> a complete replacement for the Readline library yet (and it will probably never be, as Readline is huge!), but it&#8217;s a good cross-platform, more Ruby-esque alternative to what&#8217;s currently available by the Readline wrapper for Ruby.</p> +<p>It&#8217;s not as fast, of course, especially when completing long words, but it&#8217;s quite usable. The following libraries are not required but recommended:</p> +<ul> + <li><code>win32console</code> (on Windows)</li> + <li><code>termios</code> (on *nix)</li> +</ul> +<p>They basically make Rawline faster. If you don&#8217;t use them, Rawline will fall back on its pure-Ruby implementation to move left and right (i.e. printing backspaces and spaces character codes instead of <span class="caps">ASCII</span> escape codes).</p> +<p>Unfortunately, there&#8217;s no <code>vi_editing_mode</code> or <code>emacs_editing_mode</code> yet (for time constraints: they <em>can</em> be implemented!) but patches are very welcome. Also, if you need more features, all you have to do is ask :-)</p> +<p>P.S.: Check out the new <a href="/rawline">Project Page</a> and especially its Resources section!</p>
A contents/articles/real-world-rawline-usage.html

@@ -0,0 +1,81 @@

+----- +title: Real-world Rawline usage +content-type: article +timestamp: 1236398040 +tags: ruby|rawline +----- +<p>So I finally decided to update <a href="/rawline">RawLine</a> last week, and I added a more Readline-like <span class="caps">API</span>. When I first started the project, I was determined <em>not</em> to do that, because the current Readline wrapper shipped with Ruby is not very Ruby-ish: it&#8217;s a wrapper, after all!</p> +<p>The good thing of having a new <span class="caps">API</span> compatible with Readline is that now people can use RawLine in their Readline-powered scripts, with very minor modifications.</p> +<p>Let&#8217;s have a look at some examples (they are also shipped with <a href="http://rubyforge.org/projects/rawline">Rawline v0.3.1</a>):<br /> +h3. Rush</p> +<p><a href="http://rush.heroku.com">Rush</a> is an excellent gem which provides a cross-platform shell environment, entirely written in Ruby.<br /> +Being a shell, it obviously uses Readline for tab completion, and that does the job on Linux. On Windows though, things aren&#8217;t that easy:</p> +<ul> + <li>text gets garbled if you write long lines</li> + <li>you can&#8217;t type certain characters if they use some key modifiers like <RIGHT-ALT>, etc.</li> +</ul> +<p>RawLine doesn&#8217;t have these problems (that&#8217;s the very reason why I created it), so here&#8217;s a simple script which launches a Rawline-enabled Rush shell:</p> +<div class='ruby'><pre><code>require 'rubygems' +require 'rush' +require 'rawline' + +class RawlineRush &lt; Rush::Shell + + def initialize + Rawline.basic_word_break_characters = "" + Rawline.completion_proc = completion_proc + super + end + + def run + loop do + cmd = Rawline.readline('rawline_rush&gt; ') + finish if cmd.nil? or cmd == 'exit' + next if cmd == "" + Rawline::HISTORY.push(cmd) + execute(cmd) + end + end +end + +shell = RawlineRush.new.run</code></pre></div><p>What happens here? Nothing much really, all I had to do was:</p> +<ol> + <li>Derive a new class from Rush::Shell</li> + <li>Set <code>Rawline.basic_word_break_characters</code> to the same value used in the original Rush code</li> + <li>Set <code>Rawline.completion_proc</code> to <em>the same</em> completion Proc used in the original Rush code</li> + <li>Rewrite the original <code>run</code> replacing <code>Readline</code> with <code>Rawline</code></li> +</ol> +<p>And it works as it was intended to, i.e. typing <code>root['b&lt;TAB&gt;</code> will expand to <code>root['bin/</code>, etc.<br /> +Note that I didn&#8217;t write the completion Proc from scratch: it was already there.</p> +<h3><span class="caps">IRB</span></h3> +<p>After trying out Rush, the next logical step was trying <span class="caps">IRB</span> itself: I could never use it properly on Windows, and that was really frustrating.<br /> +After a few minutes trying to figure out how to start <span class="caps">IRB</span> programmatically, I quickly came up with a similar example:</p> +<div class='ruby'><pre><code>require 'irb' +require 'irb/completion' +require 'rubygems' +require 'rawline' + +Rawline.basic_word_break_characters= " \t\n\"\\'`&gt;&lt;;|&{(" +Rawline.completion_append_character = nil +Rawline.completion_proc = IRB::InputCompletor::CompletionProc + +class RawlineInputMethod &lt; IRB::ReadlineInputMethod + include Rawline + def gets + if l = readline(@prompt, false) + HISTORY.push(l) if !l.empty? + @line[@line_no += 1] = l + "\n" + else + @eof = true + l + end + end +end + +module IRB + @CONF[:SCRIPT] = RawlineInputMethod.new +end +IRB.start</code></pre></div><p>In this case, Rawline is included in the <code>RawlineInputMethod</code> class, derived from the original <code>ReadlineInputMethod</code> class, i.e. the class <span class="caps">IRB</span> uses to define (guess&#8230;) how to input characters.<br /> +Again, all I had to do was set a few Rawline variables to match the ones used in Readline, and then redefine the function used to get characters. All done.</p> +<p>It works as expected (only with inline completion, of course): typing <code>"test".ma&lt;TAB&gt;</code> will give you <code>"test".map</code>, <code>"test".match</code>, etc.</p> +<p>You also get all Rawline key mappings for free (<span class="caps">CTRL</span>-K to clear the line, <span class="caps">CTRL</span>-U and <span class="caps">CTRL</span>-R to undo and redo, etc.), and you can define your own.</p>
A contents/articles/redbook-020-released.html

@@ -0,0 +1,50 @@

+----- +title: Announcement - RedBook v0.2.0 released +content-type: article +timestamp: 1191812700 +tags: redbook|ruby|productivity|opensource +----- +<blockquote> +<p><em>&#8220;Release Early, Release Often&#8221;</em></p> +<p>&#8212; Eric S. Raymond, <a href="http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html">The Cathedral and the Bazaar</a></p> +</blockquote> +<p>In other words, time for another (early) release of <a href="http://www.assembla.com/space/redbook">RedBook</a>. There are quite a few new features which are worth examining, in particular:</p> +<h3>Regexp search for messages</h3> +<p>This was actually already available before, just if you inputted a search string which was not a regexp, you&#8217;d get an unhandled exception (more or less). This exception is now handled propertly so you get a pretty message instead, if an error occurs when parsing the search string.</p> +<h3>Log Backup</h3> +<p>A new <strong>&#58;backup</strong> keyword is available to quickly backup your log file. Here&#8217;s what it does:</p> +<ul> + <li>Loads all messages silently</li> + <li>Writes them to a file in the same directory as the original log file named &lt;log-alias&gt;.bkp.yml.</li> +</ul> +<p>Handy, especially if there was a similar keyword to restore the last backup, which is planned for <a href="http://www.assembla.com/spaces/milestones/index/bWE7NkzCqr3k25abIlDkbG?spaces_tool_id=ceS8UazCqr3k25abIlDkbG">later on</a>.</p> +<h3>Support for multiple log files</h3> +<p>This is perhaps the most important feature introduced by this release. It is now possible to configure more than one log file by adding any number of <strong>&#58;data_&lt;alias&gt;&#58;</strong> settings inside your config.yml file, where alias is the name of your log file. So, for example, if your config.yml file contains the following:</p> +<p><strong>&#58;data_test&#58; &#8220;testlog.yml&#8221;</strong></p> +<p>You can load the &#8220;test&#8221; log by typing</p> +<p><strong>&#58;use test</strong></p> +<p>(&#58;use is a shorthand for &#58;load_log). Similarly, another new keyword <strong>&#58;dest</strong> has been introduced to be able to log a message to a different log file without loading it into memory, like this:</p> +<p><strong>&#58;log This message will be saved to testlog.yml &#58;dest test</strong></p> +<p>Finally, a <strong>&#58;refresh</strong> keyword has been introduced as an alias to reloading the current log.</p> +<h3>(Almost) automatic log of completed activities</h3> +<p>Right when I was coding the <strong>&#58;timecalc</strong> operation, I thought it would be nice to be able to log the start and end of a task without having to type it twice. Now this is possible using the <strong>&#58;complete</strong> keyword:</p> +<p>&#58;log Testing feature X in product Y</p> +<p>&#58;complete</p> +<p><strong>&#58;complete</strong> will re-log the last message prepended with [<span class="caps">COMPLETED</span>]:</p> +4 Mon Oct 08 2007 &#8211; 10:47:45 AM Testing feature X in product Y +5 Mon Oct 08 2007 &#8211; 10:54:31 AM [<span class="caps">COMPLETED</span>] Testing feature X in product Y +<p>What if I start another task before completing the first one? No problem, it is sufficient to load the last activities using a <strong>&#58;load</strong> command and then issuing <strong>&#58;complete &lt;number&gt;</strong> where &lt;number&gt; is the index of the loaded activity. <br /> +This nifty little feature will become more and more important when (starting from release 0.4) I&#8217;ll implement more time tracking functions, and it will be possible to track completed tasks in a specific timeframe and/or marked with a specific tag.</p> +<h3>Easy integration with launchers like Launchy and QuickSilver</h3> +<p>To conclude, as someone pointed out that it would be cool to use RedBook from launchers like Launchy or Quicksilver, I made another standalone script (redbooklet.rb or redbooklet.exe) which is just able to parse a log command and write a message to the specified log file.<br /> +To use it with Launchy, for example, all you have to do is the following:</p> +<ol> + <li>Create a shortcut to redbooklet.exe (or to a way to execute the corresponding ruby script) named &#8220;log&#8221;.</li> + <li>Copy the &#8220;log&#8221; shortcut anywhere in your start menu</li> + <li>Bring up launchy (ALT+SPACE) and type in &#8220;log&#8221;</li> + <li>Hit tab</li> + <li>Type in your log message, optionally with the any &#58;tags or &#58;dest keywords.</li> + <li>The message will be logged to your default log file or to the log you specified using the &#58;dest keyword. If an error occurs, it will appear in a command line window for 15 seconds before the program is closed.</li> +</ol> +<p>That&#8217;s all folks! As usual, if you have any comment or suggestion feel free to reply to this post or email me. For a list of the planned features and releases, check out the <a href="http://www.assembla.com/spaces/milestones/index/bWE7NkzCqr3k25abIlDkbG?spaces_tool_id=ceS8UazCqr3k25abIlDkbG">Milestones</a> page.</p> +<p style="text-align:center;"><strong><a href="http://www.assembla.com/spaces/files/bWE7NkzCqr3k25abIlDkbG"><span class="caps">DOWNLOAD</span> <span class="caps">HERE</span></a></strong></p>
A contents/articles/redbook-030-released.html

@@ -0,0 +1,66 @@

+----- +title: Announcement - RedBook v0.3.0 released +content-type: article +timestamp: 1193289480 +tags: redbook|ruby|productivity|opensource +----- +<p>It&#8217;s time for a new beta release of RedBook. This was actually going to be a fairly modest release in terms of features, but I actually ended up implementing a lot more than expected, even things which were planned for the first production release 1.0. So, let&#8217;s see what&#8217;s new</p> +<h3>New operation names <em>(which break compatibility with previous versions)</em></h3> +<p>I had a look at the names I choose for the operations and I noticed that they were either not intuitive enough or too verbose. So I decided to change a fair few of them (thus breaking compatibility with previous versions, but after all that&#8217;s what beta releases are for, right?):</p> +<table> + <tr> + <th><span class="caps">OLD</span> </th> + <th><span class="caps">NEW</span> </th> + </tr> + <tr> + <td> :complete </td> + <td> :finish </td> + </tr> + <tr> + <td> :load </td> + <td> :select </td> + </tr> + <tr> + <td> :load_config </td> + <td> :config </td> + </tr> + <tr> + <td> :load_log </td> + <td> :refresh </td> + </tr> + <tr> + <td> :timecalc </td> + <td> :calc </td> + </tr> + <tr> + <td> :stop </td> + <td> :quit </td> + </tr> +</table> +<h3>New Manual/Home Page</h3> +<p>A while ago I discovered <a href="http://www.tiddlywiki.com/">TiddlyWiki</a>, but as a matter of fact I never used it for anything practical. From last week though, I started using it a work for taking notes and create short memos, and then I thought of using it to replace RedBook&#8217;s standard <span class="caps">README</span> file (which was made in a hurry and was kinda cryptical). Now a brand new &#8220;manual.html&#8221; ships with RedBook &#8212; 308 KB (30 of actual docs and 278 of Javascript/<span class="caps">HTML</span>/<span class="caps">CSS</span> magic) with everything you need to know about it. Additionally, an online version is available at the following address:</p> +<p style="text-align:center;"><strong><a href="http://redbook.h3rald.com">redbook.h3rald.com</a></strong></p> +<h3>Removed Win32::Console Library</h3> +<p>OK this is not good news for people (like me) who use RedBook on Windows, but I promise you&#8217;ll forgive me when you read about the other new features below. I discovered by chance that the Win32::Console library (which was used to get colors working on Windows) seems not to handle international characters properly and also seems to be conflicting in some way with the Readline library I decided to include (see below). I don&#8217;t know whether this is a problem of the actual library or just of the gem used to pack it.</p> +<h3>rbconfig.yml</h3> +<p>The <code>config.yml</code> file has been renamed to <code>rbconfig.yml</code>. Additionally, if you place a file with this name in your $<span class="caps">HOME</span> directory it will override the one in your RedBook folder (This was done in preparation for the RedBook RubyGem).</p> +<h3>New operations</h3> +<p>The following new operations are available:</p> +<ul> + <li><a href="http://redbook.h3rald.com/#%3Arelog">:relog</a> &#8212; Re-logs a previously-logged message (keeping the same tags and updating the timestamp)</li> + <li><a href="http://redbook.h3rald.com/#%3Aclear">:clear</a> &#8212; Clears the screen.</li> + <li><a href="http://redbook.h3rald.com/#%3Aruby">:ruby</a> &#8212; Evaluates arbitrary Ruby code outputting the result (use with care&#8230;)</li> +</ul> +<h3>Auto-completion</h3> +<p>Some Mac users originally complained that the backspace key wasn&#8217;t working in RedBook (and it didn&#8217;t in Linux either). Fortunately the solution to this was easy enough: include the <span class="caps">GNU</span> <a href="http://tiswww.case.edu/php/chet/readline/rltop.html">Readline</a> library. <br /> +Readline is now being used in RedBook to:</p> +<ul> + <li>Provide basic (Emacs-style) bindings</li> + <li><strong>Auto-completion</strong> for keywords <em>and tags</em></li> + <li>Allow the user to automatically customize key bindings via an <a href="http://redbook.h3rald.com/#.inputrc">.inputrc</a> file placed in their $<span class="caps">HOME</span> directory (on Windows you&#8217;ll have to define a <span><span class="caps">HOME</span></span> environment variable pointing to a directory of your choice). An example .inputrc file is distributed with RedBook with some specific key bindings.</li> +</ul> +<h3>Support for international characters</h3> +<p>Finally, I decided to implement another feature which was originally planned for the 1.0 release: international characters support. This is possible using the Iconv Ruby extension (requires <a href="http://www.gnu.org/software/libiconv/"><span class="caps">GNU</span> libiconv</a>) which can convert strings between different character sets. The character sets needs to be configured via the <a href="http://redbook.h3rald.com/#rbconfig.yml">rbconfig.yml</a> file.</p> +<p>For more information, check out the <a href="http://redbook.h3rald.com/#ChangeLog">ChangeLog</a></p> +<p style="text-align:center;"><strong><a href="http://www.assembla.com/spaces/files/bWE7NkzCqr3k25abIlDkbG">Download RedBook</a></strong></p> +
A contents/articles/redbook-040-released.html

@@ -0,0 +1,76 @@

+----- +title: Announcement - RedBook v0.4.0 released +content-type: article +timestamp: 1196235240 +tags: opensource|productivity|redbook|ruby +----- +<p>I&#8217;m pleased to announce a new release of the RedBook daily logging and time tracking script. This release introduces two new operations, four stats-related directives and a brand new Windows Installer able to setup RedBook in a blink, with (almost) no configuration at all.</p> +<p>Let&#8217;s have a closer look&#8230;h2. New Operations</p> +<p>Suppose that you just logged a message and you noticed one of these two things happened:</p> +<ul> + <li>You didn&#8217;t really wanted to log it</li> + <li>You made a silly typo in the message or in the tags</li> +</ul> +<p>What can you do about it? Up to RedBook 0.3, the only solution was to open the <span class="caps">YAML</span> file and correct the mistake manually. From now on there&#8217;s also another simpler way to operate in such situations: using the :update and :delete operations!</p> +<h3>:update</h3> +<p>This operation can be used to update the message and or the tags of a previously-logged activity. The usage is simple: load a dataset first, and then execute an <code>:update</code> command like:</p> +<p><code>:update 4 :message My updated message :with new_tag1 new_tag2</code></p> +<p>This will update the 4th message of the dataset modifying its message and tags. Of course you can update either of the two things or both; the timestamp of the activity will not be changed.</p> +<h3>:delete</h3> +<p>The delete operation can be used to completely delete a message from the log. Just load a dataset using a <code>:select</code> operation and then execute a <code>:delete</code> command, e.g.:</p> +<ul> + <li><code>:delete 1</code> <em>(will delete the first activity)</em></li> + <li><code>:delete 4 2 7 9</code> <em>(will delete activity #2, #4, #7 and #9)</em></li> + <li><code>:delete</code> <em>(will delete the entire dataset)</em></li> +</ul> +<p>A confirmation message will appear before deleting the message(s).</p> +<p><strong><span class="caps">IMPORTANT</span></strong><br /> +<em>Due to the architecture of the application, whenever an <code>:update</code> or <code>:delete</code> occurs the log file will be reloaded in memory and completely overwritten. This doesn&#8217;t cause problems, although for big log files (10,000+ activities) this may take a few seconds.</em></p> +<h2>Statistics</h2> +<p>Another important new feature introduced by this release is <em>time tracking</em>. It was actually already there, kind of: the <code>:calc</code> operation was already able to calculate the time elapsed between two activities&#8230; however, this is not really practical.</p> +<p>Since last release, it is possible to log the completion of an activity using the <code>:finish</code> command. This will basically re-log the same activity prepending <em>[<span class="caps">COMPLETED</span>]</em> to its message.<br /> +If you started using the <code>:finish</code> command to complete your activities, RedBook can now calculate the following stats for you:</p> +<ul> + <li>Count the number of messages in a dataset</li> + <li>Calculate the average time spent for the completed activities in a dataset</li> + <li>Calculate the total time spent for the completed activities in a dataset</li> + <li>Calculate the duration of each completed activity in a dataset</li> +</ul> +<p>Each of these calculations is performed by adding special directive to a <code>:select</code> command, as explained in the following sections.</p> +<h3>:count</h3> +<p>This directive can be added to a <code>:select</code> command to return just the number of message of the loaded dataset. <br /> +In other words, executing the following:</p> +<p><code>:select :count :with mail !work</code></p> +<p>&#8230;will return the number of activities tagged with <em>mail</em> but not with <em>personal</em>, without listing all the activities.</p> +<h3>:avg</h3> +<p>The <code>:avg</code> directive can be used to calculate the average time spent on activities matching certain criteria, for example:</p> +<p><code>:select Status Meeting :avg :with meeting</code></p> +<p>&#8230;will return the average time spent on activities whose messages matches <em>/Status Meeting/</em> and are tagged with <em>meeting</em>.</p> +<h3>:total</h3> +<p>Similarly, <code>:total</code> can be used to return the total time spent on activities matching certain criteria, e.g.:</p> +<p><code>:select :total :with mail work</code></p> +<p>&#8230;will return the total time spent on activities tagged with <em>mail</em> and <em>work</em>.</p> +<h3>:duration</h3> +<p>Lastly, <code>:duration</code> will print each completed task along with its duration. The syntax is similar to the others:</p> +<p><code>:select :duration :with break</code></p> +<p>This will print each completed activity tagged with <em>break</em> along with its duration.</p> +<h3>:nodiff and _concurrent</h3> +<p>The logic behind the above-mentioned directives may seem trivial to implement, but it is not. The fun part was telling RedBook to subtract the duration of each sub-activity contained in another activity&#8230; a feature I considered necessary for time tracking purpose. However, if you start your work day with a <em>Working Day</em> activity and you complete that activity using the <code>:finish</code> command, when calculating the duration of the working day RedBook will subtract the duration of <em>all the completed sub-activities</em> from the duration of <em>Working Day</em>. This is not OK, so I added the directive <code>:nodiff</code> which can be used to prevent RedBook from calculating the difference between the parent activity&#8217;s duration and the duration of each of its child activity.</p> +<p>What if you&#8217;re doing two things at once? use the special <code>_concurrent</code> tag, and that activity will be considered symultaneous to its parent activity for time tracking purposes.</p> +<h2>Activity Status Filters</h2> +<p>RedBook is now fully aware of the &#8220;status&#8221; of each activity, so it is possible to display only activities in a certain status using the following directives:</p> +<h3>:plain</h3> +<p>Executing <code>:select :plain :from today</code> will return all the activities logged today, omitting their completions (if any), i.e. any activity beginning with <em>[<span class="caps">COMPLETED</span>]</em>.</p> +<h3>:pending</h3> +<p>Executing <code>:select :pending :from today</code> will return all the activities logged today which have not been completed yet. Again, this was not too trivial to implement, but it seems to work (it also smart enough to detect if the same activity has been relogged etc. etc.).</p> +<p><strong><span class="caps">WARNING</span>:</strong> <br /> +<em>Using this directive with a large dataset may cause RedBook to take some time before delivering the result, due to the amount of iterations to perform. Use with care.</em></p> +<h3>:completed</h3> +<p>Executing <code>:select :completed :from today</code> will return all the activities logged today which have been completed.</p> +<h2>Windows Installer</h2> +<p>I decided to spend some time (half an hour) and create a proper setup file for Windows using InnoSetup. The setup will take care of almost everything for you, so you have no excuse not to try RedBook because it&#8217;s not user-friendly to install!</p> +<p>Check out the <a href="http://redbook.h3rald.com">manual</a> for more details.</p> +<h2>RubyForge Project</h2> +<p>Finally, I registered a new <a href="http://rubyforge.org/projects/redbook/">RubyForge Project</a> for RedBook, which include a public <span class="caps">SVN</span> repository updated every week (Assembla doesn&#8217;t allow anonymous checkouts, unfortunately).<br /> +This project will also host the official RedBook Gem, scheduled for the 1.0 release.</p> +<p style="text-align:center;"><strong><a href="http://www.assembla.com/spaces/files/redbook"><span class="caps">DOWNLOAD</span></a> | <a href="http://redbook.h3rald.com/"><span class="caps">MANUAL</span></a></strong></p>
A contents/articles/redbook-050-released.html

@@ -0,0 +1,46 @@

+----- +title: Announcement - RedBook v0.5.0 released +content-type: article +timestamp: 1197788820 +tags: opensource|productivity|redbook|ruby +----- +<p>This new beta release of RedBook introduces quite a few changes when it comes to configuration and setup. Here&#8217;s some highlights&#8230;h3. Regexp changes</p> +<p>It is now necessary to enter &#8220;proper&#8221; regular expressions for <code>:select</code>. Proper means between slashes, like the following:</p> +<ul> + <li>/Work Day/</li> + <li>/mail/i</li> +</ul> +<p>I changed this in order to support case-insensitive searches using the <code>i</code> switch. This makes queries much more powerful.</p> +<h3>Variables</h3> +<p>A new, interesting feature I decided to introduce in this release is <em>variables</em>. For now you define them inside your rbconfig.yml file, like this:</p> +<div class='text'><pre><code>:var_monday_morning: "monday at 8 am" + +:var_friday_evening: "friday at 8 pm" + +:var_week_report: ":select :duration :from :%monday_morning :to :%friday_evening"</code></pre></div><p>In this way, every time you type in :%week_report in RedBook, it will expand to: <code>:select :duration :from monday at 8 am :to friday at 8 pm</code>. By the way, completion is supported, so you&#8217;ll only have to type in something like <code>:%we</code> and hit <tab>.</p> +<p>It is possible to define variables as <code>:var_&lt;something&gt;</code> in the rbconfig.yml file and then used them inside RedBook as <code>:%&lt;something&gt;</code>.</p> +<h3>New Operations</h3> +<p>Five new operations have been added:</p> +<h4>:blank</h4> +<p>This will blank your current log after asking you if you really want to do so.</p> +<h4>:restore</h4> +<p>This operation will overwrite your current log with the last saved backup. Like with the <code>:blank</code> operation, you&#8217;re asked if you really want to proceed or not.</p> +<h4>:archive</h4> +<p>By typing <code>:archive</code>, the current log file will be archived to your <code>:archives_folder:</code> directory specified in the rbconfig.yml file (similarly, it is now possible to specify a :backups_folder: for your logs&#8217; backup files).</p> +<h4>:dataset</h4> +<p>A simple operation to display the messages inthe current dataset.</p> +<h4>:dump</h4> +<p>This operation will dump the output of the last <code>:select</code> operation to a text file. Useful for saving the average, total time and duration of a set of activities.</p> +<h3>Portable edition</h3> +<p>Some Windows users will definitely love this. I finally found an easy way to run RedBook confined within the current directory, by using a simple <code>start.bat</code> batch file to set the <span><span class="caps">INPUTRC</span></span> and <span><span class="caps">HOME</span></span> variables temporarily to the path to the .inputrc file and the directory of RedBook executable. This makes RedBook 100% portable and suitable to be used on <span class="caps">USB</span> sticks &amp;similar.</p> +<p style="text-align:center;"><strong><a href="http://redbook.googlecode.com/files/RedBook-0.5_Win32-portable.zip">Get RedBook Portable</a></strong></p> +<h3>New Development Page</h3> +<p>I decided to move the primary RedBook repository from <a href="http://www.assembla.org">Assembla</a> to Google Code. Why? Well, nothing wrong with Assembla per se, I still think it&#8217;s an excellent free service to host your public <em>and private</em> projects, but Google Code is faster and offers only the features I need:</p> +<ul> + <li>Public <span class="caps">SVN</span> repository access</li> + <li>Simple-to-use issue tracker</li> + <li>Very nicely developed downloads section, with download counts, and &#8220;normal&#8221; filenames.</li> +</ul> +<p>So here&#8217;s the new RedBook Development Home:</p> +<p style="text-align:center;"><strong><a href="http://code.google.com/p/redbook/">http://code.google.com/p/redbook/</a></strong></p> +<p>Additionally I also setup a <a href="http://groups.google.com/group/redbook-support/">RedBook Support Google Group</a>, so if you have any question concerning the program, you know where to go!</p>
A contents/articles/redbook.html

@@ -0,0 +1,118 @@

+----- +title: RedBook - A simple Ruby program for your daily logging needs +content-type: article +timestamp: 1191067500 +tags: ruby|productivity|software|tools|redbook +----- +<p>Logging your daily activities is important. If you don&#8217;t believe me you&#8217;d better check at least these three posts on LifeHacker, which feature different scripts and applications:</p> +<ul> + <li><a href="http://lifehacker.com/software/top/geek-to-live--quick+log-your-work-day-189772.php">QuickLogger</a></li> + <li><a href="http://lifehacker.com/software/windows/log-your-workday-from-the-system-tray-with-life-logger-285602.php">Life Logger</a></li> + <li><a href="http://lifehacker.com/software/featured-windows-download/log-your-workday-with-quicklogger-2-302932.php">QuickLogger 2</a></li> +</ul> +<p>I had a look at each one of them, and I believe they are quite useful, although I didn&#8217;t really find what I was looking for. Why? Well, for example:</p> +<ul> + <li>I don&#8217;t believe a <span class="caps">GUI</span> is necessary &#8212; you&#8217;d better off with just a shortcut key or command to run from Launchy or QuickSilver, that&#8217;s much faster.</li> + <li>They just log timestamped messages on a file, there&#8217;s no real way to search through them and display them except by using a test editor</li> + <li>They are Windows only &#8212; not that it matters for me, but others may not be happy about it.</li> +</ul> +<p>That&#8217;s why I thought I&#8217;d roll out my own: meet <a href="http://www.assembla.com/space/redbook">RedBook</a>.<br /> +Let me say it&#8217;s nothing fancy: I&#8217;m not a full-time programmer but I do like playing with Ruby during my lunch breaks at work, so that&#8217;s why RedBook is just a humble, tiny Ruby script. This automatically makes it cross-platform: you can install Ruby very easily on Linux &amp; alikes, Mac OS X and Windows. Furthermore, if you are on Windows and for some weird reason you don&#8217;t want to install Ruby, you can just try out the packed <span class="caps">EXE</span> file (made with RubyScript2Exe) &#8212; it&#8217;s about 2MB, but you won&#8217;t need anything else.</p> +<h3>How It Works</h3> +<p>The program uses two <span class="caps">YAML</span> files, one for configuration, which must reside in the same directory as redbook.rb (or redboo.exe) and one for the log itself, which you can place anywhere, provided that you edit the configuration file accordingly. For information on how to install RedBook and how to configure it, you can check the manual.html (powered by <a href="http://www.tiddlywiki.com">TiddlyWiki</a>) file provided with the program or <a href="http://redbook.h3rald.com">browse it online</a>.</p> +<p>When started, RedBook will load both the configuration file (config.yml) and <em>the whole log file</em> into memory &#8212; it&#8217;s not a big deal, considering that they are only text files after all. I did a test with a log of quite a few MBs, and it was fine.</p> +<p>You can then start input commands right away, following a few sample rules. RedBook has a (very) rudimentary parser which is able to detect keywords, i.e. alphabetic strings prepended with a colon. RedBook commands look like this:</p> +<ul> + <li><strong>&#58;log</strong> This message will be logger <strong>&#58;tags</strong> tag1 tag2</li> + <li><strong>&#58;select</strong> <strong>&#58;last</strong> 15 <strong>&#58;since</strong> January</li> + <li><strong>&#58;save</strong> /home/h3rald/backup.yml</li> +</ul> +<p>If everything goes OK, RedBook will reply with some sort of response, an acknowledgement, a list of messages, etc.</p> +<p>Simple.</p> +<p>Here&#8217;s basically what the program can do:</p> +<ul> + <li>Log any message to the main log file. Messages can be tagged with one or more tags and will be automatically timestamped.</li> + <li>Load/display a list of logged messages on the screen. It is possible to filter messages by specifying a time span, a string to search in the message text, or a list of tags.</li> + <li>Dump loaded messages to a <span class="caps">TXT</span>, <span class="caps">CSV</span> or <span class="caps">YAML</span> file (you can even backup your log saving it to another <span class="caps">YAML</span> file in this way).</li> + <li>Calculate the time elapsed between two or more tasks. Time will be displayed in years, months, weeks, days, hours, minutes and/or seconds as necessary.</li> +</ul> +<p>How? Here&#8217;s a short tutorial&#8230;</p> +<h3>A Quick RedBook Tutorial</h3> +<p>Let&#8217;s assume you are able to run RedBook on your system by now (if you can&#8217;t find some of the gems which are required for it, you can download them packed in a <span class="caps">ZIP</span> file from <a href="http://www.assembla.com/spaces/files/redbook">here</a>).</p> +<p>Here&#8217;s what happens when you start the program:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<del>-</del><br /> +RedBook v0.1 &#8211; Copyright &#169; 2007, Fabio Cevasco<br /> +<del>-</del><br /> + <span style="color:blue">&gt;&gt;</span> Loading config file&#8230;<br /> + <span style="color:green">&gt;&gt;</span> Config file loaded.<br /> + <span style="color:blue">&gt;&gt;</span> Loading log file&#8230;<br /> + <span style="color:green">&gt;&gt;</span> Log file loaded.<br /> + <span style="color:blue">&gt;&gt;</span> Ready.<br /> +<span style="color:red">Red</span>Book &gt;&gt;<br /> +</code><br /> +</span></p> +<p>Good. Let&#8217;s start logging something then. Just use the <strong>&#58;log</strong> keyword, followed by a message, and then you can also add the <strong>&#58;tags</strong> keyword followed by space-separated tags, like this:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;log My first message &#58;tags test<br /> + <span style="color:green">&gt;&gt;</span> Logged.<br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;log This is another message<br /> + <span style="color:green">&gt;&gt;</span> Logged.<br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;log This is another message &#58;tags test another_test<br /> + <span style="color:green">&gt;&gt;</span> Logged.<br /> +</span></p> +<p>Try waiting a few seconds between each message. These three messages will be appended to the log file. You could open it in an editor, but it&#8217;s normally easier to display them directly inside RedBook, like this:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;select<br /> + <span style="color:yellow">1</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:09:32 PM</span> My first message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><br /> + <span style="color:yellow">2</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:10:51 PM</span> This is another message<br /> + <span style="color:yellow">3</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:11:45 PM</span> This is another message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><span style="color:cyan">[</span><span style="color:yellow">another_test</span><span style="color:cyan">]</span><br /> + <span style="color:green">&gt;&gt;</span> 3 messages loaded.<br /> +</span></p> +<p>Easy. What if you have hundreds of messages? Well, the &#58;select operation can take an optional search string, or you can tell RedBook to load only those messages tagged with one or more specific tags, like this:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;select &#58;tags test<br /> + <span style="color:yellow">1</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:09:32 PM</span> My first message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><br /> + <span style="color:yellow">3</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:11:45 PM</span> This is another message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><span style="color:cyan">[</span><span style="color:yellow">another_test</span><span style="color:cyan">]</span><br /> + <span style="color:green">&gt;&gt;</span> 2 messages loaded.<br /> +</span></p> +<p>Or you can use the &#58;from and/or &#58;to keywords to specify a certain time frame, like this:</p> +<p>&#58;select &#58;tags test <strong>&#58;from ten minutes ago</strong></p> +<p>&#58;select <strong>&#58;from last week &#58;to 2 days ago</strong></p> +<p>RedBook includes a very nice &#8220;natural language date/time parser&#8221;, <a href="http://chronic.rubyforge.org/">Chronic</a> which is able to convert sentences like the following into Ruby Time objects:</p> +<ul> + <li>6 in the morning</li> + <li>friday 1pm</li> + <li>sat 7 in the evening</li> + <li>today</li> + <li>yesterday at 4:00</li> +</ul> +<p>It&#8217;s not perfect (and it&#8217;s in pre-alpha as well), but it does the job, for what I can see, and it makes it very easy and fast to specify timeframes.</p> +<p>After executing a &#58;select command, two other operations can be performed on the loaded messages: <strong>&#58;calc</strong> and <strong>&#58;save</strong>.</p> +<p>&#58;calc calculates the exact amount of time elapsed between two or more tasks. Do you remember the numbers on the far left of each message? Think them as temporary IDs for the actual messages, and you can use them to select specific tasks when executing the &#58;calc operation:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;calc 1 3<br /> + <span style="color:yellow">1</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:09:32 PM</span> My first message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><br /> + <del>-</del> 2 minutes and 13 seconds.<br /> + <span style="color:yellow">3</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:11:45 PM</span> This is another message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><span style="color:cyan">[</span><span style="color:yellow">another_test</span><span style="color:cyan">]</span><br /> +</span></p> +<p>Similarly, if no IDs are specified, &#58;calc calculates the time difference between each message and the previous:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;calc<br /> + <span style="color:yellow">1</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:09:32 PM</span> My first message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><br /> <br /> + <del>-</del> 1 minute and 19 seconds.<br /> <br /> + <span style="color:yellow">2</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:10:51 PM</span> This is another message<br /> <br /> + <del>-</del> 54 seconds.<br /> <br /> + <span style="color:yellow">3</span> <span style="color:blue">Sat Sep 29 2007 &#8211; 09:11:45 PM</span> This is another message <span style="color:cyan">[</span><span style="color:yellow">test</span><span style="color:cyan">]</span><span style="color:cyan">[</span><span style="color:yellow">another_test</span><span style="color:cyan">]</span><br /> + </span></p> +<p>Finally, you can save loaded messages to a <span class="caps">TXT</span>, <span class="caps">YAML</span> or <span class="caps">CSV</span> file, as follows:</p> +<p><span style="font-family: 'Bitstream Vera Sans Mono', Monaco, 'Courier New'; font-size: 10px"><br /> +<span style="color:red">Red</span>Book &gt;&gt; &#58;save log.txt<br /> + <span style="color:blue">&gt;&gt;</span> Saving&#8230;<br /> + <span style="color:green">&gt;&gt;</span> Saved dataset to &#8220;log.txt&#8221;<br /> +</span><br /> +h<br /> +If you want to backup your log, you can load all messages and then save them to a <span class="caps">YAML</span> file. Maybe in this case you want to append the <strong>&#58;silent</strong> keyword to the &#58;select command, so that messages won&#8217;t be displayed on the screen.</p> +<h3>Conclusion</h3> +<p>RedBook is just a simple program: it suits my needs for now, but of course there&#8217;s roo for improvement. If you have some useful suggestions, or you want to contribute in some way, feel free to contact me!</p> +<p style="text-align:center;"><a href="http://redbook.h3rald.com">Home Page</a> | <a href="http://code.google.com/p/redbook/">Development</a> | <a href="http://code.google.com/p/redbook/downloads/list">Download</a></p>
A contents/articles/refactoring-ruby-edition-review.html

@@ -0,0 +1,51 @@

+----- +title: Book Review: Refactoring - Ruby Edition +content-type: article +timestamp: 1264171236 +tags: ruby|books|review +----- +<p>Refactoring, like testing, is an activity that should be very familiar to all programmers, especially Rubyists. Actually, programs written in Ruby don&#8217;t need as many refactorings as, say, Java programs. However Rubyists are traditionally more <span class="caps">TDD</span> oriented and they like writing clear and elegant code.</p> +<p><a href="http://www.informit.com/store/product.aspx?isbn=0321603508">Refactoring: Ruby Edition</a> is actually a rewrite of the more revolutionary &#8212; at the time &#8212; <a href="http://www.informit.com/store/product.aspx?isbn=0201485672">Refactoring: Improving the Design of Existing Code</a>, written by Martin Fowler &amp; others to teach Java programmers about refactoring. Jay Fields and others decided to <em>port</em> this historical title to Ruby to fill a gap: there was no authoritative book about refactoring for this language, so what&#8217;s better than translating the Bible on the subject?</p> +<p>If you already own the Java book you shouldn&#8217;t buy this one. This is not my personal opinion (I never read the original), it&#8217;s actually written in the Preface of the book itself. I really like honest authors, and luckily this seems to have become a trend, lately: programmers don&#8217;t like reading bullshit after all. By the authors&#8217; own admission, this book contains roughly the same material and the same examples of the original Java book, plus some slightly more Ruby-specific content.</p> +<h3>Getting started</h3> +<p style="float:right;"><img src="/img/pictures/refactoring-ruby-ed.jpg" alt="" /></p> +<p>The first chapter, <em>Refactoring, a first example</em>, is not a first chapter. Well, it is in a literal sense, but it doesn&#8217;t look like one: no theory, no padding, you&#8217;re immediately thrown in the middle of the battle, dealing with a small program in desperate need of refactoring. It literally contains quite a lot of code: the same program is rewritten over and over with changes in bold to teach you what refactoring means. The most intimidating thing is reading names of refactoring techniques capitalized and used in a natural way, like if the reader was supposed to know them already. In all fairness though, they are self-explanatory most of the time, e.g. <em>Replace Array with Object</em>.</p> +<p>What makes this chapter even more unusual is the clever usage of white space: <em>before</em> and <em>after</em> code snippets are shown on separate page, which makes it much more immediate to see the changes in code (but it won&#8217;t work very well if you bought the ebook instead of the hardback).</p> +<p>By contrast, the second chapter <em>Principles in Refactoring</em> is all about theory: it should have been the first chapter, but it&#8217;s better this way. Here you&#8217;ll learn the basics: a bit of history, when to refactor and when not to, and so on. I bet it was taken almost verbatim from the Java book; see for example: <em>&#8220;[&#8230;] If your building APIs for outsid consumption, as <strong>Sun</strong> does [&#8230;]&#8221;</em>.</p> +<p>Chapter 3, <em>Bad Smells in Code</em>, is probably the most important and useful chapter in the entire book. It&#8217;s somethig you should read over and over until you can spot a code smell right after coding.</p> +<blockquote> +<p>&#8220;You should use this chapter and the table on the inside back cover as a way to give you inspiration whn you&#8217;re not sure what refactorings to do.&#8221;</p> +</blockquote> +<p>Precisely what you have to do. Except that there is no table on the inside back cover, so I guess <a href="http://docs.google.com/viewer?url=http://www.industriallogic.com/papers/smellstorefactorings.pdf">this one</a> will have to do. Pity.</p> +<p>Chapter 4, <em>Building Tests</em>, is the usual, compulsory chapter about unit testing, i.e. the usual intro to Test::Unit. As I said, it&#8217;s essential for the book to make sense, but you can safely skip it if you know how to test already.</p> +<p>Finally, chapter 5 (<em>Toward a Catalog of Refactoring</em>) is a 2.5 page intro to the bulk of the book, nothing more than glue to ease the transition. I would have removed it completely, but that&#8217;s because I&#8217;m a merciless technical writer I guess.</p> +<h3>Diving in</h3> +<p>From chapter 6 onwards, specific refactoring techniques are described. Each chapter starts with a brief overview of the following sections (which should have been a list, but I&#8217;m just being pedantic now), so you know what to expect.</p> +<p>Each technique described has a very meaningful and immediate name that reflects its purpose, like Extract Method or Split Temporary Variable. A code example introduces the code smell and the proposed refactoring, followed by a <em>Mechanics</em> section with a list of actions to perform and an explanatory <em>Motivation</em> section.</p> +<p>Tipically, each refactoring has its own, self-contained code snippets. Depending on the complexity of the refactoring technique examined, the authors may spend half to five or six pages just to show all code iterations to get to the result. When things get too complicated, <span class="caps">UML</span> diagrams are used to make the technique easier to understand, but only when it&#8217;s strictly necessary.</p> +<p>Even if the original techniques were though for Java, the authors (in particlar Jay Fields, I guess) do a great job making sure that the Ruby code doensn&#8217;t look like Java code in disguise: the result of the refactoring always follows Ruby&#8217;s philosophy and idioms. I particularly liked the following:</p> +<ul> + <li>Replace Dynamic Receptor with Dynamic Method Definition (Chapter 6), a nice example of metaprogramming.</li> + <li>Decompose Conditional/Recompose Conditional (Chapter 9), very useful and very common</li> + <li>Replace Nested Conditional with Guard Clause (Chapter 9), another way to deal with a very common problem with conditionals</li> + <li>Extract Module (Chapter 11), very Rubyesque way to tidy up busy classes</li> +</ul> +<p>This doesn&#8217;t mean that <em>every</em> refactoring described in the book is a programmer&#8217;s epiphany, some of the techniques are indeed pretty obvious and some portion of code in need of refactoring indeed smell very, very bad! E.g.:</p> +<ul> + <li>Inline Class (Chapter 7): Who on Earth would ever create a class containing a single method returning a telephone number?</li> + <li>Replace Magic Number with Symbolic Constant (Chapter 8): Why would you use integers for constants? Didn&#8217;t Matz give us Symbols to avoid just that?</li> +</ul> +<h3>The big picture</h3> +<p>By the end of chapter 11 you should be familiar with nearly all the best possible way to get rid of code smells. That&#8217;s all good, but what happens if <em>the entire program</em> stinks? Chapter 12 (<em>Big Refactorings</em>) claims to have some answers to some common pitfalls. The techniques defined in this chapter are by no means sufficient to solve all problems caused by bad design, but they can help especially to rewrite legacy code, or programs developed by Ruby newbies:</p> +<ul> + <li>Tease Apart Inheritance</li> + <li>Convert procedural design to objects</li> + <li>Separate domain from presentation</li> + <li>Extract hierarchy</li> +</ul> +<p>They are basically all about reducing bloat and unnecessary complexity, and &#8212; to me, that is &#8212; they all sounded pretty obvious. <em>Of course</em> I&#8217;m going to separate domain from presentation! Didn&#8217;t Rails teach us anything at all? I must say I was somehow disappointed by this chapter. I was going to bet there was something slightly more advanced, maybe something about replacing traditional object instantiation with an internal <span class="caps">DSL</span>? Nope, sorry.</p> +<p>Chapter 13, on the other hand, is an excellent conclusion to the book: it really helps the reader to understand when to refactor and how to do so, depending on the situation.</p> +<h3>Conclusion</h3> +<p>This and <a href="http://www.h3rald.com/articles/design-patterns-in-ruby-review/">Design Patterns in Ruby</a> are now my favorite Ruby books. I believe they complete each other: Russ Olsen&#8217;s book is more about designing your programs properly from the start, while <em>Refactoring: Ruby Edition</em> can help to make things better at a lower level. <br /> +Ruby developers don&#8217;t need to refactor as much as Java developers, mainly because of Ruby itself, nevertheless, this is an excellent read for anyone who wants to get serious about programming in Ruby, and is determined to do so by following the Ruby Way.</p> +<p>I&#8217;ll definitely keep this book near me when I&#8217;m coding: I do believe it is much more helpful when you start using it as a reference, when you already read about all the refactoring techniques and want to put them in practice. Also, I&#8217;ll probably re-read chapter 3 on a regular basis, to get accustomed to recognize code smells, and deal with them accordingly.</p>
A contents/articles/reflections-on-management.html

@@ -0,0 +1,115 @@

+----- +title: Book Review: Reflections on Management +content-type: article +subtitle: The key to becoming a true leader +timestamp: 1296942685 +tags: review|books|software +pdf: true +----- + + <section class="section"> +<p>When I was offered to review this book, I was a bit skeptical: a book on <em>management</em>? I normally read and review books on programming and software development methodologies. However, I work as a Documentation Technical Leader, and while I don&#8217;t technically <em>manage</em> a whole team yet (damn economic crisis!), someday I may end up doing just that, so I gave <a href="http://www.informit.com/store/product.aspx?isbn=032171153X">Reflections on Management</a> a try.</p> +<p><em>It&#8217;s short, after all, I&#8217;ll probably read it in a couple of weeks and move on</em> &mdash; I thought. Well, beware of short books: I thought exactly the same thing when I picked up <a href="http://en.wikipedia.org/wiki/The_Elements_of_Style">The Elements of Style</a>, and it still follows me around everywhere, so that I can re-read bits of it whenever I need to.</p> +<p>This short but dense masterpiece by Watts S. Humphrey and William R. Thomas is one those books you always end up carrying around in your pocket (or stored in your favorite ebook reader). It&#8217;s a short but very dense collection of tips and tricks to succeed as a leader and a manager &mdash; of <em>anything</em>: <q>Your Software Projects, Your Teams, Your Boss, and Yourself</q>, as the book subtitle says. It doesn&#8217;t &#8220;just&#8221; help forging great managers and leaders, it also explains, with practical examples and no-nonsense explanations, how to deal with those annoying people in suits who constantly keep asking you for impossible things&#8230;</p> + + + +<section class="section"> +<header><h1 id="h_1" class="toc">About Watts S. Humphrey</h1></header> +<p>Generally, I don&#8217;t bother writing anything about the authors in my reviews: you can easily find this kind of information online if you want to. I&#8217;ll make an exception in this case, you&#8217;ll understand why as you read along.</p> +<p><a href="http://www.sei.cmu.edu/watts/index.cfm?WT.ac=watts">Watts S. Humphrey</a> was a true legend in Software Engineering, he&#8217;s often referred to as <em>The Father of Software Quality</em>. He worked at <span class="caps">IBM</span> for 27 years and eventually became Vice President of Technical Development. In the 80s, he arrived at the <a href="http://www.sei.cmu.edu/">Software Engineering Institute (<span class="caps">SEI</span>)</a> where he developed some key development processes of our time: the Software Capability Maturity Model (<span class="caps">CMM</span>), the Personal Software Process (<span class="caps">PSP</span>), and the Team Software Process (<span class="caps">TSP</span>). He received many awards, culminating with the <em>National Medal of Technology</em> in 2005.</p> +<p>He wrote several books focusing mainly on software development and managing software projects through his <span class="caps">PSP</span> and <span class="caps">TSP</span> methodologies. <em>Reflections on Management &mdash; How to Manage Your Software Projects, Your Teams, Your Boss, and Yourself</em> was the last book published while he was alive. <a href="http://www.informit.com/title/0321624505">Leadership, Teamwork, and Trust: Building a Competitive Software Capability</a>, co-authored with James W. Over, was published posthumously.</p> +<p>Watts S. Humphrey <a href="http://www.sei.cmu.edu/newsitems/Humphrey_obituary.cfm">died</a> on October 28, 2010.</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Structure and Organization</h1></header> +<p>In many ways, <em>Reflections on Management</em> can be seen as the <em>summa</em> of Humphrey&#8217;s work on <span class="caps">PSP</span>, <span class="caps">TSP</span> and management of software projects, condensed in a very readable 288-page-book, co-written with <a href="http://www.sei.cmu.edu/about/people/wrt.cfm">William R. Thomas</a>, Senior Technical Writer and manager of SEI&#8217;s Technical Publications Team.</p> +<p><img src="/img/pictures/books/reflmgmt.jpg" style="float:right" /></p> +<p>I noticed the tech writer&#8217;s touch simply by flicking through the pages of the book when I first got it: its structure is impeccable.</p> +<p>Organized into four parts, totalling 8 chapters, an Epilogue and an Appendix, this book is a prime example of order and readability: pick any section title (just the title) of any section in any chapter, and you get a clear idea of their content and purpose, and a key principle of management. Examples? Sure:</p> +<ul> + <li>Chapter 8: Learning to Lead + <ul> + <li>8.1 How You Behave Affects Your Team</li> + <li>8.2 Leaders Set an Example for Their Teams</li> + <li>8.3 Learn to Avoid the Symptoms of Poor Leadership</li> + <li>[&#8230;]</li> + </ul></li> +</ul> +<p>If you print the Table of Contents alone you get a priceless cheat sheet on management and leadership. If you want slightly more detail, each chapter contains a summary table of all its sections, with a two-line summary of its contents. There are no subsections, only first-level sections, which make the book much easier to understand and &#8220;digest&#8221;.</p> +<p>You can read it all at once, then you should keep it readily available for consultation. It will take you only a few seconds to look through the contents and pick the most relevant section in a time of need.</p> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">Writing Style</h1></header> +<p>The book is very clear and simple to read, always. Each section is self-contained, and always aims to make a point, usually expressed right in its title. If I were to find a common pattern in most of the chapters of this book, it would be the following:</p> +<ol> + <li>Identification of the problem &ndash; a particular situation or aspect is described in a way that problems are self-esplanatory.</li> + <li>Labeling and classification &ndash; the situation is analized and often a set of causes are presented to the reader, often labeled or classified.</li> + <li>List of possible solutions &ndash; a list possible solutions is presented to the reader, often as a definition list.</li> + <li>Solution details &ndash; more details are provided to prove the effectiveness of the solution, often including personal anecdotes.</li> +</ol> +<p>By doing so, the author makes sure that everything he writes about can be easily understood and accepted, because proven by personal experience.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Contents</h1></header> +<section class="section"> +<header><h1 id="h_5" class="toc">Part I: Managing Your Projects</h1></header> +<p>The book starts with a general introduction on Software Quality. If you are new to the subject (and you <em>shouldn&#8217;t</em> be), this is probably one of the best and to-the-point overviews you&#8217;ll ever find, written by the man who almost came up with the concept.</p> +<p>The second chapter is about planning. Actually, the whole book is about planning at different levels, so no, you should not dismiss this part. <em>Good</em> plans are important, and they are your best weapon against management, if you excuse the expression.</p> +<p>Someone may object that if you&#8217;re working in an <em>agile</em> team, you shouldn&#8217;t spend a lot of energy in long-term planning, but rather focus on dealing with frequent requirement changes and deliver often and regularly. While this can be true, planning is still important: you won&#8217;t produce any rigorous schedule or design documents, but you still have to be able to provide accurate estimates and very often!</p> + +</section> + + <section class="section"> +<header><h1 id="h_6" class="toc">Part II: Managing Your Teams</h1></header> +<p>The second part of the book focuses the <em>Team</em>, the people in it, their roles, their responsability and its leadership. Chapter 3 introduces Tom DeMarco&#8217;s concept of <em>Jelled Team</em>, i.e. a team that is more than the sum of its parts, and is characterized by cohesion, challenging goals, frequent feedback, a common working framework and good communication.</p> +<p>The Holy Grail. The dream of every team leader and its members. The good news is, it can be done. Any team can jell, and teams <em>like to jell</em> furthermore, if the proper conditions exist, and the three chapter in this third part will teach you everything from being a good team member to becoming a great team leader.</p> +<p>In many ways, this was my favorite part of the book. It&#8217;s amazing how a lifetime of experience is distilled in just a few pages. Chapter 5 (Leading and Coaching your Teams) is very, very inspiring and very helpful in understanding how to become a good team leader, how to motivate and involve people, and how to manage them rationally.</p> +<p>The story of Humphrey&#8217;s high school wrestling coach Umbach is a classic example of a truly dedicated, inspiring, and successful leader:</p> + <blockquote>&#8220;The workouts were so tough that the matches seemed easy. By the end of the year, several of us were undefeated, the team took the 13-state championship, and we were campus heroes. All of this from a ragtag bunch of inexperienced recruits. It was Coach Umbach who made the team.<br /> +<br /> +Our coach&#8217;s dedication, commitment and energy were amazing, but what I found most inspiring was that he really cared about how each of us did. I have always remembered how he made a small band of raw recruits into a championship team and how he fostered the kind of cohesive team spirit that made losing simply unthinkable.&quot;</blockquote> + +</section> + + <section class="section"> +<header><h1 id="h_7" class="toc">Part III: Managing Your Boss</h1></header> +<p>The third part consists of a single chapter: <em>Negotiation your projects and defending your plans</em>. It doesn&#8217;t matter if you want to pretend otherwise: as soon as you become a team leader and you have to deal with management, you&#8217;ll have to deal with complex internal politics.</p> +<p>This chapter is about learing to be pragmatically diplomatic and deal with management. It&#8217;s about creating good plans that can survive confrontation with your managers, no matter what their demands are.</p> +<p>There&#8217;s no silver bullet: I appreciated the honesty of the author when providing solutions. Section 6.6 (What to do when a project is doomed) is an example of this:</p> +<blockquote> +<p>You&#8217;re on a project and it&#8217;s headeing south. While everubody is trying their hardest, and you&#8217;re doing your level best to help, you can feel it in your bones: the project is doomed to fail. What can you do? You have three choices.</p> +<ol> + <li>Keep plugging away and hope things will improve.</li> + <li>Look for another job.</li> + <li>Try to fix the problems.</li> +</ol> +</blockquote> +<p>That&#8217;s right. Look for another job. That almost made me laugh, but it made me understand that in some extreme situation that may just be the best solution.</p> + +</section> + + <section class="section"> +<header><h1 id="h_8" class="toc">Part IV: Managing Yourself</h1></header> +<p>The last part of the book is about you. I would probably have moved it earlier on in the book, maybe right after the first part, but it serves as a good ending for the book. Chapter 7 (Taking Control of Your Work) is a must-read for anyone. It teaches you how to manage your working life, from time management (The 18 Hour Work Week) to psychological aspects (What Do You Want From Life?).</p> +<p>Chapter 8 (Learning to Lead), is a nice writeup on the essence of Leadership, and what it measn to be a good leader rather than a manager. A great read.</p> + +</section> + +</section> +<section class="section"> +<header><h1 id="h_9" class="toc">Final Thoughts</h1></header> +<p>Reading certain sections of this book felt a little bit weird at first. <span class="caps">TSP</span>, <span class="caps">PSP</span>, heavy planning and documents&#8230; are they still relevant in a &#8220;real world&#8221; now dominated by <em>agile</em> practices, Scrum, Kanban and similar? Do you really have to provide detailed plans and documentation to convince management?</p> +<ul> + <li>You may not have detailed design documents, but you still have user stories.</li> + <li>You may not be required to plan ahead of 6 months, but you still have to plan frequently and provide accurate estimates.</li> + <li>You may not be required to trace and track everything you do, but at the very least you have to monitor your <em>velocity</em> and produce <em>burndown charts</em>.</li> +</ul> +<p>Yes, you read &#8220;<span class="caps">PSP</span>&#8221; and &#8220;<span class="caps">TSP</span>&#8221; everywhere in the book, but they are just labels. The methodologies and processes may change, but <em>the principles</em> will always remain true. This book is about understanding the very essence of management and leadership, and it will remain an invaluable resource for anyone who wants to build a career in the Software Industry.</p> + +</section> + +</section>
A contents/articles/review-services.html

@@ -0,0 +1,14 @@

+----- +title: Review Services +content-type: article +timestamp: 1197631440 +tags: review|website|personal|tools|books +----- +<p>When it comes to software, I definitely like to try out new things. My collegues takes the piss out of me because every <del>week</del> day I come up with &#8220;some new tool they <em>have</em> to start using&#8221; and so on.<br /> +As a matter of fact, I like reviewing software as well. I enjoy writing and analyzing new things, evaluating all the new possibilities they may offer, and I also tend to have a rather critical eye for what doesn&#8217;t <em>feel</em> right. I&#8217;ll use a tool for months but still try out new ones which claim to do the same thing — but better — as they come out.<br /> +Unfortunately — or fortunately, depends how you look at it — when it comes to software, there are very few <em>silver bullets</em>, and things keep changing: that&#8217;s the way it is and the way it will be.</p> +<p>I must try to write up a page (and ideally update it regularly, that&#8217;s the hard part) listing all the tools I use, at some point&#8230; but at any rate, if you coded some new app you think kicks ass or you found a hidden jewel in the labyrinth of freeware, just let me know: I&#8217;ll definitely try it out, and if it&#8217;s worth a post I&#8217;ll blog about it.</p> +<p><strong>The same applies to books</strong>, actually, as I like reading, especially those which are related to Ruby or programming, nowadays.</p> +<p>The cost of such reviews and articles? Depends! Certainly I wouldn&#8217;t mind donations or some compensation of some form, especially from publishers or software companies. It may be money, books, software or even nothing: it really depends on what I have to review.<br /> +Please be aware that I am <strong>not</strong> doing this full time, and I already have a job and a fiancée to look after, but I&#8217;ll do my best to publish as much as I can on my site or even elsewhere elsewhere [Note: on e-zines, magazines &amp; similar, not on your brother&#8217;s friend&#8217;s mother-in-law&#8217;s crappy blog!].</p> +<p>For any inquiries, contact me (<strong>h3rald [—at—] h3rald.com</strong>).</p>
A contents/articles/ror-and-cakephp.html

@@ -0,0 +1,9 @@

+----- +title: Ruby on Rails & CakePHP +content-type: article +timestamp: 1152258748 +tags: cakephp|rails|tutorial +----- +<p>This article is an attempt to port a famous Ruby on Rails tutorial to <span class="caps">PHP</span> using an emerging <span class="caps">PHP</span> <span class="caps">MVC</span> framework, CakePHP. CakePHP was inspired by Rails&#8217; philosophy of Rapid Application Development. It implements a lot of the features and concepts that made Ruby on Rails popular in a very short time. Although Ruby&#8217;s syntax and way of doing things is known to be much more elegant than other programming languages, there is yet hope for <span class="caps">PHP</span> to get more organized and effi cient. This tutorial will follow its Rails counterpart step-by-step, covering the essential steps to create a simple, yet fully functional, web application.<br /> +Register on the <a href="http://www.php-mag.net/magphpde/psecom,id,20,archive,2,noeid,20,.html">International <span class="caps">PHP</span> Magazine</a> to read the full article.<br /> +<img src="/img/thumbs/phpmag0706.gif" alt="" /></p>
A contents/articles/ruby-compendium-020.html

@@ -0,0 +1,16 @@

+----- +title: Ruby Compendium v0.2.0 released +content-type: article +subtitle: With up-to-date Ruby implementations, more resources, and online version +timestamp: 1312732912 +tags: ruby-compendium|books|ruby +----- + + <section class="section"> +<p>The Ruby Compendium has been updated, and it now lists the most up-to-date versions of various Ruby implementatios, even more web sites, books, podcasts, and Rubyists. In addition to the <span class="caps">PDF</span> version, the book can now be read online <a href="/ruby-compendium/book/">here on H3RALD.com</a>.</p> +<p>Overall, this is a relatively minor update; however, I felt it was a good time to release it to keep the book up-to-date.</p> + +<p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>, and you can help improving it! It was written using my very own <a href="http://www.h3rald.com/glyph">Glyph Framework</a>, and the entire source code is available on <a href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> +<div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download <span class="caps">PDF</span></a> | <a href="http://www.h3rald.com/ruby-compendium/book">Read Online</a></div> + +</section>
A contents/articles/ruby-lang-italian.html

@@ -0,0 +1,66 @@

+----- +title: Italian translation of Ruby-Lang.org finally available! +content-type: article +timestamp: 1226756880 +tags: ruby +----- +<p><a href="#italian-version">[Vai alla versione italiana]</a></p> +<p>I am very pleased to announce that the official site of the Ruby programming language is now available in Italian:</p> +<p><strong><a href="www.ruby-lang.org/it/">www.ruby-lang.org/it/</a></strong></p> +<h3>In the beginning&#8230;</h3> +<p>It all started in July 2007, when after a closer look at the site I discovered that apparently it was not available in Italian! How could it be? There were a lot of translations available, such as French, Spanish, Japanese, Korean&#8230; but no Italian. <br /> +I immediately emailed the webmaster and within a few hours <a href="http://curthibbs.wordpress.com/">Curt Hibbs</a> (hell yes, <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">that</a> Curt Hibbs!) mailed me the instructions to get me started:</p> +<blockquote> +<p>&#8220;[&#8230;] Providing a translation of the Ruby web site would have two parts: 1) the initial translation of the current content, and 2) the ongoing maintenance of the Italian version as new content and news items are added.</p> +<p>This effort will be much more sustainable over the long term if you put together a team of at least three people who would commit to translating and maintaining the site. [&#8230;]&quot;</p> +</blockquote> +<p>&#8230;Why <em>three</em> people to translate &#8220;a few pages&#8221;? That&#8217;s what bugged me at the time: it honestly seemed just a few days work for one person at most. Later on I understood why.<br /> +I wasn&#8217;t the first to volunteer for the Italian translation, actually: <strong><a href="http://www.raulparolari.com">Raul Parolari</a></strong> was indeed the first, but he was waiting for another two team members to start, of course.</p> +<p>We eventually persuaded Curt that <em>we could handle it</em> even without a third team member, so we started right away. As a matter of fact, we did manage to translate a lot of stuff within the first week.</p> +<h3>Translating is easy, right?</h3> +<p>Translating feels easy when you are mother tongue in the language you&#8217;re translating into (Italian), and you know fairly well the language you&#8217;re translating from (English): it can&#8217;t possibly hard, right? Nah, a piece of cake. <br /> +Most of the time it&#8217;s fairly easy and fast, too, but things can get a bit more complicated when you stumble upon idioms and tech jargon.</p> +<p>Personlly, I never surf the web in Italian. That&#8217;s a personal choice (I love the English language to an extreme extent), and I&#8217;ve learnt to live with it no matter what people think. I admit that it was hard for me to translate some of the things on the Ruby web site: not because they were hard for me to understand, but because in some cases a translation would simply not do justice to the original text.</p> +<p>Some of the text may sound weird in Italian, especially in the code examples. In the end we choose to translate every bit of code, e.g. <code>puts sentence</code> became <code>puts frase</code> and other equally horrid things. Sometimes I wonder whether we should have just left the original code as it was, but we wanted to make things easier for people who don&#8217;t speak much English at all.</p> +<h3>Stagnation</h3> +<p>Things went quite after the initial excitement, I admit. Both Raul and me more or less stopped translating as time went on, and I am truly and deeply sorry for that. You know how it is: you start off really enthusiastic and then you lose interest, you get involved in other projects, work, family, etc. etc.</p> +<p><strong><a href="http://www.lipsiasoft.com/">Davide D&#8217;Agostino</a></strong> came to our rescue in December 2007. He&#8217;s arguably the &#8220;most Italian&#8221; of the group and he came out with some interesting solutions for some particularly difficult bits of the translation. <br /> +Believe it or not, the 80% of the site was translated by the beginning of 2008: only a few bits were left, but then&#8230; erhm, things went quiet again. I put the translation of the site on my todo list, and I knew it was there all along: &#8220;Oh, yes, I should have a look at Ruby-Lang.org again&#8221; I repeated to myself from time to time.</p> +<p>About two weeks ago I got so pissed off with myself about this that I decided to finally &#8220;get things done&#8221; and translate the few remaining bits, reviewed the lot, got rid of some rough edges, did some minor proofreading and here it is, ready to be browsed by Italians, finally.</p> +<p>The most ironic thing? It took literally a few hours of &#8220;work&#8221; to sort things out&#8230; but nearly a year to finally find the will to do it.</p> +<h3>What now?</h3> +<p>Now the site is live and we&#8217;ll keep it up-to-date from now on. I sincerely hope it will help bringing more and more Italians closer to the Ruby world. I&#8217;m sure there are plenty of people out there who would have done a much better job than we did, and definitely in a much shorter timeframe&#8230; but hey, we finally did it, after all!</p> +<p>I would like to thank again <strong><a href="http://www.raulparolari.com">Raul Parolari</a></strong> and <strong><a href="http://www.lipsiasoft.com/">Davide D&#8217;Agostino</a></strong> for helping translating the site: I now finally understand why Curt wanted three people on the translation team!</p> +<p>One last thing: if you find any mistake (and there are plenty, I&#8217;m sure) or if you have any suggestion to improve the current translation, don&#8217;t hesitate to <a href="/about/">contact me</a>: I&#8217;ll try to fix things as soon as possible.</p> +<p>Enjoy Ruby, now finally <a href="http://www.ruby-lang.org/it/">in Italian</a> too!</p> +<hr /> +<p><a name="italian-version"></a></p> +<h2>&Egrave; finalmente disponibile la traduzione italiana di Ruby-Lang.org</h2> +<p>Sono veramente contento di annunciare che il sito ufficiale del linguaggio di programmazione Ruby è ora disponibile anche in Italiano:</p> +<p><strong><a href="www.ruby-lang.org/it/">www.ruby-lang.org/it/</a></strong></p> +<h3>In principio&#8230;</h3> +<p>Tutto incominciò nel luglio del 2007, quando dopo un&#8217;occhiata più da vicino al sito mi accorsi che apparentemente non era disponibile in italiano! Com&#8217;era possibile? Era già tradotto in molte lingue tra cui francese, spagnolo, giapponese, coreano&#8230; ma niente italiano.</p> +<p>Mandai immediatamente un&#8217;email al webmaster, e in poche ore <a href="http://curthibbs.wordpress.com/">Curt Hibbs</a> (già, proprio <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">quel</a> Curt Hibbs!) mi inviò le istruzioni su come iniziare a tradurre:</p> +<blockquote> +<p>&#8220;[&#8230;] La traduzione del sito di Ruby è articolata in due parti: 1) la traduzione iniziale degli attuali contenuti e 2) il continuo aggiornamento della versione italiana ogniqualvolta vengono create nuove pagine.</p> +<p>Questo sforzo è molto più sostenibile nel lungo termine se riesci a mettere insieme una squadra di almeno tre persone dedite a tradurre e ad aggiornare il sito. [&#8230;]&quot;</p> +</blockquote> +<p>&#8230;Perchè <em>tre</em> persone per tradurre &#8220;solo poche pagine&#8221;? Questo quello che mi chiesi in quel momento: sembrava veramente essere una questione di pochi giorni, e sicuramente una persona sarebbe stata più che sufficiente. Successivamente capii perchè tre persone erano necessarie.</p> +<p>Comunque, non ero il primo ad offrirmi volontario per la traduzione italiana: <strong><a href="http://www.raulparolari.com">Raul Parolari</a></strong> si era già fatto avanti, ma stava ancora aspettando altre due persone per poter iniziare, ovviamente.</p> +<p>Alla fine, riuscimmo comunque a persuadere Curt che <em>ce la potevamo fare</em>, anche senza una tersa persona ad aiutarci. Incominciammo a tradurre quindi di buona lena, e di fatto riuscimmo a tradurre molto durante la prima settimana.</p> +<h3>Tradurre è facile, non è così?</h3> +<p>Tradurre dall&#8217;inglese all&#8217;italiano sembra facile se sei madrelingua e conosci bene l&#8217;inglese: non può essere difficile, giusto? Facilissimo, ovvio. <br /> +Per la maggior parte è così, di fatto: facile e veloce. Ma le cose tendono a complicarsi un pochettino quando hai a che fare con modi di dire e linguaggio un po&#8217; più tecnico.</p> +<p>Personalmente, non vado mai su siti italiani. &Egrave; una mia scelta personale (mi piace tantissimo la lingua inglese), e ho imparato a non fare caso a quello che gli altri pensano di questa scelta. Devo ammettere che è stato difficile per me tradurre alcune parti del sito di Ruby: non perchè fossero difficili da capire, ma perchè in qualche caso una traduzione non è semplicemente in grado di rendere giustizia al testo originale.</p> +<p>Alcuni pezzi della traduzione, per questa ragione, potrebbero suonare un po&#8217; strani alle orecchie di Italiani d.o.c., specialmente per quanto riguarda gli esempi di codice. Alla fine abbiamo deciso di tradurre la maggior parte del codice (ove possibile, ovviamente): <code>puts sentence</code> è quindi diventato <code>puts frase</code>, e altri simili orrori. Qualche volta mi chiedo se non avessimo fatto meglio a lasciare il codice originale così com&#8217;era, ma d&#8217;altra parta abbiamo cercato di fare il possibile per rendere le cose più semplici anche per persone che non sanno una parola di inglese.</p> +<h3>Stagnazione</h3> +<p>Col tempo, l&#8217;iniziale interesse nella traduzione è andato affievolendosi, lo ammetto. Sia io che Raul abbiamo praticamente interrotto la traduzione ad un certo punto, e mi dispiace veramente tanto. Sapete com&#8217;è: incominci entusiasta e poi piano piano inizi a perdere interesse, ti dedichi ad altri progetti, il lavoro, la famiglia, eccetera.</p> +<p><strong><a href="http://www.lipsiasoft.com/">Davide D&#8217;Agostino</a></strong> venne in nostro aiuto nel Dicembre 2007. Penso che sia quello &#8220;più italiano&#8221; del gruppo, tanto da essere in grado di proporre soluzioni interessanti per alcuni pezzi particolarmente difficili da tradurre. Che ci crediate oppure no, l&#8217;80% del sito era pronto e tradotto all&#8217;inizio del 2008: rimanevano solamente alcune piccole parti ancora da tradurre, e poi&#8230; beh, abbiamo un po&#8217; lasciato perdere, di nuovo. La traduzione del sito era tra le mie cose da fare, c&#8217;è sempre stata: &#8220;Sì, certo, <em>dovrei</em> dare un&#8217;occhiata a Ruby-Lang.org&#8221;&#8230; mi sono ripetuto questa frase periodicamente, senza di fatto fare nulla.</p> +<p>Poi, finalmente, due settimane fa mi sono deciso a finire il lavoro traducendo le poche pagine rimaste, revisionando il tutto, facendo un po&#8217; di pulizie qua e là, ed ecco qui: il sito può ora essere visitato da tutti gli italiani che lo desiderano.</p> +<p>La cosa più ironica? Sono bastate solo poche oro di &#8220;lavoro&#8221; per mettere le cose a posto, ma quasi un anno per trovare finalmente la forza di volontà per farlo&#8230;</p> +<h3>E adesso?</h3> +<p>Ora il sito è accessibile e lo terremo aggiornato d&#8217;ora in avanti. <br /> +Spero sinceramente che possa contribuire ad avvicinare sempre più italiani al mondo di Ruby, anche se sono sicuro che ci sono moltissime altre persone là fuori che avrebbero fatto un lavoro più ben fatto del nostro, e sicuramente in tempi molto più brevi&#8230; ma dopotutto, alla fine ce l&#8217;abbiamo fatta, no?</p> +<p>Vorrei spendere ancora due parole per ringraziare nuovamente <strong><a href="http://www.raulparolari.com">Raul Parolari</a></strong> e <strong><a href="http://www.lipsiasoft.com/">Davide D&#8217;Agostino</a></strong> per avermi aiutato a tradurre questo sito. Finalmente ora capisco perchè Curt voleva tre persone nel gruppo di traduzione!</p> +<p>Un&#8217;ultima cosa: se qualcuno di voi trova un errore (e ce ne saranno molti, ne sono sicuro), o se ha un suggerimento per migliorare l&#8217;attuale traduzione, può <a href="/about/">contattarmi</a>: cercherò di correggere il sito quanto prima possibile.</p> +<p>E ora, divertitevi con Ruby, ora anche <a href="http://www.ruby-lang.org/it/">in italiano</a>!</p>
A contents/articles/server-packages.html

@@ -0,0 +1,7 @@

+----- +title: Easy-to-install server packages +content-type: article +timestamp: 1119989539 +tags: review|webdevelopment|php|databases +----- +The first and most obvious difference between, say, a C++ programmer and a PHP developer is that the PHP developer needs a server with PHP support up and running somewhere in order to "show" others that the application is working. This normally means that a PHP developer must either have remote access to a server, or have one set up on his machine. Installing and configuring a server can be tricky sometimes, especially if you want to configure it "properly", but in some cases - for Linux/BSD users mainly - there are some pre-configured servers you can download and install. <br /><br />I won't examine all these methods in this article, but I'll describe three alternatives for installing and run a webserver on windows in 10 minutes or less.<br /><br /><strong>Preliminary considerations</strong><br />Let's assume that you just want to have a server set up on your computer for <em>internal use</em> only, for testing purposes. That means that you wouldn't need to be concerned about "security" or similar issues - you just want to be able to run your PHP scripts and access your database(s) quickly and easily. <br /><br />As I said earlier, Linux users would probably opt for some package available for their favourite distros - they would only have to download and install an .rpm or .deb package for (presumably) Apache httpd, PHP and MySQL, and just use a basic configuration. There are other tools around which can help if you want to compile or configure Apache, but that is beyond the scope of this article.<br /><br />Let's just focus on Windows users, then. Normally they like things that are easy to install and can be configured in a few minutes <em>maximum</em> or not at all. Finally, let's assume that as a Windows user, you don't want to spend more money for a new operating system with a bundled server, like Windows 2003, because you can use <a href="http://www.apache.org">Apache</a> on Windows as well, for free. Having said this, I actually found 3 possible solutions that are handy for PHP (or Perl) developers who don't want to spend time learning how to configure a server. There are people like that, including myself to some extent.<br /><br /><br /><strong>WAMPserver</strong><br /><a href="http://www.wampserver.com">WAMP</a> stands for "Windows Apache MySQL PHP", and I must say that this product happens to be my choice. The current version, available at the time of writing, offers:<br /><br />- PHP 5.0.4<br />- Apache 1.3.33<br />- MySQL 4.1.10a<br />- phpMyadmin 2.6.1-pl3<br />- SQLitemanager 1.0.4<br /><br />This is basically a fully working PHP5 environment, with other tools like phpMyadmin to administer your MySQL database even more easily (more laziness!), and, if you're into the new functionalities of PHP5, it also comes with sqlitemanager, a php application similar to phpMyAdmin but for sqlite databases, which are supported by default in PHP5.<br />You download it, you start the installation program, and it's DONE. That's it. In 5 minutes you have your own little apache/php/mysql(ite) environment up and running and you can start showing off your sites to your friends and co-workers right away.<br /><br />The program also installs two services which can be run at startup, a little icon in the system tray to access all the tools and, of course, <a href="http://localhost">http://localhost</a> in your favourite browser.<br /><br />If all this is still not enough for you, and you want more things more easily, you can install addons to set up PHP4 (and seamlessly switch between the two with a single click!), Perl, Zend Accelerator, and so forth.<br /><br /><br /><strong>EasyPHP</strong><br />The second suite I will briefly describe is <a href="http://www.easyphp.org">EasyPHP</a>. This is a French project (like the previous one, actually), which offers PHP4, MySQL and Apache, plus phpMyAdmin to administer the MySQL databases. However, it doesn't offer PHP5 support yet (so it's not my favourite) and thus there's no sqlite support either.<br /><br />Apart from that, it works exactly like WAMP: you download it, you install it, and it's done. Services are installed and you have - again - your little icon on the system tray to access all its functions and tools. It works well, but it doesn't seem to have any add-ons available like WAMP does.<br /><br /><strong>XAMPP</strong><br />This is by far the most complete distribution of the three I am focusing on. This project is developed by <a href="http://www.apachefriends.org">Apache Friends</a> and has a lot of features and flavours. XAMPP currently includes:<br /><br />- Apache HTTPD 2.0.54<br />- MySQL 4.1.12<br />- PHP 5.0.4 + 4.3.11 + PEAR + Switch<br />- MiniPerl 5.8.6<br />- Openssl 0.9.7g<br />- PHPMyAdmin 2.6.2-pl1<br />- XAMPP Control Panel 1.0<br />- eAccelerator 0.9.3<br />- Webalizer 2.01-10<br />- Mercury Mail Transport System for Win32 and NetWare Systems v4.01a<br />- FileZilla FTP Server 0.9.8a<br />- SQLite 2.8.15<br />- ADODB 4.63<br />- Zend Optimizer 2.5.7<br />- XAMPP Security for Windows 98, 2000, XP<br /><br />Honestly, you can't ask for more! If by chance you want to run this suite on other platforms, there's a version for Mac OS X, Solaris, and even Linux.<br /><br />The installation method for XAMPP is slightly more difficult than the other suites - you actually have to download and unzip it in a folder of your choice. Then you're off and running.<br /><br />Unfortunately (or fortunately), there's no icon on the system tray, so you need to actually access <a href="http://localhost">http://localhost</a> to get a list of services and tools. It also doesn't come with sqlitemanager, but you can download it and install it in the documents folder (like I did).<br /><br />I actually use XAMPP - the "lite" edition, which is smaller and has less features - for my USB drive. Since it doesn't require any services to be installed in order to run, you can simply copy it onto a USB stick and run it from there!<br /><br /><strong>Conclusion</strong><br />I'm quite impressed by all of the server packages I reviewed; WAMP and XAMPP in particular. I can now carry around my websites and applications and instantly run them or show them to anyone who has a computer with a USB port.<br /><br />As I said in the beginning, these programs are NOT meant to be used in a production environment or to be accessed publicly, therefore, security is not a consideration here. In my opinion, they are simply excellent for testing purposes, and for now, that's what I need them for.<br />
A contents/articles/simply-on-rails-1-concepts-map.html

@@ -0,0 +1,53 @@

+----- +title: Simply on Rails - Part 1: Concepts and Bubbles +content-type: article +timestamp: 1183786980 +tags: rails|website|web20 +----- +<p>The first thing I do when I start developing a new application is write down some ideas.</p> +<p>Pen and paper normally do the job, but nowadays there are some valid online and offline applications which work as good if not (probably) better.</p> +<p>I&#8217;ve never been a fan of <a href="http://en.wikipedia.org/wiki/Mind_Mapping">Mind Mapping</a>. I&#8217;ve been to a seminar on problem solving and creativity and they were showing how mind mapping can unleash your creativity, but it didn&#8217;t really work for me. I found the concept-idea-concept-idea sequences a bit too restrictive for my liking.</p> +<p>So I decided to try something different: bubbles! <a href="http://www.bubbl.us/">Bubbl.us</a> is an interesting online flash application which lets you create bubbles. You can create bubbles and relationships between them, change their color, their dimensions etc. And above all it&#8217;s absolutely fun to use. I created two bubble sheets, the first one to define how content will be organized in the next version of ItalySimply:</p> +<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="340" id="bblviewer"><br /> +<param name="movie" value="http://bubbl.us/sys/view.swf?sid=26306&pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" /><br /> +<param name="quality" value="high" /><br /> +<param name="SeamlessTabbing" value="false" /><br /> +<param name="AllowScriptAccess" value="always" /><br /> +<param name="FlashVars" value="_sid=26306&_title=ItalySimply%20v3%20-%20Content&_z=75&_pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" /><br /> +<embed src="http://bubbl.us/sys/view.swf?sid=26306&pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" FlashVars="_sid=26306&_title=ItalySimply%20v3%20-%20Content&_z=75&_pw=yaeyI.megNtZcMTh3azVsVjhwVEt0TQ" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="340" allowscriptaccess="always" SeamlessTabbing="false" name="bblviewer"></embed><br /> +</object></p> +<p>The diagram identifies three main types of content:</p> +<ul> + <li>Houses &#8211; basically what the site is about: house listing with information and pictures about houses for sale or rent.</li> + <li>Links &#8211; Either swapped with partners or suggested by users.</li> + <li>Pages &#8211; Static content.</li> +</ul> +<p>which will be organized in three different ways:</p> +<ul> + <li>Tags</li> + <li>Categories</li> + <li>An internal search engine, allowing people to filter houses according to some criteria.</li> +</ul> +<p>The other sheet focuses on relationships between content and users.</p> +<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="340" id="bblviewer"><br /> +<param name="movie" value="http://bubbl.us/sys/view.swf?sid=26307&pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" /><br /> +<param name="quality" value="high" /><br /> +<param name="SeamlessTabbing" value="false" /><br /> +<param name="AllowScriptAccess" value="always" /><br /> +<param name="FlashVars" value="_sid=26307&_title=ItalySimply%20v3%20-%20Communication&_z=75&_pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" /><br /> +<embed src="http://bubbl.us/sys/view.swf?sid=26307&pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" FlashVars="_sid=26307&_title=ItalySimply%20v3%20-%20Communication&_z=75&_pw=yaeyI.megNtZcMTgxeUw0S0FSNzhFNg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="340" allowscriptaccess="always" SeamlessTabbing="false" name="bblviewer"></embed><br /> +</object></p> +<p>At the far sides we have users and administrators, and in the middle how they interact between themselves or with content, in particular:</p> +<ul> + <li>Users will be able to access house feeds and be notified automatically of new additions</li> + <li>Users will be able to ask questions or comments to each house (they&#8217;ll be moderated, of course).</li> + <li>Users will be able to suggest links, or contact administrators using a &#8220;House Preferences&#8221; form or a more generic contact form.</li> +</ul> +<p>Bubbles are fun, but while I was creating these two diagrams, I felt I absolutely needed to name the relationships between each entity or concept, so I spend some time trying to find a tool who would let me do so in an easy and fast way.</p> +<p>Yep, I needed to create a <a href="http://en.wikipedia.org/wiki/Domain_model">domain model</a> to move a bit closer to create the database architecture of the site.<br /> +It turns out that this magic tool exists, and it&#8217;s free for non-commercial use: <a href="http://cmap.ihmc.us/download/">CmapTools</a>.<br /> +It&#8217;s not web based, and it&#8217;s a 59MB Java desktop application which can be used to create <a href="http://en.wikipedia.org/wiki/Concept_map">Concept Maps</a>.</p> +<p>Within minutes I was able to create a simple but pretty and functional enough domain model for my site:</p> +<p><img src="/files/ItalySimply-v3_domain-model.jpg" alt="" /></p> +<p>Basically all the concepts I used are going to become models, and all the named relationships will become model associations in Rails.</p> +<p>Next step: database architecture.</p>
A contents/articles/simply-on-rails-2-database-design.html

@@ -0,0 +1,16 @@

+----- +title: Simply on Rails - Part 2: Database Design +content-type: article +timestamp: 1184405220 +tags: rails|databases +----- +<p>This week I attended a course for work on how to <em>Implement Databases with Microsoft <span class="caps">SQL</span> Server 2005</em>. An interesting course indeed, which made me realize how feature-rich Bill&#8217;s product is, compared to the Open Source alternatives like MySQL. It also made me realize how nice it is to implement database-related logic (read: Models) using a <em>proper</em> programming language rather than using triggers, stored procedures, functions and other goodies offered by Transact-<span class="caps">SQL</span>.</p> +<p>It&#8217;s all a matter of taste and of necessities: using MS <span class="caps">SQL</span> Server for one of my website is simply not going to happen anytime soon, and I&#8217;m more than happy to have a database which can be used <em>just</em> as a database and a programming language (Ruby, in this case) which can do wonders, rather than a procedural-only surrogate.</p> +<p>Anyhow, back to our weekly series. After creating a <a href="/blog/simply-on-rails-1-concepts-map">concept map</a>, it&#8217;s time of <em>get real</em> and try to figure out a database architecture. The tool of choice this week is obviously the widely popular <a href="http://fabforce.net/dbdesigner4/">DbDesigner 4</a>. It&#8217;s free, it&#8217;s easy to use, and the results are pretty enough. There:</p> +<p><a href="/files/italysimply_database-architecture.png"><img src="/files/italysimply_database-architecture_thumb.png" alt="" /></a></p> +<p>It&#8217;s amazing how a relatively simple concept map can lead to such a complex database architecture, isn&#8217;t it?<br /> +Well, it&#8217;s normal. One of the reasons of this is that I totally forgot about geographical information about the houses which will be featured on the site, or better, I thought about it as a <em>strings</em> typed in by the administrators, whereas it would be much better having dropdown boxes.</p> +<p>Countries, regions, privinces, areas and cities will be added to the database only once, rather than having to type them in every time a house is added. Obvious, but this lead to five tables more and nine (!) relationships more.</p> +<p>The other reason of why the number of tables is higher than the number of entities in the domain model is that I decided <em>not</em> to use the <span class="caps">ENUM</span> type. Firstly because <a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseSetAndEnumColumns">it&#8217;s not handled very well by Rails</a><br /> + and also because there&#8217;s <a href="http://blog.arabx.com.au/?p=87">a number of reasons</a> why ENUMs should not be used.</p> +<p>The only problem now is that whenever I load a house, I&#8217;ll have to get data from a lot of tables at once (and this means a lot of joins underneath the model layer) or &#8211; worse &#8211; a lot of queries in case I decide to load related data &#8220;on the fly&#8221;. It looks like I&#8217;ll have to do a bit of <a href="http://railsexpress.de/blog/articles/2005/11/06/the-case-for-piggy-backed-attributes">piggy-backing</a> here and there. <a href="http://railsexpress.de/blog/articles/2006/05/29/simpler-piggy-backing">Someone</a> already thought about a way of doing this in a more &#8220;Model-friendly&#8221; way. Perhaps I&#8217;ll give it a shot.</p>
A contents/articles/simply-on-rails-3-shared-controller.html

@@ -0,0 +1,128 @@

+----- +title: Simply on Rails - Part 3: LiteController +content-type: article +timestamp: 1185076980 +tags: rails +----- +<p>Enough with concepts, ideas and diagrams: it&#8217;s time to start coding something. Everyone knows what&#8217;s the first step when creating a Rails applications, but anyhow, here it is:</p> +<div class='ruby'><pre><code>rails italysimply</code></pre></div><p>Then I create a new development database, load it up with the schema I <a href="/blog/simply-on-rails-2-database-design">previously</a> prepared and modify the <code>config/database.yml</code> to be able to connect to it. Nothing new here.<br /> +I actually had to modify the schema a little bit:</p> +<ul> + <li>I changed all the names for the foreign keys to something more evocative than &#8220;has_many&#8221; or &#8220;has_one&#8221;</li> + <li>I added a <em>level</em> column to the <em>states</em>, <em>availabilities</em> and <em>conditions</em> table</li> + <li>I removed the <em>description</em> column from the categories table</li> +</ul> +<p>Great, but&#8230; hang on: now some of the database tables look awfully similar with each other:</p> +<ul> + <li>statuses</li> + <li>states</li> + <li>roles</li> + <li>types</li> + <li>tags</li> + <li>conditions</li> + <li>availabilities</li> + <li>categories</li> +</ul> +<p>They all have a name column, some of them have a name column as well, they&#8217;ll hold only a relative small number of records which will hardly ever be deleted. In fact, I was tempted to use Enums for some of those things&#8230;<br /> +Anyhow, I&#8217;ll still have to add and modify data in those tables, so it looks like I kinda need to create 8 controllers, 8 models and about four views for each one of them. No way. Fair enough for the controllers and models, but I&#8217;m not going to create 32 views which all look exactly the same. Rails should be smarter than that!And it is, luckily. Derek Sivers &amp; C. came out with an interesting <a href="http://dereksivers.com/rails-shared-controller.html">Shared Controller</a> concept, which could be just what I&#8217;m looking for in this case. Actually I need something really simple in this case:</p> +<ul> + <li>Put all the <span class="caps">CRUD</span> logic into one controller</li> + <li>Create only one set of views</li> +</ul> +<p>Here&#8217;s the controller:</p> +<p><span style="color:red;"><strong>app/controllers/admin/lite_controller.rb</strong></span><br /> +<div class='ruby'><pre><br /> +<div class='ruby'><pre><code>class Admin::LiteController &amp;lt; ApplicationController</p> +layout &#8216;admin&#8217; +before_filter :prepare + +def prepare +@item_name = model.to_s +end + +def index +list +end +verify :method =&gt; :post, :only =&gt; [ :destroy, :create, :update ], +:redirect_to =&gt; { :action =&gt; :list } +def list +ordering = model.column_names.include?(&#8216;level&#8217;) ? &#8216;level <span class="caps">ASC</span>&#8217; : &#8216;name <span class="caps">ASC</span>&#8217; +@items = model.find(:all, :order =&gt; ordering) +render(&#8216;lite/list&#8217;) +end +def show +@item = model.find(params[:id]) +render(&#8216;lite/show&#8217;) +end +def new +@item = model.new +render(&#8216;lite/new&#8217;) +end +def create +<code>item = model.new(params[:"#{</code>item_name.downcase}&quot;]) +if @item.save +flash[:notice] = @item_name+&#8217; was successfully created.&#8217; +redirect_to :action =&gt; &#8216;list&#8217; +else +render(&#8216;lite/new&#8217;) +end +end +def edit +@item = model.find(params[:id]) +render(&#8216;lite/edit&#8217;) +end +def update +@item = model.find(params[:id]) +if <code>item.update_attributes(params[:"#{</code>item_name.downcase}&quot;]) +flash[:notice] = @item_name+&#8217; was successfully updated.&#8217; +redirect_to :action =&gt; &#8216;list&#8217; +else +render(&#8216;lite/edit&#8217;) +end +end +<p>end</code></pre></div></notextile></p> +<p>Then all I need to do is create eight controllers with just a few lines of code in each:</p> +<p><span style="color:red;"><strong>app/controllers/admin/statuses_controller.rb</strong></span><br /> +<div class='ruby'><pre><code>class Admin::StatusesController &lt; Admin::LiteController + def model + Status + end +end</code></pre></div></p> +<p>Basically, I just need to specify which model the specific controller takes care of, Ruby&#8217;s inheritance does the rest. The model name will be passed to the views like this:</p> +<p><span style="color:red;"><strong>app/controllers/admin/lite_controller.rb</strong></span><br /> +<div class='ruby'><pre><code>def prepare + @item_name = model.to_s +end</code></pre></div></p> +<p>And each method uses the <code>model</code> method to access the model, like this:</p> +<p><span style="color:red;"><strong>app/controllers/admin/lite_controller.rb</strong></span><br /> +<div class='ruby'><pre><code>def create + @item = model.new(params[:"#{@item_name.downcase}"]) + if @item.save + flash[:notice] = @item_name+' was successfully created.' + redirect_to :action =&gt; 'list' + else + render('lite/new') + end +end</code></pre></div></p> +<p>Note how the params are collected:</p> +<div class='ruby'><pre><code>@item = model.new(params[:"#{@item_name.downcase}"])</code></pre></div><p><code>params[:"#{</code>item_name.downcase}&quot;]@ at runtime becomes <code>params[:status]</code> or <code>params[:role]</code> etc. etc., depending on which controller is called. Sweet.</p> +<p>The views? Modified accordingly:</p> +<p><span style="color:red;"><strong>app/views/lite/edit.rb</strong></span><br /> +<div class='ruby'><pre><code>&lt;h1&gt;Editing <br /> +<div class='ruby'><pre><code>&amp;lt;h1&amp;gt;Editing &lt;%= @item_name %&gt;&amp;lt;/h1&amp;gt;</p> +<p>&lt;% form_tag :action =&gt; &#8216;update&#8217;, :id =&gt; @item do <span>&gt;<br /> + &lt;</span>= render :partial =&gt; &#8216;lite/form&#8217; <span>&gt;<br /> + &lt;</span>= submit_tag &#8216;Edit&#8217; <span>&gt;<br /> +&lt;</span> end %&gt;</p> +<p>&lt;%= link_to &#8216;Show&#8217;, :action =&gt; &#8216;show&#8217;, :id =&gt; @item <span>&gt; |<br /> +&lt;</span>= link_to &#8216;Back&#8217;, :action =&gt; &#8216;list&#8217; %&gt;</code></pre></div></notextile></p> +<p><span style="color:red;"><strong>app/views/lite/_form.rb</strong></span><br /> +<div class='ruby'><pre><code><%= error_messages_for 'item' %> +&lt;!--[form:lite]--&gt; +&lt;p&gt;&lt;label for="<%= @item_name.downcase %>_name"&gt;Name: &lt;/label&gt; +<%= text_field @item_name.downcase, 'name', {:value =&gt; @item.name} %>&lt;/p&gt; +<% if @item.methods.include?('level') then %> + &lt;p&gt;&lt;label for="<%= @item_name.downcase %>_level"&gt;Level: &lt;/label&gt; + <%= text_field @item_name.downcase, 'level', {:value =&gt; @item.level} %>&lt;/p&gt; +<% end %> +&lt;!--[eoform:lite]--&gt;</code></pre></div></p>
A contents/articles/simply-on-rails-4-default-data-migrations.html

@@ -0,0 +1,82 @@

+----- +title: Simply On Rails - Part 4: Quick and Easy Default Data Migrations +content-type: article +timestamp: 1189854600 +tags: rails|ruby|databases +----- +<p>In the <a href="http://www.h3rald.com/blog/simply-on-rails-3-shared-controller">last post</a> of this series I tried to find a <acronym title="Don&#39;t Repeat Yourself"><span class="caps">DRY</span></acronym> solution to deal with tables storing &#8220;ancillary&#8221; data, i.e. names of user roles, predefined categories, page state names and other similar things.<br /> +I personally chose to put this kind of data to make my application more dynamic, although I could have decided to use ENUMs or simply ordinary varchar fields &#8212; that would have been easier, but less flexible. For now, I&#8217;m sticking with my original choice.</p> +<p>The data in these tables is kind of a prerequisite for the application to run: I must be able to have a status to assign to a user when creating it, and the same applies to roles. Sure, I could spend 20 minutes populating these tables manually, but it would be nice if there was a less tedious way, wouldn&#8217;t it?</p> +<p>There is indeed. The inspiration came from a technique described in the book (which I highly recommend) <em>Agile Web Development With Rails</em>, in which the author outlines how it would be possible to use Rails&#8217; fixtures and migrations to load data in the database automatically from <span class="caps">YAML</span> files. <br /> +All you have to do is create a migration to load the specified <span class="caps">YAML</span> files and you&#8217;re all set.</p> +<p>I wanted to take a little step further, allowing the migration to load data from <em>all <span class="caps">YAML</span> files in a specific directory</em>, automatically.Let&#8217;s start creating the <span class="caps">YAML</span> files then and place them all in one directory of the application like <code>/db/migrate/defaults</code>. Here&#8217;s the one I used for user roles, for example:</p> +<div class='yaml'><pre><code>visitor: + id: 1 + name: Visitor + level: 0 + +user: + id: 2 + name: User + level: 10 + +contributor: + id: 3 + name: Contributor + level: 20 + +provider: + id: 4 + name: Provider + level: 50 + +operator: + id: 5 + name: Operator + level: 100 + +administrator: + id: 6 + name: Administrator + level: 500 + +webmaster: + id: 7 + name: Webmaster + level: 1000</code></pre></div><p>The important thing to remember is to provide a unique string to identify each record, before specifying each fiels. The other files look similar, so I won&#8217;t bother listing them here.</p> +<p>And here&#8217;s the simple code for the migration:</p> +<div class='ruby'><pre><code>require 'active_record/fixtures' + +class LoadDefaults &lt; ActiveRecord::Migration + + def self.up + down + models = self.default_models + models.each do |m| + Fixtures.create_fixtures(self.default_directory, m) + end + end + + def self.down + models = self.default_models + models.each do |m| + eval("#{m.singularize.capitalize}.delete_all") + end + end + + def self.default_directory + File.join(File.dirname(__FILE__), "defaults" ) + end + + def self.default_models + files, names = Dir.glob("#{self.default_directory}/*.yml"), [] + unless files.blank? + files.each { |f| names &lt;&lt; File.basename(f, '.yml') } + names + else + [] + end + end + +end</code></pre></div><p>Basically the migration will look in a directory named &#8220;defaults&#8221; for some <span class="caps">YAML</span> files named after a particular database table, and it will attempt to load all the records defined in each one of them. <br /> +The <code>down</code> method of the migration <em>deletes all the data in the specified tables</em>, so use with care&#8230;</p>
A contents/articles/simply-on-rails-intro.html

@@ -0,0 +1,22 @@

+----- +title: Simply on Rails? +content-type: article +timestamp: 1183176000 +tags: rails|web20 +----- +<p>So finally my site is back up, I don&#8217;t have to worry about coding anymore: just writing about whatever I like, no more Cake, no more <span class="caps">MVC</span>, no more frameworks&#8230;</p> +<p><em>What do you mean no coding anymore? You&#8217;ve been bragging about how this Rails thing is fast, how you can develop things easily, and this, and that&#8230; You <strong>know</strong> what you have to do now</em></p> +<p><sup>^</sup> That was my fianc&eacute;e, actually, and she&#8217;s right: my web development days are far from being over, actually. I admit I tried to get away from it, but she kindly reminded me (and she can be <em>very</em> persuasive) that now I have to fix <a href="http://www.italysimply.com/">ItalySimply</a>, the site I created a while a go (4 years?) with a mixture of Mambo (the <span class="caps">CMS</span>, now Joomla) and spaghetti <span class="caps">PHP</span>.</p> +<p>A sort-of-real-estate thingie visited by people who want to move to Italy or simply buy a house here. And it&#8217;s due a makeover, to be honest.</p> +<p>How am I gonna manage this? Let&#8217;s see&#8230;</p> +<h3><span class="caps">COW</span></h3> +<p><span class="caps">COW</span> \- Code On Week-ends. my web development methodology: simple, effective, basically my only choice. Actually the full name is <span class="caps">COW</span> (<span class="caps">IYL</span>): Code On Week-ends <em>If You&#8217;re Lucky</em>, i.e.: if we&#8217;re not going out, if there&#8217;s nothing better to do, if I feel like it. No deadlines (almost), no plans to follow, nothing.</p> +<p>No, I&#8217;m not terribly motivated to take on this project, but I already thought about two things to get me going:</p> +<ul> + <li><strong>Get <a href="http://www.pragmaticprogrammer.com/titles/rails/">Agile Web Development with Rails</a></strong> \- I read bits of the first edition, and that&#8217;s what got me started with Rails, now it&#8217;s time to buy the real thing.</li> + <li><strong>Blog about it</strong> \- I&#8217;ll <em>try</em> to keep a diary of my coding efforts and share the most juicy bits with the rest of the world. In this way I&#8217;ll also have content for my site and the three people who read this blog will have something (hopefully) interested to read.</li> +</ul> +<h3>The Cunning Plan</h3> +<p>Instead of getting out of troubles by simply tidying up some <span class="caps">PHP</span> code or migrate the site to Joomla, I&#8217;d like to re-code the whole thing from scratch using Rails. Ideally I&#8217;d like to migrate quite a bit of the content (including the hundreds of houses with pictures which were published over the years), but at the moment I&#8217;m not thinking about it: after all, in the end the site will be so addictive and easy to use that adding hundreds of houses back on will be just so much fun! Right? Yeah, right&#8230;</p> +<p>First of all I&#8217;ll spend quite a bit of time planning the application and what has to be done, then I&#8217;ll have to practice a little bit with Rails, and then, eventually, I&#8217;ll end up writing some code. Of course, suggestions and ideas will be more than welcome throughout all the process.</p> +<p>Let&#8217;s see how it goes&#8230;</p>
A contents/articles/slax.html

@@ -0,0 +1,7 @@

+----- +title: Slax - A small, complete and 'nice-looking' Linux live distribution +content-type: article +timestamp: 1139156266 +tags: review +----- +How can I learn how to use Linux? Simple, you grab a copy of any of the twelve thousands different 'distros' available out there, and you install it on your PC, hoping not to damage your existing Windows installation (if any). Or there's a more lazy and safe way, get one of the few dozens of 'Linux live CDs', burn the cd, boot from it, and you're all set...It's true, nowadays the best solutions for Linux newbies is trying out a few <em>live CDs</em> before installing <em>the real deal</em> on their machines: it's safe(r), takes less time and it's much more fun. Yes, some people may object saying that the fun in learning Linux is installing it on your hard drive first, but a few people I know who 'accidentally' overwrote their Master Boot Record or 'accidentally' damaged their Windows installation might disagree there...<br /><br />A live distribution[1] basically is a CD (or DVD or USB drive) containing a fully working operating system - Linux in the specific - which can be run directly from the CD itself and does not require an hard disk installation. The drawback is that normally some part of the operating system are loaded and run from a <em>ram disk </em> and therefore the data written there will be erased once the system reboots. Due to the nature of CDs, saving data on the CD itself is obviously not possible, and this limitation can normally be bypassed by saving changes within a file to store either on your hard drive, remotely, or on some other media which allows read/writing like a floppy disk or USB stick.<br /><br />Linux is well known for the many different distributions available, each with its own features, pros and cons. The same happens for live distros: in the last few years the number grew a lot[2] and nearly all major distributions now have a <em>live</em> counterpart, mostly to allow new users to preview their product.<br /><br />The most famous, and possibly one of the first LiveCD ever made was Knoppix[3], a Debian[4]-based CD featuring a KDE[5] desktop environment and many useful applications <em>squeezed</em> into 700MB of space which can be used as a fully functional operating system. Add to this a truly impressive on-the-fly hardware detection ability, and there's the <em>best</em> (arguably) multi-purpose linux Live distribution ever made.<br />If Knoppix is "so perfect", why do other distributions exist at all? Well, some people noticed that they wanted to remove something from the collection of applications Knoppix included in the default CD, others wanted to add other bits, so soon a long list of Knoppix-based <em>customized</em> distros followed[6]...<br /><br />This is another story, I'd like focus my attention on perhaps the most valid Knoppix-alternative out there: Slax[7].<br /><br /><strong>Size vs. Features</strong><br />Knoppix was the first Live CD I tried, but I didn't like one thing about it: its size. 700MB means one CD, and one CD means that I can't carry it in my pocket now can I? Not literally, anyway, at least not comfortably. So I started looking for a smaller alternative, and I found various possible candidates. Damn Small Linux[8] was one of the most extreme: 50MB in total, nothing more, nothing less, and it worked! Alright, I must say that now it's much better than it was when I first tried it but, it was more or less functional at the time (2003), although relatively new on the scene. <br />I liked it, really but, due to its size self-limitations the user interface wasn't too pretty, and the applications included weren't exactly what I was looking for: when you're used to Firefox (or better, Firebird, at the time) to browse the Net, Dillo[9] doesn't really look exactly appealing and feature-rich - although remarkable for its size. <br /><br />I decided that I wanted something more than that, also because I was planning to burn the live-linux distro on a <em>brand new</em> (at the time) 8cm CD-RW with 180MB of space available. The best solution I could find, at the time and still now, perhaps, was Slackware Live CD, a very promising live distribution based on Slackware Linux[10].<br />I was very impressed at the time, especially for the effort the developer put to create a mini-distribution which is also user-friendly and nice-looking as well, incorporating the KDE Desktop. These are not the only strengths of the project, as we'll see in the next sections but, certainly the first thing everyone can notice. <br /><br />After a while the project changed names and became "Slax", perhaps to create its own identity and expand itself following a different direction than its non-live predecessor: while the 'real' Slackware is often quite cautious on using latest technologies and normally includes <em>stable</em> packages, Slax does quite the opposite, including more recent applications and solutions. <br /> <br /><br /><strong>Overview</strong><br />Slax website[7] evolved quite a bit through the years, and now it's a true example of clarity and exhaustiveness. An essential clean design, access to a lot of information on how to use the live CD, solutions to common problems and also something for developers interested in creating their own live distro: the truly remarkable thing is that the biggest part of the work is done - apparently - by one single person, Tomas Matejicek[11], the founder of the project. <br /><br />The strength of Slax - as I anticipated before - is perhaps its ability to compress a few carefully selected, commonly used applications which allow the user to fully enjoy his live experience in 177MB of space. Certainly the choice of using the K Desktop Environment instead of a more lightweight one like Fluxbox or Xfce may seem illogical, but for sure new Linux users would feel more "at home" with KDE, especially if coming from Windows XP. KDE is by far the most user friendly desktop environment available for Linux, and Slax made it even more user friendly by carefully organizing menus in an optimal way without cluttering the desktop with a myriad of icons and overly-crowded navigation bars.<br />When it comes to the applications included, Slax offers nearly everything the average desktop user needs: word processor (KWord), spreadsheet (KSpread), browser (Konqueror), multimedia player (Kplayer), editors, games and much more[26]! In its simplicity and especially for its size, Slax is a well-rounded, multi-purpose distribution. There's an interesting article available on tuxs.org[12] which documents the author's <em>personal challenge</em> of using <em>only</em> Slax (version 4.1.4 at the time) for a whole week. Surprisingly, the writer was really impressed of the features offered by this little distro: he was able to connect to the Net, browse the web, check his mail, write and do various other "everyday task", with no difficulty or extra hassle.<br /><br />Slax is also <em>very</em> fast: normally some other live CDs compress <em>the whole</em> operating system on a single file, or a few, while Slax developed an optimized modular architecture: groups of programs or even single applications are compressed <em>separately</em> into .mo files: this technique sensibly increases the performance and speed of the operating system: whenever I open KWord, for example, to write an article, the OS will access <em>just</em> the KWord module on the disk, without touching other modules. <br /><em>Surely there's a way to add/remove modules...</em> - Yes, there is, and this will be discussed later on.<br /><br />Finally, like various other live distros, Slax supports some handy "cheatcodes" which can be used to boot customize some options when booting the operating system.<br /><br />Some of the most interesting codes include:<br /><br /><code><br />boot: slax webconfig=passphrase<br />boot: slax webconfig=ask<br /></code><br />This is a recent feature: Slax allows users to save their settings remotely, directly on Slax server. Every user has to choose a 10+ characters password in order to use this feature[27].<br /><br /><code><br />boot: slax toram (just alias for copy2ram)<br />boot: slax copy2ram<br /></code><br />This code can be used to copy the entire operating system to your computer's RAM: this may make the booting process slower, but Slax will run faster than light afterwards (256MB+ ram required)<br /><br /><code><br />boot: slax changes=/dev/device<br /></code><br />Saves changes to a specified device using any linux filesystem, like a hard drive or a usb stick.<br /><br /><code><br />boot: slax load=module<br /></code><br />Load optional modules stored in the /optional/ directory. For further information about modules, see the "Make your own!" section below.<br /><br />For a full list of all Slax cheat codes, see the cheatcodes page[13] on Slax website. <br /><br /><strong>Different flavors</strong><br />I defined Slax a multi-purpose mini distribution, but as always different people have different needs: some users may want to be able to run some windows applications through Wine[14], for example, or may prefer a more lightweight Desktop Environment. The huge - and logical - limitation of all live CDs is that they normally don't offer the possibility of adding applications and packages: when the operating system starts the "root" partition is transferred onto a ramdrive which allows - even if until reboot - read/write access. Although this limitation can be overcome at least through using some of the cheatcodes described before, having the application already installed could be much easier.<br /><br />That's why Slax developers decided to start creating different <em>flavors</em> of Slax. Some of them are not available at the moment (the current slax version at the time of writing is 5.0.6), and others can be already downloaded from the official site[15].<br /><br /><span style="text-decoration:underline;">Slax "Kill Bill"</span> - This is the first Slax customization which became available, and came out more or less at the same time as Tarantino's movie. <em>Bill</em> Gates didn't seem to mind at all, even if this version actually allows users to run <em>some</em> Windows applications like notepad on linux. Basically Wine[15] dosbox[16] and qemu[17] can make this possible, with limitations... nothing too exciting but, definitely fun to try out.<br /><br /><br /><span style="text-decoration:underline;">Slax "Server"</span><br /><fieldset><blockquote>SLAX SRV is a pocket operating system with many internet services ready to use. Includes DNS, DHCP, SMB, HTTP, FTP, MySQL, SMTP, POP3, IMAP, SSH.</blockquote></fieldset><br />Unfortunately, this flavor of Slax is not yet available for download, but some updates concerning its status are available on the developer's TODO list[18]:<br /><br /><em>SE: mysql up and running <br />SE: httpd up and running, with PHP with MySQL <br />SE: DNS server up and running as a cache server <br />SE: DHCP server included but not started automatically, could confuse local network <br />SE: SSH server up and running <br />SE: MAIL server up and running, needs testing <br />SE: FTP server up and running</em><br /><br />This is definitely going to be an interesting project, and I'm really looking forward to it. In the meantime, there are two server-oriented live distribution available, which is also based on Slax: Slampp[19] and in particular Slampp Lite[20]. I tried Slampp Lite and I was really satisfied with its features: support for PHP, Perl, Python on Apache (basically includes XAMPP for Linux[21]), xfce desktop environment, the latest Firefox browser, antivirus, firewall, and more.<br /><br /><span style="text-decoration:underline;">Slax "Popcorn"</span><br />This Slax flavor is more minimalist, and substantially different from the Standard Edition. For a start it features the more lightweight xfce Desktop Environment[22], and thus removes all KDE-based applications making more room for Firefox browser and Abiword, which are not included in the Standard version due to the presence of their <em>KDE counterparts</em> (Konqueror and Kword). <br />Very fast, simple, and fits 128MB: suitable for small USB keys more than anything. <br /><br /><span style="text-decoration:underline;">Slax "Frodo"</span><br />As the name implies, this version is smaller again (47MB), and it's basically the base for all other flavors as it includes just a Linux console and some scripts for hardware detection and setting up the live environment.<br /><br /><strong>Make your own!</strong><br /><em>Nice! But I'd have included X instead of Y, then added Z as well, perhaps...</em><br />That's a common feeling: the truth is that people are never happy with what they get! If you're still not happy with what Slax in all its different flavors can offer you, well, you can make your own. Although some might want to start more or less from scratch, creating <em>Slax-based</em> customizations (this was the only option until the more recent versions), now there's an easier way: modules and the documentation present on the official site is complete enough and describes the necessary steps to take to create, modify and use them[23]. Modules are basically files with .mo extension containing an application which will be loaded by Slax at startup, if placed in the /modules/ directory, or only if required by the user (see the corresponding cheatcode) if placed in the /optional/ directory. The easiest way to create a module which requires no particular skill is converting a Slackware package, by issuing this command:<br /><br /><code>tgz2mo application.tgz application.mo</code> <br /><br />Of course there are other ways to create modules without converting Slackware packages, further details in the documentation[23]. There are also a lot (currently 576!) of user-contributed modules ready for use available for download and hosted on the Slax site[24], the only problem is that inevitably some of them seem to be out-of-date, and not constantly updated by their maintainers.<br /><br />Last but not least, the dream of all Windows users: MySlax Creator and MySlax Modulator[25], which allow Windows users to create their own Slax distribution with custom modules both for CD and USB drive and create Slax modules on windows respectively. Two really nice additions which make this project even more (Windows-)user-friendly!<br /><br /><strong>Conclusions</strong><br />Slax is exactly how advertised on its website: <em>"[a] fast and beautiful Linux operating system which fits on small (3.14") CD-ROM disc"</em>, nothing more, nothing less. Personally, I'd like to emphasize its user-friendliness, as it seems the most valid alternative to Knoppix, and perhaps even better: it does not include <em>as many applications as possible</em> which could confuse Linux neophytes but, just a bunch of useful programs for everyday use to give users a <em>taste</em> of what Linux is capable to do.<br />Normally, as Slax is mostly maintained by one person, Slax releases are not too frequent: normally 2-3 per year maximum. The version which was tested for this article was the 5.0.6 and (un)luckily a new one <em>just came out</em> while I was writing the article: version 5.0.7b is now available for download[15] and features KDE 3.5. A few bugs were discovered immediately after its released and quickly fixed with a patch-module (hence the "b"): This YOUR chance to try it out before I do...<br /><br />Happy Sla<em>x</em>ing! <br /><br /><br />[1]Linux Live CD - Wikipedia: <a href="http://en.wikipedia.org/wiki/Linux_live_cd">http://en.wikipedia.org/wiki/Linux_live_cd</a><br />[2]DrozenTech's LiveCD List: <a href="http://www.frozentech.com/content/livecd.php">http://www.frozentech.com/content/livecd.php</a><br />[3]Knoppix Official Site: <a href="http://www.knoppix.org/">http://www.knoppix.org/</a><br />[4]Debian Official Site: <a href="http://www.debian.org/">http://www.debian.org/</a><br />[5]K Desktop Environment: <a href="http://www.kde.org/">http://www.kde.org/</a><br />[6]Knoppix Customizations: <a href="http://www.knoppix.net/wiki/Knoppix_Customisations">http://www.knoppix.net/wiki/Knoppix_Customisations</a><br />[7]Slax Live CD: <a href="http://slax.linux-live.org">http://slax.linux-live.org</a><br />[8]Damn Small Linux - Official Page: <a href="http://www.damnsmalllinux.org/">http://www.damnsmalllinux.org/</a><br />[9]Dillo Browser, Official Page: <a href="http://www.dillo.org/">http://www.dillo.org/</a><br />[10]Slackware Linux, Official Page: <a href="http://www.slackware.com/">http://www.slackware.com/</a><br />[11]Slax - Developer's page: <a href="http://slax.linux-live.org/credits.php">http://slax.linux-live.org/credits.php</a><br />[12]Barney Matthews, "A week with Slax 4.1.4" - Tuxs.org: <a href="http://www.tuxs.org/slax.htm">http://www.tuxs.org/slax.htm</a><br />[13]Slax cheatcodes: <a href="http://slax.linux-live.org/cheatcodes.php">http://slax.linux-live.org/cheatcodes.php</a><br />[14]Wine HQ: <a href="http://www.winehq.com/">http://www.winehq.com/</a> <br />[15]Slax download page: <a href="http://slax.linux-live.org/download.php">http://slax.linux-live.org/download.php</a><br />[16]Dosbox Project: <a href="http://dosbox.sourceforge.net/news.php?show_news=1">http://dosbox.sourceforge.net/news.php?show_news=1</a><br />[17]Qemu Project: <a href="http://fabrice.bellard.free.fr/qemu/">http://fabrice.bellard.free.fr/qemu/</a><br />[18]Slax TODO list: <a href="http://slax.linux-live.org/todo.php">http://slax.linux-live.org/todo.php</a><br />[19]Slampp Official Page: <a href="http://slampp.abangadek.com/wiki/wikka.php?wakka=HomePage">http://slampp.abangadek.com/wiki/wikka.php?wakka=HomePage</a><br />[20]Slampp Lite page: <a href="http://slampp.abangadek.com/wiki/wikka.php?wakka=SlamppLite">http://slampp.abangadek.com/wiki/wikka.php?wakka=SlamppLite</a><br />[21]XAMPP for Linux: <a href="http://www.apachefriends.org/en/xampp-linux.html">http://www.apachefriends.org/en/xampp-linux.html</a><br />[22]Xfce desktop environment, official page: <a href="http://www.xfce.org">http://www.xfce.org</a><br />[23]Slax Documentation - Modules: <a href="http://slax.linux-live.org/doc_modules.php">http://slax.linux-live.org/doc_modules.php</a><br />[24]Slax modules page: <a href="http://slax.linux-live.org/modules.php">http://slax.linux-live.org/modules.php</a><br />[25]MySlax Projects: <a href="http://myslax.bonsonno.org/">http://myslax.bonsonno.org/</a><br />[26]Slax - installed packages: <a href="http://slax.linux-live.org/installed_packages.txt">http://slax.linux-live.org/installed_packages.txt</a><br />[27]Slax - Webconfig: <a href="http://slax.linux-live.org/webconfig.php">http://slax.linux-live.org/webconfig.php</a><br />
A contents/articles/social-bookmarking-services.html

@@ -0,0 +1,212 @@

+----- +title: Review of ten popular social bookmarking services +content-type: article +timestamp: 1147525587 +tags: web20|review|internet +----- +<p>Social bookmarking<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> is perhaps one of the pillars of Web 2.0, allowing people to save, tag and share their Internet bookmarks online anytime, anywhere. Since <em>del.icio.us</em><sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup> came out, the Web is not the same anymore: no more IE favourites or Firefox bookmarks, no more &#8220;Save page as&#8230;&#8221; etc., people nowadays want to do <em>everything</em> online without being bond to a single computer, and also make everything they do or read public &#8211; apparently. This is one of the key concepts of Web 2.0<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup>: sharing information in a quick and easy way, without any restrictions.Del.icio.us was the first, but of course not the only one social bookmarking system which became popular in a few months: many other followed its example, many companies developed their own alternative to del.icio.us, adding and removing features, changing bits etc. etc. Result: someone said that <em>&#8220;[&#8230;] There is almost 1 new social bookmark/digg like service appears one daily basis [&#8230;]&#8221;</em><sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup>.</p> +<p>Nice, and there are also many reviews of each one as well<sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup>! Here&#8217;s another one&#8230;</p> +<blockquote> +<p><strong>Preliminary Notes</strong>: This round-up does <em>not</em> include <em>all</em> social bookmarking sites and yes, there are a lot missing. I decided to pick 10 services out of the dozens available for one simple reason: make this article more readable. I&#8217;m really sorry if your favourite social bookmarking site is not listed: if you feel creative you can add your (short!) review as a comment to this article.<br /> +Although I recently wrote a very positive review of Ma.gnolia<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup> and I know its lead developer, I do <em>not</em> consider myself partial towards Ma.gnolia, you&#8217;ll notice when I review it.</p> +</blockquote> +<h3>Common features and concepts</h3> +<p>The social bookmarking sites reviewed in this article are: del.icio.us<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>, Ma.gnolia<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup>, Furl<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup>, Spurl<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup>, Yahoo MyWeb 2.0<sup class="footnote" id="fnr10"><a href="#fn10">10</a></sup> Blinklist<sup class="footnote" id="fnr11"><a href="#fn11">11</a></sup>, Smarking<sup class="footnote" id="fnr12"><a href="#fn12">12</a></sup>, Shadows<sup class="footnote" id="fnr13"><a href="#fn13">13</a></sup>, Simpy<sup class="footnote" id="fnr14"><a href="#fn14">14</a></sup> and Blogmarks<sup class="footnote" id="fnr15"><a href="#fn15">15</a></sup>.</p> +<p>All these social bookmarking sites have some features in common which can be used to define <em>social bookmarking</em> itself:</p> +<ul> + <li>They allow users to save URLs online, adding some notes to it, and share them with others</li> + <li>Each url can be <em>tagged</em> with custom tags user can create and manage</li> + <li><span class="caps">RSS</span> is widely supported, so you can included your &#8220;recent bookmarks&#8221; in your blog, for example</li> + <li>They allow users to import/export bookmarks in various formats</li> + <li>They support the creation and management of user profiles</li> + <li>Bookmarklet, buttons or other cute little things are provided to make your life easier and bookmark faster</li> +</ul> +Such features will not be mentioned over and over in each review, of course. +<h3>Review parameters</h3> +<p>Besides an overview for each service and some notes regarding their intended <em>audience</em>, some other parameters will be considered and rated from 0 to 10 (the higher, the better):</p> +<p><em>Speed</em><br /> +I&#8217;m currently on dialup, and so I&#8217;ll be able to effectively test the speed and rendering time of each site. The higher the mark, the faster the site is.</p> +<p><em>Features</em><br /> +Notes concerning added/missing features, and overall features rating.</p> +<p><em>Simplicity</em><br /> +Do you need to be a certified geek&#8482; in order to use the service or even your dog can learn how to use it, if he tries hard?</p> +<p><em>Interface/Design</em><br /> +This parameter concerns the visual appearance of a website. Note: it can be particularly subjective, I&#8217;ll try my best to be objective.</p> +<p><em>Userbase</em><br /> +Basically the amount of people which use a determined service.</p> +<p>Ready to go&#8230;</p> +<h3><a href="http://del.icio.us/">del.icio.us</a><br /> +<img src="/img/pictures/socbook/delicious.gif" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 10 &#8211; This is by far the fastest site to load, perhaps because it doesn&#8217;t have any fancy eye-candy at all</li> + <li><strong>Features:</strong> 6 &#8211; del.icio.us offers only the most essential features, nothing too fancy, but nothing too bad either</li> + <li><strong>Simplicity:</strong> 6 &#8211; You need some time to get used to it, but it&#8217;s not confusing like some others. Hardly any documentation or tutorial provided, but hey, this is the geek&#8217;s choice after all</li> + <li><strong>Interface/Design:</strong> 6 &#8211; Personally I like it, but I know I have no taste for design and interfaces. An average user would say that it&#8217;s too plain and no, nothing fancy at all</li> + <li><strong>Userbase:</strong> 10 &#8211; Judging by the amount of people coming to my site after one of my article made it to digg, compared to other social bookmarking services, this is BY <span class="caps">FAR</span> the most used one. Everyone has a del.icio.us account, then, maybe, something else</li> + <li><em><strong>Overall Rating: 7.6</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +This is <span class="caps">THE</span> social bookmarking service, it is the first, the most supported (every other service allows importing from del.icio.us), and the most used, with several thousands of registered users. Obviously, this made it the main term of comparison for other bookmarking services, which claim to be <em>better</em> because they are successful exactly where del.icio.us is lacking, e.g.:</p> +<ul> + <li>Eye candy</li> + <li>they offer better user interaction (comments, messages)</li> + <li>Ratings are supported</li> + <li>More <span class="caps">AJAX</span> and effects</li> + <li>Other sites cache bookmarks internally or may offer thumbnails</li> +</ul> +<p>Nevertheless, del.icio.us still remains the geek&#8217;s choice, the numbers speak by themselves. It is also my choice at the moment, because of its simplicity (in the sense of &#8220;no useless things are included&#8221;) and speed.</p> +<p><strong>Suitable for:</strong> IT professionals, computer enthusiasts, tech-savvy people in general. Your old auntie probably won&#8217;t like it, but at least she&#8217;ll keep away from it and leave you in peace.</p> +<h3><a href="http://ma.gnolia.com/">Ma.gnolia</a><br /> +<img src="/img/pictures/socbook/magnolia.gif" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 5 &#8211; It&#8217;s a bit slow if compared to competitors. Maybe it&#8217;s just me, maybe it&#8217;s the server, maybe it&#8217;s Ruby on Rails.</li> + <li><strong>Features:</strong> 7 &#8211; Saved copies, <span class="caps">AJAX</span> 5-star ratings, <span class="caps">AJAX</span> private/public lock, groups &amp; messages</li> + <li><strong>Simplicity:</strong> 8 &#8211; Fairly simple to learn and use, excellent documentation online</li> + <li><strong>Interface/Design:</strong> 10 &#8211; I really like Ma.gnolia&#8217;s website design over all the others: clean, simple and professional with <span class="caps">AJAX</span> features in the right place.</li> + <li><strong>Userbase:</strong> 6 &#8211; It&#8217;s fairly new so not many people are using it. It&#8217;s being pushed by Zeldman &amp; ALA&#8217;s crew though</li> + <li><em><strong>Overall Rating: 7.2</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +This <em>was</em> my first choice and the first social bookmarking site I reviewed<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup> and tried properly. It is developed in Ruby on Rails and it excels in simplicity and visual appearance, but it has some rather annoying CONs. First of all it&#8217;s a bit slow for my liking, especially now that I&#8217;m on dialup. Second, the search is currently limited to tags only: it&#8217;s obviously a temporary thing and it will be back soon though, but I gave it a 7 instead of a 8 for features for this reason.<br /> +Ads are visible on the top of every page &#8211; subscribe (soon) to remove them&#8230; oh well.</p> +<p><strong>Suitable for:</strong> Anyone, although it seems to be the choice of <em>web designers</em> and people involved in website development.</p> +<h3><a href="http://www.furl.net/">Furl</a><br /> +<img src="/img/pictures/socbook/furl.gif" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 7 &#8211; Fast enough, no complains and no unnecessary objects or images either.</li> + <li><strong>Features:</strong> 6 &#8211; saved copies, plenty of tools including their own toolbar, multiple categories but no tagclouds and not as customizeable as the others</li> + <li><strong>Simplicity:</strong> 7 &#8211; Simple, organized, essential. Documentation available.</li> + <li><strong>Interface/Design:</strong> 5 &#8211; This is nothing fancy at all compared to the others, a fairly <em>traditional</em> web interface. <em>Web 2.0?</em> &#8230;Pardon?</li> + <li><strong>Userbase:</strong> 8 &#8211; This is one of the oldest social bookmarking services and it&#8217;s easier than del.icio.us, that&#8217;s why the fairly large userbase.</li> + <li><em><strong>Overall Rating: 6.6</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +When I tried this service after trying the others I wasn&#8217;t impressed at all. The interface is fairly standard, all done in a traditional way, no <span class="caps">AJAX</span> at all: if you absolutely hate Web 2.0 hype, even when it&#8217;s actually useful, go for this. To rate a bookmark I must click on edit and select the rating from a select menu: our children wouldn&#8217;t believe it.<br /> +The good thing about Furl, and what made it popular, presumably, is its simplicity over other similar services like del.icio.us, that&#8217;s the most logical reason I could find to explain its popularity.</p> +<p><strong>Suitable for:</strong> Anyone, users against or not yet accustomed to Web 2.0 interactivity</p> +<h3><a href="http://www.spurl.net/">Spurl</a><br /> +<img src="/img/pictures/socbook/spurl.jpg" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 8 &#8211; Fast and pleasant to look at, no complaints</li> + <li><strong>Features:</strong> 7 &#8211; Saved copies, del.icio.us sync, useful stats, no ratings, multilingual, some quirks (see below)</li> + <li><strong>Simplicity:</strong> 8 &#8211; Yes, this is really simple and straightforward to use. Extensive documentation available.</li> + <li><strong>Interface/Design:</strong> 8 &#8211; A really clean, simple, but yet nice looking and organized interface.</li> + <li><strong>Userbase:</strong> 6 &#8211; Fairly popular, not as popular as del.icio.us but on the right track</li> + <li><em><strong>Overall Rating: 7.4</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +Now this is is an interesting service. The first thing that I really liked about it is the good del.icio.us integration: not excellent because it seems to take quite a bit to import my del.icio.us bookmarks, but everything you bookmark with Spurl can be send to del.icio.us at the same time and vice versa! They also offer interesting stats regarding your bookmarks, report broken links, cache webpages, etc. <br /> +Some annoying things must be noted though (hence the 7 in features): the bookmarklet will popup a window &#8211; not great; it doesn&#8217;t support ratings and the tag management could be improved: del.icio.us and ma.gnolia can <em>suggest</em> tags when saving a bookmarks, while Spurl unfortunately doesn&#8217;t. It also seems to be less tag-centric than the others (except for Furl of course). It is multi-language and offers a 18+ filter &#8211; but if you forget to mark a bookmark as &#8220;explicit&#8221; it won&#8217;t work, and as result you can get porn links on the homepage&#8230;</p> +<p><strong>Suitable for:</strong> Anyone, del.icio.us users who would like to try something new without losing sync with their favourite service.</p> +<h3><a href="http://myweb2.search.yahoo.com/">Yahoo MyWeb 2.0</a><br /> +<img src="/img/pictures/socbook/myweb2.0.jpg" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 6 &#8211; Not too fast, like other sites in the Yahoo network.</li> + <li><strong>Features:</strong> 5 &#8211; &#8220;Web 2.0&#8221;? Well, yes, it has tag clouds and allows bookmark sharing, but that&#8217;s about it.</li> + <li><strong>Simplicity:</strong> 7 &#8211; Integrated with Yahoo services (and toolbar), fairly easy to use, if you don&#8217;t know something the FAQs are handy.</li> + <li><strong>Interface/Design:</strong> 6 &#8211; Clean, simple and a bit boring &#8211; perhaps I&#8217;m just to used to the rest of the sites in the Yahoo network</li> + <li><strong>Userbase:</strong> 8 &#8211; Grab some random users and a big chunk of Yahoo enthusiasts: not bad!</li> + <li><em><strong>Overall Rating: 6.4</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +When I first read about it, I though: <em>look, Yahoo is ready to embrace the Web 2.0 philosophy</em>, then I tried it and changed my mind: it has tags, tag clouds, it allows sharing but nothing more than that. The interface is still Web 1.0, and <span class="caps">AJAX</span> methodologies are not used at all. <br /> +Basically this service grasps the basic concepts from del.icio.us &amp; C., simplifies them and re-presents them in a form which can be easily understood by the majority of Internet users of the planet (and primarly Yahoo users) and <em>yet</em> look innovative. Excellent marketing work, perhaps, but nothing too new or particularly useful there.</p> +<p><strong>Suitable for</strong>: Anyone, in particular Yahoo users for the excellent integration with the rest of Yahoo services.</p> +<h3><a href="http://www.blinklist.com/">Blinklist</a><br /> +<img src="/img/pictures/socbook/blinklist.gif" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 7 &#8211; Fast, especially considering the type of interface</li> + <li><strong>Features:</strong> 10 &#8211; The service which offers more features than anyone else, simply that. Ratings, quit bookmarks, video tutorials, <span class="caps">AJAX</span> where needed, tabs, starred links, message board etc. etc.</li> + <li><strong>Simplicity:</strong> 7 &#8211; Considering the amount of features it offers, it&#8217;s simple enough to use. Impressive Help section.</li> + <li><strong>Interface/Design:</strong> 9 &#8211; I really like its interface, the scary amount of <span class="caps">AJAX</span> code it uses et al. Not a 10 because the five icons at the top (Gnome-like?) don&#8217;t go well with the rest of the design, only that.</li> + <li><strong>Userbase:</strong> 7 &#8211; Not too popular, and new to the scene</li> + <li><em><strong>Overall Rating: 8</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +This should technically be the winner. These guys truly did their best trying to build perhaps the most &#8220;Web 2.0 compliant&#8221; social bookmarking service ever. The downside of it is just the huge amount of <span class="caps">AJAX</span> involved in all this, but if you&#8217;re fine with that, Blinklist is truly amazing. It uses a digg-like approach to <em>blink</em> the urls which appear on the site instantly: an <span class="caps">AJAX</span> div fades in allowing you to fill in the bookmark&#8217;s details and then it fades away incrementing the <em>blink</em> count and adding it to your collection. The private area has a quadri-tabbed sidebar with: 1) real-time chat, 2) popular tags view, 3) recent tags used, 4) cloud view. It supports site thumbnails but not saved copies unfortunately, advanced profiles, avatars, ratings&#8230; <br /> +Advanced, &#8220;cool&#8221; and (perhaps too much) on the edge. In Italian we have a word for things like this, but I won&#8217;t mention it here. Just think about <em>Fast and Furious</em>, the feeling when browsing this site can be similar to driving an heavily modded car: if you like the way it works, it&#8217;s the best thing ever &#8211; if not, well, del.icio.us does the job alright.</p> +<p><strong>Suitable for</strong>: Web 2.0 lovers, geeks, anyone brave enough to try it without getting too shocked</p> +<h3><a href="http://smarking.com/">Smarking</a><br /> +<img src="/img/pictures/socbook/smarking.jpg" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 7 &#8211; Nothing superfluous in the interface, but it could be faster</li> + <li><strong>Features:</strong> 8 &#8211; Proper messaging, advanced profiles, <span class="caps">STATS</span>!</li> + <li><strong>Simplicity:</strong> 7 &#8211; Easy to learn and use, has a <span class="caps">FAQ</span> and a wiki</li> + <li><strong>Interface/Design:</strong> 7 &#8211; Very traditional but functional interface. Not too fancy or advanced, but does the job</li> + <li><strong>Userbase:</strong> 4 &#8211; About 300 users</li> + <li><em><strong>Overall Rating: 6.8</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +Don&#8217;t expect anything too fancy from Smarking, but a few features caught my attention. For one, it supports a proper messaging system: other services allow you to send notes and a link to other users, while this one has a proper, built-in private messaging system&#8230; OK, not a big thing but nice to have. The design is not too great: it does the job but there&#8217;s hardly any image, nevermind <span class="caps">AJAX</span> effects or similar.<br /> +What really impressed me (hence the 8 in features), are the detailed stats that this service makes available publicly: detailed domain stats, tag stats, user stats and more while others simply don&#8217;t bother.<br /> +It was developed using Python and PostgreSQL by an Italian student of Computer Science &#8211; apparently there&#8217;s someone who is able to program properly in my country as well. Good job: nothing too exceptional as social bookmarking service, but an exemplary work.</p> +<p><strong>Suitable for</strong>: Italians in particular and everybody else as well.</p> +<h3><a href="http://www.shadows.com/">Shadows</a><br /> +<img src="/img/pictures/socbook/shadows.gif" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 5 &#8211; I don&#8217;t know if it&#8217;s because of Rails or the interface, but this site doesn&#8217;s seem to perform as well as the others</li> + <li><strong>Features:</strong> 7 &#8211; enhanced commenting, saved copies, thumbnails, groups</li> + <li><strong>Simplicity:</strong> 6 &#8211; The usual FAQs are there, but other than that there&#8217;s no particular effort to make newbie&#8217;s life easier</li> + <li><strong>Interface/Design:</strong> 5 &#8211; Simple but not quite pretty interface, no graphic effor whatsoever, <span class="caps">AJAX</span> for adding and editing comments</li> + <li><strong>Userbase:</strong> 6 &#8211; Not a tiny userbase but not huge either</li> + <li><em><strong>Overall Rating: 6</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +Maybe it&#8217;s just me, but I wasn&#8217;t too impressed by Shadows: it doesn&#8217;t offer any particular innovative feature other than enhanced commenting. You can start real discussions about your bookmarks and interact with other users fairly well, but the question is: do you really want to? Perhaps an interesting way to build communities, but other than that nothing special. <br /> +The interface is not too pretty, unlike Ma.gnolia it looks like they didn&#8217;t make a terrible effort trying to design something pleasant to look at and the final result is quite boring. They seem to support thumbnails, but clearly they use a third party service like Alexa because there&#8217;s hardly any thumbnail displayed, generally: wrong choice &#8211; see Blogmarks below for a better thumbnail support.<br /> +And yes, the default green smily default avatar is terribly cheesy and truly annoying (not that the others are any better&#8230;).</p> +<p><strong>Suitable for</strong>: Anybody? Nobody? Maybe people who like a more community-like approach</p> +<h3><a href="http://www.simpy.com/">Simpy</a><br /> +<img src="/img/pictures/socbook/simpy.png" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 7 &#8211; It&#8217;s fast, but again, its interface is not anything fancy</li> + <li><strong>Features:</strong> 7 &#8211; Detects broken links and redirections, notes, groups</li> + <li><strong>Simplicity:</strong> 6 &#8211; It has FAQs but it could look confusing for inexperienced users</li> + <li><strong>Interface/Design:</strong> 6 &#8211; Nothing special, no eye candy, no <span class="caps">AJAX</span> even where it would be appreciated</li> + <li><strong>Userbase:</strong> 7 &#8211; Medium-sized userbase</li> + <li><em><strong>Overall Rating: 6.6</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +The best feature offered by Simpy is the link detection service, able to detect broken links, duplicates and redirections. Everything else looks pretty normal and nothing special: it offers tag management, groups, notes, the usual tools. Copies of your bookmarks are <span class="caps">NOT</span> cached, and clicking on the <em>cached</em> link will take you to web.archive.org, hoping that it cached the page you&#8217;re looking for (hell even I could do that!).<br /> +No <span class="caps">AJAX</span>, nothing too pretty. Boring? Well, no, let&#8217;s call it functional and essential.</p> +<p><strong>Suitable for</strong>: Anybody, moderate experience required</p> +<h3><a href="http://blogmarks.net">Blogmarks</a><br /> +<img src="/img/pictures/socbook/blogmarks.jpg" alt="" /></h3> +<ul> + <li><strong>Speed:</strong> 5 &#8211; It&#8217;s slow. One of the main reasons ought to be the thumbnails: every bookmark has an associated image!</li> + <li><strong>Features:</strong> 7 &#8211; Excellent thumbnail support, Private tags, usual things</li> + <li><strong>Simplicity:</strong> 6 &#8211; It&#8217;s pretty straightforward, but there&#8217;s only one page to help new users</li> + <li><strong>Interface/Design:</strong> 7 &#8211; Simple and essential, no <span class="caps">AJAX</span>, not too fancy</li> + <li><strong>Userbase:</strong> 7 &#8211; One year old, medium userbase</li> + <li><em><strong>Overall Rating: 6.4</strong></em></li> +</ul> +<p><strong>Overview</strong><br /> +Again, nothing too special &#8211; except, of course, that <em>all</em> bookmarks have a thumbnail: a good thing which made me feel popular for about 0.7 seconds when I noticed a little picture showing my own site when someone bookmarked it, but on the other hand quite annoying and pointless for dialup users.<br /> +No Web 2.0 interface, just plain old stuff which does the job but is not particularly pleasant or innovative. Private tags? A good thing maybe, and probably the only real innovation compared to other similar services.</p> +<p><strong>Suitable for</strong>: Anybody, moderate experience required</p> +<h3>Conclusions</h3> +<p>Although del.icio.us is still the leading service for social bookmarking, its competitors are obviously getting better. Among the ones I reviewed today, at least some of them look promising: Blinklist is definitely the most advanced in terms of features offered and technology used, and I think I&#8217;ll try it out a bit more and see if it can be better than del.icio.us in the long run. Spurls is also tempting especially because it offers various interesting features without <em>forcing</em> you to abandon your del.icio.us account &#8211; and that was an excellent (and wise) feature Spurl developers chose to implement, without any doubt. Regarding my old favourite, Ma.gnolia, it still deserves a mention, mainly for being a succesful blend of latest technology and class design, without being too extreme.</p> +<p>So&#8230; what&#8217;s <em>your</em> favorite then?</p> +<h3>Notes and Resources</h3> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> Social Bookmarking, <a href="http://en.wikipedia.org/wiki/Social_bookmarking">Wikipedia Page</a></p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://del.icio.us/">del.icio.us</a>, the first social bookmarking service</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html">What is Web 2.0?</a> &#8211; O&#8217;Reilly article</p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> <a href="http://shakk.wordpress.com/2006/04/20/mother-of-all-social-bookmarking-services-icons/">Mother of all social bookmarking services icons</a> &#8211; A cool mosaic of all the social bookmarking sites&#8217; icons.</p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> Other reviews and comparisons of social bookmarking services:</p> +<ul> + <li>Social bookmarking <a href="http://h2obeta.law.harvard.edu/64211">resources</a></li> + <li><a href="http://www.irox.de/roxomatic/616/social-bookmarks-review">Comparison charts</a> of the most popular social bookmarking systems [<span class="caps">PDF</span>]</li> + <li>PCmag <a href="http://www.pcmag.com/article2/0,1895,1875208,00.asp">round-up</a> of various social bookmarking sites</li> + <li><a href="http://www.dlib.org/dlib/april05/hammond/04hammond.html">Social Bookmarking Tools (I) &#8211; A general review</a></li> + <li><a href="http://3spots.blogspot.com/2006/01/all-social-that-can-bookmark.html"><span class="caps">ALL</span> Social that <span class="caps">CAN</span> bookmark</a> &#8211; The most comprehensive review of social bookmarking sites.</li> +</ul> +<p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> <a href="http://www.h3rald.com/articles/view/ma.gnolia/">Ma.gnolia &#8211; Social bookmarking made (extremely) easy</a></p> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> <a href="http://ma.gnolia.com/">Ma.gnolia</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> <a href="http://www.furl.net/">Furl</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> <a href="http://www.spurl.net/">Spurl</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn10"><a href="#fnr10"><sup>10</sup></a> <a href="http://myweb2.search.yahoo.com/">Yahoo MyWeb 2.0</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn11"><a href="#fnr11"><sup>11</sup></a> <a href="http://www.blinklist.com/">Blinklist</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn12"><a href="#fnr12"><sup>12</sup></a> <a href="http://smarking.com/">Smarking</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn13"><a href="#fnr13"><sup>13</sup></a> <a href="http://www.shadows.com/">Shadows</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn14"><a href="#fnr14"><sup>14</sup></a> <a href="http://www.simpy.com/">Simpy</a> &#8211; Social bookmarking service</p> +<p class="footnote" id="fn15"><a href="#fnr15"><sup>15</sup></a> <a href="http://blogmarks.net/">Blogmarks</a> &#8211; Social bookmarking service</p>
A contents/articles/sqlyog5-review.html

@@ -0,0 +1,7 @@

+----- +title: SQLyog 5 - a fast and reliable MySQL front-end +content-type: article +timestamp: 1141131000 +tags: databases|review +----- +MySQL[1] is a great database solution. Literally millions of people who use it can tell you that it is a well-performing, feature-rich database solution for almost any size project: it is low-cost (often free), and available on the majority of webservers all over the world. When I first discovered MySQL while learning some basic PHP programming, I almost immediately wondered how I'd effectively access MySQL and manage my databases other than through PHP code or command line. I was pointed to PHPMyAdmin[2], which I still use as a quick, general-purpose MySQL front-end. However, I wondered if there was anything better than that, and maybe not confined within a browser window...<br /><br />There are a few desktop "cousins" of PHPMyAdmin out there, especially for Windows, which is not surprising. After a quick search, three products come up immediately: MySQL-Front[3], Navicat MySQL[4] and SQLyog[5], all of them are proprietary solutions and seem to be the most popular ones around. <br /><br /><em>Alright, which one is the best?</em><br /><br />There are many different criteria available to choose a winner among these three products. The easiest for me was simply: "which one is free?"<br /><br />- SQLyog, with some restrictions, is our instant winner. Both MySQL-Front and Navicat MySQL offer a 30-day trial, while SQLyog can be free for life but only with basic features. However, the number of basic features is considerable.<br /><br /><strong>First impressions</strong><br />After launching SQLyog (free edition), a small and not-too-annoying nag screen appears: you click on it and it goes away, it doesn't last for 10 seconds like some others. The same screen appears when you try to access the power tools and advanced features which are not included in the free edition. I got used to it after a short while, and that's the only annoyance of the free version of the product. <br /><br />The program's interface seems a bit unconventional for the traditional Windows user, especially if compared to the other two products. The main window is divided into four parts: the main menu and a navigation bar underneath it, a left column listing all the databases and tables in an expandable tree, the top half of the main window which hosts a SQL editor, and the lower half with everything else, including a tabbed area for displaying query results, messages, table data, table structure and history.<br /><br />It seems as if the SQL editor should be in a tab as well, but after using SQLYog for a while, you understand why is not: the editor has been positioned such that it can be used often, easily, and immediately. It took me a while to figure this out, but once you embrace this philosophy, you'll never stop using this program; all front-ends include a query editor, but it's often relatively hidden, meaning that it is at least one or two clicks away from the rest of the interface.<br /><br /><br /><strong>Main Features</strong><br />After specifying your credentials, the program will connect to the MySQL server and list all of the available databases in an Explorer-like left side panel. All tables can be accessed by clicking once on the corresponding database. All column fields, indexes and triggers (if any) are displayed by clicking on each table name.<br /><br /><em>So when I click on a database or a table the corresponding structure is displayed, right?</em><br /><br />Wrong. When you do that, nothing happens. Remember the multi-tabbed lower panel, which is supposed to display results, table data, objects, etc.? Well, the focus is set to the <em>Result</em> column by default, so if you want to display the database or table structure you need to click on the <em>Objects</em> table, and voil� , the structure appears. Fortunately this behaviour can be changed by modifying the program's options, through the Tools menu.<br /> <br />Clicking on <em>Table data</em> will display the first 50 records of the selected table, while the <em>Result</em> and <em>Messages</em> tabs will still be empty; the editor wasn't used, so there's no result to show, and we didn't get any errors or other messages from MySQL yet, so everything is as it should be.<br /><br />The most interesting feature from an educational point of view, so far, is actually the <em>History</em> tab, which is just one click away and shows the following:<br /><br /><code><br />/*[11:11:11 AM][ 0 ms]*/ show variables like '%character%'<br />/*[11:11:11 AM][ 0 ms]*/ Set character_set_connection=latin1<br />/*[11:11:11 AM][ 0 ms]*/ Set character_set_results=latin1<br />/*[11:11:11 AM][ 0 ms]*/ Set character_set_client=latin1<br />/*[11:11:11 AM][ 0 ms]*/ set sql_mode=''<br />/*[11:11:11 AM][ 15 ms]*/ show databases<br />/*[11:11:22 AM][ 0 ms]*/ use `zzine_drupal`<br />/*[11:11:23 AM][ 203 ms]*/ select `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` <br /> where `TABLE_SCHEMA` = 'zzine_drupal' and `TABLE_TYPE` = 'BASE TABLE'<br />/*[11:11:32 AM][ 47 ms]*/ show full fields from `zzine_drupal`.`node`<br />/*[11:11:32 AM][ 140 ms]*/ show keys from `zzine_drupal`.`node`<br />/*[11:11:32 AM][ 0 ms]*/ select * from `zzine_drupal`.`node` limit 0, 50<br /></code><br /><br />The above is a log of all the SQL commands which were sent to the server so far: the program connected and showed all the databases, I clicked on the "zzine_drupal" database, got some info about it, and then clicked on the <em>node</em> table and displayed the first 50 records. So, if you are new to SQL and want to learn the syntax to query the database you can just have a glance at this tab every so often.<br /><br />Note that the time to execute a query is displayed in ms, and it's not wrong! SQLyog actually performs quite well, as boasted on the official site's features page[6]: <em>"[it] uses native MySQL C API - the fastest way to communicate with MySQL server"</em> - and they do mean it.<br /><br /><em>What else does SQLYog offer?</em><br /><br /> The free version includes the most used features, like the very two most basic operations: you can query the database by typing an SQL query into the editor and executing it (F5 or F8 if you want to edit the results) and change the value of each field through a convenient blob editor, which can display text or images, import content from a file or save it locally.<br />Then the program groups all functionalities in standard dropdown menus on the top bar, and also presents the most used operations as clickable icons as well. Now, this can be handy, but the program displays 25+ icons without any text underneath, so either you keep hovering your mouse on each one waiting for an explanation message to appear, or you just use the standard dropdown menus anyway. The authors did an outstanding job creating an icon for (literally) every action: they are quite well made and explanatory enough if you look at them carefully, but they are still very similar, and too numerous to memorize.<br /><br />However, SQLyog is also 100% keyboard friendly, as almost every function has a shortcut. Memorizing just a few of them, and it's worthwhile, as it makes everything much faster. At any rate it's better than memorizing all the icons instead!<br /><br />Let's examine each dropdown menu and the functions listed in them.<br /><br /><span style="text-decoration:underline;">File</span><br />This menu lists all the functions concerning database connection and disconnection, opening and saving SQL files, and opening new query tabs - the SQL editor panel can have multiple tabs.<br /><br /><span style="text-decoration:underline;">Edit</span><br />This menu refers to the SQL editor, not to the query results! It includes functions like execute queries, copy, paste, cut, undo, redo and find/replace, which does not find strings in a record/table/database, but only in the SQL editor. I do believe the "Find in Database" function is missing in SQLyog, and is present in some of the competitors, but you can search your database using the appropriate SQL queries, right? Maybe - in my opinion - an advanced <em>Find <something> in <somewhere></em> wizard or dialogue should be implemented - as the developers seem to be very good at creating those types of things, we'll soon find out.<br /><br /><span style="text-decoration:underline;">DB</span><br />Maybe I'd have called this "database" for the sake of newbies, but this menu indeed groups all database-related functionalities together. Create/truncate/drop databases, create table and create view (maybe they could have been placed under the <em>table</em> menu), and other interesting features like creating an HTML schema on the database and even copying a whole database (or just a few tables) to a different host (even remote, if accessible) with a single click! It works, just don't try to copy a database onto another remote server on a 56K dialup connection, like I did...<br /><br /><br /><span style="text-decoration:underline;">Tables</span><br />Another self-explanatory menu, listing all table-related operations like create, alter, rename, empty, drop, import, export tables, manage indexes, rearrange columns, etc. All these functions can be performed through wizards, dialogues or other equally simple methods that any average Windows user should be familiar with. There are only a few exception here and in other menus: when wizards would be inappropriate or inadequate for certain actions, SQLyog prepares a "template query" and lets the user fill it in, typically for more advanced needs, such as if you want to create a new (MySQL 5.0+ only) <em>trigger</em> named <em>test</em> on the <em>node</em> table of the aforementioned zzine_drupal database. For this, SQLyog prepares the following query template: <br /><br /><code><br />DELIMITER $$;<br /><br />DROP TRIGGER `zzine_drupal`.`test`$$<br /><br />CREATE TRIGGER `zzine_drupal`.`test` BEFORE/AFTER INSERT/UPDATE/DELETE on `zzine_drupal`.`node`<br />FOR EACH ROW BEGIN<br /><br />END$$<br /><br />DELIMITER ;$$<br /></code> <br /><br />...just remember to modify it according to your needs!<br />Do you like SQLyog's query templates? Check out Edit->Insert Templates and there's almost everything for every taste.<br /><br /><br /><span style="text-decoration:underline;">Objects</span><br />Presumably the authors created this menu to group some advanced or new functionalities together, but everything listed here is already present in one of the other menus: management of functions and triggers, view-related actions, and stored procedures... except for the <em>Drop Column</em> action, which is only available under this menu.<br /><br /><span style="text-decoration:underline;">Tools</span><br />This menu also lists two actions which we already saw under the <em>DB</em> menu, which is exporting or importing a database. however, there is also an <em>Export resultset</em> wizard, as well as a very handy user management tool, information about the current database, and the program preferences.<br /><br />The program preferences apparently have two settings which perhaps should be changed by default, which concern the previously mentioned weird tab focus: if you'd like something more intuitive and you don't need (or want) to use the SQL editor a lot, you can safely unclick the "Keep focus on SQL Editor after query execution" and click the "Always select Objects tab when a new item is selected".<br /><br />Believe it or not, you get all this for free. No charge, no trial periods: these are the actual features offered by the free edition of SQLyog! No surprise that over 500,000 people already downloaded it!<br /><br />What's in the <em>Professional</em> and in the <em>Enterprise</em> edition then? Nothing much, and <em>Power tools</em>.<br /><br /><br /><strong>"Power Tools"</strong><br />When I wrote <em>nothing much</em> earlier I actually referred to the Professional Edition, which - as the feature matrix shows[8]- doesn't offer anything more than the free edition: basically you pay $9 to get rid of the nag screens, which are normally not very intrusive...<br /><br /><span style="text-decoration:underline;">Tunneling</span><br />On the contrary, the Enterprise Edition ($49) has a lot of very interesting advanced tools which are actually worthwhile to have. Perhaps the most essential feature missing in the free version, especially for people using a remote hosting solution, is <em>tunnelling</em>. You can use SQLyog to connect to a remote server, theoretically; in reality though, in order to do so your hosting provider must allow privileged remote connections to the database (i.e. <user>@% instead of <user>@localhost), which is not permitted 98% of the time for security reasons. So how can you use SQLyog to access your remote database(s)? With tunneling.<br />The concept is simple: even if privileged remote connections are normally not permitted, privileged local connections are. So all you need to do is place a PHP script on your server, somewhere accessible, and specify it as a parameter for HTTP tunneling before establishing the connection; SQLyog will then access the script and the script will basically forward SQLyog's instruction to the database server, just as if the commands were issued locally. <br /><br /><em>I will never allow commands to be sent to my server unencrypted and through a PHP script, which can be exploited by the first script-kiddie passing by!</em><br /><br />This is a common, slightly biased, but ultimately reasonable concern, and for $49 you can also get SSH tunneling, provided that your host allows you to connect to the server through a SSH shell. I tried this option and it worked perfectly: with a 2MB/s ADSL connection all went smoothly and fast: the program proved to be a valid alternative to PHPMyAdmin in terms of speed and responsiveness. <br />Do not try this on a 56K connection! It's not worthwhile, and probably not even conceived of by the developers. As I always want to try extreme solutions, I also tried SSH tunneling on dialup and my final conclusion was: <em>stick with PHPMyAdmin</em>. SQLyog seems to have been developed in order to achieve relatively immediate responses, as a result, when a low speed connection is used to connect to a remote database, the program may hang for a little while before delivering results and executing queries as normal. Perhaps there's room for improvement here: it would be great to have progress bars display when an operation takes more time than normal.<br /><br /><span style="text-decoration:underline;">Database Synchronization and Migration</span><br />A common and useful feature you should expect from a MySQL front-end is a synchronization utility, and SQLyog has one: by clicking on <em>Database Synchronization</em> under the Powertools menu you can start a quick and easy synchronization wizard, to automatically update two databases. Simply provide the connection details (even if they are on different hosts or require tunneling), and select the databases you want to synchronize, also specifying if you want a two-way synchronization or only one way. A similar function is <em>structure synchronization</em>, which can be used to keep only the structure (not the data) up-to-date between two databases. You won't be asked to create two new connections, but the operation can only be performed on databases that are already accessed by SQLyog.<br /><br />For more information on how to take advantage of SQLyog's advanced synchronization features, I recommend reading a very informative article specifically devoted to this subject, available online[8].<br /><br />Another VERY interesting features SQLyog offers (which has been the subject of a whole article on DatabaseJournal.com[9]) is the possibility to easily migrate to MySQL from other ODBC sources. Through a relatively painless wizard it is possible to migrate from another database type to MySQL, while making sure that any errors are handled as expected.<br /><br /><span style="text-decoration:underline;">Periodic Tasks and Management</span> <br />MySQL is a wonderful relational database, but it fundamentally lacks the ability to execute scheduled queries and operations, which are normally accomplished by server-side scripts. SQLyog offers you the opportunity to easily create and administer periodic tasks, notifications and backups via a few wizards: the <em>Notification Services</em> wizard, which can be used to send the result of a particular user-defined periodic query to an email address or execute maintenance queries, and the <em>Scheduled Backups</em> wizard to automate full or partial database backups and exports. Webyog[10] itself offers an informative how-to[10] on these tasks, step-by-step with screenshots. Last but not least, you can manage all these scheduled jobs through a very handy <em>job manager</em> located in the <em>Powertools</em> menu.<br /><br /><br /><strong>Final Judgement</strong><br />SQLyog is a well-rounded, multi-functional front-end for MySQL which can be used by both newbies and more experienced users to manage their databases. I'd clean up and reorganize the interface a little bit and remove a lot of the icons as well as list all the functions under the top menus, possibly <em>without</em> the icons and without repeating the same function anywhere.<br /><br />Apart from those small items, SQLyog is definitely worth a shot, and the Webyog team definitely did a good job in this fifth version by incorporating all the latest MySQL 5 functionalities in an already excellent program. The free version in particular offers quite a wide range of functionalities with no trial period, and this certainly helped the program to grow in popularity. I would never buy the Professional edition, simply because it only gets rid of nag screens without offering nothing new over and above the Free Edition. On the other hand, the Enterprise Edition is an excellent and inexpensive solution if you need the power tools.<br /><br />SQLyog is just a few clicks away[11], only 7 Megabytes, and ready to install! <br /><br /><br /><strong>Notes</strong><br /><small>[1]MySQL - Official Site: <a href="http://www.mysql.com/">http://www.mysql.com/</a> <br />[2]PHPMyAdmin - Official Site: <a href="http://www.phpmyadmin.net/home_page/index.php">http://www.phpmyadmin.net/home_page/index.php</a><br />[3]MySQL-Front: <a href="http://www.mysqlfront.de/">http://www.mysqlfront.de/</a><br />[4]Navicat MySQL: <a href="http://www.navicat.com/">http://www.navicat.com/</a><br />[5]Webyog Website: <a href="http://www.webyog.com/">http://www.webyog.com/</a><br />[6]SQLyog, feature page: <a href="http://www.webyog.com/sqlyog/index.php ">http://www.webyog.com/sqlyog/index.php </a><br />[7]SQLyog, features matrix: <a href="http://www.webyog.com/sqlyog/featurematrix.html">http://www.webyog.com/sqlyog/featurematrix.html</a><br />[8] Peter Laursen & Quy Ton, "Using SQLyog Enterprise to Effectively Synchronize MySQL Databases" (PDF):<br /><a href="http://www.webyog.com/articles/Using_SQLyog_Enterprise_to_Effectively_Synchronize_MySQL_Databases.pdf">http://www.webyog.com/articles/Using_SQLyog_Enterprise_to_Effectively_Synchronize_MySQL_Databases.pdf</a><br />[9] Peter Laursen, "Migration to MySQL with SQLyog ver 4.1" : <a href="http://www.databasejournal.com/features/mysql/article.php/10897_3550146">http://www.databasejournal.com/features/mysql/article.php/10897_3550146</a><br />[10]Webyog, "How to use Scheduled Backups with SQLyog": <a href="http://www.webyog.com/articles/how_to_use_scheduled_backup.html">http://www.webyog.com/articles/how_to_use_scheduled_backup.html</a><br /></small><br />
A contents/articles/succeeding-with-agile-review.html

@@ -0,0 +1,99 @@

+----- +title: Book Review: Succeeding with Agile +content-type: article +timestamp: 1272197788 +tags: review|productivity|books|software +pdf: true +----- + + <section class="section"> +<blockquote> +<p>&#8220;This is not a book for those who are completely new to <em>Scrum</em> or <em>agile</em>. There are other books, classes, and even websites for that. If you are completely new to <em>Scrum</em>, start with one of those.&#8221;</p> +</blockquote> +<p style="padding-left:5em;">&#8212; Mike Cohn, <em>Succeeding with Agile</em></p> +<p>Great. That&#8217;s just great. Good job I started with the <em>Introduction</em> first, otherwise the first chapters of this book would have been way too overwhelming!</p> +<p><a href="http://www.succeedingwithagile.com/"><em>Succeeding with Agile</em></a> is a book that <em>doesn&#8217;t</em> teach you about <em>Scrum</em> or <em>agile</em> methodologies, it won&#8217;t give you a definition of ScrumMaster, sprint, or backlog&#8230; instead, it takes all that for granted and teaches how to pragmatically adopt &#8212; or better, <acronym title="Awareness, Desire, Ability, Promotion, Transfer"><span class="caps">ADAPT</span></acronym> to &#8212; <em>Scrum</em>, in the context of yourself, your team, and even your entire organization.</p> +<blockquote> +<p>&#8220;[&#8230;] this book draws on my experience with <em>Scrum</em> over the past 15 years, but especialle the last 4. For the last 4 years, every evening after I spent the day with one of my clients, I would go back to my hotel room and make notes about problems they were facing, the question they asked, and the advice I gave.&#8221;</p> +</blockquote> +<p>Indeed, this book is a gold mine of information, anecdotes, tips and tricks about everything you could possibly want to know about making <em>Scrum</em> work, at any level. If you have some knowledge about <em>agile</em> development you definitely have some questions: <em>will it work?</em> &#8230; <em>is it really more productive?</em> &#8230; <em>how can I make my boss understant this?</em>. This book has all the answers you need. Most definitely, it also answer questions you didn&#8217;t think of.</p> +<p>If you don&#8217;t know what all this is about, then you&#8217;d better do your homework first:</p> +<ul> + <li><a href="http://www.mountaingoatsoftware.com/topics/scrum">Introduction to <em>Scrum</em> &#8211; An Agile Process</a></li> + <li><a href="http://en.wikipedia.org/wiki/_Scrum__(development)"><em>Scrum</em> (Wikipedia Page)</a></li> + <li><a href="http://www.scrumalliance.org/"><em>Scrum</em> Alliance</a></li> + <li><a href="http://www.scrum.org/"><em>Scrum</em>.org</a></li> +</ul> + +<section class="section"> +<header><h1 id="h_1" class="toc">Overview</h1></header> +<img src="/img/pictures/succeeding-with-agile.jpg" style="float:left;" /> +<p>The book is organized into five parts of different length, ranging from 20 to over 100 pages. If you read the book from the start till the very end, you&#8217;ll notice that the start of each part is like a new milestone in <em>Scrum</em> adoption: first the author makes sure that <em>you</em> are prepared (Part 1), then moves on to deal with individuals and initial resistance (Part 2), then teams (Part 3) and finally the whole organization (Part 4), until you can finally taste the fruits of you labor (Part 5).</p> +<p>In a way, you may well want to carry this book in your briefcase every day you go to work, and read it bit by bit, as you make progress in your quest for <em>Scrum</em> adoption.</p> + + <section class="section"> +<header><h1 id="h_2" class="toc">Part I: Getting Started</h1></header> +<p>Part I is about making sure you know <em>why</em> becoming gile is important and beneficial to you and your work environment. It will teach you how to promote <em>Scrum</em>, its advantages and challenges, and the different ways to go about it: Start Small or Go All In? Stealth or Public Display? Things like that. Pointless theory? Not really: everything is well documented, with success stories to support one way or the other.</p> + +</section> + + <section class="section"> +<header><h1 id="h_3" class="toc">Part II: Individuals</h1></header> +<p>This part was very interesting from a psychological point of view: it deals with individuals and their possible reactions to becoming <em>agile</em>. You&#8217;ll meet <em>skeptics</em>, <em>followers</em>, <em>saboteurs</em> and <em>diehards</em> &#8212; no hope? Well, of course not: you&#8217;ll learn how to deal with each one of them in the best way possible. This part will also introduce you to new roles and responsabilities related to <em>Scrum</em>.</p> + +</section> + + <section class="section"> +<header><h1 id="h_4" class="toc">Part III: Teams</h1></header> +<p>Up next, Teams. You&#8217;re no longer dealing with single-minded individuals, but with more complex groups. New challenges emerge, mostly related to communication and people interactions. I particularly enjoyed <strong>Chapter 13 &#8212; The Product Backlog</strong>, which provides invaluable insights on this important everyday tool. <strong>Chapter 15 &#8212; Planning</strong> is another interesting read: it teaches you a lot about planning vs. estimating, and coming to compromises to meet deadlines.</p> + +</section> + + <section class="section"> +<header><h1 id="h_5" class="toc">Part IV: The Organization</h1></header> +<p>If you made it up to here, then you&#8217;re nearly done. You probably know most of the tricks by now, but there&#8217;s still a lot to learn. <strong>Chapter 17 &#8212; Scaling <em>Scrum</em></strong> is definitely worth reading, even just for the analysis between <em>formal</em> and <em>informal communities</em>, while <strong>Chapter 19 &#8212;Cohexisting with Other Approaches</strong> almost feels heretical at times: mixing <em>Scrum</em> with Waterfall? Is that even conceivable? Yes. Sometimes it&#8217;s the only way, especially when you have to deal with compliance to standards like ISO9001. Once again, the author has a nice success story on how a company passed an ISO9001 audit by providing documentation in form of photocopied notes and by adding a single failing test to persuade the auditor that the automated test suite was not rigged. Priceless.</p> + +</section> + + <section class="section"> +<header><h1 id="h_6" class="toc">Part V: Next Steps</h1></header> +<p>Only two chapters in this part of the book, which mainly deals with (self) assessment and progress analysis. Still worth a read, but you can safely leave it out for when you succeeded with <em>agile</em>.</p> + +</section> + +</section> + +<section class="section"> +<header><h1 id="h_7" class="toc">Technical Analysis</h1></header> +<p>I&#8217;m not exaggerating when I say that this is <em>by far</em> the best book I&#8217;ve read in the past few years when it comes to the way it is organized. Start by reading the <a href="http://my.safaribooksonline.com/9780321660534?portal=informit">table of contents</a>: if you take each chapter out and make a bulletted list of each section you&#8217;ll end up with a handy (and free!) cheat sheet on how to promote and adopt Agile methodologies.</p> +<p>This doesn&#8217;t mean the book isn&#8217;t a worthwhile read, but rather that it can also be used as a reference when needed.</p> + +<section class="section"> +<header><h1 id="h_8" class="toc">Formatting and Readability</h1></header> +<p>From a technical writing point of view, this book is spotless. I should keep it on my desk to remind me how technical documentation should be written, except that&#8230; it&#8217;s not a technical manual of course. But the formatting and the way content is laid out can make the most skilled technical writer very jealous: there&#8217;s never a huge blob of boring text, never a series of pointless pictures: Mike Cohn (or his editors) did a terrific job composing this book.</p> +<p>You can start reading it from any point and it still makes sense, diagrams are simple and clear, and yet extremely useful, and so are the reference tables and spreadsheets. They never hurt, they are always in the right place, at the right time. And bold text is aptly used at the start of list items, so that even if you skim through the key concepts will still make it to your brain. Excellent.</p> + +</section> + +<section class="section"> +<header><h1 id="h_9" class="toc">Style and Contents</h1></header> +<p>Reading this book is like listening to a seminar hold by some charismatic icon like <a href="http://en.wikipedia.org/wiki/David_Allen_(author)">David Allen</a> or <a href="http://en.wikipedia.org/wiki/JoAnn_Hackos">JoAnn Hackos</a>: you never get bored, and you constantly learn something. Mike&#8217;s informal and conversational style is one of the main reasons why you should read this book instead of others on the subject: he is a great communicator, and he knows how to make his point across.</p> +<p>As an added value, Mike also uses two types of <em>boxes</em> throughout the book:</p> +<ul> + <li><strong>Things to try now</strong> &#8212; Whenever a new strategy or practice is introduced, you&#8217;ll find one of these boxes containing a bulleted list. <em>&#8220;Commit to running the next two or three sprints without any overtime&#8221;</em>, &#8220;Do you understand what motivates every other person on your team? If not, find out. How? Ask them.&#8221;, &#8230; these are just examples of some of the author&#8217;s reccommendations to put you in the right track.</li> + <li><strong>Objection</strong> &#8212; Either actual quotes from customers and employees, or possible statements which may come out throughout the process of adopting <em>Scrum</em>. Things like <em>&#8220;If the product includes less than what we&#8217;ve planned, no one will buy it&#8221;</em>, or <em>&#8220;My team won&#8217;t self organize; team members are too passive and look to me to lead&#8221;</em>, &#8230; of course, what makes these objection boxes valuable is not the statement themselves, but the tips on how what to do about them. There&#8217;s not a single one left unanswered: you really feel you&#8217;re covered in any situation.</li> +</ul> + +</section> + +</section> + +<section class="section"> +<header><h1 id="h_10" class="toc">Final Thoughts</h1></header> +<p>I really enjoyed this book. It took me ages to read it, not only because it&#8217;s quite long (450 pages), but also because it&#8217;s very dense of information. Another author could have made it three times longer, but I was glad Mike didn&#8217;t. I&#8217;m pretty certain I&#8217;ll keep it near me and read bits from it when I need to: it&#8217;s pretty much the Bible of <em>Scrum</em> adoption.</p> +<p>What&#8217;s wrong with it then? Not much. Perhaps the only thing I really missed was an introductory 50-page-chapter on <em>Scrum</em> and <em>agile</em>. I know this is not meant to be a book for beginners, but some basic glossary or <em>Scrum</em> cheat sheet would have made it accessible to an even wider audience, at virtually no cost for the author or the readers, who could have just skipped that part.</p> +<p>Anyhow, I give it a 9 out of 10.</p> + +</section> + +</section>
A contents/articles/take-back-your-site-with-nanoc.html

@@ -0,0 +1,300 @@

+----- +title: Take back your site, with nanoc! +content-type: article +subtitle: How I turned H3RALD.com into a 100% static, hassle-free web site +popular: true +timestamp: 1253014371 +tags: website|ruby|programming|writing +----- +<h3>Why I don&#8217;t need a blog platform</h3> +<p>There&#8217;s nothing inherently wrong with blog platforms like Wordpress: they allow <em>anyone</em> to publish content on the web using a user-friendly administration area. They were built with one thing in mind: make publishing content on the web something as simple as possible, even for people who don&#8217;t know anything about <span class="caps">HTML</span>, let alone server-side scripting.</p> +<p>What about people who <em>do</em> know about web development though? Do they still need a blog platform? Depends. If you are comfortable with editing files using a text editor, if you enjoy using the command-line on a daily basis, if you like programming and <em>hacking</em> a little bit, if you don&#8217;t really care about fancy and user-friendly administration backends&#8230; <em>then you probably don&#8217;t</em>.</p> +<p>All you need is a system to transform a bunch of source files into a web site. The good news is that such system exists &ndash; and you&#8217;re also spoiled for choices!</p> +<h3>Introducing site compilers</h3> +<p>The first <em>site compiler</em> I discovered was <a href="http://webby.rubyforge.org/">Webby</a>:</p> +<blockquote> +<p>[&#8230;] Webby works by combining the contents of a page with a layout to produce <span class="caps">HTML</span>. The layout contains everything common to all the pages &mdash; <span class="caps">HTML</span> headers, navigation menu, footer, etc. &mdash; and the page contains just the information for that page. You can use your favorite markup language to write your pages; Webby supports quite a few.</p> +</blockquote> +<p>There are quite a few applications like Webby, such as:</p> +<ul> + <li><a href="http://nanoc.stoneship.org/">nanoc</a></li> + <li><a href="http://snk.tuxfamily.org/lib/rassmalog/doc/guide.html">Rassmalog</a></li> + <li><a href="http://www.jekyllrb.com/">Jeckyll</a></li> + <li><a href="http://webgen.rubyforge.org/">WebGen</a></li> + <li><a href="http://rog.rubyforge.org/">Rog</a></li> + <li><a href="http://rote.rubyforge.org/">Rote</a></li> + <li><a href="http://hobix.com/">Hobix</a></li> + <li><a href="http://rakeweb.rubyforge.org/wiki/wiki.pl">RakeWeb</a></li> + <li><a href="http://www.apeth.com/RubyFrontierDocs/default.html">RubyFrontier</a></li> + <li><a href="http://staticmatic.rubyforge.org/">StaticMatic</a></li> + <li><a href="http://staticweb.rubyforge.org/">StaticWeb</a></li> + <li><a href="http://www.zenspider.com/ZSS/Products/ZenWeb/">ZenWeb</a></li> + <li><a href="http://yurtcms.roberthahn.ca/">YurtCMS</a></li> + <li><a href="http://nanoblogger.sourceforge.net/">NanoBlogger</a></li> +</ul> +<p>There are probably even more, with different features, but they all try to solve the same problem: provide a way to generate static web sites in an automated way.</p> +<p>I spent some time reading about each one of them, <a href="http://github.com/h3rald/h3rald/issues/closed#issue/1">evaluating the pros and cons</a> and in the end I decided to go for <a href="http://nanoc.stoneship.org/">nanoc</a>, simply because it was the only one that seemed to fit all my needs.</p> +<h3>A quick overview of nanoc</h3> +<p>nanoc is a nifty tool written in Ruby suitable for <em>[&#8230;] building small to medium-sized websites</em>. In other words, anything which doesn&#8217;t involve some fancy user interaction. For what concerns blogs, the only user interaction is <em>comments</em> &ndash; but that&#8217;s fine, because there&#8217;s more than one web service for that, such as <a href="http://disqus.com/">Disqus</a> or <a href="http://intensedebate.com/">IntenseDebate</a>.</p> +<h4>Some details on the project</h4> +<p>Compared to the alternatives, nanoc is one of the most mature and most maintained, having hit just a few weeks ago its 3.0 release. Its creator, Denis Defreyne, uses it for his own <a href="http://stoneship.org/">web site</a> and is involved with the project on a daily basis, both coding and offering support to nanoc users like myself who regularly ask questions on the <a href="http://groups.google.com/group/nanoc">nanoc user group</a>.</p> +<p>Denis also seems very concerned about keeping documentation up-to-date &ndash; something that really impressed me from a technical writer&#8217;s point of view. The <a href="http://nanoc.stoneship.org/tutorial/">tutorial</a> he put together will get you started in no time, and the <a href="http://nanoc.stoneship.org/manual/">manual</a> will explain everything else you may possibly want to know. When release 3.0 came out he even put together a <a href="http://nanoc.stoneship.org/migrating/">migration guide</a>. If this is still not enough and you don&#8217;t mind spending some time extending the system, nanoc&#8217;s <a href="http://nanoc.stoneship.org/doc/3.0.0/">RDoc documentation</a> is very comprehensive compared to other Ruby projects.</p> +<h4>Sites, Items and data sources</h4> +<p style="float:right;"><img src="/img/pictures/nanoc-structure.png" alt="" /></p> +<p>nanoc ships with a really neat command line tool that can do most of the work for you. <code>Nanoc3 create_site h3rald</code> will create a new web site in a folder called h3rald. The contents of this folder are laid out according to a particular logic (<em>convention over configuration</em>, remember?) So:</p> +<ul> + <li><strong>content</strong> &ndash; your articles, pages, stylesheets, images, &#8230;all the site content and assets.</li> + <li><strong>layouts</strong> &ndash; the site layouts (and partial layouts)</li> + <li><strong>lib</strong> &ndash; place your custom ruby code and vendor libraries here</li> + <li><strong>output</strong> &ndash; your &#8220;compiled&#8221; site, ready to be deployed</li> + <li><strong>config.yaml</strong> &ndash; your site&#8217;s configuration file. The only one (and it&#8217;s just a few lines)</li> + <li><strong>Rakefile</strong> &ndash; place any custom Rake task here</li> + <li><strong>Rules</strong> &ndash; defines the rules for compilation, layout and routing</li> +</ul> +<p>Here&#8217;s the default <code>config.yaml</code> file:</p> +<div class='yaml'><pre><code>--- +data_sources: +- items_root: / + layouts_root: / + type: filesystem_compact + output_dir: output</code></pre></div><p>A <em>data source</em> in nanoc defines where data is retrieved from to create the web site. By default, the <a href="http://nanoc.stoneship.org/doc/3.0.0/Nanoc3/DataSources/FilesystemCompact.html">filesystem_compact</a> data source requires that you create two files in the /content folder for each article or page of your web page:</p> +<ul> + <li>One containing the actual content of the page</li> + <li>Another for the page&#8217;s arbitrary metadata</li> +</ul> +<p>By personal preference, I chose the <a href="http://nanoc.stoneship.org/doc/3.0/Nanoc3/DataSources/FilesystemCombined.html">filesystem_combined</a> data source, which allows you to combine the content and the metadata of a page in a single file.</p> +<p>The source code for this very article, for example, starts like this:</p> +<div class='text'><pre><code>----- +type: article +tags: +- website +- ruby +- programming +- writing +date: 2009-09-15 13:32:51.049000 +02:00 +permalink: take-back-your-site-with-nanoc +title: "Take back your site, with nanoc!" +toc: true +----- +Back in 2004, when I bought the h3rald.com domain, this site was static. At the time I hardly +knew HTML and CSS, nevermind server-side languages, so I remember creating a _pseudo-template_ for + the web site layout and using it whenever I wanted to create a new page, to preserve the overall look-and-feel. +This was a crude and inefficient strategy, of course: whenever I changed the layout I had to replicate the change + in all the pages of the site &ndash; the whole eight of them.</code></pre></div><p>At run time, the content goes through a Textile filter and the metadata is used in layouts, to generate tag links automatically, for example.</p> +<h4>Layouts, filters, and helpers</h4> +<p>Layouts in nanoc are similar to layouts and views in Rails, but much simpler. The same applies to helpers. Here&#8217;s a snippet from my <a href="http://github.com/h3rald/h3rald/tree/master/layouts/default.erb">default layout</a>:</p> +<div class='text'><pre><code>&lt;div id="container"&gt; + &lt;!-- CONTENT START --&gt; + &lt;div id="content" class="clearfix<%= (@item[:permalink] == 'home') ? ' home' : ' standard' %>"&gt; + &lt;h2&gt;<%= @item[:title] %>&lt;/h2&gt; + <% case @item[:type] + when 'article' then%> + &lt;div id="content-header"&gt; + <%= render 'article_meta', :article =&gt; @item %> + &lt;/div&gt; + <% end %> + &lt;hr /&gt; + &lt;div id="content-body"&gt; + <%= yield %> + &lt;/div&gt; + &lt;div id="content-footer"&gt; + &lt;div class="share"&gt; + &lt;script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=6e34d60c-b14e-4c19-9b2f-7c35a9f0ab09&amp;type=website&amp;linkfg=%23a4282d"&gt;&lt;/script&gt; + <% if @item[:feed] then %> + &lt;a href="<% @item[:feed_url] || @item[:feed]+"rss/" %>" type="application/rss+xml" rel="alternate"&gt;&lt;img src="/images/theme/feed-icon-14x14.png" alt="#"/&gt;H3RALD - <%= @item[:feed_title]%>&lt;/a&gt; + <% end %> + &lt;/div&gt; + <%= render 'article_buttons' if @item[:type] == 'article' %> + &lt;/div&gt; + &lt;/div&gt;</code></pre></div><p>This source code snippet shows quite a few features of nanoc&#8217;s layouts:</p> +<ul> + <li>You can access the metadata of the page which is being rendered using the <code>@item</code>, so <code>@item[:title]</code> returns the page&#8217;s title, for example.</li> + <li>Layouts can be nested, and behave like Rails&#8217;s partials. The <code>render</code> takes a string parameter (the name of the layout to render) and an optional hash parameter to pass variables to the layout.</li> + <li>The <code>yield</code> method is used to include the content of a page.</li> + <li>Layouts support any kind of filter, like <span class="caps">ERB</span> for example. Go crazy.</li> +</ul> +<p>Helpers can be used in layouts to perform common tasks, like creating links, feeds, navigation elements and so on. Check the <a href="http://nanoc.stoneship.org/doc/3.0.0/">source code docs</a> for more info, and of course feel free to create your own as you see fit.</p> +<p>Finally, filters are used to filter content markup. nanoc ships with <a href="http://nanoc.stoneship.org/manual/#list-of-built-in-filters">almost everything you need</a>, from Textile to Haml to RDoc, but nobody forbids you to create your own, and it&#8217;s dead easy.</p> +<h4>Rules and tasks</h4> +<p>While tasks (as in Rake tasks) do not constitute a huge part of nanoc (but as usual, you may need to create your own to perform custom operations), Rules became, as of version 3, one of the key concepts to grasp in order to make everything work. Rules are stored in the <code>Rules</code> file of your nanoc site, they can be used to:</p> +<ul> + <li>Define routes, i.e. where pages are deployed in the output folder.</li> + <li>Define how pages are compiled, which filters to apply to a particular set of pages, which layouts to use, etc.</li> + <li>Define how layout are handled, which filters to apply to a particular layout, etc.</li> +</ul> +<p>You can find more information in the <a href="http://nanoc.stoneship.org/manual/#rules">manual</a>, along with other important information, but for now, let&#8217;s say you should be familiar with <em>most</em> of nanoc&#8217;s jargon and how it works. Let&#8217;s see what you can do with it, in practice.</p> +<h3>Migrating from your blog platform</h3> +<p>As of version 7, h3rald.com has been powered by the <a href="http://www.typosphere.org">Typo</a> blog platform. If you are not familiar with it, let&#8217;s just say it&#8217;s a sort of Wordpress built on top of Rails: database backend, pretty admin front-end, tags, comments, and all sort of things a blog may need. While Typo is pleasant enough to use, it has all the inherent disadvantages of any other similar platform:</p> +<ul> + <li>It relies on a database</li> + <li>It relies on server-side scripting to render pages</li> + <li>It uses a complex caching mechanism to produce, ultimately, semi-static pages</li> + <li>It may be subject to exploits, attacks, high server loads, and similar</li> + <li>You can&#8217;t really customize it beyond a certain point</li> + <li>You have to upgrade your backend frequently, and often is not as painless as you may expect</li> + <li>You can&#8217;t use versioning tools like git for your content, as it&#8217;s stored in a database</li> +</ul> +<p>I&#8217;m not claiming that nanoc is blogging&#8217;s silver bullet (it was not created for that), but for sure:</p> +<ul> + <li>It <em>does not</em> rely on a database</li> + <li>It <em>does not</em> rely on server-side scripting to render pages (not in real-time, anyway)</li> + <li>It <em>does not</em> need a complex caching mechanism simply because it produces static pages</li> + <li>It is definitely less prone to nasty things</li> + <li>It&#8217;s extremely flexible and hackable with very little effort</li> + <li>You don&#8217;t have to upgrade all the time, but it is <em>really</em> painless if you decide to</li> + <li>You can use git and similar: your content is in plain old text files</li> +</ul> +<p>Rants are beside the point, suffice to say I recently convinced myself that switching from Typo to nanoc was a <em>good thing</em>, so let&#8217;s see how it worked out.</p> +<h4>Posts, pages and comments</h4> +<p>Out of Typo&#8217;s MySQL database, I just wanted to get the following data:</p> +<ul> + <li>Pages and posts</li> + <li>Tags</li> + <li>Comments</li> +</ul> +<p>Following the approach used by <a href="http://github.com/mojombo/jekyll">Jekyll</a>, I decided to use the simple and powerful <a href="http://sequel.rubyforge.org/">Sequel</a> gem. I&#8217;m sorry to disappoint you, but the whole migration process can be summarize with the following Rake task:</p> +<div class='ruby'><pre><code>task :migrate, :db, :usr, :pwd, :host do |t, args| + raise RuntimeError, "Please provide :db, :usr, :pass" unless args[:db] && args[:usr] && args[:pwd] + db = Sequel.mysql args[:db], :user =&gt; args[:usr], :password =&gt; args[:pwd], :host =&gt; args[:host] || 'localhost' + # Remove all existing pages! + dir = Pathname.new(Dir.pwd/'content') + dir.rmtree if dir.exist? + dir.mkpath + # Prepare page data + dataset = db[:contents].where("state = 'published' || type = 'Page'") + total = dataset.count + c = 1 + total_tags = [] + dataset.each do |a| + puts "Migrating [#{c}/#{total}]: '#{a[:title]}'..." + meta = {} + meta['tags'] = get_tags a[:keywords] + meta['comments'] = get_comments db, a[:id] + meta['permalink'] = a[:permalink] || a[:name] + meta['title'] = a[:title] + meta['type'] = a[:type].downcase + meta['date'] = a[:published_at] + meta['toc'] = true + meta['filters_pre'], extension = get_filter db, a[:text_filter_id] + contents = convert_code_blocks meta, a[:body]+a[:extended].to_s + write_page meta, contents, extension + c = c+1 + end + end</code></pre></div><p>That&#8217;s it. Well, almost: you can find the <code>get_comments</code>, <code>get_tags</code> and <code>get_filter</code> methods in a separate <a href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>. Nothing special really, just a few convenience methods wrapping queries or simply processing data. Note how all information, including tags and legacy comments, is saved in each page&#8217;s metadata. The <code>write_page</code> method simply creates a file in the <code>/contents</code> folder.</p> +<h4>Filters and highlighters</h4> +<p>On my old site, I used mainly Textile and Markdown to write posts. However, some of my really old articles used BBCode, whose corresponding filter is not available in nanoc. No worries, I soon found out that creating a new nanoc filter came down to this:</p> +<div class='ruby'><pre><code>require 'rubygems' +require 'bb-ruby' + +class BbcodeFilter &lt; Nanoc3::Filter + identifier :bbcode + + def run(content, args) + content.bbcode_to_html + end + +end</code></pre></div><p>Yes, that&#8217;s it. Granted, the <code>bb-ruby</code> gem does all the work, but notice how easy it is to just plug in new Ruby code into nanoc&#8217;s architecture!</p> +<p>The next big challange was code highlighting. After a quick research, I found at least a half dozen of possible solutions to highlight source code. Some were javascript based, others were based on a server-side language like <span class="caps">PHP</span>, Ruby or Python. Again, I looked at Jekyll for inspiration and discovered they integrated the <a href="http://www.pygments.org">Pygments</a> <em>Python</em> library. Why use a Python library for code highlighting in a Ruby-based project? Because there&#8217;s nothing to stop you (if you can run Python on your server, that is), because it looks very neat and because it supports a lot of different programming languages.</p> +<p>Lazy as I am, I more or less dropped <a href="http://github.com/h3rald/h3rald/blob/master/lib/albino.rb">Chris Wanstrath&#8217;s Ruby wrapper</a> into my <code>/lib</code> folder (I just used Open3 instead of Open4 for Windows compatibility), and monkey-patched nanoc&#8217;s filtering helper as follows:</p> +<div class='ruby'><pre><code>module Nanoc3::Helpers::Filtering + + def highlight(syntax, &block) + # Seamlessly ripped off from the filter method... + # Capture block + data = capture(&block) + # Reconvert + data.gsub! /<%/, '' + # Filter captured data + filtered_data = "\n&lt;notextile&gt;"+Albino.colorize(data, syntax)+"&lt;/notextile&gt;\n" rescue data + # Append filtered data to buffer + buffer = eval('_erbout', block.binding) + buffer &lt;&lt; filtered_data + end + +end + +include Nanoc3::Helpers::Filtering</code></pre></div><p>There you go, another thing sorted.</p> +<h4>Tags and Feeds</h4> +<p>Adding tagging support was a tiny bit more tricky. nanoc supports content tagging out-of-the-box though metadata and a simple helper, but I wanted to create tag pages (with feeds). Nothing too difficult though, it all came down to a simple Rake task:</p> +<div class='ruby'><pre><code>task :tags do + site = Nanoc3::Site.new('.') + site.load_data + dir = Pathname(Dir.pwd)/'content/tags' + dir.rmtree if dir.exist? + dir.mkpath + tags = {} + # Collect tag and page data + site.items.each do |p| + next unless p.attributes[:tags] + p.attributes[:tags].each do |t| + if tags[t] + tags[t] = tags[t]+1 + else + tags[t] = 1 + end + end + end + # Write pages + tags.each_pair do |k, v| + write_tag_page dir, k, v + write_tag_feed_page dir, k, 'RSS' + write_tag_feed_page dir, k, 'Atom' + end + end</code></pre></div><p>Again, you can find all the other simple utility methods in my <a href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>.</p> +<p>When it came to feeds, I decided to create a new method for the Blogging helper to create <span class="caps">RSS</span> feeds, although nanoc does come with an Atom feed generator:</p> +<div class='ruby'><pre><code>def rss_feed(params={}) + require 'builder' + require 'time' + prepare_feed params + # Create builder + buffer = '' + xml = Builder::XmlMarkup.new(:target =&gt; buffer, :indent =&gt; 2) + # Build feed + xml.instruct! + xml.rss(:version =&gt; '2.0') do + xml.channel do + xml.title @item[:title] + xml.language 'en-us' + xml.lastBuildDate @item[:last][:date].rfc822 + xml.ttl '40' + xml.link @site.config[:base_url] + xml.description + @item[:articles].each do |a| + xml.item do + xml.title a[:title] + xml.description @item[:content_proc].call(a) + xml.pubDate a[:date].rfc822 + xml.guid url_for(a) + xml.link url_for(a) + xml.author @site.config[:author_email] + xml.comments url_for(a)+'#comments' + a[:tags].each do |t| + xml.category t + end + end + end + end + buffer + end + end</code></pre></div><p>Nothing too daunting, once you get used to Ruby&#8217;s <span class="caps">XML</span> builder. I followed a similar approach for my <a href="/archives">monthly archives</a></p> +<h4>3rd-party services</h4> +<p>Finally, the interactive bits. I basically turned to third-party services and a bit of jQuery for everything which required user-interaction or pulling data from other web sites. Here&#8217;s a list of services and APIs I currently use:</p> +<ul> + <li><a href="http://intensedebate.com/">IntenseDebate</a>, for comments.</li> + <li><a href="http://code.google.com/apis/ajaxsearch/web.html">Google <span class="caps">AJAX</span> Search <span class="caps">API</span></a> for internal site-wide search.</li> + <li><a href="http://apiwiki.twitter.com/">Twitter <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch tweets.</li> + <li><a href="http://delicious.com/help/json">Delicious <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch delicious bookmarks.</li> + <li><a href="http://www.backtype.com/developers">BackType <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch comments from other sites.</li> + <li><a href="http://develop.github.com/">GitHub <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch GitHub commits for most of my <a href="/projects">projects</a></li> +</ul> +<p>If you want to know how I integrated them, check out my <a href="http://github.com/h3rald/h3rald/tree/master/content/js">/js folder</a>, it was very simple, really.</p> +<h3>Conclusion</h3> +<p>I was very happy of switching to nanoc. It didn&#8217;t take me long, and I spent most of the time with non-nanoc issues (brushing up jQuery, <span class="caps">CSS</span>, graphics, etc.). Of course knowing the Ruby programming language helps, and if you&#8217;re not comfortable with hacking your way a little bit, then maybe it&#8217;s not for you.</p> +<p style="float:left;"><img src="/img/pictures/nanoc-compile.png" alt="" /></p> +<p>Personally, I&#8217;ve been waiting for something like nanoc for a long time: its simple and yet powerful architecture makes you able to do virtually anything with it. For the first time in a long time, I feel like I&#8217;m in complete control of my web site, I know every bits of it and if I want to change the way it works or looks I only have to touch a few files.</p> +<p>nanoc&#8217;s metadata is mindblowing for its simplicity and power: although you&#8217;re not dealing with a database, you can query your content in the easiest ways possible. Whenever I needed a way to easily access pages, filter them, add extra logic to them, I just added metadata. If you forget something, you don&#8217;t have to change your database tables, create new relationships or anything of the sort, you simply add metadata to pages.</p> +<p>Be warned that tweaking nanoc gets addictive very quickly: you soon end up creating silly little tasks for making things just the way you want. For me, adding a new article to my blog now just means this:</p> +<div class='text'><pre><code>$ rake site:article name=take-back-your-site-with-nanoc +$ vim content/articles/take-back-your-site-with-nanoc +... write & close the file ... +$ Nanoc3 compile</code></pre></div><p>&#8230;Exactly what I need. Nothing more, nothing less.</p>
A contents/articles/textlinkads_sidebar_v01.html

@@ -0,0 +1,19 @@

+----- +title: Text Link Ads sidebar for Typo +content-type: article +timestamp: 1195271220 +tags: rails|opensource +----- +<p>I thought it would be nice to share the code of the sidebar I created to display <a href="http://www.text-links-ads.com">Text Link Ads</a> sponsor links on my Typo powered blog.</p> +<p>There&#8217;s actually another <a href="http://blog.nanorails.com/articles/2006/10/01/a-new-rails-plugin-for-textlinkads-including-support-for-feedvertising">plugin</a> which was made for Typo 2.6, but unfortunately it doesn&#8217;t work with Typo 4.1.1.</p> +<h3>Installation</h3> +<p>Just unzip it inside your vendor/plugins directory. The new sidebar should appear in the list of your available sidebars in the Typo&#8217;s administration area.</p> +<h3>Configuration</h3> +<p>In Typo&#8217;s administration area, configure the following settings for this sidebar:</p> +<ul> + <li><strong>Title</strong>: The title of the sidebar</li> + <li><strong><span class="caps">KEY</span></strong>: Your TLA&#8217;s <span class="caps">XML</span> key</li> + <li><strong>Affiliate ID</strong>: Your TLA&#8217;s affiliate ID</li> + <li><strong>Advertise Here</strong>: A message shown when no links are displayed.</li> +</ul> +<p><strong><a href="/files/textlinkads_sidebar_v0.2.zip">Download Text Links Ads Sidebar v0.2</a></strong></p>
A contents/articles/the-internet-philosopher.html

@@ -0,0 +1,114 @@

+----- +title: The Internet Philosopher +content-type: article +timestamp: 1147345241 +tags: internet|writing|travelling +----- +<p>Recently I got this rather short email from a guy named Daniel Lampinen:</p> +<blockquote> +<p>Hi. Respect for being an internet addict &#8211; that&#8217;s good. I have moved to India just to afford and get time to be on the internet as much as possible:</p> +<p><a href="http://www.ropix.org/english.html">http://www.ropix.org/english.html</a></p> +</blockquote> +<p>Spam? Yeah, must be: I get this kind of stuff all the time, and this looked like another person asking for money. Or maybe not? After all this guy is not asking for anything in his mail, he&#8217;s just telling me something about myself and perhaps try to get me to visit his site<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>. I did indeed &#8211; after all it was just one click away &#8211; mostly for curiosity.That website was one of the most plain ones I&#8217;ve ever come across, perhaps to help the visitor to understand that <em>content</em> is the only think that matters, not <em>design</em>. Daniel seems to be Swedish, and he immediately apologizes for his imperfect English: indeed there are some mistakes here and there, but I could understand <em>enough</em> about him, his way of living and his beliefs that I decided to write this article about him.</p> +<h3>An Internet Philosopher</h3> +<p><em>&#8220;I&#8217;m trying to live for my opinions and ideas&#8221;</em></p> +<p style="float:right;"><img src="/img/pictures/lampinen/piccadilly.jpg" alt="" /></p> +<p>This is Daniel&#8217;s &#8220;statement&#8221; which guides his entire life. He lives for his opinions and ideas, he lives to debate them with others, to talk to others about them, and eventually getting money for doing so: that would be his ideal way of living, and he partly realized it already.<br /> +It all started last year (2005), when he was a mailman in Stockholm: that was a boring job, probably like a million other jobs anywhere in the world. He didn&#8217;t want to do that, and &#8211; believe it or not &#8211; he didn&#8217;t want a business career either: he just wanted to spend time on the Internet, creating <em>things</em>. Not cool websites or successful e-businesses, just express his own opinions, thoughts and ideas and spread them online, he defines himself a <em>philosopher</em>, and yet I could not find anything better to define him: he literally lives for his thoughts.</p> +<p>A few months ago the Italian Telecom broadcasted one of the most peculiar adverts I&#8217;ve ever seen: they were portraying an hypothetical past, where Gandhi was appearing on TV, on the Internet, on mobile phones, on big screens in the streets pronouncing one of his famous speeches. The advert ends with a sentence like <em>&#8220;Imagine what could have happened if he could have used our communication systems&#8221;</em>, trying to promote Telecom&#8217;s services, and it has been criticized<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup> many times for this. <br /> +I immediately thought about this advert while reading Daniel&#8217;s homepage. Obviously he&#8217;s far from being Gandhi, but at least he attempts to live in a simple and honest way and tries to communicate with as many people as possible. And he lives in India, he recently moved there from Sweden mainly because it&#8217;s much, <span class="caps">MUCH</span> cheaper than any country in Europe or in the rest of the Rich World.</p> +<p style="float:left;"><img src="/img/pictures/lampinen/cow.jpg" alt="" /></p> +<p>From what I could read about him, his life is quite simple: he tries to spend as little money as possible and not in futile things. He lives in a cheap hotel in Puri, India, where he can access the Internet &#8211; that&#8217;s all that matters. Perhaps it may sound a bit freaky, but certainly not as freaky as going out getting trashed every night, buying drugs or waste money on trendy clothes &#8211; at least from someone&#8217;s point of view.</p> +<p><em>&#8220;Yeah, OK, it&#8217;s all good so far but how can he live like that? Has he got a job?&#8221;</em></p> +<p>Yes and no &#8211; not in a traditional way, at least. He sells stuff, his thoughts, ideas and writings to be more precise, and no, there are no set prices: he goes <em>&#8220;[&#8230;] by this principle (the Annalakshmi<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> principle): pay as much as you think my work is worth.<sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup>&#8221;</em>.<br /> +It&#8217;s quite similar to charity and it&#8217;s an interesting idea, whose success highly depends on the conscience of the giver: <em>the more honest his soul his, the more he&#8217;ll give</em>.</p> +<h3>Business Talk</h3> +<p>Don&#8217;t call him a beggar. Daniel has his own way of seeing the economy of the Rich World and also his own views when it comes to money:</p> +<p style="float:right;"><img src="/img/pictures/lampinen/money.jpg" alt="" /></p> +<blockquote> +<p>&#8220;This should be mentioned: give money to Unicef instead of to me. But give money to me instead of buying a expensive new couch.<br /> +[&#8230;] If I can inspire you to consume less, it may be worth some money. How would the world look like if everybody payed each other because they wanted to, not only because they legally had to? Pretty good, right? On some places in the world there&#8217;s today restaurants where you can pay as much as you thought that the food was worth. See this like a newspaper or a book that you can choose to pay for.</p> +<p>There&#8217;s plenty of different policies on what you should put your money on. On of the policies is to follow the market totally (except when it comes to classic charity). That one use to result in that you think it&#8217;s ok to buy a Gucci bag for $1000 but think it&#8217;s out of the question to give something to someone that &#8220;doesn&#8217;t wanna work for the money&#8221;.</p> +<p>[&#8230;] It can even be fun to get fooled by a souvenir salesman in a warm country &#8211; if you let go of some of the pride and the &#8220;millimeter justice&#8221;. Do that. You can still give as much or more to Unicef. I prefer a society where people put money on other people &#8211; both those struck by a catastrophe and rich people in your country &#8211; instead of buying un-necessary stuff.<sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup>&quot;</p> +</blockquote> +<p>Daniel accepts donations in many ways<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup>, and it must be noted is that his supporters may even choose how he should use his money, you can tell him what to buy or not to buy, and he&#8217;ll respect your decision: someone told him not to buy drugs and he never did, while another asked him to buy good food, and maybe a beer at local restaurants, and he did exactly that<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup>.<br /> +If you&#8217;re curious about what he buys, Daniel added a list of expenses<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup> to his site which diligently updates every time he spends money. Prices are in indian rupees (1$ is about 45 rupees!), and it looks like this:</p> +<ul> + <li>10 Bread</li> + <li>9 Tip to roomservice</li> + <li>30 Internet ticket</li> + <li>10 Drinking water</li> + <li>40 Riksa taxi</li> + <li>10 Muffins</li> + <li>10 Bananas</li> + <li>25 Bread and chips</li> + <li>10 Tip to roomservice</li> + <li>36 Candy</li> + <li>15 Bread</li> + <li>20 Internet ticket</li> + <li>12 Tip to roomservice</li> + <li>20 Tip to roomservice</li> + <li>7268 Hotel room for 8-18 April (plus food+bewerages+internet+laundry)</li> + <li>15 Tip roomservice</li> +</ul> +<p>In a nutshell, when it comes to money and buying things, Daniel lives by this simple rule:</p> +<blockquote> +<p>&#8220;Work with unwanted things as little as possible, consume as little as possible, communicate as much as possible&#8221;</p> +</blockquote> +<p>But is it really that simple? Could <em>you</em> live like him and still be happy? Certainly he has a big advantage: he lives in India, where everything costs much less than in Europe or the US. If you decide to try, he can help: he can give anybody suggestions on how to live cheaper and even keep you motivated to do so, and all he asks in exchange is what <span class="caps">YOU</span> think his suggestions are worth. All the payments for this service must be made through a Swedish company<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup>, which is technically his employer.</p> +<p>He can also sell &#8220;ideas&#8221; in the same way: you start emailing him explaining your situation and your needs, and he&#8217;ll try his best to come up with a solution and his own opinions. You won&#8217;t believe it, but a Swedish company<sup class="footnote" id="fnr10"><a href="#fn10">10</a></sup> was really pleased to hear his opinions and thoughts about innovation and used his suggestions to improve their services.</p> +<h3>An Internet Addict</h3> +<p style="float:left;"><img src="/img/pictures/lampinen/view.jpg" alt="" /></p> +<p>Perhaps one of the most interesting things about Daniel&#8217;s website is his journal. Not a proper blog, but just a single static webpage hosting all his daily thoughts: you can&#8217;t comment to them, but reading some passages may be interesting enough. <br /> +The best way to do so is trying to search for a particular word (in Firefox it&#8217;s pretty easy) and read what he wrote about that, I tried with &#8220;Internet&#8221; and here&#8217;s something I came across:</p> +<blockquote> +<p>&#8220;Now I&#8217;m finally realizing my two year old plans to be in a poor country. The only thing I&#8217;m gonna do is thinking, and surfing on the internet, see how long my money will last, and try to get new money to my <span class="caps">VISA</span> card by doing work that can be done with a brain and internet, for example producing ideas and point of views to companies in rich countrys. What&#8217;s good for everybody, is that I don&#8217;t need many dollars/euros to survive.&#8221;</p> +</blockquote> +<p>This was one of his early posts, and yes, that&#8217;s exactly what he started to do&#8230;</p> +<blockquote> +<p>So, I&#8217;m living at the internet. Hotel room, beach, internet. That&#8217;s pretty monotonous. But all together better than better than s[**]t job. I&#8217;m gonna contact medias that cover the internet and offer to write things in behalf of a person that have filled his life with only internet.</p> +</blockquote> +<blockquote> +<p>Internet, internet, internet. I&#8217;m happily addicted to something that makes me smarter and finding the right people. The only thing you need is a cable. People are crowding at the internet cafes here at the tourist street by the beach, and it&#8217;s a nice atmosphere.</p> +</blockquote> +<p>An happy internet addict. Although how good this addiction is can be debatable, Daniel seems to have found his perfect way of living, and the only thing he needs is an Internet connection and his brain.</p> +<blockquote> +<p>&#8220;Yesterday I searched on Google for the swedish words for &#8220;I am an internet addict&#8221; and e-mailed the words &#8220;respect for being an internet addict &#8211; that is good&#8221; to the bloggers that had written the sentence &#8220;I am an internet addict&#8221; during the last year.&quot;</p> +</blockquote> +<p>Yes, that&#8217;s exactly the message I got by email a few days ago. At first I must say I found it even a bit offensive: <em>&#8220;I am not an Internet addict! You might be, but I&#8217;m not.&#8221;</em> &#8211; He obviously didn&#8217;t mean to insult neither me nor any other blogger he mailed: for him, &#8220;being an internet addict&#8221; is probably one of the best things people &#8211; especially young people &#8211; can do.</p> +<p>Shocked? Yes, it&#8217;s understandable: we hear a lot about Internet addiction in these days, and I was reading in a recent study<sup class="footnote" id="fnr11"><a href="#fn11">11</a></sup> which pointed out that:</p> +<blockquote> +<p>&#8220;[&#8230;] When 54 percent of Internet addicts say they have a history of depression, 52 percent drug or alcohol abuse and 34 percent an anxiety disorder, it seems even clearer that cyberspace is just another place for unhealthy and self-destructive behaviors to manifest themselves.&#8221;</p> +</blockquote> +<p>Is it though? Daniel Lampinen truly admints he&#8217;s an Internet addict, but he most definitely doesn&#8217;t have any history of drug or alcohol abuse:</p> +<blockquote> +<p>&#8220;On [the] Give me money [page] there&#8217;s now a list of demands from the givers. The first demand come from the latest giver: no drugs. Which I&#8217;m fine with. As you can see on What I&#8217;m buying, I&#8217;ve only bought one joint (in Christiania in Copenhagen). And that was just a statement because I think others is gonna be free to do it. I never take anything to &#8220;get away from reality&#8221;, or to &#8220;have fun&#8221;. Not even beer, which I only take to relax. That&#8217;s how dull I am. The reality rules.&quot;</p> +</blockquote> +<p>There you are. <br /> +So why did he choose to become an Internet addict? Well, most definitely because he was tired of the Rich World&#8217;s society: he had a boring job which he didn&#8217;t enjoy, and he simply realised that the Internet <em>could</em> &#8211; at least sometimes &#8211; be better than ordinary life. He openly admits he&#8217;s a weird human being, and he&#8217;s fine with that, but you can be sure of two things:</p> +<ul> + <li>he&#8217;s totally, absolutely honest, in anything he does, and he&#8217;s not afraid to express his own opinions without adjusting them according to the people around him</li> + <li>he maintained his individuality at the cost of living in a poorer country</li> +</ul> +<p>How many people in the Rich World can accomplish either of these things? Please raise your hands&#8230;</p> +<h3>Notes</h3> +<p>Very special thanks to Daniel Lampinen for allowing me to write about him and providing all the pictures for this article.</p> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> Daniel Lampinen&#8217;s <a href="http://www.ropix.org/english.html">website</a>, English version.</p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://www.zeusnews.it/index.php3?ar=stampa&amp;cod=3432">Gandhi e Telecom Italia</a> &#8211; Comments on the famous Italian advert. [Italian]</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.annalakshmi.org/index.php">Annalakshmi</a> &#8211; <em>A non-profit organization dedicated to bringing the joy of Indian culinary, visual and performing arts to one and all.</em><br /> +<em>Annalakshmi is an international chain of vegetarian restaurants that augments its dining experience by showcasing Indian arts and handicrafts as well as cultural dance and music performances. Inspired by the Hindu concept for Abundance, Annalakshmi operates on the basis of &#8220;Eat as you Want, Pay as you Wish&#8221; where the guest decides not just what to order but also how much to pay.</em></p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> From Daniel Lampinen&#8217;s <a href="http://www.ropix.org/ideas.html">UI Ideas</a> page.</p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> From Daniel Lampinen&#8217;s <a href="http://www.ropix.org/money.html">Money</a> page.</p> +<p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> Daniel&#8217;s <a href="http://www.ropix.org/money.html">Money page</a> lists all possible ways to dive him money, most notably:</p> +<ul> + <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=800825%40gmail%2ecom&amp;item_name=Ropix&amp;no_shipping=0&amp;no_note=1&amp;tax=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8">Paypal</a></li> + <li>His <span class="caps">IBAN</span> bank account number (an international number):<br /> +SE1580000008201644439081<br /> +With this code: <span class="caps">BIC</span>. <span class="caps">SWEDSESS</span></li> + <li>His <a href="http://www.ropix.org/free.html">free page</a>.</li> +</ul> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> It&#8217;s documented in the <a href="http://www.ropix.org/gustav100kr.html">Gustav 100Kr</a> page.</p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> Daniel&#8217;s <a href="http://www.ropix.org/expenses.html">list</a> of expenses.</p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> <a href="http://www.f-bolaget.se/index.html">F-Bolaget AB</a></p> +<p class="footnote" id="fn10"><a href="#fnr10"><sup>10</sup></a> <a href="http://www.intip.se/">Intip</a></p> +<p class="footnote" id="fn11"><a href="#fnr11"><sup>11</sup></a> <a href="http://arstechnica.com/news.ars/post/20060510-6795.html">Is Internet addiction a real problem?</a> &#8211; Arstecnica.com</p>
A contents/articles/the-merb-way-review.html

@@ -0,0 +1,37 @@

+----- +title: Book Review: The Merb Way +content-type: article +timestamp: 1258452936 +tags: ruby|books|review +----- +<p>When I first picked up this book I was surprised by its length. Somehow, after reading <a href="/articles/the-rails-way-review">The Rails Way</a>, I got stuck in my mind that <a href="http://my.safaribooksonline.com/9780321601636">The Merb Way</a> had to be almost equally voluminous. Instead, this book is about 300 page long, roughly as long as the sum of the chapters devoted to <em>ActiveRecord</em> in Obie Fernandez&#8217;s acclaimed Rails bible.</p> +<p>Apparently it only takes 300 pages to describe a web framework nowadays! I couldn&#8217;t help but feeling a bit skeptical at first. Even in the foreword, Obie Fernandez presents the book &ndash; and the whole <a href="http://www.merbivore.com">Merb</a> framework &ndash; with some initial skepticism: isn&#8217;t Ruby on Rails enough? Why do we need yet another Ruby web framework? And above all, seeing that Merb is going to eventually be <a href="http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3">merged into Rails 3</a>, why on Earth do we need a book about Merb, <em>now</em>?</p> +<p>Needless to say, Foy Savas proved that both Merb and its book cannot be dismissed just like that.</p> +<h3>Getting started</h3> +<p style="float:right;"><img src="/img/pictures/therailsway.jpg" alt="" /></p> +<p>The book starts with the original <a href="http://pastie.org/14416">Merb Pastie</a>, a single page of Ruby code able to sort out <span class="caps">HTTP</span> requests, dispatch them to the appropriate controllers and render a web page. This piece of code is enough to convey what Merb is: a new breed of web framework, almost as simple as it can get but very poweful and flexible at the same time.</p> +<p>As you start diving in through the first chapter, you realize you&#8217;re reading about a <em>Hacker&#8217;s Web Framework</em>. That&#8217;s precisely what Merb is: a very versatile tool to get the job done, in the simplest way possible. Similarly, <em>The Merb Way</em> immediately feels like a <em>Hacker&#8217;s Handbook</em> rather than an ordinary guide on how to develop web applications. You won&#8217;t learn what <span class="caps">MVC</span> is by reading this book, and don&#8217;t expect to be taught what a <em>mixin</em> is; you are reading a book about a Ruby web framework that was born after the <em>Rails Revolution</em>, so it is safe (for the author) to assume that:</p> +<ul> + <li>You know the Ruby programming language</li> + <li>You know what Ruby on Rails is and you tried it out, at the very least</li> +</ul> +<p>The first few chapters are about the core functionalities provided by an an <span class="caps">MVC</span> framework: after a comprehensive first chapter about Merb&#8217;s fundamentals (from the layout of a Merb application to an overview of Merb internals) you are quite abruptly &#8220;introduced&#8221; to routing, controllers, views and models. These chapters do not aim to provide a comprehensive description of each component, they simply tell you: <em>here&#8217;s how Merb does this</em>.</p> +<p>Out of the first five chapters, favorite is definitely the one about <em>Models</em>. Although Merb is <span class="caps">ORM</span>-agnostic, DataMapper is the <em>de facto standard</em> for Merb applications, and it fully embrace the framework&#8217;s design and extreme flexibility without being <em>in the way</em> of your code.<br /> +Foy does an excellent job in this chapter by strategically describing DataMapper&#8217;s code from the top to the very bottom, from the highest abstractions to raw <span class="caps">SQL</span> code, using a plethora of snippets taken from the actual Merb code.</p> +<h3>It&#8217;s about how Merb works, not how to work with Merb</h3> +<p>After reading the <em>Models</em> chapter I decided to go back and re-examine the previous chapters. I didn&#8217;t notice until then, but the author sneakily <em>smuggled</em> a consistent amount of Merb source code into this book. This is rather unusual for books about web frameworks: they normally tell you how to use the framework, not how it was built! While this can be disappointing for people used to read Rails books, it came as a very pleasant surprise to me.</p> +<p>About 40-50% of this entire book (and I&#8217;m not exaggerating) is Ruby source code. In a good way, it feels like a collection of strategically-positioned code snippets glued together with explanations of the most tricky bits and digressions on how the framework was <em>designed</em>. In other words, it probably contains just enough text to make sure that the average reader understands the code, but remember that the <em>average reader</em> of this book must know Ruby failry well.</p> +<p>There is no pointless prose in this book, no explanations of obvious methods, no fancy words, no useless boasting on how cool the framework is: just an objective description of how Merb works and of the key design decisions behind it. If I may, the only thing that doesn&#8217;t feel quite right with this book is its title: <em>Merb Internals</em> would have been a better choice. Once you realize this, the book suddenly makes sense, and can even make you a better Ruby programmer.</p> +<p><em>The Merb Way</em> does an excellent job in describing how to design a web framework, or any real-world Ruby application for that matter. It teaches you that modularity is the key to flexibility by showing how the Merb stack is organized. Sure, it doesn&#8217;t teach you how to create a blog in five minutes, but perhaps a thorough explanation of how anthentication is implemented (Chapter 9) will actually be useful in two months time, when you&#8217;ll have to create your own Merb plugin from scratch.</p> +<h3>Some constructive criticism</h3> +<p>The idea behind this book is clever but a bit dangerous. I flipped through the pages in front of my wife and asked her what was wrong with it. <em>&#8220;There&#8217;s too much code!&#8221;</em> she said, without hesitation. Precisely.</p> +<p>It is damn good Ruby code, but sometimes you wish there was more text describing how to use it in practice. Or maybe some code examples on <em>using</em> the framework on a real-world application. Not a chance. Of all that holy code, there&#8217;s not much featuring something other than Merb itself. Basically the exact opposite of all the other books about Rails or other web frameworks!</p> +<p>Even accepting the fact that you are not reading a book about developing web applications, there are two more things which could be improved:</p> +<ul> + <li>Merb&#8217;s design is very intriguing, and you grasp the essentials by reading this book, but a few diagrams here and there and more in-depth digressions on the subjects would have been nice.</li> + <li>Besides DataMapper, what I really wanted to read about were Slices and Parts &ndash; unfortunately the chapters about them are far too short and shallow. The reasoning behind this is that <em>their future may be uncertain</em> due to the Rails 3 merge. Pity.</li> +</ul> +<h3>Conclusion</h3> +<p>The death of Merb has been greatly exaggerated. Too bad I <a href="/articles/take-back-your-site-with-nanoc/">gave up web frameworks altogether</a> for my site, because after reading this book I would have gone for Merb <em>today</em> rather than waiting to see the wonders of Rails 3 <em>tomorrow</em>. Even a book with this title could have been written in a very different way, I would still recommend it if you want to become a better Ruby programmer by learning from the best: Merb code really stands out, even compared to Rails, and Foy Savas does a great job presenting and describing it.</p> + +
A contents/articles/the-rails-way-review.md

@@ -0,0 +1,104 @@

+----- +title: Book Review: The Rails Way +content-type: article +timestamp: 1231056180 +tags: rails|books|review +----- +> "Programming books are pointless: you buy them, you read them and you chuck them because they're already out-of-date!" + +This is a quote from my fiancée, who always pointed out the ephemeral nature of programming books and therefore _highly discouraged me_ from buying any more. The sad thing is that this is partly true: if you buy a new programming book it _will_ eventually become outdated pretty quickly, especially if it's about newish technologies like [Ruby on Rails](http://rubyonrails.org/). + +_[The Rails Way](http://www.informit.com/store/product.aspx?isbn=0321445619)_ is no exception: Rails 2.2 has been out for a while and introduced a few new features &ndash; most notably Internationalization support &ndash; which are not mentioned neither in this book nor in others. + + +That being said, _The Rails Way_ by [Obie Fernandez](http://obiefernandez.com/) is still the best and most comprehensive book on Rails v2 currently on the market. It's the book you simply cannot afford to ignore, if you are using (or are planning to use) this popular Ruby web framework. + +### Contents + +<div style="float:right"><img src="/files/therailsway.jpeg" alt="cover" /></div> + +Before proceeding any further, I'd like to point out that is probably one of the longest programming books I've ever come across. With its 910 pages, _The Rails Way_ definitely cannot fit in your pocket and you cannot take it around with you easily. It's a book made to sit on your desk constantly and remain there, ready to be accessed at the right time, when needed. +Unlike with other books I reviewed, this time I won't even attempt to go through every chapter and every section: it would not be meaningful for the review and it will probably bore you to death. For completeness' sake, however, here's a very trimmed-down table of contents listing _only_ the first level headings: + +* Introduction +* Chapter 1 - Rails Environment and Configurations +* Chapter 2 - Working with Controllers +* Chapter 3 - Routing +* Chapter 4 - REST, Resources, and Rails +* Chapter 5 - Reflecting on Rails Routing +* Chapter 6 - Working with ActiveRecord +* Chapter 7 - ActiveRecord Associations +* Chapter 8 - ActiveRecord Validations +* Chapter 9 - Advanced ActiveRecord +* Chapter 10 - ActionView +* Chapter 11 - All About Helpers +* Chapter 12 - Ajax on Rails +* Chapter 13 - Session Management +* Chapter 14 - Login and Authentication +* Chapter 15 - XML and ActiveResource +* Chapter 16 - ActionMailer +* Chapter 17 - Testing +* Chapter 18 - RSpec on Rails +* Chapter 19 - Extending Rails with Plugins +* Chapter 20 - Rails Production Configurations +* Chapter 21 - Capistrano +* Chapter 22 - Background Processing +* Appendix A ActiveSupport API Reference +* Appendix B Rails Essentials +* Afterword What Is the Rails Way (To You)? + +If you already know _Rails_, these titles will be self-explanatory to you. If not, you'll just have to trust my words when I say that this book covers every possible aspect of the framework, and 99% of the notions you need to know to start developing almost any Rails-powered web application. + +What really pleased me were chapters 17 through 22, i.e. something _not_ strictly related to Rails Core. Normally, books about Ruby and Ruby on Rails don't deal with anything even a little bit outside their scope: as a result, topics such as Rubygems, RSpec and Capistrano are often not mentioned at all, or if they are, they are relegated to one or two pages at maximum, leaving the reader to look on the Internet for more information. +By contrast, _The Rails Way_ covers these ancillary but still very important topics very in-depth. Sure, you won't know the inside-out of RSpec after reading this book (although a whole chapter is devoted to it), but you will certanly know your way around it _enough_ to use it properly. + +What's missing in this book then? Maybe a _Chapter 0_ to guide the absolute beginner through the very basics of Rails and Ruby. Probably this goes beyond the scope of the book though, as the author clearly states that the book _"[...] is not a tutorial or basic introduction to Ruby or Rails. It is meant as a day-to-day +reference for the full-time Rails developer. "_. +Still, 100 pages about the Magic of Scaffolding & other tricks to astonish the children wouldn't have damaged the book, especially considering that Chapter 1 starts at page _60_ after a lot of _pages intentionally left blank_, Introduction, Foreward, Acknowledgements and similar padding material. + +### Organization and writing style + +> "Before going on, I should mention that part of what makes Rails exceptional is that it is opinionated software, written by opinionated programmers. Likewise, this is an opinionated book, written by opinionated writers." + +This sentence in the _Introduction_ sounded very familiar. Almost an echo of Zed Shaw's own words in the _[Mongrel Digital Shortcut](http://www.h3rald.com/articles/mongrel-shortcut-review)_. After all this book is part of the _[Addison-Wesley Professional Ruby Series](http://www.informit.com/imprint/series_detail.aspx?ser=2124042)_, of which Obie is the Series Editor. +Like the other books in the series, this book contains all the stylistic conventions and distinctive features which make them very enjoyable to read: + +* *Informal, almost personal style* &ndash; reading this book is almost like hearing Obie telling you what _he_ thinks about Rails, and sharing with you his own tips and tricks. +* *Honest, even humble at times* &ndash; This book doesn't glorify Rails or Ruby: on the contrary, pitfalls are acknowledged and dealt with. Rails lacks an inbuilt authentication system? No problem, a whole chapter is devoted to the _act\_as\_authenticated_ plugin. You almost feel it's part of the core itself. +* _"[Person] says" sidebars_ &ndash; The book's co-authors occasionally have their saying in special sidebars, all throughout the book. A way to evaluate different opinions and take a break from the book's main flow. +* _Code snippets_ &ndash; Not too many, not too few, just about the right amount. Granted, you won't find any sample application in this book, but the snippets provided are more than enough to get to the point. + +Although this book is meant to be a reference, this doesn't mean it only contains reference material, it means that if you don't know about a particular feature of Rails or its satellites (Capistrano, RSpec, testing in general, etc.) you can open the book at any chapter and read through an in-depth discussion which will, most likely, answer all your questions. + +Even if what you're looking for is not strictly related to Rails but can just _be used with it_, you'll find it in the book. Some examples include a 23-page-long exhaustive dissertation on [Prototype](http://www.prototypejs.org/), a whole Chapter on RSpec, another on Capistrano and even information on XML parsing through REXML. + +What you won't find in the book, unfortunately, is how to get something which was not meant to be seamless integrated with Rails to work, like [JQuery](http://jquery.com/), for example. But again, this is understandable, as such topics would have made the book three times longer, at least. + +### Some constructive criticism + +As a technical writer, I was somehow unhappy of the way reference material was presented in the book, i.e. more or less as ordinary chunks of text: + +><code>execute(sql_statement)</code> +Executes the SQL statement provided in the context of this connection. This method is abstract in the DatabaseStatements module and is overridden by specific database adapter implementations. As such, the return type is a result set object cor- +responding to the adapter in use. + +><code>insert(sql_statement)</code> +Executes an SQL INSERT statement and returns the last autogenerated ID from the affected table. + +You'll find plenty of pages like this in the book. Although all essential the information about each specific method is there, it is not organized properly. When I'm coding and I want to look up something quick, chances are that I can just hop over to [APIdock](http://apidock.com/rails) or other similar services and query Rails documentation in a much more efficient way. +On the other end, if reference material was added for completeness' sake, it would have been much better included at the end of the book, more succinctly, through some carefully constructed reference tables. If the aim was instead to help the reader memorize all the method he _must_ know to work productively with Rails everyday, the author should have included some diagrams or any other type of visual aid. + +Similarly, the _Stack Checklist_ included in Chapter 20 is not actually a list at all, but rather a sequence of titled paragraphs which is definitely a good read _the first time_, but it won't be as useful when you need to just refresh your memory. + +I admit, I noticed these things because part of my daily job as Technical Writer consists in making sure that reference material is well presented in the most minimalist, direct and useful way to the reader. Maybe a year ago I wouldn't have thought anything of it, but now I felt compelled to point this out hoping the next edition of the book will deal also with this aspect of the book. + +Since the book came out in 2007, the organization and presentation of Rails Documentation has been significantly improved by third-party services: I hope the authors and editors will try to make sure, next time, that the reference material is more _usable_ by the readers. + +### Conclusion + +Overall, the book is a good read. It's even possible to read it sequentially (even if the author discourages this practice) and still get the most out of it &ndash; a rare trait in programming books nowadays. +No other book will go so in-depth about Rails or about everything you need to know to get your site up and running in a_real_ production environment. That's the reason why _The Rails Way_is the perfect companion for web development professionals who must ensure their applications are tuned up to perform and scale well. + +This doesn't mean that beginners should be discouraged from reading this book, quite the opposite. This is actually the only book newcomers to Rails need once they are done reading all those awesome beginner-oriented tutorials freely available on the Internet. Everyone interested in Rails, at some point, has to follow _The Rails Way_. + +
A contents/articles/the-rails3-way-review.html

@@ -0,0 +1,63 @@

+----- +title: Book Review: The Rails 3 Way +content-type: article +subtitle: aka The (Rails) Bible, 2nd Edition +timestamp: 1301141806 +tags: review|books|rails +pdf: true +----- + + <section class="section"> +<p>Obie did it, again. With the second edition of his former masterpiece, <em>The Rails Way</em>, he managed to outdo himself delivering a new, even more useful, Rails Bible. Wether you&#8217;re a Ruby on Rails professional like him or just an enthusiast, this book is pretty much everything you need to learn how to master the third release of DHH&#8217;s Ruby web framework.</p> +<p><a href="http://tr3w.com/">The Rails 3 Way</a> is no ordinary second edition. If you already own <em>The Rails Way</em>, you&#8217;ll be pleasantly surprised that this is a different, more polished book. While something had to remain the same, there&#8217;s a lot of new content in its 708 pages, and even the old content has been rewritten or at least revised.</p> +<p>It doesn&#8217;t matter whether you already know Rails 2.x or you&#8217;re jumping straight into the Rails 3 world, if you use Rails, you can&#8217;t miss this book.</p> +<p>I started the <a href="http://www.h3rald.com/articles/the-rails-way-review/">review of the first edition</a> with a quote from my fiancée (now wife) on how pointless programming books are, especially those dealing with newish technologies: they tend to go out of date fairly quickly. While this still holds true, there&#8217;s not much you can do about it, except maybe purchasing a digital edition of the book instead. However, if you want to keep a good Rails reference book by your side, this has to be the one.</p> + + + + +<section class="section"> +<header><h1 id="h_1" class="toc">What's New</h1></header> +<figure style="float:left;"><img src="/img/pictures/books/rails3way/compare.jpg" /><figcaption>The Rails Way vs. The Rails 3 Way</figcaption></figure> +<p>If you put <em>The Rails 3 Way</em> and the original <em>The Rails Way</em> one next to the other, you can see that the new book is considerably shorter: about 200 pages less. This doesn&#8217;t mean it contains less information, quite the opposite: the new book contains a lot more stuff with less <em>fluff</em>. Obie managed to reduce digressions to a bare minimum and focus on providing more informative content to the readers using less text. Think of it as a <em>fat-free</em> book.</p> +<p>While no <em>What&#8217;s new in Rails 3</em> section is included in the book, Obie points out the new stuff when needed (but not always). An example is chapter 12, <em>Ajax on Rails</em>, in which changes introduced by Rails 3 clearly stand out, especially the section on Unobtrusive JavaScript (<span class="caps">UJS</span>).</p> +<p>Although the book is divided into chapters, it can also be divided into parts (each dealing with a specific theme) simply by looking at the front edge. According to this theme-based partitioning, Active Record makes up for nearly <em>a quarter</em> of the book (173 pages), followed by <em>Active Support <span class="caps">API</span></em> appendix and the <em>All About Helpers</em> chapter.</p> +<p>Another nice addition that can really make the difference when you&#8217;re in a hurry is the <em>Method Index</em>, which is separate from the main Index. It seems to account for all the methods in all (or at least the most important) classes in Rails. I didn&#8217;t check method by method, but it is pretty comprehensive nonetheless, based on some quick spot checking.</p> + +</section> +<section class="section"> +<header><h1 id="h_2" class="toc">Contents</h1></header> +<figure style="float:right;"><img src="/img/pictures/books/rails3way/sections.jpg" /><figcaption>Active Record makes up for over 24% of the book</figcaption></figure> +<p>The first thing you notice once you read the first few pages, is that this book is <em>even more opinioned</em> than its predecessor.</p> +<blockquote> +<p>Even though Rails 3 is less opinionated than early versions, in that it allows for easy reconfiguration of Rails assumptions, this book is more opinionated than ever.</p> +</blockquote> + <p style="margin-left: 4em">&ndash; Obie Fernandez, <cite>Introduction to <em>The Rails Way</em></cite></p> +<p>In other words, you won&#8217;t find an ERb view in the whole book (Haml rulez!) and if you don&#8217;t like RSpec&#8230; well, you&#8217;d better skip Chapter 18 altogether.</p> +<p>The other big difference with traditional Ruby and Rails books is the amount of reference to third-party code, mainly rubygems. Rails comes with no authentication functionality? So what: <a href="https://github.com/binarylogic/authlogic">Authlogic</a> and <a href="https://github.com/plataformatec/devise">Devise</a> are great for the job, go check them out! Do you need to test your Active Mailer emails? <a href="https://github.com/bmabey/email-spec">email-spec</a> is all you need.</p> +<p>I was actually surprised to find so much content not strictly related to Rails in this book: the first chapter starts off with <a href="http://gembundler.com/">Bundler</a> (now a Rails dependency, however), Chapter 2 (Routes) mentions <a href="http://rack.rubyforge.org/">Rack</a>, and so does Chapter 4 (Controllers). If you want a nice and to-the-point practical introduction to <a href="http://relishapp.com/rspec">RSpec</a>, the first part of Chapter 18 covers that.</p> + + <figure style="float:left;"><img src="/img/pictures/books/rails3way/reference.jpg" /><figcaption>About 40% of the book is reference material</figcaption></figure> +<p>Then there&#8217;s reference material. Plenty of it, a good 40% I daresay. The good thing is that (unlike the first edition) it won&#8217;t bore you to death: take Chapter 5 (Working with Active Record) for example, you&#8217;ll fly through find-related methods so swiftly you&#8217;ll regret when it&#8217;s over. Active Support? I didn&#8217;t read every line of Appendix B, but when I want to know something about inflection methods I will know exactly where to find them, and what to expect: the method signature, a few lines of text, and a short example at most.</p> +<p>My only regret? Cheat sheets. Or better, the lack of them. More tables, please! Granted, the web is full of Rails cheat sheets, but a few of them at the end of the book or even in a separate foldable add-on like in the <a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer">Pragmatic Programmer</a> can&#8217;t hurt.</p> +<p>Finally, some words about the code examples. The code/text ratio is almost 1:1, but Obie&#8217;s choice of <em>not</em> turning this book into a huge tutorial by implementing a single example application was absolutely right: The code snippets used in throughout the book are concise and relevant to the text around them and won&#8217;t distrupt your reading. If you want to play with them, they&#8217;re even <a href="https://github.com/obie/tr3w_time_and_expenses">on GitHub</a> for you to clone and fork.</p> + +</section> +<section class="section"> +<header><h1 id="h_3" class="toc">Organization and Writing Style</h1></header> +<figure style="float:right;"><img src="/img/pictures/books/rails3way/flick.jpg" /><figcaption>Yes, it&#8217;s a long book. But you don&#8217;t<br/>have to read it from start to finish!</figcaption></figure> +<p><em>The Rails 3 Way</em> is a book for Rails professionals. If you don&#8217;t know Ruby or if you never heard of Ruby on Rails, this book is <em>not</em> for you. It won&#8217;t teach you what <span class="caps">MVC</span> is, it won&#8217;t waste time on explaining <em>convention over configuration</em>, it won&#8217;t even describe the structure of a Rails app! If you&#8217;re newcomer to Rails&#8230; well, that&#8217;s what <a href="http://ruby.railstutorial.org/">The Rails Tutorial</a> is for.</p> +<p>To be honest, I&#8217;m with Obie on this. If this book had been beginner-friendly, it would have been even longer than the previous edition, and probably more boring. Instead, by assuming that the reader has been already initiated to the world of Ruby and Rails, the author can dive into the framework straight away. Moreover, chapters are not ordered by difficulty: they don&#8217;t need to be, they need to be ordered in a way that makes sense for a Rails developer.</p> +<p>Once again, this book includes personal sidebars used to voice the opinion of one of the co-authors or Rails gurus: there are plenty of &#8220;<em>Yehuda</em> says&#8221;, &#8220;<em>Xavier</em> says&#8221;, &#8220;<em>Durran</em> says&#8221;, and so on. Nothing new there, it&#8217;s just a nice way to provide the reader with authoritative opinions on some matters.</p> +<p>As I progressed through the book, I started noticing how Obie anticipated my questions and doubts: I found this to be a remarkable feature of this book, and an excellent way to make the readers feel they are on the same page with the author. If something should not be done because it may cause you problems, the author won&#8217;t hold back. See page 214, &#8220;Extra Columns on <strong>has_and_belongs_to_many</strong> Join Tables&#8221;, for example: it&#8217;s a cool feature, but it can cause all sort of annoyances, and the bottom line is: use <strong>has_many :through</strong> instead, if you need extra columns on join tables.</p> + +</section> +<section class="section"> +<header><h1 id="h_4" class="toc">Conclusion</h1></header> +<p><em>The Rails 3 Way</em> remains the <em>de facto</em> reference book for Rails. I was quite pleased to see that Obie improved it so much, compared to the first edition. Sure, it cannot be recommended to absolute beginners, but it&#8217;s not a big problem: if you&#8217;re new to Rails, all you have to do is browse around and read a few basic tutorials first.</p> +<p>What I really missed was a <em>What&#8217;s New</em> section, or something like that. The new stuff that was introduced in Ruby on Rails v3 is seamlessly blended with all the rest, which is great if you&#8217;re tackling the framework for the first time, but not so much when you already read tons of books on Rails 2.&#215;. I would have tagged content specific to Rails 3 in some way at least, for example with labels on the side of each page. Or maybe have a short introductory chapter covering the new features, and directions on where to find them in the book.</p> +<p>Overall, <em>The Rails 3 Way</em> is a great book, and if you plan on using Rails 3 for your next web site, it deserves a special place on your desk.</p> + +</section> + +</section>
A contents/articles/thoughts-on-firefox3-and-opera95.html

@@ -0,0 +1,85 @@

+----- +title: Thoughts on Firefox 3 and Opera 9.5 +content-type: article +timestamp: 1213327080 +tags: browsers|review|firefox|opera +----- +<p>Opera 9.5 is out, Firefox 3 too (more or less), so, which browser are you going to use today?<br /> +This new generatio of browsers offers plenty of new, innovative features and improvements over the past, in both cases:</p> +<ul> + <li>You can finally use Firefox because it finally doesn&#8217;t eat up all your <span class="caps">RAM</span></li> + <li>You can finally use Opera because it is finally &#8220;understand&#8221; ajaxified web sites like Gmail</li> +</ul> +<p>Amazingly, these two releases have a lot in common&#8230;<img src="/files/opera_sharp.png" alt="" /></p> +<h3>A fresh new look</h3> +<p>Both browsers needed a new look, let&#8217;s be honest. Both didn&#8217;t really care that much in the past releases, but suddenly things changed: the new Opera theme, Sharp, looks truly awesome on any platform, and the Mozilla development team came up with <span class="caps">FOUR</span> different themes, aiming to camouflage Firefox as a native application for all the major OSes.</p> +<p>Personally, while I was really impressed by the new Opera theme, I was not too sure of the new direction taken for Firefox UI. Why a different theme for each different major operating system? In particular the XP theme could have been better, in my opinion. <br /> +Not a huge deal though, as both browsers are skinnable (although I&#8217;m not gonna alter the way Opera looks!).<br /> +<br /> +<br /> +<br /></p> +<h3>The speed of light</h3> +<p>My main complaint about Firefox 2 was its slow startup and generally slowness due to several memory leaks. This eventually led me to &#8220;switch to Opera&#8221; for my daily browsing a while ago.</p> +<p>Firefox 3, luckily, is much faster and more memory-efficient than its predecessor, as the development team squashed most of the memory-related bugs. The introduction of jemalloc as the new memory allocator and also the new cycle collectory improved things quite a bit.</p> +<p>Opera 9.5 still &#8220;feels&#8221; faster at startup and also the <span class="caps">GUI</span> is a bit more snappy than Firefox&#8217;s, but Firefox 3 is <em>terribly</em> fast at interpreting Javascript.<br /> +As a result, sites like Gmail or Google Reader are rendered almost instantaneously in Firefox 3, while Opera 9.5 is slightly slower.</p> +<h3>Address Bar 2.0</h3> +<p>Both browser struggled to add more features to the Address Bar: Opera now supports search-as-you-type history search and Firefox&#8230; well, let&#8217;s just say that Firefox Developers built something truly wonderful with the new &#8220;AwesomeBar&#8221;: it is now possible to search history items <em>tagged pages and bookmarks</em>.</p> +<p><img src="/files/awesomebar.png" alt="" /></p> +<p>But there&#8217;s more: you&#8217;ll notice that the AwesomeBar does an outstanding job in retrieving results ordered by relevance, frequency and access time, and it also allows the user to restrict search to specific page types.</p> +<p>As an Opera user, I must admit that Firefox is really way ahead with this. Unfortunately, Opera toolbar still is not that smart.</p> +<h3>Sync&#8217;ing up</h3> +<p>Opera offers the ability to sync your bookmarks, notes, custom toolbars and Quick Dial pages via the new <a href="http://link.opera.com/">Link</a> service.<br /> +It looks awfully similar to <a href="https://services.mozilla.com/">Mozilla Weave</a>, an experimental extension aiming to synchronize the whole Firefox profile.</p> +<p>Currently, Weave allows users to sync bookmarks, history and passwords in a very secure way: this truly preserve the &#8220;state&#8221; of your browser across multiple computers.</p> +<p>On the other hand, Opera is virtually on <em>any device or platform</em>, so Link can be handy if you use Opera as your mobile browser. Unfortunately, we&#8217;ll still have to wait a bit for a proper Mozilla competitor for mobile device, but it already <a href="http://arstechnica.com/news.ars/post/20080409-first-look-mozilla-fennec-targets-handheld-browser-market.html">looks very promising</a>.</p> +<h3>Be nice, be open</h3> +<p>Firefox is <span class="caps">THE</span> (only?) open source browser. Opera has always been (and always will be?) a proprietary, freeware, <em>closed source</em> app.<br /> +Some people are really bothered by this, especially Linux users of course: it really comes down to how religious you are about the software running on your machine.</p> +<p>Being open source, Firefox is more hacker-friendly: this release, especially, also delivers an awful lot of useful APIs which can be used to develop extensions in a much easier way. This of course isn&#8217;t an option for Opera.</p> +<p>From a different point of view, Opera actually implements <a href="http://dev.opera.com/articles/view/opera-9-5-the-next-generation-of-web-s/">more &#8216;next generation&#8217; open standards</a> than Firefox, and it scores more than Firefox in the <a href="http://acid3.acidtests.org/">Acid 3</a> test.</p> +<p>Does this matter in the end? Well, yes and no: it&#8217;s nice that Opera struggles to be way ahead than others in this, but in the end, until Firefox 3 (and Internet Explorer too!) catch up, web developers won&#8217;t dare using any of the new features.</p> +<p>Do you have a web site optimized for Opera? No, probably not: you&#8217;re normally aiming at Firefox or IE (sigh!) when it comes to development, because they are still more widely used.</p> +<p>All this is very sad, but still terribly true. But at least, other browsers will feel more compelled to catch up.</p> +<h3>Usability is the key</h3> +<p>Personally, I prefer Opera&#8217;s philosophy of &#8220;everything in tabs&#8221; rather than having many dialog boxes floating around for downloads, history, bookmarks etc.</p> +<p>From this point of view, Firefox is arguably not as usable as Opera. Before Firefox <span class="caps">GUI</span> purists start screaming insults, I repeat that this is entirely up to your taste.</p> +<p>While Opera&#8217;s <span class="caps">GUI</span> didn&#8217;t undergo any major change, Firefox 3 definitely did:</p> +<ul> + <li>A new <em>Library</em> now holds all your bookmarks, history and feeds</li> + <li>The new Downloads dialog supports (finally!) download resumes, even across different browsing sessions</li> + <li>It is very easy to access information on web site, especially with the new identity button (that&#8217;s where the web site favicon is displayed).</li> +</ul> +<p><img src="/files/places.png" alt="" /></p> +<p>Another trend introduced by Firefox 3 is the ability to <em>search-as-you-type</em> in all these dialogs and in many others (like the Cookie Manager). This makes finding information much easier.</p> +<p>Opera didn&#8217;t need any major overhaul, but I would have liked to have cookies and preference in tabs, too (they are pretty much the only dialog boxes left).</p> +<h3>To extend or not extend?</h3> +<p>This is always the eternal dilemma when it comes to Firefox vs. other browsers.</p> +<p>The major strength of Firefox 3, like <em>all</em> its predecessors, lies in the hundreds of free extensions which can be installed by user to enhance browser&#8217;s functionality. You can turn Firefox into almost anything you like.</p> +<p>Because I&#8217;m trying to be browser-independent, I like to keep my Firefox extensions to a bare minimum:</p> +<ul> + <li>Weave</li> + <li>Operator</li> + <li>Web Developer</li> + <li>Del.icio.us</li> + <li>Firebug</li> + <li>StumbleUpon</li> + <li>ColorZilla</li> + <li>Secure Login</li> +</ul> +<p>Opera fans always boost that Opera can do pretty much everything you&#8217;d ever need <em>out of the box</em>, so you don&#8217;t need any extension at all. Part of this is true (does Firefox have an e-mail client? No. Does Firefox offer a Wand out-of-the-box? No., &#8230;read <a href="http://my.opera.com/Rijk/blog/2006/07/04/top-150-popular-firefox-extensions-and-opera">this</a> for the details)</p> +<p>In the past release, Opera added widget to let developers unleash their creativity. And I must admit that they are quite cute and work well enough (a few of them at least).</p> +<p>One of the most frequently-missed feature was a Firebug equivalent for Opera. Luckily, this was fixed in this release with the introduction of <a href="http://www.opera.com/products/dragonfly/">DragonFly</a>, which is already bundled with the browser itself. <br /> +I&#8217;m pretty sure this will make <em>a lot</em> of web developers very happy.</p> +<p><img src="/files/opera_dragonfly.png" alt="" /></p> +<p>Personally, I still miss an equivalent of the del.icio.us extension in Opera, but I guess I can survive with just a bookmarklet, if needed.</p> +<h3>Choose your winner</h3> +<p>It is really up to you. I don&#8217;t have a true favorite as for now: Firefox 3 is very, very tempting because of three things:</p> +<ul> + <li>The AwesomeBar: I feel I&#8217;m already becoming addicted to it</li> + <li>Some of its extensions, including Weave</li> + <li>The performance improvements, especially concerning memory management and the rendering of pages making extensive use of Javascript</li> +</ul> +<p>Opera, on the other hand, charmes me for what it can do out-of-the-box: it&#8217;s fast, sleek, has almost everything I need with no configuration at all. It&#8217;s ideal if you use multiple systems, including mobile devices.</p> +<p>Definitely I will not abandon any of the two as for now: I&#8217;ll probaly use Firefox for a more enhanced browsing experience, but I&#8217;ll definitely use Opera when I&#8217;m in a hurry to look something up for example, and every time my fiancée is using Firefox on the same account.</p> +<p>There&#8217;s no absolute winner in the Browser Wars yet: just different browsers for different occasions!</p>
A contents/articles/to-rest-or-not-to-rest.html

@@ -0,0 +1,38 @@

+----- +title: To REST or not to REST? +content-type: article +timestamp: 1190605680 +tags: rails +----- +<p>Lately I&#8217;ve been reading quite a bit about Rails&#8217; <span class="caps">REST</span> approach, and to be totally honest I&#8217;m not 100% convinced it can always be a good idea. The purpose of this post is to re-evaluate the situation, and ask other people their opinion on the matter.</p> +<p>Let&#8217;s see&#8230;</p> +<h3>Key Benefits</h3> +<p>To cut a long story short, from my understanding <span class="caps">REST</span> can be a good thing because:</p> +<ul> + <li>It introduces the powerful concept of &#8220;resources&#8221;, which is independent from the presentation. This basically means that you can have your &#8220;resources&#8221; represented in <span class="caps">HTML</span>. <span class="caps">XML</span> etc. etc. &#8220;for free&#8221;. If you are making an extensive use of web services, this is truly a bless.</li> + <li>Each <span class="caps">CRUD</span> action is carried out using a different <span class="caps">HTTP</span> command (get, post, put and delete). At present, because most browsers don&#8217;t understand <span class="caps">PUT</span> or <span class="caps">DELETE</span> requested, this is somehow simulated by Rails.</li> + <li>By thinking and modeling your application in terms of resources, everything should always be &#8220;in the right place&#8221;.</li> +</ul> +<h3>Downsides?</h3> +<p>Let&#8217;s now try to summarize what made me think more carefully this approach&#8230;</p> +<ul> + <li>While I really like Rails&#8217; convention over configuration philosophy, this sounds a tiny bit too extreme for me. In the end it could be good, but it requires developers to completely re-think the way they develop their application in order to be 100% RESTful.</li> + <li>URLs aren&#8217;t that pretty anymore. While <a href="http://themysteriouswaysofruby.blogspot.com/2007/04/pretty-restful-urls-in-rails.html">someone</a> suggested a way to improve the way RESTful URLs look, that sounds like extra hassle to me. It&#8217;s subjective, I know, but I really don&#8217;t like using IDs in the url&#8230; I&#8217;d rather go for an univocal code any day (check out this site&#8230; I don&#8217;t even like dates in my blog).</li> + <li>Sometimes, it may take quite a bit to figure out how to model some functionality using resources. While it is straightforward when you want to perform <span class="caps">CRUD</span> operations, modeling a search action or authentication may be a bit tricky and may also feel a bit forced. Again, maybe it&#8217;s just me.</li> + <li>It may be a bit too early to take full advantage of this approach. <span class="caps">PUT</span> and <span class="caps">DELETE</span> are simulated, and this doesn&#8217;t sound right &#8212; agreed, that&#8217;s the only way for now, but it still sounds like a forceful workaround. Browsers are not RESTful (yet)!</li> + <li>All resources are virtually accessible by a <span class="caps">URL</span>. I&#8217;m not a security expert, but this scares me a bit.</li> +</ul> +<p>Here are some posts which made me think a bit:</p> +<ul> + <li><a href="http://gilesbowkett.blogspot.com/2007/04/looking-for-good-argument-against-rest.html">Looking for a good argument against <span class="caps">REST</span></a></li> +</ul> +<ul> + <li><a href="http://www.ipbabble.com/2007/07/restful_myths.html">RESTful Myths: Unraveling the Confusion</a></li> +</ul> +<ul> + <li><a href="http://blog.livollmers.net/index.php/2007/06/26/why-cant-web-apps-be-rest-ful/">Why Can’t Web Apps Be <span class="caps">REST</span>-ful?</a></li> +</ul> +<p>The bottom line is: is <span class="caps">REST</span> really worth the hassle? Especially for small and simple applications like a blog, is it really worthwhile to coerce myself to adopt a RESTful approach when I could accomplish exactly the same things with much less hassle?</p> +<p>In other words, is <span class="caps">REST</span> really the answer to everything or in <em>some cases</em> it is just <em>not necessary</em>?</p> +<p>And also (OK, this may sound harsh and impolite): does it really make sense to push people to adopt a RESTful approach no matter what? Sometimes someone may get the feeling that Rails is all about <span class="caps">REST</span> now. Is that true, or is there still room for <del>freedom</del> other views?</p> +<p>Looking forward to hear your comments, but please be nice and civilized!</p>
A contents/articles/too-many-cooks-take-2.html

@@ -0,0 +1,18 @@

+----- +title: Too many cooks... take #2 +content-type: article +timestamp: 1188708060 +tags: cakephp|writing|rant +----- +<p>Today I was not going to post on my blog. I have the flu, I don&#8217;t feel very well so I started reading some news feeds on Google Reader. That lasted for about half an hour, so I decided to check my old Netvibes account where I kept other feeds, including a bunch of CakePHP-related blogs.</p> +<p>Two posts immediately grab my attention:</p> +<p><a href="http://cakebaker.42dh.com/2007/08/27/i-dont-trust-cakephp-or-what-should-you-say-in-public/">I don’t trust CakePHP or what should you say in public?</a></p> +<p>and</p> +<p><a href="http://cakebaker.42dh.com/2007/08/28/bye-bye-cakephp-team/">Bye, bye, CakePHP team</a></p> +<p>They&#8217;re both from Daniel&#8217;s cakebaker blog, the one I used to read when I was really into Cake.</p> +<p>To cut a long story short, apparently Daniel said something wrong and he got &#8220;what he deserves&#8221; for speaking out. Naughty boy!</p> +<p>That&#8217;s because it might have put &#8220;CakePHP and the team in a bad light&#8221;. Well, I don&#8217;t know about that, but definitely now it IS in a bad light!</p> +<p>I even found a bunch of comment which link this incident to what happened to me a few months ago:</p> +<p><em>&#8220;I said it when Fabio/H3rald left, and I’ll say it again—I think the biggest weakness of Cake is that the core dev team is quick to cut people out who don’t hold to every dogma the devs do. Fundamentalism, ego, call it what you will, a great community will only count for so long if the core keeps alienating its biggest allies. (not that they’re neccessarily alienating you, dho. I truly hope you stick around. You do seem to be taking it well.)&#8221;</em></p> +<p><sup>^</sup> Whoever you are, you&#8217;re 100% right.</p> +<p>A core asset (at least for his writings) of the CakePHP team is gone, and another (big) chunk of CakePHP PR strategy is out of play, now, it seems. While I&#8217;m sorry the CakePHP community has to get the butt-end of it as always, I&#8217;m certainly happy for Daniel who, like me, will now have a chance to look around and experiment with new things. That&#8217;s right man, Rails or Django are the way to go.</p>
A contents/articles/too-many-cooks-take-3.html

@@ -0,0 +1,18 @@

+----- +title: Too many cooks... take #3 +content-type: article +timestamp: 1256408819 +tags: cakephp|rant|php|li3 +----- +<p>Like <a href="http://www.h3rald.com/articles/too-many-cooks-take-2/">its predecessor</a>, this is another rant about the (end of the) <a href="http://www.cakephp.org">CakePHP framework</a>. Not that I particularly enjoy writing about the misfortune of others, but after reading <a href="http://bakery.cakephp.org/articles/view/the-cake-is-still-rising">this official announcement</a> I felt compelled to post.</p> +<p>It has been two years since my last post on this subject and yes, the cake is still rising, but at what price? Will it still taste sweet now that two of its main ingredients are not part of it anymore? As <a href="http://cakebaker.42dh.com/2009/10/23/the-end-of-cakephp/">Daniel</a> puts it, <em>probably the best thing to do now is to drink tea and to wait until the dust settles&#8230;</em></p> +<p>As far as I&#8217;m concerned, what really matters is that Garrett Woodworth (former CakePHP Project Manager) and Nate Abele (former CakePHP Lead Developer) are <em>gone</em>. They realized they had enough Nuts over the years and they decided to switch to a more <a href="http://irc.cakephp.org/logs/link/1110092#message1110102">Lithium-rich</a> diet. More helthy and depression-proof, too!</p> +<p>Stupid metaphors and painful jokes aside, this is probably the best piece of news the CakePHP community received in a long time: the birth of <em>a fork of the CakePHP framework</em>, more precisely of the so-called Cake3 branch.</p> +<p><em>Cake3</em>? I didn&#8217;t keep up-to-date with the buzz, so I didn&#8217;t know anything about this until today, when I decided to finally start catching up.</p> +<blockquote> +<p>&#8220;Cake 3.0, on the other hand, is pretty different from the existing core code in a few notable ways. Mainly, it&#8217;s been re-written from the ground up for <span class="caps">PHP</span> 5.3.&#8221;</p> +</blockquote> +<p style="padding-right:6em;">from <a href="http://debuggable.com/posts/Cake_3_interview_with_Nate_Abele:4a665a5e-5bfc-4e42-96ee-6d284834cda3">Cake 3 interview with Nate Abele</a>, debuggable.com</p> +<p>Of course, in these three years of my full immersion in the Ruby language, I almost completely forgot about <span class="caps">PHP</span> too. <span class="caps">PHP</span> 5.3 means namespace and closures, i.e. the Rubyist&#8217;s daily bread. A more modular CakePHP, properly object-oriented, with an ActiveRecord-like <span class="caps">API</span> for models (finally!) is definitely worth a look, especially if it&#8217;s Nut-free as well.</p> +<p>The new framework will be called <strong>Lithium</strong> (sounds more professional already), and it&#8217;s due to launch next monday, here: <a href="http://li3.rad-dev.org/">http://li3.rad-dev.org/</a> (at the time of writing, this link is password-protected).</p> +<p>Personally, I am <em>very</em> excited about this new project. It should have happened three years ago, really, but there&#8217;s no point in being greedy: the time has finally come. I would like to (pre-)thank Garrett and Nate for their (upcoming) amazing work, I&#8217;ll definitely keep a closer eye on it.</p>
A contents/articles/tweaking-windows-explorer.html

@@ -0,0 +1,139 @@

+----- +title: Tweaking Windows Explorer +content-type: article +subtitle: How to make the default Windows file manager suck less +popular: true +timestamp: 1183109280 +tags: review|software +----- +<p>If you asked me what file manager I used on Windows, up to a month ago I&#8217;d have answered something like: <a href="http://www.primitus.us/a43/">A43</a> or <a href="http://www.cubicreality.com/">CubicExplorer</a>, for sure <em>anything but Windows Explorer</em>.<br /> +Well, it turns out that I had to change my mind after all&#8230;</p> +<p>There&#8217;s a multitude of &#8220;Explorer Replacements&#8221; which aim to be more feature-rich, more user-friendly, less bloated than Bill&#8217;s favorite, and I indeed tried quite a few of them, mostly the free ones of course.</p> +<p>The only problem is that whenever I got close to choose &#8220;the one&#8221;, I noticed that there always was one or two features missing somewhere, which were present in another and vice versa. Additionally, to be totally honest, the level of integration with Windows and other applications was never <em>complete</em>.</p> +<p>These are a few stupid, silly things which tend to be lacking or at least are not 100% functioning &#8212; not in all the file managers I tried, but at least in some:</p> +<ul> + <li>Environment variables integration &#8212; Alternative file managers normally are not able to parse Windows environment variables.</li> + <li>Icon overlays &#8212; Some file managers can&#8217;t render Subversion&#8217;s icon overlays.</li> + <li>Strange context menus &#8212; Sometimes right-clicking on a file or a directory may not open the standard Explorer context menu</li> + <li>Open Folder &#8212; Third-party application allowing you to open a folder, will always open it through Windows Explorer</li> + <li>auto complete address bar&#8230;.</li> + <li>Special Folders &#8212; Some special folders (e.g. Control Panel) are now accessible using alternative file manager, but others may not (e.g. Network Connections). At any rate, typing &#8220;Control Panel&#8221; will <em>not</em> open the Control Panel in an alternative file manager.</li> +</ul> +<p><em>What about trying to &#8220;patch&#8221; Windows Explorer instead of using another program altogether?</em></p> +<p>I never really thought of that until <a href="http://lifehacker.com/software/featured-windows-download/add-tabs-to-windows-explorer-with-qt-tabbar-260926.php">LifeHacker</a> featured the QT TabBar shell extension by <a href="http://members.at.infoseek.co.jp/Quizo/freeware/indexEn.html">Quizo</a>. That was my epiphany: I immediately thought I was going to &#8220;patch&#8221; Windows Explorer using a few really useful (and free, of course) Windows Shell Extensions.</p> +<p>Here&#8217;s <em>my</em> file manager now:</p> +<p><img src="/files/tweaked_explorer.jpg" alt="" /></p> +<p>Yes, it is Windows Explorer, with just a few addons:</p> +<ul> + <li><a href="http://members.at.infoseek.co.jp/Quizo/freeware/indexEn.html#qttab">QT TabBar</a> (Requires .<span class="caps">NET</span> framework 2.0)</li> + <li><a href="http://members.at.infoseek.co.jp/Quizo/freeware/indexEn.html#qtadr">QT Address Bar</a> (Requires .<span class="caps">NET</span> framework 2.0)</li> + <li><a href="http://members.at.infoseek.co.jp/Quizo/freeware/indexEn.html#qtt2">QU ToolBar 2</a> (Requires .<span class="caps">NET</span> framework 2.0)</li> + <li><a href="http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html"><span class="caps">NTFS</span> Link Shell Extension</a></li> + <li><a href="http://www.lopesoft.com/en/fmtools/info.html">FileMenu Tools</a></li> +</ul> +<h3>Explorer Tabs</h3> +<p>For an instant gratification, download and install QT TabBar first, logoff and logon again for the changes to take effect (or install all the other extensions first, otherwise you&#8217;ll have to re-logon after installing nearly each one). As the name implies, this will add tabs to Windows Explorer, just the way you expect them to be: clean, stable and really smart.</p> +<p><img src="/files/tabs.gif" alt="" /></p> +<p>After the installation, right-click anywhere in an existing window toolbar and enable the <strong>QT Tab Standard Buttons</strong> and voil&aacute;, a the tab bar will appear. You can click CTRL+N a few times to open new tabs. Take your time to position QT TabBar wherever is more convenient for you.</p> +<p>Whenever you&#8217;re ready, take your time to configure QT TabBar (right-click on it and choose &#8220;Options&#8221;) General options:</p> +<p><img src="/files/tabbar_general.gif" alt="" /></p> +<p>&#8230;and at least the Window options:</p> +<p><img src="/files/tabbar_window.gif" alt="" /></p> +<p><strong>How do you create tabs?</strong> There are many different ways to do it, choose whatever is best for you:</p> +<ul> + <li>CTRL+N keyboard shortcut</li> + <li>Drag and drop a folder or a shortcut on QT TabBar &#8211; Even from other applications!</li> + <li>Right click on an tab and choose &#8220;Clone this&#8221;</li> +</ul> +<p>Other features? Sure, there&#8217;s plenty more, e.g.:</p> +<ul> + <li><strong>Single Instance</strong> &#8212; By enabling the appropriate option, you&#8217;ll only have a single instance of Windows explorer, everything will be opened in new tabs. A must.</li> + <li><strong>Rearrange tabs</strong> &#8212; Tabs can be rearranged by dragging and dropping.</li> + <li><strong>Lock/Unlock</strong> &#8212; Lock a tab (right-click &gt; Lock) to avoid closing it accidentally.</li> + <li><strong>Folder Memo</strong> &#8212; It is possible to set a &#8220;folder memo&#8221; for a specific folder, which can be visualized and edited afterwards (right-click &gt; Memo for this folder).</li> + <li><strong>Folder Password</strong> &#8212; Password-protect a particular tab (right-click &gt; Set Password&#8230;).</li> + <li><strong>Picture Preview</strong> &#8212; Preview image files simply by hovering on them with the mouse.</li> + <li><strong>Groups</strong> &#8212; It is possible to group more tabs together by adding them to groups (right-click &gt; Add to Group &gt; [Group Name]) which can be configured via the QT TabBar option dialog.</li> + <li><strong>Keyboard Shortcuts</strong> &#8212; Open the folder in which you unzipped QT TabBar and run QTShortcutKeyEditor.exe and enable as many as you like (they are too many to list hered), the possibilities are endless.</li> +</ul> +<h3>Customizing Toolbars</h3> +<p>Windows Explorer allows users to choose the buttons which will be displayed in the <strong>Standar Buttons</strong> toolbar. To do so, proceed as follows:</p> +<ol> + <li>If necessary, enable the Standard Buttons toolbar by selecting <em>View &gt; Toolbars &gt; Standard Buttons</em> from the Explorer menu.</li> + <li>Select <em>View &gt; Toolbars &gt; Customize</em> from the Explorer menu.</li> + <li>Choose the buttons you want to display.</li> +</ol> +<p>I picked the following:</p> +<p><img src="/files/standard_explorer_buttons.gif" alt="" /></p> +<p>i.e.: Up , Refresh, Search, Folders, History, Favorites, Undo, Delete, Cut, Copy, Paste, Properties, View, Map Drive and Disconnect. It&#8217;s really up to you what you choose really.<br /> +I placed this toolbar right under the menu, on the top-left side.</p> +<p style="float:right;"><img src="/files/tabbar_buttons.gif" alt="" /></p> +<p>Right next to it I placed some of the buttons available for <strong>QT TabBar</strong>:</p> +<ul> + <li>Groups &#8212; Load an existing tab group (configurable in the options)</li> + <li>Recently Closed &#8212; open recently-closed tabs</li> + <li>Applications &#8212; run custom applications (configurable in the options)</li> + <li>Close &#8212; Close current tab</li> + <li>Lock &#8212; Lock current tab</li> + <li>Topmost &#8212; Force explorer to stay on top of other windows</li> +</ul> +<p>Then I decided to enable the <strong>Links</strong> Explorer toolbar, which can be configured to display bookarks and shortcuts placed in the Favorites &gt; Links folder. As shortcuts, I dragged each drive available on my system and voilà: poor man&#8217;s Drive Toolbar! Unfortunately, unlike in the <em>proper</em> drive toolbars offered by alternative file managers, all drive shortcuts will remain there (with a red question mark) even when the drive is not connected to the system. I can live with that.</p> +<p style="float:right;"><img src="/files/toolbar2.gif" alt="" /></p> +<p>Right to the address bar (we&#8217;re going to substitute it in the next section though), I decided to place <strong>QT ToolBar 2</strong>, which is available &#8211; hear, hear &#8211; after installing the QT ToolVar 2 extension.<br /> +At first it looks like a search filter toolbar, and yes, it can be used for this <em>as well</em>. Just type .jpg in the search box and it will show only the <span class="caps">JPG</span> files in the current folder. Easy enough.</p> +<p>Of course there&#8217;s (much) more to it. A <em>search helper</em> is provided (click the little arrow pointing downwards at the end of the toolbar and select Search Helper) to perform more complex searches:</p> +<p><img src="/files/toolbar2_search.gif" alt="" /></p> +<p>Additionally, ToolBar allows you to display a handy copy file name/path button and up to two buttons to access two applications you use frequently. To configure them select <em>Option</em> from the dropdown menu accessible at the end of the toolbar, and configure your applications like this:</p> +<p><img src="/files/toolbar2_apps.gif" alt="" /></p> +<p>I choose the Command Prompt and the A43 file manager. The cool thing is that you can enable the &#8220;arguments for user application&#8221; and the the file path (if a file is selected) or the folder path will be passed automatically to the application, so my A43 file manage will open in the current folder. If you want to have more than two custom applications at your fingertips, all you have to do is to configure as many as you like in the Options tab of QT TabBar, and they&#8217;ll become available via the Applications button.</p> +<p>Two little utilities can also be used through QT TabBar 2, <em>MD5</em>, which instantly calculates the MD5 checksum of the selected file:</p> +<p><img src="/files/toolbar2_md5.gif" alt="" /></p> +<p>and <em>Folder Analyze</em>, which finds out the size of the current folder and how it is distributed across folders and files. A bit like a little <a href="windirstat.info">WinDirStat</a> but for the current folder only. It looks like this:</p> +<p><img src="/files/toolbar2_folder.gif" alt="" /></p> +<h3>Navigation Improvements</h3> +<p>Is there any way to make navigation through folder easier in Windows Explorer? Yep, more than one:</p> +<h4>Breadcrumbs</h4> +<p>Vista offers a <a href="http://www.zdnet.com.au/insight/software/soa/Investigating-Windows-Vista-s-breadcrumb-bar-/0,139023769,139218189,00.htm">Breadcrumb Bar</a>, and XP doesn&#8217;t. Quizo fixed it of course, with his <strong>QT Address Bar</strong>, which brings breadcrumbs navigation to Windows XP. Use it as an Explorer address bar replacement. By default breadcrumbs are displayed:</p> +<p><img src="/files/address-bar1.gif" alt="" /></p> +<p>&#8230;allowing you to navigate through your folder three within submenus without changing the current directory. Clicking it toggles the standard path:</p> +<p><img src="/files/address-bar2.gif" alt="" /></p> +<p>A nice thing to have.</p> +<h4>Take back your Favorites!</h4> +<p>I don&#8217;t use IE, I use Firefox, Opera, even Safari sometimes, but not IE unless I&#8217;m forced to do so. Hence I <em>hardly ever</em> used Internet Explorer&#8217;s Favorites, an I almost forgot about it, until I decided to begin tweaking Windows Explorer, and I (re-)discovered that Favorites are shared between the two&#8230; What&#8217;s that got to do with anything? Well, you can simply put Favorites to good use and use them to store <em>only</em> Windows Explorer folders.</p> +<p>Simple and effective: click the Favorites button in the toolbar, they&#8217;ll be loaded in a sidebar on the left, then simply drag a folder to QT TabBar and you&#8217;ll get there.</p> +<h4>Wormholes, anyone?</h4> +<p>Finally, <strong><span class="caps">NTFS</span> Link Shell Extension</strong> does something totally different altogether: it can be used to create hardlinks (a bit like Unix symlinks, but for <span class="caps">NTFS</span> drives only) junctions and symbolic links (Vista only). For an explanation of what each object is, refer to the explanations provided on the <a href="http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#hardlinks">shell extension homepage</a>. For our purposes, we&#8217;ll just use junctions now:</p> +<p>bq.&#8220;[&#8230;] Junctions are wormholes in the tree structure of a directed graph. By browsing a Junction a maybe far distant location in the file system is made available. Modifying, Creating, Renaming and Deleting files within a junction tree structure operates at the junction target, i.e. if you delete a file in a Junction it is deleted at the original location. [&#8230;]&#8221;</p> +<p>Consider the following example.</p> +<p style="float:right;"><img src="/files/junction.gif" alt="" /></p> +<p>1) Create a directory called &#8220;Gateway&#8221; in C:\. <br /> +2) With <span class="caps">NTFS</span> Link Shell Extension installed, right-click a directory &#8220;far, far away&#8221;, on any of your <span class="caps">NTFS</span> drives, for example D:\My\Very\Long\Path\MyDirectory, and select &#8220;Pick Link Source&#8221;.<br /> +3) Go back in your Gateway folder, right-click and select &#8220;Drop As &gt; Junction&#8221;. A folder with a small chain overlay will be created.<br /> +4) You will now be able to access all the contents in D:\My\Very\Long\Path\MyDirectory directly from C:\Gateway.</p> +<p><strong>Important</strong> &#8211; No, creating a shortcut is <em>not</em> the same thing. the path C:\Gateway\MyDirectory is an actual <em>valid path</em>, i.e. you can use it to attach files to emails, and going up one level in C:\Gateway\MyDirectory will take you simply to C:\Gateway\, <em>not</em> to D:\My\Very\Long\Path\.</p> +<p>Both at home and at work, I use a &#8220;Gateway&#8221; folder containing junctions leading to commonly-accessed directories, and this speeds up navigations a lot. Just remember to delete junctions &#8220;properly&#8221; (right-click &gt; Delete Junction), not like an ordinary directory&#8230; ;-)</p> +<h3>De-cluttering the Context Menus</h3> +<p>Right now our Windows Explorer interface has been streamlined, folder navigation is easier, but there&#8217;s still room for improvement. Where? Well, in the contex menus of course. <br /> +I spent ages trying to figure out an easy way to remove unnecessary or unwanted entries from the menus which appears on a right-click. Yes, they can be removed by fiddling with the Windows Registry, but that&#8217;s not exactly user-friendly, is it? Now there&#8217;s an easy alternative: <strong>FileMenu Tools</strong>.</p> +<p>This nifty little utility allows you to remove rubbish from your context menus and add new entries as well. Entries are grouped by file type and can be enabled or disabled with a single click. Unfortunately I was not able to disabe some of them, probably due to restriction on my computer at work.</p> +<p style="float:right;"><img src="/files/filemenu_tools.gif" alt="" /></p> +<p>Once the rubbish is gone, perhaps you can even evaluate the possibility to add some more. I chose to enable just <em>Attributes</em> and <em>Advanced Renamer</em>, but there are many more predefined commands (each with its own pretty icon) you can choose from:</p> +<ul> + <li>Synchronize Folders</li> + <li>Extended Delete</li> + <li>Find And Replace</li> + <li>Delete Locked File</li> + <li>Delete and no move to Recycle Bin</li> + <li>Change Icon</li> + <li>Run with Arguments</li> + <li>Command Line From Here</li> + <li>Split/Join File</li> + <li>Copy/Move to&#8230;</li> + <li>Copy Name/PAth/Content</li> + <li>Change Time</li> + <li>Register/Unregister <span class="caps">DLL</span></li> + <li>Create new folder</li> +</ul> +<p>Something missing? Well, you can always create your own entry, if you like!</p> +<h3>Conclusion</h3> +<p>I think that&#8217;s enough for you to give Windows Explorer another shot &#8212; or at least it was enough for me anyway. Be aware that there are and hopefully there will be more Windows shell extensions able to do neat things: <a href="http://www.7-zip.org/">7-Zip</a>, <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> and <a href="http://cream.sourceforge.net/">Cream</a> all add very useful context menus, and don&#8217;t forget <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, if you are a Windows-based developers (yes, they do exist).</p>
A contents/articles/web-promotion.html

@@ -0,0 +1,7 @@

+----- +title: Zero-cost website promotion - Part I +content-type: article +timestamp: 1134133707 +tags: internet|webdevelopment +----- +Everybody from magazines to canned pasta sellers wants a website to promote their business, but you need to promote your site before you promote your products or services through it. In Part 1 of this article, I will explain some of the basics of promoting a website, and show you how to implement a cost-free strategy to get the search engine placement you need to promote your website.<strong>The Necessity of Website Promotion</strong><br />As the World Wide Web kept growing over the years, people soon realised that keeping updated <em>list</em>s of all the available pages on the Net was an impossible and pointless job. It became necessary to develop a new way to easily find and access the massive amount of content on the Web, and that is when <em>search engines</em> became a reality.<br /><br />Everyone should know the <em>legend</em> of the two lads from Stanford University who became multi-millionaires in a few years after developing and successfully marketing their easy-to-use, ultra-powerful search engine called Google. <br /><br />After it became clear that the Web was going to be (quite literally) dominated by search engines, IT professionals started developing strategies to cause their site to appearon the first page of search results. These strategies and techniques soon became known as <em>Search Engine Optimizations</em> (SEO). Call it ?science?, ?magic? or simply a way to make money, SEO is a business, and so-called "SEO experts" often <em>do</em> get a lot of cash just to take care of your website.<br /><br />Whether you like it or not, any website must be promoted in order to get visitors; some sort of marketing strategy <em>is</em> necessary if you want to stand out from the crowd, and even if you just want someone to find your page.<br /><br />Now let's assume that you don't want to spend a penny marketing your site, but you still want to be known and noticed among either competitors or friends and get some visitors to your new, exceptional (for you) and extremely innovative (to your eyes) website. Is it possible to do this, or do you need to shell out some money to an SEO expert'<br /><br />I think that a zero-cost marketing strategy does exist, and I tried to put one into practice myself. I achieved relatively good results without spending anything but time. Patience and dedication are the keys to success in a zero-cost method: if you don't have those two qualities, you either need to start working on them or find a job to make money to spend for a <em>proper</em> (but sometimes risky) marketing campaign.<br /><br /><br /><strong>1. Plan your website</strong><br /><br />Don't skip this part, because it's the most important step in the whole process: you have to come up with some clever ideas to make your site look unique and original!<br /><br /><em>2. Have a look around</em><br /><br /><em>?Well, if I were able to do <strong>that</strong> I wouldn't need to promote my site at all, and I wouldn't be reading this article?</em><br /><br />This is true to some extent - coming up with an original idea nowadays is difficult if not impossible. <em>Offering something different</em> or <em>presenting it in a different way</em> can be done, as can offering the same thing <em>but better</em> (that's what Google did). Once again, you need patience, dedication, and the belief that it is worth it.<br /> <br />The best way to decide if it's worth creating a new website is to study your potential competitors, i.e. any other website that deals with the same stuff. Study the way these websites are created, list their weaknesses and strengths, and after comparing a few of them, start thinking about what <em>you</em> can do to create a <em>better</em> website.<br /><br />Then, <em>objectively</em> evaluate your idea and decide if you have the ability to do it, what risks are involved, and how long it would take to create. After all this brainstorming, if you still want to spend time on your project, you can go on; if not, <em>this is your last chance to stop and think about something completely different</em> - it doesn't mean you?re a coward, it just means you are capable of understanding your limits, which is something many people have trouble doing these days.<br /><br /><em>4. Create an identity</em><br />Now it's time to think about a proper <em>identity</em> for your site, and this involves the following steps:<br /><br /><ul><br /><li>Define your objectives and purposes</li><br /><li>Define the audience of your site</li><br /><li>Think about a good name for your site</li><br /><li>Create some graphics and a logo</li><br /><li>Create slogans and descriptions </li><br /></ul><br /><br />Of course, defining the objectives and purposes of your site is the most important thing on that entire list. Again, you have to be honest with yourself and not be afraid to admit your limitations: if you find you can't do something you?d like to, try to imagine your site without that particular feature, and if there?s still a hope of success, go ahead. If not, try looking at your ideas from a different point of view.<br /><br />A different point of view could mean a different audience: if you see that there?s absolutely no chance of selling canned pasta to Italians,you might have better luck with the English. Audience is extremely important: it's a factor which influences both the content and the design of your site, as well as the features offered. Doing something the way <em>you</em> like it doesn't mean other people are going to like it, and for people to want to come to your site, they have to like it!<br /><br />Now, think about a good name for your site: it must be easy to remember, be somehow related to what you do, and most importantly, the domain must be available. Check on that before you commit to a particular name, or you might be in for a shock. There are plenty of places on the Net that can tell you if a particular domain with a particular TLD is available[1].<br /><br />Next, I think you should come up with a logo, though some people say it's premature to think about graphics at this stage. It's probably true, but I find that having a visual representation of your goal can often be a morale booster that will help you to keep going. <br /><br />The last step is a slogan or a description. This is an important part of creating your site's identity. It should be honest, yet promising: it has to stick in the consumer's mind. How you do this is entirely up to you, and it can also be the most time-consuming step of the process - it will probably take you a few tries to come up with something you really like.<br /><br /><br /><em>4. Features, Services and Architecture</em><br /><br />Now it's time to do something less idealistic and slightly more practical: you should start listing the features and services your site will offer, and start thinking about how to present them. Don't plan on doing too many things or implementing unnecesssary features on your site - having a forum, a newsletter <em>and</em> a blog on CannedPasta.com could be a bit too much, whereas having a gallery and a Testimonials area could be a much better use of resources. In short, add features because they can be useful, not because it's trendy to offer them.<br /><br />After you decide on your features, you have to think about the <em>architecture</em> of your site, or <em>how</em> people are going to find the services you offer on your site. Menus and navigation bars are a must, but keep them relatively uncluttered and easy to use: you must be able to grab the visitor?s attention and communicate what you do in the first 10 seconds; then, if the visitor remains on the site for another minute or two, he must be convinced by then that you are selling the best canned pasta he?s ever tried and cheaper than anyone else. This is accomplished mainly by putting links to relevant pages in at the right places: if a visitor can't find your content, he?ll never be persuaded to try your product!<br /><br /><br /><strong>Site Development</strong><br /><br />It's now time to start coding your site. Whether you do it yourself or have someone do it for you, the web developer should follow some important guidelines when coding the site. I will only touch on them very briefly.<br /><br /><em>Make it simple</em> -don't do something unless you have to. The layout of your site must be decided according to the site?s purpose - that's why movie sites have a lot of graphics, Flash[3] and other eye-catching things, and why forums and news sites don't need that stuff at all. Show your products and describe them with the minimum amount of content; people who want to buy canned pasta normally don't want to know the history of it: they just want to see if it's worth buying it. <br /><br /><em>Cleaner is better</em> -the code of your site should be clean,support web standards, and contain no errors. Although code validation[4] is not critical to acquire good placement in search engines, it can help to a certain extent. <br /><br />For the sake of code clarity, I normally recommend not using deprecated tags or and its attributes. Avoiding using tags attributes altogether, if possible: CSS[5] was created for a reason, and that's for making your life easier. A discussion of CSS is beyond the scope of this article, but I have included a reference link[6] for you to learn more about it.<br /><br /><em>Fundamentals of an SEO Strategy</em><br /><ul><br /><li>Always provide an ALT attribute for your image </li>(crawlers[7] will process that instead of the image)<br /><li>Always provide a relevant TITLE attribute to your links</li><br /><li>Always use properly formatted h1, h2, etc. tags for your titles.</li><br /><li>The tag in the of every page should be different each time and either reflect the page?s content or provide a proper title for it. It should also be one of the first tags on the page.</li><br /><li>Always remember to provide an icon for your site </li>(favicon[8])<br /><li>Don't forget a valid robots.txt</li>[9] file in the root directory of your site.<br /></ul><br /><br /><em> Meta Tags</em><br />Although Google doesn't seem to care about them any more, you should always include some meta tags in every page, particularly for keywords and the site description. Ideally, these should vary according to the page's content, contain not more than 10-15 relevant keywords, and give a brief yet complete description of the page.<br /><br /><em> Search Engine Friendly (SEF) URLs</em><br />Even though all the major search engines can process dynamic URLs correctly, a URL like <a href="http://www.cannedpasta/products/spaghetti.php">http://www.cannedpasta/products/spaghetti.php</a> is much better than something like <a href="http://www.cannedpasta.com/index.php?a=show&cat=1256&id=234.">http://www.cannedpasta.com/index.php?a=show&cat=1256&id=234.</a> The first one will not only be crawled by ANY search engine with no problems at all, but more importantly, users will remember it. If your site is dynamic (as are the majority of websites these days) and your pages are therefore automatically generated, you could try using mod_rewrite to transform complicated URLs into their simplified but more effective counterparts[10].<br /><br />That's all for this part of the article. Next time I?ll discuss the final phases of your site?s zero-cost promotion campaign: website promotion, website maintenance, and what to do once you get things going.<br /><br /><br /><strong>Notes, related links, and further reading:</strong><br /><br />[1]You can do so here, for example: <a href="http://www.mydomain.com">http://www.mydomain.com</a><br />[2]The domain is fictitious and used as an example<br />[3]Macromedia Flash: <a href="http://www.macromedia.com/software/flash/">http://www.macromedia.com/software/flash/</a><br />[4]W3C validator: <a href="http://validator.w3.org/ ">http://validator.w3.org/ </a><br />[5]CSS: <a href="http://www.w3.org/Style/CSS/ ">http://www.w3.org/Style/CSS/ </a><br />[6]Official CSS tutorial: <a href="http://www.w3schools.com/css/default.asp ">http://www.w3schools.com/css/default.asp </a><br />[7]Web crawler, Wikipedia page: <a href="http://en.wikipedia.org/wiki/Web_crawler">http://en.wikipedia.org/wiki/Web_crawler</a><br />[8]Favicon, Wikipedia page: <a href="http://en.wikipedia.org/wiki/Favicon">http://en.wikipedia.org/wiki/Favicon</a><br />[9]Robot.txt tutorial: <a href="http://www.searchengineworld.com/robots/robots_tutorial.htm">http://www.searchengineworld.com/robots/robots_tutorial.htm</a><br />[10]Apache mod_rewrite: <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html ">http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html </a><br />
A contents/articles/what-is-ajax.html

@@ -0,0 +1,7 @@

+----- +title: What is AJAX? +content-type: article +timestamp: 1137047408 +tags: internet|web20|ajax|webdevelopment +----- +<em>"The Web is changing. The 30-year-old terminal-like technology it was originally is gradually giving way to new ways of doing things. The power of AJAX allows for rich user interaction without the trouble that has bugged traditional web applications."</em>This is the introduction to the script.aculo.us[1] website, and regardless your opinion about the so-called AJAX <em>programming technique</em>, they are fundamentally right: the web is changing. AJAX is at least one way to do things in a different way, enhancing - although arguably, in some cases - users' browsing experience.<br /><br /><strong>Application examples</strong><br />What is AJAX then? Nothing too new, but not too old either. I'd define AJAX as the <em>rebirth of Javascript</em>, for example, it's not only Javascript we're talking about. The acronym stands for Asynchronous Javascript And XML and it already gives an idea of the fundamentals of the technology: something build on <em>asynchronous server requests and responses </em>. This may be clear to coders, but the best way to try explaining this to everyday internet users is showing some famous applications:<br /><br /><em>Gmail[2]</em>: The first example? The most famous? The most used? Perhaps. Google aimed to impress both end users and geeks with it's free, long awaited email service. What's so unusual in this webmail application?<br /><ul><br /><li>An innovative and intuitive interface, more similar to a desktop application than a traditional webpage.</li><br /><li>Rich formatting through an effective, easy-to-use editor.</li><br /><li>Online spell checker.</li><br /><li>Instant </li>(one click) email tagging, labels, contact groups etc.<br /><li>Email auto save.</li><br /></ul><br /><br /><em>Kiko[3]</em>: This is a very neat online calendar, free to use and customizable. Features include:<br /><ul><br /><li>Multiple user/contacts/events administration.</li><br /><li>Personalization of the right click menu </li>(it overrides your browser's default behavior).<br /><li>Drag and drop events across the calendar.</li><br /><li>Easily switch through different calendar views without any page refresh.</li><br />- </ul><br /><br /><em>Writely[4]</em>: An online word processor. Although it is not as advanced as its desktop's cousins, this is a truly admirable effort to port a desktop application to the web. The service is free for now and it allows users to create, edit, share and export text documents. Among its features there are:<br /><ul><br /><li>High degree of document formatting - modify font size, style, colors, alignment, insert images and links etc.</li><br /><li>Enhanced exporting options - it can create html documents, Word documents, zip files etc.</li><br /><li>Online spell-checker.</li><br /><li>Ability to easily share and publish your work.</li><br /></ul><br /><br />This list can continue[5], as new "AJAX-powered" applications are created nearly every day. <br /><fieldset><blockquote>AJAX provides the web developer the ability to create web applications that look and feel like applications that run on the desktop. It does this by solving the 'partial update' problem. AJAX makes it possible for a web application to request data from the server (usually in response to a button click or other java script 'event') and change a part of the current page to reflect the result of the query. Prior to AJAX, if the web developer wanted to retrieve any information from the server a full page update was required. This may mean a full page load when the user clicks a help icon, spell checks a document or performs a drag and drop operation that changes data on the server. AJAX solves this problem and opens the door for a host of AJAX-powered web applications<br />There were some unconventional solutions to this problem prior to AJAX. I have ignored them for the purpose of this article as they were hacky or relied on a feature in a particular browser </blockquote></fieldset><br /><br /><strong>How does it work?</strong><br />Ajax[7] is fundamentally the union of various technologies - not something new by itself:<br /><ul><br /><li> </li>(X)HTML, CSS, etc., used as presentation layer and format the information retrieved by the server: nothing special here.<br /><li>The XMLHttpRequest</li>[8] object, which allows data exchange between client and server "silently", in an asynchronous way, without the need of refreshing and reloading a whole web page<br /><li>The Dom Object Model </li>(DOM)[9], a Object-Oriented way to represent and access HTML or XML.<br /><li>XML and XSLT used for data interchange and manipulation</li><br /></ul><br /><br />The magic is undoubtedly in the XMLHttpRequest object, originally invented by Microsoft as an ActiveX object and then made available as a standard Javascript class by Mozilla-based browsers. At least something which <em>seems</em> to be compatible with <em>most</em> browsers then.<br /><br />A necessary step in any Javascript script using the XMLHttpRequest object would be something like:<br /><br /><code><br />if (window.XMLHttpRequest) { // Mozilla, Safari, ...<br /> http_request = new XMLHttpRequest();<br />} else if (window.ActiveXObject) { // IE<br /> http_request = new ActiveXObject("Microsoft.XMLHTTP");<br />}<br /></code><br /><br />In order to have an http_request object to use later on which is independent from the browser type.<br /><br />Let's now examine an example of elementary Ajax application[10]. The following code is broken into different parts and commented, the uncommented source and a demo is available on degraeve.com[10].<br /><br />For this simple example we need to create a simple server-side script which will be called by our Ajax application. The script can be in any language, this one is in Perl.<br /><br /><code><br />#!/usr/bin/perl -w<br />use CGI;<br /><br />$query = new CGI;<br /><br />$secretword = $query-param('w');<br />$remotehost = $query-remote_host();<br /><br />print $query-header;<br />print "<p>The secret word is <b>$secretword</b> and your IP is <b>$remotehost</b>.<br /> </code><br /><br />Basically it creates a new CGI object named $query, used to access the parameter which will be passed by our submission form, "w", and get the user's IP address.<br />The script will then print a the page header and a phrase containing the word entered in our form and the user's IP address.<br /><br />And here's the simple Ajax application:<br /><br /><code><br /><html><br /><head><br /><title>Simple Ajax Example</title><br /><br /><script language="Javascript"><br /></code><br /><br /><em>Comment: Just the first HTML tags of the page, and the beginning of the script</em><br /><br /><code><br />function xmlhttpPost(strURL) {<br /> var xmlHttpReq = false;<br /> var self = this;<br /> // Mozilla/Safari<br /> if (window.XMLHttpRequest) {<br /> self.xmlHttpReq = new XMLHttpRequest();<br /> }<br /> // IE<br /> else if (window.ActiveXObject) {<br /> self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");<br /> }<br /></code><br /><br /><em>Comment: First of all we create a function named xmlhttpPost, which takes the parameter strURL, i.e. the web address of the script we created earlier. In the first part of the function, we create the HTMLHttpRequest object independently of the browser, which in this case is called self.xmlHttpReq. </em><br /><code><br /> <br /> self.xmlHttpReq.open('POST', strURL, true);<br /><br /> self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');<br /></code><br /><br /><em>Comment: with the method open we initialize the connection, specifying that we want to send a POST request to the page "strURL" and that the connection is asynchronous (true). The third parameter is actually true by default and could have been omitted in this case. <br />As we want to use the POST method, we need to set the content-type header for our request, in this case "application/x-www-form-urlencoded". </em><br /><br /><code><br /> self.xmlHttpReq.onreadystatechange = function() {<br /> if (self.xmlHttpReq.readyState == 4) {<br /> updatepage(self.xmlHttpReq.responseText);<br /> }<br /> }<br /> self.xmlHttpReq.send(getquerystring());<br />}<br /></code><br /><br /><br /><em>Comment: This is the crucial part, as we need to send the request and also define the behavior of our application once the response is received. The request is sent using the "send" method, which sends a properly formatted query string (see below), but before that we need to setup a "listener" to monitor what happens to our request.<br />The readyState variables is updated according to the status of the connection, and can assume the following values:<br /><ul><br /><li>0 - Uninitialised</li><br /><li>1 - Loading</li><br /><li>2 - Loaded</li><br /><li>3 - Interactive</li><br /><li>4 - Completed</li><br /></ul><br /><br />We want to update our page once we are sure that the connection with the script has been established, therefore we setup a listener (onreadystatechange) to update the page via the function update page defined below only if the connection's state is "Completed" (self.xmlHttpReq.readyState == 4). The self.xmlHttpReq.responseText variable which is sent to the update page function contains the response generated by our CGI script. </em><br /><br /><code><br />function getquerystring() {<br /> var form = document.forms['f1'];<br /> var word = form.word.value;<br /> qstr = 'w=' + escape(word); // NOTE: no '?' before querystring<br /> return qstr;<br />}<br /></code><br /><br /><em>Comment: This function simply formats the parameter sent to the script as "w=typedword" where "typedword" is the word typed in the form of our application. </em><br /><br /><code><br />function updatepage(str){<br /> document.getElementById("result").innerHTML = str;<br />}<br /></code><br /><br /><em>Comment: Finally, this function inserts the response we got from the CGI script into an HTML element with id=result, through the method innerHTML. </em><br /><br /><code><br /></script><br /></head><br /><br /><form name="f1"><br /> <pword: <input name="word" type="text" ><br /> <input value="Go" type="button" >onclick='JavaScript:xmlhttpPost("/cgi-bin/simple-ajax-example.cgi")'</p><br /> <div id="result"></div><br /></form><br /></body><br /></html><br /></code><br /><br /><em>Comment: This is the final part of the application, which defines our form containing a text field and a submit button. Note that our xmlhttpPost function is called once the button is clicked, through the on click attribute. </em><br /><br />That's it. <br />The first reaction after reading so far would probably be "Ajax is not easy at all", well, I never said it was. To create a simple application which just prints something on the screen we had to go through a lot of code, and we could have done something similar with much less hassle. This was just a trivial example, very different from those large scale applications available online.<br /><br />There's good news though, there are plenty of frameworks and toolkits which makes life easier for developers interested in using this programming technique. There are in particular various libraries built upon the Prototype[11] framework such as the already mentioned Script.aculo.us[1] and Rico[12] for examples, and various frameworks which integrate Ajax in some way in any server side language, like Ruby on Rails[13] or CakePHP[14], for example.<br /><br /><strong>Conclusion</strong><br />Undoubtedly Ajax can be used to create really powerful and innovative applications, but it shouldn't be abused or mis-used. There are a few things to keep in mind, when developing an Ajax application:<br /><ul><br /><li>It requires Javascript to be enable on the client browser, and the developer obviously can't control that</li><br /><li>The application may not compatible with all browsers, in particular older browsers will definitely not be able to access it.</li><br /><li>It can be too much of a surprise for the user who never used an Ajax application before: it may experience delays in responses, some basic functionalities like the "Back" button might not work as expected etc.</li><br /></ul><br /><br />There are actually many more things to consider [15] before even start planning to develop an application, and can basically be summarized as follows:<br /><br /><em>"Do not use Ajax in your web application unless you know what you're doing"</em><br /><br />Luckily, there are a lot of articles and resources[16] out there, waiting for you.<br /><br /><br /><strong>Notes and Resources</strong><br /><small><br />[1] Script.aculo.us AJAX toolkit: <a href="http://www.script.aculo.us ">http://www.script.aculo.us </a><br />[2] Gmail - Google's online webmail: <a href="http://mail.google.com/mail">http://mail.google.com/mail</a><br />[3] Kiko - Online calendar: <a href="http://www.kiko.com/">http://www.kiko.com/</a><br />[4] Writely - Online word processor: <a href="http://www.writely.com/">http://www.writely.com/</a> <br />[5] A venture forth Blog - Top 10 Ajax applications: <a href="http://www.aventureforth.com/?p=13">http://www.aventureforth.com/?p=13</a><br />[6] HTTP - Webopedia entry: <a href="http://www.webopedia.com/TERM/H/HTTP.html">http://www.webopedia.com/TERM/H/HTTP.html</a><br />[7] AJAX - Wikipedia Page: <a href="http://en.wikipedia.org/wiki/AJAX">http://en.wikipedia.org/wiki/AJAX</a><br />[8] XMLHTTP Wikipedia Page: <a href="http://en.wikipedia.org/wiki/XMLHTTP">http://en.wikipedia.org/wiki/XMLHTTP</a><br /><br />[9] Dom Object Model - Wikipedia Page: <a href="http://en.wikipedia.org/wiki/Document_Object_Model">http://en.wikipedia.org/wiki/Document_Object_Model</a><br />[10] degraeve.com - Simple Ajax Example: <a href="http://www.degraeve.com/reference/simple-ajax-example.php">http://www.degraeve.com/reference/simple-ajax-example.php</a><br />[11] Prototype Javascript Framework: <a href="http://prototype.conio.net/">http://prototype.conio.net/</a><br />[12] Rico open-source Javascript library: <a href="http://openrico.org/">http://openrico.org/</a><br />[13] Ruby on Rails: <a href="http://www.rubyonrails.org">http://www.rubyonrails.org</a><br />[14] CakePHP framework: <a href="http://www.cakephp.org">http://www.cakephp.org</a><br />[15] Alex Bosworth's Weblog: Ajax Mistakes: <a href="http://sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html">http://sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html</a><br />[16] AjaxMatters.com: <a href="http://www.ajaxmatters.com/r/welcome">http://www.ajaxmatters.com/r/welcome</a><br /></small><br />
A contents/articles/where-does-your-ruby-code-live.html

@@ -0,0 +1,72 @@

+----- +title: Where does your Ruby code live? +content-type: article +timestamp: 1226147640 +tags: ruby|programming +----- +<p>Back when I wrote my <a href="/articles/10-reasons-to-learn-ruby">10 reasons to learn Ruby</a> article, I mentioned <a href="http://www.rubygems.org/">RubyGems</a> in <em>Reason #1</em> as one of they key features of the Ruby programming languages.<br /> +Indeed, gems make getting Ruby programs as easy as typing <code>gem install &lt;something&gt;</code> from the command line. When you want to distribute something new in Ruby, there&#8217;s no need to give people download links, zip files or setup programs, just <a href="http://adam.blog.heroku.com/past/2008/11/2/pony_the_express_way_to_send_email_from_ruby/">tell them to get the gem</a>. That&#8217;s perfectly normal, and extremely cool.</p> +<p>Gems are normally stored on <a href="http://rubyforge.org">RubyForge</a>, so all you have to do is uploading your gem there, and it will be available to the rest of the universe. It&#8217;s a nice feeling. I remember when I first uploaded <a href="http://rubyforge.org/projects/rawline/">RawLine</a> and then tried <code>gem install rawline</code> just for the hell of it: it downloaded and installed the gem, as expected.</p> +<p>Back in the day, if you wanted to find something written in Ruby, all you had to do is search through RubyForge, and you&#8217;d eventually find it, with a bit of luck.</p> +<h3>Can we just have git, please?</h3> +<p>RubyForge had, until recently, one major problem: it only allowed <span class="caps">CVS</span> and <span class="caps">SVN</span> repositories, and you had to make your choice when creating the project, once and for all. So when the cool guys at <a href="http://github.com/">GitHub</a> rolled out their <em>social code hosting</em> web site, most of the <em>créme de la créme</em> of RubyForge flocked there in mass migration: <a href="http://github.com/rails/rails/tree/master">Rails</a>, <a href="http://github.com/wycats/merb-core/tree/master">Merb</a>, <a href="http://github.com/dchelimsky/rspec/tree/master">RSpec</a>&#8230; you name it.<br /> +Once the big guys made the switch, a lot jumped on the GitHub bandwagon of course. Result: we have a lot of projects still on RubyForge, but quite a few (and important ones) on GitHub.</p> +<p>Why did people move there? Well, at first it was because they wanted a sleek-looking git host, and RubyForge didn&#8217;t offer git at the time. But <a href="http://drnicwilliams.com/2008/04/08/git-for-rubyforge-accounts/">git is now available on RubyForge</a>, so why don&#8217;t people use it? <br /> +I&#8217;d like to know how many people use git on RubyForge. Apparently you can have your old <span class="caps">SVN</span> repository manually migrated to git, if you ask nicely (and RubyForge people are very helpful always, anyway). Still, I don&#8217;t think many people use git there, and hardly anyone (if any) moved back from GitHub.</p> +<p>What&#8217;s so special about this new &#8220;social code hosting&#8221; site then? I guess just a few key features:</p> +<ul> + <li>Fast and reliable git hosting</li> + <li>The ability to &#8220;watch&#8221; other people&#8217;s repositories and interact with them &#8220;the git way&#8221;, also by forking.</li> + <li>There&#8217;s a whole new and fresh community feeling to it: you can follow people, message them, etc.</li> + <li>The interface is much more neat than RubyForge&#8217;s (OK, granted, it doesn&#8217;t take much)</li> + <li>Really cool stats and graphs</li> + <li>A basic, but functional, wiki</li> +</ul> +<h3>&#8230;oh, and bug tracking, too!</h3> +<p>GitHub has no bug tracking features. It tracks an awful lot of stuff about your repositories and people working on them, but &#8220;batteries are sold separately&#8221;. You can get batteries <a href="http://lighthouseapp.com/">here</a>, for example. Apparently, GitHub and LightHouse are seamlessly <a href="http://github.com/blog/41-service-integration">integrated</a>.</p> +<p>So now you can sign up to two cool brand new web applications with neat interfaces instead of sticking with the old-looking RubyForge (which comes with &#8220;batteries included&#8221;, after all). <br /> +Personally <strong>I&#8217;m very confused now</strong>. Fortunately I don&#8217;t have any extremely cool projects used by thousands of people, so jumping from one source code hosting solution from another is not really an issue for me, but I imagine it would be for others! Correct?</p> +<p>So, as far as I know, if you are a Rubyist, here&#8217;s what you can do:</p> +<ol> + <li>Stick with RubyForge: it&#8217;s not so bad after all.</li> + <li>Embrace GitHub (and Lighthouse): it&#8217;s extremely nice to use. Some people are not <a href="http://groovie.org/2008/05/06/most-bizarre-git-service-and-other-stupid-rails-powered-businesses">too convinced</a> that this is the best choice though.</li> + <li>Go for something in between, like <a href="http://www.assembla.com/">Assembla</a>, which actually has an <em>impressive</em> list of features and is powered by Rails too, so you&#8217;ll feel at home. <a href="http://code.google.com/hosting/">Google Code</a> used to be another common choice, but sadly they don&#8217;t offer git yet.</li> + <li>Do-it-yourself, maybe using something like <a href="http://gitorious.org/">Gitorius</a> and some open source bug tracking/project management solution.</li> +</ol> +<p>So&#8230; what choice did <em>you</em> make or are you planning to make?</p> +<h3>Moving houses</h3> +<p>There&#8217;s one simple issue to consider when moving your code to a new place: what happens to your <em>old</em> place. If have a relatively popular project, a lot of people may have bookmarked your project page on RubyForge, or the RubyForge subdomain which you may have used as the &#8220;home page&#8221; for your project (in truth, most of the ones who moved away still use it).</p> +<p>You may setup a redirection to the new home page or put a notice saying that the project moved somewhere else and point visitors to GitHub and LightHouse, or to another web site, if you wish. When <a href="http://weblog.rubyonrails.org/2008/4/11/rails-premieres-on-github">Rails moved to GitHub</a>, that wasn&#8217;t much of a problem as Rails has its own web site.</p> +<p>What may become a problem is your old repository. In Rails&#8217; case, they left the old <span class="caps">SVN</span> repository available on sourceforge for a while and then removed it altogether. Other project owners have just abandoned their old repositories, occasionally resulting in <a href="http://webby.rubyforge.org/">someone else</a> deciding to leave a note as their <a href="http://webby.rubyforge.org/svn/trunk/">last <span class="caps">SVN</span> commit</a>.</p> +<p>These solutions all work (you eventually drive people to the new home of your project), but it&#8217;s not very nice, that&#8217;s all. What happens if someone comes up with something cooler than GitHub? In all honesty, you may end up moving house over and over again.</p> +<h3>Don&#8217;t forget the gems!</h3> +<p>One thing I liked about RubyForge, as I wrote at the beginning, was that if you uploaded a gem there, it was immediately available to everyone typing <code>gem install &lt;something&gt;</code>. <br /> +Luckily, <a href="http://gems.github.com/list.html">GitHub supports gems, too</a>! We&#8217;re saved. The page they put up is <a href="http://gems.github.com/">utterly awful</a>, but it does the job: you can have your gems hosted on GitHub.</p> +<p>Good! So surely I can get Rails now, right? Yup: <code>gem install rails</code> will get the latest version of Rails for you, straight from GitHub.</p> +<p>Actually, no. It doesn&#8217;t seem to work that way: sure you can get the latest rails in that way, but it will actually be downloaded from <em>RubyForge</em> (go check the <a href="http://rubyforge.org/frs/?group_id=307&amp;release_id=27493">downloads</a>, you&#8217;ll see it there). <br /> +So even if technically you got Rails, you got it from RubyForge. If you want to get gem from GitHub, you have to add it as gem source first (that&#8217;s an <em>una tantum</em> operation, luckily): <code>gem sources -a http://gems.github.com</code>.</p> +<p>So, yes, you can move to GitHub and you&#8217;ll also get gem support: but please <em>remind the users</em> that they have to add GitHub as gem source. Or, better, you should always remember to upload your latest gems to GitHub <em>and to RubyForge as well</em>.</p> +<h3>The present</h3> +<p>To sum up:</p> +<ul> + <li>If you want, you can stay on RubyForge. It has git, it has gems, it&#8217;s probably not nearly as prettier than competitors and is not as social, but it works.</li> + <li>You can opt for GitHub+LightHouse, have a slick interface, plenty of features and your project will be scattered in 2 different places + your home page, and you&#8217;ll also have to keep uploading your gems to RubyForge.</li> + <li>At this point, you may even go for something completely different, like Assembla or your own setup, but still upload your gems to RubyForge.</li> +</ul> +<p>The obvious solutions at this point would be that the folks who craft rubygems (the gem which makes the gems, to be clear) add GitHub as default source. Sure as hell when that happens other people will want that too (hey, I&#8217;ll have gems.h3rald.com setup by then!). Is this the future? I hope not.</p> +<h3>The future?</h3> +<p>You know there&#8217;s a domain called <a href="http://www.rubygems.org/">www.rubygems.org</a>? It&#8217;s where the gem <em>manuals</em> are! <br /> +As much as I love documentation, there&#8217;s nothing wrong in moving all those documents and books to something like <em>docs.rubygems.org</em>, right? <br /> +Then they could make RubyGems.org the <em>only</em> official gem server and tell people they should upload their gems there if they want to distribute them efficiently (after manual approval, if necessary, like there is on RubyForge).</p> +<p>In this way:</p> +<ul> + <li>You wouldn&#8217;t have to upload stuff to RubyForge anymore</li> + <li>You could have the clever folks at GitHub to create a simple script to automate the upload</li> + <li>You&#8217;d have virtually <em>all</em> the gems in one place</li> + <li>You&#8217;d put a good domain name (currently almost forgotten) to good use</li> +</ul> +<p>While they are at it, <strong>the clever folks at RubyGems.org could also setup a <em>proper</em> gem directory with a <em>proper</em> search</strong>. I&#8217;m sure there would be plenty of people who could help, too!</p> +<p>It&#8217;s not impossible, right? They said that making Rails/Ruby/RSpec documentation more accurate and accessible was impossible, but now there&#8217;s <a href="http://apidock.com/">APIdock</a>, correct?</p> +<p>Personally I&#8217;d like it to be a collaborative effort of the Ruby community (like ruby-lang.org), rather than one private company showing off, but I think everyone will be happy as long as it works.<br /> +I&#8217;m sure people will contribute, I would try at least (after finishing the Italian translation of ruby-lang.org, that is&#8230; erhm, well, that&#8217;s another story&#8230;).</p> +<p>Thoughts?</p>
A contents/articles/wunderlist.html

@@ -0,0 +1,78 @@

+----- +title: Getting things done... in Wonderland! +content-type: article +subtitle: Why Wunderlist is the only Todo List I'll ever need +timestamp: 1312063673 +tags: productivity|review|software +pdf: true +----- + + <section class="section"> +<p>I don&#8217;t remember the exact day when I started using a todo list in a serious way. It definitely happened at work, but I can&#8217;t remember when exactly. The point is that, once I started working (and getting paid for what I love doing &ndash; writing), I slowly turned into a real <em>productivity freak</em>.</p> +<p>I write <em>everything</em> down. My colleagues know that if I say that I&#8217;ll do something <em>right now</em> but I don&#8217;t do it within five minutes, they have to assume that I forgot about it altogether and they&#8217;d better send me an email.</p> +<p>I am not a paper person. Never been one. When I got a job which consisted in working on the computer for eight hours a day, I started looking for todo list programs. That turned into an endless quest: I tried X for a few weeks, then I discovered that Y was better, used it for months, then moved onto Z, and so on.</p> + + + <section class="section"> +<header><h1 id="h_1" class="toc">What's wrong with 90% of digital todo lists</h1></header> +<p>Over the past five years, I must have tried dozens of different digital todo lists, and every single one of them had something wrong with it. Here are the most common flaws I encountered in many applications:</p> +<ul> + <li><strong>Too many fields</strong> &ndash; I don&#8217;t want to specify (or see, either) a due date, a start date, a completion date, priority, effort, risk, tags, categories, sections, flags, stars, projects, reminder, pre-reminder, recurrency, location, contexts, and finally the actual task. I just want to write down what I have to do. Maybe I want to flag it as <em>important</em>. Sometimes I may need to set a deadline with a reminder, but that starts getting complex already.</li> + <li><strong>Too few fields</strong> &ndash; On the other hand, just a title and a checkbox won&#8217;t do. I want some form of categorization and (optional) deadlines.</li> + <li><strong>Not cross-platform</strong> &ndash; I use Windows at work, Linux at home, my wife has a Mac. We both have iPhones, but someday I may get an Android device, too. There aren&#8217;t many todo lists out there that support more than two operating systems, nevermind mobile devices or web access!</li> + <li><strong>Too fiddly</strong> &ndash; See the first complaint, above. With too many fields almost always comes a complex interface. I don&#8217;t want to wait 17 clicks to save my task. I want to type in what I want to do, and press Enter. Is it too much to ask for?</li> + <li><strong>Made for a particular methodology</strong> &ndash; <span class="caps">GTD</span> is great and David Allen is the God of Productivity, but I don&#8217;t want to use @contexts or specify next actions because don&#8217;t believe in them, therefore I shouldn&#8217;t be forced to do so.</li> +</ul> +<p>90% of the digital todo list suck. Believe me. 10% &ndash; perhaps &ndash; don&#8217;t. Luckily, I just need <em>one</em>, and guess what: I found it!</p> + +</section> + + <section class="section"> +<header><h1 id="h_2" class="toc">Introducing Wunderlist: the quest is over!</h1></header> +<p><a href="http://www.6wunderkinder.com/wunderlist/">Wunderlist</a>, the List of Wonders, you can use it anywhere and at any time. It&#8217;s so awesome that&#8230; I should stop the ass-kissing right now, and get to the <em>facts</em>.</p> +<p>I discovered Wunderlist when my endless quest led me to the App Store. I think I must have installed nearly all the damn todo list apps, even the crappy ones. I didn&#8217;t fall in love with Wunderlist at first tap: it took a few install-uninstall cycles, but in the end I settled for it. Here&#8217;s why:</p> +<ul> + <li><strong>Free</strong> &ndash; Not that it matters that much, I would happily pay a few bucks for a <em>good</em> app. And yes, I did pay for a few todo lists that I dumped afterwards. Bummer.</li> + <li><strong>Cross-platform</strong> &ndash; iPhone, iPad, Android, Windows, OS X. And Linux? Not really, but who cares: the web app is fine and it probably plays well <a href="http://haiku-os.org/">Haiku</a> as well.</li> + <li><strong>Simple and Efficient</strong> &ndash; Two clicks to add a task to any list. No compulsory extra-fields, optional deadlines, unlimited lists. Got something important to do? Tap the star on the left of the task to move it to the top of your list and bookmark it.</li> + <li><strong>Amazing email integration</strong> &ndash; Create tasks via email, share tasks with others via email, get reminders via push&#8230; or email. They even email you if you have overdue tasks. Like&#8230; everyday! I was so happy when they implemented this feature that I nearly cried when I got the first few emails.</li> + <li><strong>Everything is sync&#8217;ed</strong> &ndash; On your iPhone, iPad, Android device, Windows PC, Mac, web, etc. It&#8217;s all there, always, everywhere.</li> +</ul> +<p>When I finally realized how awesome this app was, I started using it for chores, and as a shopping list. Then I figured it was good enough as a backlog for my open source projects and my web site, and then&#8230; Then my wife discovered it.</p> + +</section> + + <section class="section"> +<header><h1 id="h_3" class="toc">Why your wife shouldn't use it...</h1></header> +<p><img src="/img/pictures/wunderlist/wunderlist-list.png" style="float:right;margin-top:1em;" /></p> +<p>One of the relatively unusual features of Wunderlist is the possibiliy of sharing lists with others. All you have to do is click a button, specify one or more email address, and send invitations out. People will then signup for a free Wunderlist account and they&#8217;ll be able to access (as in read/write access) your list.</p> +<p>Because Roxanne, my wife, has an iPhone, she was the most obvious candidate to try out this collaborative feature. First I shared my <em>Shopping</em> list with her: we needed to make a list of things to get for a party, and that was fun. Wunderlist worked perfectly: we went around the supermarket and ticked things off the shared list, which updated in real-time!</p> +<p>All went great until I decided to share the infamous <em>Chores</em> list. You know the one: bills, fees, errands&#8230; I used to say things like &#8220;it&#8217;s on my list, honey, I&#8217;ll do it&#8221;, or even &#8220;Yes&#8230; I&#8217;ll add it to the <em>Chores</em>, just gimme a minute&#8221;. Little did I know that my beloved liked Wunderlist so much that she started using it frequenly, constantly updating the damn chores list with things like &#8220;Take the rubbish out&#8221; or &#8220;Collect the package from the post office&#8221;.</p> +<p>I realized she became a true Wunderlist ninja when I found a task called &#8220;Flowers for Roxanne!&#8221; &ndash; starred and with a deadline set to <em>two months ago!</em></p> + +</section> + + <section class="section"> +<header><h1 id="h_4" class="toc">My five work lists</h1></header> +<p>After months of trial, I decided to use Wunderlist at work as well. With caution, of course: I made sure not to write down any sensitive information in my tasks, because you never know. I started off with just one list, but it got crowded very quickly. I now use <em>five</em> lists for work only:</p> +<p><img src="/img/pictures/wunderlist/wunderlist-work.png" style="float:right;margin-top:1em;" /></p> +<ul> + <li><strong>Work [!]</strong> &ndash; This is the most active one, I use it for things to do <span class="caps">ASAP</span>. Starred tasks are urgent and important, and should be dealt with within the day. At work, that&#8217;s my default list.</li> + <li><strong>Work [~]</strong> &ndash; This is for things that in progress, for tasks I delegated to other people, for keeping track of emails waiting for a reply, etc. I tend to check it at least a couple of times per day (if something is really urgent gets moved to the first list).</li> + <li><strong>Work [&#8230;]</strong> &ndash; This is for someday/maybes. Something that is most definitely not urgent, and not too important either. I normally review it once a week, except in the middle of August when I won&#8217;t be able to do anything because everyone will be on holiday&#8230; It will become my default list for a week or two, then.</li> + <li><strong>Work [CoP]</strong> &ndash; I also work as the coordinator of a Community of Practice, and I want to keep CoP-related stuff separate, so that I know where to look when I can allocate some CoP time during my day.</li> + <li><strong>Work [@boss]</strong> &ndash; This is a special list for my boss only. We email each other frequently, but rather then sending her long emails she can&#8217;t afford to read, I write down discussion topics in this list, which I&#8217;ll then load up at the following status meeting.</li> +</ul> +<p>The next step? Maybe sharing lists with my boss and collegues, who knows&#8230;</p> + +</section> + + <section class="section"> +<header><h1 id="h_5" class="toc">The bottom line</h1></header> +<p>Saying that Wunderlist is the <em>perfect</em> todo list for <em>everyone</em> would be pointless: there would always be people who wouldn&#8217;t agree with that. Wunderlist is not perfect, but close enough for me: it has most of the feature I need, and &ndash; most importantly &ndash; very little features I don&#8217;t need. In the end, this is what makes an app truly awesome.</p> +<p>I give it four stars out of five. Why not five? Because in this way <a href="http://www.6wunderkinder.com/">6Wunderkinder</a> can make Wunderlist <em>even a better product</em> by surprising its users with something they didn&#8217;t know they wanted. That&#8217;s what Steve Jobs does at every Keynote, isn&#8217;t it?</p> +<p><img src="/img/pictures/wunderlist/wunderlist-done.png" style="text-align:center;margin:auto;display:block;" /></p> + +</section> + +</section>
A contents/concatenative.html

@@ -0,0 +1,53 @@

+----- +title: Concatenative +content-type: project +github: concatenative +status: On Hold +version: 0.2.0 +----- +<nav class="project-links"> +<p><a href="http://concatenative.rubyforge.org"><span class="caps">DOCUMENTATION</span></a> | <a href="http://rubyforge.org/projects/concatenative"><span class="caps">DOWNLOAD</span></a> | <a href="http://github.com/h3rald/concatenative/tree/master"><span class="caps">SOURCE</span></a> | <a href="http://github.com/h3rald/concatenative/issues"><span class="caps">TRACKING</span></a></p> +</nav> +<ul class="project-data"> + <li>Project Status: <strong>On Hold</strong></li> + <li>Version: <strong>0.2.0</strong></li> +</ul> +<p>Concatenative is a Ruby <acronym title="Domain-specific Language"><span class="caps">DSL</span></acronym> for concatenative programming. It is heavily inspired by <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy.html">Joy</a>, a minimalist programming language by Manfred von Thun. Like Joy, Concatenative features:</p> +<ul> + <li>function composition, instead of function application</li> + <li>quotation, instead of abstraction</li> + <li>no formal parameters</li> + <li>no variable assignments</li> +</ul> +<p>Plus, it allows you to use Ruby objects and methods in a concatenative fashion.</p> +<div class="spacer-50"></div> +<h3>Installation</h3> +<p>The simplest method to install Concatenative is to install the gem:</p> +<p><code>gem install concatenative</code></p> +<h3>Usage</h3> +<p>Initialization:</p> +<div class='ruby'><pre><code>require 'concatentive'</code></pre></div><p>Execute a Concatenative program:</p> +<div class='ruby'><pre><code>concatenate( + 10, + [0, :==], + [1, :+], + [:dup, 1, :-], + [:*], + :linrec + )</code></pre></div><p>The program above returns the factorial of 10, computed using the linrec combinator. It is also possible to execute arrays directly and define concatenative programs as symbols.</p> +<div class='ruby'><pre><code>:factorial &lt;&lt; [[0, :==], [:pop, 1], [:dup, 1, :- , :factorial, :*], :if] + [5, :factorial].execute</code></pre></div><p>The program above calculates the factorial of 5, using explicit recursion.</p> +<p>You can use all Ruby methods in Concatenative programs as well, making sure that the right number of arguments (and the method’s receiver) are retrieved from the stack correctly. For this to work, Concatenative must know the arity of the method in advance, so the following rules are applied:</p> +<ul> + <li>All operators have an arity of 1</li> + <li>All other method have an arity of 0</li> + <li>If a method has a different arity, you must specify it explicitly using the pipe (|) operator.</li> +</ul> +<p>Example:</p> +<div class='ruby'><pre><code>concatenate( + "Goodbye, World!", /Goodbye/, "Hello", :sub|2 + )</code></pre></div><p>The program above is equivalent to <code>"Goodbye, World!".sub(/Goodbye/, "Hello")</code>.</p> +<h3>Latest Updates</h3> +<ul><li><a href="/articles/concatenative-020/">Concatenative 0.2.0 released</a> &mdash; <time class="timeago" datetime="2009-04-19T07:42:00Z">Sunday, 19 April 2009</time></li> +<li><a href="/articles/concatenative-programming-in-ruby/">Concatenative programming in Ruby</a> &mdash; <time class="timeago" datetime="2009-03-28T06:24:00Z">Saturday, 28 March 2009</time></li> +</ul>
A contents/contact.html

@@ -0,0 +1,15 @@

+----- +title: Contact +content-type: page +----- +<div class="contact-list"> +<ul> + <li><i class="fa fa-envelope"></i> <a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;'>&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;</a></li> + <li><i class="fa fa-twitter"></i> <a href="http://twitter.com/h3rald">@h3rald</a></li> + <li><i class="fa fa-linkedin"></i> <a href="http://it.linkedin.com/in/fabiocevasco">LinkedIn</a></li> + <li><i class="fa fa-bookmark"></i> <a href="http://pinboard.in/u:h3rald/">Pinboard</a></li> + <li><i class="fa fa-instagram"></i> <a href="http://instagram.com/h3rald/">Instagram</a></li> + <li><i class="fa fa-github"></i> <a href="https://github.com/h3rald">Github</a></li> + <li><i class="fa fa-foursquare"></i> <a href="http://foursquare.com/h3rald">Foursquare</a></li> +</ul> +</div>
A contents/glyph.html

@@ -0,0 +1,176 @@

+----- +title: Glyph +content-type: project +subtitle: A Rapid Document Authoring Framework +github: glyph +status: Active +version: 0.5.3.1 +----- + +<nav class="project-links"> + <a href="http://www.github.com/h3rald/glyph/">REPOSITORY</a> | <a href="http://www.rubygems.org/gems/glyph">DOWNLOAD</a> | <a href="/glyph/book/">DOCUMENTATION</a> | <a href="http://groups.google.com/group/glyph-framework">USER GROUP</a> +</nav> +<ul class="project-data"> + <li>Project Status: <strong>Active</strong></li> + <li>Version: <strong>0.5.3.1</strong></li> +</ul> + + +<section class="section"> +<p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p> +<p>With Glyph, creating and maintaining any kind of document becomes as easy as&#8230; <em>programming</em>. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> + + <section class="section"> +<header><h1 id="h_1" class="toc">Main Features</h1></header> +<section class="section"> +<header><h1 id="h_2" class="toc">Command Line Interface</h1></header> +<p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git&#8217;s</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:</p> +<ul> + <li><code>glyph init</code> &#8212; to initialize a new Glyph project in the current (empty) directory.</li> + <li><code>glyph add introduction.textile</code> &#8212; to create a new file called <em>introduction.textile</em>.</li> + <li><code>glyph compile</code> &#8212; to compile the current document into a single <span class="caps">HTML</span> file.</li> + <li><code>glyph compile --auto</code> &#8212; to keep recompiling the current document every time a file is changed.</li> + <li><code>glyph compile -f pdf</code> &#8212; to compile the current document into <span class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li> + <li><code>glyph compile readme.glyph</code> &#8212; to compile a <em>readme.glyph</em> located in the current directory into a single <span class="caps">HTML</span> file.</li> + <li><code>glyph outline -l 2</code> &#8212; Display the document outline, up to second-level headers.</li> + <li><code>glyph stats</code> &#8212; Display project statistics.</li> +</ul> + +</section> + + <section class="section"> +<header><h1 id="h_3" class="toc">Minimalist Syntax</h1></header> +<p>Glyph syntax rules can be explained using Glyph itself:</p> + + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>section[ +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> @title[Something about Glyph] +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> txt[ +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span>You can use Glyph macros in conjunction +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span>with _Textile_ or _Markdown_ to +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span>produce HTML files effortlessly. +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> ] +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.] +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> section[ +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> @title[What about PDFs?] +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> @id[pdf] +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> p[ +<span class="line-numbers"><a href="#n13" name="n13">13</a></span>Once you have a single, well-formatted HTML +<span class="line-numbers"><a href="#n14" name="n14">14</a></span>file, converting it to PDF is +<span class="line-numbers"><a href="#n15" name="n15">15</a></span>extremely easy with a free 3rd-party +<span class="line-numbers"><a href="#n16" name="n16">16</a></span>renderer like =&gt;[http://www.princexml.com|Prince] +<span class="line-numbers"><a href="#n17" name="n17">17</a></span>or =&gt;[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf]. +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> ] +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> ] +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span>]</pre></div> +</div> + +<p>The Glyph code above corresponds to the following HTML code:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="tag">&lt;h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">h_10</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Something about Glyph<span class="tag">&lt;/h2&gt;</span> +<span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="tag">&lt;p&gt;</span> +<span class="line-numbers"> <a href="#n4" name="n4">4</a></span> You can use Glyph macros in conjunction with +<span class="line-numbers"> <a href="#n5" name="n5">5</a></span> <span class="tag">&lt;em&gt;</span>Textile<span class="tag">&lt;/em&gt;</span> or <span class="tag">&lt;em&gt;</span>Markdown<span class="tag">&lt;/em&gt;</span> to +<span class="line-numbers"> <a href="#n6" name="n6">6</a></span> produce HTML files effortlessly. +<span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="tag">&lt;p&gt;</span> +<span class="line-numbers"> <a href="#n9" name="n9">9</a></span> Alternatively, you can just use <span class="tag">&lt;em&gt;</span>Glyph itself<span class="tag">&lt;/em&gt;</span> +<span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> to generate HTML tags. +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n12" name="n12">12</a></span> <span class="tag">&lt;div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">section</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span> +<span class="line-numbers"><a href="#n13" name="n13">13</a></span> <span class="tag">&lt;h3</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">pdf</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>What about PDFs?<span class="tag">&lt;/h3&gt;</span> +<span class="line-numbers"><a href="#n14" name="n14">14</a></span> <span class="tag">&lt;p&gt;</span> +<span class="line-numbers"><a href="#n15" name="n15">15</a></span> Once you have a single, well-formatted HTML +<span class="line-numbers"><a href="#n16" name="n16">16</a></span> file, converting it to PDF is +<span class="line-numbers"><a href="#n17" name="n17">17</a></span> extremely easy with a free 3rd-party renderer +<span class="line-numbers"><a href="#n18" name="n18">18</a></span> like <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://www.princexml.com</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>Prince<span class="tag">&lt;/a&gt;</span> +<span class="line-numbers"><a href="#n19" name="n19">19</a></span> or <span class="tag">&lt;a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://code.google.com/p/wkhtmltopdf/</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>wkhtmltopdf<span class="tag">&lt;/a&gt;</span>. +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="tag">&lt;/p&gt;</span> +<span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="tag">&lt;/div&gt;</span> +<span class="line-numbers"><a href="#n22" name="n22">22</a></span><span class="tag">&lt;/div&gt;</span></pre></div> +</div> + +</section> + + <section class="section"> +<header><h1 id="h_4" class="toc">Content Reuse</h1></header> +<p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time&#8230;) as long as you don&#8217;t define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>snippet:[entities|snippets and macros] +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>snippet:[custom_definitions| +<span class="line-numbers"><a href="#n3" name="n3">3</a></span> p[Glyph allows you to define your own &amp;[entities].] +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>] +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>&amp;[custom_definitions]</pre></div> +</div> + + <p>...which results in:</p> + <div class="CodeRay"> + <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag">&lt;p&gt;</span>Glyph allows you to define your own snippets and macros.<span class="tag">&lt;/p&gt;</span></pre></div> +</div> + + <p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph&#8217;s changelog, just to have an idea).</p> + +</section> + <section class="section"> +<header><h1 id="h_5" class="toc">Automation of Common Tasks</h1></header> +<p>If you&#8217;re writing a book, you shouldn&#8217;t have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).</p> + +</section> + <section class="section"> +<header><h1 id="h_6" class="toc">Reference Validation</h1></header> +<p>Feel free to add plenty of links, snippets, bookmarks, &#8230; if Glyph doesn&#8217;t find something, it will definitely complain. Broken references are a thing on the past, and you don&#8217;t need to worry about it.</p> + +</section> + <section class="section"> +<header><h1 id="h_7" class="toc">Extreme Extensibility</h1></header> +<ul> + <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> + <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> + <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you&#8217;ll be able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but it&#8217;s trivial, from a technical point of view.</li> +</ul> + +</section> + <section class="section"> +<header><h1 id="h_8" class="toc">Convention over Configuration</h1></header> +<p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a <code>macro</code> folder within your <code>/lib</code> folder&#8230; you get the picture: Glyph has its special places.</p> +<p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart&#8217;s content (with smart defaults).</p> + +</section> + <section class="section"> +<header><h1 id="h_9" class="toc">Free and Open Source</h1></header> +<p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> +<p>If you have Ruby installed, just run <code>gem install glyph</code>. That&#8217;s all it takes.</p> + +</section> + +</section> + <section class="section"> +<header><h1 id="h_10" class="toc">Resources</h1></header> +<ul> + <li>Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a></li> + <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li> + <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li> + <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a></li> + <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> + <li>Book (<span class="caps">PDF</span>): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a></li> + <li>Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a></li> + <li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a></li> + <li>User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li> +</ul> + +</section> + +</section> + + +<h3>Latest Updates</h3> + +<ul><li><a href="/articles/glyph-050-released/">Glyph 0.5.0 Released</a> &mdash; <time class="timeago" datetime="2011-08-28T19:18:00Z">Sunday, 28 August 2011</time></li> +<li><a href="/articles/glyph-040-released/">Glyph 0.4.0 Released</a> &mdash; <time class="timeago" datetime="2010-09-03T17:45:00Z">Friday, 03 September 2010</time></li> +<li><a href="/articles/glyph-030-released/">Glyph 0.3.0 Released</a> &mdash; <time class="timeago" datetime="2010-06-13T12:10:00Z">Sunday, 13 June 2010</time></li> +<li><a href="/articles/glyph-020-released/">Glyph 0.2.0 Released</a> &mdash; <time class="timeago" datetime="2010-05-09T15:00:00Z">Sunday, 09 May 2010</time></li> +<li><a href="/articles/introducing-glyph/">Introducing Glyph</a> &mdash; <time class="timeago" datetime="2010-04-09T17:30:39Z">Friday, 09 April 2010</time></li> +</ul> + +
A contents/h3rald.html

@@ -0,0 +1,92 @@

+----- +title: H3RALD Web Site +content-type: project +subtitle: The site you're looking at +github: h3rald +status: Active +version: 8.4.0 +----- +<nav class="project-links"> +<p><a href="http://github.com/h3rald/h3rald/tree/master"><span class="caps">SOURCE</span></a> | <a href="http://github.com/h3rald/h3rald/issues"><span class="caps">TRACKING</span></a></p> +</nav> +<ul class="project-data"> + <li>Project Status: <strong>Active</strong></li> + <li>Version: <strong>8.4.0</strong></li> +</ul> +<p>The H3RALD.com domain was bought in March 2004 and since than has always been my home on the Internet. Through the years, a total of 8 versions of this web site has been released, each featuring some change in the backend.</p> +<p>Currently, this web site is fully static (minus a few Ajax calls) and is powered by the <a href="http://nanoc.stoneship.org/">Nanoc</a>, a very flexible web publishing system written in Ruby.</p> +<div class="spacer-50"></div> +<div class="spacer-50"></div> +<h3>Releases</h3> +<h4>Version 8 (September 2009 &ndash; now)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a>, <a href="http://wiki.nginx.org/Main">Nginx</a> (from version 8.3 onwards)</li> + <li>Database: n/a</li> + <li>Framework/<span class="caps">CMS</span>/Other: <a href="http://www.h3rald.com">Nanoc</a></li> + <li>Programming Language: <a href="http://www.ruby-lang.org">Ruby</a></li> +</ul> +<h4>Version 7 (July 2007 &ndash; September 2009)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: <a href="http://www.mysql.com">MySQL</a></li> + <li>Framework/<span class="caps">CMS</span>/Other: <a href="http://www.rubyonrails.org">Ruby on Rails</a> + <a href="http://www.typosphere.org">Typo</a></li> + <li>Programming Language: <a href="http://www.ruby-lang.org">Ruby</a></li> +</ul> +<h4>Version 6 (December 2005 &ndash; July 2007)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: <a href="http://www.mysql.com">MySQL</a></li> + <li>Framework/<span class="caps">CMS</span>/Other: <a href="http://www.cakephp.com">CakePHP</a></li> + <li>Programming Language: <a href="http://www.php.net"><span class="caps">PHP</span></a></li> +</ul> +<h4>Version 5 (April 2005 &ndash; December 2005)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: <a href="http://www.sqlite.org">SQLite</a></li> + <li>Framework/<span class="caps">CMS</span>/Other: <a href="http://www.xisc.com/">Prado</a></li> + <li>Programming Language: <a href="http://www.php.net"><span class="caps">PHP</span></a></li> +</ul> +<h4>Version 4 (February 2005 &ndash; April 2005)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: <a href="http://www.mysql.com">MySQL</a></li> + <li>Framework/<span class="caps">CMS</span>/Other: n/a</li> + <li>Programming Language: <a href="http://www.php.net"><span class="caps">PHP</span></a></li> +</ul> +<h4>Version 3 (November 2005 &ndash; February 2005)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: <a href="http://www.mysql.com">MySQL</a></li> + <li>Framework/<span class="caps">CMS</span>/Other: <a href="http://www.xoops.org/"><span class="caps">XOOPS</span></a></li> + <li>Programming Language: <a href="http://www.php.net"><span class="caps">PHP</span></a></li> +</ul> +<h4>Version 2 (May 2004 &ndash; November 2004)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: n/a</li> + <li>Framework/<span class="caps">CMS</span>/Other: n/a</li> + <li>Programming Language: <a href="http://www.php.net"><span class="caps">PHP</span></a></li> +</ul> +<h4>Version 1 (March 2004 &ndash; May 2004)</h4> +<ul> + <li>Web Server: <a href="http://www.apache.org">Apache</a></li> + <li>Database: n/a</li> + <li>Framework/<span class="caps">CMS</span>/Other: n/a</li> + <li>Programming Language: n/a</li> +</ul> +<h3>Latest Updates</h3> +<ul><li><a href="/articles/h3rald-83/">H3RALD.com v8.3 Released</a> &mdash; <time class="timeago" datetime="2012-12-27T22:41:34Z">Thursday, 27 December 2012</time></li> +<li><a href="/articles/h3rald-81/">H3RALD.com v8.1 Released</a> &mdash; <time class="timeago" datetime="2010-09-23T12:04:25Z">Thursday, 23 September 2010</time></li> +<li><a href="/articles/take-back-your-site-with-nanoc/">Take back your site, with nanoc!</a> &mdash; <time class="timeago" datetime="2009-09-15T11:32:51Z">Tuesday, 15 September 2009</time></li> +<li><a href="/articles/h3rald-71/">Introducing H3RALD.com v7.1</a> &mdash; <time class="timeago" datetime="2008-10-27T04:29:00Z">Monday, 27 October 2008</time></li> +<li><a href="/articles/apache2-upgrade/">Beware of sudden upgrades!</a> &mdash; <time class="timeago" datetime="2007-12-20T06:41:00Z">Thursday, 20 December 2007</time></li> +<li><a href="/articles/review-services/">Review Services</a> &mdash; <time class="timeago" datetime="2007-12-14T11:24:00Z">Friday, 14 December 2007</time></li> +<li><a href="/articles/back-from-holiday/">Back from holiday</a> &mdash; <time class="timeago" datetime="2007-08-30T02:59:00Z">Thursday, 30 August 2007</time></li> +<li><a href="/articles/simply-on-rails-1-concepts-map/">Simply on Rails &#8211; Part 1: Concepts and Bubbles</a> &mdash; <time class="timeago" datetime="2007-07-07T05:43:00Z">Saturday, 07 July 2007</time></li> +<li><a href="/articles/h3rald-v7-overview/">Back on Track&#8230;</a> &mdash; <time class="timeago" datetime="2007-06-22T12:38:00Z">Friday, 22 June 2007</time></li> +<li><a href="/articles/41/">Comments temporarily disabled</a> &mdash; <time class="timeago" datetime="2007-01-07T05:53:00Z">Sunday, 07 January 2007</time></li> +<li><a href="/articles/37/">Some updates</a> &mdash; <time class="timeago" datetime="2006-07-25T01:07:00Z">Tuesday, 25 July 2006</time></li> +<li><a href="/articles/29/">Writing more articles&#8230;</a> &mdash; <time class="timeago" datetime="2006-05-14T04:26:00Z">Sunday, 14 May 2006</time></li> +<li><a href="/articles/21/">Birthday present? Web space, please&#8230;</a> &mdash; <time class="timeago" datetime="2006-04-27T12:47:00Z">Thursday, 27 April 2006</time></li> +<li><a href="/articles/8/">New site operative</a> &mdash; <time class="timeago" datetime="2006-04-06T14:57:00Z">Thursday, 06 April 2006</time></li> +</ul>
A contents/hastyscribe.html

@@ -0,0 +1,110 @@

+----- +title: HastyScribe +content-type: project +github: hastyscribe +status: Active +version: 1.6.0 +----- + +<div class="jumbotron"> + <p style="text-align:center;"><i class="hastyscribe" style="font-size: 180%; color: #000"></i></p> + <p class="donthyphenate">A simple, self-contained, command-line program able to convert <a href="http://daringfireball.net/projects/markdown">markdown</a> files into self-contained HTML pages, automatically embedding all the needed fonts, stylesheets and images.</p> +</div> + +<div class="row donthyphenate" style="text-align: center; margin: auto;"> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="h3-os-apple fa-3x"></i> + <i class="h3-os-linux fa-3x"></i> + <i class="h3-os-win-04 fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">Cross Platform</h3> + <p>Download the precompiled HastyScribe binaries for OS X, Linux, and Windows, or build directly from the source.</p> + </div> + </div> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="h3-terminal fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">Command Line</h3> + <p>HastyScribe is a command-line application that doesn't need anything else but a single, small, executable file.</p> + </div> + </div> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="fa fa-mobile fa-3x"></i> + <i class="fa fa-tablet fa-3x"></i> + <i class="fa fa-desktop fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">Responsive</h3> + <p>HastyScribe generates valid, self-contained, responsive HTML5 documents that can be viewed with any major modern broswer, and look great on any device.</p> + </div> + </div> +</div> + +<div class="row"> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading">Usage &amp; Syntax</div> + <div class="panel-body"> + <p>Run HastyScribe from the command line like this:</p> + <p><code><strong>hastyscribe</strong> <em>MyMarkdownFile.md</em></code></p> + </div> + </div> + </div> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading">Example &amp; Documentation</div> + <div class="panel-body"> + <p>View/download the <strong><a href="/hastyscribe/HastyScribe_UserGuide.htm">HastyScribe User Guide</a></strong></p> + <p>generated with HastyScribe (<a href="https://raw.githubusercontent.com/h3rald/hastyscribe/master/doc/HastyScribe_UserGuide.md">source</a>)</p> + </div> + </div> + </div> +</div> + +<div class="row" style="margin:auto; text-align:center;"> +<div class="btn-group"> + <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> + <span class="fa-download"></span> Download <span class="caret"></span> + </button> + <ul class="dropdown-menu" role="menu" style="text-align: left;"> + <li> + <a href="https://github.com/h3rald/hastyscribe/releases/download/v1.6.0/hastyscribe_v1.6.0_macosx_x64.zip"> + <i class="h3-os-apple"></i> HastyScribe for OS X (x64) + </a> + </li> + <li> + <a href="https://github.com/h3rald/hastyscribe/releases/download/v1.6.0/hastyscribe_v1.6.0_linux_x64.zip"> + <i class="h3-os-linux"></i> HastyScribe for Linux (x64) + </a> + </li> + <li> + <a href="https://github.com/h3rald/hastyscribe/releases/download/v1.6.0/hastyscribe_v1.6.0_linux_x86.zip"> + <i class="h3-os-linux"></i> HastyScribe for Linux (x86) + </a> + </li> + <li> + <a href="https://github.com/h3rald/hastyscribe/releases/download/v1.6.0/hastyscribe_v1.6.0_linux_arm.zip"> + <i class="h3-os-linux"></i> HastyScribe for Linux (ARM) + </a> + </li> + <li> + <a href="https://github.com/h3rald/hastyscribe/releases/download/v1.6.0/hastyscribe_v1.6.0_windows_x64.zip"> + <i class="h3-os-win-04"></i> HastyScribe for Windows (x64) + </a> + </li> + </ul> +</div> + <a href="https://github.com/h3rald/hastyscribe" + class="btn btn-success" style="margin:20px;"> + <i class="fa fa-github"></i> View on Github</a> +</div> + +<div class="row" style="margin:auto; text-align: center;"> + &mdash; <i class="hastyscribe"></i> is open source software, licensed under the terms of the <a href="http://opensource.org/licenses/MIT">MIT License.</a> &mdash; +</div> +
A contents/herald-vim-color-scheme.html

@@ -0,0 +1,35 @@

+----- +title: herald.vim +content-type: project +subtitle: An easy to read, portable and pretty Vim Color Scheme +----- +<p><strong>herald</strong> is a dark color scheme for <a href="http://www.vim.org">Vim</a> which aims to be easy to read, eye-appealing, portable on multiple terminals, and suitable for source code highlighting in multiple languages.</p> +<p>You can get the latest version <strong><a href="/files/herald.vim"><span class="caps">HERE</span></a></strong> (direct link).</p> +<h3>Changelog</h3> +<ul> + <li><strong>v0.2.1</strong> + <ul> + <li>Improved readability in search highlights</li> + <li>Delimiters are now rendered like operators</li> + </ul></li> + <li><strong>v0.2.0</strong> + <ul> + <li>Support for 8 and 16 color modes</li> + <li>Fixed completion menu colors</li> + <li>Improved readability for Visual mode</li> + <li>Specified highlighting for all the most common Vim syntax groups</li> + </ul></li> + <li><strong>v0.1.0</strong> + <ul> + <li>Initial Release</li> + </ul></li> +</ul> +<h3>Screenshot</h3> +<p><img src="/images/herald.vim/herald_vim_example.png" alt="" /></p> +<h3>Resources</h3> +<ul> + <li><a href="/articles/herald-vim-color-scheme">First Announcement</a></li> + <li><a href="/articles/herald-vim-021">0.2.1 Release Annoucement</a></li> + <li><a href="http://www.vim.org/scripts/script.php?script_id=2684">Script Page</a> [on Vim.org]</li> + <li><a href="http://github.com/h3rald/stash/commits/master/.vim/colors/herald.vim">File History</a> [on GitHub]</li> +</ul>
A contents/index.html

@@ -0,0 +1,217 @@

+----- +title: Home +content-type: page +----- + +<div class="row"> + <div class="col-md-8" id="main-content"> + <article id="a_h3rald-83"> + <header> + <h2><a href="/articles/h3rald-83/">H3RALD.com v8.3 Released</a></h2> + + <h3>A new minimalist design, powered by Twitter Bootstrap</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2012-12-27T22:41:34Z">Thursday, December 27 2012</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>One of the many things that really bothered me about my web site was the fact that it didn&#8217;t look good on my iPhone, or any small screen for that matter.</p> +<p>Years ago I <a href="http://www.alistapart.com/articles/responsive-web-design/">read about</a> responsive web design, media queries, etc., but I never had the will or the time to dive into the subject. Then <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a> came out, and it changed <em>everything</em>.</p> +<p>Not only Bootstrap provides a very solid <span class="caps">HTML</span> boilerplate and grid system, it also comes with some very nice and complete styles for every <span class="caps">HTML</span> element, a few Javascript-enhanced UI components, and best of all it is fully responsive.</p> + <p><a href="/articles/h3rald-83/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <article id="a_glyph-050-released"> + <header> + <h2><a href="/articles/glyph-050-released/">Glyph 0.5.0 Released</a></h2> + + <h3>Featuring Calibre integration, macro composition, Turing-completeness, and more</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2011-08-28T19:18:00Z">Sunday, August 28 2011</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>Too much time passed since the last Glyph release. Way too much. Finally I found the time and will to tidy up the last few remaining bugs, update the docs, and release it!</p> + <p><a href="/articles/glyph-050-released/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <article id="a_ruby-compendium-020"> + <header> + <h2><a href="/articles/ruby-compendium-020/">Ruby Compendium v0.2.0 released</a></h2> + + <h3>With up-to-date Ruby implementations, more resources, and online version</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2011-08-07T16:01:52Z">Sunday, August 07 2011</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>The Ruby Compendium has been updated, and it now lists the most up-to-date versions of various Ruby implementatios, even more web sites, books, podcasts, and Rubyists. In addition to the <span class="caps">PDF</span> version, the book can now be read online <a href="/ruby-compendium/book/">here on H3RALD.com</a>.</p> + <p><a href="/articles/ruby-compendium-020/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <article id="a_wunderlist"> + <header> + <h2><a href="/articles/wunderlist/">Getting things done... in Wonderland!</a></h2> + + <h3>Why Wunderlist is the only Todo List I'll ever need</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2011-07-30T22:07:53Z">Sunday, July 31 2011</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>I don&#8217;t remember the exact day when I started using a todo list in a serious way. It definitely happened at work, but I can&#8217;t remember when exactly. The point is that, once I started working (and getting paid for what I love doing &ndash; writing), I slowly turned into a real <em>productivity freak</em>.</p> +<p>I write <em>everything</em> down. My colleagues know that if I say that I&#8217;ll do something <em>right now</em> but I don&#8217;t do it within five minutes, they have to assume that I forgot about it altogether and they&#8217;d better send me an email.</p> +<p>I am not a paper person. Never been one. When I got a job which consisted in working on the computer for eight hours a day, I started looking for todo list programs. That turned into an endless quest: I tried X for a few weeks, then I discovered that Y was better, used it for months, then moved onto Z, and so on.</p> + <p><a href="/articles/wunderlist/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <article id="a_the-rails3-way-review"> + <header> + <h2><a href="/articles/the-rails3-way-review/">Book Review: The Rails 3 Way</a></h2> + + <h3>aka The (Rails) Bible, 2nd Edition</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2011-03-26T12:16:46Z">Saturday, March 26 2011</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>Obie did it, again. With the second edition of his former masterpiece, <em>The Rails Way</em>, he managed to outdo himself delivering a new, even more useful, Rails Bible. Wether you&#8217;re a Ruby on Rails professional like him or just an enthusiast, this book is pretty much everything you need to learn how to master the third release of DHH&#8217;s Ruby web framework.</p> +<p><a href="http://tr3w.com/">The Rails 3 Way</a> is no ordinary second edition. If you already own <em>The Rails Way</em>, you&#8217;ll be pleasantly surprised that this is a different, more polished book. While something had to remain the same, there&#8217;s a lot of new content in its 708 pages, and even the old content has been rewritten or at least revised.</p> +<p>It doesn&#8217;t matter whether you already know Rails 2.x or you&#8217;re jumping straight into the Rails 3 world, if you use Rails, you can&#8217;t miss this book.</p> + <p><a href="/articles/the-rails3-way-review/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <article id="a_reflections-on-management"> + <header> + <h2><a href="/articles/reflections-on-management/">Book Review: Reflections on Management</a></h2> + + <h3>The key to becoming a true leader</h3> + + <p class="pubdate pull-right"><i class="h3-quill-ink"></i> <time datetime="2011-02-05T21:51:25Z">Saturday, February 05 2011</time></p> + <div class="clearfix"></div> + </header> + <div class="hyphenate"> + + <p>When I was offered to review this book, I was a bit skeptical: a book on <em>management</em>? I normally read and review books on programming and software development methodologies. However, I work as a Documentation Technical Leader, and while I don&#8217;t technically <em>manage</em> a whole team yet (damn economic crisis!), someday I may end up doing just that, so I gave <a href="http://www.informit.com/store/product.aspx?isbn=032171153X">Reflections on Management</a> a try.</p> +<p><em>It&#8217;s short, after all, I&#8217;ll probably read it in a couple of weeks and move on</em> &mdash; I thought. Well, beware of short books: I thought exactly the same thing when I picked up <a href="http://en.wikipedia.org/wiki/The_Elements_of_Style">The Elements of Style</a>, and it still follows me around everywhere, so that I can re-read bits of it whenever I need to.</p> + <p><a href="/articles/reflections-on-management/">Continue reading &rarr;</a></p> + </div> + <hr /> +</article> + + + <p><a href="/archives/">&larr; Older Articles</a></p> + </div><!-- #main-content end --> + <div class="col-md-4" id="secondary-content"> + <span class="featured"><i class="h3-fire"></i> popular</span> + <article id="a_randal-schwartz"> + <header> + <h2><a href="/articles/randal-schwartz/">A pizza with Randal Schwartz</a></h2> + + <h3>Talking about open source, programming, emacs and technical writing</h3> + + </header> +</article> +<hr /> + + + <article id="a_take-back-your-site-with-nanoc"> + <header> + <h2><a href="/articles/take-back-your-site-with-nanoc/">Take back your site, with nanoc!</a></h2> + + <h3>How I turned H3RALD.com into a 100% static, hassle-free web site</h3> + + </header> +</article> +<hr /> + + + <article id="a_herald-vim-color-scheme"> + <header> + <h2><a href="/articles/herald-vim-color-scheme/">Herald (Vim Color Scheme)</a></h2> + + <h3>My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors!</h3> + + </header> +</article> +<hr /> + + + <article id="a_10-programming-languages"> + <header> + <h2><a href="/articles/10-programming-languages/">10 programming languages worth checking out</a></h2> + + <h3>A quick comparison of 10 non-mainstream programming languages</h3> + + </header> +</article> +<hr /> + + + <article id="a_firefox-lovers-guide-to-opera"> + <header> + <h2><a href="/articles/firefox-lovers-guide-to-opera/">A Firefox Lover's Guide to Opera</a></h2> + + <h3>An in-depth review of the Opera browser, with the eyes of a Firefox enthusiast</h3> + + </header> +</article> +<hr /> + + + <article id="a_10-reasons-to-learn-ruby"> + <header> + <h2><a href="/articles/10-reasons-to-learn-ruby/">10 Reasons to Learn Ruby</a></h2> + + <h3>Ten possible reasons to learn the Ruby Programming Language</h3> + + </header> +</article> +<hr /> + + + <article id="a_tweaking-windows-explorer"> + <header> + <h2><a href="/articles/tweaking-windows-explorer/">Tweaking Windows Explorer</a></h2> + + <h3>How to make the default Windows file manager suck less</h3> + + </header> +</article> +<hr /> + + + <article id="a_incomplete-guide-to-london"> + <header> + <h2><a href="/articles/incomplete-guide-to-london/">Fabio's (In)complete Guide to London</a></h2> + + <h3>Some (non-)essential tips on getting around, eating, and enjouing yourself</h3> + + </header> +</article> +<hr /> + + + </div><!-- #secondary-content-end --> +</div> +
A contents/litestore.html

@@ -0,0 +1,116 @@

+----- +title: LiteStore +content-type: project +github: litestore +status: Active +version: 1.1.1 +----- + +<div class="jumbotron"> + <h2 class="centered"> + LiteStore<br> + <img src="/images/litestore/litestore.png" style="margin-left:-35px" /> + </h2> + <p class="donthyphenate">A lightweight, self-contained, RESTful, multi-format NoSQL document store server written in <a href="http://nim-lang.org">Nim</a> and powered by a <a href="http://www.sqlite.org">SQLite</a> backend for storage. It aims to be a very simple and lightweight backend ideal for prototyping and testing REST APIs and client-side, single-page applications. </p> +</div> + +<div class="row donthyphenate" style="text-align: center; margin: auto;"> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="h3-os-apple fa-3x"></i> + <i class="h3-os-linux fa-3x"></i> + <i class="h3-os-win-04 fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">Cross Platform</h3> + <p>Download the precompiled LiteStore binaries for OS X, Linux, and Windows, or build directly from the source.</p> + </div> + </div> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="fa fa-archive fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">Self-Contained</h3> + <p>LiteStore is a command-line application that doesn't need anything else but a single, small, executable file.</p> + </div> + </div> + <div class="col-md-4" style="padding: 2em;"> + <div class="row"> + <i class="fa fa-cogs fa-3x"></i> + </div> + <div class="row"> + <h3 class="centered">RESTFul</h3> + <p>LiteStore exposes a simple RESTful HTTP APIs, perfect for prototyping SPAs.</p> + </div> + </div> +</div> + +<div class="row"> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading">Usage &amp; Syntax</div> + <div class="panel-body"> + <p>Run LiteStore from the command line like this:</p> + <p><code><strong>litestore</strong> -s:<em>MyDataStore.db</em></code></p> + </div> + </div> + </div> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading">Documentation</div> + <div class="panel-body"> + <p>View/download the <strong><a href="/litestore/LiteStore_UserGuide.htm">LiteStore User Guide</a></strong></p> + <p>(generated with <a href="/hastyscribe/">HastyScribe</a>)</p> + </div> + </div> + </div> +</div> + +<div class="row" style="margin:auto; text-align:center;"> +<div class="btn-group"> + <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> + <span class="fa fa-download"></span> Download <span class="caret"></span> + </button> + <ul class="dropdown-menu" role="menu" style="text-align: left;"> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_macosx_x64.zip"> + <i class="h3-os-apple"></i> LiteStore for OS X (x64) + </a> + </li> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_x64.zip"> + <i class="h3-os-linux"></i> LiteStore for Linux (x64) + </a> + </li> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_x86.zip"> + <i class="h3-os-linux"></i> LiteStore for Linux (x86) + </a> + </li> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_arm.zip"> + <i class="h3-os-linux"></i> LiteStore for Linux (ARM) + </a> + </li> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_windows_x64.zip"> + <i class="h3-os-win-04"></i> LiteStore for Windows (x64) + </a> + </li> + <li> + <a href="https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_windows_x86.zip"> + <i class="h3-os-win-04"></i> LiteStore for Windows (x86) + </a> + </li> + </ul> +</div> + <a href="https://github.com/h3rald/litestore" + class="btn btn-success" style="margin:20px;"> + <i class="fa fa-github"></i> View on Github</a> +</div> + +<div class="row" style="margin:auto; text-align: center;"> + &mdash; <em>LiteStore</em> is open source software, licensed under the terms of the <a href="http://opensource.org/licenses/MIT">MIT License.</a> &mdash; +</div> +
A contents/projects.html

@@ -0,0 +1,22 @@

+----- +title: Projects +content-type: page +----- +<div class="projects-page"> +<h3><a href="/h3rald/">H3RALD Web Site</a></h3> +<p>This very web site, in its 8th incarnation. H3RALD.com has been operative since 2004 and through the years its backend changed from being pure vanilla <span class="caps">HTML</span>, to server-side <span class="caps">PHP</span> (Prado and CakePHP) to Ruby (Rails, Nanoc).</p> +<h3><a href="/hastyscribe/">HastyScribe</a></h3> +<p>A self-contained Markdown compiler that can generate self-contained <span class="caps">HTML</span> files, useful for writing essays, reports, meeting notes, etc.</p> +<h3><a href="/litestore/">LiteStore</a></h3> +<p>A lightweight, self-contained, RESTful, multi-format NoSQL document store server written in Nim and powered by a SQLite backend for storage.</p> +<h3><a href="/glyph/">Glyph</a></h3> +<p>A <em>Rapid Document Authoring Framework</em> written in Ruby that can be used to create and manage books and articles.</p> +<h3><a href="/ruby-compendium/">Ruby Compendium</a></h3> +<p>A free book aiming to help beginners learn about Ruby. It doesn&#8217;t focus on learning the language, but rather on its vast ecosystem and freely available resources.</p> +<h3><a href="/rawline/">RawLine</a></h3> +<p>Rawline is a Ruby library which provides a subset of the functionality of the C Readline library. Being implemented in pure Ruby, it gives Ruby developers much more control over key bindings and word completion.</p> +<h3><a href="/concatenative/">Concatenative</a></h3> +<p>A Ruby <span class="caps">DSL</span> for concatenative programming. Although quite slow if compared to other concatenative languages like Factor, it implements all the most common concatenative combinator and makes it possible to use Ruby objects in a concatenative way.</p> +<h3><a href="/herald-vim-color-scheme/">Herald Vim Color Scheme</a></h3> +<p>A dark, easy-to-read color scheme for the Vim text editor. It can be used with 255, 16 or 8 colors.</p> +</div>
A contents/rawline.html

@@ -0,0 +1,53 @@

+----- +title: RawLine +content-type: project +subtitle: A pure-ruby alternative to ReadLine +github: rawline +status: On Hold +version: 0.3.2 +----- +<nav class="project-links"> +<p><a href="http://rawline.rubyforge.org"><span class="caps">DOCUMENTATION</span></a> | <a href="http://rubyforge.org/projects/rawline"><span class="caps">DOWNLOAD</span></a> | <a href="http://github.com/h3rald/rawline/tree/master"><span class="caps">SOURCE</span></a> | <a href="http://h3rald.lighthouseapp.com/projects/26374-rawline/overview"><span class="caps">TRACKING</span></a></p> +</nav> +<ul class="project-data"> + <li>Project Status: <strong>On Hold</strong></li> + <li>Version: <strong>0.3.2</strong></li> +</ul> +<p>RawLine is a 100% Ruby alternative to the ReadLine library, providing some of its most popular features such as:</p> +<ul> + <li>Basic line editing operations</li> + <li>Word completion</li> + <li>History Management</li> + <li>Custom key/key sequences bindings</li> +</ul> +<h3>Installation</h3> +<p>The simplest method to install RawLine is to install the gem:</p> +<div class='text'><pre><code>gem install rawline</code></pre></div><h3>Usage</h3> +<p>Editor initialization:</p> +<div class='ruby'><pre><code>require 'rawline' +editor = RawLine::Editor.new</code></pre></div><p>Key binding:</p> +<div class='ruby'><pre><code>editor.bind(:ctrl_z) { editor.undo } +editor.bind(:up_arrow) { editor.history_back } +editor.bind(:ctrl_x) { puts "Exiting..."; exit }</code></pre></div><p>Setup word completion</p> +<div class='ruby'><pre><code>editor.completion_proc = lambda do |word| + if word + ['select', 'update', 'delete', 'debug', 'destroy'].find_all { |e| e.match(/^#{Regexp.escape(word)}/) } + end +end + +editor.completion_append_string = " "</code></pre></div><p>Read input:</p> +<div class='ruby'><pre><code>editor.read("=&gt; ", true)</code></pre></div><h3>Replacing Readline</h3> +<p>Simply include the RawLine (or Rawline) module:</p> +<div class='ruby'><pre><code>include Rawline</code></pre></div><p>…and you’ll get:</p> +<div class='ruby'><pre><code>readline(prompt, add_history) # RawLine::Editor#read(prompt, add_history) +HISTORY # RawLine::Editor#history +FILENAME_COMPLETION_PROC # Rawline::Editor#filename_completion_proc +# ...</code></pre></div><p>but also:</p> +<div class='ruby'><pre><code>Rawline.editor # RawLine::Editor</code></pre></div><p>&#8230;which opens a world of endless possibilities! ;-)</p> +<h3>Latest Updates</h3> +<ul><li><a href="/articles/real-world-rawline-usage/">Real-world Rawline usage</a> &mdash; <time class="timeago" datetime="2009-03-07T03:54:00Z">Saturday, 07 March 2009</time></li> +<li><a href="/articles/rawline-030/">RawLine 0.3.0 released — now with Readline emulation</a> &mdash; <time class="timeago" datetime="2009-03-01T06:47:00Z">Sunday, 01 March 2009</time></li> +<li><a href="/articles/rawline-020/">New Release: RawLine 0.2.0</a> &mdash; <time class="timeago" datetime="2008-04-02T03:33:00Z">Wednesday, 02 April 2008</time></li> +<li><a href="/articles/inline-name-change/">InLine name change: what&#8217;s your opinion?</a> &mdash; <time class="timeago" datetime="2008-03-27T05:30:00Z">Thursday, 27 March 2008</time></li> +<li><a href="/articles/inline-introduction/">RawLine &#8211; a 100% Ruby solution for console inline editing</a> &mdash; <time class="timeago" datetime="2008-03-10T05:59:00Z">Monday, 10 March 2008</time></li> +</ul>
A contents/ruby-compendium.html

@@ -0,0 +1,36 @@

+----- +title: Ruby Compendium +content-type: project +subtitle: An Essential Guide to the Ruby Ecosystem +github: ruby-compendium +status: On Hold +version: 0.2.0 +----- + +<nav class="project-links"> + <a href="https://github.com/h3rald/ruby-compendium/downloads">DOWNLOAD</a> | <a href="/ruby-compendium/book">READ ONLINE</a> | <a href="https://github.com/h3rald/ruby-compendium">SOURCE</a> | <a href="http://github.com/h3rald/ruby-compendium/issues">TRACKING</a> +</nav> +<ul class="project-data"> + <li>Project Status: <strong>On Hold</strong></li> + <li>Version: <strong>0.2.0</strong></li> +</ul> + + +<p>This book was written by Fabio Cevasco and it is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p> +<p>This book was authored using <a href="http://www.h3rald.com/glyph">Glyph</a> and the <span class="caps">PDF</span> version was produced with <a href="http://www.princexml.org">Prince <span class="caps">XML</span></a>.</p> +<p>The Ruby logo is copyright &#169; 2006, Yukihiro Matsumoto, and used under the terms of the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.</p> +<p>Special thanks to the following individuals who contributed to the project, in some ways:</p> +<ul> + <li><a href="http://blog.dio.jp/">Akira Matsuda</a></li> + <li><a href="http://www.bitcetera.com/">Sven Schwyn</a></li> +</ul> + + +<h3>Latest Updates</h3> + +<ul><li><a href="/articles/ruby-compendium-020/">Ruby Compendium v0.2.0 released</a> &mdash; <time class="timeago" datetime="2011-08-07T16:01:52Z">Sunday, 07 August 2011</time></li> +<li><a href="/articles/introducing-ruby-compendium/">Introducing the Ruby Compendium</a> &mdash; <time class="timeago" datetime="2011-01-23T17:02:15Z">Sunday, 23 January 2011</time></li> +</ul> + + +
M rules.minrules.min

@@ -1,21 +1,40 @@

'hastysite import +; Copy PDF files saved in asset folder +; to the corresponding article output folder. ( (dict) expect -> =asset asset /id :id id "^pdf\/(.+)$" search 1 get :name - "output/articles/$1" (name) => % :dir - asset "assets/$1" ((asset /path)) => % :src - asset "output/articles/$1/$1.pdf" (name) => % :dest - " - Copying: $1 -> $2" (src dest) => % notice - src dest cp + asset "output/articles/$1/$1" (name) => % %id #asset + asset output-cp ) :copy-pdf-article-asset +( + (dict) expect -> =content +) :process-md-content + + +( + (dict) expect -> =content +) :process-html-content + +;;;; MAIN ;;;; + +contents ( + dup + ( + ((/ext ".md" ==) (process-md-content)) + ((/ext ".html" ==) (process-html-content)) + ) case +) foreach + +; Process all assets. assets ( dup ( ((/id "^pdf\/" match) (copy-pdf-article-asset)) ;((/ext ".css" match) (process-css-asset)) - ((true) (copy2output)) + ((true) (output-cp)) ) case ) foreach
M scripts/build.minscripts/build.min

@@ -5,4 +5,6 @@ "Preprocessing..." notice

preprocess "Processing rules.." notice process-rules +"Postprocessing..." notice +postprocess "All done." notice