She has it all figured out

Ever asked yourself questions like “What’s the meaning of it all?”, “Are we alone in the Universe?”, “Where’s the mankind heading?”, “What’s my purpose in life?” I bet you have, everyone asks, but no one knows. People come up with stuff like religion because it’s just too depressing to have the most important questions unanswered. […]

October 3rd, 2007
Tags: Life and everything

IE has a problem with getElementsByName

Yes, it does. Sometimes it’s convenient to use “HTML arrays”, meaning to name fields like: <input name=”something[]” /> Then on the server side you loop through the array $_POST[‘something’] This allows for a flexibility where your app doesn’t know the number of inputs in advance, but works fine regardless of the actual number. Even cooler […]

October 3rd, 2007
Tags: IE, JavaScript

5 domain names – 5 CMS’s

As bloged before, my publisher organizes a “Best CMS” award thingie and I’m one of the judges in the “Best PHP CMS” category. It’s time now to sit on my behind and judge, as scary as it sounds. I have to pick three from the five finalists in the PHP category in any order, so […]

October 2nd, 2007
Tags: CMS, php

The “best programmer ever”

Go ahead, do a Yahoo search for “best programmer ever”. Not surprisingly #1 result is the blog of yours truly 🙂 For some inexplicable reason, I’m not #1 in Google search results for the same query. Bizarre, isn’t it? Not even on the first page. But hey, there a difference between being yet another piece […]

September 17th, 2007
Tags: Fun, News/personal, SEO

Quick CSSSprites.com stats

Just deleted about 3 gigs of files uploaded to csssprites.com because I’m running out of disk space. I keep the .html results though, just for stats purposes. So ls | wc -l says that there are 3170 files meaning over 3000 sprite images were produced already, nice. The tool is very primitive, I admit, its […]

September 12th, 2007
Tags: CSS, performance

file_put_contents() for PHP4

Simplified, but still… <?php if (!function_exists(‘file_put_contents’)) { function file_put_contents($filename, $data) { $f = @fopen($filename, ‘w’); if (!$f) { return false; } else { $bytes = fwrite($f, $data); fclose($f); return $bytes; } } } ?>

September 10th, 2007
Tags: php

12 questions to ask your host-to-be

I was working on an article discussing how to implement Yahoo’s 13 rules for front-end performance on a shared host, I hope the article will be out soon. Anyway I have access to accounts at a few hosts – icdsoft.com, site5.com, dreamhost.com, so I was trying out the stuff I wrote in the article and […]

September 1st, 2007
Tags: hosting, performance

Make your javascript a Windows .exe

