all repos — h3rald @ 06775a396e6380dacf6d2eab2a563621d7df218e

The sources of https://h3rald.com

Migrated all published articles.
* Closes #2.
h3rald h3rald@h3rald.com
Sat, 08 Aug 2009 16:39:49 +0200
commit

06775a396e6380dacf6d2eab2a563621d7df218e

parent

152aea630e0d873c643faaaa2768706e04922227

136 files changed, 11705 insertions(+), 48 deletions(-)

jump to
A content/.textile

@@ -0,0 +1,30 @@

+----- +title: herald.vim +tags: [] +filters_pre: [textile] +----- +h2. herald.vim + +*herald* is a dark color scheme for "Vim":http://www.vim.org which aims to be easy to read, eye-appealing, portable on multiple terminals, and suitable for source code highlighting in multiple languages. + +You can get the latest version *"HERE":/files/herald.vim* (direct link). + +h3. Changelog + +* *v0.2.0* +** Support for 8 and 16 color modes +** Fixed completion menu colors +** Improved readability for Visual mode +** Specified highlighting for all the most common Vim syntax groups +* *v0.1.0* +** Initial Release + +h3. Screenshot + +!/images/herald.vim/herald_vim.png! + +h3. Resources + +* "Original Announcement":http://www.h3rald.com/articles/herald-vim-color-scheme +* "Script Page":http://www.vim.org/scripts/script.php?script_id=2684 [on Vim.org] +* "File History":http://github.com/h3rald/stash/commits/master/.vim/colors/herald.vim [on GitHub]
A content/404.textile

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

+----- +permalink: "404" +title: Page Not Found +tags: [] + +type: page +filter_pre: textile +----- +h2. Page Not Found + +The page you're looking for cannot be found. Try searching the "archives":/archives/.
A content/about.textile

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

+----- +permalink: about +title: About +tags: [] + +type: page +filter_pre: textile +----- +h2. About this Web Site + +This is a _minimalist_ web site: I do not care about fancy graphics or nitfy effects. I do care, however, about content and I want you to read what I write comfortably. As you can see, this site has no sidebars: it only has a header, a main column and a footer, exactly where you expect them to be. + +This site was designed to work with all the major modern browsers (hint: Internet Explorer 6 is _not_ a modern browser). It validates as XHTML 1.0 Strict and CSS 2.1. + +h3. About Me + +I am a full-time technical writer working in Genoa, Italy. In my free time I enjoy writing (surprise, surprise), reading about technology and programming a little bit in Ruby and other languages. + +You can contact me by email at _h3rald [at] h3rald [dot] com_, or reach me through: + +* "Twitter":http://www.twitter.com/h3rald +* "LinkedIn":http://www.linkedin.com/pub/dir/Fabio/Cevasco +* "Delicious":http://www.delicious.com/h3rald +* "Facebook":http://www.facebook.com/h3rald +* "Shelfari":http://www.shelfari.com/h3rald +* "FriendFeed":http://friendfeed.com/h3rald + +h3. About the name "H3RALD" + +Why "H3RALD"? Well, this dates back to 2003. Back in the day I was trying to find a username I could user everywhere on the 'Net that wasn't something like FabioCev83 or SomeRandomCoolGuy777. I wanted something unique, easy to remember and not too silly if possible. + +At the time I was also an avid reader of the "International Herald Tribune":http://www.iht.com/, mainly because it was the only foreign paper I could buy near my house. So I tried using "herald" for some services, but sadly it was obviously taken. Finally, I thought about turning the E into a 3, and there we are, the name H3RALD was born and I used ever since. + +h3. Under the Hood + +This site is powered by: + +* A customized version of the "Typo":http://www.typosphere.org blogging engine. +* The "Ruby on Rails":http://www.rubyonrails.org web framework for the "Ruby":http://www.ruby-lang.org programming language. +* The "MySQL":http://www.mysql.com database engine. +* The "Apache":http://www.apache.org web server. +* "BlueHost":http://www.bluehost.com web hosting. + +h3. About Comments + +You can freely post comment to all the articles on my web site as long as you are civilized. Anything which looks like spam is likely to be filtered out automatically by "Askimet":http://akismet.com/. Please note that: + +* You can use "Textile":http://textism.com/tools/textile/ to format your comments. +* If you provide an email address, it will not be displayed publicly on this site. It will only be used to retrieve your "Gravatar":http://en.gravatar.com/, if you have one. + + +h3. About the Palette + +There's a tiny palette containing some extremely small icons you can use to perform many different actions (mouse over them for a hint, or read below): + +|_. Icon |_. Action |_. Pages | +| !/images/theme/icons/mini/arrow_up.gif! | Go to the top of the page | All | +| !/images/theme/feed.png! | Subscribe to RSS Feed | Home, Archives, Articles (comment feed) | +| !/images/theme/icons/mini/bookmark.gif! | Bookmark this page using popular social bookmarking services | All | +| !/images/theme/icons/mini/mail_back.gif! | Email this page | All | +| !/images/theme/icons/mini/comment.gif! | Go to the comment section | All Articles | +| !/images/theme/icons/mini/printer.gif! | Print this page | All Articles | +| !/images/theme/icons/mini/arrow_down.gif! | Go to the bottom of the page | All | + +h3. Licensing + +My "articles":/archives/ and other material available on this web site are lincesed under the _Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported_license. For other uses, contact me. + +<p style="text-align:center"> +<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" /></a> +</p> + +h3. Credits + +I'd like to thank the following people for their work, which made this web site possible: + +* "Timothy Groves":http://www.brandspankingnew.net/, for designing the wonderful "Mini Icons":http://www.brandspankingnew.net/archive/2006/12/hohoho.html I used for the palette and the rest of this site. + +* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo. + + +
A content/articles/10-programming-languages.textile

@@ -0,0 +1,255 @@

+----- +permalink: 10-programming-languages +title: 10 programming languages worth checking out +tags: +- programming +type: article +filter_pre: textile +----- +If you program for fun or profit, chances are that you know C, C++, Java, PHP, 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 _mainstream_, even if that word has become so overused and misused that has almost lost its original meaning, if it ever had one. +If you are earning your living by coding, it'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 "esoteric":http://esolangs.org/wiki/Main_Page extremes. + +bq. "The most obvious common 'personality' characteristics of hackers are high intelligence, consuming curiosity, and facility with intellectual abstractions. Also, most hackers are 'neophiles', stimulated by and appreciative of novelty (especially intellectual novelty). Most are also relatively individualistic and anti-conformist." + +p((((. &ndash; Eric S. Raymond, ??"The Jargon File":http://catb.org/jargon/html/personality.html?? + +Even if you'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. +I was originally planning on learning another programming language as a New Year's Resolution, which is quite common among programmers. The most difficult task turned out to be _choosing_ a particular language: there are so many out there which makes it very hard to decide. + +This article deals with ten possible candidates, and it'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.* "Haskell":#haskell +* "Erlang":#erlang +* "Io":#io +* "PLT Scheme":#plt-scheme +* "Clojure":#clojure +* "Squeak":#squeak +* "OCaml":#ocaml +* "Factor":#factor +* "Lua":#lua +* "Scala":#scala + +h3(#haskell). Haskell + +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'm still not able to fully grasp some of its most crucial concepts, such as "monads":http://en.wikibooks.org/wiki/Programming:Haskell_monads, but this still doesn't put me off _wishing_ to learn the language. + +If you've never enountered Haskell before, I find "The Evolution of a Haskell Programmer":http://www.willamette.edu/~fruehr/haskell/evolution.html 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. + +Besides its very elegant, pragmatic and almost-magical syntax, what really intrigues me about this language is what it offers, in terms of features: + +* 9 different "implementations":http://www.haskell.org/haskellwiki/Implementations (multiple compilers _and_ interpreters) +* Countless "standard libraries":http://haskell.org/ghc/docs/latest/html/libraries/ "packages":http://hackage.haskell.org/packages/archive/pkg-list.html which can be used to solve _any_ programming challenge +* Abundant "learning material":http://www.haskell.org/haskellwiki/Books_and_tutorials +* "Speed":http://www.haskell.org/haskellwiki/Why_Haskell_matters#The_speed_of_Haskell that rivals C and C++ +* Very mature cross-platform compatibility + +The catch? It is likely to be very different from any other language you might have encountered before, and that'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's Resolution, you should definitely go for this. + +h4. To get you started... + +* "Official Haskell Wiki":http://www.haskell.org/ +* "Haskell Wikibook":http://en.wikibooks.org/wiki/Haskell +* "Real World Haskell":http://book.realworldhaskell.org/read/index.html +* "37 Reasons to Love Haskell":http://cdsmith.wordpress.com/2007/07/29/37-reasons-to-love-haskell-playing-off-the-ruby-article/ +* "Haskell for the Ruby Guy":http://antoniocangiano.com/2007/03/13/haskell-eye-for-the-ruby-guy/ +* "A-Z of Programming Languages: Haskell":http://www.techworld.com.au/article/261007/-z_programming_languages_haskell +* "Learn you a Haskell for Great Good!":http://learnyouahaskell.com/ +* "Haskell Hacking":http://cgi.cse.unsw.edu.au/~dons/blog/2008/05/16 + +h3. Erlang + +"Erlang":http://erlang.org/ 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. +Developing with concurrency in mind feels natural and easy in Erlang, and the performance of Erlang-powered systems can be unmatched. + +Quite a few interesting applications have been developed in this language, such as: + +* "CouchDB":http://couchdb.apache.org/, a popular distributed, document-oriented database +* "Yaws":http://yaws.hyber.org/, a high-performance web server +* even "Facebook Chat":http://www.facebook.com/note.php?note_id=14218138919&id=9445547199 + +The price Erlang adepts have to pay, as Damien Katz (CouchDB creator and Erlang enthusiast) "points out":http://damienkatz.net/2008/03/what_sucks_abou.html, is: + +* Awkward syntax, inspired by Prolog +* Weird if expressions +* Difficult string operations +* No classes or namespaces + +...this list could go on. Damien'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. + +h4. To get you started... + +* "Official Erlang Web Site":http://www.erlang.org/ +* "An Introduction to Erlang":http://www.onlamp.com/pub/a/onlamp/2007/09/13/introduction-to-erlang.html +* "Erlang Style Concurrency":http://www.defmacro.org/ramblings/concurrency.html +* "PlanetErlang":http://www.planeterlang.org/ +* "Erlang Projects":http://www.erlang-projects.org/ + +h3(#io). Io + +"Io":http://iolanguage.com/ is a relatively new programming language by Steve Dekorte which recently surfaced from Google's oblivion (if you tried googling for it a few months ago, you couldn't event find its home page) thanks to a short vut stimulating "article":http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html by "_why":http://whytheluckystiff.net/. It doesn't have the best name for a programming language, that's for sure, but it's definitely a breath of fresh air in terms of the way it works. + +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. + +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'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. + +Io has indeed a lot of potential. Granted, it'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 "Ioke":http://kenai.com/projects/ioke/ for the Java Virtual Machine. + +h4. To get you started... + +* "Official Io Web Site":http://iolanguage.com/ +* "Io Repository on Github":http://github.com/stevedekorte/io/tree/master +* "Io user group":http://tech.groups.yahoo.com/group/iolanguage/ +* "Io has a very clean mirror":http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html +* "Io Notes":http://iota.flowsnake.org/ +* "Io Language Notes":http://wiki.type-z.org/index.php/Io/IoLanguage +* "Blame it on Io! A slow-paced introduction to the Io language":http://ozone.wordpress.com/2006/03/15/blame-it-on-io/ +* "Io Wikibook":http://en.wikibooks.org/wiki/Programming:Io + +h3(#plt-scheme). PLT Scheme + +I stumbled upon the "PLT Scheme web site":http://plt-scheme.org/ 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. +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 PLT Scheme in particular &ndash; is definitely worthy of attention and interest. + +Being a technical writer, I immediately became fond of the "PLT Scheme Guide":http://docs.plt-scheme.org/guide/, one of the clearest and most well-organized examples of documentation available for a programming language I've ever come across. +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's free: you simply have no real excuse not to read it. + +Besides its excellent documentation, PLT Scheme feels like a fresh and modern implementation of one of the two most important dialects of Lisp. It's cross-platform, it has an extensive "collection of packages":http://planet.plt-scheme.org/ and a very active community behind it. +After my first attempt to learn Haskell, I felt compelled to try out PLT Scheme and it immediately felt much easier and more user friendly to learn, partly because of "DrScheme":http://download.plt-scheme.org/drscheme/ a dedicated IDE/learning tool optimized to get you started and feel comfortable with the language. +Caveats? None, unless you have an adversion for parenthesis, that is. + +h4. To get you started... + +* "Official PLT Scheme Web Site":http://plt-scheme.org/ +* "PLT Scheme Guide":http://docs.plt-scheme.org/guide/index.html +* "PLaneT":http://planet.plt-scheme.org/ +* "Quick: An Introduction to PLT Scheme with Pictures":http://docs.plt-scheme.org/quick/ +* "More: Systems Programming with PLT Scheme":http://docs.plt-scheme.org/more/ + +h3(#clojure). Clojure + +"Clojure":http://clojure.org/ 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'm a bit reluctant to deal with anything related to Java nowadays, Clojure's approach makes it more appealing. + +Unlike other Lisps (and Schemes) you may have encountered before, Clojure comes with some interesting additions: + +* "Multimethods":http://clojure.org/multimethods +* "Agents asynchronous actions":http://clojure.org/agents +* Some interestings "special forms":http://clojure.org/special_forms +* Many pre-built "data structures":http://clojure.org/data_structures, like Vectors, Maps, Sets, Collections, ... + +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. + +h4. To get you started... + +* "Official Clojure Web Site":http://clojure.org +* "Clojure User Group":http://groups.google.com/group/clojure +* "Clojure presentation on InfoQ":http://www.infoq.com/presentations/hickey-clojure +* "Trying Clojure":http://netzhansa.blogspot.com/2008/10/trying-clojure.html +* "My first look at Clojure":http://groups.google.com/group/clojure/msg/f038decc18c7da37 +* "Enclojure":http://enclojure.net/Index.html + +h3(#squeak). Squeak + +"Squeak":http://www.squeak.org/ has become one of the most popular Smalltalk implementations available. It has been used in some very interesting projects: + +* "EToys":http://wiki.laptop.org/go/Smalltalk_Development_on_XO, a kids-oriented but powerful development environment built in Squeak, was included as part of the educational sofware suite of the "OLPC":http://www.laptop.org. +* "Seaside":http://www.seaside.st/ is a modern and very productive web framework running on Squeak. +* "Croquet":http://www.croquetproject.org/index.php/Main_Page is a development solution to build complex, multi-user virtual worlds. + +If you ask "Randal Schwartz":http://www.stonehenge.com/merlyn/, he'll explain you "why":http://www.infoq.com/articles/smalltalk-comeback-schwartz Squeak and Smalltalk are at least worth a look. Personally, while I'm attracted by Smalltalk's unique approach to programming and its friendly syntax, I am still a bit overwhelmed by the way it works. +Squeak, and Smalltalk in general, runs inside (literally) a virtual machine written in Squeak itself. This means that: + +* You write your code inside Squeak +* You debug, inspect and interact your code inside squeak +* You run your code inside Squeak +* You can install Squeak on virtually any platform, including mobile phones, fairly easily + +Everything lives inside Squeak. It's very weird to picture this without actually trying it, so I suggest you "download it":http://www.squeak.org/Download/ and give it a try: it will definitely be an unusual but intriguing experience. + +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. + +h4. To get you started... + +* "Official Squeak Web Site":http://www.squeak.org/ +* "Squeak by Example":http://squeakbyexample.org/ +* "SqueakLand":http://www.squeakland.org/ +* "Ruby's Roots: Smalltalk Comeback and Randal Schwartz on Smalltalk":http://www.infoq.com/articles/smalltalk-comeback-schwartz +* "FLOSS Weekly 29: Dan Ingalls":http://twit.tv/floss29 + +h3(#ocaml). OCaml + +Like Smalltalk, "OCaml":http://caml.inria.fr/ has been getting more attention recently than in the past. Sure, not everyone is planning to learn is these days, but after reading "this article":http://enfranchisedmind.com/blog/2008/04/14/useful-things-about-static-typing/ I admit I was eager to give it a proper try. + +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. + +Additionally, the "OCaml Batteries Included":http://batteries.forge.ocamlcore.org/ 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 "looks promising":http://dutherenverseauborddelatable.wordpress.com/2008/11/07/a-taste-of-ocaml-batteries-included/. + +h4. To get you started... + +* "Official Caml Web Site":http://caml.inria.fr/ +* "Objective Caml Tutorial":http://www.ocaml-tutorial.org/ +* "A Concise Introduction to Objective Caml":http://www.csc.villanova.edu/~dmatusze/resources/ocaml/ocaml.html +* "The OCaml Alliance Network":http://wiki.cocan.org/ +* "OCaml News":http://ocamlnews.blogspot.com/ +* "OCaml Batteries Included":http://batteries.forge.ocamlcore.org/ + +h3. Factor + +"Factor":http://factorcode.org/ is to Forth what "Clojure":http://clojure.org 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's stack-based, concatenative and has postfix notation. +While this is enough to put some people off, if you digg deeper you'll discover that Factor offers all the most important features available in contemporary programming languages: garbage collection, dynamic typing, an object system, ... they're just presented in a very different way: + +bq. "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's a feature, not a bug!" + +p(((. &ndash; Daniel Ehrenberg, ??"Learning Factor":http://useless-factor.blogspot.com/2008/01/learning-factor.html?? + +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 "Furnace":http://docs.factorcode.org/content/article-furnace.html web framework, which powers the "Concatenative":http://concatenative.org/ wiki, is entirely built in Factor and runs on top of a Factor web server. + +h4. To get you started... + +* "Official Factor Web Site":http://factorcode.org/ +* "Factor on the Concatenative Wiki":http://concatenative.org/wiki/view/Factor +* "Factor Documentation":http://docs.factorcode.org/ +* "Learn Factor":http://learnfactor.org/ +* "Planet Factor":http://planet.factorcode.org/ + +h3(#lua). Lua + +"Lua":http://www.lua.org/ ("Moon" 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'll be able to understand (and possibly write) 80% of Lua code without reading a single line of its documentation. + +Despite its simplicity, Lua is considered a multi-paradigm language supporting imperative, functional and even object-oriented approaches. More specifically, Lua's _tables_ provide a simple but powerful way to create arrays, hashes and even classes (or better, prototypes). Simple (and multiple) inheritance is achieved through _metatables_, which allow calls to undefined functions to be _transferred_ to parent tables. + +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 "as fast as Lua" has become a proverbial expression. +Lua found its niche in embedded applications and games development, basically everywhere there's the need to provide a fast scripting language which is also very easy to learn and extend with C or other languages. + +h4. To get you started... + +* "Official Lua Web Site":http://www.lua.org/ +* "Lua Manual":http://www.lua.org/manual/ +* "Lua-users":http://lua-users.org/ +* "Learning Lua":http://icculus.org/~theoddone33/lua/ +* "Lua for Beginners":http://lua.gts-stolberg.de/en/index.php?uml=1 + +h3(#scala). Scala + +You may not be happy to see "Scala":http://www.scala-lang.org/ in this list instead of other very valid and equally powerful languages for the Java Virtual Machine such as "Groovy":http://groovy.codehaus.org/. 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. + +Scala is both object oriented and functional. It offers the best of both worlds: classes, traits and mixins which may be familiar to OOP lovers but also anonymous functions, currying and pattern matching which may please Haskell enthusiasts. Additionally, it'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. + +Compared to learning a fully-functional (no pun intended) language like Haskell, Clojure or PLT Scheme, learning Scala is definitely easier and will feel less alien. + +h4. To get you started... + +* "Official Scala Web Site":http://www.scala-lang.org/ +* "The Case for Scala":http://blogs.zdnet.com/Burnette/?p=690 +* "Scala Wiki":http://scala.sygneca.com/ +* "Learning Scala with Project Euler":http://grok-code.com/75/learning-scala-with-project-euler/ +* "Roundup: Scala for Java Refugees":http://www.codecommit.com/blog/scala/roundup-scala-for-java-refugees + +h3. Epilogue + +There are so many interesting programming language out there that it'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. +Some people may debate over the very essence of this article: why _choosing_ 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's the purpose of learning something which may feel totally alien to you? + +A programming language is ultimately just a tool to get your job done. If you have to write an end-user, desktop GUI application which will always run on Windows and which needs to inteface with Microsoft technologies, you'll choose C# over Haskell, there's no doubt about that. Especially if 500 developers in your company already develop in C# and you don't, as a matter of fact, have a saying on the matter. + +But what if you _could_ 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? + +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. +If you already mastered some of these languages already, or even all of them, be assured that they'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.
A content/articles/10-reasons-to-learn-ruby.textile

@@ -0,0 +1,187 @@

+----- +permalink: 10-reasons-to-learn-ruby +title: 10 Reasons to Learn Ruby +tags: +- ruby +type: article +filter_pre: textile +----- +h3. Preamble + +I discovered Ruby fairly recently, through the excellent Ruby on Rails framework[1]. Although I don't consider myself a Ruby expert by any means, I read the PickAxe[2], I've coded a few utilities for my personal use in Ruby and I'm currently developing with Rails during my free time. +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 PHP 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't want incorrect indentation to break my code[3], and here I am, heaping praise upon it. + +There are plenty[4] 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. + +It'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't complain to me if you don't want to use it anymore - that's exactly what happened to me, but luckily, it didn'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... + +You have been warned. +h3. Why learn Ruby? + +h4. #1 - You get all the treats without the tricks + +Ruby borrows from all the best programming languages out there, from smalltalk to Java, Perl to Python[5]. Basically, here's the features and functionalities Ruby gives you which you may have seen elsewhere: + +* _Exceptions:_ Believe it or not, exceptions are one of the most important things to master when developing any kind of application. PHP4 programmers probably won't know anything about them and they'll tell you to just print stuff on the screen or use their "extremely advanced" 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. +* _Namespaces:_ Ruby modules make excellent and easy-to-use namespaces, for the joy of Java and C++ enthusiasts. +* _Built-in Regular Expressions:_ 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. +* _Overloadable operators:_ Ruby lets you define operators like +, -, etc., for any of your classes. +* _Packages:_ Called "gems", they really are solid and precious indeed...and they work! Packages support dependencies, and they can be either cross-platform or platform-dependent. +* _Interactive Shell:_ the Interactive Ruby Shell can be used to test Ruby code instantly, similar to the Python console. +* _Unit Testing_: The @Test::Unit@ module makes things so easy that you really don't have any excuse not to test your code. + + +h4. #2 - You'll love the little things + +Ruby is elegant. Why's that? Because it doesn't focus on making code _concise_ so much as _readable and usable_. Here are some tips to help you out: + +* You can use both _if_ and _unless_ in condition statements. Of course you can just use _if_ and negate the condition, but _unless_ can be less error-prone at times. Furthermore, you can use both operators as conditional modifiers, after a statement rather than before: _order.new unless order.exists_. +* 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. +* You can use the _alias_ directives to create an alias for a method already defined. In this way you can have an _exist_ and an _exists_ method at no additional cost or repetition. +* You can use the _attr_reader_, _attr_writer_ or _attr_accessor_ directives to automatically generate getter and setter methods for specified class members. +* 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. +* Parentheses are optional in method calls. You can therefore write _File.open("/home/h3rald/test.txt")_ or simply _File.open "/home/h3rald/test.txt"_, which is particularly handy with methods that don't take parameters. + + +h4. #3 - You won't ever use a semicolon again + +You want to add another instruction? Just go on the next line. Hit <return> and you're done. In Ruby, like in Python, newlines matter and you don't have to remember to end your instructions with a semicolon. Unfortunately this means that you won't be able to write your whole program in a single line of code, like the C++ folks... that's too bad, isn't it? + +*UPDATE:* Indeed you CAN use semicolons as line delimiters in Ruby as well, the point, however, is that you don't have to. + +h4. #4 - Everything is an object, as it should be + +When I studied Java they taught me that everything is an object. + +_- "So 14 and 374346.678 are objects then?"_ +_- "No, silly, they are numbers!"_ + +In Ruby, numbers, strings, Boolean values _et al_ are objects. Really. This means you'll write things like: + +<typo:code lang="ruby"> +"YOU SHOULDN'T ALWAYS USE CAPITALS".downcase #=> outputs "you shouldn't always use capitals" +-12.abs #=> outputs 12 +</typo:code> + +instead of something like: + +<typo:code lang="ruby"> +# PHP Code + +strtolower("YOU SHOULDN'T ALWAYS USE CAPITALS"); +abs(-12); +</typo:code> + +You save time, you save brackets, and it just makes more sense. + +h4. #5 - Everything has a value + +Or "you'll hardly ever use return to return values". In a nutshell, all Ruby instructions return a value, even variable assignments, so you don't really need to use the "return" keyword at the end of a method; the value of the last assignment or _any_ other expression will always be returned. + +h4. #6 - You can alter your environment in any way you like + +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'd like to have an additional method. At this point you have a few ways to handle this in ordinary programming languages: +s +* You modify the developer's source code, if you have access to it. This is normally not a good idea, and you shouldn't do it. +* 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. +* 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. + +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: + +<typo:code lang="ruby"> +class Numeric + def feet + self*3.2808399 + end +end +</typo:code> + +From now on, all your numbers will have a _feet_ method, which can be used just like any other method that was originally defined for the class: + +<typo:code lang="ruby"> +5.feet #=> Returns 16.4041995 +</typo:code> + +Basically, Ruby classes are never closed and can be modified at any time from anywhere. Use with care, of course. + +h4. #7 You won't get unicorns from birds and horses, but you'll still get donkeys if you want + +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 "fly" and "neigh"... crazy stuff, anyhow, Ruby does not offer multiple inheritance. +This seems to be the trend, after all, and of course it's up to tastes. I don't quite fancy multiple inheritances, as they may lead to unpredictable things. Nevertheless, it is possible to create "mix-ins" 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. + +h4. #8 You don't really need XML + +XML 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's be honest, it's not really readable at first glance in many cases, unlike the following code snippet: + +<typo:code lang="yaml"> +regexp: !ruby/regexp /a-zA-Z/ +number: 4.7 +string: a string +</typo:code> + +This is definitely easier and more readable than XML, isn't it? Welcome to YAML, Ruby's favorite markup (but not really[6]) language, which can be used to represent any Ruby object in a simple, clear and yet complete way. +Ruby _can_ parse XML, but YAML's simplicity convinced a lot of developers to use it as an alternative to XML for configuration files, for example (Rails does this). +The code snipped presented before was obtained by executing the following line of Ruby code: + +<typo:code lang="ruby"> +{"string" => "a string", "number" => 4.7, "regexp" => /a-zA-Z/}.to_yaml +</typo:code> + +The _to_yaml_ 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 YAML _and_ re-convert anything back into Ruby objects, with total transparency for the developer. So much for parsing, huh? + +h4. #9 Lambda is much more than a Greek letter + +Ruby borrows some magic from Lisp and Perl with Proc objects and blocks. Procs are _"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." _[7] Consider the following: + +<typo:code lang="ruby"> + def gen_times(factor) + return Proc.new {|n| n*factor } + end + + times3 = gen_times(3) + times5 = gen_times(5) + + times3.call(12) #=> 36 + times5.call(5) #=> 25 + times3.call(times5.call(4)) #=> 60 +</typo:code> + +I could have used the _lambda_ method instead of _Proc.new_ and gotten the same result. This should ring a bell for people who know Perl and Python (or Lisp)[8]. You can do the same thing in PHP as well, but most people don't really use the function.[9] + +Additionally, Ruby makes extensive use of blocks, sort of "unborn Procs"[10], for example, to iterate the contents of an object and execute some code, like the _each_ method available for the Array class: + +<typo:code lang="ruby"> +[1, 2, 4, 6, 8].each {|c| puts c*2} #=> outputs each element multiplied by 2 in a new line. +</typo:code> + +Should the code in the block exceed one line, you're advised (but not required) to include the block within _do ... end_ instead of using braces. Ruby folks don't like braces much, really. + +h4. #10 - You can go on Rails + +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 PHP, but Rails was built in Ruby because Ruby has features no other language can offer. + +h3. Conclusion + +Time's up. You've probably made up your mind about Ruby already, and you are either playing with it already, or you're totally ignoring it. However, the next time you're frustrated because your code looks ugly and you think you could have done the same thing with half the code you got, don't blame me! + +h3. Notes + +fn1. "Ruby on Rails":http://www.rubyonrails.org, MVC Web Development Framework. + +fn2. "Programming Ruby (2nd Ed.)":http://www.pragmaticprogrammer.com/title/ruby/index.html, by Dave Thomas & others, Pragmatic Programmers, 2004 + +fn3. Not entirely correct, but sort of. For more information on Python's indentation rules and myths, read "Python: Myths about Indentation":http://www.secnetix.de/~olli/Python/block_indentation.hawk. + +fn4. For a list of Ruby tutorials, refer to the "Documentation":http://www.ruby-lang.org/en/documentation/ section of the Official Ruby Website. + +fn5. For more information on Ruby, and in particular on the similarities and differences with other languages, refer to "Ruby from Other Languages":http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/. + +fn6. YAML is Not a Markup Language. + +fn7. Definition and example taken from the official Ruby documentation for class "Proc":http://www.ruby-doc.org/core/classes/Proc.html. + +fn8. For some example on lambda functions in Python, see "Python: Lambda Functions":http://www.secnetix.de/~olli/Python/lambda_functions.hawk. + +fn9. For examples of "lambda functions" in PHP using create_function(), see "this":http://www.webmasterworld.com/forum88/7414.htm. + +fn10. For more detailed information on Ruby's Procs, blocks etc. refer to "Understanding Ruby blocks, Procs and methods":http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods.
A content/articles/10-reasons-why-i-didnt-update-my-blog.textile

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

+----- +permalink: 10-reasons-why-i-didnt-update-my-blog +title: 10 reasons why I didn't update my blog +tags: +- internet rant personal writing +type: article +filter_pre: textile +----- +_"It has been a while since my last post, sorry about that"_ +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't write a meaningful post on my blog for a long time and no, probably this is not going to change that either. + +Yesterday I started thinking *why* 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. + +I don'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 "proper" money from my site. There's nothing wrong with it: I believe there are some other people in my condition, and that's quite normal. + +That being said, let's examine the ten most common reasons why I (and you too, maybe) end up not updating my blog, _even when I have time to do so_.h3. Someone already blogged about it + +This is very irritating. I am obsessed with original content. I want to write about something other people _never_ (or hardly ever) wrote about. As a consequence, I often find myself googling the same topic I'm planning my blog post on, and I _obviously_ often get quite a few results, too! + +I actually wanted to title this very post "The Blogger's Block", 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. +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 "post":http://antoniocangiano.com/2008/05/29/random-thoughts-on-social-sites/. Very interesting indeed, but quite annoying as well! + +OK scrap that, think about something else... + +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's what I did to write this post). + +h3. I didn't research enough on the subject + +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. +I wanted to write a review of the new Treo 750 I bought. I'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! +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't it? + +The solution to this would be trying to limit the scope of your post: screw Apple, let's just focus on my Treo 750 and on the amazing amount of programming languages I can use on it! + +h3. After researching for X days, I realized it was all a waste of time + +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't it? I started researching about all the most esoteric lightweight web servers, about JRuby, Glassfish, IronRuby, ... 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. + +Very frustrating. I abandoned the whole thing, because there was simply no reason to go on researching: it was all a waste of time. + +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's plenty of articles about the same subject, at least you have a concrete purpose to write yours. + +Erhm, yes, by the way, keep an eye on "SitePoint":http://www.sitepoint.com in the next few days/weeks, OK? + +h3. I only write when I'm inspired, and now I'm not + +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't have access to a computer or the Internet. +Of course I don't forget about it, but by the time I have a chance to actually write it, I really don't fancy doing so. Oh, the irony! +It happened today, actually, during my lunch break: I was supposed to write this post but I didn't feel like it. I lost my inspiration and all my artistic verve, so no, it can't be done. Tough luck, wait until next time. + +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. +I also saved it to my PDA and continued writing it when I had a chance. Eventually, I managed to finish it during my lunch break, the next day. + +Try to write _whenever you are inspired_. 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. + +h3. This won't make Digg's front page + +Digg, Reddit, DZone, you name it. They are all excellent free tools for promoting your content. Don't tell me you never wrote a post _for the sake of making the front page_ of one of those sites. I did, I confess. +I didn't make Digg's front page in a while, and I'm probably never going to make it again. The reason? When it comes to promoting the right content in a fair way Digg *sucks*. As a consequence, 80% of the articles which appear on Digg *suck*. I'm sure you'll be able to forgive my French when I say that *Digg utterly sucks*. + +No matter how clever your story may be, unless you're backed up by a swarm or an active community willing to Digg your story, you simply aren't going to make it. When is the last time a proper programming article made it to Digg? I don't remember, probably way before I unsubscribed to the Digg's Technology feed, about a year or so ago. + +Just write for the sake of writing. Don't even submit your story to Digg (unless you'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't get as much traffic, granted, but you also won't get tons of idiots writing pointless crap on your site and you won't risk a server crash. If it's destiny, then some good soul will post it to Digg, but nobody will digg it. That's just life, I'm afraid. + +h3. It has been too long since my last post: the next one will have to make up for it + +This happens when you start feeling guilty because you didn't post in a long time. + +_"My next post is going to be superb, long, interesting and everyone will start flocking back to my blog!"_ + +Wrong. First of all because statistically people just don't "flock back" 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're waiting for that special _next post_ which will be _so much better_ and will bring your blob back to -spam- life. + +It happened, it happened... again, all you have to do is just post all the tidbits you need, while you're preparing your big shot: your blog will remain "fresh" and more people will enjoy your interesting posts, whenever they'll come. + +h3. Nobody gives a damn, anyway + +I didn't want to upset my younger audience by using a nasty f-word in the title, but that's exactly how it feels like it, sometimes. +I went to Rome last week, did you know? I twittered about it, you *ought* to know! And of course you'll all be waiting for the usual 10-page-long article on my awesome vacation. Like when I "went to London":http://www.h3rald.com/articles/incomplete-guide-to-london, remember? +No, sadly not everyone may be interested in this crap. So I probably won'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's normal. +Especially for a blog like mine, which is deliberately open to all my interests: programming, technology, travelling, etc. That'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're not carefula and if you're not 100% devoted to your blog's theme. +A themed blog will build up a faithful audience, like when I was writing almost exclusively about CakePHP: a lot of PHP programmers where flocking here daily. Then things "went wrong":http://www.h3rald.com/blog/42 and I really couldn't be bothered to write about the same crap. Which leads us to the next topic... + +h3. If I write about this, a large chunk of my audience is going to be upset + +This applies especially to themed blogs: if you're a well-known Firefox addict, you can't suddenly start writing about "Opera":http://www.h3rald.com/articles/firefox-lovers-guide-to-opera, praising its speed and the features it offers out-of-the box! +If you take a side, you'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 "changed side": from CakePHP and PHP to Rails and Ruby, from Firefox to Opera (well, wait until my next SitePoint article comes out, at least...). Probably they are not the same people who read this blog a year or so ago. + +In the end, it'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. +And if you don't feel 100% sure you want a themed blog, you definitely shouldn't go for a themed domain name, or you may end up abandoning it afterwards. And when that happens, unless you're writing damn cool posts like "Why":http://redhanded.hobix.com/, it's going to hurt your audience. On the other hand, if you're sure you'll get ten times more visitors, go for it. +No, h3rald.com stays... I may end up raving about Safari at some point within the next ten years though, don't be upset! + +h3. I'm not an expert on the subject, so I shouldn't blog about it + +This is a common problem I have when I try to write about something I don'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! +I thought about writing a longish post on learning Ruby from scratch, but then I realized it wouldn't have been a great idea: I was just starting to learn a new language, I didn't know all the nitty-gritty and writing about it to teach others was going to be a bit presumptuous, maybe! +Instead, I opted for a lighted "10 reasons to learn Ruby":http://www.h3rald.com/articles/10-reasons-to-learn-ruby 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. +You don'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't know. + +h3. There are a lot of professional bloggers out there, and I'm not one of them + +Finally, this can be summarized in two words: inferiority complex. "Proper" blogs fire out 10+ posts _per day_, and I don't even write ten points in _a month_! 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! +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. +At the end of the day, what matters is the _quality_ of your posts. Not the length minf, the Quality. I personally think that non-professionals (I said "non-professionals", not "amateurs"!) are _allowed_ to write about once a week, if they can provide good content, that is. + +But you still do have to write _at least_ once a week (OK, let's make it ten days), otherwise either you're justified (you genuinely don't have time) or you may be a victim of one of these common fears. Watch out, and happy blogging! + + +
A content/articles/10.textile

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

+----- +permalink: "10" +title: Italian General Elections - 2006 +tags: +- italy +- politics +type: article +filter_pre: textile +----- +!>http://www.berluscastop.it/v_imag/sodom1.gif! + +Another five years have passed and here we go again: General Elections time! +Today and tomorrow Italy -must- should vote for a new government, and the choice is _again_ between two main contenders to the Prime Minister's -throne- chair: + +- "Romano Prodi":http://news.bbc.co.uk/1/hi/world/europe/299254.stm +- "Silvio Berlusconi":http://news.bbc.co.uk/1/hi/world/europe/3034600.stm + +Just today I was reading an interesting article titled "_'The End of Silvio's Show?'_":http://service.spiegel.de/cache/international/spiegel/0,1518,409538,00.html in which the author examines the possibility that Berlusconi's five years of subtle pseudo-dictatorship may end in favour the former president of European Commission Romano Prodi. + +_Who are they?_ + +*Silvio Berlusconi* +!>http://www.consapevolezza.it/notizie/gen-mar-2002/imgs/berlusconi_corna_5.jpg! + +I can't imagine someone asking this question, at least I can't think of anyone who doesn't know Silvio Berlusconi as the icon of the latest _national oddity_. +Forthose who need their memory refreshed, here's a small collection of links featuring him: + +* "BBC NEWS Profile":http://news.bbc.co.uk/1/hi/world/europe/3034600.stm +* "Wikipedia Page":http://en.wikipedia.org/wiki/Silvio_Berlusconi about him +* "An Italian Story":http://www.economist.com/displaystory.cfm?story_id=587107 - An article written in 2001 published by the Economist, _before_ he was elected Prime Minister +* "Fit to run Italy?":http://www.economist.com/displaystory.cfm?story_id=593654 - Another article by the Economists explaining why Berlusconi should _not_ lead the Italian Government +* "Meglio coglioni che mafiosi":http://grabbyeducational.blogspot.com/ - Italian blog against Berlusconi (warning: profanity). +* "Basta 2006 - Geocities":http://www.geocities.com/basta2006/ - a comprehensive directory of websites dedicated to Berlusconi, a really good resource. + +There are millions more. In particular, I'd like to add one more: "The Empire of Silvio Berlusconi":http://www.consapevolezza.it/notizie/gen-mar-2002/impero_berlusconi.asp, 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: + +* Mediaset Television (100%) - which includes three national channels +* Medusa Film (100%) - Movie productions +* Milan A.C. (99%) - Football team +* Edilnord (63%) - Real Estate +* Blockbuster (51%) - Video retal shops +* Mondadori Spa (48%) - Biggest Italian editorial company +* Mediolanum (35.5%) - Financial sociaty - banks, insurances etc. + +Nice, isn't it? Of course he had to give those societies to some trusted administrators before becoming Prime Minister... but let's not talk about this... + + +*Romano Prodi* +!>http://upload.wikimedia.org/wikipedia/en/thumb/0/04/Prodi.jpg/200px-Prodi.jpg! + +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: + +* "European Commission Archives":http://europa.eu.int/comm/archives/commission_1999_2004/prodi/index_en.htm +* "eitb24's profile of Romano Prodi":http://www.eitb24.com/portal/eitb24/noticia/en/international-news/centre-left-candidate--profile-of-romano-prodi-?itemId=D23503&cl=%2Feitb24%2Finternacional&idioma=en +* "Answers.com on Romano Prodi":http://www.answers.com/topic/romano-prodi +* "New York Times archives about Romano Prodi":http://topics.nytimes.com/top/reference/timestopics/people/p/romano_prodi/index.html?inline=nyt-per + +Known as "The Professor" for his education... + +bq. _"He graduated in economics at Milan'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"_ +_("Prodi's BBC profile":http://news.bbc.co.uk/1/hi/world/europe/299254.stm)_ + +...Romano Prodi is the candidate proposed by the current Italian opposition, grouping roughly all the center-left parties. He's the one who pushed Italy - as President of the European Commission - 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 _Euro effect_ occurred: prices went higher and didn't seem to be an _exact conversion_ from Lire to Euro. He was chubby enough ("mortadella" is one of his most recurring nicknames) to be quickly appointed as scapegoat for the unpleasant situation. + +!<http://www.dsmirandola.it/sg/img/berlusconi_corna.jpg! + +Besides that, if someone asks me what's the difference between the two candidates, I'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 _a cool and worthwhile investment_... + +_*Who am going to vote?*_ + +Well, one thing is sure: I don't want Silvio to win again, I don't want Italy to be publicly ridicolized abroad all the time that muppet opens his mouth or simply does something _he_ thinks is funny... +
A content/articles/11-07-2009.textile

@@ -0,0 +1,177 @@

+----- +permalink: 11-07-2009 +title: 11th of July 2009 +tags: +- wedding +type: article +filter_pre: textile +----- +* "Prologue":#prologue +* "The wedding party":#party +* "The stag night":#stag +* "The preparations":#preparations +* "The ceremony":#ceremony +* "The reception":#reception +* "The honeymoon":#honeymoon +* "Photos":#photos +* "Trivia":#trivia +* "Famous quotes":#quotesh3(#prologue). Prologue + +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. + +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. + +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 -- "They normally arrive in less than two weeks", he wrote to me in his last email. + +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 _just_ 40 Euro. + +h3(#party). The wedding party + +The following table lists all the members of the wedding party, for your own reference. + +|_. Name |_. Role | +| Fabio Cevasco | Groom | +| Roxanne O'Mahoney | Bride | +| Matteo Lagomarsino | Best man | +| Simona Angheluta | Maid of Honor | +| Roberto Pischedda | Head Usher | +| Delia Angheluta | Bridesmaid | +| Zacharry O'Mahoney | Usher | +| Caspar O'Mahoney | Usher | + +h3(#stag). The stag night + +In Italy, England, US and in many other countries a "stag night" 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: _drink_. 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 -- if you're an Irishman. + +I was well aware of my in-laws drinking habits, so I decided to take uncle Felix's offer: "I'll have a taxi ready for you whenever you want to sneak out of the pub, and make sure you do" -- he said. + +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. + +_Quinn's_ 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'Mahoney, father of Roxanne O'Mahoney, my wife (families are still very large and very close, in Ireland). Being the family pub, _Quinn's_ doesn't close at midnight; in fact, it often doesn't close at all for family and friends (i.e. the entire village of Killenaule). +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... + +Around the third round someone asked me if I could sing a song -- 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! + +When people started getting into _their_ 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't need yet another pint. Unfortunately the pub owner spotted me straight away and said "That pint is stale... here, have another one, on the house!". At that point I decided it was better for me & the rest of the Italians to quietly sneak out. + +I was at home (uncle Martin's house) and in bed at about 1:30 AM. I almost didn't sleep at all that night, as expected, so I wasn'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't too amused when Zac turned up after drinking the (Irish) Nightly Guideline Drink Amount: approx. 10-11 pints of Guinness -- those he could count, that is. + +h3(#preparations). The preparations + +This part of the day is best reported in chronological tabular form: + +|_. Time |_. Event | +| 7:35 | The groom -wakes up- decides to stop pretending to sleep. | +| 8:00 | The bridesmaids are up and about, ready to go to the hairdresser | +| 9:00 | 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's his only hope to collect and bring back the flowers for the church (_"Ahhhh you want _me_ to do it... you could have said so since the beginning!"_). | +| 9:45 | The groom takes the bridesmaids into town, to the hairdresser | +| 10:00 | The groom attempts to gather his groomsmen for the first time | +| 10:15 | The groom starts having a chat with the best man and the head usher. The other ushers are _somewhere around_. | +| 10:30 | 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 | +| 11:00 | The groom attempts to gather his groomsmen for the second time, this time telling them it's time to get ready (he's not taken seriously) | +| 11:30 | The groom attempts to gather his groomsmen for the third and final time, now everyone is starting to try out their suits | +| 11:45 | 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're going to get the flowers anyway and there's nothing to worry about. | +| 12:00 | All groomsman are dressed. It starts raining. | +| 12:30 | Zac decides he needs some fresh air and takes a walk outside in his morning suit, regardless of the heavy rain and the groom's prayers | +| 13:10 | The groomsmen go to the church. | +| 14:00 | Guests start arriving | +| 14:20 | The brides arrives and the ceremony starts. | + +h3(#ceremony). The ceremony + +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't remember much of the whole ceremony, but I'm told it's a common thing to happen. + +As the ceremony started, we sat down without looking at the audience, so I didn't feel paranoid and enjoyed listening to the priest'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'd have had to do the day after, and it felt like a lot of work. The groomsmen and the bridesmaids were terrified: _"So I have to help you sit down, move the chair... like that... then... go back... no, wait, what was that again?"_. Matteo and Roberto couldn't believe the whole choreography involved in the event: it's nothing like that in Italy, but they were glad they were part of it in the end. + +It all happened exactly like Father Ryan predicted, he even guessed almost all the few mistakes we made: "You have to walk slowly in front of the bride" &ndash; he said to Delia, the bridesmain &ndash; "and if you _think_ you're going slow while you're doing it, you're probably going _way too fast_". But nobody noticed, really, and nobody cared: they were all too excited to mind that, and everyone'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... + +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: + +* The First Reading was in Latin (my mum read it superbly -- she's a Latin teacher!) +* The Second Reading was in Italian +* _Our Father_ was sung in Gaelic + +By our own common decision, we didn't ask for a professional video of the ceremony, only "photos":#photos. Nevertheless, my uncle captured most of the ceremony (and the most embarassing bits of the dancing after the "reception":#reception) using my dad's video camera. + +h3(#reception). The reception + +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 _our_ 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 "Ruby":http://www.alleventslimos.com/Wedding/rolls_silver_cloud.html, a red 1961 Silver Cloud II, we just had to get it. Champagne and chauffeur included, of course. + +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't really _local_, so erhm..., well, let's just say we were really lucky that at least _the bride_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. + +"Raheen House":http://www.raheenhouse.ie/ is a very charming XIX 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)... you get the picture. Unfortunately it can only accomodate 120 people, so it isn'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. + +As soon as we got there, my best man was informed by the staff that he _had to_ introduce the bride and groom. _"What? No, wait! What do I say... how... what? Fabio, come back!"_ 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 _terrific_ speech: he obviously gave it a lot of thought and it sounded just perfect. + +After he spoke, it was my dad'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 _every_ 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'll publish it soon on the Internet, for posterity's sake. + +The last three speeches were Jim'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's) was characterized by subtle and very discreet exhortations to produce progeny (_"get on with it!"_), but other than that they were fine. + +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't 100% sure until we started trying it. And there was also _plenty_ 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. + +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's use for at least three generations! This was my dad's primary concern until we left for Ireland: "You sort the restaurant out, because I'm going to bring some bottles, no matter what". He shipped over _96_ 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&B owners, six to each uncle of the bride, etc. etc. None came back to Italy, that's for sure. + +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 'n' roll: they were amazing, and especially the Italian's were really impressed. + +Not as impressed as when they noticed uncle Martin dancing. I've never seen _anyone_ in my life dancing so vigorously and wildly in my life. He has his own special technique that cannot be described with words. I'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'd take my auntie for a spin, then the bride (well, mostly her dress), then even me! I don't remember much, I think I was in the air at one point, and then all over the place... + +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 _huge_ 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. + +h3(#honeymoon). The honeymoon + +The day after we slowly recovered. We didn'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't mind. + +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 "Abbeyglen Castle":http://www.abbeyglen.ie/, 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't enough, really, but we'll eventually go back there hopefully: maybe Sir Paul Hughes, proprietor of the castle, will still remember _"the bride and groom"_, as he kept calling us throughout our brief, but very pleasant stay. + +Exactly as auntie Noelle said, everything was over in a blink: the ceremony, the reception, the honeymoon... 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... let's say the money we got as present from most of the guest was well spent in a 42" LCD HD TV, surround sound system, etc. etc. + +...And we still have our other half of the honeymoon, too! Probably Miami Beach and Bahamas, next November. + +h3(#photos). Photos + +Our wedding photos were taken by "Pat McCoole":http://www.patmccoole.ie/, who did a truly amazing job portraying the magic of our special day. + +<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> + + +h3(#trivia). Trivia + +* On the wedding day, it rained non-stop from 12 am to 7 pm. +* The groom drove for a total of 1758.7 Km in 14 days. +* On his stag night, the groom only drank 2.5 pints of Guinness (almost everyone else had 10, on average). +* The night before the wedding, the groom slept only from 5:30 to 7:30. +* 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's dress. +* 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. +* Uncle Martin danced with a lot of people after the meal, including the bride, her father, and the groom. +* 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. +* 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. +* The bride forgot her change of clothes in uncle John's car, who had to drive in early in the morning or she would have had her breakfast in her wedding dress. + +h3(#quotes). Famous quotes + +bq. "This journey feels like going to Lourdes: you come back and your life changed forever."<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- The best man, when he arrived in Killenaule. + +bq. "Is there a garage around?"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Auntie Isa while waving a car mirror, when she arrived in Killenaule + +bq. "Do I really have to do a speech? Are you sure?"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- The best man, when he met the groom in Ireland. + +bq. "My preciousssss!"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- The best man, when he was given the rings in custody. + +bq. "She's the most calm and organized bride in history."<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Auntie Noelle, about the bride on the wedding day. + +bq. "You could tell he was panicking on the phone"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Auntie Noelle, about the groom on the wedding day. + +bq. "Potatoes, potatoes, potatoes..."<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- The father of the bride to the groom, during the traditional handshake of the wedding rehearsal. + +bq. "Potatoes, potatoes, potatoes..."<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- The groom to the father of the bride, during the traditional handshake of the wedding ceremony. + +<blockquote> + +*Best man:* "[...] this is the first time for me to speak in public, in front of an _English_ audience [...]"<br /> +*Audience:* "Irish! IRISH!!!"<br /> +*Best man:* "...oh, right, Irish! Sorry..."<br /> + +</blockquote> + +bq. "I need another shirt!"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Uncle Martin, after about 2 hours of continuous dancing with almost all the guests. +
A content/articles/11.textile

@@ -0,0 +1,48 @@

+----- +permalink: "11" +title: Meet some Cake(PHP) bakers! +tags: +- cakephp +- blogging +type: article +filter_pre: textile +----- +I should write more. I noticed that I since I decided to take a break from "zZine Magazine":http:www.zzine.org I more or less stopped writing - and started _baking_ again with "CakePHP":http://www.cakephp.org/. As a result I finally recoded this website and _refreshed_ a little bit my almost-rusty baking skills. + +!<http://base--/img/pictures/cakephp.png! + +Why not taking advantage of this and write more about CakePHP then? After all, my last "article":http://base--/articles/view/cakephp/ turned out well enough and some people even bookmarked it online on del.icio.us and ma.gnolia... Now it's a bit out of date, I must admit: it was based on a pre-beta release of the framework, and we're (more or less) stable now. +A lot of things changed in the Bakers Community since then! At the time the "wiki":http://wiki.cakephp.org/ barely started and there was no "manual":http://manual.cakephp.org/ whatsoever, only my long and perhaps _slightly_ boring article describing Cake'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 IRC (#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 _the last_ so far to start a blog :/ Oh well, nobody's perfect! + +The first site I came across - although not a blog really - is Graham Bird's "Cake for Beginners":http://grahambird.co.uk/cake/. When someone asks me some basic questions about CakePHP I send him there because first of all they'll find a short FAQ about the framework, i.e. something everybody should know before even start thinking about learning Cake. Similarly, the guy has a "Glossary":http://grahambird.co.uk/cake/glossary/ in progress to help those souls who feel lost in Cake's terminology. If you don't consider yourself a total beginner anymore, the "Tutorials":http://grahambird.co.uk/cake/tutorials/ section can be a very interesting read: I wanted to add some AJAX bits to my site, but the documentation about this seemed pretty scarce, so I headed to the "Ajax Task List":http://grahambird.co.uk/cake/tutorials/ajax.php tutorial and it really helped. + +On the blogs front, on the other hand, "Cake Baker":http://cakebaker.42dh.com/ seems to be the most active: I'm starting to check this one often (OK, I'd better subscribe to the RSS feeds, perhaps) because it seems to be THE best place to get the latest news about everything concerning CakePHP: The author seems to post quite frequently (there's always a new post every 1-3 days maximum) includes short code snippets when necessary and report news when there's anything to report. + +"Sentino":http://sentino.wordpress.com/ is also an interesting place to learn new things about CakePHP: the only problem is that the author seems to post less frequently... the blog seems to have some sort of "milestone" schedule, publishing something when there'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. + +"RosSoft":http://rossoft.wordpress.com/ unlike the others mentioned up to now has a much more technical approach: no news about Cake or anything, just some REALLY useful real-world example of Cake helpers, components etc. etc., with FULL 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. +Among the most interesting fully working snippets: +"IP-to-country component":http://rossoft.wordpress.com/2006/03/29/ip-to-country-component-geo-location/ +"Poor man's cron component":http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/ +"Image Auth - CAPTCHA component":http://rossoft.wordpress.com/2006/03/16/image-auth-component/ + +!>http://xcite-online.de/spliceit/themes/SpliceIt/logo.png! + +"ThinkingPHP":http://www.thinkingphp.org/ is another "technical" Cake blog, with interesting code snippets and thoughts about our favourite PHP framework. For those who don't know or don't remember him (yes, like me...), he's the author of "SpliceIt!":http://xcite-online.de/spliceit/... what? + +bq. SpliceIt!'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: + - User/Right Managment + - Theming Support + - i18n + - Url Aliasing + - and most notabily: Modularization of often used Code Segments + +i.e. something I should have checked before recoding this website. I'll definitely keep this in mind for the next release of h3rald.com. + +!<http://rdos.rd11.com/img/rd11/rdlogo.gif! + +"Posts@ rd11":http://rd11.com/posts a.k.a. gwoo [and seth]'s blog. Moment of silence. Gwoo is CakePHP'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 :) +What can I write about him. It's difficult. I'll avoid all possible pseudo-religious comparisons but when I say that _he created CakePHP_ 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 "CakeForge":https://cakeforge.org/projects/rdos. I personally think that looking at his sample applications can be one of the best way to learn how to bake _properly_, and yes, I *did* check them out before coding this site for the second time. Demos are "online":http://rdos.rd11.com/. + +That'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'd better stop writing now, because this is a rather long blog post. Sorry. I'm new to blogging and I just can't help myself: especially with Cake, I need to write lenghty texts! +More to come...
A content/articles/12.textile

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

+----- +permalink: "12" +title: Choosing the right IT job +tags: [] + +type: article +filter_pre: textile +----- +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, _your_ laptop could explode and I could knock at your door in a few minutes asking for money, imagine that! +Nothing of the above, alright, bad joke, but sooner or later the time to _start doing something_ comes, at some point you ought to start making some real money. It's time to settle down, my fiance&eacute; are eager to get our own independence, move to our new house (which we're still doing up) etc. etc. Fair enough. I spent the last five months wasting my time looking for a job, a _proper_ job having something to do with IT(Information Technology) and finally something seems to be possible. + +_Either nothing or everything_ - I may even say that: now I have to face a difficult choice between two job proposals that seem both fairly interesting. +_"Go wherever you can get more bucks, you nutter!"_ - Well, there's more to it. +Let's examine now the two similar but yet different realities I have to choose from. Maybe you'll never be in my situation, but I hope this can help at least those who experienced or could experience something similar someday. + +_*Working under Uncle Bill's wing*_ +!>http://base--/img/pictures/genova.jpg! Not Microsoft. No, not directly at any rate. I'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... Not quite, but let's just say that this image contributes to give an idea of a Corporate-type reality. + +_Preliminaries_ +I happen to be an Italian whose English skills go a bit beyond the _"Hello, me Italian and like to do friendship with you"_, I applied in the above (un)mentioned company as _Software Tester_ and got contacted twenty days afterwards about a possible position as _Technical Writer_. It makes perfect sense. Well, at any rate I was pleased and I went to the pre-selection which was something like a pre-GCSE English test with a bunch of "technical" questions ("What does HTTP mean?"...). +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. +I went there and came back a few hours ago, and I think it wasn't too bad, let's say I may stand good chances but as normally happens in such companies in the end it was just something like _Thank you for coming, we'll call you by the end of April_. Although I mentioned that I recently had some other job offer obviously they couldn'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's fair enough. + +_The job_ +In the remote eventuality they decide to take me on board, I'd be part of a Documentation Team in charge of writing technical documents, manuals and silly jokes - perhaps - about some semi-classified huge internal semi-intelligent corporate framework. +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 - it may sound weird - a true relief for me. +At the interview I had a chance to talk about my "articles":http://base--/articles/ and they seemed interested in this activity of mine... I even mentioned my "CakePHP article":http://base--/articles/view/cakephp/ and they say they're gonna check it out. Oh well, this site's stats are always one Firefox tab away from my current main browsing tab, so you can bet I'll be tracking that. + +_The contract and the salary_ +_Classified_. They didn'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! +Salary... well, it shouldn't be too bad, anyway. + +_PROs_ + +* I'll be doing something I really enjoy: writing in English +* Steady job, steady contract, more security +* Corporare Environment +* I can show off with my friends who are still studying pointless stuff and tell them I'm working for <company name removed> + +_CONs_ + +* There's a risk I'll lose my individuality +* The salary could be lower than expected - at least initially +* They'll get back to me at the end of this month, and I have to give an answer to someone else before that +* My friends and fiance&eacute; will probably hassle me to give them free goodies they think I'll get from the company + + +_*Working in a 'cool place', and fly high*_ +!>http://base--/img/pictures/lambruschini.jpg! Nope, sorry, the "Cake Software Foundation":http://www.cakefoundation.org/ 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 _might_ 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's national channels, good ol' pal Berlusconi's channels, Sky Italy and (drums) MTV. +Cool, innit? What do they do? Well, interaction between mobile phones and TV through software and networks. Polls, SMS chat services, WAP application downloads, "take matey out of Big Brother's house", SMS/MMS blind dates related to some well known TV programs, tele-voting at Sanremo Festival etc. etc. + +_Preliminaries_ +Their first interview was the most unusual I've ever had, and I "already wrote":http://base--/blog/view/9/ 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's financial side, which is always a plus. +By the way, they already offered me the job, and I'll have to give an answer next Tuesday - that's the bad part. + +_The Job_ +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... +It would be a good experience, and other people would choose this immediately over anything else. Coding what? Parsing algorythms for the SMS we receive, data manipulation, storage, re-formatting etc. etc. +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!). +This could sound boring/annoying/scary but since I'm a freak I think it's an interesting prospective. Perhaps not as qualifying as being a Java Developer, perhaps not. + +_The contract and the salary_ +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-VAT to renewable yearly projects, which is probably what I'd go for. Contributions/taxes paid, kind of, holidays and other vacancies included, kind of. + +_PROs_ + +* Perhaps better salary +* I know exactly what they offer, they told me their offer in detail +* Chilled out environment +* Perhaps I can sneak and read my desperate friends' SMS when they try to pull birds + +_CONs_ + +* Less steady contract, less security +* I'll hardly ever use my English skills, perhaps +* They NEED a yes or no by next tuesday +* My friends will probably hassle me to spy on other people's SMS traffic and/or make them win TV contests + +Here's where I stand. I can't complain, alright, but I must choose and act carefully. I'll sleep on it.
A content/articles/13.textile

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

+----- +permalink: "13" +title: Baking a new CakeArticle +tags: +- cakephp +- writing +type: article +filter_pre: textile +----- +Too right. Enough being a lazy writer, it'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'd like to write something _proper_ and new. Judging by the latest stats people come here hoping to find either a blog _entirely_ devoted to CakePHP or some CakePHP related content. Well, actually they can "find":http://base--/tags/CakePHP/ quite a bit, but I'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 _latest addition_ 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. + +!<http://base--/img/pictures/baking_bear.png! + +Without further ado, I hereby announce that _I am working on some new articles on CakePHP_, at least one. I'd like to write something technical about CakePHP's advanced features, because that's where the current documentation is lacking, at the moment: associations, caching, some advanced components... they are topics which seem to interest those bakers who already baked their first cake and are now looking for some more icing. + +Interested? Good! Sadly, that's not what I'm going to write now, at least not the first article I'll be releasing. Please stop calling me names, there's no need to say that I'm just a lazy coward who doesn't want to get his hands dirty and write some tough stuff. And stop pulling those sad faces! Think about... new bakers. There are new people learning about Cake and I know there are, I just discovered "one":http://www.480x.com/2006/04/12/eureka/ yesterday almost by chance: he seems to be really enthusiastic about Cake, judging by his "latest post":http://www.480x.com/2006/04/13/eureka-part-deux/ (OK, nevermind the pic). +Those people are mostly more-or-less experienced PHP 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 PHP Design and Well-structured Programming upon our messy spaghetti code! + +I almost considered writing a humorous article about Cake, but luckily I changed my mind. My old "CakePHP article":http://base--/articles/view/cakephp/ is already a few months old and was written when Cake was in pre-beta. I feel it'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. + +Baking lessons. Yes, that's it. I'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 OOP(Object Oriented Programming) and MVC(Model-View-Controller), and perhaps more difficult for others: at any rate, I'll try my best.
A content/articles/14.textile

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

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

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

+----- +permalink: "15" +title: I18n +tags: +- cakephp +- web-development +type: article +filter_pre: textile +----- +_"CakePHP will officially support Internationalization (i18n) from version 2.0"_. That is to say: not right now. That doesn't mean we have to wait, no chance! I'm Italian and there are plenty of bakers speaking a language other than English who might want to develop a multi-lingual website. + +I did, "once":http://v60.h3rald.com/, and the final result wasn'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'd like to mention an excellent CakePHP package which allows basic (mostly statuc) i18n. +It looks like I missed an important baker in my recent "blog post":http://base--/blog/view/11: "Andy Dawson":http://www.noswad.me.uk/, creator - among other things - of the "Locale Package":http://cakeforge.org/snippet/detail.php?type=package&id=2, available at CakeForge. His solution actually came out after H3RALD.com v60 was already developed so I didn't use it for my own site. +At a first glance Andy's solution truly solves basic l18n problems in an elegant way: the most important code snippet is the "Locale Component":http://cakeforge.org/snippet/download.php?type=snippet&id=74 which provides the following functionalities: + +* automatic language detection based on browser's UserAgent string +* loading of locale files +* setting of customizeable (translated) messages + +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 @cake/basics.php@ (yes, this is a small core hack). Andy's double underscore function can take five parameters: + +bc. function __($msgId, $MessageArgs=NULL, $capitalize=1, $punctuate=0,$Code=NULL) +{ + require_once(COMPONENTS.'locale.php'); + $Locale = LocaleComponent::getInstance(); + return $Locale->getString( $msgId, $MessageArgs, $capitalize, $punctuate, $Code ); +} + + +These parameters are: + +* a "message id" or the message itself +* some parameters which can be passed to the message +* the message's capitalization: +** 0 = no change +** 1 = first letter of first word +** 2 = fist character of all words +* the message's punctuation: +** 0 = "" +** 1 = . +** 2 = ! +** 3 = ? +* the language code, if you need to override your page's language + +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 @app/controllers/components/messages/@ and look like this: + +bc. $messages = Array ( + 'LocaleSetTo'=>"Site locale set to UK English", + 'LocaleChangeTo'=>"Change site locale to UK English", + // Time related messages + 'ago' => "%s ago", + 'ages' => "a long time ago (%s)", +) + + +The locale package also comes with a _Language Controller_ you can use to handle language changes, and a useful rewrite of the _Time Helper_. Andy recently updated his "i18n tutorial":http://wiki.cakephp.org/tutorials:i18n 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 "Blog Tutorial":http://wiki.cakephp.org/tutorials:blog_tutorial_-_1). + +So far so good. The Locale Package provide some basic multi-lingual support in an efficient way, and I'd certainly use it if I decide to (re-)develop a multi-lingual site, but unfortunately this does not fully solve the problem. +If you want *full* i18n, for sure you'd like to have all the contents of your website translated, which is - normally - 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. +Since I only had plans to develop a _dual_ language site, I opted for a very lazy (but yet effective) solution: each table - more or less - had "duplicate" fields, something like this: + +* id +* title_en +* title_it +* text_en +* text_it +* created +* modified + +I basically defined a global $lang variable set to "en" by default and then I accessed the record's fields (for example in views) like this: + +@echo $data['Project']['text_'.$lang]@ + +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 _all_ the fields of a table and therefore modify all the fields of a project without switching to the other language. + +How will Cake support locales? Will we have "localized" database tables (and models?) Only time will tell...
A content/articles/16.textile

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

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

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

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

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

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

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

+----- +permalink: "19" +title: (Almost) working at Siemens +tags: [] + +type: article +filter_pre: textile +----- +In a recent "blog post":http://www.h3rald.com/blog/view/12/ I was evaluating two job proposals which I was offered, one involving a multi-national company and the other a regional/national but apparently successful IT business. +Actually only yesterday I got an official offer from the multi-national company, to be precise, and after evaluating my future possibilities (it took approx 0.03s) I decided to accept this one. To be precise I didn't _officially_ tell them I'd like to start working with them, and I took a few days to "think about it", only because of the damn weekend in between. +!<http://base--/img/pictures/siemens.gif! In reality, on Monday morning I'll call my new boss immediately and tell her to start preparing all the paperwork necessary to take me on board! + +So it turns out I'll be working at "Siemens":http://www.siemens.com/index.jsp as Technical Writer! + +So much for my friends _still_ taking another two years at Uni to get a crappy Italian MA in Computer Engineering +So much for some of my professors looking at me like I was an idiot for not being able to _fully understand and respect_ their hopeless and pointless theoretical mathematical models. +So much for those who treated me like a fool for _quitting_ after getting my BA, after studying pointless rubbish (with a few exceptions) for three years +So much for those complete _wa**ers_ who tried to offer me a "job" from the highness of their crappy little firms paying me less than a dish washer. + +!>http://base--/img/pictures/framework.jpg! Bu**ocks to all of you! + +Enough boasting for now: sorry about that, I just needed it after _years_ of people taking the piss out of me for my life choices. + +Anyhow, here's why I decided to accept Siemens' job offer: + +* They'll take me on _permantly_ after a three months trial period. Note: in my country _permanent_ contracts are a forgotten dream nowadays, as people normally tend to be forced to change job more than once a year, in some cases. +* They're offering a decent pay. They started off like: _"We're sorry, but you just graduated... and you have no prior job experience... so we *have* to take you on with a salary which may not be great: 20,000 Euro/year, before tax"_. They were sorry. Hell, that makes 1140 Euro/month after tax, straight to my pocket! In the US or other countries it may not be considered a lot of money, but here it's different! Especially considering that the new, soon-to-be standard apprentice contracts pay less than 800 Euro/month for three years, or so I was offered... +* _"We have an authomatic way to raise the salaries of all our employees depending on Siemens financial growth: on average this can vary between 7.5% and 15% more every year, than there are personal bonuses and incentives, but of course I can't guarantee for them, it's entirely up to you"_ +* _"We're sorry, but we don't have the necessary infrastructure to offer meals to our employees: we can only offer you meal tickets"_. They're so sorry! Hell, my dad was never offered free meals at work, and neither meal tickets! He's terribly jealous of that now. +* _"Normally technical writers only work here, on the second floor of this building, but for time to time you might have to go to Germany or the US for one or two days"_ - I'm sure I won't complain +* _"We want motivated people who want to come here and work hard. In your case, if you like writing in English so much it's definitely a plus"_- Damn right! +* _"Holidays? Normally about 30 days/year, you build up 2.5 days every month"_ + +!<http://base--/img/pictures/simatic.jpg! Sounds like my dream job. It may be hell boring for some people who only like coding, but for me writing technical documentation _in English_ will very gratifying: they _pay me_ for writing, after I spent all these months writing for free! +That's what I'll be doing: writing advanced technical docs for a big corporate project. The name of the project is not classified, and you can download bruchures and even part of the documentation itself from "here":http://base--/bookmarks/view/simatic/ or "here":http://base--/bookmarks/view/simatic-it/. + +I guess I'll write more about my job when I actually start working...
A content/articles/20.textile

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

+----- +permalink: "20" +title: In memory of Vittorio Cevasco (1916-2006) +tags: +- personal +- family +type: article +filter_pre: textile +----- +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. + +I'd like to remember my grandpa today, because he most certainly deserves it, as he was a really extraordinary person. + +_"Yes, I'm sure he was, isn't everybody extraordinary in some way?"_ + +Definitely: everybody is special, and people tend to say that especially when someone passes away. In my grandpa's case, actually I can say that in a slightly more absolute sense: his life was truly uncommon and very active. + +*A very active life* + +!<http://base--/img/pictures/grandpa.jpg! + +Vittorio Cevasco, my grandfather, was certainly the most active member of my family. We'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... 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 - he still used to cultivate the land with potatoes, tomatoes and basil as a hobby until a few months ago - and so on: he was really a busy man. +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. + +When he was "young" (i.e. less than 80) he used to _compete_ 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 _biological_ products like that extraordinary basil essential to make our very tasty local "pesto sauce":http://www.pesto.net/eng/index.php. +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't too keen on the idea of cultivating and maintain our land from time to time... but I kind of changed my mind recently, and I know he realized that just a few days before he died. + +After WWII he did various things, he even was erhm... somehow active in _certain international import/export activities_ of watches from Switzerland to Italy - quite a common thing back in the day, especially considering that the border was at just a few hours drive. +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 - 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. + +But no, these are not the most extraordinary episodes of his life of course. He could fly - literally. + +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. + +*The Aviator* + +!<http://base--/img/pictures/sessarego.jpg! + +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 "Giuseppe Garibaldi":http://www.italian-american.com/garib-it.htm's expedition at Marsala (1860) fighting for the Italian independence (he's listed among "the ones":http://www.italian-american.com/garibal.htm who actually landed there). +There his parents used to have a few cows and produce milk, and one of his tasks was milking delivery... 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 _on foot_, and I'm talking about 1-2 Km with at least 30-40 kilos on your shoulders! + +But my grandpa's plans were much different: he wanted to fly away, and high - 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. +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't exactly rich. In the very end, my father supported him and provided as much money as he could afford: 1000 Lire. +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'd have paid them back once he started working: it was clear in fact that he'd have became a military pilot, as the Regime needed people for their brand new aircrafts, and the was felt imminent. +He paid them back, eventually, after passing both the civil and military tests. He became a sergeant for the _Regia Aviazione_ (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. + +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 _all the exact dates_, 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: _"Yes... well, he was talking a few hours ago, but I don't know if he was raving or what... he said he was a pilot, and that he used to fly at 350Km/h..."_ + +!>http://base--/img/pictures/r2002-main.jpg! + +Damn right. His old "Re 2002":http://www.comandosupremo.com/Re2002.html 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 _his_ plane, and he never forgot that, even a few days before he passed away. He'd tell you all the stats, the mechanics, the technical details and all the tricks to perform acrobatic maneuvers if you asked him... Not that actually anybody ever did, because _every_ time something reminded him of that, even slightly, he'd start talking about the old days when he was commanding his squad patrolling the Italian borders. + +Last year, after my grandma died and he didn't feel like driving 500Km to go to the mountains (for the first time in his life), I had to drive his _Fiesta_ myself in my first long driving journey. At first I wasn't too sure I'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... + +That fear went away almost instantly right a few minutes after we started the journey. +When we got on the motorway, I started complaining that my dad was going slightly over the limit with his brand new Peugeot 307: _"Look, he's already going at 140km/h and we just started the journey!"_ + +_"Cent&ucirc;c&auml;ranta chilumetri l'&ucirc;a... &ucirc; m&euml; aeruplannu p&ucirc;eiv&auml; f&acirc; &iuml; trex&euml;ntusinc&ucirc;anta c&ucirc;mme ninte!"_ +[140 kilometers per hour... my plane could easily do 350!] + +He normally used to speak in _zeneise_ ("Genovese"), Genoa's dialect, mixed with some Italian _if he really had to_. That was it: if you started talking about speed, technology, engines, history or any other topic which was _slightly_ related to his plane, the war, the regime etc. he always started off talking about his past and his plane, ignoring everything else. +My grandma used to get kinda annoyed about it... on every occasion, if he had a chance, he'd start talking about _that particular day in 193x/4x_ 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... + +!<http://base--/img/pictures/Re2002.jpg! + +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: _"&euml; s&ouml;lite c&ouml;se che s&euml; d&ucirc;vi&euml;iva f&auml; in t'&euml; l'avi&auml;si&ucirc;n"_ [the usual things you had to do in the airforce]. +He was just starting practicing the Re 2002 at the time, but he quickly found out that it was _extremely_ maneuvrable, at least to the standards of the time: the equivalent of a top range today's fighter. +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... 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... 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: _"He'll crash, he'll crash!"_ +He did not crash, not that day... he went down up to slightly less than 100m and _then_ pulled up the plane: ar real wonderful _extreme_ 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 _pull up suddenly_ right above your head: one more second and he wouldn't have been able to tell that story. +He was called by the commander of the base who told him: _"Cevasco, you'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"_ - That, I reckon, was one of the best days of my grandpa's life. + +He was never captured, but his plane was taken down by an English _Spitfire_ 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 "landing" completely destroying his plane along as part of his jaw, which was alright after a few months. +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. + +A few years ago my dad showed him Microsoft's _"Flight Simulator 98"_, and some other flying games. He was amazed at the graphic, but not so satisfied with the whole _simulation_ thing: not even close to reality, too damn easy. + +_"C&auml;u m&euml;, te v&ucirc;eive vedde t&iuml;e a f&auml; v&ucirc;l&aacute; &ucirc; m&euml; aeruplannu"_ +[My dear, I'd have liked to see you trying to fly _my_ plane] + +...and that was it: the beginning of another journey back in time. + +He always had a very practical view of life and especially of technology. He wouldn't take you seriously and would not be interested in knowing about programming and the Internet, unless it could produce some concrete result: + +_"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'&euml; a banca e piggi&euml; qualche mili&ucirc;n the Euro?"_ +[You that you're studying to become an engineer and that spend so long in front of the computer, couldn't you find a way to get into a bank and get out some million of Euro?] + +He'd have loved me to become a [rich] hacker, probably... But the last time I saw him, last Friday, he seemed happy enough to hear that I was just about to start working. + +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... He made a big effort to move the muscles of his mouth in a large smile: he was happy.
A content/articles/21.textile

@@ -0,0 +1,123 @@

+----- +permalink: "21" +title: Birthday present? Web space, please... +tags: +- website +- hosting +- review +type: article +filter_pre: textile +----- +Today is my birthday! "Not too happy":http://base--/blog/view/20/, 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... _"What? Didn't you have the hosting sorted out?"_ +Well, I had, up to a few days ago when my friends and hosting provider, DeWayne Lehman, decided to close down his "company":http://www.block-house.com. The reason being, to cut a long story short, that he can't keep up with competition: he doesn't have enough customers, and he can't afford server upgrades, while other companies are literally giving space away. +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. + +Anyhow, in the end I'll have to transfer all five of my sites to a new host, so here we go again: _what's the best hosting company?_ +Obviously it depends a lot on what you're looking for, and here's what I need: + +* At least 4GB of space +* At least 30GB/month bandwidth +* PHP of course, but also other languages like Perl, Python and Ruby (+ Rails support) +* MySQL databases... at least 10-20 +* Be able to host 5-6 sites minimum +* Subdomains allowed (10 in total?) +* FTP _and SSH_ access +* Subversion, if possible + +All this for less than 10$/month, ideally 5$, on shared hosting. I already made my choice and if you're reading this post it means everything worked fine, but anyway, let'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. + +!<http://base--/img/pictures/dreamhost.gif! + +The first hosting company I was tempted by was "DreamHost":http://www.dreamhost.com. They can literally sell you anything but their mother, at stupidly cheap rates for what you get (apparently): + +* 20GB of space +* 1TB (!) bandwidth +* PHP4, PHP5 Perl, Python and Ruby + RoR support +* Unlimited databases +* Unlimited hosted domains +* Unlimited hosted subdomains +* FTP and SSH access +* Subversion and CVS +* ...and more + +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's coupons available on the net. OK, where's the catch? Well, there's a "bad review":http://futurosity.com/231/why-dreamhost-sucks about them which points out that their reliability is not too great, for example, and that the seem to be rather dodgy in general. "They are overselling, they'll soon enforce CPU restrictions" etc. etc. +_...let's move along_ + +!>http://base--/img/pictures/rails.gif! + +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 "RailsPlayground":http://www.railsplayground.org, which started off as FREE Rails host and then ended up offering interesting commercial hosting plans. They are not bad, and I'd have probably gone with them if I had only one site to manage: for 60$ a year you get: + +* 3GB of space +* 30GB bandwidth +* PHP4, PHP5 Perl, Python and Ruby + RoR support +* Unlimited databases +* Unlimited add-on domains +* Unlimited hosted subdomains +* FTP and SSH access +* Subversion and CVS +* ...and more + +Well, the only reason why I didn'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. + +!<http://base--/img/pictures/textdrive.gif! + +Since we're talking about Rails, why not "Textdrive":http://www.textdrive.com? Founded by 200 IT professional, hosts high quality sites, it's the official Rails host... An "elite" solution, here's what you get: + +* Use Apache and Lighttpd web servers side-by-side +* Host PHP4 and PHP5 web pages and applications +* Host a weblog using Textpattern, Wordpress, MovableType, Typo, etc +* Host Ruby and Ruby on Rails applications (including FCGI and hundreds of gems) +* Host Perl applications (including 100's of Perl modules) +* Host Python applications like Django +* Manage your code base with version control (Subversion, SVK, Darcs, Monotone & Arch) +* Share iCal files over WebDAV +* Mount a WebDAV drive on your desktop (like iDisk) +* Easily create free subdomains with wildcard DNS +* Store your Basecamp file uploads over SFTP +* Access your account via SFTP and SSH +* Add domains, unlimited IMAP and POP mail boxes and mail aliases through a control panel +* Check your email through Webmail +* Host Mailman mailing lists complete with archives +* Use MySQL (default), PostgreSQL, SQLite and Berkeley databases + +Plans start at 12$/month for 1GB of space and one website... The 3GB one is 40$/month, for 20 sites in total. Too bad it's too expensive for me as they are truly the top for shared hosting - I think. + + +"Host Gator":http://www.hostgator.com/, which seems to be one of the most frequently recommended at SitePoint.com forums, is not bad either. They have a "hatchling" plan for 3,5GB at 6.95, which wasn't bad, but it only allows one domain to be hosted. The "Baby" plan allows unlimited domains and is 9.95$/month, which is kinda dear. You get: + +* 5GB of space +* 75GB bandwidth +* PHP4, PHP5 Perl and Python +* Unlimited databases +* Unlimited add-on domains +* Unlimited hosted subdomains +* FTP access +* ...and more + +No SSH, no SVN and no Rails: out. + +"Site5":http://www.site5.com/ is also one of SitePoint's favourite, but still has limitations on the number of sites. I would have got the SuperHosting XTREME, for 7,77$/month: + +* 11GB of space +* 400GB bandwidth +* PHP4, PHP5 Perl, Python, Ruby + RoR support +* Unlimited databases +* 5 domains hosted +* Unlimited hosted subdomains +* FTP and SSH access +* ...and more + + Not bad, a little bit too much for only 5 sites... 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> This site is currently hosted on "BlueHost":http://www.bluehost.com, a hosting company established in 1996, which seems to be reliable enough (not many complaints on the net) and seems serious enough. They don't offer subversion and WebDAV for "security reasons" 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't allow just anybody to get SSH access unconditionally, and I didn'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's what I got: + +* 15GB of space +* 400GB bandwidth +* PHP4, PHP5 Perl, Python, Ruby + RoR support +* 20 MySQL databases + 10 PostgreSQL databases +* 6 domains hosted in one account (easier for me!) +* 20 subdomains + 20 parked domains +* FTP and SSH access +* ...and more + +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... let's hope for the best, so far, so good.
A content/articles/22.textile

@@ -0,0 +1,136 @@

+----- +permalink: "22" +title: Ten minutes on Rails (while eating Cake) +tags: +- cakephp +- rails +- web-development +type: article +filter_pre: textile +----- +Today I decided to do something different, something I've been dying to do since before coming across CakePHP: give Rails a _proper_ try. Like many other PHP developers out there, when "Ruby on Rails":http://www.rubyonrails.org came out I felt damn jealous and terribly tempted to learn Ruby _only_ 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. + +!<http://base--/img/pictures/rails.gif! + +One of the main problems which made me - sadly - abandon Rails was Ruby itself: personally I've never seen a programming language with a cleaner and more elegant syntax, but also - at least at the time - there weren't many hosts supporting it. LuckilyI found CakePHP quickly after that... +Now however, more and more hosting companies boast full Rails support, and so when recently I "had to move":http://base--/blog/view/21/ to a new host, I made sure it was Rails-friendly, _just in case I wanted to give Rails another try, someday_. +Oh well, the temptation was so strong that today, only a two days after switching to my new host, I felt I _had_ to try it, I _had_ to taste something different than the usual Cake. + +I decided to (re-)read and follow the "OnLamp tutorial":http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html about RoR, step by step, once again. I quickly typed @rails cookbook@ from my shell and voil&aacute;, rails silently creates the skeleton of my application: + +README +Rakefile +app/ +components/ +config/ +db/ +doc/ +favicon.ico +index.html +lib/ +log/ +public/ +script/ +structure.txt +test/ +tmp/ +vendor/ + +That's familiar: it's very similar to what CakePHP's directory structure used to look like. Now Cake _evolved_ and adopted its own schema, which - I must say - seems more functional than RoR's, at least at a first glance: + +* app/ +** config/ +** controllers/ +** models/ +** plugins/ +** tmp/ +** vendors/ +** views/ +** webroot/ +* cake/ +** config/ +** docs/ +** libs/ +* vendors/ + +!>http://base--/img/pictures/cakephp.png! + +Cake felt the necessity to divide what you can mess with (@app/@, @vendors/@) from what you'd better not touch (@cake/@). Rails just left everything on the same level. + +After creating my database and the necessary tables I have to edit @config/database.yml@, which corresponds to Cake's @app/config/database.php@. 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's files, i.e. executing @ruby script/generate controller Recipe@ creates the controller and other bits: + +bc. 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 + + +And so on. Anyhow... I followed the tutorial and yes, it was a nice read. CakePHP borrowed a lot from Rails but not everything. Inevitably Ruby's syntax is less verbose and looks very very clean: + +<pre><code> +class RecipeController < ApplicationController + scaffold :recipe + + def list + @recipes = Recipe.find_all + end + + def edit + @recipe = Recipe.find(@params["id"]) + @categories = Category.find_all + end +end +</code></pre> + +While CakePHP's, simply because it uses PHP and not Ruby, looks less pretty: + +<pre><code> +class RecipesController extends AppController +{ + var $scaffold; + + function list() + { + $this->set('recipes', $this->Recipe->findAll()); + } + + function edit($id) + { + $this->set('recipe', $this->Recipe->find("id = $id")); + $this->set('categories', $this->Category->findAll()); + } + +} +</code></pre> + +CakePHP Development Team did a great job translating some of Rails functionalities into PHP, and the while CakePHP's syntax is *much* cleaner if compared to PHP's standard spaghetti-code approach, Ruby just looks much more clear, sorry. _Imagine a world without funny unnecessary brackets, pointless semicolons and where everything just looks better_: that's Ruby. + +Sigh. Now I do understand why Rails was built in Ruby and not in PHP: simply because a PHP's Rails would have been outscored by its "Ruby port"! + +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's edit method doesn't, or better, it does but not as expected: when you remove @var $scaffold@ 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't define the custom ones. + +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: + +<pre><code> +NoMethodError in Recipe#index + +Showing app/views/recipe/index.rhtml where line #18 raised: + +You have a nil object when you didn't expect it! +The error occured while evaluating nil.name + +Extracted source (around line #18): + +15: <% @recipes.each do |recipe| %> +16: <tr> +17: <td><%= link_to recipe.title, :action => "show", :id => recipe.id %></td> +18: <td><%= recipe.category.name %></td> +19: <td><%= recipe.date %></td> +20: </tr> +21: <% end %> +</code></pre> + +I took a screenshot of the page, because it was too nice: "check it out":http://base--/img/pictures/rails_error.jpg. This error page really tells you what'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... Can we have this in CakePHP please? I actually started to develop something like this, but seemed quite hard to do in PHP.
A content/articles/23.textile

@@ -0,0 +1,80 @@

+----- +permalink: "23" +title: A look at Symfony +tags: [] + +type: article +filter_pre: textile +----- +CakePHP is THE perfect PHP framework, so _we_ don't need anything else. Oh well, no. I personally love CakePHP, but I do believe other PHP frameworks can be interesting and maybe even useful, so today I thought I'd have a look at the "Simfony Project":http://base--/bookmarks/view/simfony/. 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's more advanced, others said something like _"qcodo sucks.. cake stinks.. symfony rocks!!!!!"_, so it OUGHT TO be pretty cool, definitely. + +!<http://base--/img/pictures/symfony.gif! _Know thy enemy_ someone said (OK, bad joke), so let's have a look at this interesting alternative to CakePHP. _No dude, not another MVC-like, pseudo-Rails, AJAX-worshipping framework!_ Yes, another one. Actually Symfony is more than that: while people _can_ say CakePHP is similar to RoR for some features and for the strong MVC architecture, Symfony chose another road. Yes, MVC is still there, but the first thing I noticed after reading their "beginners' tutorial":http://www.symfony-project.com/tutorial/my_first_project.html was that one of the things which Symfony seems to use quite regularly (and Cake doesn't)is code generators. Things like executing @symfony propel-build-sql@ or even @symfony propel-generate-crud frontend post Post@ from command line to generate your code automagically, which CakePHP - except for our little _bake_ script - doesn't use. +_See? Simfony is MUCH better and MUCH more advanced than Cake!_ No, hang on a minute... I just listed one thing which Symfony has more than Cake, is there any more? Yes, there is, for now: i18n - internationalization. Symfony comes with native multi-lingual support and Cake doesn't - yet - although there are rumors that i18n for Cake 2.0 is _almost done_. This is not speculation, re-read the sentence: First off I'm referring to Cake _2.0_ (which means it will take a while) and also I read it in the "Cake 2.0 ToDo List":https://trac.cakephp.org/wiki/Proposals/2.0ToDoList. + +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 "this":http://www.h3rald.com/ and tell me if the developer is not a complete and hopeless idiot when it comes to design and look 'n' feel! +I do agree that some CakePHP sites (mine, mainly) don'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's, but I do hope that the old "design contest" doesn't get forgotten... + +!>http://base--/img/pictures/askeet.gif! 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 _all in one_. I'm referring to "Askeet":http://base--/bookmarks/view/askeet/, a Symfony-powered website which has been built from scratch using the framework and its development is well documented in "twenty-four tutorials":http://www.symfony-project.com/askeet. In one move these guys made an interesting website, some useful documentation and self promotion... what can I say: for next Christmas we'd better chain PHPnut, gwoo, nate & the others to their chairs, close them in a small room and force them to code something like that in twenty-four days. +If I were to mention something which Symfony did well I'd certainly say the "documentation":http://www.symfony-project.com/content/documentation.html. Screencasts, tutorials, advent calendars, a book, a wiki, API etc. etc. All done, and all good, I must admit that. The good news is that CakePHP is slowly catching up, and now the "manual":http://manual.cakephp.org looks pretty decent. + +OK, enough flattering and let's talk about something I didn't like about Symfony. I downloaded the thing and it turns out it's 1.2MB in size, _a hell of a framework!_ After extracting the beast I had a look inside and found three directories: @data@, @lib@ and @bin@. Not bad. I opened @bin@ and found the three magic symfony scripts, alright; I opened @data@ and found nine directories, I opened @lib@ (the real deal) and found 25 directories! These guys maybe never heard of something called _"an organized directory structure"_, or perhaps I'm just too used to Cake's logic and essentiality. +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... Weeeeheee! +The good thing is that Symfony seems to include pretty much everything you'd ever need, the bad thing is that _personally_ 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't include prototype by default, but then I realized that if they started include _everything_ you _might_ need _someday_ we'd end up like... like Symfony, with 1.2MB of stuff 500KB of which - at least - will most likely not be of any use for the average developers. + +The other dangerous consequence of including more and more stuff is the so called _widget-temptation_: If you include script.aculo.us you MUST show off and offer some weird toy someone _may_ use... 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'm sure the "admin generator":http://www.symfony-project.com/content/book/page/generator.html can be damn handy, but what happens if I'm a terribly annoying guy who'd like to tweak it and change it so that it fits _my_ needs? In Cake... well, there's nothing "official" 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's all up to the developers and their needs: personally think that widgets are useful, but some times people like a bit more flexibility. + +So the overall impression of Symfony is that - regardless its arguable, self-proclaimed, _enterprise-ready_ status - it is rather complex, with a steep(er) learning scheme which doesn't justify the extra features. + +From the "My first Symfony project":http://www.symfony-project.com/tutorial/my_first_project.html tutorial: + +bq. 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: +<small> +<pre><code> +<?xml version="1.0" encoding="UTF-8"?> +<database name="propel" defaultIdMethod="native" noxsd="true"> + <table name="weblog_post" phpName="Post"> + <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" /> + <column name="title" type="varchar" size="255" /> + <column name="excerpt" type="longvarchar" /> + <column name="body" type="longvarchar" /> + <column name="created_at" type="timestamp" /> + </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> +</code></pre> +</small> +This code is longer to read than to explain: It describes two tables Post and Comment. + +NO! Sorry, no. This is NOT simple. It is logic, clear and makes perfect sense, it's not that I'm retarded and I can't write or read XML files, it's just unnecessary. You create this and then call the slave-script to create the model and the corresponding database table... This is exactly the _enterprise_ way of doing things CakePHP made me forget. _Convention over configuration_. Not hundreds of configuration files. + +But there's more: you can even configure your views with some simple @.yml@ (!) file: +<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> + +Sure, it's good. It helps, and it's certainly useful, but I'd rather code a custom component to do the same thing with a few arrays. Again, this is arguable. +Validation is done through .yml files, and you can configure your administrator backend through a .yml file too! Cake has .ini-based ACL, and that's about it: if I don't want to use them I don't use them. +Clearly you probably don't have to edit all settings in the configuration files, but I just don't like the approach, personally. + +Oddly enough, Symfony's slogan seems to be "professional web tools for lazy folks"... + +It all depends on what you need. For _my_ needs I chose CakePHP, and "here's why":https://trac.cakephp.org/wiki/Cake/About.
A content/articles/24.textile

@@ -0,0 +1,60 @@

+----- +permalink: "24" +title: CakePHP 1.0 released +tags: +- cakephp +- web-development +type: article +filter_pre: textile +----- +As "Digg":http://digg.com/programming/CakePHP_1.0_has_been_released_ points out, the first _stable_ version of CakePHP was released, yesterday. I should have posted yesterday about it, and no, I didn't forget: I was just busy downloading the new version, have a look at the new site, talk to people etc. + +Anyhow, it's ready, just baked and smells damn good. Go get it if you didn't already, it's available at "the usual place":http://cakeforge.org/frs/?group_id=23, even this time you won'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 _before_ it went stable officially! + +!<http://base--/img/pictures/CakePHP_1.0.png! + +The CakePHP Team has been humble enough not to declare their product _stable_ before the time. I personally considered CakePHP stable _enough_ since RC2... 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's reliability. +Nothing (too) new came out the oven this time: CakePHP 1.0 is mainly a bugfix release, with all the features we've learnt to love. It's just _better_: a lot of things have been fixed, model associations work better, etc. etc. You can read the "changelog/announcement":http://cakeforge.org/frs/shownotes.php?group_id=23&release_id=85 or have a look below for a quick summary of the new features and most interesting fixes: + +<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> + +!>http://base--/img/pictures/cakesite.png! + +If you're not too excited about this new release, maybe you should have a look at "www.cakephp.org":http://www.cakephp.org. Different? Damn right it is: it looks like someone listened to our prayers for a new website design. The merciful soul is "Armando Sosa":http://www.nolimit-studio.com/, the winner of CakePHP's design contest. He's a latin-american web designer who had the GREAT idea of thinking about an _innovative_ design for the Cake site... Actually my dad didn't think that way: _"That's not new, that way of advertising was all over the place when I was a kid!"_ And he's right, Armando thought that a fifties-like template would have been perfect for Cake. Forget all the smooth, roundy-and-chubby, toons-like "official" Web 2.0 designs (beta), the new Cake site needs to stand out of the crowd... + +!<http://base--/img/pictures/fonz.jpg! + +<br /><br /> +_Heyyy! Well done guys..._
A content/articles/25.textile

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

+----- +permalink: "25" +title: Digg Effect - the day after +tags: +- digg +- web20 +- web development +- internet +type: article +filter_pre: textile +----- +...So it turns out that my "last article":http://www.h3rald.com/articles/view/rails-inspired-php-frameworks/ appeared on "Digg":http://www.digg.com homepage. +This was quite a pleasant surprise: I didn't expect that an article submitted to _my own site_ could make it that far! I thought you'd need a relatively well-known website, mafia'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'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. + +Two days ago I decided to write a roundup of the six Rails-inspired PHP frameworks, CakePHP, Symfony, PHP on Trax, Code Igniter, Biscuit and Pipeline. The reason for this was that I couldn't find anything comparing all of them and such comparison could have been useful for some new _bakers_. OK, I confess, when I started writing the article I thought I'd submit it to Digg and see what happens: I saw that another "roundup":http://www.phpit.net/article/ten-different-php-frameworks/ made it to the first page and people were quoting it everywhere on the net. It's a nice article, but - in my humble opinion - not too exhaustive. +Then I read a comment by someone to the "digg":http://digg.com/programming/CakePHP_1.0_has_been_released_ of the latest Cake release stating: + +bq. Yes, they are similar - both were inspired by Rails, but Cake has gone further to differentiate themselves. Here's a decent (but not great) overview of some frameworks: http://www.phpit.net/article/ten-different-php-frameworks/ + +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 "blog posts":http://www.h3rald.com/blog/view/23/ I tried to compare CakePHP and Symfony, but obviously my emotions got in the way and in the end I noticed I was kinda _attacking_ Symfony. That was a blog post though, and that's half-allowed, but I felt that I should have written a slightly more objective _article_ mentioning also all the other competitors. + +Anyhow, right when I went to submit my article to Digg, it turns out that another guy wrote "a similar round up":http://digg.com/programming/5_Next_Generation_PHP_Frameworks, which made it to Digg's homepage. That was an annoying cohincidence, but in the end things didn't go too bad: his roundup was more generic, while mine was more specific and detailed. + +!<http://base--/img/pictures/dugg_detail.png! + +After submitting my article the reaction wasn't instantaneous... 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! +I immediately noticed it when I refreshed my stats page: a minute before my girlfriend was here telling me "oh look, over 400 visitors... not too bad". Then I refreshed the page and it said _539_, I refreshed again and said 600-something... eeep... Digg effect! + +A special praise goes to my new hosting company, "BlueHost":http://www.bluehost.com/track/h3rald/CODE5: the server didn't go down and it managed the extra traffic fine! A good test for CakePHP as well, since I built this site with it. + +So here I am... 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 - except for the usual _Rails-is-better-than-anything-else_ comments - they were generally positive. Over 250 people bookmarked on del.icio.us and many blogs mentioned it in many different countries. + +Money? Didn't make much with adsense at all: programmers _don't_ click on ads! +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
A content/articles/26.textile

@@ -0,0 +1,131 @@

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

@@ -0,0 +1,62 @@

+----- +permalink: "27" +title: "rdBaker: Bake your CakePHP application online" +tags: +- cakephp +type: article +filter_pre: textile +----- +Right after my "last blog post":http://base--/blog/view/26 I decided to log on #cakephp on irc.freenode.org as usual, and gwoo pops in and says "h3raLd, you didn't review rdBaker yet!" +That's right, I didn't yet, so I may as well do it today. + +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. _"How about having an online baking utility?"_ - and that's precisely what rdBaker is, a more PHP-ish version of bake.php, which runs like any other PHP scripts: in your browser. + +This cute little thing is obviously available for free on "CakeForge":http://cakeforge.org/frs/?group_id=13&release_id=74 and is part of "gwoo":http://www.rd11.com 's "rdOpenSource":http://cakeforge.org/projects/rdos/ project which includes various other Cake-powered applications. +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 _a lot_ on how to code a CakePHP application or website properly. + +So anyway, get your copy of rdBaker, unzip it and have a look at the @README.txt@ file for the installation instructions: + +<quote> +1. Place rdBaker in the root along side /cake_install/app. +2. chmod /cake_install/rdBaker/tmp to 0777 +3. launch http://localhost/cake_install/rdBaker/ +</quote> + +Not too hard, innit? + +!http://base--/img/pictures/rdbaker.jpg! + +Good. So you try accessing something like @http://localhost/php/test/cakephp/cake_test/rdBaker/@ (that's on my own local WAMP server) and you'll get a nice page asking you to "supply your ingredients" via a simple form. +Unlike its command line cousin, rdBaker doesn't require you to fill in _all_ 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). +Then you can select the type of output and choose whether you want to generate an empty controller, a scaffolded one or the _full_ option including all the most common CRUD(Create, Retrieve, Update, Delete) methods. +Finally - if you like - you can enter any association or valitation rules for your model, then press the _Bake it!_ button and voil&aacute;, in you'll find three directories (controllers, models and views) in your save directory containing all the MVC(Model View Controller) entities you need regarding a particular model: + +<pre><code> + rdBaker Result Array +( + [0] => notes_controller.php created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpcontrollers + [1] => note.php created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpmodels + [2] => index.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [3] => add.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [4] => edit.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes + [5] => view.thtml created and written. Look in D:SERVERwwwphptestcakephpcake_testtmpviews/notes +) +</code></pre> + +But there's more! By checking the appropriate checkbox, you can get all the stuff packed in a zip file! + +Not bad at all, and fast as well. + +Now the bad things... +The script works fine, but there's something which could be improved, perhaps: + +* If you choose to put everything in a zip file, the file will be named "baked_by_rdBaker.zip" - not a big deal, but maybe it could be personalized according to the model name entered. +* Regardless you want to add validation rules to your model or not, you'll _always_ find some validation rules for a _title_ and _body_ field. I checked and they are hardcoded in the template file (rdBaker/views/helpers/templates/full/model.txt): +<pre><code> + var $validate = array( + 'title'=>VALID_NOT_EMPTY, + 'body'=>VALID_NOT_EMPTY); +</code></pre> +* In the baked index.thtml view, there will always be a column named "Title". This, again, is hardcoded in the template. + +Other than these things, everything seems to work fine. A really nice script!
A content/articles/28.textile

@@ -0,0 +1,23 @@

+----- +permalink: "28" +title: (Ready to start) working at Siemens +tags: [] + +type: article +filter_pre: textile +----- +I signed it yesterday, around 3PM. I gave "them":http://base--/bookmarks/view/siemens/ all the necessary documents and they presented me their contract to sign, I'll have to hand it in on Tuesday at 9AM, my first day at work. + +My new job! For the first time in my life (I'm still "young":http://base--/about/ , c'mon...) I'll start working 40 hours a week, all year, with paid holidays and meals and all the other stuff I was raving about in my last job-related "blog entry":http://base--/blog/view/19/ turns out to be true then: I'm in, I'll be working at "Siemens A&D":http://base--/bookmarks/view/siemens-automation-and-drives! + +!<http://base--/img/pictures/siemens/simatic-tech.jpg! They already set up a nice schedule for me and on Tuesday I'll start my two weeks preliminary training, then another week of training in the Documentation Dept. (where I'll be working) and then I'll start the real tough stuff. +The training period on the "corporate framework":http://base--/bookmarks/view/simatic will obviously be in English (thanks God for that, I wouldn't bare learning that stuff in Italian first), and then I'll start writing documentation on some new project in English as well: it looks like I'm gonna forget Italian totally :) +Nah, I'll still use my mother tongue on the phone to my parents or when I'll be visiting them. + +Scared? A bit. I'll still be writing stuff, nothing new there, but I believe that working for a big company may be a bit different than writing about what I want, whenever I want, wherever I want with my laptop... Nevertheless, it will be fun: it sounds like a dream job for me and I couldn't ask for more. Some may fear to lose their individuality, but I don't: I'm not that bothered honestly, and I still have this very individual website, at any rate! +Oh, by the way: by contract I cannot reveal any technical details of all the wonders and miracles I'll see in there, so don't even ask. So *everything on this site tagged with the "Siemens tag":http://base--/tags/show/siemens/ will never contain any corporate information or stuff which is not already available on the Internet publicly*. I wrote this in bold so that if any collegue/boss comes across this page doesn't start panicking about that :) + +!>http://base--/img/pictures/siemens/siemens.gif! Then what... well, it seems they're using Microsoft technologies there, so I'll probably have to as well. Not that bothered, but I hope Firefox will be allowed: it's more secure, it offers more features and it has tabs. Hell I can't imagine browsing the Net without tabs! At worst I'll install a beta of IE7. +I'll also use email a lot and this translated into MS terms means that I'll have to use Outlook... that kinda freaks me out because I never used it. You can laugh as much as you like but I never used outlook or outlook express properly: if I _had to_ use an email client I always used Netscape or Thunderbird. Oh well, not a big deal actually. + +What will happen to this site, and all the CakePHP-related stuff? Nothing much: I'll have probably less time but I'll still be writing about Cake. Maybe I won't code a lot tough: it seems clear at this point of my life that I'll be a writer rather than a developer.
A content/articles/29.textile

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

+----- +permalink: "29" +title: Writing more articles... +tags: +- website +- writing +type: article +filter_pre: textile +----- +Yes, I know, I've been slaking a little bit, and haven't posted on my blog in a while. Well, I actually _didn't_ slack at all in these days getting ready to start my job, looking for a damn fitted kitchen for my house and... writing more articles. + +Nothing special, and nothing too technical, to be honest, but equally interesting. First of all I updated my "An IE Lover's Guide to Firefox":http://base--/articles/view/ie-lovers-guide-to-firefox/ a little bit and people at SpreadFirefox.com and "FirefoxFacts":http://www.firefoxfacts.com/ liked it. Glad to hear that, unfortunately some guy who wrote about "Firefox Myths":http://mywebpages.comcast.net/SupportCD/FirefoxMyths.html wasn't too impressed, but at any rate he read it anyway. + +OK, this wasn't a new article at all, but "this one":http://base--/articles/view/the-internet-philosopher/ is fresh, at least. It'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 "website":http://base--/bookmarks/view/ropix I decided to write something about him. An interesting and rather unusual read. Pity that some sections of his homepage are in Swedish only. + +Finally, yesterday I felt inspired and decided to write "another roundup":http://base--/articles/view/social-bookmarking-services 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't seem to be particularly interested in "reading another one":http://digg.com/software/Ten_popular_social_bookmarking_services_reviewed, but hey! After all I can't expect of getting dugg for every roundup I write, can't I? + +That's about it. And what about the CakePHP article I promised "long ago":http://base--/blog/view/13/ to CakePHP beginners? It's done, written and ready to be published! Unfortunately the magazine I submitted it to is taking quite a bit to review it and - most important - to tell me whether they'll publish it or not. Let's hope for the best.
A content/articles/30.textile

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

+----- +permalink: "30" +title: Working! +tags: [] + +type: article +filter_pre: textile +----- +Yes, I started "working" at the "Siemens/Microsoft MES Expertise Center":http://base--/bookmarks/view/siemens-mes/ two days ago, and you can tell from the lack of activity on my blog, for example. That's the first _real_ and _full-time_ job for me, and yes, I noticed the difference from an "I-get-up-whenever-and-do-whatever" policy to a slightly stricter "get-up-at-seven-and-go-to-work" policy: I obviously don't have the same amount of free time as before, nevertheless I really can't complain. + +!<http://base--/img/pictures/siemens/mes.jpg! For the first two weeks I have to attend the compulsory introductionary course about the "Simatic IT":http://base--/bookmarks/view/simatic-it/ framework, and it's not that bad: the topics of the course are not that difficult (for now), I can understand everything (for now) and people seem really nice and chatty (for now). I'm still a bit scared of the _corporate environment_, the main reason being that it seems _too nice to be true_: especially for me it's really great to have a chance of meeting people from other countries, attend courses _in English_, talk mainly _in English_ and basically be able to forget that _outside_ those walls there's Italy. Not that I particularly hate being in Italy, I like my city in particular, but I relate much better with foreigners and/or English-speakers. + +Everyone has a different accent: you can tell where everyone is from simply after hearing them talking for a few seconds! Oh well, I suppose people can tell I'm Italian from my accent as well, perhaps. I almost immediately made friends with the other four Italians in the training room and also an Austrian guy from one of Siemens' branches in Linz... great people, easy-going and friendly. + +In two weeks time I'll start working _properly_ writing stuff and maybe things won't be as easy... or maybe they will be - I hope - because normally I really like writing about anything, especially in English. + +!>http://base--/img/pictures/roxy/roxy.png! The only bad thing is that this week and maybe even the next I'll have to stay apart from my fiance&eacute; Roxanne, as she's staying at her parents' place (100Km far from me) since we're in the process of restoring our future house. I really miss her terribly and she does as well. The good news is that we'll meet again tomorrow evening as I'll be driving down there immediately for the weekend! +She's actually worrying a bit because of the huge chunk of time that my job will require, but I hope we'll be able to live together in our _own_ house soon: for now our 1st priority is finding a suitable and decent fitted kitchen... anyone? + +Another thing I need to get used to is answering _all_ my emails (and they are a lot in these days) in the evening, without mixing up or forgetting somebody: I got some really good news recently concerning my activity of _freelance writer_, along with various offers from online magazines. I'm also pleased to announce that some editor just got back to me about my new introductive CakePHP article, and it will soon be featured on another (fairly well known) website... a good publicity for myself, my _site_ and CakePHP, that's the most important _point_ ;)
A content/articles/31.textile

@@ -0,0 +1,90 @@

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

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

+----- +permalink: "32" +title: Writing Tools +tags: +- writing +- tools +type: article +filter_pre: textile +----- +Since in these days (and even more in near future) I'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. + +I'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 "textile":http://http://www.textism.com/ markup, zZine Magazine used BBcode, other site use their own "proprietary" styles and so on. One could just give up and use Notepad - or better, "Notepad++":http://notepad-plus.sourceforge.net/uk/site.htm - for everything, while someone else like me might opt for various applications according to the task. + +One of the few essential requirements for a _writer_ is some spell checking functionality. Sad but true, this is enough to leave the most popular multi-purpose programming editor out: programmers don't need a spell checker, a highlighter for their favourite language is more than enough. +I will not mention all the applications I tried to find the Perfect Editor, and I'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. + +!<http://base--/img/pictures/wp/bill.jpg! + +"Word 2007 Beta 2":http://www.microsoft.com/office/preview/default.mspx - Yes, I know that OpenOffice is free and OO Writer works great, but perhaps at work you'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'll still have to use Redmond's most popular Word Processor - _if you have it_. If you got it with your laptop (I didn't) or your auntie gave you 300$ to buy it you're all set, but if you don't? +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, "run":http://www.microsoft.com/office/preview/beta/overview.mspx. I did it yesterday and well, it's nice to try this brand-new piece of eye candy. the interface is completely new, you won't find the usual drop down menu but with some imagination you'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 STILL doesn't have a tabbed interface, so you STILL have to clutter your taskbar if you want to keep more than one document open. +At any rate, it does the job, exactly in the same way as it did in the previous versions. +I use it if people ask me to, and for writing stuff which doesn't need to be formatted with a particular markup or style but rather look nice and have pictures embedded. + +!>http://base--/img/pictures/wp/writely.gif! + +"Writely":http://base--/bookmarks/view/writely/ - Now this is much more fun. A _online_, AJAX-powered word processor recently acquired by Google. IT'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. +It's nice. It's nice if you have to work with MS Word documents or create PDF files, and it supports the most essential features offered by desktop word processors, plus some more, really convenient functionalities. +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 - which is one of its killer features - 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. +Another really wonderful feature is _version support_. 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 _repository_ for my articles and writings. + +!<http://base--/img/pictures/wp/cream.png! + +"Cream":http://base--/bookmarks/view/cream-editor - I discovered this a while ago, and it's perhaps the most multi-purpose editor out there. It's built on top of Vim (respect+) but it has a friendlier interface by default, and that's exactly what I'm using right now for typing this post. The reasons are simple: it supports ANY kind of file format and any character encoding. There'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. +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 "expert" view and challenge my vi skills ;) + +That's pretty much what I use for writing articles, posts, and other documents... I tried other alternatives like RoughDraft or similar programs but I'm now really happy with these three applications. Commercial "writer's programs"? 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?
A content/articles/33.textile

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

+----- +permalink: "33" +title: Information Mapping +tags: +- productivity +- writing +- note-taking +type: article +filter_pre: textile +----- +As I thought, my job also represents a great opportunity to learn new things. I don'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 "Information Mapping":http://www.infomap.com/ was by far the most interesting topic I learnt about this week. + +h3. What is Information Mapping? + +*Definition[1]* +<blockquote>The Information Mapping method is a research-based approach to the analysis, organization, and visual presentation of information.</blockquote> + +*Information Mapping is media independent* +<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> + +*Key Concepts* +<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> + + +*Purpose* +<blockquote> +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 + +* purpose +* audience needs, and +* information types. + +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. +</blockquote> + +fn1. Contents were taken from "InfoMap.com":http://www.infomap.com/index.cfm/TheMethod/ and were re-formatted and re-organized into an information map. + + +h3. Key Concepts + +*Introduction* +<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> + +*Principles* +<blockquote> + +| *Name* | *Explanation* | +| Chuncking | Writers should group information into small, manageable units. | +| Relevance | Writers should make sure that al information in a chunck relates to one main point (function or purpose). | +| Labeling | Writers should provide a label for every unit of information. | +| Consistency | Writers should use similar labels, word, formats for similar subject matters. | +| Integrated Graphics | The use of tables, images, diagrams and lists is encouraged. | +| Accessible Detail | Documents should provide sufficient details where necessary, to make the information more accessible for the readers. | +| Hierarchy | Small, relevant units of information should be organized into a hierarchy. | + +</blockquote> + +*Information Types* +<blockquote> + +| *Name* | *Definition* | +| Procedure | Set of steps to obtain a specified outcome | +| Process | A series of changes through the time for some purpose | +| Structure | Something which can be defined into multiple parts | +| Concept | Group of physical objects, conditions, relations, ... | +| Principle | Statement of what should be done, assumptions | +| Fact | Statement presented with no supporting evidence | +| Classification | The sorting of a group of specimen into classes | + +</blockquote> + +*Conclusion* +<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 "facts" without any unnecessary distraction. This method it is used with some modifications in many technical manuals and documentation written by many companies.</blockquote>
A content/articles/34.textile

@@ -0,0 +1,80 @@

+----- +permalink: "34" +title: "Akelos Framework: too good to be true?" +tags: +- frameworks +- php +- web-development +- review +type: article +filter_pre: textile +----- +Someone recently added a comment to my article about "Rails-inspired PHP frameworks":http://base--/articles/rails-inspired-php-frameworks/ 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 PHP and spam or not, I'd like to thank this guy for letting me know of the existance of "Akelos":http://base--/bookmarks/view/akelos-framework, a new PHP framework which seems simply too good to be true. + +!<http://base--/img/pictures/frameworks/akelos_framework.png! + +Let me just spend a few words more before writing more about it though. First off, it's not available yet. OR at least it doesn't seem to be: the author is planning to release his work to the Open Source community but... well, he's a bit concerned about the current "PHP Framework War": he wouldn't like to end up like "Subway":http://subway.python-hosting.com/ or just be slagged off by those merciless reviewers who enjoy write round-ups and comparisons about frameworks. "Bermi Ferrer":http://www.bermi.org/page/about_me is "just" a talented PHP developer who decided to create his own framework and he really enjoyed doing so, nothing more, nothing less. + +_"I considered other PHP 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."_ + +Where did I hear that? Nothing new: it's always the same story of frameworks not being as we want them to be etc., it's human. And yes, it's _*another*_ attempt to port Ruby on Rails to PHP, and a damn good one -- or so it seems. + +<small>Before proceeding any further, I'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-PHP-clone issue: *If I see a single comment slagging off this framework (or any other) only because it's a port of Rails to PHP, it will be deleted, may it be David Heinemeier Hansson himself*. 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, EVERYBODY KNOWS THAT. Please, please, save us poor PHP developers the usual preaching.</small> + +!>http://base--/img/pictures/frameworks/bermi_ferrer.png! + +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... ooops! + +Let's just quote the most juicy ones, shall we? + +Active Record ["Model"] + +* Associations +* Callbacks +* *Transactions* +* *Finders* [ @$Project->findFirstBy('language AND start_year:greater', 'PHP', '2004');@ ] +* Versioning +* ... + +Action Controller ["Controller"] + +* Filters +* Pagination +* Mime Type +* Mime Response +* *Code Generation* +* Response handler +* ... + +Action View ["View"] + +* *Templates (using Sintags)* +* Web 2.0 javascript using prototype and script.aculo.us +* Helpers +* Partials +* *Template Compilers* +* ... + +And then more Akelos-only goodies: + +* *Multilingual Models and Views* +* *Locale alias integrated on URLS (example.com/spanish will load the es_ES locale)* +* Database migrations using DB Designer files +* *Pure PHP support for Unicode (no extensions required)* +* *Unit Tested source code* +* Code Generators +* Built in XHTML validator +* Automated locale management +* *Clean separation from HTML and Javascript using CSS event selectors.* +* Ajax file uploads +* *AFLAX integration* +* Dojo Rich Text Editor +* Format converters +* File handling using SFTP for shared host running Apache as user nobody (as most CPanel server do) +* *Distributed sessions using databases* + +Impressed? I was, honest. And I'm talking as a CakePHP fanatic here, and I must say that if this framework can really offer all this _and_ -- and this is what really matters -- is also as simple as Cake to learn and well performing... well, this is definitely going to be quite a promising player in the "PHP Framework War" (but is not a real war, is it?), although the author is quite worried about that: + +_"I'm also concerned about the PHP Framework war, I don'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't want to spend my time discussing about if this is better or not than other solutions. That's the reason I'll first look for great developers interested in the Framework to help me releasing it."_ + +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, "Akelos Framework":http://www.bermi.org/projects/akelos_framework.
A content/articles/35.textile

@@ -0,0 +1,61 @@

+----- +permalink: "35" +title: Some essential tools to survive in a corporate environment +tags: [] + +type: article +filter_pre: textile +----- +A month has passed since I started working at the "MES Expertise Center":http://base--/bookmarks/view/mes-expertise.center/, and I must say I'm very impressed after all. I started with a two-weeks course on SIMATIC IT Production Suite, the flagship product developed by Siemens here in Genoa, and it was a real piece of cake: the trainers were very prepared and everything was explained very clearly for both us internal workers and the customers attending the lessons. In my opinion this is one of the most successful things Siemens and Microsoft achieved when they opened the MES Expertise Center: creating a place where both Siemens staff and partners can learn and experiment new cutting-edge MES-related products. Even during the course, when someone asked a particularly complex question and the trainer couldn't answer, consultants or even R&D staff were immediately contacted (also because they were literally next door...) to provide an authoritative and exhaustive answer. + +OK, enough with the promotional speech now, let's talk about what I did _after_ the course, during the last two weeks. I thought I'd start writing some manual or online help as I was originally told, but my boss wanted me to spend six weeks down with the consultants to learn more about SIMATIC IT and acively work with it in real-world application. "This is not a drill, soldier" comes to mind... ;) + +SIT consultants -- I tought -- are tough people who travel around the world to customers plants to deploy and create taylored MES solutions for various kinds of industries, from Food and Beverage to Automotive. Indeed they are, but they are damn great and fun to work with: in these two weeks these guys made me learn a lot of things simply by working on their testing servers and virtual machines, making you _feel_ you're doing something useful. I soon learnt the importance, for the morale, of those rituals they call "coffee breaks": I still can't stop crying for laughter (literally) when people start competing with each other by telling the most hilarious (and true) stories about their "adventures" in foreign countries. + +!<http://base--/img/pictures/siemens/e8020.jpg! Another great thing of working in a company which among other things "makes computers":http://www.fujitsu-siemens.com/ is the equipment they provide. Right after attending the course I was given a brand new "LifeBook E8020":http://reviews.zdnet.co.uk/hardware/notebooks/0,39023985,39191340,00.htm to use for work, and the only bad thing about it is that I can't take it at home! The complaints about the low battery life are complete nonsense, as that little baby can stay up for about 5-6 hours (no kidding!), and it also came with a huge 2GB RAM - the maximum it can handle, I think. + +What software I used most, so far? Read on... + + +h3. VMware Workstation + +!>http://base--/img/pictures/tools/vmware.gif! Why the scary amount of RAM? Simple: for virtual machines. Most of the tests and work is done using "VMware":http://www.vmware.com Workstation and pre-built virtual machines represent the best and fastest way to work, especially when testing software because: + +* No installation is required: just transfer a 8GB file on your machine, double-click on it and there you go -- and yes, this means a lot of time saved +* If you mess something up, you don't compromise your "real" operating system and you just change virtual machine -- and since we do anyway every three weeks once a new build of the product comes out, it's not a big deal + +The downside of virtualization is that you need plenty of resources available on your host OS, memory in particular, but as I said 2GB of RAM (one of which goes to the virtual machine) are more than enough. + +h3. Internet Explorer 7 beta 2 (FREE) + +!>http://base--/img/pictures/tools/ie7.gif! ??"So now you're connected to the main network, and you can now use Internet Explorer to access both the intranet and the Internet of course".?? +*Wrong*. I won't use the bloody thing: Internet Explorer 6 simply sucks, and we all know why. Really, I tried to use it, but then after five minutes of "tabless" browsing and other annoyances I downloaded and installed Firefox. There, done. +*Wrong again*. Half of the corporate intranet sites and portals were build in ASP using proprietary technologies (== ActiveX galore!), so yes, half of the pages didn't come up right in Firefox. And if the portal for corporate quality standards is not displayed correctly a few days before a big company audit... well, that's simply not good, so I thought about choosing a Firefox alternative: "Internet Explorer 7 beta 2":http://www.microsoft.com/windows/ie/default.mspx. +Nevermind the official page, I couldn't stop laughing at what uncle Bill wrote there: + +_We heard you._ + +_You wanted it easier and more secure_ + +For a few moments I thought they were introducing a new, revolutionary brand of condoms. Unfortunately it's just a web browser. + +Of course no problems with the WGA crap since obviously I'm running a genuine copy of Windows XP Professional (another good thing of working for a certified Microsoft partner): I immediately downloaded and installed IE7, and now things are slightly better. It is obviously not as versatile as Firefox, but it does the job alright, I must say. + +h3. SyncToy (FREE) + +Once in a while Microsoft comes up with a little useful FREE utility. I must spend more time on MS download center because I'm sure I'll find some more useful tools: "someone":http://techtics.iblogzz.com/2006/04/30/windows-defender-genuine-crack/ even managed to crack Windows Defender installation using the Orca MSI package editor, which is part of Microsoft Platform SDK components... So yes, searching carefully in MS downloads is worth it! +I didn't need to find anything like that of course, but I did need a free, fully-featured synchronization utility! I use my USB flash drive a lot in these days, and especially now that I have a laptop at home, a laptop at work and a few virtual machines, keeping the stuff up to date was becoming a problem. Yes, there are some other sync utilities available on the Net, but most of them are commercial or shareware, Microsoft "SyncToy":http://base--/bookmarks/view/synctoy, amazingly, can help you to keep your stuff synchronized totally for free. + +SyncToy can manage many "folder pairs" on different locations and perform various types of actions: synchronize, echo, contribute, combine and subscribe, according to your needs. Furthermore, a handy "preview" shows the user what files will be created/overwritten/moved/delete before a particular action is performed... truly a wonderful little utility. + + +h3. Notepad++ (FREE) + +Last but not least, another free tool, GPL-licensed this time: "Notepad++":http://base--/bookmarks/view/notepadplus/: a portable, lightweight, feature-rich multi-purpose text editor. It's absolutely free to use and distribute and it's 100% portable: it lives permanently on my USB drive, but I also installed it on both my laptops and it's currently my text editor of choice. +Two weeks ago they told me I'd have "programmed" something using "G2":http://www.gensym.com/?p=what_it_is_g2, a proprietary, real-time rule engine platform by Gensym. The thing uses its own "natural" programming language, with its own syntax, its functions etc. etc. +Now, imagine having to write some _structures_ like this: + +structure('entity_name': "TEST", 'entity_content': sequence(structure('entity_name': "TEST2", 'attribute1: "some text", 'attribute2: "more text", 'entity_content': sequence("some content")))) + +...This is just a simple example, things are much more complex than this in reality and believe me, I really felt I needed some custom editor able to handle that syntax. +The easiest solution for all my problems was just Notepad++: in a few minutes I was able to create a custom language highlighter for g2, and everything became really much easier.
A content/articles/36.textile

@@ -0,0 +1,32 @@

+----- +permalink: "36" +title: "ITALIA: CAMPIONE DEL MONDO!" +tags: +- sport +- soccer +type: article +filter_pre: textile +----- +_*Italy has won the World Cup!*_ + +It doesn'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... WE WON, AND WE KICKED THEIR ASS, end of story :) + +<div align="center"> +!http://base--/img/italy/worldcup.jpg! </div> + +<blockquote> +!<http://base--/img/italy/grosso.jpg! + +"Italy beat France 5-3 in a penalty shoot-out to win the World Cup after an absorbing 1-1 draw in Berlin. + +!>http://base--/img/italy/italy1.jpg! + +Fabio Grosso scored the winning goal after France's David Trezeguet missed. + +Playing his last game before retiring, Zinedine Zidane's career ended in disgrace after he was sent off for crazily headbutting Marco Materazzi. + +Zidane had put France ahead early on with a coolly-taken chipped penalty, before Materazzi levelled with a header from an Andrea Pirlo corner. +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. " +</blockquote> + +"Read More":http://news.bbc.co.uk/sport2/hi/football/world_cup_2006/4991652.stm
A content/articles/37.textile

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

+----- +permalink: "37" +title: Some updates +tags: +- website +- cakephp +- design +type: article +filter_pre: textile +----- +Quite a bit of time passed since the last blog post, and I'm actually sorry about that, but as I thought, I don't have as much free time as I used to be. Work is work, after all! +This post will be multipurpose as actually I bluid up a few things to write about in the last few days... erhm, ok, _weeks_. + +h3. New Website Design + +Something different eh? Yep, definitely! Some time ago I started a small project called "h3raLd.com Re-design":http://base--/projects/view/h3rald-redesign hoping that some GFX guru could provide a new template for this website, and actually in the end I decided to accept the work of _*Bartus F. Teipel*_ a Brazilian CakePHP enthusiast. +Bartus is obviously (MUCH) 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. +Unfortunately he didn't yet provide a link to his main website/portfolio, but for now all I can show you is his website for party pics, "CircusCircus":http://www.circuscircus.com.br/. + +The new template sports a more contemporary Web2.0-ish look which I like a lot, and Bartus used libraries like "prototype":http://prototype.conio.net/, "moo.fx":http://moofx.mad4milk.net/ and "Nifty Corners Cube":http://www.html.it/articoli/niftycube/index.html for the AJAX effects and functionalities. +A really outstanding work, thanks Bartus! + +h3. The CakePHP Herald project has been completed + +With my "latest article":http://www.h3rald.com/articles/view/cakephp-first-bite/ about CakePHP published on SitePoint, the "CakePHP Herald":http://base--/projects/view/cakephp-herald/ project was completed. +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 - again - lack of time to focus on advanced topic and produce some quality examples. + +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 _bakers_. Happy baking to all of you! + +_So... no more articles about Cake?_ Maybe not for a while, I think I'll be rather busy in the following months. Curious? Read on :-) + +h3. My biggest and most important project + +I actually got really pissed off with Larry, Garret & the other Master Bakers because of what they wrote on the "announcement":http://cakeforge.org/forum/forum.php?forum_id=244 for the latest CakePHP release: + +bq. "[...]In other news, some new articles were published on Sitepoint [3] and in the International PHP magazine [4]. Fabio Cevasco [5] is the man behind these articles. Together with Fabio, we will be writing a book that will be published [...]" + +After all this time I spent _trying desperately not to say a word about it_ they came out and heralded it out of nowhere. Sigh... they ruined the surprise effect! Oh well, it's too late now, isn't it? + +So yes, when I say that I'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!!!
A content/articles/38.textile

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

+----- +permalink: "38" +title: Akelos is real, after all... +tags: +- frameworks +- php +- web-development +- review +type: article +filter_pre: textile +----- +Bermi Ferrer kept his promise, and even if a few were skeptic on the "pre-announced":http://base--/blog/view/34/ features of his upcoming Akelos framework, last week he sent me a "development preview" and a few days ago he opened the development SVN repository to the public: + +<a href="svn://akelos.org/trunk" target="_blank">svn://akelos.org/trunk</a> + +Go, get it: it's worthwhile (see below). + +"[...] The Akelos Framework is an open-source port of Ruby on Rails to the PHP programming language. +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." + +At the Akelos Framework Features page you can find detailed information about what has been already implemented into the framework. +</blockquote> + +I think it says it all, well almost. Some people will undoubtedly be disgusted by yet-another-hopeless-Rails-clone: _not again!_ I hear them crying... + +Well, yeah, I think this - to be honest - should be the last attempt someone makes to port Rails to PHP or at least port _some features and the overall philosophy_, like "CakePHP":http://base--/bookmarks/view/cakephp did: there are honestly too many for one single language. Look at Python, "Django":http://www.djangoproject.com/ seems to be the only "Rails-inspired" framework available and everyone is happy with it, while as a general rule PHP folks are never happy with what they already got. + +Bermi is undoubtedly one of them, and that's the reason he decided to code his very own Rails-inspired framework for PHP, which is, to date, the most remarkable of the ones I left out (it wasn't available at the time) in my "article":http://base--/articles/rails-inspired-php-frameworks/. + +h3. Confirmed Features & Contents + +So well, although I didn't really have a proper chance to play with Akelos I can certainly herald some of its - verified, this time - features. + +For one, it's huge. Take Cake, add _every excellent, useful third party library or class you can possibly thing of_ and you'll get Akelos. No kidding. The unzipped source of the whole framework is a massive 16MB, 8.5 of which constitute the @vendors@ folder. What's in it? Well, all this: + +* ADOdb +* Domit +* FPDF +* Excel (reader library) +* Hyper Estraier full-text search system +* Inutio XML-RPC Library +* _Many_ PEAR packages +* PHPCodeAnalyzer +* PHPmailer +* SimpleTest +* A Simple PHP YAML Class +* Textile + +Then, similarly, all the state-of-the-art Javascript/AJAX hyper-hyped libraries are included: + +* AFLAX +* Behaviour +* Builder +* various Scriptaculous packages +* Prototype +* FileUploader (by the author, using prototype) +* Window +* EventSelectors + +!<http://base--/img/pictures/frameworks/akelos_framework_logo.gif! + +Good, well, kind of: that's just what _others_ did, but it's worth noting that it's all there and - apparently - 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 _code generators_... Aye, there are in Akelos as well, of course! + +Coming to the more juicy stuff, _lo' and behold, ye contents of /lib folder (with comments):_ + +* AkActionController (controller) +* AkActionView (view) +* AkActionWebservice (Web services) +* AkActiveRecord (model) +* AkAdodbCache (content caching) +* AkCharset (utf8 support, includes _all_ mappings) +* AkConfig (load config settings) +* AkConverters (conversions!) +** DBDesigner > AkelosDatabaseDesign +** Excel > Array (bi-dimensional) +** Excel > CSV +** HTML > RTF +** HTML > Text +** Word > Unicode +** PDF > Text +** Xdoc > Text +* AkHeaders (HTTP headers, redirections) +* AkImages (Image operations, resizing) +* AkLocalize (Localization, countries and timezones) +* AkInflector +* AkLogger +* AkFtp +* AkInstaller +* AkRouter +* AkZip +* ... + +Well, it's all there, at any rate. The best way to know if it all works, and _how_ it works, is simply to try it out: "www.akelos.org":http://www.akelos.org/. + +h3. Remarks + +As I said earlier, Akelos looks like _CakePHP on steroids_: agreed, the Cake philosophy of "no we-may-use-it code in the trunk" has been _completely_ (and intentionally) ignored, but this is our chance to peek at what CakePHP could have become if such philosophy didn't become a lifestyle for the Cake Dev Team. +Akelos code is Rails-inspired, so yes, it's _very_ similar to Cake, although with some rough edges and some re-used parts, but it's the work of ONE person with no community support (yet), don't forget. Remarkable. + +And he needs co-developers, by the looks of it, so there you are then: there's _your_ chance! + +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 PHP and _possibly_ meet the needs of more people: those who want just the essentials, as a framework, and those who like to be _virtually almighty_ and be able to do anything, _if they wanted to_. + +Two flavours of the same framework? _CakePHP_ and _cAkePHP_ (note the case)? Bah, let's stop raving now, shall we?
A content/articles/39.textile

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

+----- +permalink: "39" +title: Why I like Netvibes +tags: +- web20 +- ajax +- review +type: article +filter_pre: textile +----- +The so-called "AJAX Start Pages" 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'm guilty of that too). I soon learnt that for any "good and useful thing" on the web there are at least _n_ clones: consider for example social bookmarking, community-powered news sites, php frameworks... +And no, you can't use the word clone because it has a strong negative connotation nowadays so let's just say that whenever someone comes up with a new idea, others examine it, process it and in a few weeks (days?) some _very, very similar application_ comes out, and it's _better_ than the previous one. +Now, I don't know exactly whether "NetVibes":http://www.netvibes.com/ was one of the first AJAX Start Pages created or not, but at any rate - in my very, very, very humble opinion, is the most advanced and the most usable of "the lot":http://www.techcrunch.com/2005/12/07/ajax-desktops-wont-stop/, and an essential tool for lazy folks like me who want to keep up-to-date with what's going on without having to visit dozen of websites everyday. + +!<http://base--/img/pictures/netvibes.jpg! + +I can see people jumping up and down shouting "Pageflakes is better", "Protopage kicks a$$" etc. etc. Well, yes, probably, as you like: different people like different things, and when it comes to AJAX Start Pages there's really a lot to choose from: 3spots has an excellent (and complete, I believe) "list":http://3spots.blogspot.com/2006/03/ajax-or-flash-startpages-or-homepages.html of all the start pages currently available on the Net, so yes, you can try them out yourself and make out your mind :) + +I made up my mind long ago after experimenting a few of those. Why Netvibes? OK, let's see: + +# *Fast to load*: Netvibes is fast. Relatively fast, of course, for sure is not as fast as a plain, old-style html page, but I think it's perhaps one of the fastest AJAX start pages ever created. As they "pointed out":http://blog.netvibes.com/?2006/08/17/75-the-future-of-netvibes, with a 15 million investment performance can only get better... +# *Tabbed pages*: 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 AJAX widgets you'll never use, another for al that Web 2.0 rubbish you'll never read -- that's what I do at least. +# *Smart Google Module*: Finally Netvibes has a _proper_ Google search module, which enable users to search with Google and view results _on Netvibes_ instead of opening up a browser tab. +# *RSS done right*: Their RSS reader is nice: by clicking on a feed title it opens up a _virtual window_ 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's ones without leaving the page (and without loading the heavy TechCrunch UI). +# *Public API for modules*: For those who - unlike me - has some proper free time and would like to develop their own module, the "Netvibes Mini Module API":http://eco.netvibes.com/developers/ is public... +# *Ecosystem* : Netvibes "Ecosystem":http://eco.netvibes.com/ 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: "XE":http://eco.netvibes.com/modules/3492/xe.com-currency-converter Currency Converter, "Quick Translator":http://eco.netvibes.com/modules/3709/quick-translator, "Google Map":http://eco.netvibes.com/modules/6776/google-map "Daily Cartoons":http://eco.netvibes.com/modules/91/daily-cartoons and "Bitty Browser":http://eco.netvibes.com/modules/6/bitty-browser. +CakePHP feeds? "Loads":http://eco.netvibes.com/?type=all&q=cakephp! + +Enough?
A content/articles/40.textile

@@ -0,0 +1,30 @@

+----- +permalink: "40" +title: "Introducing: \"CakePHP Recipes\"" +tags: +- cakephp +- writing +type: article +filter_pre: textile +----- +Despite all my efforts to keep the whole thing quiet for the time being, a few days ago I entered the words "CakePHP Recipes" in Google and discovered - to my astonishment - that my new book about the CakePHP framework is already for (pre)sale in many popular online bookstores. + +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't phisically get it simply because it's still in progress (miracles of the modern publishing industry!). + +!<http://base--/img/cakephp-recipes/cover.jpg! + +I'd like to point out that I'm not the _only_ 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. +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 "recipes" on how to implement a particular functionality in a CakePHP web application. + +Why should you get it? Here are some reasons: + +* It is a book written _by_ programmers _for_ programmers +* All the code included in the book has been created and tested by the creators of the framework +* 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. + +Very special thanks to "Peachpit Press":http://www.peachpit.com/ for giving me and the Cake Software Foundation this chance to + +More to come... + + +bq. *UPDATE*: This book "has been canceled":http://www.h3rald.com/blog/42 and therefore will NEVER be available in bookshops or online stores.
A content/articles/41.textile

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

+----- +permalink: "41" +title: Comments temporarily disabled +tags: +- website +type: article +filter_pre: textile +----- +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. + +Hopefully I'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.
A content/articles/42.textile

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

+----- +permalink: "42" +title: Too many cooks spoil the Cake book +tags: +- cakephp +- writing +type: article +filter_pre: textile +----- +I am sorry to announce that my upcoming book, CakePHP Recipes, will not be published anymore. As a matter of fact, it wasn'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. + +To quote an email I received from my publisher a few days ago, + +_"[...] The Cake Software Foundation has informed us they are withdrawing from the CakePHP Recipes project, and returning the advances they've received. This means we can no longer count on them for support, nor can we package the book as an official title._ + +_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. [...]"_ + +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's misjudgement and lack of motivation it will never be available to the readers. +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't enough: unfortunately it seems that someone didn'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. + +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.
A content/articles/43.textile

@@ -0,0 +1,32 @@

+----- +permalink: "43" +title: Time for a diet... +tags: +- cakephp +- rant +- writing +type: article +filter_pre: textile +----- +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 *did* like the CakePHP(TM)[1] framework too, once, and I *did* write "some articles":http://www.h3rald.com/projects/view/cakephp-herald about it in the past, and I believe at least a bunch of Bakers found them useful, especially at the time. +I do believe the Cake(TM) Software Foundation[1] quite liked having their framework featured on popular websites like php|architect and SitePoint, and I believe that I contributed - to some extent - to make it one of the most popular frameworks available for the PHP programming language. + +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 IBM are much more up-to-date than my articles, and thus deserve such a mention instead. + +Oddly enough, I took a screenshot of the CakePHP website just yesterday _"by chance"_ and my articles were still there: + +!http://www.h3rald.com/img/pictures/cake-promo/cakephp-08032007.png! + +...while this morning they weren't anymore: + +!http://www.h3rald.com/img/pictures/cake-promo/cakephp-09032007.png! + +Of course I can't provide any proof that I took the screenshot yesterday, and of course I don't have any proof of the fact that someone in CSF may have thought that due to my recent "bad behavior":http://www.h3rald.com/blog/view/42/ my articles didn'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's accident reminded them that there were far better articles which needed to be featured on their site. At least I _finally_ did something good for the community! + + +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 - for the sake of the framework - should have never been made public, perhaps. +I want all of you to know that I still think that CakePHP is the best PHP framework ever made and I genuinely think that Larry E. Master did outstanding work in all this time, along with the rest of CSF members and contributors. Best of luck for your future editorial and development projects. + +Since now my contributions are no longer "officially recognized", I think I'd better to move on devoting my attention to something else. + +fn1. "CakePHP" and "Cake" _seems_ to be registered trademarks of the Cake Software Foundation Inc. I'm not sure if I'm allowed to use them in this blog -- If anyone has any problem with it, please let me know.
A content/articles/8.textile

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

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

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

+----- +permalink: "9" +title: Riddle me this... and you'll get the job! +tags: [] + +type: article +filter_pre: textile +----- +Today I had my _n^th^_ job interview. Yes, I'm getting used to them by now, and it's becoming quite entertaining: if they _paid_ me for just take interviews I'd do that for all my life quite happily! +But since that's not going to happen I'd better get a move on and find a so called _real job_. Actually this time it wasn't the usual complete waste of time and this company _nearly_ made me a proper offer: they're gonna see me again next week, so let's hope for the best. + +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... one thing which actually _never_ 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's a rough translation from Italian, the comments within square brackets are mine: + +bq. _You're alone in a pitch black room [...nice intro, eh?] and the only thing you have are two fuses of different length and a lighter [thank God for that, now it's all much better]. You know that both the fuses can burn in exactly one hour each, although there'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?_ + +I solved that, eventually, and I got the job! Weheee! + +No, more or less, but not quite... I'm gonna see them again, and evaluate their offer along with the other(s). + +The solution of the riddle? NO CHANCE! Go and figure it out, it's not hard.
A content/articles/a-look-at-drupal.bbcode

@@ -0,0 +1,192 @@

+----- +permalink: a-look-at-drupal +title: A look at Drupal +tags: +- php +- web-development +- review +type: article +filter_pre: bbcode +----- +[i][b]Important Notice:[/b] This article is about changes occurring to zZine Magazine's site[1]. At the time of writing, www.zzine.org uses the old site, and not the Drupal-based one presented in this article, which is currently under construction[18].[/i] + +"Why can't we log who edits the articles?" +"Can we send newsletters?" +"We should really have a members' area..." + +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?[b]Case Study: zZine Magazine[/b] + +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 [i]Content Management Systems[/i][3]: ready-made, fully-featured administrative back-ends for creating and managing almost any kind of website, from blogs to eCommerce portals. + +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: +[list] + [*]Add, delete, edit and publish articles + [*]Customizable user permissions, ideally role-based (writer, editor, publisher, etc.) + [*]Creating and managing monthly publications + [*]Editor's tests + [*]User signups, notifications, etc. + [*]RSS feed generation + [*]Sending newsletters to subscribers + [*]Logging user actions +[/list] +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 [i]had[/i] to choose the [i]best[/i] 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. + + +[b]Making the right choice[/b] + +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. + +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. +The first site is CMS Matrix[6] which - as the name implies - provides a really handy [i]matrix[/i], or chart, to compare the various features offered by nearly all CMS available, both proprietary and open-source. + +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 [i]not[/i] 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. + +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. + +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 [i]part of Drupal's documentation team[/i] and involved with Drupal development[10]. + +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 [i]stable[/i] API![12] + +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. + + +[b]Installation[/b] + +Drupal needs three things to run: +[list] + [*]A web server - Apache is fine, and ISS is reported to be working + [*]PHP - Either version 4 or 5, Drupal started supporting PHP5 since 4.6.0 release + [*]A PHP-compatible database - MySQL or PostgreSQL is recommended +[/list] +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 [i]database[/i] directory under the installation directory and modified the configuration settings (sites/default/settings.php) to allow Drupal to access the database. Installation complete. + +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. + + 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 [i]http://www.yoursite.com/cron.php[/i] 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 [i]cron[/i] task manually) is the poorman's [i]cron[/i] module[15], which I used myself and found to be workable. + + +[b]Keeping your site under control[/b] + +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 [i]custom[/i] role-based user accounts and access permissions for [i]everything[/i]: 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. + +For zZine, I created four types of accounts: +[list] + [*][i]Administrator[/i] - Able to access everything and change every setting of the site + [*][i]Publisher[/i] - 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. + [*][i]Editor[/i] - Able to write and edit anything on the site, but not to publish it. + [*][i]Writer[/i] - Able to write articles, blogs and similar content, but in some cases not allowed to edit it. +[/list] +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. + +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 [i]watchdog[/i] 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. + +Themes & Templates + +"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. + +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. + +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 [i]very[/i] 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] + + +[b]To switch or not to switch?[/b] + +When creating a new site for an organization which already has one, there's something very important to consider: [i]what happens to the old data[/i]? +Assuming the old site was dynamic and using a database of some sort, there are three possibilities: +[list] + [*]Don't bother doing anything: any data on the old site will not be transferred to the new one. + [*]Make the old website available somewhere else as an [i]archive[/i] of old documents. + [*]Import all the data from the old site to the new one. +[/list] +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- + +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. + +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. + +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. + +After this initial difficulty, importing articles was relatively easy. Pretty much every type of content in Drupal is, in its simplest form, a [i]node[/i]. 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 [i]stories[/i] and [i]pages[/i] write data to this table only. The most important thing to understand about Drupal is that almost every module used to create [i]something[/i] 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 [i]in any way[/i] by third party modules! + +What about categories? Well, Drupal has become famous for its taxonomy module: whereas most CMSes only support, or in fact [i]impose[/i], 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 [i]any[/i] node, and since almost everything is a node-) can belong to none or [i]n[/i] different categories, which can be nested in a [i]n[/i]-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. + +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 [i]epublish[/i][19] module seemed like it was tailored specifically for our needs. + + +[b]Drupal API and Modules[/b] + +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 [i]exactly[/i] what you're looking for. + +In our case, even if we could have used the [i]story[/i] 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. + +[i]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.[/i] + +All I found in the story module was a bunch of functions like: +[code] +/** + * Implementation of hook_node_name(). + */ +function story_node_name($node) { + return t('story'); +} +[/code] + + 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 "[i]story_[/i]", so I created a new file named [i]zzarticle.module[/i], copied and pasted the story module code into it, and changed every function accordingly, like this: +[code] +/** + * Implementation of hook_node_name(). + */ +function zzarticle_node_name($node) { + return t('zZine Article'); +} +[/code] +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). + +At this point I decided to have a proper look at the API, and read about hooks: + +[quote][i]"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. + 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. [-]"[/i][/quote] +A [i]hook[/i] was used for the previously mentioned function, and this was diligently commented: + +[code] +/** + * Implementation of hook_node_name(). + */ +[/code] + +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: +[list] + + [*][i]Webform[/i] - 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. + [*][i]Flexynode[/i] - 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 [i]flexynode[/i] module. I actually used this module for our podcast section[20], and it did an excellent job. +[/list] + +[b]Conclusions[/b] + +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. +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. + + +[b]Notes[/b] +[small] +[1] zZine Magazine: [url]http://www.zzine.org[/url] +[2] CyberArmy Community: [url]http://www.cyberarmy.net[/url] +[3] Content Management System, Wikipedia page: [url]http://en.wikipedia.org/wiki/Content_management_system[/url] +[4] Xoops - Official Page [url]http://www.xoops.org/[/url] +[5] Mambo - Official Page: [url]http://www.mamboserver.com[/url] +[6]CMS Matrix: [url]http://cmsmatrix.org/[/url] +[7] Open Source CMS: [url]http://opensourcecms.com/[/url] +[8] Snarkles's CyberArmy Profile: [url]http://www.cyberarmy.net/~snarkles[/url] +[9] Drupal - Official Page: [url]http://www.drupal.org[/url] +[10]Webchick's Drupal Profile: [url]http://drupal.org/user/24967[/url] +[11] Drupal - Handbooks: [url]http://www.drupal.org/handbooks/[/url] +[12] Drupal API: [url]http://drupaldocs.org/api/head[/url] +[13] Drupal Downloads: [url]http://www.drupal.org/project/[/url] +[14] WAMP Server Package: [url]http://www.wampserver.com[/url] +[15] Drupal - Installing and Upgrading documentation: [url] http://drupal.org/node/258[/url] +[16] Drupal - Themes: [url]http://drupal.org/project/Themes[/url] +[17] Drupal - Theme Engines: [url]http://drupal.org/node/509[/url] +[18] zZine Beta site: [url]http://beta.zzine.org[/url] +[19] Drupal - ePublish module: [url]http://drupal.org/project/epublish[/url] +[20] zZine Podcasts: [url]http://beta.zzine.org/podcasts[/url] +[/small]
A content/articles/akelos-interview.textile

@@ -0,0 +1,113 @@

+----- +permalink: akelos-interview +title: An Interview with the creator of the Akelos Framework +tags: +- php +- rails +- cakephp +- frameworks +type: article +filter_pre: textile +----- +I "already":http://www.h3rald.com/blog/34 "covered":http://www.h3rald.com/blog/38 the Akelos PHP framework in the past, but for those who don't know it, Akelos seems to be one of the few "Rails-inspired PHP frameworks":http://www.h3rald.com/articles/rails-inspired-php-frameworks still worth mentioning, besides CakePHP and Symphony of course. + +I recently has a look at their recently-relaunched <a href="http://www.akelos.org/">community website</a> and I noticed this phrase: + +bq. "Being port of Ruby on Rails to PHP Akelos is also optimized for programmer happiness and sustainable productivity" + +Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to PHP, an attempt to help _"Ruby on Rails developers who need to code in PHP"_, among others. Of course Akelos is not Rails, simply because Ruby is (thank God for that!) not PHP, 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 PHP, perhaps too many: why did you decide to create Akelos rather than using one of the existing ones?</em></h4> + +<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 PHP frameworks like <a href="http://www.cakephp.org/">CakePHP</a>, <a href="http://phpontrax.com/">PHP 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 PHP implementations, so I first ported the ActiveRecord code using <a href="http://adodb.sourceforge.net/">PHP 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 PHP 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 - or aims to be - a port of Rails for PHP. 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 PHP 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 PHP. 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 PHP. However, Ruby developers will find that Akelos is the PHP framework with is the closest to Rails.</p> + +<p>On the other hand, many PHP developers have moved to Ruby because PHP 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 PHP can start being productive from day one by using Akelos. In this way, Akelos target users are those who already know PHP 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, RJS, 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 PHP 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 ACL 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'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 CMS 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 PHP developer choose Akelos over another PHP framework?</em></h4> + +<p><a href="http://www.akelos.org/docs/tutorials/booklink#mvc">Akelos MVC 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 PHP 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 CMS 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 API interface are the main priorities right now.</p> + +<p>Continuing bringing Rails functionality as needed.</p> + +<p>Releasing our sister project Editam CMS which will help developers who need to add functionality on the top of a CMS using a solid MVC framework like Akelos.</p>
A content/articles/apache2-upgrade.textile

@@ -0,0 +1,39 @@

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

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

+----- +permalink: back-from-holiday +title: Back from holiday +tags: +- personal website writing +type: article +filter_pre: textile +----- +I'm back. I was so eager to go on holiday that I didn't even bother writing a post about it, too bad. I actually when on holiday for a week but I thought I'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't actually manage to relax that much. + +Now everything is fine. I still have to send in my laptop for assistance but it'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 econimic reasons and time constraints. I won't publish the specs, but it's alright for me and my fianc&eacute;e. + +So what now? Well... the usual: more posts will soon be added to the "Simply On Rails":/tags/simplyonrails series, a Ruby-related article is on the way (it will be edited by the excellent "CyberArmy":http://www.cyberarmy.net 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'll eventually complete another pet project of mine, but that will take more time... + +Stay tuned.
A content/articles/boolean-search.bbcode

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

+----- +permalink: boolean-search +title: Understanding Boolean Search +tags: +- internet +- google +type: article +filter_pre: bbcode +----- +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.[b]Learning how to search[/b] + +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. + +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. + +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. + +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: + +[i]ruby on rails free hosting[/i] + +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. + +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! + +You would need something like this: + +[i]rails free hosting -playground -railsplayground[/i] + +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: + +- a company which offers free rails hosting for testing purposes (until they officially launch their service) +- a guy who offered some space on his private server for testing rails (no longer available) + +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. + + +[b]A few words about Boolean algebra: [/b] + +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. + +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. + +- A AND B: pages must contain both words A and B. +- A OR B: pages must contain either the word A or the word B +- NOT A: pages must not contain the word A + +Trivial. Now let's see some more examples: + +- (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". + +- (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". + +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. + + +[b]Boolean search and Google[/b] + +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. + +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. + +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. + +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". + +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. +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 [i]must[/i] 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). + +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 [i]"food -for" "cats OR dogs" -birds[/i] because Google will not evaluate the "-" operator if it is enclosed in quotation marks. Something more complex like: + +[i]((food AND for) AND (cats OR DOGS) AND (NOT birds)) OR ((stuff AND for) AND (goats OR horses) AND (NOT (cows OR bulls)))[/i] + +cannot be translated into a Google-friendly query. Normal people probably won't ever do that complicated a search, but you never know... + + +[b]All the other search engines, strategies and conclusions[/b] + +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: + +[i]((food AND for) AND (cats OR DOGS) AND (NOT birds)) OR ((stuff AND for) AND (goats OR horses) AND (NOT (cows OR bulls)))[/i] + +and I got some decent results. The only (understandable) exception is that I had to specify +for to have the word "for" included. + +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]. + +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: + +Halley kernel -Linux + +Et voila': Halley's CyberArmy Profile[15] appears as the first search result in Google! If you typed just [i]Halley[/i] 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 [i]kernel Halley[/i] you'd have found something about Kernel Halley on zZine first and then on CyberArmy lower down in the search results. + +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. + +[b]Notes and further resources[/b] +[1] Google Inc.: [url]http://www.google.com/[/url] +[2] Ruby on Rails framework: [url]http://www.rubyonrails.org/[/url] +[3] Ruby Playground: [url]http://www.railsplayground.com/[/url] +[4] George Bool, Wikipedia Page: [url]http://en.wikipedia.org/wiki/George_Boole[/url] +[5] Boolean Algebra, Wikipedia Page: [url]http://en.wikipedia.org/wiki/Boolean_algebra[/url] +[6] Google Help on Advanced Search: [url]http://www.google.com/help/refinesearch.html[/url] +[7] MySQL FULLTEXT boolean search: [url]http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html[/url] +[8] Search engines that implement boolean search (outdated): [url]http://searchenginewatch.com/facts/article.php/2155991[/url] +[9] Boolean Searching on the Internet: [url]http://library.albany.edu/internet/boolean.html[/url] +[10] How to choose a search engine or directory: [url]http://library.albany.edu/internet/choose.html#logic[/url] +[11] AltaVista Special Search Terms: [url]http://www.altavista.com/help/search/syntax[/url] +[12] AlltheWeb Query Language: [url]http://alltheweb.com/help/faqs/query_language#2[/url] +[13] MSN Search: [url]http://search.msn.com/[/url] +[14] "The Assignment Process: Search Strategies": [url]http://www.waikato.ac.nz/library/learning/g_strategies.shtml[/url] +[15] Halley's CyberArmy Profile: [/url]http://www.cyberarmy.net/~Halley/[/url]
A content/articles/cakephp-first-bite.textile

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

+----- +permalink: cakephp-first-bite +title: "The CakePHP Framework: Your First Bite" +tags: +- cakephp +- tutorial +- review +type: article +filter_pre: textile +----- +According to a recent study, PHP is one of the most popular programming languages in the world. In spite of this, PHP 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, PHP is very easy to learn, and this has often led to the common misconception that most PHP developers are inexperienced and that their code is therefore prone to security vulnerabilities and exploits."Read the full article":http://www.sitepoint.com/article/application-development-cakephp on "SitePoint.com":http://www.sitepoint.com/
A content/articles/cakephp-overview.textile

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

+----- +permalink: cakephp-overview +title: An overview of the CakePHP framework +tags: +- cakephp +- review +- tutorial +type: article +filter_pre: textile +----- +_"There are many frameworks available for the PHP programming language nowadays, and especially a lot of RAD (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 RAD philosophy - which became so popular after Ruby on Rails - to the PHP programming language. CakePHP v1.0 is now one of the most popular and intuitive solutions for PHP programming, let's discover why..."_ + +"Read the full article":http://hades.phparch.com/ceres/public/article/index.php/art::cakephp::overview on "php|architect article repository":http://hades.phparch.com/artemis/main/
A content/articles/cakephp.bbcode

@@ -0,0 +1,429 @@

+----- +permalink: cakephp +title: CakePHP - A 'tasty' solution for PHP programming +tags: +- cakephp +- review +- frameworks +- web-development +type: article +filter_pre: bbcode +----- +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". +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. + +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 [i]very limited[/i] range of functionality. Its main purpose was to make life easier for web developers who wanted to do simple tasks, like manipulating form data. + +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]. + +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 "[i]too dangerous to use in 'proper' applications[/i]". The danger, however, lies not in the language itself, but rather in the [i]way[/i] 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. + +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]. + + +[b]Bringing Order to Chaos[/b] + +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 [i]framework[/i] 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 [i]bring order to chaos[/i]: + +[quote] +[...] 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. [...] +[/quote] + +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. + +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. + +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. + +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. + + +[b]The Rails Phenomenon[/b] + +[quote] +"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." +[/quote] + +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. + +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. + +MVC stands for [b]M[/b]odel [b]V[/b]iew [b]C[/b]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 [i]should[/i] 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: + +[list] +[*][b]Model[/b]: The model represents the very essence of the [i]information[/i] and [i]content[/i] 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. +[*][b]View[/b]: 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 (X)HTML code, and mostly only that. They can therefore be changed [i]at any time[/i] without having to touch a single line of the business logic of your application. +[*][b]Controller[/b]: 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 [i]order[/i] the Model to gather information and then pass the information obtained to the view for display. +[/list] + +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. + +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. + +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 [i]clones[/i] or ports of it to another language. To my knowledge, the [i]Rails disease[/i] contaminated the following programming languages: +[list] +[*]PHP[12] +[*]Python[13] +[*]Java [14] +[*]Perl [15] +[/list] + +I said [i]disease[/i] 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. + + +[b]CakePHP: Just Another Rails Clone?[/b] + +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]: + +[quote] +"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." +[/quote] + +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". + +Quoting from CakePHP's website: + +[quote] +"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." +[/quote] + +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? + + +[b]The Ingredients[/b] + +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. + +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 [i]conventions[/i] over [i]configuration[/i]. 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. + +[b][i]/ +---app/ +------config/ +------controllers/ +---------components/ +------models/ +------plugins/ +------views/ +---------elements/ +---------errors/ +---------helpers/ +---------layouts/ +---------pages/ +------webroot/ +---------css/ +---------files/ +---------img/ +---------js/ +[/b]---cake/ +------config/ +---------inflections/ +------docs/ +------libs/ +---------controller/ +---------generator/ +---------model/ +---------view/ +------scripts/ +---tmp/ +------cache/ +------distro/ +------logs/ +------tests/ +---vendors/[/i] + +I expanded only the first three levels of the tree, although there are more levels in the [i]/cake/[/i] directory. They won't be considered here simply because the [i]/cake/[/i] directory contains CakePHP's internal libraries, which normally will not be modified when developing an application. The [i]/tmp/[/i] directory also will not be elaborated upon either, because it is only used to store temporary files. However, the [i]/vendor/[/i] 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 [i]/app/[/i] directory, which we therefore need to examine in greater detail. + +[u][i]/config/[/i][/u] +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 [i]might[/i] need to be configured. + +[list] +[*][b]acl.ini.php[/b]: This file must be edited only if you plan to use Cake's default ACL (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. +[*][b]core.php[/b]: 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. +[*][b]database.php.default[/b]: 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 (mysql, postrgres, sqlite, or any other supported by the AdoDB library[18]), username, password and database name. +[*][b]paths.php[/b]: 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. +[*][b]routes.php[/b]: Following Rails' example, CakePHP features a "routing system" for user-friendly URLs. By default, your URLs will look like this: [i]http://sitename/controller-name/action-name/eventual/action/parameters[/i], which is a really nice way to organize a site, but you may want to change something if you have particular requirements. +[/list] + + +[u][i]Controllers[/i][/u] +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 [i]index[/i] (the default action called when you access the http://sitename/controller/ page) or other user-defined ones like [i]add[/i] or [i]list[/i] or [i]admin[/i], 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. [i]Then[/i] once all the mess is done, the result (usually an array or a variable) is passed to the view (see [i]views[/i] below). + +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 [i]($this-set('variableNameInView', $variable))[/i] and other useful things. + +Recently [i]Components[/i] have been added to CakePHP, and quoting from the corresponding wiki page[20]: +[quote] +"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." +[/quote] + + +[u][i]Models[/i][/u] +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 [i]/cake/[/i] directory (along with the previously mentioned AppController class), and can be moved to the [i]/app/[/i] directory and modified if you want to add some particular site-wide behavior to it which will be inherited by all models extending it. + +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 [i]Inflector[/i] class. + +Creating a model class for basic use is trivial: + + +class Post extends AppModel +{ + var $name = 'Post'; +} + + +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. + + +[u][i]Views[/i][/u] +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 [i]foreach[/i] loops. Nothing more than that should be used in a view! + +Views must be placed in this directory and obey the following conventions: + +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). +2. Views referring to an action of a particular controller must be placed under a subfolder named after the controller. +3. All views must have a .thtml extension. + +Any site-wide view, like the site's template, must be placed under the [i]layouts[/i] 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. + +Similarly to what was said about components, [i]helpers[/i] can be used to extend views functionalities[20]: + +[quote] +"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'). + +Now, throw your myhelper.php file into the /app/views/helpers/, create the class MyHelper, and $myHelper is available in the view." +[/quote] + +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. + + +[u][i]Plugins[/i][/u] + +Plugins are user-developed enhancements for Cake. Unlike the files placed under the [i]vendor[/i] directory, a plugin is an application specifically made to be used within the CakePHP environment. At the moment this feature is still under development. + +[u][i]Webroot[/i][/u] + +If you read carefully what I wrote above about routes, you might be wondering if [i]every[/i] 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 [i]/css[/i] folder, Javascript under [i]/js[/i], and so on. Additionally, some helpers can provide a easier way to access or display images, scripts, CSS, etc. + + +[u][i]Other Features[/i][/u] +Cake offers even more than this; the latest releases have introduced a few more Rails-inspired features: + +[list] +[*][b]Scaffolding[/b]: Do you want to test your application without spending time writing all the CRUD (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. +[*][b]Bake[/b]: Another Rails-inspired feature revisited in PHP. Rails uses a set of scripts and in particular the [i]rake[/i] utility to instantaneously create the foundation for a Rails application with scaffolds already in place. CakePHP offers the same functionality through the [i]bake[/i] utility, which is currently available as either a batch file or a PHP script. +[*][b]ACL[/b]: As previously mentioned, Cake comes with a ready-made Access Control List (ACL) system, which can be extended and used to restrict particular areas of a Cake application to certain users or user groups. +[*][b]Compatibility[/b]: CakePHP is fully compatible with both PHP and PHP5. +[/list] + + +[b]Meet the Bakers[/b] + +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. + +[i][u]h3rald[/u]:[/i] Thanks to both of you for allowing me to interview you about your project, CakePHP. Where did the name come from, anyway? + +[i]PHPnut:[/i] 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. + +[i][u]h3raLd[/u]:[/i] Is Cake released under the GPL? How many developers are helping out? + +[i]gwoo:[/i] 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. + +[i]PHPnut:[/i] 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. + +[i][u]h3raLd[/u]:[/i] 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? + +[i]PHPnut:[/i] 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. + +[i][u]h3raLd[/u]:[/i] I read once that Rails was developed in Ruby because only Ruby can offer certain functionalities and features... + +[i]gwoo:[/i] 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. + +[i][u]h3raLd[/u]:[/i] Some developers, especially Perl programmers, tend to consider PHP an "inferior" language sometimes. What do you think of that? + +[i]PHPnut:[/i] My name says what I think about them all. + +[i]gwoo:[/i] 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. + +[i][u]h3raLd[/u]:[/i] 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? + +[i]gwoo:[/i] 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. + +[i][u]h3raLd[/u]:[/i] 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? + +[i]gwoo:[/i] You forgot Symfony[27], a PHP5-only port: I tried it but it seems much harder to learn than Cake. + +[i]PHPnut:[/i] 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. + +[i]gwoo:[/i] 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. + +[i][u]h3raLd[/u]:[/i] Why don't you consider CakePHP a port? In what way is it evolving from Rails? + +[i]PHPnut:[/i] 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. + +[i][u]h3raLd[/u]:[/i] What can Cake be used for? What kind of projects? Are there any limitations? + +[i]gwoo:[/i] 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! + +[i]PHPnut:[/i] 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. + +[i][u]h3raLd[/u]:[/i] 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? + +[i]gwoo:[/i] 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. + +[i][u]h3raLd[/u]:[/i] 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? + +[i]PHPnut:[/i] Come and enjoy: we are here to help... + +[i]gwoo:[/i] ...And plan to be here for a very long time! + + +[b]Let's cook...[/b] + +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. +Anybody can contribute to the framework or simply test it and share their experiences. + +[u][i]CakePHP Wiki[/i][/u] + +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. + +[u][i]CakePHP User Group[/i][/u] + +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 [i]do[/i] listen to user suggestions. + +[u][i]CakePHP IRC Channel[/i][/u] + +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. + +[u][i]CakePHP Development[/i][/u] + +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]. + + +[b]...Or Just Eat[/b] [small][i] by Marc Abramowitz[/i][/small] + +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 [i]release[/i] or a [i]nightly[/i] build: the zip file is less than 300KB. + +I wanted to include a [i]success story[/i] 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: + +[i]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. + +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. + +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. + +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. + +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. + +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. + +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. + +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. + +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. + +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): + +1. Create the database table. Cake requires tables to have some extra +fields: + - id, an auto_increment primary key + - created, a datetime + - updated, a datetime +2. Configure Cake to access the database by editing the config/database.php file +3. Create a model class which extends AppModel (a Cake provided class) +4. Create a controller class which extends AppController (a Cake provided class) and write one or more controller methods +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 [i]foreach[/i]. +Cake also provides some simple convenience methods that write out certain HTML constructs for you. + +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. + +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: + +function index(){ + return $this-findBySql( + "SELECT id, title, AVG(rating) avg_rating, MIN(rating) min_rating, MAX(rating) max_rating, COUNT(rating) num_ratings " . + "FROM ideas LEFT JOIN ratings ON ideas.id = +ratings.skill_id " . + "GROUP BY id " . + "ORDER BY title"); + } + + +So what I have is a model that does [i]not[/i] have a one-to-one mapping with a single table. It actually retrieves data from more than one table. + +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. + +Then one day I realized that Cake had a concept of layouts, which are high level templates in [i]app/views/layouts[/i] 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 [i]apps/views/elements/tabs.thtml[/i]. Then the tabs could be displayed in any template using: + +<?php echo $this-renderElement('tabs') ? + +Rather than stick the above statement in all of the many pages that were supposed to display tabs, I created a new layout in [i]apps/views/layouts/tabbed.thtml[/i] (which uses renderElement to render the tabs). Then I used + +$this-layout = "tabbed" + +in the controller to tell it to use the tabbed layout rather than the default (non-tabbed) layout. + +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: + +1. Cake is very lightweight and productive +2. Cake might be very beneficial to your career + +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, +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. + +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. +[/i] + +[b]...And the icing?[/b] + +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: + +[list] +[*]Cake's built-in [b]data-validation[/b] 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. +[*]A new default [b]ACL system[/b] will be included and will support database access and .ini files as well. +[*] The [b]AJAX[/b] helper class and AJAX support will be enhanced, featuring unobtrusive JavaScript and ALA behavior[28]. +[*] [b]Multiple applications[/b] 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. +[/list] + +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] + + +[b]Notes and Related Resources[/b] + +Special thanks to: +[list] +[*][b]Larry E. Masters aka [i]PhpNut[/i][/b] and Garrett J. Woodworth [b]gwoo[/b] for providing all the answers to my questions and contributing to create such a wonderful tool for the PHP community. +[*][b]Marc Abramowitz[/b] for sharing his experiences with the CakePHP framework and providing the content for the '...let's eat' section. +[/list] + +[small] +[1] PHP functions reference, [url]http://www.php.net/manual/en/funcref.php[/url] +[2] Framework, Wikipedia Page - [url]http://en.wikipedia.org/wiki/Framework[/url] +[3] .NET framework overview - [url]http://msdn.microsoft.com/netframework/technologyinfo/default.aspx[/url] +[4] "PHP Framework", delorian's blog, PHP Community - [url]http://www.phpcommunity.org/node/100[/url] +[5]Some popular PHP frameworks: Mojavi ([url]http://www.mojavi.org/[/url]), phpMVC ([url]http://www.phpmvc.net/[/url]), BlueShoes ([url]http://www.blueshoes.org/[/url]), Seagull ([url]http://seagull.phpkitchen.com/[/url]). +[6] PEAR - [url]http://pear.php.net/[/url] +[7] Prado - PHP Rapid Application Development Object-Oriented, [url]http://www.xisc.com/[/url] +[8] Event Driven Programming, Wikipedia Page - [url]http://en.wikipedia.org/w/index.php?title=Event_driven_programming[/url] +[9] Ruby on Rails, Official Page - [url]http://www.rubyonrails.org/[/url] +[10] Ruby on Rails, Doumentation - [url]http://documentation.rubyonrails.com/[/url] +[11] Model View Controller, Wikipedia Page - [url]http://en.wikipedia.org/w/index.php?title=Model-View-Controller[/url] +[12] PHP frameworks inspired by Rails: [url]http://phpontrax.com/[/url], [url]http://flinn.activeintra.net/biscuit/[/url], [url]http://www.cakephp.org/[/url] +[13]Python frameworks inspired by Rails: [url]http://fanery.sourceforge.net/[/url], [url]http://fanery.sourceforge.net/[/url], [url]http://subway.python-hosting.com/[/url] +[14]Java framework inspired by Rails: [url]https://trails.dev.java.net/[/url] +[15]Perl frameworks inspired by Rails: +[url]http://search.cpan.org/dist/Catalyst/lib/Catalyst/Manual/Intro.pod[/url], [url]http://perlonrails.org/index.php/Main_Page[/url] +[16] "Rails Clones: Blood suckers or useful drones?", RedHanded - [url]http://redhanded.hobix.com/cult/railsClonesBloodsuckersOrUsefulDrones.html[/url] +[17] CakePHP - Rails-inpired PHP framework, [url]http://www.cakephp.org/[/url] +[18] AdoDB, PHP Database Abstraction Layer - [url]http://adodb.sourceforge.net/[/url] +[19] CakePHP blog tutorial - [url]http://wiki.cakephp.org/tutorials:blog_tutorial_-_1[/url] +[20] Extending CakePHP - [url]http://wiki.cakephp.org/tutorials:extending_cake[/url] +[21] Smarty, PHP Template Engine - [url]http://smarty.php.net/[/url] +[22] Scaffolding a Blog, CakePHP Wiki - [url]http://wiki.cakephp.org/tutorials:scaffolding_a_blog[/url] +[23] CakePHP Wiki - [url]http://wiki.cakephp.org/[/url] +[24] CakePHP Google User Group - [url]http://groups.google.com/group/cake-php[/url] +[25] CakeForge - [url]http://cakeforge.org/[/url] +[26] CakePHP Downloads Page - [url]http://cakephp.org/downloads/[/url] +[27] Simfony, PHP5 framework - [url]http://www.symfony-project.com/[/url] +[28] ALA behavior - [url]http://bennolan.com/behaviour/[/url] +[/small]
A content/articles/concatenative-020.textile

@@ -0,0 +1,39 @@

+----- +permalink: concatenative-020 +title: Concatenative 0.2.0 released +tags: +- ruby concatenative +type: article +filter_pre: textile +----- +Version 0.2.0. of the "Concatenative":/concatenative DSL has been "released":http://rubyforge.org/frs/?group_id=8068&release_id=33575. + +Here are some highlights from the changelog: + +* Implemented new combinators: +** binrec +** split +** twodip +** threedip +* Performance improvements: +** Stack is never copied. +** No symbol/string conversion when processing words. +* Pseudo-namespace support (e.g. :kernel/:while and :math/:factorial) +* ~ and <= operators to unquote and define words, respectively. +* No more uppercase words! + +Oddly enough, I realized that it is possible to defined methods named after reserved words like "while" or "if", so now all the concatenative words (combinators) in @kernel.rb@ are now defined _without_ a leading undersore. Similarly, there's no real need to use UPPERCASE symbols, so as a result, method lookup is significantly faster and will use less resources. + +Here's how the lookup works. Say you have the following program: + +<typo:code lang="ruby"> +[[1,2,3], [4.5.6], :concat] +</typo:code> + +If @:concat@ has been defined by the user (@:concat <= [...]@), that definition will be used, otherwise the @Concatenative::Kernel@ combinator @concat@ will be called. If you want to use the corresponding Ruby method, all you have to do is specifying the arity explicitly using the @|@ operator. + +To remove any ambiguity, it is now possible to specify the _namespace_ of a word explicitly, e.g. :kernel/:concat or :ruby/concat. The @/@ operator simply concatenates the two symbols together (@:"kernel/concat"@) and sets the namespace (@:kernel@) and name (@:concat@) of the new symbol. @:kernel@ and @:ruby@ 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. + +As I pointed out in the "first article":/articles/concatenative-programming-in-ruby 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't run out of stack space (the _Ruby_ stack, in this case) too soon. + +If you have any issues to report, feature requests, etc., feel free to use "GitHub":http://github.com/h3rald/concatenative/issues to do so.
A content/articles/concatenative-programming-in-ruby.textile

@@ -0,0 +1,152 @@

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

@@ -0,0 +1,161 @@

+----- +permalink: design-patterns-in-ruby-review +title: "Book Review: Design Patterns in Ruby" +tags: +- ruby review books +type: article +filter_pre: textile +----- +!>/files/design_patterns_in_ruby.jpg! + +I finally got my hands on a shiny new copy of _Design Patterns in Ruby[1]_. 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. + +To my surprise, the book is a hardcover edition, which makes it look more professional and more durable than the average programming book[2]. It's also smaller and shorter than the average programming book[2] (340 pages), which makes it much easier to carry around and less intimidating to read. It's also _not_ meant to be a reference book, so it is actually pleasant an easy to read all in one go, as you'll soon find out. + +What is it about? &mdash; well, design patters in the Ruby language of course. But it's not the usual brainwash of programming theory you would expect by a typical book on patters, it has _plenty_ of examples of real code. When I say _real code_ I don't mean the usual Dog/Cat/Horse/&lt;insert animal here&gt; classes or juke-box simulations which don't work at all etc. etc., I mean actual snippets from well known Ruby applications, like RubyGems, FXRuby and, of course, Rails. +OK well, there's an exception perhaps: Russ _did_ include a few wild life simulations (ponds with frogs and similar), but it's only for your own good, and for the sake of tradition. + +Anyhow, let's start from the beginning...h3. Part I: Patters and Ruby + +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't find anything of overwhelming interest here. + +Personally I really liked *Chapter 1* though, "Building better Programs with Patterns", in which Russ does a great job in summarizing the original GoF book[3] into four points:: + +* _Separate our the things that change from those that stay the same._ +* _Program to an interface, not an implementation._ +* _Prefer composition over inheritance._ +* _Delegate, delegate, delegate._ + +Also, although it does not come from the Design Patterns book but from building real systems, the author adds the YAGNI (You Ain't Gonna Need It) principle[4] as a reminder to resist the temptation of implementing things which _may_ be needed _later on_, even if they are not needed right now. +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 "Ruby-only" patterns will be examined in Part III, as a special treat. + +*Chapter 2* (_Getting started with Ruby_) feels perhaps a bit out of place. As others pointed out[5], 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[6]: + +<blockquote> +"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. +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. +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." +</blockquote> + +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's quite a nice introduction aimed at the average .NET/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: + +<blockquote> +The slightly strange-looking syntax in this code is actually a tip-off something deep and important: In Ruby, everythng &mdash; and I mean _everything_ &mdash; is an object. +</blockquote> + +Of course Chapter 2 won't turn you into a Ruby guru, but it definitely fulfills one of the author's goals: bringing developers of other languages closer to Ruby, and give them a tiny taste of how Ruby can be _wickedly powerful_. + +h3. Part II: Patterns in Ruby + +Part II constitutes the bulk of the book, describing 14 GoF patterns in 220 pages. The patterns covered are the following: + +* Template Method +* Strategy +* Observer +* Composite +* Iterator +* Command +* Adapter +* Proxy +* Decorator +* Singleton +* Factory Method +* Abstract Factory Method +* Builder +* Interpreter + +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 _unnatural_ to the average Rubyist: how many times did you ever think about using an External Iterator when @each@ is normally available as default internal iterator for any Array-like class? + +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. + +h4. Introduction and Personal Anecdotes + +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): + +<blockquote> +"I remember the day we bought my son his first bike." [...] 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. +</blockquote> + +This was used to introduce the Builder pattern, and how to use it to configure objects which include different logical parts. +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. +The anecdote is then followed by the description of the actual programming problem for which the specific pattern will be used. + +h4. Description of the Pattern and Initial Implementation + +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 UML diagram. +This implementation normally has quite a few conceptual flaws, which are then examined and corrected step-by-step the chapter to obtain a more "Ruby-friendly" solution. + +h4. A More Rubyfied Version of the Pattern + +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, @Proc@ 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. + +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. + +h4. Using and Abusing &lt;Pattern&gt; + +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 _every_ chapter of part II an III) examines the pitfalls of the pattern and the most common mistakes developer make when applying it. +It is by far the most useful section of each chapter, and that's what I'll be reading and re-reading every time I'm thinking about using a particular pattern in my code. As a matter of fact, these sections make you realize that _every_ pattern has its own inherent flaws and dangers, and that it is far from being a Silver Bullet. Even when you're _supposed_ to use a pattern to accomplish something, be aware that _something nasty_ can happen unless you're extra careful: this, perhaps, is the true Golden Rule conveyed throughout the whole book. + +h4. &lt;Pattern&gt;s in the Wild + +This is another very interesting section which is included in every chapter of part II and III. After describing what a pattern does, how it _can_ be used and how it _should_ be used, you'll finally find some interesting examples taken from real world applications. +By "real world application" I mean something like ActiveRecord[7] (Observer, Command, Adapter, ...), DRb[8] (Proxy) or FXRuby[9] (Composite), for example, i.e. important programs and libraries which are used in production environments. +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. + +h4. Wrapping it Up + +"Wrapping it Up" is the title of the last section of each chapter of Part II and III. It'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 -- and the most important DOs and DON'Ts, too. + +h3. Part III: Patterns for Ruby + +By the time you get to Part III you'll definitely feel that Ruby can do _more_. Some of the Ruby implementation of certain patterns described in the book make extensive use of blocks and Proc objects, and the @method_missing@ method (although potentially dangerous unless extra care is taken) gives us a more immediate way to obtain delegation, for example when creating Proxies. +Also the fact that objects can be modified at runtime by adding and removing methods "as needed" 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 _liberal_ than Ruby when it comes to dynamic features[10]. + +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: + +* Internal Domain-Specific Languages +* Meta-Programming +* Convention Over Configuration + +These are just examples, of course some may complain because the Active Record or ORM pattern are missing, but this is understandable as it may be considered too specific compared to the others. +Each pattern is examined in detail, and I particularly like way the DSL pattern was described: Chapter 16 explains how to develop a simple but effective Ruby DSL 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. + +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). + +On the other hand, I was a bit disappointed by Chapter 17 (Meta-Programming). Maybe it'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[11] which introduces _eleven_ meta-programming techniques, and built up content and examples from there. The only reason why -- I think -- Russ didn't do it in his book was length/balance constraint: a _properly detailed_ chapter about meta-programming in Ruby could easily take up over forty pages! + +h3. The Verdict + +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'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, _useful_ tools which can truly improve the way you code. + +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. + +OK, I would have loved to see Part III as long as Part II, probably, but overall I'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've been making when coding in Ruby, so I'll now feel compelled to fix at least some of them... + +Definitely a worthwhile read, I just hope to see more books like this, or even a second edition of this one soon! + +h3. Notes + +fn1. "Design Patterns in Ruby":http://www.informit.com/store/product.aspx?isbn=0321490452 by Russ Olsen, Addison Wesley Professional, 2007. + +fn2. Think of "Programming Ruby: The Pragmatic Programmer's Guide, 2nd Ed.":http://www.pragprog.com/titles/ruby by Dave Thomas with Chad Fowler and Andy Hunt, Pragmatic Programmers, 2004. + +fn3. "Design Patterns: Elements of Reusable Object-Oriented Software":http://www.informit.com/store/product.aspx?isbn=0201633612, by By Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides (a.k.a. the _Gang of Four_), Addison Wesley Professional, 1994. + +fn4. For more information on the YAGNI principle, visit "You're NOT gonna need it":http://www.xprogramming.com/Practices/PracNotNeed.html, Ronald E Jeffries. + +fn5. See "Design Patterns in Ruby, a review":http://on-ruby.blogspot.com/2007/12/design-patterns-in-ruby-review.html, _On Ruby_blog. + +fn6. See "Russ Olsen Interview":http://on-ruby.blogspot.com/2008/01/russ-olsen-interview.html, _On Ruby_blog. + +fn7. "ActiveRecord":http://ar.rubyonrails.com/ is an implementation of the Object-Relational Mapping (ORM) pattern used by the Ruby on Rails framework. + +fn8. Distributed Ruby, see "Intro to DRb":http://chadfowler.com/ruby/drb.html by Chad Fowler. + +fn9. "FXRuby":http://www.fxruby.org/, a graphical toolkit written in Ruby. + +fn10. 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. + +fn11. "Ruby Metaprogramming Techniques":http://ola-bini.blogspot.com/2006/09/ruby-metaprogramming-techniques.html, Ola Bini: Programming Language Synchronicity. + +
A content/articles/efficient-ruby-code-shortcut-review.textile

@@ -0,0 +1,62 @@

+----- +permalink: efficient-ruby-code-shortcut-review +title: "Book Review: Writing Efficient Ruby Code" +tags: +- ruby review books +type: article +filter_pre: textile +----- +!>/files/efficient_ruby_shortcut.jpeg! + +The second shortcut from Addison-Wesley Professional series I'm going to review is called "Writing Efficient Ruby Code":http://www.informit.com/store/product.aspx?isbn=0321540034. A very promising title, especially considering that this book is only 50 pages long. + +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. + + +h3. The Author + +"Dr. Stefan Kaes":http://railsexpress.de/blog/, the author, contributed a lot to improve Ruby on Rails' performance by refactoring portions of its core and try to "get maximum speed out of performance-critical sections of code". This short but interesting shortcut groups together a lot of performance tweaks, tips and tricks but also some "anti-patterns" Kaes was able to identify through his career as programming teacher Ruby software consultant and key Rails contributor. + +h3. The Contents + +Like with the previously-covered "Mongrel shortcut":/articles/mongrel-shortcut-review, _Writing Efficient Ruby Code_ always goes straight to the point when it comes to identify problems. The first one mentioned is of course that the _Ruby Interpreter is Slow_, 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's usability in commercial projects. What you may not know is why that is so, and that's where the first part of this book comes into play. + +bq. _"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._ + +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. + +As a matter of fact, one of the most recurring tips in the book to improve code performance is the following: + +p=. *Method calls are expensive, use variables directly when possible.* + +Keep this in mind: @self.something@ is _not_ the same as @@something@. 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. +Similarly, *local variables _should_ be introduced as a way to "cache" the result of method calls*. Often you may feel "guilty" to introduce a new variable and keep calling the same method over and over: this should definitely be avoided. + +Other useful tips include, for example: + +* Use syntax constructs (e.g. assignments) as expressinons. Use evaluation precedences. +* Use interpolated strings @"... #{string_variable}"@ (there's also no performance difference if constant strings are used between @"@ or @'@) +* Use operators which update the data structure without copying it (when possible). Use @update@ or @merge@ to update hashes. +* Iterating using @for a in A@ is slightly faster than performing the same iteration using @each@, (it is the opposite in Ruby 1.9 though) +* do not use @return@ unless you have to +* test in order of expected case frequency +* Use parallel assignment (@a, b = 5, 6@) where applicable +* If a module gets included in only one other class (or module), it’s preferable to open the class instead. + +I deliberately chose not to elaborate any further on the tips listed above because otherwise I'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't, _Writing Efficient Ruby Code_ can be a short but very interesting read. + +h3. The Good + +For each of the 30 "coding patterns" (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. + +Furthermore, this _shortcut_ 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's the case it is clearly stated. + +h3. The Bad + +My only complaint about the book is probably the lack of details and more "specialized" patterns. Everything (except for a few Rails-specific tips) normally apply to Ruby _as a whole_, 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. + +It is also true that this is meant to be a _shortcut_, 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! + +h3. The Bottom Line + +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!
A content/articles/firefox-lovers-guide-to-opera.textile

@@ -0,0 +1,234 @@

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

@@ -0,0 +1,32 @@

+----- +permalink: firefox3-revealed +title: Firefox 3 Revealed +tags: +- firefox browsers writing review books +type: article +filter_pre: textile +----- +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. +After diving deeper into Firefox 3 development, reading dozens of different blogs and scouting Mozilla's web sites, I realized I was wrong: Firefox 3 introduced _a lot_ of new things, and keeping track of all of them, I admit, was quite a hard task. + +Nevertheless, I wrote the article and delivered it to SitePoint in time fore the release, but my editor "complained" that 8,300+ words was about 3 times over the minimum requirements for a feature article! +_"I don't really think that people can read the whole thing online"_ &mdash;, he said, and I somehow agreed. + +In the end, they decided to pack my "article" into a 30-pages PDF eBook which can be downloaded _absolutely free of charge_ from SitePoint web site as well, so here it is: + + +!</files/ff3-revealed.png! + +<br /><br /> +<span style="font-size: 1.5em;"> *"Firefox 3 Revealed":http://firefox.s3.sitepoint.com/ff3-revealed.zip* </span> + +If you prefer though, you can still read the article directly on SitePoint, "here":http://www.sitepoint.com/article/firefox-3-whats-new-whats-hot. + +This guide aims to give you a comprehensive overview of virtually _all_ the new features and improvements introduced by Firefox 3. + +<br /><br /> + +I would like to thank the whole SitePoint staff for giving me the opportunity to write this eBook, and in particular *"Matthew Magain":http://magain.com/blog/* for his help and support (and for creating the PDF on a Sunday evening!). +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. + +*Update:* Feel free to *"digg":http://digg.com/software/FireFox_3_Revealed_Free_ebook_from_SitePoint* this eBook!
A content/articles/from-firefox-to-deer-park.bbcode

@@ -0,0 +1,43 @@

+----- +permalink: from-firefox-to-deer-park +title: From Firefox to... Deer Park? +tags: +- firefox +- browsers +- review +type: article +filter_pre: bbcode +----- +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 [url=http://www.mozilla.org/projects/firefox/]roadmap[/url], and we're already in July). Anyhow, this developer-oriented preview release can be [url=http://www.mozilla.org/projects/firefox/]downloaded[/url] and installed on Windows, Linux, and Mac OS X systems plus eventually, [url=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/deerpark/alpha1/contrib/]Solaris and others[/url]. 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. +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. + +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. + +[b]Fixed bugs[/b] +Like any other Firefox Release, Deer Park comes with several [url=http://www.squarefree.com/burningedge/releases/1.1a1.html][b][i]Bug Fixes[/i][/b][/url]. 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: + +- [url=https://bugzilla.mozilla.org/show_bug.cgi?id=103638]103638[/url] - Targets with same name in different windows open in wrong window with javascript. +- [url=https://bugzilla.mozilla.org/show_bug.cgi?id=97283]97283[/url] - Mouse wheel scrolling does not work for elements such as div using overflow - auto or scroll. +- [url=https://bugzilla.mozilla.org/show_bug.cgi?id=251986]251986[/url] - Keyboard scrolling does not work for elements such as div using overflow - auto or scroll. +- [url=https://bugzilla.mozilla.org/show_bug.cgi?id=245829]245829[/url] - Download manager progress and title do not update correctly, wrong number of files and percentage after finishing or cancelling a download. + +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. + + +[b]New Features[/b] +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 [i][b]Sanitize Deer Park[/b][/i] and the [i][b]Report Broken Sites[/b][/i] 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? + +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. + +Additional features included are also [i]Image thumbnails as Tab icons[/i], 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. + +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 [url=https://addons.mozilla.org/extensions/moreinfo.php?id=158&application=firefox]tabbrowser preferences[/url] extension is still necessary to achieve certain behaviours). + +Regarding something more technical, among the so-called developers features there are various improvements regarding CSS support, in particular CSS2's [url=http://www.w3.org/TR/CSS21/generate.html#quotes-specify]quotes nesting[/url] and even some new CSS3 (!) features, like [url=http://www.w3.org/TR/css3-multicol/]Multi-column layouts[/url] the :only-child selector, overflow-x and overflow-y properties and even various new [url=http://www.w3.org/TR/css3-ui/#cursor]cursors names[/url]. +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 ([url=http://developer-test.mozilla.org/docs/Drawing_Graphics_with_Canvas][/url]). Last but not least, even support for [url=http://www.w3.org/MarkUp/Forms/]Xforms[/url] is already possible in Deer Park through a [url=http://www.mozilla.org/projects/xforms/]related project/extension[/url]. + + +[b]Final Thoughs[/b] +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. + +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 [i]some other product[/i] instead of Firefox or Deer Park... But that's another story!
A content/articles/git-for-the-locals.textile

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

+----- +permalink: git-for-the-locals +title: Git for the Locals +tags: +- programming +type: article +filter_pre: textile +----- +_"This is a *local* shop for *local* people, we want no trouble here!"_ + +&mdash; Edward, "The League of Gentlemen":http://en.wikipedia.org/wiki/League_of_gentlemen + +I'm normally quite cautious when it comes to IT novelties like new frameworks, new methodologies and similar, especially when it feels like they're over-hyped. Especially nowadays, it is sometimes very hard to tell whether something new is over-hyped or really a Good Thing(TM) without spending some time looking into it. And especially nowadays, finding the time to look into something new can be a real challange. + +I deliberately didn't look into Git properly since it went "mainstream" (maybe I shouldn't use this word), but when "this tutorial":http://www.spheredev.org/wiki/Git_for_the_lazy came out I couldn't resist. Sure, I knew Git was an amazingly fast distributed version control system, that "GitHub":http://github.com/ offered free accounts, that all the cool guys were slowly starting to use it in place of Subversion, etc. etc. + +What I didn't realize though, that the most obvious advantage of this DVCS was the fact that it was *distributed*, i.e., it _didn't need_ a centralized server. + +Let me repeat this: *Git _doesn't need_ a centralized server.* + +Really.h3. ...But it's not user-friendly! + +If you're a Windows user and you used Subversion before, chances are that you got accustomed to "TortoiseSVN":http://tortoisesvn.tigris.org/, too. TortoiseSVN is &mdash; in a way &mdash; a nice graphical fron-end to SVN which provides seamless Windows Explorer integration. +Git doesn't have anything like that yet. There's something in the works, sure, but nothing really comparable to TortoiseSVN. Therefore, you are _kindly suggested_ to get on and use the command line for all your git stuff. + +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 DOS prompt is no way near to bash & Co. + +For the -lazy gits- Windows users, "MSysGit":http://code.google.com/p/msysgit/ is the answer to all your problems. _Officially_ 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't like the extra layer it creates between you and an OS symulation which is not really what's on your machine.It would be great if you could get all the Bash goodies natively, without the hassle. + +that'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. +In a few click, you'll be able to use Git (and Bash!) right away: no tricks, no hassle, no kidding. + +And stop moaning about the command line not being user friendly. You want a new repository _anywhere_? Just type in the following: + +<typo:code> +git init +git add . +git commit +</typo:code> + +This will create your new repository in the current directory, add all your files and filders recursively, and perform the initial commit. What's so hard in this? Nothing. And it's faster than SVN, for sure. + +h3. Are you local? + +"Being local" has its own advantages: you know where you stand, you know what to expect, you don't depend on other people. What I didn't fully realize about Git is that it can be a 100% _local_ repository. + +The three Git commands I mentioned earlier can be used to create a repository _there_, exactly where you are: not on a server far, far away. +Let's see what this means: + +# You don't need an Internet connection anymore to use a VCS +# You don't get a .svn folder in _every_ damn directory of your project, with a load of crappy files in it. +# You get only a .git folder _at top level_, and that's where your repository actually is. Granted, there are going to be quite a few files in there, but they're not going to be scattered all over the place +# You can physically copy your repository anywhere and still use it +# You don't need to signup to GitHub for an account, if you only want your own VCS + +OK, this is an extreme scenario, but sometimes you may want your _own_ 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. +With Git, you can get all the advantages of a VCS (and an _incredibly fast_ VCS) without having to setup any server infrastructure: just install Git on your machine, and you're done. No server processes, no hassle. + + +h3. Don't connect, synchronize + +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'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 VCS, event. + +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't use SSH at work, so I wouldn't be able to push my commits back to a central repository online like GitHub. + +So here's what I did: + +# I setup a local repository for my project on a local folder at work. +# I started working on my project, did a few commits. +# After performing the last commit for the day (you are encouraged to commit often by Git, really), I synchronized that folder with my USB key, via SyncToy. +# Back at home, I used SyncToy again to synchronize my files (including the repository) between the USB key and my home computer. +# Performing a @git status@ showed that some files have been modified (all of them, actually): that's because Git detected that they weren't the same files which were committed, presumably because of different timestamps etc. +# All I did was a @git reset --hard@ to get _exactly_ the same files I committed at work, with absolutely no information loss. + +Isn'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. + +h3. Conclusion + +Git can do much more than this. Git offers some really interesting branching features, for example, which I didn'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 _anyone_, as a fast, simple and very effective private _local_ repository. In case you need one, that is (if you are really _local_).
A content/articles/google-apps-for-your-domain.textile

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

+----- +permalink: google-apps-for-your-domain +title: "Google Apps for your domain: a shared hosting killer service?" +tags: +- google +- internet +- ajax +- web20 +- review +type: article +filter_pre: textile +----- +A while ago Google started offering services like "Google Mail":http://mail.google.com/mail/ (Gmail) and "Google Calendar":http://www.google.com/calendar/ to domain owners. Sure everyone likes Gmail, but one of the few bad things about it is that it never feels "unique": your email address is always gonna be <something>@gmail.com or <something>@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: + +* small/medium business wouldn't like this: @gmail.com gives farless credibility than @domain.com +* When using Gmail with the Send As feature, messages will be sent "on behalf of", and this can potentially mess things up as some spam filters don't like it. + +Now it seems to be "official":http://seattlepi.nwsource.com/business/1700AP_Google_Business_Applications.html: Google is starting to offer customizable services to anyone who wish to sign up for it, not only as a restricted beta service. +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... + +h3. Included applications + +Note the title: "Google Apps":https://www.google.com/a/ for your domain, not only Gmail. Here's what you get: + +* "Gmail":http://mail.google.com/ - You know what it offers: a state-of-the art AJAX interface, speed, reliability, very effective spam filter, loads of space, tagging (labels) stars and all the rest. +* "Google Calendar":http://www.google.com/calendar/ - One of the best online calendar available. Features and AJAX interface, full integration with Gmail, ability to create private and public calendars, reminders, +* _Google Chat_ - Google's instant messenger, available through "Google Talk":http://www.google.com/talk/ desktop application or online, seamlessly integrated in your Gmail interface. +* "Google Web Pages":http://pages.google.com/ - aka Google's page creator, easily create webpages using Google's WYSIWYG online editor. + +Now, try imagining these four services combined and (almost) fully customizable... Still no idea? Well, keep reading for a list of all the included features. + +h3. Included Features + +In order to use Google Apps for your domain, you must of course own a domain. The next step involves changing your domain's MX entry to "ASPMX.L.GOOGLE.COM", and follow the instructions to create an administration account for your Google applications, and after a while every email sent to your domain's accounts will be routed to your new Google-powered inbox. Similarly, in order to use Google Page Creator on your domain, you're required to change the CNAME record of your DNS to "ghs.google.com". + +<blockquote> +Note: in order to avoid inconveniences especially if a lot of users use your domain's email, it is recommended that you pay attention on Google's instructions on how to set the whole thing up. For further information refer to the official "FAQ":https://www.google.com/a/FAQ. In order to be able to use Google Page Creator on your domain, you must setup an URL to publish your webpages: of course do NOT set this to "www.yourdomain.com" or any subdomain currently in use or your visitors will access the pages you created with Google Page Creator. +</blockquote> + +Here's what you get: +!/img/pictures/gmail-hosted/gmail.png! +For a bigger image click "here":/img/pictures/gmail-hosted/gmail_full.png. Let's now have a look at what are the main differences from the standard Gmail. + +<u>_*Include your own logo*_</u> +!</img/pictures/gmail-hosted/logo.png! + +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 143x59 PNG or GIF image from your domain management panel (see below). + +<u>_*Use your company name instead of Google's*_</u> +!>/img/pictures/gmail-hosted/links.png! + +Besides a custom logo, it is possible to set a company name to be used instead of "Google" or "Gmail" in page titles and links. I chose "H3RALD.com Mail" and that's displayed everywhere, including on the sign-in page. + +<u>_*Control Panel*_</u> +All the custom settings can easily be managed through an easy-to use control panel: + +!/img/pictures/gmail-hosted/options_panel.png! + +It's really easy to use and has wizards to setup all the included services and options like setting up user accounts, settings etc. + +!/img/pictures/gmail-hosted/domain.png! + +<u>_*User Accounts*_</u> +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's pretty generous considering that it seems that you're able to create around 25 user accounts. + +Already have a list of users you're like to import? Just save them in CSV format and upload them. + +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. + +<u>_*Internal Messaging System*_</u> +But there's more. We all know Google Talk: yes it's nice, but probably MSN 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 _or_ simply chat through their webmail interface, More features? Well, for example "you can setup Google Talk to work on federated networks":https://www.google.com/support/hosted/bin/answer.py?answer=34143. + +<u>_*Appointments/Projects management*_</u> +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's appointments, reminder, project deadlines by creating an unlimited number of custom calendars to share with your collaborators. + +<u>_*Design your own site*_</u> +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't develop web application themselves. So the most obvious solution is to hire some professional web developer to rip them off... erhm, to create a website for them. Now it is not necessary: by setting the correct DNS parameters, you can allow users to create their own webpages using a foolproof and advanced web editor powered by Google: "Google Page Creator":http://pages.google.com/. +I didn't set it up on my own domain, but a preview of what you can do with Google Page Creator is available "here":http://h3rald.googlepages.com/home. + +h3. Scenario + +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 "websites" with "three or more static pages". +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: + +* The best webmail interface you can possibly imagine +* Nearly unlimited space for everything +* A truly effective spam filter +* About 25 fully-featured user account, possibly more if you ask nicely +* Your own "corporate instant messenger" +* Your own calendar to manage appointments, meetings etc. +* An intuitive and advanced web page creator - not like Geocities + +All this for free. Yes, with ads (I'm not here to discuss "privacy concerns":http://www.gmail-is-too-creepy.com/), but after all they're not displayed on your main site. + +_What about Server Side technologies for my sites?_ + +OK kid, now that would be a little bit too much, even if I can foresee some possible "Google Web Widgets" at some point. "Create your _interactive and dinamic_ website within minutes, no programming knowledge required"... 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.
A content/articles/google-chrome.textile

@@ -0,0 +1,233 @@

+----- +permalink: google-chrome +title: "Chrome: Google did it again!" +tags: +- browsers review google +type: article +filter_pre: textile +----- +!</files/google-chrome/chrome-logo.jpg! + +It looks like there's a "new open source browser":http://www.google.com/chrome in town. As usual, nearly everything about it "leaked":http://blogoscoped.com/archive/2008-09-01-n47.html "before":http://www.techcrunch.com/2008/09/01/first-public-screen-captures-of-google-chrome/ its "release":http://www.google.com/chrome. Every blog that matters is talking about it, so if you didn't hear anything about it, you'd better take a look yourself. Don't be fooled by the usual "senseless ravings":http://www.techcrunch.com/2008/09/01/meet-chrome-googles-windows-killer/ of some weird, overly-hyped blogger though: a _browser_ just came out, nothing more and nothing less. It's not the end of Windows, it's not the end of the Internet, it's not the end of the world as we know it. It's just a new player in the Browser Wars. + +I particularly recommend reading the official "Google Comic Book":http://books.google.com/books?id=8UsqHohwwVYC&printsec=frontcover#PPP1,M1 about Chrome, however I included some of the most interesting parts of it in this article. It's a nice 40-page comic booklet explaining how the browser works in a friendly way... I found it quite amusing and an interesting way to -leak- distribute info on a new project. + +h3. Getting the damn thing + +You can freely download Google Chromm from "here":http://www.google.com/chrome. You'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't ask _anything_: it will just install it in Program Files by itself. Idiot proof. Clever. Some people may like it, I damn hated it. + +I downloaded it and installed it fine from home, on Vista, and it was blazing fast (on _Vista_, imagine!). I tried to do the same thing from work and I couldn'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't work. As far as I know, there's "no way around this":http://groups.google.com/group/google-chrome-help-troubleshooting/browse_thread/thread/4c07ec5124f2eebc. + +This is the reason why this article won't have any chrome screenshots... to protest against Google's stupid way of doing things "too user-friendly". + +*Update 1:* Actually, it is now possible to download the full Chrome setup from "here":http://cache.pack.google.com/chrome/install/149.27/chrome_installer.exe (Thanks "Crazy Australian":http://www.thecrazyaustralian.com/installing-google-chrome-behind-a-proxy/). + +*Update 2:* After installing Chrome, if your company uses an automatic proxy script you won't be able to browser web sites using Chrome. If that's your case, make sure you change IE's proxy settings by specifying your proxy address and port explicitly. + + +h3. How Google "re-invented" the browser + +Why did Google bother? Officially because... + +_"[...] we believe we can add value for users and, at the same time, help drive innovation on the web."_ +(from "Google Blog":http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html) + +In practice, a Google-branded browser makes sense especially because of the services offered by the search giant right now: nearly _every kind_ of web application, from mail clients to RSS readers. + +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. + +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 *8*, Opera *9.5*, ... +Safari is probably the newest of the lot, but still not quite right. + +All major browsers _evolved_ through the years, but they never really changed: so why not to start from scratch? + +Starting from scratch has a lot of advantages: + +* You can learn from other people's mistakes, and try to fix them +* You can _get things right_ from the very start +* You do not have to worry about breaking compatibility with previous versions +* People won't have extremely high expectations, and they'll be prepared for a relatively unstable product + +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! + +h3. An "old" Rendering Engine + +Let's just say that the main work was already done for Google by the "WebKit":http://webkit.org guys. The rendering engine which now powers Safari, the Nokia Series 60 browser, Gnome's Epiphany, Adobe AIR has been picked by the Google guys for Chrome. + +!>/files/google-chrome/chrome-javascript.gif! + +This is a fairly obvious choice, if you ask me. Why? + +* Presto (Opera's engine) is proprietary +* Trident (IE's engine) is proprietary, and it sucks +* Gecko (Mozilla's engine) is open source, but a bit bulky +* WebKit is open source, and arguably the fastest rendering engine to date + +The rendering engine, after all, may be considered one of the most important parts of the browser: it's responsible of what users see, after all. +Google made the right choice, in my opinion: WebKit is also the most "embeddable" and lightweight engine available, and it is also used on the Android platform for this very reason. + +h3. A "new" Javascript + +Mozilla has a "fast":http:http://www.mozilla.org/js/spidermonkey/Javascript engine, which will soon become "much faster":http://ejohn.org/blog/tracemonkey/. WebKit has a "blazing fast":http://webkit.org/projects/javascript/ Javascript engine too, don't forget. So why Google didn't just use that? + +...Because they wanted something _much_ faster than that, in their own way (as someone already "pointed out":http://null-logic.net/blog/2008/09/02/javascript-performance-comparison-with-chrome/). + +Meet *V8*, Chrome's very own Javascript Virtual Machine. When reading the Chrome Comic, I was particularly impressed of two improvements introduced by this new javascript VM: + +!>/files/google-chrome/chrome-javascript-gc.gif! + +* It actually compiles Javascript to machine code via a Just-In-Time compiler (JIT). This means that whenever you refresh a page containing Javascript the browser won'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 _exactly_ in the same direction with their own engine, and JIT compilation will be added as of Firefox 3.1. +* V8's incremental garbage collection looks like a much better alternative to the current conservative garbage collection methods used for Javascript. Because of V8's new concept of Hidden Class Transitions, V8 knows _exactly_ when something is no longer needed and thus it is able to garbace-collect it more effectively. + +While there has been some initial "skepticism":http://nexus.zteo.com/2008/09/01/google-chrome-an-index-of-what-developers-need-to-know-good-and-bad/ on this new Javascript implementation, it looks like Google did it right. If you don't believe it you can "download":http://code.google.com/apis/v8/intro.html V8's C++ code and try it out yourself. + +h3. One Process per Tab + +Google Chrome is the first multi-process browser. The idea is that _each tab_ (because you can't do browsers without tabs, these days, right?) has its own phisical process and it is therefore independent from each other. + +!>/files/google-chrome/chrome-processes.gif! + +Hang on, isn't that what IE 5 did? A new instance of the browser for each window? No, not quite: there's a single instance of the browser and _multiple_ tab instances. Each tab is independent in the sense that it has its own address bar, but it's just a tab, at the end of the day. + +This is what Internet Explorer could have done, _before_ Internet Explorer 7, as an answer to the traditional concept of tabs promoted by Mozilla and Opera. + +Actually, it turns out that "this is _exactly_ what's planned for Internet Explorer 8":http://blogs.msdn.com/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx, as "someone":http://www.sriramkrishnan.com/blog/2008/09/thoughts-on-new-browser-wars.html already pointed out! + +Additionally, Google thought of building in a mini task manager to let users monitor the CPU and memory usage of each tab. This is interesting, but it has a few implications discussed later on in this article. + +What'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. +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). + +What's also remarkable about Chrome's tabs is the way you can interact with them: + +* You can move them around smoohtly, exactly like with Safari +* You can detach them by drag and drop +* You can re-attach them by drag and drop (which is truly awesome!) + +h3. -AwesomeBar- _OmniBox_ and -Speed Dial- _New Tab Page_ + +Did you like Mozilla's AwesomeBar? Well, I personally did, others didn't so much. Meet OmniBox(TM) Google's very own, semi-sentient address bar which really understands you. + +Here's what you can do with it: + +* Type in URLs and view web sites (it would be damn funny if it couldn't do that) +* Get -extra Google crap- useful suggestions while typing. This includes, but it is not limited to: +** Pages you visited +** Bookmarks +** Popular pages (guess who decides that...) +* Custom searches: search IMDB, Wikipedia, Amazon and google itself with a few clicks + +!/files/google-chrome/chrome-bar.gif! + +Unlike Firefox's AwesomeBar, Google's OmniBox seems more "evolved": it doesn't get too much in your way, it lets you go where you want to go, and it's smart about searching. Apparently Mozilla is already planning to remove the search bar completely and incorporate it in the AwesomeBar... but Google released it first, sorry guys. + +The other handy thing they -stole- kindly borrowed from Opera is the _New Tab Page_, basically like Opera's Speed Dial, but with two interesting things: + +* It displays the nine _most visited_ pages: you don't have to configure it! +* It displays search boxes for the most visited sites where you searched something on. + +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'll miss this too: the pages I have in my speed dial are NOT necessarily the pages I visited the most! + +I guess I'll get used to it, though... + +h3. Relax, it's Google! + +Google is not Evil(TM). 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 _looks_ good for you. You have absolutely no reason to fear Google. + +They did it again: they apparently released a new browser which definitely looks inherently more secure than competitors. +Here's why: + +* It has an _Incognito_ mode, which lets you browse everything you want without logging anything anywhere. +* 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. +* 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't apply. +* Chrome continuously downloads lists of malicious sites, so that you're protected against phishing in real time. + +!</files/google-chrome/chrome-blame.gif! + +Now, if everything goes wrong, you know it's definitely _someone else who did it_. If you read the comic book between the lines, you'll notice a not-so-subtle message to the end users: + +* The browser is sandboxed, so if anything goes wrong, blame others (Adobe for Flash, Sun for Java, Microsoft for some other crap) +* You can monitor the resource consumption of each tab, _ergo_ what _each website_ uses. This means that if a site is slow is definitely the web developer's fault. + +This is basically what "John Resig":http://ejohn.org/blog/google-chrome-process-manager/ immediately pointed out when the comic came out. + +h3. How it feels + +Google Chrome is clearly a very nice product to use. It's as intuitive as IE for the average Windows user, it has the best of Firefox and Opera features and it's even more sleek than Safari. The UI, in my opinion, is a true masterpiece and feels well though out. + +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 "download bucket" at the bottom of your tabs, and you can just drag and drop what you downloaded anywhere you like, if you need to. +Why nobody thought of this before? + +Even the program settings are simple to understand. The Options dialog is divided in "Basics", "Minor Tweaks" and "Under the Hood". 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 "Under the Hood" with "Roba da smanettoni" which means something like "Stuff for people who fiddle with PCs". I personally found this translation a bit irritating, but anyway... + +h3. Media Coverage and Target Audience + +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). + +Google's marketing strategy is quite clear, and it doesn't seem to be failing on any point: + +* They targeted Windows first, because that's what the bulk of IE aficionados uses. +* They did their best to make it as user-friendly as possible: the sleek GUI, the comic book, etc. +* They spread the world like crazy: every blog is talking about it, but also major news sites like BBC and CNN. 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 _in Italy_! +* At the same time, they made the whole thing open source, released APIs and emphasized this, so that "computer fiddlers" couldn't resist. + +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. + +h3. Open Source, testing and quality + +Google is well known for its massive infrastructure. Moreover, Google is the only "entity" (let's call it that way, shall we) who _knows_ and _visited_ almost every web page on the Internet. If something is not "on Google", it may well not exist at all: this is not strictly true, but it's the user perspective and ad the end of the day that's all that matters. +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. + +From the Google Chrome Comic: + +_"Within 20-30 minutres of each new browser build, we can teswt it on tens of thousands of different web pages"_ + +...and that's certainly not an understatemend: you can believe that. + +!/files/google-chrome/chrome-tests.gif! + +Google seems very concerned of building a "rock-solid" browser rather than being the coolest guy in town, and that's a good sign. Google is _smart_, remember? + +As if it weren'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: + +* Free testers +* Free developers +* Good publicity + +!/files/google-chrome/chrome-os.gif! + +If things go as planned, Chrome may become the most widely tested piece of software in the world. Let's just see how the community takes this. + +h3. Why it matters + +Everyone seems to have gone crazy about Chrome, even long before it was made available. Why does it matter, anyway? Isn't it just a browser, at the end of the day? Well, yes, but: + +* It'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's new API will flock to the 'fox like crazy. +* It's small, fast and very promising. Sure, it's not perfect, but YOU can help improving it. Get it? +* It's on Windows, so it will reach the majority of Internet users... in theory. + +Last but not least, it comes bundled with "Gears":http://gears.google.com/, i.e. what Google would like you to use for RIAs. That's perhaps the only "subliminal" message they are trying to send to their users (for now, at least). +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 _neutral_ and unbranded version of Chrome. + +See? Google is not evil at all, it's just smarter than others. + +h3. The Bottom Line + +Google showed us once more that their "innovation" can be summarized with the following: + +_*"Do not invent new things, just make them better"*_ + +They didn't invent Internet search: they just made it better and smarted. The same philosophy applies to Chrome, too. Some examples? Sure: + +* They didn't create a new rendering engine, they used an existing one +* They analyzed Safari's neat GUI tricks and implemented something even better. +* They added an IE8-like domain highlight in the URL. +* They got the Firefox's AwesomeBar and improved it. +* They got Opera's Speed Dial and improved it. +* They got IE8's one-process-per-tab architecture and improved it. +* They didn't think of a Javascript JIT first, they just made it widely-available first. +* They didn't think about merging the address bar with the search bar, Mozilla announced it first, but Google released it before they did. +* Safari 4 allows users to create shortcuts for their favorite web apps, but unfortunately it's only out for developers... + + +Google did it, again. Exactly as planned.
A content/articles/google-earth.bbcode

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

+----- +permalink: google-earth +title: "Software Review: Google Earth" +tags: +- review +- google +type: article +filter_pre: bbcode +----- +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![b]In the beginning...[/b] + + +[url=http://www.nasa.gov/home/index.html?skipIntro=1]Nasa.gov[/url] 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. +Perhaps one of the most wonderful things NASA did software-wise was the realization of an open source software called [url=http://worldwind.arc.nasa.gov/index.html]WorldWind[/url]: [i]"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."[/i] +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? + +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. + + +[b]Google enters the scene[/b] + +"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 [url=http://www.kuro5hin.org/story/2005/6/12/143721/743]here[/url]). +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. + +Anyhow, Google [url=http://www.google.com/press/pressrel/keyhole.html]purchased[/url] 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. + +Then everything went (almost) silent, until June 18th, 2005, seven months and one day since the acquisition of Keyhole, Google officially [url=http://slashdot.org/article.pl?sid=05/06/28/1733229&amp;from=rss]released[/url] a new product, called [url=http://earth.google.com/]Google Earth[/url]. [i]"Thus the heavens and the earth were finished, and all the host of them" [Gen. 2:1][/i] + + +[b]Welcome to a brand new world[/b] +Pseudo-biblical jokes apart, Google's new Earth can be downloaded and installed FOR FREE! Go and [url=http://desktop.google.com/download/earth/index.html]get it[/url] 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... +So that's why, also thanks to Google, I found some [url=http://www.majorgeeks.com/download4659.html]Major Geeks[/url] 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. + +[i]Minimal Configuration[/i] + * Operating system: Windows 2000, Windows XP + * CPU speed: Intel? Pentium? PIII 500 MHz + * System memory (RAM): 128MB + * 200MB hard-disk space + * 3D graphics card: 3D-capable video card with 16MB VRAM + * 1024x768, 32-bit true color screen + * Network speed: 128 kbps ("Broadband/Cable Internet") + +[i]Recommended Configuration[/i] + * Operating system: Windows XP + * CPU speed: Intel? Pentium? P4 2.4GHz+ or AMD 2400xp+ + * System memory (RAM): 512MB + * 2GB hard-disk space + * 3D graphics card: 3D-capable video card with 32MB VRAM or greater + * 1280x1024, 32-bit true color screen + * Network speed: 128 kbps ("Broadband/Cable Internet") + +[i]h3raLd's crappy PC's Configuration[/i] + * Operating system: Windows XP + * CPU speed: Intel? Pentium? PII 350 MHz + * System memory (RAM): 256MB + * 30 GB hard-disk space + * 3D graphics card: nVidia GeForce II MX 32MB VRAM + * 1024x768, 32-bit true color screen + * Network speed: 1240 kbps + +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 [url=http://appdb.winehq.org/appview.php?versionId=3254]wine[/url] (rated "bronze"). + +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 [url=http://newrecruit.org/archives/2005/may/googlekeyhole]article[/url], and in particular at the screenshots. +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. + +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. + +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. +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. +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. + +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. + +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. + + +[b]Limitations and Opinions[/b] + +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. + +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 [url=http://earth.google.com/product_comparison.html]features[/url] and support. +What of Microsoft? Well, Microsoft is said to be planning to "strike back" during this summer, with [url=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[/url], let's just wait and see...
A content/articles/h3rald-71.textile

@@ -0,0 +1,23 @@

+----- +permalink: h3rald-71 +title: Introducing H3RALD.com v7.1 +tags: +- website +- rails +type: article +filter_pre: textile +----- +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 _Nitefall_ theme, but a lot of people found a bit too dark for their liking. + +I decided to go for something more -boring- 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: + +* No more sidebars &ndash; Who needs them anyway? Who wants to see my "delicious bookmarks":http://www.delicious.com/h3rald on _every single page_? Who wants to see that annoying Web 2.0-ish tag cloud listing all the tags I've ever used from 2006 onwards? I suddently realized that the right column was nothing more than wasted space, so I removed it altogether. +* No more differentiation between _articles_ and _blog posts_ &ndash; As a matter of fact, I'm not posting little pointless tidbits everyday, it'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 "traditional blog" anymore, just a publishing platform for my articles. +* No more "previews" &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 "Read More" links. +* Just three main pages: "Home":/, "Archives":/archives, and "About":/about. Although there may be some more for special projects, at some point. +* Use the "Archives":/archives to find my articles. There you'll find a list of the 20 most used tags, a search form, and a timeline listing _all_ my articles from 2006 onwards. +* 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 "About":/about page. + +I hope you like the new design, or at least I hope it makes my articles more readable. However, I'm open to suggestions, as usual. + +P.S.: I dropped with Internet Explorer 6 compatibility According to my stats, less than 5% of my visitors use it, so it's not worth the extra hassle.
A content/articles/h3rald-v7-overview.textile

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

+----- +permalink: h3rald-v7-overview +title: Back on Track... +tags: +- website +- rails +type: article +filter_pre: textile +----- +...or better, on "Rails":http://www.rubyonrails.org_. +Yep, this 7th (!) version of the H3RALD website is powered by the overly-popular Ruby web framework _and_ by the "Typo":http://www.typosphere.org blogging platform. + +Nope, I decided not to re-develop my website entirely from scratch this time, although I was tempted to, for three simple reasons: + +# My "coding time" is close to non-existent nowadays, and even with a framework like Rails re-developing a site from scratch would have taken at least _some_ time, which at the moment I don't have. +# 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't break thanks to Rails' routing system, migration was easy enough, and developing the missing bits (like a rudimentary BBCode parser and a TextLinkAds sidebar) wasn't hard at all. +# I wanted to take a break from my site, not code it again. +_Fair enough, but why the new site anyway?_ + +Again, there's more than one answer: + +* Lately I didn't feel comfortable sporting a Cake-powered website \- that makes sense, to an extent, right? Good. +* I got fed up with spam. I wanted to re-open comments but I didn't want to implement spam protection for the old site. +* To be totally honest, I got fed up with PHP itself as well, after trying out Ruby for a few days and ordering and reading the 2nd edition of the "PickAxe":http://www.pragmaticprogrammer.com/titles/ruby/, which I _highly_ recommend. + +...But let's say something about what's new in this new release, shall we? + +* 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's time to buy an LCD one... +* Comments, trackbacks, desktop client support, theme support, a cool admin area and everything else Typo offers. +* Full RSS feeds. With no ads. So you don't need to see this black blob anymore, if you really don't like it. +* No projects or bookmarks, just my blog and my articles. Let's keep it simple. + +More to come... +
A content/articles/herald-vim-color-scheme.textile

@@ -0,0 +1,45 @@

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

@@ -0,0 +1,98 @@

+----- +permalink: hlrb-review +title: "Book Review: Humble Little Ruby Book" +tags: +- ruby review books +type: article +filter_pre: textile +----- +After reading the very first paragraph of Mr. Neighborly's "Humble Little Ruby Book":http://www.humblelittlerubybook.com/ (HLRB for short, from now on) it was very clear to me that it was going to be quite an unconventional read: + +<blockquote> +"Yes, there is a Chapter 0. There is a little bit of introductory stuff we need to talk about before +we set you loose on Ruby. You wouldn't want to get psyched about a new gadget, get it home, +and then figure out you need batteries, a grapefruit, and the ability to speak three languages to +even open the box would you?" +</blockquote> + +That reminded me immediately of "Why's Poignant Guide to Ruby":http://poignantguide.net/ruby/. without a doubt. I don'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't find any foxes or chunky bacon cartoons in HLRB, just some very well made (although still pretty unconventional) diagrams like this one: + +!/files/hlrb_diagram.png! + +Got the picture? Good. Let's move on...h3. Chapter 0: What'chu talkin' 'bout, mister? + +Chapter 0 is like an introduction to the book _and_ a place to put all the boring stuff you have to talk about in a book about a programming language: + +* What is Ruby? +* Installation procedure (on Windows, Mac OS X and Linux) +* Hello, World! + +Yes, you can skip this one safely without losing too much, unless of course you still need to install Ruby on your machine. + +h3. Chapter 1: Welcome to Ruby. + +<blockquote> +"This section aims to introduce the syntactic sugar and linguistic misfortunes of Ruby in the +quickest manner that will still allow for a full education on the subject." +</blockquote> + +As the first two lines of this chapter say, it's time to learn the basics of Ruby. You'll be quickly guided through strings, numbers, collections and variables. Every section with tons of code examples for your to play with. You won't find a full list of all the 876 methods of the String class, but you'll certainly learn the 10 most common ones at least (numbers are random, so no, don't count them). +Sure, yes, right, whatever... _if you really want_ you can skip this chapter too, but if you are already a Ruby Guru there's probably no need for you to read books about Ruby, right? Beginners need to read this chapter. It's compulsory, really, and pretty enjoyable, too. + +h3. Chapter 2: Break it down now! + +Or "learn how to segment your code" using methods, and... blocks & @Proc@ 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'll have to face your fears and dive into it. You'll survive, anyway. + +*Purist Warning:* 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 _"Think of Proc objects as blocks that are pushed into variables."_ than anything else, guaranteed. + +After this section you'll finally be introduced to Ruby classes. Now, this can piss someone off, no doubt. Ruby is a _fully OO language_, so people _must_ 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'll probably find this particular order more suitable. +This section will cover class and object basics in Ruby like defining classes, instantiating objects, access control, methods, attributes, scope, duck typing. Finally, you'll briefly look into modules as well. + +h3. Chapter 3: Hustle and flow (control) + +Finally, the author will deal with flow control. So things like @if@, @case@, 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. +Towards the end of the chapter, you'll also learn how exceptions work: a clever way to tell people "you have to learn how to use exceptions from the very beginning". Really nicely done. + +h3. Chapter 4: The system beneath... + +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 _real things_. The chapter is full of complete and meaningful code snippets which will answer nearly all the questions you may have (at this time): + +* How do I read and write to a file? +* How do I handle threads and processes? +* How do command-line parameters and environment variables work? +* How can I perform specific Windows-only operations, like reading and writing to the Registry? What about OLE automation? + +Some of the big books out there will not spend too much time talking about Windows-only libraries, but I found HLRB gives quite a comprehensive introduction about them. + +h3. Chapter 5: Looking beyond home + +More juicy stuff. If you are looking for a tutorial to learn the basics about networking, from from sockets to FTP to POP 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. +If that's still not enough, you'll also have a chance to explore the wonderful world of distributed Ruby and of databases. Granted, this chapter won't tell you about the 1567 methods available in ActiveRecord (buy a copy of "Agile Web Development with Rails":http://www.pragmaticprogrammer.com/title/rails/ for this), but will tell you enough to get started. + + +h3. Chapter 6: It's a Library! + +The final chapter will go more in depth on some more advanced topics, like: + +* Strings +* Regexp +* Date & Time +* Hashing and Cryptography +* Unit Testing + +Everything with more and more useful code snippets. + +h3. The Appendices + +Last but not least, a HUGE collection of links and resources to learn more about Ruby, and a quick digression on C/C++ extensions... not much, but enough to wet your appetite. + + +h3. The bottom line + +HLRB is not _the only_ book you need to read about Ruby. It's better to make this clear otherwise I'll be hunted forever by Dave Thomas, Chad Fowler, DHH and all the other excellent Ruby hackers who also wrote very successful books (which I bought as well). HLRB is LITTLE and HUMBLE, after all: it doesn't aim at becoming the official Ruby Bible anytime soon (although a bird told me it may get updated _someday_ and include more stuff), but it is still a worthwhile reading. + +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 "free copy":http://www.infoq.com/minibooks/ruby/. If you want you can buy a printed copy for just $9.95, if you feel in a good mood (please do). + +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'd say some parts should be expanded and more info on other libraries should be provided... but you never know what the future will bring us! + +Well done, "Mr. Neighborly":http://www.jeremymcanally.com/!
A content/articles/holiday-house-for-rent.textile

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

+----- +permalink: holiday-house-for-rent +title: Holiday house for rent +tags: +- personal +type: article +filter_pre: textile +----- +<img src="/images/sessarego/outside.jpg" style="float:left; border: 1px solid #B80000; margin-right: 10px;" /> + +Part of my family house in the countryside is now available for rent! It's located in the small village of "Sessarego":http://italia.indettaglio.it/eng/liguria/genova_bogliasco_sessarego.html, a few minutes away from the coast, on the Italian Riviera. +We'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. + +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. + +<div style="padding: 30px"></div> + +*For more information, see "this page":/holidays and feel free to "contact me":/about if you want to book your stay or you needmore details!*
A content/articles/ie-lovers-guide-to-firefox.bbcode

@@ -0,0 +1,188 @@

+----- +permalink: ie-lovers-guide-to-firefox +title: An IE Lover's Guide to Firefox +tags: +- ie +- firefox +- microsoft +- firefox +- browsers +type: article +filter_pre: bbcode +----- +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. +[b][u]My Point of View[/u][/b] +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. + +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. + +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. + + +[b]IE: I've used it for years and it does the job[/b] + +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 [i]Windows XP[/i]. I just had to click on the start button and choose "Internet" from the pop-up menu. "Straightforward," I thought. "Anybody can do that!" +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! + +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 [url=http://www.adobe.com/products/acrobat/readstep2.html]PDF viewers[/url]. I also discovered that I could even [url=http://www.microsoft.com/windows/windowsmedia/mp10/default.aspx]listen to music and watch videos[/url] through my browser, directly from webpages. + +Then I discovered toolbars - and I wasn't entirely happy about them. I installed [url=http://toolbar.google.com/index_2]Google Toolbar[/url], 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. + +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! + +I really don't understand how people can run an operating system other than Windows: the Web was [b]made[/b] for Internet Explorer! It's even [url=http://www.microsoft.com/mac/products/internetexplorer/internetexplorer.aspx?pid=internetexplorer]available for Macintosh[/url]. + +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." + +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. + + + + +[b][u]Face to Face with a Fox[/u][/b] +My friend told me to download this thing from a [url=http://www.mozilla.org/products/firefox/]website[/url], 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 [url=http://www.mozilla.org]Mozilla Foundation[/url] which has received a lot of [url=http://www.mozilla.org/press/awards.html]awards[/url] from various well-known computer-related websites and institutions. It also seem to have a promotional [url=http://www.spreadfirefox.com/]website[/url] 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. + +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. +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. + +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 [url=http://www.netscape.com]Netscape[/url] thing my friend made me try a few years ago. That at least had an email client and other things included with it. + +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 [url=http://v4.windowsupdate.microsoft.com/en/thanks.asp?]anymore[/url]. I switched back to IE after a few minutes of pointless struggle. + + +[b]Here's What You Get[/b] +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. +The first thing he mentioned was the different terminology used by the two browsers, which can be summarized as follows: +[code] +| Internet Explorer | Firefox | +| Internet Options | Options | +| Temporary Internet Files | Cache | +| Favorites | Bookmarks | +| Address Bar | Location Bar | +| Refresh | Reload | +| Links Bar | Bookmarks Toolbar | +| Explorer Bar | Sidebar | +| Copy Shortcut | Copy Link Location | +| Save Target As | Save Link As | +[/code] +and that once you get used to the new terms, finding what you're looking for is easier than in Internet Explorer. + +My friend also said a new feature implemented by Firefox is [b][i]popup blocking[/i][/b]. 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. +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 [url]http://www.mozilla.org/products/firefox/[/url]. This is accomplished through Google's "[url=http://www.google.com/help/features.html#lucky]I'm Feeling Lucky[/url]" 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. + +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 [b][i]Tabbed Browsing[/i][/b] feature: I knew about it already, because IE started implementing that through the [url=http://toolbar.msn.com/]MSN toolbar[/url], but it's a bit[url=http://weblogs.mozillazine.org/asa/archives/008312.html]buggy[/url], so I didn't even try it. Firefox has had this feature since its very first [url=http://www.mozilla.org/products/firefox/releases/0.1.html]release[/url], so I guess it they represents a fully-functional, stable, and key feature of the browser. Tabbed browsing introduces a new [i]philosophy[/i] for browsing the web: there is only one browser window, but it can have multiple [i]tabs[/i], 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 [i]File[/i] menu. It takes a while to get used to it, but after a while I couldn't really live without it! + +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 [url=https://pfs.mozilla.org/plugins/]plugins[/url]. 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. + +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 [b][i]search capabilities[/i][/b]. +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 [i]another toolbar[/i], and I ended up with something like three different toolbars under the address bar, so I could hardly see the webpages I was browsing! + +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 [url=http://mycroft.mozdev.org/download.html]others[/url] 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 [url=http://mycroft.mozdev.org/generator/]easily[/url]. + +But let's come back a bit to when I ran Firefox for the first time: where did my IE Favourites go? Under the [i]Bookmarks[/i] menu, obviously, and they even kept their folder structure. They can be organized through the [i]Manage Bookmarks[/i] option, and indeed Firefox's [i]Bookmarks Manager[/i]'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. + +Firefox also implements [i][b]Live Bookmarks[/b][/i]: some sites, especially news-related ones like [url=http://news.yahoo.com/]Yahoo News[/url] and [url=http://news.bbc.co.uk/]BBC News[/url], and [url=http://slashdot.org/]Slashdot[/url] offer [url=http://en.wikipedia.org/wiki/RSS_%28file_format%29]RSS[/url] feeds which are updated several times a day. With Firefox, you can [i]subscribe[/i] to a particular site's RSS by clicking on the little square orange icon which appears on the status bar, and a [i]Live Bookmark[/i] will be saved. They appear under the [i]Bookmarks[/i] menu, in a specific folder, and also on your [i]Bookmarks Toolbar[/i] 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. + +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 [i][b]Download Manager[/b][/i] 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 [i]Tools-Downloads[/i]. 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. + +[i][b]Options[/i][/b] is more complex to deal with, as Firefox does not rely on Windows' [i]Internet Options[/i]. Firefox's Options (under the [i]Tools[/i] menu) are more complete and better organized, as they are clearly divided into 5 main categories: + +[i]General[/i] +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. + +[i]Privacy[/i] +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. + +[i]Web Features[/i] +This panel is for setting your preferences regarding popup blocking, software installation, images, Java and JavaScript. + +[i]Downloads[/i] +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. + +[i]Advanced[/i] +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. + +[i]Is That All?[/i] +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: [url=https://addons.mozilla.org/]Mozilla Update[/url]. "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. + + +[b]Extensions and Themes[/b] +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 [b]create[/b] 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. + +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 [i]extensions[/i] and [i]themes[/i]. The numerous [url=https://addons.mozilla.org/extensions/?application=firefox]Extensions[/url] enhance Firefox by adding new features which - honestly - I never thought were even conceivable to be included in a browser. Furthermore, Firefox also has [url=https://addons.mozilla.org/themes/?application=firefox]Themes[/url], so you can change the browser into something completely different, with different icons, shapes and colors! + +It's worth it to mention some [i][b]Extensions[/b][/i] which really impressed me by the functionality or behaviours they added to Firefox: + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=10&application=firefox][i]Adblock[/i][/url] +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. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=158&application=firefox][i]Tabbrowser Preferences[/i][/url] +This adds a new category in your Options called [i]Tabbed Browsing[/i], 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. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=220&application=firefox][i]FlashGot[/i][/url] +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. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=743&application=firefox][i]CustomizeGoogle[/i][/url] +This personalises Google-related sites and services, such as using [url=http://www.google.com/webhp?complete=1&hl=en]Google Suggest[/url] in every search, filtering content and ads, anonymizing data transmitted to Google, and much more. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=398&application=firefox][i]ForeCastFox[/i][/url] +Get weather forecasts from all over the world displayed directly on your status bar or anywhere you want. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&category=Developer%20Tools&numpg=10&id=60][i]Developer Tools[/i][/url] +This is THE ultimate solution if you are a web developer or interested in knowing more about webpages. With this extension you can: +- Disable [b]anything[/b] with a single click (images, JavaScript, cookies, colors, animations, etc.) +- Get CSS information or modify a page's CSS +- Have fun with Forms (convert POSTs to GETs, show hidden fields, and so on) +- Perform image-related operations: show paths, attributes, outline particular images, etc. +- Get infos about various elements on a page +- Clear history, cookies, open java console, view document's source +- Outline particular elements (images, tables, etc.) +- Resize your browser to a custom or predefined resolution +- Validate a page (HTML, CSS, WAI accessibility, speed reports) + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=33][i]Googlebar[/i][/url] +Clone of the IE Google Toolbar. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=270][i]Yahoo Companion[/i][/url] +Clone of the IE Yahoo toolbar. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=219][i]FoxyTunes[/i][/url] +Control your favourite media player (several programs supported) directly from Firefox! + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=16][i]ChatZilla[/i][/url] +A complete, fully functional, easy-to-use IRC client which runs from Firefox. + +[url=https://addons.mozilla.org/extensions/moreinfo.php?id=684][i]FireFTP[/i][/url] +Fully integrated FTP client. + +There are actually many more extensions available from either the Firefox website or other [url=http://www.extensionsmirror.nl/]portals[/url] which can be very useful, depending on your needs, but there are also [b][i]Themes[/i][/b] which can change Firefox's look and feel completely, such as: + +[url=https://addons.mozilla.org/themes/moreinfo.php?id=7&application=firefox][i]Qute[/i][/url] +This theme inspired Firefox default theme: "Icons designed to be modern, dynamic and fresh, with attention paid to usability and comfort over extended use". + +[url=https://addons.mozilla.org/themes/moreinfo.php?id=101&application=firefox][i]Silverskin[/i][/url] +"Your favourite browser with a silver skin (With the Qute icons by Arvid Axelsson)" + +[url=https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=414][i]Saferfox Xpanded[/i][/url] +"A full skin theme with a modern aqua design" + +[url=https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=213][i]Plastikfox Crystal SVG[/i][/url] +"Plastik style from KDE with Crystal SVG icons" + +[url=https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=72][i]Noia (eXtreme)[/i][/url] +"This theme is based on the Noia2.0 icon set by Carlitus." + +[url=https://addons.mozilla.org/themes/moreinfo.php?application=firefox&category=Popular&numpg=10&id=548][i]Brushed[/i][/url] +"A Brushed and Polished Browser Interface." + +Again, many more themes are available. There's something for everyone, really! + + +[b]To switch or not to switch?[/b] + +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 [i]your browser is incompatible[/i] when actually it's [i]the site[/i] which is not compatible with [url=http://www.w3c.org/]Web Standards[/url]. +Furthermore, [url=http://www.microsoft.com/com/default.mspx]ActiveX[/url] 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 [url=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[/url] on it. Final note: If you need to switch back to IE for some reason, the [url=https://addons.mozilla.org/extensions/moreinfo.php?id=35]IE View[/url] extension can quickly give you the opportunity to do so, opening IE to view the page you're visiting. + +It looks like the Browser Wars have started again, and as a matter of fact, Firefox is becoming known for its features, innovations and [url=http://www.mozillazine.org/]community support[/url]. 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. + +One thing is certain: The existence of IE lovers is debatable, but there are over [url=http://www.spreadfirefox.com]170 million[/url] Firefox lovers. Go [url=http://www.mozilla.org/products/firefox/]get it[/url]!
A content/articles/im-on-twitter-anyway.textile

@@ -0,0 +1,17 @@

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

@@ -0,0 +1,232 @@

+----- +permalink: incomplete-guide-to-london +title: Fabio's (In)complete Guide to London +tags: +- travelling +type: article +filter_pre: textile +----- +This summer I finally had a chance to spend _a whole week_ 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)'s brother Caspar was happy to host us at his place, for free.<a name="top"></a> + +h3. Table of Contents + +* "Preamble":#pre +* "Transportation":#trans +** "Planes":#planes +** "Trains, coaches and cabs":#trains +** "The tube and buses":#tube +* "Food":#food +** "Rubbish Food":#rubbish +** "Healthy Food":#healthy +** "Brick Lane":#brick +* "Entertainment":#enter +** "Clubbing":#club +** "Museums":#museums +** "Theatres":#theatres +** "Shopping":#shop + +<a name="pre"></a> "[Back to Top]":#top + +h3. Preamble + +This summer I finally had a chance to spend _a whole week_ 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)'s brother Caspar was happy to host us at his place, for free. + +Although we obviously had to pay for our flight, transport, food, etc. etc., we didn'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 - unless of course you get to stay at Caspar's place. + +<a name="trans"></a> "[Back to Top]":#top + +h3. Transportation + +Getting there is relatively easy and if you come from Europe there's a quick answer to the universal traveller's question: + +_"Is there any cheap, reliable and on-time airline?"_ + +<a name="planes"></a> "[Back to Top]":#top + +h4. Planes + +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. "RyanAir":http://www.ryanair.com 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't provide full meals aboard, they don't have any cutlery on board for you to steal, unlike "BA":http://www.britishairways.com/travel/globalgateway.jsp/global/public/en_, and flight attendants are not hot either, unlike "BA":http://www.britishairways.com/travel/globalgateway.jsp/global/public/en_, but since I'm happily engaged and Roxanne doesn't fancy me stealing BA cutlery it's better this way indeed. +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. + +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! + +<a name="trains"></a> "[Back to Top]":#top + +h4. Trains, coaches and cabs + +!</img/pictures/london/cab.jpg! + +The next question of the London newbie arriving in Stansted airport is: + +_"Cool, now I'm in the middle of nowhere in England, where's London then?"_ + +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 - apparently - only through the Stansted Express, the _fastest_ way to get to London from Stansted. Dear as hell (about 25 ENGLISH POUNDS return, per head!). +Luckily there'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 "Terravision":http://www.terravision.it/ but there are many others. Significantly cheaper (34 Euro for two people return!). +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! + +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: + +Him: "Hey mate, need a taxi? ...A taxi mate? A taxi?" +Me: "How much" +Him: "Where to?" +Me: "[Somewhere in Hackney]" +Him: "20 pounds" +Me: "Bye" + +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... + +<a name="tube"></a> "[Back to Top]":#top + +h4. The tube and buses + +Here are some tips for smooth travalling via the underground or buses: +1. Do not use a bus unless you can'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) +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 +3. Get down at Leicester Square if you're going to Covent Garden: it's just 300 metres away and Covent Garden station is small and packed +4. Always check whether the line you're catching is marked with "Good Service", try another route if there delays are expected +5. Keep right on escalators - there's always some lunatic running up/down on the left side, from time to time, and trust me, he WILL mind being stopped for no valid reason +6. Mind the gap! (Especially at Bank station) +7. Mind the sweaty guys wearing suite and holding a briefcase, at peek hours, they can be deadly especially on escalators (See 5.). + +<a name="food"></a> "> Back to Top <":#top + +h3. Food + +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 - and also if you feel brave enough to try at random - the areas surrounding the city centre are probably cheaper than the 4-million different food chains providing any kind of meal near Oxford Street & Co. and possibly - arguably - more tasty. + +If you dare to venture in the land of the Turkish/Bangladesh/Indian food shops you're more than welcome to do so, but be prepared to a potentially long trial-and-error process: in the end you'll eventually find the right one. Caspar recommended a particular one, and the "humus sandwitch":http://www.astray.com/recipes/?show=Humus%20sandwich%20spread was really great. Doner Kebab? Roxy insisted with the rumors they use roadkill for those (she's vegetarian anyway) so she didn't let me have one, aww. + +<a name="rubbish"></a> "[Back to Top]":#top + +h4. Rubbish Food + +I recently came across an interesting "image":http://www.princeton.edu/%7Eina/infographics/starbucks.html which gave me a better picture of how horrendously sick the world has become when it comes to rubbish food. +Yes, "McDonald's":http://www.mcdonalds.com/, "Starbucks":http://www.starbucks.com/ & their nasty friends ("Pizza Hut":http://www.pizzahut.com/, "KFC":http://www.kfc.com/, "Burger King":http://www.bk.com/...) 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 _Happy Meal_, they weren't so packed. I was pleased to notice that a load of new-ish healthier alternative are now available (see next section). + +<a name="healthy"></a> "[Back to Top]":#top + +h4. Healthy Food + +!>/img/pictures/london/pret.png! + +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 _healthy food gang_! This is the REAL food trend for London, it seems, and I was very glad about it. +The first one seems to have been "Pret a Manger":http://www.pret.com/ a London-established company which is now spreading - apparently - in the US as well. They "preach and believe":http://www.pret.com/about/ in the importance of healthy food and fight a silent - but effective - quest against aforementioned Rubbish Food Giants. + +bq. +"Pret operates a bit like a restaurant. Every Pret has its own kitchen (except for one or two of the tiny ones). You won't find 'sell by' dates on our fresh sandwiches and salads. We don't sell 'factory' stuff. We offer our food to charity at the end of each day rather than keep it over." + +Sounds like a good plan. The food is indeed very nice and tasty and they even _apologize_ for charging VAT when eating in. A carefully-thought marketing campaign or the just plain simple truth (Wot!)? Only time will tell, let's hope for the best. +Another example of healthy food around London? Well, real, tasty "Cornish pasties":http://www.westcornwallpasty.co.uk/flash.html 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 - or so they make out. + +_"Hey, what the hell is a pasty man?"_ +"Go back where you belong, you "emmit":http://www.urbandictionary.com/define.php?term=emmet!" + +Roxanne and Caspar both lived in (West!) Cornwall for years, and they really appreciated their fellow pirates trying to take over the world. + +<a name="brick"></a> "[Back to Top]":#top + +h4. Brick Lane + +_"Come in my restaurant... good food, cheap..."_ +"No." +_"C'mon, I make a discount for you"_ +"How much?" +_"15% off"_ +"No way mate, last time it was 25% with a free round of drinks!" +_"You came here before? Impossible, we don't do 25% off, we do 20% off maximum"_ +"No, 25% off, it was 25% off, but doesn't matter, I'll go somewhere else..." +_"No wait, 20% off and free drinks, ok?"_ +"25%" +_"OK, 25% and free drinks, but you come in OK? Good food!"_ + +This is just an example of conversation between a guy working for a restaurant in "Brick Lane":http://www.visitbricklane.com/ and a "potential customer". 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 "deals" 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. + +<a name="enter"></a> "[Back to Top]":#top + +h3. Entertainment + +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's loads to do for every taste. This is an _incomplete_ guide, so I'll just mention a few possibilities, but be aware that there's much, much more than this. + +<a name="club"></a> "[Back to Top]":#top + +h4. Clubbing + +Each weekend, the following equation holds, for the average Londoner aged 20-30 at least: + +@100 pounds + Club + Friends = Loads of booze + Fun + Terrible hangover and amnesia the day after@ + +That's basically what the traditional Londoners (or maybe we shall generalise to all of England...) do every saturday night: they get trashed. Why? It's not clever, it's not good... but it's bloody good fun! +Clubs, pubs and bars are the best place for this kind of activity: they are comfortable, there's normally cool music on, air conditioning, totally hyper staff, and a huge bouncer too! +We went to "The Ditch":http://www.ditchbar.com/, a recently renovated place in Shoreditch (obviously). I must say I really liked the environment more than any club in Italy: + +* Good music and deejay +* Enough people inside, but not too crowded +* Good drinks +* Small & comfy VIP room, obviously for us (no kidding) +* A competent bouncer who kindly reminded us to "watch over" one of our friends, after she suddenly ordered four Vodka-RedBull at once... + +No wonders why Caspar & his friends carefully picked this place as their ideal candidate for their own upcoming DJ mini-event in November: it's an ideal place to spend your night. + +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'd have pulled almost all the (decent-looking) girls available by the end of the night. I'll definetely recommend some of my _free_ (not as in software) friends to go over to London next summer. + +<a name="museums"></a> "[Back to Top]":#top + +h4. Museums + +Enough clubbing and equally shallow activities, let's focus on culture, at once! +London is the best city in Europe (OK, _followed_ by Paris) for museums, and the best thing is that they are (nearly) all free. This time we didn't go to the "National Gallery":http://www.thebritishmuseum.ac.uk/, 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 "British Museum":http://www.thebritishmuseum.ac.uk/. 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: + +!</img/pictures/london/rosetta.jpg! + +I was amazed at the amount of stuff those British folks _nicked_ from all over the world: I'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 (& others), the Rosetta Stone, the Ur Standard, whole monuments from Greece, gargantuan gateways from some Assirian city, and _ALL THE SCULPTURE DECORATIONS OF ATHEN'S PARTHENON!_ 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) + +The "Tate Modern":http://www.tate.org.uk/modern/ was impressive as well for a few Dali's and Kandinski's paintings etc. etc., but I don't think it can ever be as breath-taking as the other ones. I certainly don't understand certain kinds of modern art, but I can'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. + +!>/img/pictures/london/nh.jpg! + +To conclude this brief and silly overview of London's most remarkable museums, let's say something about the "National History Museum":http://www.nhm.ac.uk/. +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 _way better_. +We both expected, especially judging from outside this enourmous building which was built for the purpose, big halls full of taxidermist'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 - in my very, very humble opinion - was a real insult to Science and to the dignity of the visitors over five years old. +They insisted in "renovating" 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't it? I really don't understand who could ever conceive such an abomination: a formerly very respected museum turned into a poorly-designed theme park. +OK, they probably wanted to involve younger generations into scientifical subjects through "interactivity", and that's understandable - in theory. In practice though, there are a few elements which weren't obviously considered when developing such a subtly cunning marketing strategy: + +* The average kid up to 5 years old enjoys pushing buttons, listening to sounds and looking at easy-to-understand (but ARE THEY?) pictures, but alas, can't really bother to read, right? +* The average kid over 5 years old would probably like reading some explanation about some weird phenomena, but alas, he really can'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 XXI century, not from the seventies ffs! Grow up (the museum's managers, not the kids of course)! +* 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 "interactive" toys. + +_"Yes, but hey, we still have a huge queue of kids & families at the entrance!"_ + +And you know why? You know what are all these people queueing for? For a damn cheesy T-rex "animatronic":http://science.howstuffworks.com/animatronic.htm! Yes, really! And no, not the one from Jurassic Park, but only its rather shitty English-made cousin. +The funniest thing of the whole visit? They tell you to donate "at least" three quid for their wonders, same as for the British Museum and the National Gallery. You know what? I'd rather give _thirty_ quid to a random kid if he promise not to visit such "museum"... + +<a name="theatres"></a> "[Back to Top]":#top + +h4. Theatres + +Luckily London theatres are still great. Unfortunately I didn't have a chance to go to a musical this time, but I'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't seem to be possible... +Anyhow, not only we didn't manage to go to a musical, but we also missed another theatrical performance by "Patrick Stewart":http://www.imdb.com/name/nm0001772/, who, for those who don't know, happens to be one of the best Shakespearean actors alive... when he doesn't "fight against the Borg":http://en.wikipedia.org/wiki/Star_Trek:_First_Contact or "plays funny tricks on a wheelchair":http://en.wikipedia.org/wiki/X-Men_(film), of course (cheesy, cheesy joke). + +Nevertheless we _did_ manage to go and see a play, namely Shakespeare's Antony and Cleopatra at the "Globe":http://www.shakespeares-globe.org/navigation/framesetNS.htm. The Globe Theatre is an almost-perfect reconstruction of the famous London Theatre where Shakespeare's plays used to be acted. Like in the XVII century, you have two choices: + +a. Book your seat (26 pounds) +b. Stand up on the ground, near the stage (5 pounds) + +!</img/pictures/london/globe.jpg! + +We obviously went for option b, of course, since we didn't fancy the idea of paying that much - although it can be worthwhile. Only one thing to keep in mind: _always check the duration of the play you're going to see beforehand_ - if you don't like standing up for a long time, you have to go for option a. +We obviously _didn't_ check how long the play was going to be - although we could have imagined it - so we ended up standing up for approx three hours (with a 15 minutes break). And you _have_ to stand up, you can'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 _kindly reminded_ by the staff that it wasn't allowed to do so. Go figure. +Anyhow, after all I must say it was the cheapest and the very best Shakespeare play I've ever been to so far, although I must also say that most of the ones I've been to before were acted in (yikes!) Italian (yes, we do dub theatrical works, _as well_). A really, really good idea for students and half-broke youth who shouldn't be denied of the pleasure of watching Shakespeare's masterpieces at the theatre. Please, keep it up. + +<a name="shop"></a> "[Back to Top]":#top + +h4. Shopping + +Last but not least, I felt compelled to include a short section about _shopping_ in London. The universal answer to the question "Where can I find [insert random item here]" is normally "Oxford Street":http://www.oxfordstreet.co.uk/. When I visited it for the first time (I was about 14 years old, I believe) it all seemed huge... those never-ending malls et al, but now it just seems "normal". Probably because now going to malls and megastores is just the plain normality, while in the nineties (in Italy) it was rather unusual. +Oxford Street has them all: computer shops, endless fashion shops, gargantuan bookshops etc. etc. +Biggest and most expensive shop in Oxford Street? Probably "Selfridges":http://www.selfridges.com/ +Biggest bookshop? Definitely "Waterstone":http://www.amazon.co.uk/exec/obidos/tg/stores/static/-/waterstones/waterstones-info/202-4070483-1661418 although the biggest bookshop in London (and in Europe) is the Waterstone one in Piccadilly, just round the corner. +"Harrods":http://www.harrods.com/Cultures/en-GB/homepageindex.htm? - it's not far from there. + +What if you like more traditional and less glamorous shopping? "Covent Garden":http://www.coventgardenlife.com/ and its whereabouts is probably the best choice, also for souvenirs. + +Had enough yet? Well, yes, let's call it a day for this article, but be aware that there's much, MUCH more to see and do in London than you can ever imagine. Unless you're from the US, of course.
A content/articles/inline-introduction.textile

@@ -0,0 +1,236 @@

+----- +permalink: inline-introduction +title: RawLine - a 100% Ruby solution for console inline editing +tags: +- ruby programming opensource rawline +type: article +filter_pre: textile +----- +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's accept this generalization for now). + +More specifically, I liked the fact that I could use the "GNU Readline library":http://tiswww.case.edu/php/chet/readline/rltop.html with Ruby seamlessly on both Windows and Linux. +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: + +* File/Word completion +* History support +* Custom key bindings which can be modified via .inputrc +* Emacs and Vi edit modes + +Basically it makes your command-line interface fast and powerful, and that's not an overstatement. Ruby's own IRB can be enhanced by enabling readline and completion, and it works great -- at least on <notextile>*nix</notextile> systems. + +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't come back, and other similar leprechaun's tricks, which are not that funny after a while. + +Apparently there's no alternative to Readline in the Ruby world. If you wan't tab completion that's it, you're stuck. Would it be difficult to implement _some_ of Readline functionality natively in Ruby? Maybe, but the problem is that for some reason the Ruby Standard Library doesn't have low level methods to operate on keystrokes... + +...but luckily, the "HighLine":http://highline.rubyforge.org/ gem does! James Edward Gray II keeps pointing out here and here that HighLine's own @get_character@ method does just that: it returns the corresponding character code(s) right when a key is pressed, unlike @IO#gets()@ which waits for the user to press ENTER. + +Believe it or not, that tiny method can do wonders...h2. Reverse-engineering escape codes + +So here's a little script which uses @get_character()@ in an endless loop, diligently printing the character codes corresponding to a keystroke: + +<typo:code lang="ruby"> +#!/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 "=> " + char = get_character + case char + when ?\C-x: print "Exiting..."; exit; + else puts "#{char.chr} [#{char}] (hex: #{char.to_s(16)})"; + end + +end +</typo:code> + +A pretty harmless little thing. Try to run it and press some keys, and see what you get: + +<div style="font-family: Monospace"> +Press a key to view the corresponding ASCII code(s) (or CTRL-X to exit). + +=> a [96] (hex: 61) + +=> 1 [49] (hex: 31) + +=> Q [81] (hex: 51) + +=> &alpha; [224] (hex: e0) + +=> K [75] (hex: 4b) + +</div> + +Hang on, what are the last two codes? _A left arrow key on Windows_, apparently. + +*Welcome to the wonderful world of input escape sequences!* + +To cut a long story short, both Windows and *nix system "terminals" translate special keystrokes into sequences of two or more codes. This applies to things like DEL, INSERT, arrows, etc. etc. +For some ideas, check out: + +* "Windows Scancodes":http://www.microsoft.com/whdc/device/input/Scancode.mspx (Thanks "Huff":http://64.223.189.234/node/92) +* "VT220 Terminal Input Sequences":http://www.connectrf.com/Documents/vt220.html (Thanks "James":http://www.grayproductions.net/) + +Let's now assume that we'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? +Well: + +* For normal characters, just print them back to the screen (@get_character@ doesn't print anything, it "steals" the keystroke) +* For special characters, do something nice! + +We could setup TAB 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's basically something Readline does, right? + +h2. RawLine: how it works and what it does + +I created a small project on RubyForge called "RawLine":http://rubyforge.org/projects/rawline/ (not to be confused with RubyInline, a completely different thing altogether, sorry about that) to play around with the possibilities offered by the @get_character@ method. The library is just a preview of things which can be done, but it's already usable, provided that you're brave enough to try it out, that is. + +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. + +h3. Basic line-editing operations + +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 @get_characters@ gives you the right character codes at the price of _cancelling their normal effects_, which is a great thing, as you'll soon find out. + +Printing a character on the screen was one of the easiest tasks (at first). @IO#putc@ does the job pretty well: it prints a character out. +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's told and move the cursor back by one position. + +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's nothing under the cursor, then we must be at the end of the line and it shouldn't move anywhere, so there we go. + +What if I move left a bit and then start typing normal characters? Well, everything is rewritten of course: this will be our "character replace mode". Unfortunately users don't like this behavior that much, so what I did was this: + +# Copy all characters from the one at the left of the cursor till the end of the line +# Print the character to be inserted +# Re-print the previously-copied characters +# Move the cursor back at the right place + +Again, a primitive solution which works seamlessly on all platforms, and yes, it's fast enough that you don't notice the difference. + +As you may have guessed, this of course means that I always had to keep track of: + +* The cursor position within the line +* The text currently printed to the screen + +Backspace and delete were implemented in a similar way, you can figure it out yourself or look at the source code: I won't bore you any further! + +h3. History management + +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. + +So every "modification" 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. +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's this line overwriting done? Same old: + +# Move the cursor to the beginnig of the line +# Print X spaces, where X is the line length, so that the characters are no longer displayed in the console +# Move the cursor back to the beginning of the line +# Print the new line. + +Easy and naive, as usual. But again, it works well enough. + +h3. Word completion + +The other challange was word completion. The current implementation can be summarized as follows: + +* If TAB (or another character, if you wish) is pressed, call a user-defined @completion_proc@ 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) +* If the user presses TAB again, show another match, and so _ad infinitum_ if the user keeps pressing TAB. +* If the user presses another key, accept the default completion and move on. + +Obviously this means that: +* RawLine has to keep track of the current "word". A word is everything separated by a user defined @word_separator@, which can obviously modified at runtime, with care. +* Regarding the @completion_proc@, typically you may want to return only the elements matching the word which is currently being written, so that's given as default parameter for your proc. Exactly like with ReadLine, the only difference is that you can access other things like _the whole line_ and _the whole history_ in real time, which can be really handy at times! + +Here's a simple example: + +<typo:code lang="ruby"> +editor.completion_proc = lambda do |word| + if word + ['select', 'update', 'delete', 'debug', 'destroy'].find_all { |e| e.match(/^#{Regexp.escape(word)}/) } + end +end +</typo:code> + +h3. Custom key bindings + +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'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: + +@bind(key, &block)@ + +Where key can be: + +* A @Fixnum@ corresponding to a single character code +* An @Array@ of one or more character codes +* A @String@ corresponding to an escape sequence +* A @Symbol@ corresponding to a known escape sequence or key +* A @Hash@ to define a new key or escape sequences + +So, in the end you can do things like this: + +<typo:code lang="ruby"> +editor.bind(:left_arrow) { editor.move_left } +editor.bind("\etest") { editor.overwrite_line("Test!!") } +editor.bind(?\C-z) { editor.undo } +editor.bind([24]) { exit } +</typo:code> + +Which, for Rubyists, it's far sexier and more flexible than editing an .inputrc file. + +h3. How do I use it, anyway? + +A code example is better than a thousand words, right? So here you are: + +<typo:code lang="ruby"> +#!/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("=> ").chomp!}]" +end +</typo:code> + +This example can be found in examples/rawline_shell.rb within the RawLine source code or gem package. + + +h2. Current status and availability + +I currently "released":http://rubyforge.org/forum/forum.php?forum_id=22543 RawLine 0.1.0 on "SourceForge":http://rubyforge.org/projects/rawline, and it can be installed via: + +@gem install -r rawline@ + +The RDoc documentation is available "here":http://rawline.rubyforge.org/. + +Feel free to try it out. First of all try the @rawline_shell.rb@ example, and see if it works on your machine. If it doesn't than maybe you try re-binding some keys (use @key_tester.rb@ to "reverse-engineer" your terminal's input escape sequences), and let me know! + +Status information and limitations: + +* It has been tested on Windows (XP, using the usual command prompt) and on Linux (ZenWalk, using XFCE Terminal). +* It can handle lines no longer than the maximum terminal width - 2. This is to ensure that the cursor never "falls down" to the next line. +* On Windows, the cursor doesn't blink immedialy when moving left, but it moves, don't worry. +* On Linux, you should really consider installing the "Termios":http://raa.ruby-lang.org/project/ruby-termios/ library for a faster experience (otherwise @get_character@ won't parse characters correctly if you press and hold a key, and that, trust me, is a real mess!). +* RawLine is very far from being a complete replacement for the ReadLine library, and it is currently in alpha stage. +* Release 0.1.0 has been created after 2 weeks of sporadic coding during lunch breaks and week-ends. + +For any ideas on where to go from here, comments and feedback, just reply below or send an email to my usual email address.
A content/articles/inline-name-change.textile

@@ -0,0 +1,23 @@

+----- +permalink: inline-name-change +title: "InLine name change: what's your opinion?" +tags: +- ruby programming opensource rawline +type: article +filter_pre: textile +----- +I've been kindly asked by the lead developer of "RubyInLine":http://www.zenspider.com/ZSS/Products/RubyInline/ to change the name of my "InLine":http://rubyforge.org/projects/inline/ project, due to potential confusion and conflicts. + +This makes sense, and I'm ready to change the name of my project, although I'm not that good at choosing original and _smart_ names, so well, any suggestion is more than welcome! + +I was thinking of something like: + +* RawLine +* EditLine +* RawInput +* RubyInput +* RubyLine + +I personally think that *RawLine* is probably the best option, but please, if have any better idea just speak up! + +P.S.: "RedLine" is taken, unfortunately, otherwise it would have been my first choice since the beginning.
A content/articles/introducing-redbook.textile

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

+----- +permalink: introducing-redbook +title: Introducing RedBook (and the new Code section) +tags: +- ruby productivity software tools redbook +type: article +filter_pre: textile +----- +I'm somehow pleased to announce the opening of a new section on this site. Nothing too big actually, it's just a "page":/code/ with a few (one for now) brief descriptions of open source programs and scripts I made and I'd like to share with my readers. + +Don't expect fancy stuff: (luckily) I don't code for a living, I code for pleasure and I code small things. Lately I'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 "RedBook":/code/ an interactive command-line program written in Ruby. + +Main features: + +* Log timestamped and _tagged_ messages to a single YAML file +* Load and display messages containing a certain string, or certain tags or within a time frame. +* Calculate the time elapsed between two or more tasks. +* Export loaded messages to YAML, TXT or CSV format. + +All done via command line via simple commands: + +*&#58;log* This is a test message *&#58;tags* test + +*&#58;load* *&#58;last* 30 *&#58;from* last week + +*&#58;timecalc* 2 5 + +*&#58;save* test.txt + +Thanks to the wonderful "Chronic":http://chronic.rubyforge.org/ library, you can specify your time frames using natural language expressions like "8 in the morning", "this tuesday", "last month" and so on... + +Here's a screenshot showing RedBook in action: + +!/files/redbook.png! + +RedBook is of course free, open source software licensed under the terms of the BSD license. It can be installed on any machine able to run Ruby and there's also an EXE version for the lazy windows folks who don't want to install Ruby, packed with "RubyScript2Exe":http://www.erikveenstra.nl/rubyscript2exe/index.html. A more in-depth article explaining how RedBook works -will hopefully be completed soon- is available ":here":http://www.h3rald.com/articles/redbook + + + + +
A content/articles/komodo-edit-review.textile

@@ -0,0 +1,172 @@

+----- +permalink: komodo-edit-review +title: A closer look at Komodo Edit +tags: +- review programming software +type: article +filter_pre: textile +----- +<a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"> +<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /> +</a> + +_What's your favorite code editor?_ + +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's not only one program but several, depending on the language and on the features needed at the time. +Yes, great, but how do you choose your favorite editor? +By trying a lot of them of course: that's what I've been doing since I started programming. Lately I've become fond of "Vim":http://www.vim.org (or better, gVim), although I have a few other editors I may recommend, e.g.: + +* "Notepad++":http://notepad-plus.sourceforge.net/uk/site.htm +* "Intype":http://intype.info/home/index.php +* "SciTE":http://scintilla.sourceforge.net/SciTE.html + +Recently, however, I came across my _n^th^_ "what's your favorite editor" thread and someone mentioned "Komodo Edit":http://www.activestate.com/Products/komodo_edit/. I knew of it already, actually, but I never had a chance to give it a _proper_ try. +ActiveState is well known mainly for two things: + +* Their effort in offering a lot of commercial, windows-based Perl libraries +* Their commercial IDE, Komodo IDE, which I personally tried quite a long time ago + +The problems of Komodo IDE are foundamentally two: + +* It costs money &#8211; this is not great in a world where Eclipse and Netbeans are free +* It is an IDE &#8211; which normally means _'heavy as hell'_. + +It's a matter of taste and needs: some people feel more confortable with using an editor for certain tasks, while sometimes an IDE may be the best solution, despite its potential slowness and bulk. + +Komodo Edit solves the above-mentioned problems because: + +* It's free +* It's an editor + +Actually I wouldn't call it an editor, because it offers quite a lot of features which are normally absent in editors -- it's something in-between, which definitely deserves a try. + + +h2. User interface + +Komodo Edit's interface is one of the most clear I've ever come across. It is organized in four main areas plus the top menu and toolbar (which only has the buttons you REALLY need, unlike Notepad++'s 31-button-bar). + +!=/files/komodo_main.png! + +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's up to you really. + +!</files/komodo_show-hide_pane.png! + +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 IDE do, but this is *NOT* an IDE, remember? It's an _editor_, or at least it is advertised as such. + +In reality it has _most_ of the power of a full-blown IDE though normally remaining under the 60K memory usage (out of 2GB of total RAM) -- which is not that bad, considering what Eclipse and NetBeans need. +Out of all the "extra features":http://www.activestate.com/Products/komodo_edit/edit_vs_ide.plex offered by Komodo IDE, the only one I truly miss is the Code Browser. Other than that, it quickly became my editor/IDE of choice (when gVim isn't looking, of course...) + +Lets find out why... + +h2. Editing features + +Komodo Edit comes with all the editing features of ever average editor, so _"[...] 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 "save"."_, 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. + +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't really complain!). +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't mean I have to manually re-set the color of each element, it actually comes with a black-background scheme, which is handy. + +h3. Supported Languages & Syntax Highlighting + +Komodo Edit supports quite a few programming languages, which means it can recognize the most common ones (C, C++, Java, PHP, Python, Ruby, Perl) but it also smart enough to notice framework-specific syntaxes like Smarty, Django or RHTML. +Like every scintilla-based editors, it sports a nice HTML multi-highlighter which allows you to keep putting all the Javascript, CSS and server-side scripting into the same file, GREAT! No, you probably wouldn't want to do that, but it's a good thing to have. + +h3. Auto-completion + +What makes this editor a really handy tool is its auto-completion capabilities. Why? well, because it supports: + +* Ruby: require, class modules (on . and ::), class variables and methods, method calltips. +* Python +* Perl +* PHP +* XSLT +* XML +* Tcl + +Why is this so special? Well, because if you want this you normally need an IDE, and if you want it for Ruby AND Python AND Perl your choices are very limited. +I played with the Ruby auto-completion features quite a bit, and I'm actually really impressed. + +!>/files/komodo_auto-completion.png! + +It can suggest what to write through calltips after a @require@ directive, after a . and a ::, and hitting CTRL+SPACE (or just tab if you configure the right option) will auto-complete what you're writing, be it a language keyword, a variable of any kind or a method. Additionally, it comes with "soft characters support", which means it will try to match ( [ { when possible, allowing you to _write over_ the completed character if you want to. + +h3. Syntax Checking, Vi/Emacs key bindings and code folding + +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. +It also offers "vi emulation", which is constantly improving through every release &#8211; so you won't forget Vim's keys when I don't use it: very nice, and again, hard to find in other editors, nevermind IDEs! + +h2. Projects and Tools + +!>/files/komodo_toolbox.png! + +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 "PSPad":http://www.pspad.com/en/ do indeed have "projects", but most of the others don't. A _project_ in Komodo Edit is normally composed by: + +* Some _Live Folders_ including all the source files of the application you're developing +* An optional set of tools, commands, snippets and other goodies which may help you coding that particular application. + +It is possible to create these tools by clicking the *Add Item to current project* button in the Projects toolbar or by clicking the *Add Item to Toolbox* button just over the toolbox. +Either way, you can choose among the following: + +h4. File/Remote File + +Add a file on your local machine or a remote file hosted on a server you configured via *Edit > Preferences > Servers*. Supported protocols are: FTP,FTPS, SFTP, SCP. + +h4. Folder + +This will _not_ link to a folder and import local files in Komodo, instead, it will create a container for other tools, not for local files. + +h4. Live Folder + +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. + +h4. Command + +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. + +h4. Snippet + +TextMate fans will love this. Komodo will let you create a code snippet for later use. Furthermore, it is possible to specify "tabstops" to automatically select certain words when tab is pressed (so you can effectively fill in only particular fields of the snippet). + +h4. Template + +A simple but effective way to create code templates. + +h4. Url + +A link which will open a given url. + +h4. Open... Shortcut + +This will popup an *Open File* dialog in a direcxtory of your choice. + +h4. Macro + +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. + +h4. Custom Menu/Custom toolbar + +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 _the editor itself_ could make those tools available by default in a toolbar or a menu. Well, that'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! + +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: + +* Create/delete database +* Generators +* Migrations +* Run server +* Example view snippets + +h2. Conclusion + +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. +Its close attention to details and its ease of use make developing an even more pleasant experience, although perhaps there's still room for improvement, if you're really fussy. + +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 IDE to someone at some point! + +Another thing which I would have liked is the ability to create new syntax highlighting schemes, which Notepad++ and VIM both offer. Whydoes it bothers me so much? Well, because I'd like a "Textile":http://textism.com/tools/textile/ syntax highlighting scheme for writing blogs and articles. VIM and Intype seem to be the only ones which offer it out-of-the-box, but there's no trace of it in Komodo Edit. + +Actually it is possible to create new syntax highlighting schemes and extend Komodo Edit via "XUL extensions":http://community.activestate.com/addons, exactly like Firefox. After a closer look, the Django syntax was added in this way. + +Unfortunately there aren't that many extensions available for Komodo Edit, yet, but the "Activestate Community":http://community.activestate.com/ seems very active, so you never know. Additionally, the recently-started "OpenKomodo":http://www.openkomodo.com/ is a new project created by ActiveState to "[...] 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 IDE, to create the Open Komodo code base". A new competitor for Eclipse and Netbeans will be available soon? + +<a href="http://digg.com/programming/A_closer_look_at_Komodo_Edit"> +<img src="http://digg.com/img/badges/180x35-digg-button.png" width="180" height="35" alt="Digg!" /> +</a>
A content/articles/log-apr-2009.textile

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

+----- +permalink: log-apr-2009 +title: Personal Log - April 2009 +tags: +- personal_log +- ruby +- books +- wedding +type: article +filter_pre: textile +----- +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's see what happened this year...h3. Using Ruby in a corporate environment + +I'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 _their_ time, so now I am _officially_ in charge of workflow improvements and automation (it's even in my job description!). + +This month a colleague of mine and I had to figure out a way to write some documents *once* in XML format and then produce different kind of outputs (other XML files, PDFs, etc.) using the "DITA Open Toolkit":http://dita-ot.sourceforge.net/. 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. + +We ended up hacking together a _system_ using: + +* "Microsoft Infopath":http://office.microsoft.com/en-us/infopath/default.aspx as XML editor for the end users (the company buys it by default, so no worries there) +* A Ruby program to parse and manipulate the original XML and produce DITA-compatible XML files. +* Some "Apache Ant":http://ant.apache.org/ tasks available in the open toolkit to produce an XSL-FO file +* "Apache FOP":http://xmlgraphics.apache.org/fop/ to produce the PDF from the XSL-FO file... + +The thing seems to work fine (after a lot of tweaking), and I really enjoyed creating the Ruby program to _glue_ everything together. I even got a chance to introduce my colleagues to the wonderful world of "Textile":http://hobix.com/textile/ (they are so happy that they don't want to use WYSIWYG editors anymore!). + +h3. Easter in London + +As usual, Roxanne and I spent our Easter holidays in London, at her brother's place. This year we actually had 9 days to go around -squandering money- spending _wisely_ in food, books, clothes and entertainment. + +Most notably, I managed to drag Roxanne to "Foyles":http://www.foyles.co.uk/ and I got myself a copy of "The Pragmatic Programmer":http://www.pragprog.com/the-pragmatic-programmer, which I'm reading avidly. If it was up to me I was going to buy half of the computing section, but Roxanne _kindly pointed out_ that I could get all of them from Amazon for half the price. +And she was right: for my birthday I preordered a copy of "Programming Language Pragmatics, 3rd Ed.":http://www.amazon.com/Programming-Language-Pragmatics-Third-Michael/dp/0123745144, which should be shipped soon. + +h3. Wedding planning + +My spreadsheets for the wedding guests, wedding expenses (!) and ...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 _RSVP within May_ on them, so they _have_ to be out in one or two weeks at most. + +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 (SEVEN) _morning suits_ off eBay, in the right sizes! Hopefully I'll be able to get them by the end of next week (if my bestman manages to let me know his sizes). + +h3. XBox 360 Gaming + +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. +Right now we're playing "Mirror's Edge":http://xbox360.ign.com/objects/949/949455.html, "Mass Effect":http://xbox360.ign.com/objects/718/718963.html, and "Unreal Tournment III":http://xbox360.ign.com/objects/746/746631.html. The last one was a special surprise present from Roxanne (_"...so we can kill each other!"_ &mdash; she's really lovely at times!). + +h3. Other tech-related tidbits + +* I can't wait to go to the cinema to watch "Star Trek XI":http://www.imdb.com/title/tt0796366/ +* I started using "Shelfari":http://www.shelfari.com/ +* I started using "Star.io":http://start.io as my personal, bare-bones start page. +* I recently "released Concatenative 0.2.0":http://www.h3rald.com/articles/concatenative-020. +* I'm currently evaluating the possibility to create a Ruby-based _Document Authoring Framework_. Stay tuned.
A content/articles/log-feb-2009.textile

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

+----- +permalink: log-feb-2009 +title: Personal Log - February 2009 +tags: +- "personal_log ruby " +type: article +filter_pre: textile +----- +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. + +h3. Recession time! + +I've always considered the current economic downturn as something happening _somewhere else_: USA, England, Ireland... but not in Italy, really: our country never boomed, we don't go mental with loans and mortgages (or at least we didn't use to), so there's no real reason for a full-on recession period. + +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't consider that: + +* Italians tend to panic a lot. +* 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. +* Our government already -wastes- invests a lot of money regularly, every year, to fuel a colossal, "nepotistic":http://dictionary.reference.com/browse/nepotistic, pointless bureaucratic machine they insist on calling "State". + +Result: the recession is starting to hit properly over here too. People are saving money, they don't go out buying pointless crap, they are scared to ask for a raise at work... 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's revenues. This means less unnecessary expenses, less training, less travelling and less outsourcing, which didn't help improving the daily work experiece. Personally, I'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's Degree to get a very rewarding, not-so-stressful job. + +h3. No 'Net @ Home + +The most annoying thing of the month was (and still is) the lack of Internet access at our house. Let's do a quick recap: + +# After spending one year with Telecom Italia, Roxanne and I decided to change provider to save a bit of money and get more speed. +# On _December 24th_ we requested a contract with "Wind":http://www.wind.it, after they assured that we'd have the Internet back on in _just a few days, tops_. +# On _January 5th_ Telecom disconnected us. +# On _January 12th_ Wind sent me a mail telling me that there was going to be a _15-day delay_ in the activation &mdash; well, at least they told us so! We waited. +# On _February 2nd_ I call Wind Customer Care hassling them to get a move on &mdash; just some minor delays, _it will only take a few days, tops_. We waited. + +Our new Internet line has been _in the process of being activated_ ever since January 5th. Why? Because being a customer sucks, in Italy, and you can't do much about it. +Let me quote one of the 13 phone calls I made: + +* ... 5 minutes on hold, stupid music in the background ... +* [Operator]: Good Evening Sir, I'm <random name>, how can I help you? +* [Me]: Hello, I'm enquiring about the status of my Internet connection: I've been disconnected since the 5th of January... +* [Operator]: Phone Number please? +* [Me]: <notextile>*** ******</notextile> +* ... 2 minutes on old ... +* [Operator]: Name plase? +* [Me]: Fabio Cevasco +* [Operator]: Let me check... +* ... 6 minutes on hold, stupid music in the background ... +* [Me]: Any luck? +* [Operator]: One moment please... +* ... 2 minutes on hold, stupid music in the background ... +* [Operator]: Sir, it says here that you are _in the process of being activated_ +* [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... +* [Operator]: Let me check... +* ... 3 minutes on hold, stupid music in the background ... +* [Operator]: There are some technical difficulties. +* [Me]: What kind of technical difficulties? +* [Operator]: I... I don't think you can understand Sir, it's technical... +* [Me]: (!!!) I have a degree in IT Engineering, so yes, I think I can understand enough. +* [Operator]: ...well, there's nothing I can do... it says we're in the process of connecting you, it should be just... +* [Me]: ...a matter of a couple of days, yes, I know: it has been over a month though! +* [Operator]: Sir, really, I can't really do much about it, you'll just have to wait +* [Me]: Can you let me speak with the Technical Department? +* [Operator]: No, sir, I can't: you see, your ADSL line is not yet activated, they can't do anything about it. +* [Me]: Excuse me, but I'd like to know what the problem is, and how long it will take to activate the line. +* [Operator]: Sorry sir, we don't have this information, and we can't commit to a specific date. +* [Me]: (!!!) May I speak to someone who knows this? May I speak to your superior? +* [Operator] No, you can't speak to my superior. You'll just have to wait, I'm sorry. +* [Me]: Well, it has been over a month, and I don't know if you realize that you were supposed to connect me in just a few days and... +* [Operator]: Thank you for calling sir, have a good day. + +That barely conveys the frustration I felt and I'm still feeling now. I can'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? + +h3. Programming in Ruby, again + +Some of you may be pleased to know I'm back coding in Ruby after slacking for months. It's just the time of the year, I guess. +I'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's going through the "Humble Little Ruby Book":http://www.h3rald.com/articles/hlrb-review and he's loving it, so far. He'll hopefully be fully assimilated in a few weeks at most, and after that there will be no going back! + +This inspired me to start a full rewrite of "RedBook":http://www.h3rald.com/tags/redbook/, my little Ruby daily logger. It will feature a SQLite backend and Merb's Datamapper to take care of the dirty work. +Unfortunately, even if the new sources are already available on "GitHub":http://github.com/h3rald/redbook/tree/master, 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's *the* pet project, after all... + +On the other hand, it will take me considerably less time (a few days?) to release the next version of my "RawLine":http://www.h3rald.com/tags/rawline library, featuring: + +* Ruby 1.9 support +* A handy little function for filename completion +* Readline emulation, i.e. just @include Rawline@ and use it as if it was GNU Readline + +Of course this doesn't mean RawLine is a complete, 100% Ruby port of the GNU Readline library, but it is definitely more Ruby-ish, more cross platform (try using Readline with Ruby on Windows...), and usable enough for most of the normal things, like: + +* tab completion +* line editing (but no vi or emacs mode yet, sorry) +* history +* quick and easy key bindings + +Once this comes out, I'll be implementing features on-demand, as GNU Readline is huge and offers way too many things anyone would ever need. Patches and contributions are of course more than welcome, though. + +For all my open source Ruby projects, after "pondering the alternatives":http://www.h3rald.com/articles/where-does-your-ruby-code-live, I decided to go with the following setup: + +* My own site for the home pages of the projects +* RubyForge for gem support and for RDoc documentation +* GitHub as source code repository +* LightHouse for issue tracking + +I hope it works out...
A content/articles/log-jan-2009.markdown smartypants

@@ -0,0 +1,54 @@

+----- +permalink: log-jan-2009 +title: Personal Log - January 2009 +tags: +- personal_log wedding +type: article +filter_pre: markdown smartypants +----- +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 content/articles/log-jun-2009.textile

@@ -0,0 +1,68 @@

+----- +permalink: log-jun-2009 +title: Personal Log - June 2009 +tags: +- personal_log +- vim +- ruby +- wedding +type: article +filter_pre: textile +----- +Welcome to yet another of my extremely boring, excessively fragmented "personal log":/tags/personal_log posts. I'm seriously thinking of dropping the whole series in favor of more frequent (and shorter) blog posts, starting from next year. This means you'll probably have to read _another six_ of these priceless gems, until december 2009. +As usual, feel free to skim through as each of the following _sections_ is almost completely unrelated to the others.h3. H3RALD Web Site v8.0 + +It's the time of the year, again. It doesn't happen _every_ year but it's definitely a trend (hence the high version number): I'm going to redesign & redevelop my web site. + +This time is not the usual "Let's pick another language and another framework and start from scratch", 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!). + +"Tom Preston-Werner":/http://tom.preston-werner.com/ is definitely _not_ the first person to "blog like a hacker":http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html, and his very own "Jekyll":http://www.jekyllrb.com/ 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's blogs. + +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 "Tagaholic":http://tagaholic.me/. + +The advantages of this approach are many: +* Free yourself from a database. +* Free yourself from a resource-hungry, server-side app ("Typo":http://wiki.github.com/fdv/typo/, in this case). +* Increase speed and reliability, without using caching or similar artifacts. +* Keep everything under version control. +* Don't worry about breaking things when upgrading (even if the static content generator changes, it shouldn't really break things). +* Unleash the power of client-side scripting (namely, JQuery). + +For now, I'm just brainstorming a little bit on "GitHub":http://github.com/h3rald/h3rald-website/issues, 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? + +h3. Glyph + +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 HTML. + +Whever I have a chance to actually start working on it, Glyph will become a _document authoring framework_, i.e. a way to create visually appealing documents in a simple way. All the ingredients are there, it's only necessary to glue them together in a pretty form: +* Textile (and "RedCloth":http://redcloth.org/) to produce clean HTML code from a human-readable markup +* CSS3 to specify page rules +* A few rake scripts to produce a standalone HTML file, TOC, Index etc. +* An internal DSL for the document structure and metadata +* "Liquid":http://www.liquidmarkup.org/ for control flow, snippets and filters +* "PrinceXML":http://www.princexml.com/ to generate a PDF from HTML + +This project is still in planning stage, feel free to have a look at the "issues/features page":http://github.com/h3rald/glyph/issues on GitHub. Feedback is appreciated, as usual. + + +h3. Vim files & _the Stash_ + +If you read the previous two sections of this post, you may have noticed that I'm growing more and more fond of git (and GitHub). Besides the repositories I already mentioned earlier on, I also created a personal "stash":http://github.com/h3rald/stash, which I'm using mainly to store some of my Linux dotfiles, article drafts and ...Vim customizations. + +If you're looking for a color scheme for Vim, check out my very own "herald.vim":/herald-vim-color-scheme, and tell me what you think. + +h3. Getting ready for the Big Step + +This will probably be my last post as a free man, as I'm getting married (civilly) on July 2nd and (religiously) on July 11th. +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't allow you to republish _your own_ photos unless you ask them first), so I'll probably write a long post with pictures when we come back from our (half) honeymoon. + +Everything is pretty much organized. We had troubles with the waistcoats we got from eBay: they were cut almost randomly to _resamble_ waistcoats, but they weren't so we had to re-order another lot of 7 sets (waistcoat, cravat _and_ shirt this time) from another seller, this time UK-based. I seriously hope to get them in time. + +On the 24th we'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's _big_ brother). It's probalby going to be about 30-40 people in the end, mainly because most of my office can't come due to holidays they booked in advance. + +What's left to do now? Well: +* Send the bomboniere over to Ireland +* Make sure my dad actually ships the 96 specially-bottled bottles of our own wine to uncle John, in Ireland. +* Make sure uncle John doesn't drink all the 96 bottles of wine before the wedding reception. +* Make sure my best man understood that the speech he has do make _must_ be in English, at least 3 minutes long and not too offensive to the groom. +* Pay a huge, colossal heap of money for the whole thing. It's going to cost us (and my dad) quite a bit, in the end. But it'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).
A content/articles/log-mar-2009.textile

@@ -0,0 +1,39 @@

+----- +permalink: log-mar-2009 +title: Personal Log - March 2009 +tags: +- personal_log wedding ruby +type: article +filter_pre: textile +----- +Another month _without_ the Internet at home. This is getting really annoying, and I decided to change provider, *again*, hoping that I'll eventually get my broadband back, someday. Luckily I can still go online at work, but of course it'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. + +h3. Concatenative programming + +For some weird reason I became fond of the "Concatenative programming paradigm":http://en.wikipedia.org/wiki/Concatenative_programming_language. I started reading about "Joy":http://www.latrobe.edu.au/philosophy/phimvt/joy/j00rat.html and then started to work on a Ruby DSL able to do the similar things: "Concatenative":/concatenative/. Another pet project &mdash; as if I didn't have enough things to do already! + +Some people seemed pleased about it, especially on "Reddit":http://www.reddit.com/r/ruby/comments/887kn/concatenative_programming_in_ruby and "dzone":http://dzone.com/links/concatenative_programming_in_ruby.html. The downside of it is that it'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. + +h3. Learning new programming languages? + +Incidentally, I'm still fighting with myself on whether to learn another programming language or not. At this point, learning "Factor":http://www.factorcode.org could turn out to be more natural than months ago. However, I would only learn new programming languages as a hobby, as I don't need to do so for profit: luckily I'm still a happy technical writer and I enjoy my job. + +I admit, I'm still looking for _the_ 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'm still evaluating the current alternatives. Possible candidates are Haskell, Factor, some dialect of Lisp or C. +Why C? Well, because I didn'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?! + +On the other hand, I'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 _after_ getting married, right? ..._right?!_ + +h3. Wedding planning + +Roxanne and I are slowly getting more and more things done for the wedding. Every attempt I made to introduce her to "GTD":http://en.wikipedia.org/wiki/Getting_things_done failed miserably so far, or better, it worked too well: she is now getting used to make lists and deciding on our _next actions_ for the weekend. +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'll have a late honeymoon in autumn), chose the waistcoats for me, my bestman and the ushers, and ...booked the wedding car! +Now, this turned out to be good fun! Take a look at "Ruby":http://www.alleventslimos.com/Wedding/rolls_silver_cloud.html (yes, yes, I know... ), a Silver Cloud II 1961 Rolls Royce which will be ours for (less than) one day! + +h3. Other tech-related tidbits + +* I successfully migrated to Ubuntu 9.0.4 Jaunty. Everything works, except the flash plugin for Firefox. +* I'm now using TweetDeck as my main Twitter client on both Windows and Linux. +* I'm thinking of buying (after the wedding) an Eee PC (no Macs: Ubuntu is sleek and powerful enough &emdash;and free, too). +* We finally got an XBox 360 from eBay, this time it came through the post. +* Roxanne is thinking of buying a big LCD TV to go with it &emdash; I'm politely (and sadly) postponing till after the wedding. +* After listening a FLOSS Weekly episode featuring it, I think I'll get myself an "Arduino Board":http://arduino.cc/ for my birthday.
A content/articles/log-may-2009.textile

@@ -0,0 +1,87 @@

+----- +permalink: log-may-2009 +title: Personal Log - May 2009 +tags: +- personal_log programming wedding +type: article +filter_pre: textile +----- +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 ??contingency??; it's the latest trend in the Western World, didn't you know? I'm really not impressed. I can't complain though I guess: I still enjoy my job very much and I know it could be much worse, so it's just a matter of enduring until autumn -- or so they say. + +h3. Star Trek Premiere + +The month started with an event I'd been looking for for months: the _premiere_ of Star Trek XI, aka "Star Trek". It's not that J.J. Abrahms couldn't come up with a more original name (_Star Trek: Academy_ 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 _a dying franchise_. + +The movie was enjoyable - daring and a bit flamboyant - but still enjoyable nonetheless. I consider myself a Star Trek fan, and although it was _not_ the usual Star Trek movie, I somehow liked Abrahms' bold revisitation of Roddenberry'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 XXI century special effects: what you get is not the usual, let's-all-rock-because-we're-hit traditional Star Trek, of course, it's an _alternate_ version of it. + +That's precisely what the movie is meant to be: what Star Trek would have look like if it had been created in the XXI century. The timeline feels disrupted since the very first minute (nevermind the end!), with a Jim Kirk stealing his stepfather's car. Chris Pine is an ["alternate":http://memory-alpha.org/en/wiki/James_T._Kirk_(alternate_reality)] 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't have been cast better. So is Simon Pegg as Scotty, but unfortunately he's not involved enough. + +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 NOT a Romulan ship, period. + +At any rate, I enjoyed the movie and I'm looking forward to the second one, which I hope it will be followed by many others. + +Unfortunately in Italy Star Trek is not worshiped in Italy as in it is the US, which is very unfortunate... 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 -- if you can, that is, I won't post them here!). + +h3. Wedding Planning + +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: +* We went to the British Consulate in Milan, and applied to get Roxanne's legal documents. +* I bought and had the 7 vest sets delivered to Roxanne's brother's (Caspar) place, in London. +* I ended up buying 8 (buy three, get one free) morning suits from "Marks and Spencer":http://www.marksandspencer.com/gp/product/B000N65ELG?extid=pg_msf&247SEM, and had them delivered to Caspar's place. He'll be sending all the stuff over soon, hopefully. +* Roxanne got the dresses for the maids of honor, and apparently we have to collect them on monday. +* We sent all the invites we needed to send, but we're still waiting for confirmations. It looks like it won't be a big wedding, probably around to 60-70 people mark. +* We ordered the "bomboniere":http://weddings.about.com/cs/glossary/g/Bomboniere.htm, they should come through soon. +* Uncle John told us he had the music for the church and the reception sorted out. +* We got the rings! + +We _still_ have to organize a few things, namely: +* Write and print the prayer books +* Book the flight for one of my ushers +* Get some fancy gifts for the bestman and the rest of the people involved in the ceremony +* Get married civilly here in Genoa +* Organize a party at our place for the people who can't come to the wedding +* Do something else I can't remember right now + +Yes, we are still busy as hell. I'm looking forward to it all, but I'll definitely be much more relaxed when it's all over! + +h3. Home Internet: Epilogue? + +I got broadband at home, finally, after five months. Let's do a quick recap: +# Last December I signed up to Libero Infostrada, and told them I wanted to disconnect from Telecom +# In January I actually got disconnected from Telecom, got a new phone line contract, but the Internet was never activated. +# I kept calling clueless operators on both ends pointlessly for 2-3 months. +# 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. +# Meanwhile, I signed up to 3g, and got an Internet USB key. At least I can go online, even if with a crappy UMTS connection. +# After a month, Telecom rings me asking if I want to come back to them, promising I'll have the Internet back on _soon enough_. Out of desperation, I accept and tell them to disconnect me from Tele2. + +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't do these things on the phone -- clueless operators, remember?) telling them I don't want anything to do with them anymore. + +This is how broadband Internet works in Italy. Jealous? + +h3. Nimrod + +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. + +Out of all the tech news I came across throughout this month, the "Nimrod":http://force7.de/nimrod/ programming language definitely struck me the most. A German guy came up with a new language -- that's not a big news, new programming languages are born every week, if not every day. + +I believe Nimrod is different though. Basically, here's why: +* It'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 - this is what _really_ matters to me - it compiles to plain C (which can then be compiled using GCC or whatever). +* It is open source and can be used to produce commercially distributed executables. +* The "manual":http://force7.de/nimrod/manual.html is simple to read (but with a few rough edges), and the language looks simple to learn. +* The language is not yet complete, but it's getting close to a 1.0 release. It works as advertised, nonetheless. +* It offers a comprehensive standard library, and a _huge_ amount of libraries and wrappers from everything from Windows API to GTK and Cairo. +* It is cross platform, the Windows version even comes with a one-click installer. +* It has garbage collection _and_ it supports manual memory management, if you need it. +* It's statically typed, with type inference +* It can generate standalone executables, with very little overhead (90KB for an hello world program). + +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'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 _and underscores_ are ignored to ??allow programmers to use their own programming conventions??. +Personally I don't think this is that bad. After all, if you name your variables "a_thing" and "aThing" and you want them to mean different things, that's bad programming style anyway. Nevertheless, as far as I know it's the only language I know which offers such an extreme degree of flexibility in this sense. + +h3. Learning new things + +This month I also found myself to be extremely eager to learn about new things. I'm still faithful to Ruby and all that, but I'm opening up to new possibility, for different things: +* I decided to start listening to slightly more technical podcasts, which are _not_related to tech news. In this way, I don't have the pressure of having to listen to them on a regular basis. Other than "FLOSS Weekly":http://twit.tv/FLOSS, which is probably the best show about Open Source Software out there, I'm going to try out "Software Engineering Radio":http://www.se-radio.net/ and "The Command Line":http://thecommandline.net/, both slightly more technical. +* Because I decided to put my personal programming projects on hold, I'm having all sort of new ideas about even _more_ projects I could start as soon as I can. No anticipations until after my wedding, of course. +* I'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'm not yet ready to write an article about it -- not the kind of article I'd like to write, anyway. +* I'd like to learn more about Javascript and JQuery. I played around with it and _loved it_, but I really never used it for anything serious yet. This, however, may change in the future.
A content/articles/ma.gnolia.bbcode

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

+----- +permalink: ma.gnolia +title: Ma.gnolia - Social bookmarking made (extremely) easy +tags: +- internet +- review +- web20 +type: article +filter_pre: bbcode +----- +Social Bookmarking[1] is not something [i]new[/i] 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 [i]many, many more[/i] web pages created everyday by literally [i]anyone[/i], from web developers to total newcomers to the Web, to amateurs who just want to share their content because it's 'cool'. +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? +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. + +I remember when I first read about social bookmarking: people were screaming here and there that you [i]had to[/i] 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 [i]better[/i], because it also meant [i]free[/i]...then the shadows[5] came... +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 [i]Rails[/i][7]: a new social bookmarking service, simple to use and free: ma.gnolia[8]. +I immediately felt the impulse to reply (as this happened on IRC[9])[i]"i.dont.give.a.sh.**"[/i]. I really didn't want to try [i]yet another[/i] 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. + +[b]A website which [i]smells good[/i][/b] +One of the things any Web 2.0 business cannot afford to overlook is the design and user interface of their product. It [i]does[/i] 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. +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: [i]code is poetry[/i]. 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. +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? +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: [i]De gustibus non est disputandum[/i] (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. + +[b]Quick features overview[/b] +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 [i]and[/i] not require registration. Makes perfect sense. + +[i][u]Adding bookmarks[/u][/i] +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 [i]favorites[/i] 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. + +'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]: + +[quote] +[i][...] 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. [/i] +[/quote] + +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. + +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]http://ma.gnolia.com/images/icons/privacy-on.gif[/img] or [img]http://ma.gnolia.com/images/icons/privacy-off.gif[/img], whenever you like: the magic of Ajax[14] will do the rest. +You can also rate your bookmarks from one to five stars, but [i]only[/i] yours: ma.gnolia is not a pointless competition to be the one who links the most and best websites. + +[i]What if I want to delete a bookmark?[/i] Quick hint: [img]http://ma.gnolia.com/images/icons/delete.gif[/img] + +[i][u]Yes, you can tag as much as you like[/u][/i] +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. + +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 [i]bookmarklet[/i] 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. + + +[i][u]Connecting people[/u][/i] +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. +Furthermore, Ma.gnolia allows [i]groups[/i]: 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]http://ma.gnolia.com/images/icons/send-to-group.gif[/img]), 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]http://ma.gnolia.com/images/icons/send-to-contact.gif[/img]), 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. +You'll notice a [i]Messages[/i] 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 [i]cannot[/i] 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. +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. + +[i][u]Pages, stats and search[/u][/i] +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! +Two things need to be said - and yes, they might be obvious for some people: +1) Pages which require some sort of authentication cannot be saved; and +2) Saved copies cannot be viewed by people other than yourself. + +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. +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: +[quote][...]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. +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. +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.[/quote] + +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: + +ASP.NET AJAX framework comparison [18] + +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 [i]must[/i] happen: if someone saved www.zzine.org 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. + + +[i][u]Tools to play with[/u][/i] +There's a whole section of the site devoted to [i]Support and Tools[/i], 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: [i]geeks stay out of this section[/i] - it will save pointless rants. +The upside of this is that if I send someone who has [i]never[/i] 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. + +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: + +- a del.icio.us importer +- del.icio.us to ma.gnolia GreaseMonkey script - to keep your del.icio.us and ma.gnolia synchronized +- a link roll generator, to share your bookmarks on your blog or page +- a universal bookmark exporter + +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. + + +[b]Conclusions[/b] +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... + +...or perhaps the website is just so easy to use and nice to navigate that makes it harder to browse away! + + +[b]Notes[/b] +[1]Social Bookmarking, Wkipedia: http://en.wikipedia.org/wiki/Social_bookmarking +[2]Web 2.0, Wikipedia: http://en.wikipedia.org/wiki/Web_2.0 +[3]del.icio.us Social bookmarking: http://del.icio.us +[4]de.lirio.us Social bookmarking: http://de.lirio.us +[5]Shadows Social Bookmarking: http://www.shadows.com +[6]CyberArmy Community: http://www.cyberarmy.net +[7]Ruby on Rails framework: http://www.rubyonrails.org +[8]Ma.gnolia Social Bookmarking: http://ma.gnolia.com +[9]Internet Relay Chat, wikipedia: http://en.wikipedia.org/wiki/Internet_Relay_Chat +[11]Windows XP Official Page: http://www.microsoft.com/windowsxp/default.mspx +[12]CSSZenGarden: http://www.csszengarden.com/ +[13]Darren Barefoot's Blog, Sugar Ma.gnolia, Blossoms Blooming: + http://www.darrenbarefoot.com/archives/2006/02/sugar-magnolia-blossoms-blooming.html +[14]Ajax, Wikipedia: http://en.wikipedia.org/wiki/Ajax_%28programming%29 +[15]Google Mail: http://mail.google.com/ +[16]Archive.org: http://www.archive.org/ +[17]Ma.gnolia - About: http://ma.gnolia.com/about +[18] Daniel Zeiss, "ASP.NET AJAX framework comparison": +http://www.daniel-zeiss.de/AJAXComparison/Results.htm +[19]Ma.gnolia - Bookmarkles directory: http://ma.gnolia.com/support/bookmarklets
A content/articles/mongrel-shortcut-review.textile

@@ -0,0 +1,158 @@

+----- +permalink: mongrel-shortcut-review +title: "Book Review: Mongrel Digital Shortcut" +tags: +- review +- books +- rails +- ruby +type: article +filter_pre: textile +----- +If you ever considered about developing an deploying a Rails application in the last year or so, you must have heard of "Mongrel":http://mongrel.rubyforge.org/index.html before. If you didn't, I'd recommend you learn more about it because up to now it proved to be one of the few essential ingredients for deploying _scalable_ Rails applications. + +Mongrel is a creation of "Zed Shaw":http://www.zedshaw.com/ who started writing a replacement for FastCGI to use with Rails, and ended up creating a brand new, HTTP web server who turned out to be one of the best things the Rails community ever saw happening. + +It was created to be simple to use and configure, nevertheless it _does_ require some skill to set it up and tune it. Documentation is there, along with plenty of blog posts, but there's also an interesting "book":http://www.informit.com/store/product.aspx?isbn=0321483502&rl=1 from "Addison Wesley Professional":http://www.awprofessional.com/ which is definetely worth a read. + +!>/files/mongrel_shortcut.jpeg! + +"Mongrel: Serving, Deploying, and Extending Your Ruby Applications" &ndash; that's the title of the book. A _Digital Shortcut_, 100-odd pages long, in _landscape_ format to make it easier to read on a computer, straight to the point with no added sugar for just 15$ (PDF only). I must say Addison Wesley got it right: the book's format is, as a matter of fact, _optimized for web developers_, especially those who can't afford to read a 500-pages book covering everything about a subject just to find that one thing they don't know about. +This _shortcut_ 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. + +Let's have a closer look at it. + + + +h3. Overview, Introduction & Getting Started + +The first three -chapters- sections (there are no chapters, just _sections_) of the book are meant to be a gentle introduction to Mongrel and its world. The main author is "Matt Pelletier":http://www.informit.com/authors/bio.aspx?a=0260912e-6ed8-4ed1-882a-c357e644feec, but Zed Show's contributions are definitely one of the book's best selling points. +Zed's thoughts are scattered here and there in many _sidebars_ throughout the book (there's at least one in each section): you'll see an odd-looking face (Zed's self-caricature) with some text next to it; when you read it, you'll notice that they are _actually_ Zed's own thoughts, straight from his mind, with no editorial filter whatsoever in-between. +Be warned: the text included within the *Zed Sez* sidebars is highly opinionated, that's precisely what Zed _feels_ to say about something, and he'll just say it: just the plain, simple thoughts of an experienced programmer. As the author explains in *Section 1*: _"[...] You may not agree with everything he says, but you probably should."_ + +*Section 2* is a general introduction about Mongrel. It explains _what_ it is, _when_ and _why_ it was made, and _how_ it works. There's nothing new to learn if you already used Mongrel before, probably, but it's definitely the first thing to show to someone who's new to Mongrel and its world, and possibly a bit skeptical about it. +The last subsection _"What can Mongrel do for me"_ is an attempt to -brainwash- persuade you to fully embrace Mongrel and its philosophy, whether you are a developer, a sysadmin or even a manager: assertions like _"Mongrel is pretty damned secure."_ and _"Mongrel's license is capitalist-friendly."_ will definitaly make some of you (managers) happy. + +*Section 3* is slightly more juicy than the previous one, as it explains how to install and use Mongrel. Basically that's what everyone who ever used it already knows, but it's still necessary for the book's consistency, after all. After reading this section, you'll probably have your first Mongrel up and running and serving your little Rails application's pages, and you'll begin to wonder why the hell you need to keep reading this book now that everything seems to work already... + + +h3. Section 4: Configurations + +...aka "a truly useful Mongrel cheatsheet". This section dives deep(er) into Mongrel'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. + +Then the author will explore a few commonly used deployment scenarios, in particular: + +* *Standalone* &ndash; The simplest configuration possible, with just one Mongrel instance serving both static and dynamic pages. +* *mongrel&#95;cluster* &ndash; How to use _"a pack of mongrels"_ together to handle more traffic. +* *Behind a static web server* &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. + +Towards the end of the section, for the developer's delight, the author will discuss two common, useful scenarios where Mongrel can be used: + +* *Apache 2 + mod_proxy_balancer + mongrel&#95;cluster* +* *Nginx + mongrel&#95;cluster* + +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 "well known place":http://sysoev.ru/nginx/). + + +h3. Section 5: Production Deployment + +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: + +<blockquote> +<em>"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 +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."</em> +</blockquote> + +Sounds terribly true. Especially for larger projects demanding good performance under heavy traffic. Scared? Probably, if you never deployed a Rails application "properly" 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. + +Not only this, but also a "Best Practices Rubric" is also provided for the developer's own private enjoyement. It's written as a list of questions like: + +_11. Do you have a shared location where you can document the deployment, such as a Wiki or CMS?_ +_12. Do you know how to use httperf or ab and know what the statistics mean?_ + +After these 13 questions, the author provides the key to give a meaning to your answers: + +<blockquote> +<em>"For each question you answer with "NO", add 10 hours to your time estimate for completion. This may seem unrealistic, since saying "NO" to everything means it'll take 190 hours (about one +month), but this estimate is actually low according to most first deployment experiences."</em> +</blockquote> + +If you answered "NO" too many times to these questions, you may want to read on through the next subsection which states 17 "worst practices": an invaluable read for beginners! + +But after all this section is not only about stating the obvious (...right?): a full example scenario is describedand examined throughly to give you an idea of how a deployment _should_ be made, using three different machines: + +* One for Apache (as a front-end to Mongrel) +* One for the Mongrel cluster and the Rails application +* One for the database + +Maybe something you'll never do if you just want to run your grandma'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. + +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's just meant to point you to the right direction. + + +h3. Section 6: Extending Mongrel + +This section digs deeper into the software code internals and describes _how to teach new tricks to your Mongrel_, i.e. how to extend its functionality. + +Before you begin, though, don't forget what Zed himself has to say about Mongrel's simplicity: + +<blockquote> +_"I'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."_ +</blockquote> + +Mongrel'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. +Note that the book won't describe anything about the APIs of these classes. but after all, the project's "RDoc documentation":http://mongrel.rubyforge.org/rdoc/files/README.html should cover all the details you need. + +The rest of the section focuses on how to extend Mongrel, by: + +* Writing custom handlers in Ruby +* Creating custom filters to perform security checks, clean up requests and preliminary file processing +* Creating plugins and distributing them as rubygems + +Two working examples are also provided: + +* An example handler to deflate content (if the browser supports deflate) +* An example "duck" plugin, to make Mongrel quack like a duck when it's started (not the most useful thing in the world, but serves the purpose) + + +h2. Debugging, Performance & Security + +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. + +*Section 7* introduces two debugging modes: + +* Dash-Bee logging (-B) +* USR1 logging (lighter) + +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. + +Again, Zed's wisdom and wit are remarkable: + +<blockquote> +<em>"These people's problem is they suffer from Potpourri Turd Syndrome—a belief that their you-know-what don't stink and smells like fine dew on freshly cut grass. Whenever there's a bug, they go +running like kids in a candy store to other people's code trying to find fault and just assume that it's nothing they wrote. +[...] +When you run into a problem with your application, always assume it's your fault first. Mongrel'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's an error, the evidence already says it's in your code, so bite the bullet and start investigating it as if it's your problem."</em> +</blockquote> + +Similarly, *Section 8* is a short but useful overview on performance tips and tricks and deployment tuning. The most useful thing is probably the checklist of the "tuning process", which illustrates the simple steps to take to tune your application. + +Finally, *Section 9* addresses some common security concerns and clarifies how Mongrel deals with them. The answer is normally "Mongrel strictly does this" or "Mongrel doesn't support this feature". 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'd expect by a server like Apache: + +<blockquote> +<em>"As you probably see, Mongrel say, "No" in many places where most Web servers say, "Yes, OK." Sometimes this is because no one using Mongrel has needed it yet, sometimes it's because there's a +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."</em> +</blockquote> + + +h2. Conclusion + +If Mongrel is opinionated software, this is definitely an opinionated book which fully embraces the project's philosopy of simplicity above everything else. It's an interesting read and it won'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's assertions. + +Despite being a 100-pages book, this _shortcut_ covers pretty much everything you need to know *about Mongrel*. It will _not_ 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't make sense to even attempt to discuss them in this shortcut. + +Similarly, you won't find complex examples either, but that'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 "scaffold" for your own code. + +Globally, the book is well balanced and _optimized_ for its size: lightweight introductory sections at first, then the "real juice" 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. + +A good read, and a _must_ for everyone who wants to learn more about Mongrel or Rails deployment.
A content/articles/next-generation-dvds.bbcode

@@ -0,0 +1,138 @@

+----- +permalink: next-generation-dvds +title: Next generation DVDs +tags: +- review +- blueray +- hd-dvd +type: article +filter_pre: bbcode +----- +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! +[b]The endless quest for space[/b] +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. + +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. + +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. + +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 [i]per layer[/i], which will come to the aid of High Definition TeleVision ([url=http://en.wikipedia.org/wiki/HDTV]HDTV[/url]) 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 [i][url=http://www.imdb.com/title/tt0401792/]Sin City[/url][/i] 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! + +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. + + +[b]A New War has Begun[/b] +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 [i]de facto[/i] 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. + +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. + +However, once again, Sony is proposing its own format for next generation DVDs, called [url=http://en.wikipedia.org/wiki/Blu-ray_Disc]Blu-Ray Disc[/url] (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 [url=http://www.cdfreaks.com/article/186/]article[/url] that appeared on CDfreaks.com. + + +[b]The Contenders: HD-DVD[/b] +Let's now examine the first of the two contenders to the "throne": High Density Digital Versatile Disk ([url=http://www.hddvd.org/hddvd/]HD-DVD[/url]). 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. + +[i][u]Disk structure[/u][/i] +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 [i]Track Pitch[/i]) 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 [i]Numerical Amplitude[/i]: 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. + +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. + + +[i][u]Information processing and error correction[/u][/i] +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). +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! +HD-DVD has the same correction techniques and data containers as the DVD format, the only exception being that the [url=http://en.wikipedia.org/wiki/Error-correcting_code]ECC[/url] blocks on HD-DVDs are twice as large, resulting in a longer correctable burst error length (7.1mm, where DVD is about 6mm). + + +[i][u]Writing formats and copy protection[/u][/i] +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. + +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. + +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. + + + +[b]The Contenders: Blu-Ray Disks[/b] + +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 [url=http://www.bluraydisc.com/]Blu-Ray[/url] (BD) format, which appears to be more technologically advanced and offer even more space. +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. + + +[i][u]Disk structure[/u][/i] +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 [i]Numeric Amplitude[/i] of the lens has been increased to 0.85 (vs. 0.65 on HD-DVD), and the [i]Track Pitch[/i] has been decreased to 320nm, so the additional space is explained by noting that the distance between the spiral rows is even smaller! + +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. + +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! + +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. + + +[i][u]Information processing and error correction[/u][/i] +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. +Error correction is then achieved using two codes similar to the [url=http://en.wikipedia.org/wiki/Reed-Solomon_code]Reed-Solomon[/url] 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. + + +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. + +[i][u]Copy protection[/u][/i] + +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. + +As another anti-piracy method, both formats also introduce a sort of "signature" called a [i]Volume Identifier[/i] which will be very difficult to duplicate on a cloned disk. + + +[b]The World Takes Sides[/b] + +After discussing the two formats sufficiently in depth, it's now possible to itemize the pros and cons of each format: + +[i][u]HD-DVD[/u][/i] +Pros: +[list] +[*]Backward compatibility with CD/DVD will be available soon +[*]Reduced production costs, both for disks and players - cheaper to buy +[*]Improved durability +[*]Available relatively soon on the market +[/list] +Cons: +[list] +[*]Incompatible with the competitor's format +[*]Less space than competitor's format +[/list] + +[i][u]Blu-Ray[/u][/i] +Pros: +[list] +[*]Backward compatibility with CD/DVD will be available soon +[*]More space than competitor's format +[*]Technologically more advanced, longer life-span +[*]Higher recording speed +[/list] +Cons: +[list] +[*]Incompatible with the competitor's format +[*]More expensive to produce and to buy +[*]More vulnerable to scratches (the TDK solution notwithstanding) +[*]Still relatively experimental +[/list] + +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. + +Obviously, all the industries with interests in these new magnetic supports took sides with one or the other format: + +[i]HD-DVD:[/i]Toshiba, Sanyo, NEC, Paramount Pictures, Universal Pictures, New Line Cinema, Warner Bros Studios, Time Warner, and, apparently, [i][b]Microsoft[/b][/i]. + +[i]Blu-Ray:[/i] 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. + +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. + +Microsoft recently seemed to [url=http://news.softpedia.com/news/Microsoft-Sides-With-Toshiba-Against-Sony-s-Blu-ray-3798.shtml]support HD-DVD[/url] 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. + + + +[b]The End of the War[/b] +So a new [i]Standards War[/i] 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 [url=http://www.pcpro.co.uk/news/73241/hddvd-bluray-marriage-back-on.html]single standard[/url], but seems also keen on [i]seeing how it goes[/i] first, when both the two products are on the market. + +Actually there's [url=http://news.softpedia.com/news/The-chronicles-of-a-futile-battle-Blu-Ray-vs-HD-DVD-631.shtml]someone[/url] 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 [url=http://www.techtree.com/techtree/jsp/article.jsp?article_id=57500]Holographic Versatile Disks[/url] (HVD) will eventually destroy both contenders by offering, on the same disk, 1TB of space at 1Gbps transfer speed! +As a matter of fact, Japan's [url=http://www.optware.co.jp/english/what_040823.htm]Optware Corp.[/url] might be the revelation that [i]saves the world[/i]...
A content/articles/obama-may-come-to-genoa.textile

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

+----- +permalink: obama-may-come-to-genoa +title: Barack Obama may visit Genoa (Italy) on October 12th +tags: +- politics +type: article +filter_pre: textile +----- +Barack Obama may visit Columbus' birthplace on October 12th 2008, and take part in the city's celebration of the discovery of America, which is held in the city every year. As reported by *Il Secolo XIX*, Genova's local newspaper. + +Although the invitation has not been officially accepted by the American Presidential Candidate, Genoa's mayor *Marta Vincenzi* is working very hard to make it happen. + +*Kerry Kennedy* (Bob Kennedy's daughter), is said to be in charge of liaising with Obama on the US side. + +<blockquote> +"[...] Kerry Kennedy and her family &ndash; among the first and most unexpected of Obama'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's council. Kerry was introduced to Nando Dalla Chiesa's 'Columbus Day' program plan by Vincenzi . +<br /><br /> +The proposal of inviting Obama to Christopher Columbus' birthplace was immediate, and a significant move. +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]." +<br /><br /> +After Bush &ndash; the "king" 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's main square]. [...]" +</blockquote> +_&ndash; Translated from "Indovina chi viene a Genova":http://ilsecoloxix.ilsole24ore.com/genova/2008/08/11/1101689125257-indovina-chi-viene-genova.shtm, Giovanna Mari, August 11th 2008._ + +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). +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. + +If he comes, I'll definitely be there!
A content/articles/pagerank.bbcode

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

+----- +permalink: pagerank +title: The Green Bar +tags: +- google +- internet +type: article +filter_pre: bbcode +----- +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 [i]green bar[/i] 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 [b]PageRank[/b] through a simple bar with a variable length, according to a 10 point scale. + +I quietly mentioned the infamous word [i]PageRank[/i] earlier, but what is it? +Some people think the idea of the word might come from a pun involving one of Google's co-founders (Larry [i]Page[/i]), while others simply think it was the most obvious choice for a system which was supposed to [i]rank[/i] 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. + +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. + + +[b]Deus ex machina[/b] + 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: +[quote] +[i]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." +[/i][/quote] + + 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? + + Of course there's (much) more to it than a short paragraph, and obviously this [i]explanation[/i] 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. + + Indeed, PageRank contributed to label some sites as [i]important[/i] 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? + + 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. + +Take the following equation: + +[i]PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))[/i] + +Where: + +[i]PR(A)[/i] - The PageRank value of a certain page +[i]PR(Tn)[/i] - The PageRank value of all pages linking to A +[i]C(Tn)[/i] - The number of links present on page Tn +[i]d[/i](... - "damp factor", thought to be 0.85 + + 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 [i]quality[/i] 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 [i]divided[/i] equally among them. + + 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. + + +[b]Considerations and opinions[/b] +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. + + 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 [i]some millions[/i] in practice. + + 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. +For the non-mathematical minds, a [i]logarithmic scale[/i] 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). + + 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. + + 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, [i]link farms[/i][9]. + +It's now clear that what is was believed to be a solution relying on the [i]uniquely democratic nature of the web[/i] 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. + + Another complaint against PageRank was that new sites took ages to acquire [i]respectable[/i] 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. + + +[b]Case Study: ItalySimply.com and h3raLd.com[/b] +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 [i]SEO Strategy[/i] trying to acquire PageRank and good placement in search engines. +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. + + For ItalySimply, I even experienced a period of [i]PageRank 0[/i] which lasted about 2 months: although according to Google all websites should have at least PR1, PR0 is used to penalize some [i]unusual[/i] behaviour which in my case was a [i]302 - Temporarily Moved[/i] 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. + + 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 [i]vote[/i] from other sites. I then decided to put a link to h3raLd Labs on [i]every[/i] page of ItalySimply, which are now ranging from PR5 to PR2. + + The result was an immediate growth of h3raLd.com in terms of PR, which reached an acceptable 4 without [i]any[/i] link swapped, banner displayed on behalf of other sites, or anything as such. + + 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. + + +[b]Final Considerations[/b] + Although PR is by no means the unique factor to determine search engine placements, it's still certainly important as a [i]co-factor[/i]. 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 [i]naturally[/i] 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! + +[i]In Google we trust![/i] + + + +[b]Sources and related links:[/b] + +[1] Google Toolbar, [url]http://toolbar.google.com/[/url] +[2] Stanford University, [url]http://www.stanford.edu/[/url] +[3] Lawrence Page and Sergey Brin, "The Anatomy of a Large-Scale Hypertextual Web Search Engine", Computer Science Department, Stanford University, [url]http://www-db.stanford.edu/~backrub/google.html[/url] +[4] Google, [url]http://www.google.com/[/url] +[5] Google Technology, [url]http://www.google.com/technology/[/url] +[6] List of PageRank 10 sites, [url]http://www.searchenginegenie.com/pagerank-10-sites.htm[/url] +[7] Ian Rogers, "The Google Pagerank Algorithm and How It Works", IPR Computing Ltd. [url]http://www.iprcom.com/papers/pagerank/index.html[/url] +[8] Pagerank, Wikipedia page, [url]http://en.wikipedia.org/wiki/Pagerank[/url] +[9] Link Farm, Wikipedia Page, [url]http://en.wikipedia.org/wiki/Link_farm[/url] +[10] ItalySimply - Italy Real Estate Services and Relocation Help, [url]http://www.italysimply.com/[/url] +[11] h3raLd Labs - Freelance Web Development, [url]http://www.h3rald.com/[/url] +[12] "The Rundown on 301 and 302 redirects", September 10th, 2004, +[url]http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html[/url]
A content/articles/perfect-browser.bbcode

@@ -0,0 +1,194 @@

+----- +permalink: perfect-browser +title: The Perfect Browser +tags: [] + +type: article +filter_pre: bbcode +----- +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?[b]Point of view, clarifications and scope of this article[/b] + +So you're reading this article hoping to find out which is the [i]best[/i] browser ever made? Well, you're wasting your time. There's no such thing as [i]The Perfect Browser[/i], 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 [i]"best browser ever made."[/i] Granted, I do do that sometimes, but let's put my personal bias into some sort of perspective: + +Mozilla Firefox represents the most remarkable effort to create a [i]perfect browser[/i], but in some cases, and for some particular tasks, it may not be considered optimal by [i]some people[/i]. + +Having said this, I hope I can convince you that I'm not [i]that[/i] 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. + +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 [i]Windows users[/i] a small selection of alternative browsers. + + +[b]Alternative Browsers[/b] + +There are literally dozens of [i]alternative[/i] 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. + +In the following sections, we'll examine the following four free browsers, which are considered to be the most obvious alternatives to Internet Explorer. + +- Firefox +- Opera +- K-meleon +- Netscape + +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. + + +[b]Why IE is 'bad'[/b] + +'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!'. + +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. + +Personally, I decided not to use IE anymore because: + +- It's slow on my computer (which is old, as some of you may know) +- 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]. +- It's not very customizable +- It doesn't have (or support) additional features +- It deliberately breaks web standards or creates its own, which makes things difficult for web developers +- It's normally behind the supported technologies +- I hate the idea of using a proprietary browser imposed by Microsoft + +I could discuss each one of these reasons in more detail, but that would be an article in and of itself. + + +[b]Firefox[/b] + +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 [i]SeaMonkey[/i] [10]. + +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 [i]twice[/i]. + +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. + +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. + +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. + +To make it more readily apparent, statistics [12] [15] say that the maximum time IE is [i]not[/i] in danger from to an unpatched vulnerability is 7 days, while for Firefox, it is well over 200. + +Another of Firefox's strong points is the ability to add various [i]extensions[/i] and [i]themes[/i] for all kind of necessities: improving web searches, getting localized weather forecasts, playing music, blocking adverts, tweaking webpages, composing webpages, etc. +Firefox is [i]extremely[/i] 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. + +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. + +After asking some IE users, it seems that Firefox can appear too [i]geeky[/i] 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. + +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. + +Anyhow, all those people who don't like having to play around with extensions should just use Opera. + + +[b]Opera[/b] + +A few years ago I came across Opera's site [16], and I downloaded their [i]free[/i] 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 [i]'the fastest browser on Earth'[/i] to describe their product, and they seem to be right[5]. + +I actually didn't like it at first, because - at the time - it didn't offer anything better than IE [i]and[/i] the company was more or less silently asking people to [i]pay[/i] 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. + +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. + +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. + +Speaking of features, it offers: + +- Tabbed browsing and integrated search like Firefox (and IE7) +- A truly remarkable technology able to make [i]any webpage[/i] fit a window by zooming images in and out automatically +- A complete and fully working mail client +- An address book +- The ability to save browsing sessions +- Easily re-open closed tabs +- Skins +- A [i]magic wand[/i] to fill in forms and logins automatically +- A built-in scratchpad/notepad +- Voice integration (yes, you can even speak to your browser now, imagine that!) +- SVG support - not that it really matters for now, but it's a cool thing to say nowadays + +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. + +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. + +There are still two things about Opera that put me off from using it, however. One is the lack of a built in [i]"I'm feeling lucky"[/i] 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. + + +[b]K-meleon[/b] + +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: + +- It wasn't conceived with the [i]average user[/i] in mind +- There's another browser using the same technology which is considered to be better +- It apparently doesn't offer anything new or stimulating + +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 [i]Windows only[/i]. + +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. +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 [i]secondary browser[/i] 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. + +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. + + +[b]Netscape[/b] + +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. + +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. + +Furthermore, Mozilla [i]suddenly[/i] 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. + +When the Netscape browser was launched in May 2005, it was supposed to represent a [i]new standard[/i] 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! + +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. + +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. + +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 [i]multibar[/i] 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. + +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. + +[i]But isn't Netscape a Firefox based browser?[/i] + +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 [i]too smart[/i]: 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 - [i]total[/i] compatibility - is achieved by surrendering to IE flaws and maybe even giving no incentive for developers to abandon an IE-oriented web development: [i]'If Netscape can use an IE engine, why should I code using web standards?'[/i] + +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 [i]perfect[/i] browser, and it enriches Firefox with some new features which either are normally not available or require extensions, but it's not for me. + + +[b]Summing up[/b] + +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. + +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. + +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. + +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. + +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 [i]perfect browser[/i]. What about you? + + +[b]Credits[/b] +Thanks to comet for providing appropriate thoughts and opinions regarding the browsers' security. + +[b]Notes and Resources[/b] +[small] +[1] Clarification about the 'Gecko' engine: [url]http://www.mozilla.org/newlayout/gecko.html[/url] +[2] 'One Week with Firefox, its Extensions and Opera', OsNews.com, by Mart'n Marconcini [url]http://www.osnews.com/story.php?news_id=7562[/url] +[3] 'Firefox 1.5 vs Opera 8.5', SonSpring Journal, 09/22/2005 - [url]http://sonspring.com/journal/firefox-15-vs-opera-85[/url] +[4] Evolt.com, Browser list - [url]http://browsers.evolt.org/[/url] +[5] HowToCreate.com - Browser Speed Analysis -[url]http://www.howtocreate.co.uk/browserSpeed.html#winspeed[/url] +[6] 'Comparison of web browsers', Wikipedia page - [url]http://en.wikipedia.org/wiki/Comparison_of_web_browsers[/url] +[7] Slim Browser, Home Page - [url]http://www.flashpeak.com/sbrowser/[/url] +[8] Maxthon, Home Page - [url]http://www.maxthon.com/[/url] +[9] AvantBrowser, Home Page - [url]http://www.avantbrowser.com/[/url] +[10] SeaMonkey Project, Hope Page - [url]http://www.mozilla.org/projects/seamonkey/[/url] +[11] StopIE.com - [url]http://www.stopie.com/[/url], BrowseHappy.com - [url]http://browsehappy.com/[/url] +[12] Secunia vulnerabilities, Internet Explorer - [url]http://secunia.com/product/11/[/url] +[13] Firefox Home Page - [url]http://www.mozilla.org/products/firefox/[/url] +[14] Spread Firefox website - [url]http://www.spreadfirefox.com/[/url] +[15] Secunia vulnerabilities, Mozilla Firefox - [url]http://secunia.com/product/4227/[/url] +[16] Opera Browser, Official Website - [url]http://www.opera.com/[/url] +[17] Opera becomes free, webpage - [url]http://www.opera.com/free[/url] +[18] Opera and Firefox extensions - [url]http://virtuelvis.com/archives/2005/01/opera-and-firefox-extensions[/url] +[19] How to add 'I'm feeling lucky' to Opera - [url]http://my.opera.com/community/forums/topic.dml?id=63620[/url] +[20] Writely.com, free online word processor - [url]http://www.writely.com/[/url] +[21] K-meleon Project, Sourceforge - [url]http://kmeleon.sourceforge.net/[/url] +[22] Secunia vulnerabilities, K-meleon - [url]http://secunia.com/product/3684/[/url] +[23] Netscape Browser, Home Page - [url]http://browser.netscape.com/ns8/[/url] +[24] 'Netscape fixes holes in 'security' browser', Zdnet - [url]http://www.zdnet.com.au/news/security/0,2000061744,39192767,00.htm[/url] +[25] Netscape 8 'breaks' IE, Zdnet - [url]http://news.zdnet.co.uk/software/applications/0,39020384,39200178,00.htm[/url] +[/small]
A content/articles/pre-review-of-ie7.bbcode

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

+----- +permalink: pre-review-of-ie7 +title: Pre-review of Internet Explorer 7 +tags: +- browsers +- microsoft +- ie +type: article +filter_pre: bbcode +----- +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...[b]In the Beginning[/b] +Recently (5 months ago, that is) the aforementioned [i]"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"[/i]. 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". + +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 [i]feel[/i] like some progress is going on, be it a security fix or a new feature. Firefox will hopefully release version 1.1 [i]at any time[/i] now, with various new [url=http://www.zzine.org/read.php?op=view&item=1321]features[/url] 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 [i]still[/i] running "Internet Explorer version 6.0". + +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[url=http://www.microsoft.com/windows/IE/ie7/default.mspx]Internet Explorer 7[/url] is supposed to be "[i]freely downloadable, as always[/i]" this summer. + +So what's new in IE7? + + +[b]Discovering (and guessing) further details[/b] +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. [url=http://blogs.msdn.com/ie/default.aspx]IEBlog[/url] 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. + +When the announcement was made, those guys wrote something like: +[quote] +[i] +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. + +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.? +[/i] +[/quote] + +That's so sweet! They are doing this for us, and they are listening to us... + +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. + +Back in March, more details about this new amazing product began to [url=http://www.microsoft-watch.com/article2/0,1995,1776290,00.asp]leak[/url], inevitably, and here are the new features that IE7 is supposed to have: +[list] +[*]Tabs +[*]International domain name (IDN) support +[*]Transparent Portable Network Graphics (PNG) support (finally!) +[*]Simplified printing from inside IE 7.0 +[*]A built-in news aggregator. +[*]Somewhat extended support to CSS2 (but not the whole standard) +[/list] + +Wonderful and incredible at the same time: is IE7 trying to emulate Firefox? + +[i]So, what will this wonder look like?[/i] - Someone might wonder... And here are some leaked [url=http://neowin.net/comments.php?id=29131&category=main]screenshots[/url] that could be real enough. Impressive. + + +[b]New support for old stuff[/b] +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). + +There's a nice post on IEBlog regarding [url=http://blogs.msdn.com/ie/archive/2005/04/26/412263.aspx][b][i]PNG Support[/i][/b][/url], where the guy who made the thing possible, Sam Fortiner, explains what he had to do and why. +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. + +Tony Schreiner, on the same blog, provides a detailed explanation on his work concerning [url=http://blogs.msdn.com/ie/archive/2005/05/26/422103.aspx][b][i]Tab Support[/i][/b][/url]: 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 [i]aren't[/i] confused by tabs at all, so they decided to implement them in IE7. + +Tony gives away some technical details regarding IE7's implementation of tabs, which essentially consists of [i]"pushing a large part of what you see in IE6 into a tab"[/i], 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... + +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 [url=http://msdn.microsoft.com/longhorn/understanding/rss/default.aspx?pull=/library/en-us/dnlong/html/rsssupportinlonghorn.asp]RSS support[/url] itself, so this seemed a logical addition to IE7. + + + +[b]The fear of uncertainty[/b] +IE support for web standards, in particular CSS, has always been a hot topic for developers. + +[quote][i]When we shipped IE 6.0, we finally fully supported CSS 1, and had some pieces of CSS2 implemented as well.[/i][/quote] + +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 [i]"Microsoft does not want to fully support web standards because 90% of Internet users use IE, hence, they can make the laws"[/i]. 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 [url=http://www.alttags.org/archives/2004/04/29/33/]here[/url]. + +Words in an official [url=http://blogs.msdn.com/ie/archive/2005/03/09/391362.aspx]post[/url] don't bode well for the future either: +[quote][i] +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. +[/i][/quote] + +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... + +In another article, [url=http://www.microsoft-watch.com/article2/0,2180,1776935,00.asp]MicrosoftWatch[/url], reports that [i]"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".[/i] +Although this cannot be regarded as a 100% authoritative source, people started [url=http://dean.edwards.name/weblog/2005/03/the-reason/]speculating[/url] 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?
A content/articles/project-gutenberg.bbcode

@@ -0,0 +1,127 @@

+----- +permalink: project-gutenberg +title: "Project Gutenberg: The What, When and Why" +tags: +- writing +- internet +type: article +filter_pre: bbcode +----- +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. +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... +[b]Origins[/b] + +Even if you never heard the word ?e-book?[1] before, you can probably guess its meaning: [i]electronic book[/i], 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 [i]e-book[/i] was created in 1971. + +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 [i]computer time[/i]. 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. + +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 [i]project[/i] 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. + +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. + + +[b]What is Project Gutenberg?[/b] + +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. + +The mission of the project can be summarized as follows[4]: + +[center][i] "To encourage the creation and distribution of eBooks." + [/i][/center] + +In order to achieve this, Project Gutenberg is set up such that [i]anyone[/i] 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. + +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]! + +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. + +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. + +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. + + 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 [i]proper[/i] or [i]standard[/i] 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 [i]Plain Vanilla ASCII[/i], 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. + +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. + +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. + + +[b]Not All Books Are Equal (for now)[/b] + +By looking at some of the titles available on Project Gutenberg, you?ll notice that most of them are [i]classics[/i] or relatively old works: for example, you won?t find the latest [i]Harry Potter[/i][10] available for download. + +Since [i]all[/i] 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. + +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 [i]only if[/i] some particular conditions subsist: + +[list] +[*]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. +[*]The last surviving author died at least 70 years before January 1 of the current year. +[*]Neither a [i]perpetual copyright[/i] is granted by the Berne Convention nor has a particular government (US or EU) passed a copyright term extension. +[/list] + +Now we can see why there are not very many [i]new[/i] publications available in the project, and that?s really frustrating for Michael Hart and other volunteers: + +[i] "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."[/i][12] + +After all these considerations, we can take a closer look at Gutenberg?s license[13] which comes in two different versions: [i]informative[/i] 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 [i]only[/i] to PG, you?ll have to contact the author to obtain permission. + +Furthermore, anybody can use the PG trademark when distributing [i]verbatim[/i] 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. + + +[b]Satellite Sites and Similar Projects[/b] + +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 [i]?Break Down the Bars of Ignorance and Illiteracy?[/i]. 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. + +Hart is obviously aware of the fact that there are also some sites [i]selling[/i] 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. + +One of the most important [i]satellite site[/i] 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. + +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. + +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. + +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]. + +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 [i]Hamlet[/i] to read "To be or not to be, who gives a crap." + +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. + + +[b]The Future of Project Gutenberg[/b] + +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 [i]intimidate[/i] 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. + +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. + +So far, Michael Hart showed the entire world that a single person can do [i]a lot[/i] 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: + +[i]?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.?[/i][12] + + + + +[b]Notes &amp; Further Readings[/b] + +[1] Ebook, Wikipedia page ? [url]http://en.wikipedia.org/wiki/Ebook[/url] +[2] Project Gutenberg, Wikipedia page - [url]http://en.wikipedia.org/wiki/Project_Gutenberg[/url] +[3] Movable type, Wikipedia page - [url]http://en.wikipedia.org/wiki/Printing_press[/url] +[4] Project Gutenberg FAQ0 - [url]http://www.gutenberg.org/about/faq0[/url] +[5] Project Gutenberg Official Website - [url]http://www.gutenberg.org[/url] +[6] Project Gutenberg?s catalog - [url]http://www.gutenberg.org/catalog/[/url] +[7] Project Gutenberg?s volunteering page - [url]http://www.gutenberg.org/info/volunteer[/url] +[8] Project Gutenberg FAQ3 ? [url]http://www.gutenberg.org/about/faq3[/url] +[9] Optical Character Recognition, Wikipedia Page ? [url]http://en.wikipedia.org/wiki/Optical_character_recognition[/url] +[10] ?Harry Potter and the half-blood prince?, Scholastic Inc. website - [url]http://www.scholastic.com/harrypotter/books/prince/index.htm[/url] +[11] Public Domain, Wikipedia Page - [url]http://en.wikipedia.org/wiki/Public_domain[/url] +[12] ?The Second Gutenberg Interview with Michael Hart?, Sam Vaknin, Ph.D. - [url]http://samvak.tripod.com/busiweb29.html[/url] +[13] Gutenberg Project license ? [url]http://www.gutenberg.org/license[/url] +[14] Project Gutenberg?s Distributed Proofreading - [url] http://www.pgdp.net/c/default.php [/url] +[15] HTML Writers Guild Project Gutenberg ? [url]http://gutenberg.hwg.org/[/url] +[16] Project Gutenberg Australia ? [url]http://gutenberg.net.au/[/url] +[17] Project Gutenberg Germany ? [url]http://gutenberg.spiegel.de/[/url] +[18] Project Gutenberg Europe ? [url]http://gutenberg.nl/[/url] +[19] Wikisource and Project Gutenberg, Wikisource page ? [url]http://wikisource.org/wiki/Wikisource:Wikisource_and_Project_Gutenberg[/url] +[20] Wikisource main page ? [url]http://wikisource.org/wiki/Main_Page[/url] +[21] Wikipedia main page ? [url]http://www.wikipedia.org/[/url] +[22] GNU Free Documentation License ? [url] http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License [/url]
A content/articles/project-windstone.bbcode

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

+----- +permalink: project-windstone +title: "CyberArmy Presents: Project WindStone" +tags: +- internet +- open-source +type: article +filter_pre: bbcode +----- +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. +If you don't like the idea of using Microsoft-owned technology as an authentication system, we have an alternative for you... [b]Show me your Passport[/b] +[quote]"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!"[/quote] + +This is what the MSN Passport does, in a nutshell: it provides a [i]universal[/i] 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. + +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? + +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: + +[quote]"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][/quote] + +People have concerns, but what has been done? Are there any alternatives? Well, yes and no. Apparently the [i]Liberty Alliance Project[/i][6] was created to offer a valid and perhaps more democratic alternative to the Microsoft Passport: + +[quote]"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][/quote] + +The project's founders (160 IT organizations, including Sun Microsystems and VeriSign) aim to create a [i]distributed[/i] authentication system, as opposed to the [i]centralized[/i] MSN Passport. This will undoubtedly solve some of the problems, but the system is still under development. + +[b]Introducing Project Windstone[/b] +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]. + +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. + +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. + +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: + +[list] +[*]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. +[*]The username can be any valid email address submitted by the user. +[*]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. +[*]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. +[*] Data sent from client to server and vice-versa is encrypted. +[/list] + +[b]Some more technical details[/b] +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): + +[i] +The format of this command string is as follows: + +AAAA.*BBBBBBBBBB.*CCCC::DDDDDDDDDDDDDDDDDDDD::EEEE::FFFFFFFFFF + +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). + +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. + +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. + +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. + +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). + +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 inform