Heard in the Community (2010.07.25)

"Heard in the Community" series aims to wrap up news from the PHP, symfony and other communities I find interesting and follow.

PostgreSQL installation in Ubuntu 10.04

PostgreSQL is a powerful and reliable object-relational database system. It's a great alternative for MySQL. It is as easy to set up, performs better and offers far more features.

MySQL installation in Ubuntu 10.04

MySQL is one of the most popular relational database systems which is widely used with PHP applications. It's relatively easy to set up and use. Here's a quick guide of how to install and configure MySQL in the newest release of Ubuntu.

Getting a class and method overview in vim with the TagList plugin

TagList plugin for vim allows you to view list of classes, methods, variables, constants and other tags from index file generated by exuberant ctags. TagList shows tags in a context of files you edit and groups them by type. You can jump to a chosen tag, open it in a new tab or window and do many other useful things.

The best vim cheat sheet ever!

Here's an unique graphical cheat sheet I found on ViEmu website. They also have a tutorial based on it. Really useful stuff. Not only for a vim newbie!

Reply to PHP 5.3 and the Future

Mark Evans wrote on his blog interesting post about PHP 5.3 and the Future. I guess the main concern here is similar we used to have with PHP4 to PHP5 migration (GoPHP5 campaign). Mark raised three questions to the community which I'd like to reply to.

Jumping to a class, function and variable definitions in vim with exuberant ctags

Exuberant ctags make it possible to jump to the definition of a class, method, variable and any other language object in vim. Tool is able to generate an index file (a.k.a tag file) for one of 41 supported programming languages. Index can be used by editors like vim to quickly find related keyword.

Exploring files and directories in vim with the NERD tree plugin

Exploring, opening, switching, renaming, moving files and directories are common tasks performed during coding. In IDEs it is usually achieved with some kind of filesystem explorer. In vim I preffer to use the NERD tree plugin.

Ubuntu 10.04 Lucid Lynx

Ubuntu 10.04 Lucid Lynx was released two days ago. Yesterday I've installed it on my laptop. As I used beta before I wasn't surprised with a stable release. I'm also not disappointed. It's just great!

Setting up a PHP development environment with nginx on Ubuntu 10.04

Nginx is a lightweight http, proxy and load balancing server. It's a serious alternative for a widely used apache. Most important advantages of nginx on a production environments are speed and small amount of memory it uses. In a development environment I really like the simple and flexible configuration. Here's a guide how to quickly prepare PHP development environment with nginx on Ubuntu 10.04 (Lucid Lynx).

Ubuntu One Music Store is public now

I'm writing this blog post while listening to the first song I bought just few minutes ago on Ubuntu One Music Store. It cost me 79 euro cents. Oh yes, Ubuntu One Music Store is public now!

Textile in vim - edit your text files with wiki markup

Textile is a simple markup language. It's used in CMS and wiki implementations (i.e. Redmine). I also like to use it while making notes in plain text files. Textile plugin for vim adds support for syntax highlighting, preview and html conversion of Textile documents.

Ubuntu 10.04 Lucid Lynx is just around the corner

Yesterday first beta of Ubuntu 10.04 was released. Its code name is Lucid Lynx. I decided to give it a try even if it's unstable. I upgraded my old desktop computer which was still running Ubuntu 9.04.

Blogged in 2009

2009 is the year I came back to blogging. To be honest I didn't write as much as I could or want to. One of my goals for 2010 is to increase quantity and quality of my blog posts.

Viewing svn diff result in vim

Some time ago I explained how to use colordiff to display svn diff's result in colors. You can do pretty the same with vim. It is specially useful when you have big amount of code to commit and it needs to be reviewed first. Vim makes navigating through it easier.

Frets on Fire - Guitar Hero in Ubuntu 9.10 (Karmic Koala)

I just played Frets on Fire, an amazing game which managed to absorb me enough to write this blog post. It doesn't happen to often. Frets on Fire is a Guitar Hero clone for PC (runs on Linux, Mac and Windows).

Chromium - Google Chrome in Ubuntu 9.10 (Karmic Koala)

Google Chrome doesn't support Linux based operating systems yet. However, it is made on Chromium which works on all major platforms. Chromium is an Open Source web browser with the same feature set as Google Chrome. Actually Google Chrome is based on Chromium. The only difference is the logo.

How to use TextMate like snippets in vim?

Snippet is a piece of text which can be pasted into the document. Parts of it can be parametrized or calculated while pasting. Snippets can increase your productivity by letting you to write common parts of code faster and without mistakes. One of the most famous snippet implementations is included in TextMate editor. In vim we have some of TextMate's snippet features bundled in snipMate script.

How to record a macro in vim?

Macro is a sequence of instructions performed as a one step. In programming it helps automating the repeatable tasks which makes them less boring and less error-prone. Instead of performing the same actions over and over again, it's better to record them as a macro. Once macro is saved it can be run as many times as needed. Vim as a one of most powerful editors has macro support built in.

Symphony CMS on nginx

I decided to give a Symphony CMS a try because of its XSLT templating system and structured approach in creating websites. As most of PHP applications it's running on apache out of the box. Since I preffer using nginx I've encountered small problems with the configuration.

Caching the websites with bash script and apache's .htaccess file

Recently I got a task to make a completely inefficient application usable enough to give the development team time for improvements. I didn't know the application and didn't have sufficient time to learn it. In that completely miserable moment I was left alone.

Viewing svn diff result in colors

svn diff allows us to see the changes made on the files in the subversion repository. However, its output is not always clear. We can improve our experience a bit by installing colordiff which wraps diff command and produces coloured output.

Chromium - Google Chrome in Ubuntu 9.04

Chromium is a project aiming to run Google Chrome web browser on Linux. Launchpad repositories deliver apt sources list for Ubuntu which enables us with an easy installation process like usual: add sources and authorization key, update package database and install the application.

Using SimpleXML with sfWebBrowser to parse html documents

sfWebBrowser is a class that emulates browser calls. It gives us nice object oriented interface to navigate through document structure in a programmed way. It can return response as SimpleXML which enables us to use xpath queries on the document being parsed. Unfortunately html pages are hardly ever XML valid documents. That's why in most cases sfWebBrowser rather throws and exception than returns something. Here is how we can write a workaround for it.

Put your stylesheets at the top and your scripts at the bottom

Putting the stylesheets at the top of your web page and moving the scripts to the bottom are only two of thirty four rules described in Best Practices for Speeding Up Your Website (by Yahoo). Following these two rules, however, can really decrease visible time of page rendering. I will present a simple solution to achieve this in symfony framework.

Looking at the website's source code

Most of the web programmers have some kind of deviation that tells them to look into the source code of the websites they visit. In many cases author planned to have nice indented output. In other cases author just didn't care.