PHP Developer / Blog

Solving Dustin Diaz’ programming brain teaser

Digg this article · Save to del.icio.us · Stumble it!

Dustin Diaz posted a programming brain teaser on his blog. I decided to take a shot at it and came up with this. The solution took me just under 20 minutes. Read the rest of this entry »

Who’s idea was it to remove file extensions from URLs?

Digg this article · Save to del.icio.us · Stumble it!

I’ve been thinking this question for some time now and yesterday at work it came up in a conversation between me and a friend. The web has been inundated with websites that have meaningless URLs. Once upon a time a URL meant something. They had value and told the visitor what they were getting. Sometimes it was a Word document (.doc), an animated GIF (.gif) or generally an HTML file (.html). Read the rest of this entry »

Stop including class files and use __autoload() instead

Digg this article · Save to del.icio.us · Stumble it!

PHP added several magic methods in PHP5.  __autoload(), however, isn’t one of them.  But that doesn’t make it any less useful.  In fact it’s one of the gems in PHP that I find to be relatively under used.  It’s common for PHP applications to break out classes into their own files.  This becomes cumbersome when working on large projects as you wind up with numerous include/require calls for any given page.  There’s got to be a better way… Read the rest of this entry »

Keeping third party JavaScript from slowing down your site

Digg this article · Save to del.icio.us · Stumble it!

All too many times I go to a blog or website and half of the page loads. Then it sits there waiting while a JavaScript file from another site loads. Some JavaScript cannot be placed at the bottom of the DOM because they use document.write(). It’s unrealistic to expect everyone to abandon third party sites (I use a script from Photagious for the photos on the right). But is there anything we can do to make them at least appear to load faster? Read the rest of this entry »

Asynchronous/parallel HTTP requests using PHP multi_curl

Digg this article · Save to del.icio.us · Stumble it!

When working with web services curl quickly becomes your best friend. It gets even better when you dig into PHP’s multi_curl functions. The downside to accessing web services at run time is that HTTP connections can be slow. This problem is multiplied when you have to call multiple web services for a given page. PHP’s multi_curl_* functions help drastically because they allow you to make unblocking asynchronous/parallel requests. This means you can continue processing the request without waiting for a response. Read the rest of this entry »

This is what happens when you blindly outsource to India (keyword: blindly)

Digg this article · Save to del.icio.us · Stumble it!

Update: Seems the title of the post is misleading. I have no issues with outsourcing to India or Indians (I’m Indian). It’s the blind nature of what happened that I’m writing about. India, Australia or Silicon Valley…that’s irrelevant.

There’s a popular myth that outsourcing to India can save you lots of money in development costs. While the statement alone isn’t false, it leaves a lot to the imagination. You know the part of the imagination that thinks about what you’ll do with the raise you’re probably not going to be getting next year. Outsourcing development to India is only a good idea when a team of technical experts assess the options and determine that it’s a good idea. Product managers and other not technical employees have no business making such a decision. When they do disaster looms…as you’ll read about in this article. Read the rest of this entry »

What to do with a failed startup?

Digg this article · Save to del.icio.us · Stumble it!

It’s inevitable that all startups won’t be successful. In fact it’s a very small percentage which do. This begs the question of what you do with the intellectual property that has been accumulated. Let’s assume that your startup didn’t amass a substantial enough user base to be considered a valuable asset. Let’s also assume that all you have left is some sort of technology which for whatever reason didn’t fulfill the goals of the creators. What can be done with the intellectual property assets? Read the rest of this entry »

A faster way to do curl put calls in PHP

Digg this article · Save to del.icio.us · Stumble it!

In a previous post I suggested using PHP’s memory stream to pass data along with PUT calls in curl. After doing some benchmarking it turns out that it’s faster to use PHP’s CURLOPT_CUSTOMREQUEST option. This way you can treat PUT and POST calls in the same manner. Read the rest of this entry »

Why everyone should write a framework and never use it

Digg this article · Save to del.icio.us · Stumble it!

I will scream if one more person tells me that I’ve wasted my time by writing a web framework because there are already so many available. The truth of the matter is that they’re right. The part that they’re missing out on is that writing a framework is one of the best exercises you can do as a web developer. So regardless if you plan on using the framework you write is irrelevant though I suggest you do because ironing out the fine details will make you a better programmer. Read the rest of this entry »

How to get started hosting your git repository using GitHub and OSX

Digg this article · Save to del.icio.us · Stumble it!

Hosting remote git repositories using GitHub is completely painless. Assuming you’ve already signed up for an account at GitHub and that you have Git installed on your computer. For OSX you can use macports to easily get Git’s command line tools installed. Read the rest of this entry »


About this site:
This is my (Jaisen Mathai) personal site for potential employers who want to see my resume or portfolio. My ideal job would be to work as a PHP developer on a large scale consumer website. My experience is in using PHP, MySQL, Ajax and JSON. I really enjoy creative brainstorming...taking a problem apart and narrowing 100 solutions down to the best one.

Thanks for stopping by. Be sure to drop me a line.