censorshit.org

September 10, 2008

my friend just started a new blog at http://censorshit.org please check it out

if you already have a putty private ssh key and you want to use it with Cyber duck in SFTP mode, following is what you need to do:

1. Download and Install PuttyGen from here

2. Open your current private ssh key in puttygen.

3. From the menu, select export to openssh key and save it.

4. use above exported key in cyberduck.

Enjoy!

Symfony – ORM TDD DRY RDP

February 3, 2008

If you must use PHP for your web application, and you really a fan of the rails way.

Compare Rails and Symfony, read this blog i hear a symfony rails vs the symfony php framework 

Try out Symfony:

” Symfony is a web application framework for PHP5 projects.

It aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure.

The very small number of prerequisites make symfony easy to install on any configuration; you just need Unix or Windows with a web server and PHP 5 installed. It is compatible with almost every database system. In addition, it has a very small overhead, so the benefits of the framework don’t come at the cost of an increase of hosting costs.

Using symfony is so natural and easy for people used to PHP and the design patterns of Internet applications that the learning curve is reduced to less than a day. The clean design and code readability will keep your delays short. Developers can apply agile development principles (such as DRY, KISS or the XP philosophy) and focus on applicative logic without losing time to write endless XML configuration files.

Symfony is aimed at building robust applications in an enterprise context. This means that you have full control over the configuration: from the directory structure to the foreign libraries, almost everything can be customized. To match your enterprise’s development guidelines, symfony is bundled with additional tools helping you to test, debug and document your project.

Last but not least, by choosing symfony you get the benefits of an active open-source community. It is entirely free and published under the MIT license.

Symfony is sponsored by Sensio, a French Web Agency well known for its innovative views on web development.”

Here is the online version of Symfony Book,  if you want you can check the 1.1 version of the book, which will cover updates in upcoming 1.1.0 release.

PHPSpec is the first BDD framework for PHP, similar to RSpec in ruby. There are clear advantages of BDD over TDD suck as test against specification of behavior.

“PHPSpec is a simple framework. As the official description suggests you can write code examples which are repeatable. This means you write an example, and may repeat it as often as you wish to ensure the implementation code it relates to continues to abide by the example. PHPSpec is related to Unit Testing, but our Behaviour-Driven Development (BDD) origins determine we use a clear plain English style API. This API, given it’s fluent style and approximation of natural language is therefore referred to as a Domain Specific Language (DSL). At a deeper level, PHPSpec was designed entirely with BDD in mind. Though similar to Unit Testing, the framework is being designed to support BDD from the ground so that learning, understanding and practicing BDD is as easy as possible.”

Install PHPSpec

PHP Spec Document

PEAR does not come installed on Leopard by default, though it is very easy to install, check this blog article on Click on Tyler

Rails framework used YAML for all most any configuration files. In PHP, there is n official support for YAML, eve though there are support for INI, JSON and XML.The current release is 0.2.0 beta. Check out this great tutorial PHP meet YAML, and official Horde YAML website. 

Many people believe that “rubinius matters to Ruby’s future“. Ruby is still widely used as a scripting language that usually are interpreted, but projects like Rubinus a virtual machine and compiler for Ruby and YARV a new bytecode interpreter are transforming Ruby into a system programming language.

If you are interested in a detailed analyze of system and scripting programming languages, check out this “scripting: higher level programming for the 21st century“. It has some detailed explanations and comparisons, more importantly it predicted the rising of scripting language.

A language like Ruby empowers both of system and scripting programming languages will definitely have a promising future.

Ruby Block and Closure

January 8, 2008

The most difficult part of Ruby Language for any ruby new comer is block and closure. Those two features are not very common among other modern high level programming languages like PHP or Java. They are used extensively in ruby magics. Here is what I found useful while learning.First, I went through “Chapter 4 Containers, Blocks and Iterators” from book Programming Ruby 2nd Edition, here the first edition free online. I highly recommend you get this book. The 2nd edition covers ruby 1.8, at this time Ruby has released version 1.9. For changes in Ruby 1.9 check out this great blog post at Eigenclass.To help you understand Closure better, here is more examples. More tutorials from DevArticles – Ruby Blocks and Iteration and Ruby Learning . Also, here is an interview with Yukihiro Matsumoto the creator of Ruby about blocks and closures. He talked about the importance of blocks and what makes block a closure. He also noted what is the benefit of real closure and where he got inspiration from

—-
update 2008-01-14

InfoQ: The state of the Lambda in Ruby 1.9 talked about Ruby Closure and Block in general, also what’s new in Ruby 1.9 for block and closure. 

Needless to say Migration is one of the best tools in Rails that make Ruby on Rails shine. If you are a PHP developer, check out this [Zend Framework: Zend_Db_Schema_Manager Component Proposal].

“Zend_Db_Schema_Manager maintains a database schema in a database agnostic format. This ensures that the same change can be applied to multiple databases and all changes can be stored in a version control system. The schema itself can be given in several formats like XML, PHP. Additional input formats could be integrated. “

Since this is still an early stage proposal, so there is no time line on when will this be available or even be accepted into the framework. But it’s always good to give your feedback to the proposal :)

Ruby on Rails 2.0 Tutorial

January 5, 2008

Recently, I start learning Ruby on Rails. I bought a rails books[Agile Web Development With Rails] to start with. The problem is as soon as I start running the example code in the book strange errors popup. After some search,  it because most book out there are not covering Rails 2.0. Lucky there are already wonderful people put together some rails 2.0 tutorials. Here is a list of them