March 27th, 2008

Microformats are an increasingly common way to embed semantic information in a human-readable web page. By using classes to annotate the markup, you can call out information allowing a web browser or add-on to utilize it. For instance, using the hCard microformat, a human-readable address written in HTML can be downloaded and added into a user’s address book.
I’ve been offering restaurant addresses using microformats in UVFood.com, and more and more sites are providing support for them.
Read the rest of this entry »
Tag: microformats
Email This Post
|
Print This Post
| 120 Views
Posted in HTML | Comments Off
§§
March 13th, 2008

Lint started life as a C program checker, going beyond the errors and warnings that the regular UNIX C compiler would issue. The idea spread and many other languages have had ‘lint’ programs written for them.
Most web developers need to be able to do at least a little bit of Javascript work, but I’d be willing to bet them few of them really know Javascript particularly well. I certainly don’t… I cobble together bits and pieces of it based on examples.
Read the rest of this entry »
Tags: checker, javascript, lint, verifier
Email This Post
|
Print This Post
| 136 Views
Posted in Javascript | Comments Off
§§
February 20th, 2008
One thing I have to do in developing UVFood is provide photographs of… food. Also restaurants, but they’re relatively easy. It’s the food that’s difficult.
You want photographs of food to look appealing. You want them to look like you’d want to eat the food! But a lot of food photography is just plain awful looking. Delicious, luxurious looking dishes and up looking shiny and flat and alien in photos. Proper lighting is a big thing, but some foods just don’t hold up under the heat of the lights - like ice cream, which is sometimes substituted with mashed potatoes.
A lot of effort goes into the staging of good food photography, but once you have the photos, even if they’re not lit or staged well, there are probably still adjustments you can do to improve them.
Read the rest of this entry »
Tags: food, photography
Email This Post
|
Print This Post
| 219 Views
Posted in Graphics | Comments Off
§§
February 13th, 2008
I haven’t done much with UVFood in the last few weeks. Partly because we were traveling for two weeks, but we’ve been back for a while now.
The main reason is that I’ve been doing the dreaded refactoring of the code.
I’ve used Catalyst as the framework for building the web app. Catalyst apps use the Model-View-Controller (MVC) paradigm, and application builders often fall into the trap of having too thin a Model and putting too much of the work into the Controller.
Read the rest of this entry »
Tags: catalyst, cms, controller, dbix::class, model, perl, refactoring, uvfood, view
Email This Post
|
Print This Post
| 204 Views
Posted in Design, Catalyst, Perl | Comments Off
§§
January 28th, 2008
I had a big bump in ad clicks on one of my blogs earlier, and I was wondering if something in particular was driving it (the answer is, not that I can tell). I hadn’t check the logs for the blogs in quite a while, and man are there are lot of people hotlinking to pictures I’ve posted!
Now if you want to link to pictures I’m using, that’s fine, but host them yourself or give me a link back. The bandwidth your link to the files I host costs me money and I’d like at least a link so that people might find my site…
Read the rest of this entry »
Tags: bandwidth, configuration, hotlinking
Email This Post
|
Print This Post
| 335 Views
Posted in Apache | Comments Off
§§
January 23rd, 2008

Software update 1.1.3 for the Apple iPhone introduced the “WebClip icon”, which gives you a convenient shortcut button from your iPhone to a web site. There are now over 4 million iPhones in the hands of users… probably not all 4 million of those people want to go to your web site, but if they do then surely you want to reward then with a pretty bit of WebClip swag, don’t you?
WebClip icons work similarly to the favicon.ico file, but in this case you store the icon as a PNG file in /apple-touch-icon.png
You can specify a different location in the <head></head> element with a line of HTML similar to this:
Read the rest of this entry »
Tags: apple, icon, iphone, webclip
Email This Post
|
Print This Post
| 393 Views
Posted in iPhone, Browsers | Comments Off
§§
January 22nd, 2008

Microsoft acknowledges that there were many bugs in IE6 and IE7, and promises IE8 will be much more standards-compliant. In order to make it act in a more standards-compliant way, however, you will have to include a non-standard tag in your HTML HEAD section. Otherwise it will continue to act like the pieces of bloated crapware that IE6 and IE7 were.
Thanks for the big “fuck you”, Microsoft. How about paying everyone back for all the time they’ve wasted dealing with your crappy browsers?
Read the rest of this entry »
Tags: ie, ie8, internet explorer, internet explorer 8, microsoft, standards, wtf
Email This Post
|
Print This Post
| 291 Views
Posted in Internet Explorer, Browsers | Comments Off
§§
December 11th, 2007
Here’s a handy primer on centering things using CSS.
Remember, the <center> tag is sooo 20th century.
Horizontal centering isn’t very difficult, though vertical centering could use a little better support.
Via: CSS: centering things
Tags: align, alignment, center, css, html
Email This Post
|
Print This Post
| 346 Views
Posted in CSS, Browsers | Comments Off
§§
December 7th, 2007

There’s a glitch when you try to build Perl’s DBD::mysql under MacOS X.
When I tried to build it, I got a lot of errors that looked like this:
t/40numrows............install_driver(mysql) failed: Can't load '/Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /Users/admin/src/CPAN/build/DBD-mysql-4.005-C3W6F2/blib/arch/auto/DBD/mysql/mysql.bundle
Reason: image not found at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230.
It turns out that DBD::mysql was looking for the dynamic library for MySQL in the wrong place. It invokes mysql_config in order to find the location of the libraries, and mysql_config reports /usr/local/mysql/lib/mysql rather than /usr/local/mysql/lib
The easy way to fix it as to do this is to do this command from a Terminal window:
sudo ln -s /usr/local/mysql/lib/ /usr/local/mysql/lib/mysql
The drawback to this solution is that if you install an update to MySQL, you’ll need to remake this link.
You might also either modify mysql_config (it’s just a script, so it’s easy to edit), or to modify DBD::mysql, but the fix I’ve suggested is the simplest.
The real solution is to fix the MySQL distribution for MacOS X to have the correct path in it.
Read the rest of this entry »
Tags: dbd::mysql, dbi, macintosh, mysql, perl
Email This Post
|
Print This Post
| 489 Views
Posted in MySQL, Macintosh, Perl | Comments Off
§§
November 28th, 2007

Apple has published a new reference to CSS support in Safari version 3 which any web developer concerned with Macintosh support will probably be interested in. You can download the reference as a PDF file so you can use it offline as well.
Safari version 3 is bundled with Leopard, included in the iPhone and is in beta for Windows.
The reference includes CSS properties that are Safari-specific and not supported by other browsers. While I’m not a proponent of using browser-specific extensions they can be helpful to enhance the experience for specific browsers.
Read the rest of this entry »
No Tags
Email This Post
|
Print This Post
| 707 Views
Posted in CSS, Macintosh, Safari, Browsers | Comments Off
§§