Blog

This is a little tip to help programmers and system admins shave off a few milliseconds from their daily command line interface workflow. For the uninitiated, please note that some programmers, including yours truly, have been reported to spend hours or even days trying to automate a repetitive task that takes 5 seconds to execute....


Specifications

One or two 16m2 rooms available in a shared 150m2 office in a strategic location at the intersection of Slaf Street and Hayek highway at Dekwaneh.

One of the rooms also contains a wall closet of about 2m2.

Shared conference room of 15m2, shared Balcony space of 22m2 with an open view, 13m2 kitchen with its balcony,...


Google is getting smarter and smarter everyday. Not only it's the main search engine almost universally, it's also becoming a go to tool for live smart computations and unit conversions. Basically, you can think of Google as a search engine and also a smart question answer tool.


Introduction

If you want to declare an array as a constant in PHP, you need to look further than what PHP provides as standard. Technically, if you look at PHP's Constants Syntax, it's not possible to define an array as constant, except from PHP 5.6 onwards. As of this writing, PHP 5.6 is still not widely available, and hence here's...


Introduction

Source code management, also known as code version control, source control, and revision control, is essential to say the least. For programming, it was and it always will be even more than essential. For other types of documents, it is becoming more and more essential and we are seeing business managers and graphic...


Introduction

In a previous blog post, we explained what hierarchical paths are, gave examples, and solved a problem with the pathauto module of Drupal 7 that caused certain links to contain a buggy "front" slug.

In this blog post, we will go deeper into all the issues that come with implementing a proper URL paths hierarchy in Drupal...


Generating hierarchical paths in Drupal 7 based on the pathauto module is not an easy task. First, in a nutshell, hierarchical paths are ones that follow a certain hierarchy, a tree structure, or even called multi level or multi depth. For example...


Introduction

As soon as you start developing reliable websites in Drupal 7, the need to create custom modules arises. There will be plenty of situations where you need to create custom hooks to handle certain business requirements for your Drupal website; and those hooks have to live inside a custom module. For example, check our...


Preventing your Drupal 7 website editors from deleting content, under certain conditions, is not that difficult if you know the proper Drupal hooks to use. However, finding those hooks isn't easy and we're sharing this blog post with you in the hope that it will save you a few programming headaches...


If you're looking for a well written and tested function to recursively retrieve all child menu items in Drupal 7, you've come to the right place. All you have to do is pass it a valid node path such as 'node/123'.

The terminology you use might differ. You might call them sub menu links, deeper level menu links, sub nodes, or links...


The time() function in PHP returns the current Unix timestamp; which is the time measured in the number of seconds since the Unix Epoch. Very useful in certain cases, but not always. This function, like most other PHP functions, is also cross platform compatible as it works on Unix, Linux, Windows, and Mac.

PHP's microtime()...


Open source is the future and is a main driver for development on many levels including but not limited to technical, social, and economic development. In our part of the world, we're not playing an important role in open source, we're not benefiting from it to the maximum, and Arabized features are still lacking in many areas. My lightning talk will hopefully persuade developers to take action, contribute more and more to open source, and assist in taking the whole ecosystem to the next level.

 


Securing Zend Framework

If you have a PHP web application built using the Zend Framework, securing all its pages becomes very easy. You just go ahead and add the following tiny function to your Bootstrap file:

[CODE]

What this does is that it captures any non-secure request (Over plain HTTP) and redirects it to HTTPS (HTTP Secure). As...


Introduction

Generating ANSI (or ASCII) command line colors, or terminal colors, or whatever you call them, is easy with PHP. As I have said in my previous post, ANSI Command Line Colors under Windows, having colored text in the command line is a great help for spotting error or success messages. So here’s a quick and dirty function...


Steps

Having colored text in the command line is a great help for spotting error or success messages. Unfortunately, those of us developing under Windows do not have this feature by default. Here’s how to enable it.

  1. Download ANSICON from: https://github.com/adoxa/ansicon
  2. Extract the proper files (Depending on if you have a 32 or 64...

Why change the default Look and Feel?

Aesthetics apart, every developer should change the default Look and Feel of NetBeans. Why? because it has an annoying bug. Here’s what happens: you’re pumping code in the NetBeans code editor like crazy. You need to switch to another window for a quick copy / paste from your eternal library...


Introduction

Zend Framework is currently one of the best MVC-based frameworks in the PHP world. Zend_Mail is part of Zend Framework and it provides the ability to easily send email messages. If you’re like me, most web applications you have developed are setup to use Google Apps as their email provider. Here’s how to send email...


Introduction

You are programming in PHP and you have an array variable that you'd like to explore at different execution paths. Of course, the best way is to use a PHP debugger like xdebug or Zend Debugger, but, what happens when you're too lazy to install a debugger? What happens when you don't want or can't install a debugger and...


Hide Gmail's Spam Count
December 06, 2010

An Introduction and a Rant

Does the spam count in Gmail bother you? It certainly does.

Are you too lazy to delete your spam messages every few minutes? Of course you are.

Would you like to preserve your spam messages just in case they might contain a legitimate email? Of course you would love to.

You hate using third party tools such...


What is URL Rewriting?

URL rewriting provides shorter and more relevant-looking links to web pages on your site. This improves the readability and the search rankings of your URLs. For example, URL "a" can be rewritten as URL "b".

[CODE]

There are many articles on the web discussing the benefits of shorter and more relevant URLs. Let...


Hello World!
August 02, 2010

We are Online!

The ubiquitous Hello World post is here to stay. For the sake of programming traditions, we're not removing it. But we do promise that our next posts will be more useful.

Below is a list of Hello World program examples in our favorite programming languages. Consult Wikipedia's Hello world program page if you're...