Fork me on GitHub
Jun 18 2009

Zend Training, does it really worth it

1,145 views

Every now and then I recieve some emails from Zend about training (I have an account there for the certifications I got), usualy they go directly into the trash. Continue reading


Jun 4 2009

Pass by Value or Reference or Handle

1,304 views

I’ve been expermenting with ruby for sometime now, and I’m really enjoying it, and I’m now coping with ‘#’ comments :-)

Now one of the points that’s about functions, is how do they pass, by value, or by reference. So to try out Ruby. Continue reading


Feb 2 2009

Unit test, making better designs

1,567 views

What I’m presenting here is an example for Unit tests making us change the design to make a better design for our application. Continue reading


Jan 13 2009

Gentoo Cache Mirror using apache and php

1,899 views

When you have more than one gentoo machine, a good thing to do to manimize the bandwidth usage, is to run some local mirrors, so that you would get the file only once, for all the machines.
Continue reading


Feb 28 2008

Good Old sscanf

681 views

Working in PHP, all this time, and the big uses you find in regex, and all the string processing we need to, could make us forget our old friend that can easily solve a problem.
sscanf, do you remember it, well, for quite some time I didn’t, until I saw it in a random code I found online, so this post is a reminder that this function exists.
An example, if we have a date, lets say coming from a Mysql DB, (ofcourse you can use strtotime, but sometimes it has it’s limitations) and you want to get the year, month, day, hour, minutes, and seconds, and you have it in a string, you can parse it with some splits, but 1 call of sscanf can do the job.

<?php
$date = ‘2007-05-18 22:15:03′;
sscanf($date,‘%d-%d-%d %d:%d:%d’,$y,$m,$d,$h,$i,$s);
var_dump($y,$m,$d,$h,$i,$s);

and thats all.


Feb 16 2008

PHP5 CAPTCHA

1,125 views

I’ve written a small CAPTCHA library, in an OO style, and I love to share it with you
http://sourceforge.net/projects/php5captcha/


Nov 22 2006

Playing with PEAR Net_IMAP

8,981 views

when it comes to IMAP programming, you should be very careful about IMAP commands you are issuing, an unneeded call can make your page much slower, that’s why usually IMAP Developers avoid programming with the php IMAP functions, yes they are written in C (c-client), but they don’t give you the commands you want exactly, so usually you would go for native IMAP (i.e. writing commands to a socket, and parsing the output). Continue reading


Oct 22 2006

Value Design Pattern

1,417 views

Sometimes while you are coding, you need some kind of a wrap for some primitive data type such as an integer, just to add some feature that is not available directly from that primitive data type, or just to give it some identity. Continue reading


Oct 21 2006

Testing your code

898 views

Perhaps no other coding practice is as important as testing your code. Also in the nature of Business Development, where parts of your code always change on the request of a client (including Management), or even when you want to make your code run with better performance, Automated tests are highly needed, you can’t just spread your print statements all over your code every time you need to test it. Continue reading


Sep 20 2006

Boosting Up PHP Performance with Alternative PHP Cache (APC)

608 views

“Every single server has it [APC] at Yahoo, and it handles billions of requests per day” Said Rasmus Lerdorf, the creator of PHP, at the php|works conference.

Continue reading