Programming

IMO PHP 5.4 trait feature worth all the troubles of upgrading an object oriented PHP code base

Getting ready for my fifth software development team

Blog
Programming

It was several years ago when i started assembling my first software development team, although i didn't have the experience i have today it was a success and the team delivered the expected result. Back then i didn't have any well thought work-flow and my decisions were mostly based on each particular case and experience. today however it's quite different and i take these task very seriously.

2.625
Your rating: None Average: 2.6 (8 votes)

Using Actionscript 3 Tween for everything

Blog
Programming

If you ever used actionscript 3 then you probabely know that tween class does not work with anything other than simple numeric object properties. This is an issue sometimes becuase you might want to tween a function! or a property of a child object or even an string! There are plenty of third-party classes out there for extending the Tween class, but if you don't need all other features they offer and prefer to keep your swf's size small i must tell that there is solution , a rather easy one actually.

What we're doing to do is using dynamic objects,

1.302325
Your rating: None Average: 1.3 (86 votes)

Linux Shell Bridge (Passing variables from scripting langauges like PHP to Linux Shell)

Blog
Linux
PHP
Programming
Sys Administration

It might sound strange at first but i must say that it's very useful specially if you have shell scripts as part of your application. Usually For making this scripts as automated as possible there should be a way to reuse the application's configurations (ips, passwords , etc) and not having to update a separate configuration file whenever anything changes in the application. It's not limited only to this and can be used to pass any kind of variables.

4
Your rating: None Average: 4 (2 votes)

PHP's forward compatible version compare

Blog
PHP
Programming

Sometimes the code is forward compatible, for example when it's compatible with all future PHP5 releases, put PHP's version_compare function does not support this (Perhaps because they know that they always break compatibility with every minor release!!!). This function supports .x, for the above example it's : 5.x

It's also shared here

0
Your rating: None

Alpha support for PHP's imagecopymerge function

Blog
PHP
Programming

I've just checked PHP's issue tracker and a core developer says that this function (imagecopymerge) was never meant to support alpha channel! and they refused to commit the provided patch! so ridicules Anyway i tried rodrigo's workaround and it worked quite well, thanks rodrigo for sharing it. I came up with another idea which is much faster than his solution, (it may need a little bit more memory)

4
Your rating: None Average: 4 (5 votes)

PHP5 and Exception handling

PHP
Programming

 

Introduction

Quite some time ago i dropped php4 support on all of my projects and started thinking how i can benefit from PHP5 new features specially the new exception handling system. due to the fact thatPHP4 had no official exception system, programmers had to come up with their own way for handling exceptions properly , one this solutions was PEAR ERROR which i think was very useful, and i think that even thought PHP5 developers no longer need that technique it still can be used for better code quality in various circumstances.

2.375
Your rating: None Average: 2.4 (8 votes)

Ergonomic Office

Computer
Programming

Ergonomics is the science of designing the job, equipment, and workplace to fit the worker. Proper ergonomic design is necessary to prevent repetitive strain injuries, which can develop over time and can lead to long-term disability. read more...

In this research project i'm going to write about today solutions for setting up a ergonomic office.

2
Your rating: None Average: 2 (7 votes)