PHP Developer / Blog

Posts Tagged ‘howto’

Keeping third party JavaScript from slowing down your site

Saturday, May 31st, 2008

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? (more…)

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

Thursday, April 10th, 2008

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. (more…)

Figuring out why mod_rewrite isn’t working (like you expect)

Sunday, April 6th, 2008

So you’ve set up all your rewrite rules and then sometime noticed that some of your urls aren’t working like you’d hoped. Maybe it’s throwing a 404 error or going to a different page that you’re expecting. It’s nearly impossible to track down unless you know about Apache’s RewriteLogLevel and RewriteLog directives. These gems can tell you precisely what Apache is doing when applying rewrite rules to a given request. (more…)

Extremely efficient image rollovers using CSS sprites and NO Javascript

Thursday, April 3rd, 2008

Recently we’ve seen the death of javascript rollovers. But rollovers aren’t such a bad thing. However, they generally required the use of multiple images and Javascript which would handle mouseover and mouseout events. I think this is why they lost their appeal. There’s got to be a better way, right? (more…)

How I got my resume on the first page of Google search results

Tuesday, April 1st, 2008

I’ve had a personal website which has included my resume since the late 90s. It’s always had periodic traffic from recruiters who stumbled upon it via search engines. Over the past few years I have had a lot of interest in organic traffic. I decided to implement some of what we learned at Photagious to my personal site so I could continue to get a better understanding of how my site fits into the rest of the web. Proof is in the pudding and these tips landed me a job at Yahoo!. (more…)

When to embed your JavaScript

Saturday, March 29th, 2008

By now we should all know the benefits of including your JavaScript as external files. But does that mean we should always include them that way? The primary benefit of external JavaScript files is that the browser should cache them. So when someone comes to your home page and downloads yourfile.js it’s stored locally on the user’s computer. As they click through other pages on your site which include the same yourfile.js file then it’s pulled from cache. Subsequent page requests are sped up for two reasons. (more…)

Why bother to tweak the crap out of your resume?

Monday, March 17th, 2008

Seth Godin recently posted in his blog about reasons for having (or more precisely not having) a resume. He says “I think if you’re remarkable, amazing or just plain spectacular, you probably shouldn’t have a resume at all.” I don’t completely disagree Seth. If all you have is a resume then his point is well stated. You’ll end up getting contacted by companies “for you to get a job as a cog in a giant machine.” (more…)

10 more tips to make your PHP application scream - Part 2 of N

Friday, February 29th, 2008

The previous article in this series talked about how to set PHP up so that it’s a lean mean processing machine. Now we get to make sure that our PHP code follows suit.

Also read part 1 of this article.

I’ll cover 10 lesser known PHP functions or methods that can help streamline your PHP code. (more…)

10 tips to make your PHP application scream - Part 1 of N

Thursday, February 28th, 2008

I’ll be the first to state that there is no shortcut to making your PHP applications scream. This series aims to break it down into several steps. The first step will be taking a look at the PHP configuration on the server. We’ll be focusing specifically on PHP this article as a later article will cover 3rd party software which are an essential part of scaling your applications. Comments and suggestions welcome!

Also read part 2 of this article.

PHP.ini, getting your hands dirty
Almost all of the PHP configuration options are available in your php.ini file. PHP ships with several defaults which are suited for compatibility and not for performance. Let’s change that! It’s important to understand your application and what you can and cannot change. In some cases you might want to have allow_url_fopen = On even though I would generally recommend against it. Keep that in mind when reading this list. (more…)

Speed up Apache - how I went from F to A in YSlow

Wednesday, February 27th, 2008

I decided to embark on figuring out how to make my site as fast as possible. There were a few tips I was already aware of but decided to grade myself using YSlow. My initial score was bad, an F. I realized I had to do a few things.

  • Compress text/* files using gzip
  • Decrease HTTP requests by combining multiple JavaScript (and CSS) files into single files
  • Add aggressive caching since the site isn’t updated very often (especially images, JavaScript and CSS files)

Here’s what my original scores looked like. (more…)


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.