How to setup xdebug to work with manually compiled php 5.2.17 on ubuntu 1391/11/25

if you are like me and having both php 5.2 (compiled from source) and php 5.3 (installed by apt-get) on the same development machine (ubuntu 11.10) then one day you decide to install xdebug chances are you may find yourself struggling to follow instructions in xdebug documentation with no luck for hours. Here is what worked for me …

An alternative, safer & cleaner way to compare Types in javascript 1391/11/19

I was never happy with javascript type checking using typeof and comparing the result with a string; as a small spelling error in type name can lead into false results that do not even throw a good error. After a discussion with Afshin Mehrabani (Thank you man!) we thought we can put an end to this. So here is the initial result of that discussion …

How to get a WordPress post by slug 1391/11/10

I was developing a WordPress plugin using custom post types then I needed to retrieve a post by its slug. Here I'm trying to get a custom post type called "product". you can replace the post type according to your needs. generic types are "post" and "page". …

Fixed: GnuTLS recv error (-9): A TLS packet with unexpected length was received 1391/06/30

I was trying to call some RESTFull API functions that were over https using php and curl. There was something wrong with it that was preventing me from communicating with remote server. I was getting this error. I'm sharing a quick fix that help me to solve the issue …

Why does HTML Validation matter? 1391/05/17

"My web page is rendering fine in all major browsers. why should I bother validating it?"
You will hear this question once in while. I'm trying to give some real answers for it in this post.

I'm not concerned about being called professional as W3C guys are trying to persuade us on their FAQ. I really don't think of validation as a sign of professionalism. I'm more concerned about making our life easier as developers and designers. I think HTML validation can help us with it. After all we should spend creating awesome stuff rather than spending hours and hours debugging a bug in our HTML codes, shouldn't we? …

Start your STOP list today to improve performance of your team 1391/04/15

Recently on our local open software talks I was talking about "How to start software development teams and keep them up". I started my talk with describing 3 type of people that may be attending the session, and asked each person in the room to let me know which group they fall into. I told them if they are attending this session either (1) they are a freelancer that wants to start a team or join a team or (2) they are already a member of a team for few months or (3) they have been working with their team for a quite long time e.g 2 years.

We discussed many things from early stages of creating a team till the being a member of mature team. and as we were continuing the talk there was a pattern in the hints beings discussed: The more mature your team gets the more you need a STOP List rather than a TO-DO List …