RSS
 

Reviewing the HTML5 Specification

03 Sep

In case you’ve missed the recent news in the past few months, XHTML 2.0 has been dropped by the W3C…in favor of HTML5.

The best additions are the semantic tags describing divisional areas of a web page or layout: “header”, “footer”, “content”, “menu”.

I also like the “section” tag with its heading tags ( almost identical to Docbook semantics )…an obvious usage for web-based e-books or those who like to do “part x” series — like splitting up blog postings or news stories into more than one page.

Web page developers may get some mileage out of the “section” tag simply by breaking down the content area into sections like “Latest” and/or “Popular” as sections of the “content” area, for example.

The two tags “meter” and “progress” I find redundant and confusing to have both. “Progress” is much more suggestive and semantic than “meter” — in my opinion.

I suspect “meter” will likely end up being dropped, as it doesn’t have a well understood meaning or conjure up anything other than a speed-o-meter, parking meter (payment implied?) or gas gauge — at first glance anyway. Progress bars on the other hand, have been around for decades in software applications, since the first GUI download meter was introduced.

The confusion of introducing two new tags to mean basically the same thing reminds me of the two tags “acronym” and “abbr”. In the end nobody cared that much if it was misused by people who confused the difference between and acronym (CIA) and an abbreviation (ETC). One tag is enough to handle both cases semantically and they eventually kept the shorter tag “abbr”.

VN:F [1.9.4_1102]
Rating: 4.0/10 (1 vote cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in UI Design

 

Dreamhost Rails Hosting Review

03 Sep

I have tried both mongrel and passenger rails hosting on Dreamhost.

Here are some pitfalls I found:

  • no clustering (mongrel_cluster not installed)
  • one proxy per app
  • one mongrel per app
  • apache + fastcgi works fine on the shared host plan
  • PrivateSersver is 3 times the cost for 1/4 the performance
  • your rails environment is *always* production
  • they refuse to switch people back to shared.

I have about 30 domains, not a huge amount of traffic, well under “unlimited” … and now I’m paying $30-60/month for what cost me $10 before, nothing much gained from a rails standpoint, because I can’t host multiple environments anyway. The default environment supported for Passenger implementations is “production” — you could override that in the application’s configuration file, but it goes against the principle of easy deployment to any environment.

The disk reports as full at my usage of 6.1 gigs out of my 351 gigs allowed and I’m constantly getting “DISK QUOTA” errors to which they reply — “Naah…check your again.” After repeated emails, they ask what the command was again that caused the error (pasted in original ticket).

I have since started developing a rails app for Link directories on a Slicehost server instead, although the basic package is fairly limited (256mb ram) it handles pretty well with low traffic.

VN:F [1.9.4_1102]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Ruby on Rails

 

What to do if you see your PHP script relies on session side-effect error message.

03 Sep

I came across this error a few times, enough to where I dug around and finally found the real fix to suppress the error completely.

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0

I was able to suppress the error by properly upsetting a session variable:

  //replace this:
  $_SESSION[$field] = null;

  //with this:
  unset($_SESSION[$field]);

The warning is triggered by assigning to the $_SESSION super global directly. By using unset(…) we are not assign null directly.

VN:F [1.9.4_1102]
Rating: 6.5/10 (4 votes cast)
VN:F [1.9.4_1102]
Rating: +2 (from 2 votes)
Retweet
 
Comments Off

Posted in Development, PHP

 

Finding an Intersection Between Arrays in Perl

03 Sep

As explained on perl monks and Pete Kruckenberg’s post…I needed a similar function that returns an intersection between two arrays in Perl.

#!/usr/bin/perl -w

use strict;
use Data::Dumper;

my @array1 = (1, 2, 3);
my @array2 = (2, 3, 4);
my %original = ();
my @isect = ();

map { $original{$_} = 1 } @array1;
@isect = grep { $original{$_} } @array2;

print Dumper(@isect);

#outputs
#$VAR1 = 2;
#$VAR2 = 3;

The above code works with duplicates, meaning that duplicates in @array2 will be added as individual elements in the array @isect.

VN:F [1.9.4_1102]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
3 Comments

Posted in Perl

 

psmouse.c *crazy mouse* Linux

03 Sep

I’ve been a victim of *crazy mouse* with my Belkin KVM switch for about 2 years now. Applied all the recommended hacks, kernel patches, and xorg.conf settings you can think of, and still had issues.

I finally came to the epiphany that buying a $13 kvm switch would’ve saved me lots of frustration.

I bought an IOGear PS/2 micro-kvm w/audio from newegg for $13. Works like a charm with ps/2 and scrollwheel.

I will *never* buy Belkin again.

VN:F [1.9.4_1102]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Advocacy, Open Source

 

Don’t Touch My Bone

03 Sep

Here’s a funny video of a dog protecting his asset.

VN:F [1.9.4_1102]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Humor

 

C is for Cookie

03 Sep

A cookie is simply a unique id to identify the visitor when they return, and for subsequent page requests.

Cookies should only store encrypted data, as they are stored on the client machine, and can be readable by other applications, virus, etc.

VN:F [1.9.4_1102]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.4_1102]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Development