Firefox Summit 2008, Day 1

The Firefox Summit 2008 started today in the city of Whistler, BC, Canada. Around 400 contributors to the Mozilla project gathered to meet, share thoughts and discuss the 3.0 release of Firefox and plan for the next releases. I'm attending the summit as the Arabic localizer. I will post a daily highlight of the summit on my blog, so let's start with day one.

Firefox Summit 2008

Read more »

Checklist for Securing PHP Configuration

The Apache/PHP/MySQL stack is immensely popular for web application development. Its components are powerful, versatile and Free. Unfortunately however, PHP comes with a default configuration that is not suitable for production mode, and may cause developers to use insecure techniques during the development phase. Inside is a check list of settings that are intended to harden the default PHP installation.

Read more »

9 JavaScript Tips You May Not Know

JavaScript is a fully-featured Object-Oriented programming language. On the surface, it shares syntactical similarities with Java and C, but the mentality is quite different. At its core, JavaScript is more similar to functional languages. Inside is a list of JavaScript tips, some offer techniques to simulate features found in C-like languages (such as assertions or static variables). Others are meant to improve performance and explore some of the more obscure parts of the web scripting language.

Read more »

Increase Your Linux/Unix Productivity With GNU/Screen

screen is one of my favorite GNU utilities; it provides a quick and easy way to have several open terminals and do multiple things at once. Another cool feature about screen is that it stays running even if the user logs out or disconnects. This enables the user to detach from their session and resume it later. This feature is a life saver when working on a remote machine through SSH. If I was disconnected for some reason, I can easily reconnect and resume my session.

screen is very easy to use. Below is a list of its main commands. Read on, experiment with them, and you will become proficient in screen in minutes. Believe me you will appreciate it.

Read more »

A Collection of Vim Tips

Vim is one of the most popular text editors for Linux and Unix systems. Its text-based interface may look intimidating for newcomers, but underneath it there is a wealth of functionality to be learned. Experienced Vim users often feel much more productive using Vim than GUI-based text editors.

I've been using Vim on a daily basis for years to do a wide range of tasks, from casual editing of short text files, to managing large programming projects, and every now and then I come across a new feature that considerably helps in some aspect of text editing. For this reason, I decided to compile a list of such Vim tips in this post.

Read more »

Drag/Drop Portal Interface with Scriptaculous and Drupal

In the first section of this article I'll demonstrate how to create a drag/drop portal in a few lines of JavaScript code, using the excellent Prototype and Scriptaculous JavaScript libraries. In the second section, I'll explain how to integrate this code into Drupal as a server backend for storing user settings. You may check the frontend here (tested with Firefox 1.5, IE6, and Opera 8.5), and download a reusable JavaScript Portal class and Drupal module for the backend at the bottom of this post.

Read more »

CSS Debugging Bookmarklets

I wrote two CSS debugging bookmarklets to ease the pain of HTML/CSS development under Internet Explorer. They mimic two commonly-used features in the Web Developer extension for Firefox. The first bookmarklet outlines block-level elements, and the second displays ID and class information. Although that such functionality already exists in Web Developer and other bookmarklets, I couldn't find anything that is compatible with Internet Explorer and works offline (What I found were bookmarklets that relied on including remote stylesheets).

To test a bookmarklet, simply click its link. To use it, drag and drop the link to your Links/Bookmarks toolbar, and press the resulting button when you want to activate the associated functionality. These bookmarklets were tested in Firefox 1.5, Internet Explorer 6.0 and Opera 8.5. I haven't had the chance yet to test with KHTML/Safari, but I think they should work because the code is standards-complaint.

Anyone who's worked with HTML/CSS for a while knows that Internet Explorer support for standards is lacking to say the least. It has many obscure bugs and compatibility issues. Firefox is my platform of choice for web development because of its compliance with standards and the plethora of development and debugging tools and extensions available (most notably Web Developer and FireBug). Once coding is finished under Firefox, I validate the code and test with other browsers (IE, KHTML/Safari and Opera). Most of the time the code works in Opera and KHTML without any issues; however, IE often produces problems, and while working around them, I used to wish I had Web Developer's features for IE. Now I have these bookmarklets. They took me about 5 minutes to write and test under Firefox, but IE silently failed to produce the desired results until I did another hour of work. I adopted Web Developer's styles for outlined elements and ID/class information for consistency. And now I'm sharing them here hoping that others will find them useful as well.

TurboGears Tutorial: Social Bookmarking Application

Those interested in web development may have heard about the Model-View-Controller software pattern by now. This pattern emphasizes on separation of application's data model, UI (view), and control logic. The concept itself isn't new and has been around since 1979, but recently there have been many successful implementations of the pattern in the domain of web development.

While exploring the available MVC frameworks, I decided to learn TurboGears, which is a Python framework. I viewed many webcasts and documents, then decided to practice my newly-gained knowledge by writing a basic del.icio.us-like social bookmarking application in TurboGears. Now I'm documenting my work as a tutorial, hoping that other TurboGears newcomers would find something useful in it.

Read more »