Archive for the ‘Web Development’ Category

Caching with CodeIgniter: Zen, headaches and performance

CodeIgniter_Fade_Logo

CodeIgniter is already a very fast PHP framework, but that alone might not be fast enough for high traffic web applications. To get to the next level of performance you will need to implement some kind of caching.

Luckily for the CodeIgniter crowd, the framework comes with one of the fastest caching systems possible, Output Caching. Short of writing static HTML files or output caching to memory there is no faster way to serve pages.

However, if you have any degree of interactive or dynamic content, total output caching can be painful (if not impossible) to implement. Now there are other options, such as database caching and third party caching libraries, but none of them will be quite as fast as full output caching. So if at all possible that is what you should use.

Let me provide you with an overview of the caching systems available and a few of my tricks.

Read more…

Will the really real programmers please stand up?

Get Real

How do you define a real programmer? There are many facets that you can use to judge someone’s skill as a programmer: ability, experience, enthusiasm, dedication, etc. But I recently read an article by RethinkDB blogger Slava, and he boils all of these points down to one item, memorization. Some people agree with this idea, but I do not, at all.

I have heard several companies bragging about having interview scripts like this, saying that this kind of testing is the most effective way to filter out unqualified applicants. However I think that the post by Slava perfectly demonstrates just how flawed this concept is. If there is one thing you should have learned in school, it’s that standardized tests are a terrible metric for gauging skill or intelligence.

But more to the point, I think that this is the wrong way to define a real programmer. Allow me to present you with my definition of a real programmer.

Read more…

The 5 types of programmers

Awesome Code

In my code journeys and programming adventures I’ve encountered many strange foes, and even stranger allies. I’ve identified at least five different kinds of code warriors, some make for wonderful comrades in arms, while others seem to foil my every plan.

However they all have their place in the pantheon of software development. Without a healthy mix of these different programming styles you’ll probably find your projects either take too long to complete, are not stable enough or are too perfect for humans to look upon.

Read more…

Ultimate web site optimization trick: data URIs

base64

Are you an obsessive compulsive web site optimization nut? Are you willing to sacrifice maintainability for one less HTTP request? Have people ever asked you to seek a mental health professional because of your OCD? If so, then you are in good company. Us optimization nuts may not be very well received when we start building a project, but we become very appreciated when someone asks how to make it scale. Depending on who you ask, web optimization is either the most useless talent ever or the single most important skill on a web developers resume.

Allow me to broaden your optimization toolbox with the ultimate HTTP connection killer, the data URI scheme. Most web developers have never heard of data URIs but they can dramatically reduce the number of HTTP connections required to download your web site.

This article will explain what data URIs are, how to use them, and how to properly implement them.

Read more…

Calculate page size and view port position in JavaScript

page_size_code_thumb

Have you ever had to try to figure out the dimensions of a page or browser in JavaScript? This task seems very simple at first glace, every browser has simple properties that will give you this information. Unfortunately, not every browser agrees what object these properties belong to, or even what the names are.

I’ve built a couple nifty tools in JavaScript that need to know the exact dimensions of the document as well as the exact dimensions of the browser view port. Since these scripts are uses on very high traffic sites with a very wide audience I have had to make sure they work in a multitude of browsers.

In this article I will show you how I support all modern (and not so modern) browsers with one function and I will explain a little about exactly what techniques I’m using to accomplish this.

Read more…

Page 1 of 512345