inportb

Computing

iAlbum

by Jiang Yio on Jul.19, 2008, under Computing

I was designing a photo album viewer for a Jalbum user and ended up with iAlbum. It’s basically just a PHP script that crawls through a bunch of images in an album-oriented directory structure, generates thumbnails, and presents the images using a lightbox.

Originally, the script generated one thumbnail per image. The result loaded quite slowly, and the thumbnails appeared out of order in the browser. After I switched to using CSS sprites, the thumbnails loaded much faster and were displayed all at the same time. The first time an album is viewed, a strip of thumbnails is generated for it and cached. After that, the cached version is sent to the browser (there’s an option to regenerate the thumbnail should the album change). I was worried that clustering all the thumbnails into one long strip would be too much for PHP to handle, but it turned out to be pretty fast even for an album with a couple of hundred images.

During the project, I encountered Lytebox, an excellent lightbox implementation that does not depend on any of the bulky libraries the way the other implementations did. After minifying and gzipping, the script weighed in at only 5.7kb. I left the CSS alone for an additional 5.7kb, but it would have been about 1kb gzipped.

Leave a Comment more...

phpLiterAdmin: A Better SQLite Database Manager?

by Jiang Yio on Jul.12, 2008, under Computing

SQLite is a wonderful flatfile database system that’s just gaining exposure in the PHP-programming population. For moderately-sized databases, SQLite offers speed and performance gains over even MySQL. The native object-oriented interface is also very easy to use.

Because SQLite is a relatively new player in the PHP arena, there is currently a serious shortage of good administration tools targeting it. While MySQL has phpMyAdmin and a bunch of other tools, SQLite is left on the side.

phpLiterAdmin is a new opensource PHP-SQLite administration tool that shows great promise. Although its author currently has more experience with MySQL, he is a skilled PHP developer who is capable of undertaking substantial projects. This project’s on my watch-list.

9 Comments more...

Firefox 3 Themes for KDE 4 Users

by Jiang Yio on Jul.09, 2008, under Computing

A pair of Firefox themes appeared not long ago that look truly magnificent (in my opinion) on a KDE 4 desktop. The Oxygen theme blends well with KDE 4 icon-wise with its Oxygen artwork. The Kde4 + Firefox3 theme focuses on the colors and styles rather than the icons. I ended up going with the latter because of its holistic approach to desktop integration.

Have a look at these smooth themes, and stop complaining that Firefox is too GTK-like:
[Oxygen] [Kde4 + Firefox3]

Leave a Comment more...

Flexible Keyboards are Interesting

by Jiang Yio on Jul.07, 2008, under Computing

I got a $10 OmniTech flexible keyboard at Staples yesterday. It’s a funny little device that can be rolled up and packed away, while still being fully functional. At first glance, it’s just a regular USB keyboard with a silicone coat instead of a hard plastic shell. Further inspection through the translucent silicone confirmed that the innards were, indeed, identical to those of a regular keyboard. It consists of two flexible circuit boards overlayed over each other. Each layer has a different pattern of traces, and each keypress occurs at a unique junction to connect the circuits.

(continue reading…)

11 Comments more...

Upstart for Javascript

by Jiang Yio on Jul.04, 2008, under Computing

Upstart is the new event-based *nix startup daemon that’s all the rage these days. It is also a little event-based startup manager I cooked up for Javascript applications. Basically, chunks of application are started up in an order that satisfies all dependencies.

What’s the use of an event-based startup manager if Javascript is largely linear? It’s pretty pointless at the moment, I suppose. But with the advent of multithreaded Javascript, there might be some value in controlling code execution this way.

The code can be downloaded here.

Oh, and happy July 4th to those who celebrate.

5 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...