Sancta Simplicitas is a WordPress theme that uses YUI CSS utilities: reset, base, fonts, grids. It’s very minimalistic in a sense that it’s pretty much all white and simple. Hence the name. The theme is probably not usable by itself, but it’s a base on top of which you can create your own themes. When […]
Philip “Bluesmoon” Tellis has posted a tiny (under 3K minified) JavaScript library to format dates, inspired by PHP’s strftime() Examples: d.strftime(‘%Y/%m/%d’) » en: 2008/04/25 » fr: 2008/04/25 » de: 2008/04/25 d.strftime(‘%A, %d %B’) » en: Friday, 25 April » fr: Vendredi, 25 Avril » de: Freitag, 25 April There’s also a demo to fiddle with. […]
A collection of writing tips here, includes advise from Stephen King, Paul Graham, Scott Adams and others. In the end, if you want to write well I believe it all boils down to: write – daily edit – cut out needless words read – everything you can lay your hands on It’s so simple and […]
… just updated. http://developer.yahoo.com/performance/rules.html The list (used to be 13 items, then 14, now 34) is becoming too overwhelming so it’s now split into categories: content server cookie css javascript images mobile Act now to improve you page loading speed, your user will thank you later 😉
You should never never ever rely on client-side validation only. Client-side validation is for enhancing user experience, server-side is the validation. This is a rule, never to be broken. But here’s a funny story how skipping the server-side validation actually helped. This is a real story, but the actual names have been replaced in XXX, […]
Time goes by. Feels like yesterday, but it’s actually been a whole year since I moved to LA together with the family. Guess the wonderful present we received a month ago from our landlord – $500 rent increase. W00t! Needless to say, we’ve been apartment hunting ever since. The Yahoo! office is at a great […]
CSS sprites are a great way to improve the loading speed of your pages. One of the problems you might face with sprites is how to deal with cases when the background repeats. The rule is pretty simple: if you want the background to repeat vertically (top to bottom), place the images in the sprite […]
… even as a joke consider putting your domain name on your license “vanity plate”
Currently enjoying two new albums by two older bands: The Black Crowes – Warpaint Counting Crows – Saturday Nights & Sunday Mornings Cool stuff, especially the first one. Can’t help but be a little worried about the fact that I seem to have stopped my musical development somewhere in the nineties, and just keep listening […]
Not bad. Especially having in mind that this is the second time around. I uploaded an updated version of the presentation, that didn’t work too well, so I had to delete the old one and reupload. As a result the stats and faves of the previous version were lost 🙁 Some sites, like Ajaxian, are […]
After getting 300 megs of wiki content spam, I deleted the old wiki over at http://www.jspatterns.com. Now restarted the project as a blog with static pages for the javascript patterns and blog posts for anything interesting in the ever so exciting world of JavaScript. So far nothing special there (example), but keep an eye on […]
Ever needed to be able to generate random, but valid JavaScript code? Well, today is your lucky day: meet J.J. or JoJo, the Javascript Junk code generator. All you need to specify is how many kilobytes of code you need. Available also as a web service. » tools.w3clubs.com/jojo If anyone can think of any application […]
PHP has a sleep() function, but JavaScript doesn’t. Well, this is because it’s useless, you might say, and you’ll be right. But for simulating heavy processing and for misc performance measurements, it could be useful. So here’s how you can go about creating a sleep() in JavaScript. The code function sleep(milliseconds) { var start = […]
The slides from my PHP Quebec presentation in Montreal are up on slideshare. Roughly the content is divided into: a quick review/update to Yahoo’s existing 14 best practices for improving performance, and a discussion of the 20 new ones Enjoy responsibly and don’t hesitate to send back questions and comments. And how about this slide […]
Javascript has implied globals. When you skip the var in var a = 1; and go a = 1;, then a becomes a global variable. Some consider this an error in the language. Global variables should be avoided because they tend to overwrite each other in unexpected places, especially if the project grows in LOC […]
This is very flattering: Greg Houston took my script for DIY canvas pie and added tooltips and better colors logic. Here’s the result, it’s really nice, built with some MooTools. The tooltips are not supported in <canvas> but Creg used an image that overlays the pie and set the tooltips with an image map. Clever, […]
A quick function to replace the selected text (in Firefox). Accepts: string to replace the selection, or callback function that takes the selected text and returns a string to replace the selection function replaceSelection(t) { if (typeof t === ‘function’) { t = t(window.getSelection().toString()); } var range = window.getSelection().getRangeAt(0); range.deleteContents(); range.insertNode(document.createTextNode(t)); } Usage: 1. Replace […]
The basic idea of a Web 2.0-style “mashup” is that you consume data from several services, often from different providers and combine them in interesting ways. This means you often need to do more than one HTTP request to a service or services. In PHP if you use something like file_get_contents() this means all the […]
Tip #1 for writing better code – edit. With this book I write, I find I’m spending more time editing than writing. The first draft is usually bad. The first draft “works” in the sense that it covers the material, but not necessarily in the best possible way. Same thing with writing code, it’s one […]
What’s new today? Let me see. [x] Wrote the first sentence of chapter 6 of the new book. Goes like this “After encapsulation, inheritance is probably the most important feature of the object-oriented programming”. Promising, but not exactly progress. Good news is I already wrote all the code for the chapter. [x] My teammate Nicole […]
UPDATE: Translation in Brazilian Portuguese here, thanks Maujor! OK, so you have an HTML table. Let’s turn it into a pie chart with a bit of javascript. We’ll be using the canvas tag, so the browser has to support it. For IE – well, you still have the table. That’s why we’ll call it progressive […]
(if you see this in a RSS reader, come to the page to hear the music) (Now that I got this Starcaster and also completed the first 5 chapters of the new book) Yesterday, I was wondering how I can record some music, so I searched for open-source sound recorder and came across this beautiful […]
Something has been annoying me for some time as I write this book in Google Docs: I want to be able to format text as code (Courier New) only using the keyboard. So I came up with this bookmarklet. It’s one of those “works for me” so if it doesn’t work for you feel free […]
So close to being finished with 5 chapters and 1 appendix of the new book (hey, that’s 50%+) and just after the n-th edit of chapter 3, I thought I might share this picture I have on my desk. It’s an self-portrait of my 4yrs old daughter Zlatina, in front of a window. Once this […]
Update Jan 30, 2008: updated code based on comments and code from Carl Update Dec 11, 2008: updated the code thanks to the comment from Nolan Here’s the scenario: you have a page that links to some .mp3 files. You add a line of code in your page and lo and behold, there’s a nice […]