These days an average web developer needs to have a broad matrix of skills in order to do his/her job. HTML, CSS, JavaScript, AJAX, XML, some server side language, some linux skills, some apache, some database skills, standards, accessibility, SEO, the list goes on. Parts of the list are also multiplied by (or raised to […]

August 31st, 2007
Tags: .net, JavaScript

JavaScript: Calling the unnamed

How does this look like? o[“”]() A bit like a syntax error, eh? Or an emoticon of some sort. Well, it’s valid JavaScript code. JavaScript objects can have an empty string as a name for a property/method. So if you create an unnamed method called “”, you can’t call it using the dot notation, but […]

August 16th, 2007
Tags: JavaScript

Order of execution of event listeners

Say you attach several listeners to an event, for example you want a few things to happen on page load. What is the order of execution of the different listeners? You’d think that the listener attached first will execute first, followed by the second and so on… Well, yes, in FF, Opera, Safari on Windows, […]

August 14th, 2007
Tags: IE, JavaScript

YSlow performance extension for Firebug

Steve Souders, performance architect at Yahoo, announced today the public release of YSlow. What’s YSlow? It’s an extension to Firebug (yes, correct, Firebug, not Firefox) that helps with performance optimization efforts. It scores your page on the scale A to F, based on compliance with Yahoo’s performance rules. It’s a tool that has been used […]

July 25th, 2007
Tags: firebug, firefox, performance, tools, yahoo, yslow

LA Web devs meetup at Yahoo

So there is this group of local LA web developers that meet every month or so to meet and discuss what’s up. More about/join the group here. This month Yahoo will be hosting the meetup in the Santa Monica office (my workplace), it’s actually tomorrow, so if you’re in LA, don’t miss the opportunity for […]

July 23rd, 2007
Tags: California, facebook, News/personal, php, yahoo

JavaScript patterns (dot com)

I had this idea of collecting better javascript practices and … well, patterns. The thing is that there is so much bad javascript floating around from the time of “copy/paste this to make your status bar go crazy”, so there should be more of the good JS kind to replace the bad one. I liked […]

July 22nd, 2007
Tags: JavaScript

No! to pagerank

Joining an initiative started here. Basically the idea is to stop worrying about page rank. I think the web will become a much better place if webmasters stop reading, discussing, worrying about their pagerank. If they altogether forget pagerank ever existed. Better for the webmasters (they’ll have more time to think about their live visitors), […]

July 22nd, 2007
Tags: SEO

csssprites.com update

Added: – generation of a GIF sprite in addition to the PNG – small client-side only check if at least two files are updated – link to a Yahoo search for “css sprites” – note begging people not to upload huge files Only the first thing is a feature, the other three are to raise […]

July 22nd, 2007
Tags: CSS, tools

A JavaScript implementation of the Decorator pattern

For background information on the decorator pattern check the Wikipedia article or for PHP implementations, here and here. Motivation and example use Let’s take an example – you’ve created a class and released to the world. You want people to be able to easily build upon it and also release to the world. Some other […]

July 17th, 2007
Tags: JavaScript

CMS award nominations open

Nominate your favorite open-source CMS before August 31st. (Yours truly is one of the judges in the PHP category.)

July 16th, 2007
Tags: CMS, php

PHP/Javascript dev tools for TextPad

Here are some convenient tools I’ve added to my TextPad editor, hope you’ll like ’em. TextPad tools Stuff can easily be added to TextPad’s Tools menu, like I did, shown on the screenshot. In order to do so, you go Configure -> Preferences. Then select Tools on the tree to the left, then Add. You […]

July 16th, 2007
Tags: JavaScript, php, tools

phpBB front-end optimization – 1 hour workshop

Let’s go ahead and optimize our phpBB installation for front-end performance. I’ll follow Yahoo’s 14 optimization rules, but only implement the ones that apply for phpBB. During this short workshop there will be no changes to the phpBB code, we’ll create a new template instead, so that in case something bad happens, your board will […]

July 13th, 2007
Tags: CSS, performance, php, phpBB

On a publishing diet

So I launched this little tool csssprites.com that allows you to upload images and create one CSS sprite image, plus it gives the background-position CSS definitions to use in order to show parts of the sprite. People have been trying it out, but unfortunately sometimes uploading 20 megs of images to create a sprite, which […]

July 12th, 2007
Tags: JavaScript, News/personal, php

CSS Sprites generation tool

Here’s my last weekend’s project – a web-based tool to generate images for CSS sprites: http://www.csssprites.com. Cool domain name, eh? I couldn’t believe it was not taken. CSS Spr…what? This is a simple technique used for page load performance purposes. Since HTTP requests are the most expensive thing you can do in regards to front-end […]

June 27th, 2007
Tags: Ajax, CSS, JavaScript, performance, php

Weird attempt for flicker-free rendering solution

Flicker-free rendering – not allowing the user to see the page loading progress or how the different elements get downloaded and put at their right place. Extra points if the URL in the address bar doesn’t change. Why not use AJAX to only change part of the page? Well, don’t look at me, but sometimes […]

June 23rd, 2007
Tags: JavaScript

Smart browsers don’t download unneeded images

We ofter complain about browsers, browser inconsistencies, quirks, hickups, the list goes on. Let’s say something nice to them, and hope for good karma 🙂 It happens as your web app grows in size and team members that some parts of the stylesheets become obsolete, no one remembers why they were there in the first […]

June 23rd, 2007
Tags: browsers, CSS, performance

Good PHP CMS?

I’ve been selected as a judge in this year’s Open Source CMS Award, organized by Packt Publishing. I’ll be voting for three out of 5 PHP CMS projects where those 5 are selected by votes from the site visitors. Join me in a discussion I started at opensourcecommunity.org “What do you think makes a good […]

June 21st, 2007
Tags: CMS, php

Delay loading your print CSS

So you have two stylesheets on your page, like this: <link type="text/css" rel="stylesheet" href="screen.css" media="screen" /> <link type="text/css" rel="stylesheet" href="print.css" media="print" /> The first one is used to render the page on screen, the other one is used for printing the page and print previewing it. Good. The thing is, when it comes to performance, […]

June 17th, 2007
Tags: CSS, performance