Tuesday, October 31, 2006

Wanted: Firefox W3C validator plugin

  1. You view a page
  2. You hit CTRL+U to view the source
  3. There is a 'validate this' button
  4. The extension submits to the W3C validator SOAP service
  5. The results are parsed and rendered inline.

Dear lazyweb, please build me this.

Sunday, October 29, 2006

I've lost my camera

Damn.

I've searched high and low. The last place I recall it is sitting next to my laptop, next to the charger. I was uploading photos. It was around a few days after that, then gone.

The battery is gone; the charger is here. I searched every inch of this house; all clothing; etc. It's gone.

Did I take it to work and forget it?
Did I take it to my father's and forget it?
Has someone borrowed it in the house and forgotten to return it?
Has someone stolen it?

I almost think the last option is the most likely. There's a guy we know, let's call him James, who has 'accidentally' ended up with one or two of my vinyl in his bag. He fessed up to doing it; but still hasn't returned them.
He's sketchyish. I honestly suspect him of nicking it more than me losing it.

Sigh.

Where else do I look?

Monday, October 23, 2006

Drupal 4.7 and the foaf.module

I wanted the foaf module for drupal on 4.7; so instead of being a whinger; I just went out and did it.

Here's the patch:

Index: modules/foaf/foaf.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/foaf/foaf.module,v
retrieving revision 1.13
diff -u -r1.13 foaf.module
--- modules/foaf/foaf.module 12 Jul 2006 17:13:51 -0000 1.13
+++ modules/foaf/foaf.module 23 Oct 2006 13:21:35 -0000
@@ -1,5 +1,5 @@
<?php
-// $Id: foaf.module,v 1.13 2006/07/12 17:13:51 walkah Exp $
+// $Id: foaf.module,v 1.6.2.4 2005/11/29 18:22:34 walkah Exp $

/**
* Implements hook_help
@@ -11,8 +11,8 @@
$output .= '<p>'. t('The FOAF module allows users to export FOAF documents based on their profile information. It also allows users to import profile information from external FOAF files, and even includes an option to let profiles auto sync when using distributed authentication. The FOAF module can export your buddy list if the buddy list module is enabled. You can download FOAF files in the view tab of a user profile if FOAF is enabled.') .'</p>';
$output .= t('<p>You can</p>
<ul>
-<li>read the <a href="%external-http-en-wikipedia-org-wiki-FOAF" title = "explanation of FOAF from wikipedia the free encyclopedia">FOAF wikipedia explanation</a>.</li>
-<li>read the <a href="http://www.socialtext.net/foafnet/index.cgi?basic_specs" title = "a programmers level description of this social networking standard">FOAFNet specificiation</a>.</li>
+<li>read the <a href="%external-http-en-wikipedia-org-wiki-FOAF" title="explanation of FOAF from wikipedia the free encyclopedia">FOAF wikipedia explanation</a>.</li>
+<li>read the <a href="http://www.socialtext.net/foafnet/index.cgi?basic_specs" title="a programmers level description of this social networking standard">FOAFNet specificiation</a>.</li>
<li>view <a href="%profile"> user profiles</a> and select a user to see their FOAF file.</li>
<li>enable the buddy list module at <a href="%admin-modules" > administrator >> modules</a>.</li>
', array('%external-http-en-wikipedia-org-wiki-FOAF' => 'http://en.wikipedia.org/wiki/FOAF', '%external-http-www-socialtext-net-foafnet-index-cgi' => 'http://www.socialtext.net/foafnet/index.cgi?basic_specs', '%profile' => url('profile'), '%admin-modules' => url('admin/modules'))) .'</ul>';
@@ -55,9 +55,15 @@
break;
case 'view':
drupal_set_html_head("\n".'<link rel="meta" type="application/rdf+xml" title="FOAF" href="'.url('foaf/'.$user->uid, NULL, NULL, TRUE).'" />');
- $output = '';
if (_foaf_allow_export($user)) {
- return array(t('Personal Information') => l(t('Download <acronym title="Friend of a Friend">FOAF</acronym>'), 'foaf/'.$user->uid, NULL, NULL, NULL, FALSE, TRUE));
+
+ $title = t('Personal Information');
+
+ $link = l('Download FOAF', 'foaf/'.$user->uid, NULL, NULL, NULL, FALSE, TRUE);
+ $output = array();
+ $output[$title][] = array('value' => $link);
+
+ return $output;
}
break;
case 'form':
@@ -69,31 +75,41 @@
}

function foaf_settings() {
- $output = '';
-
- $output.= form_radios(t('Export <acronym title="Friend of a Friend">FOAF</acronym> for users by default'), 'foaf_export_default', variable_get('foaf_export_default', 0), array(0 => t('no'), 1=> t('yes')), t('This can be overridden by individual users'));
+ $form = array();
+ $form["foaf_export_default"] = array();
+ $form["foaf_export_default"]["#title"] = t('Export <acronym title="Friend of a Friend">FOAF</acronym> for users by default');
+ $form["foaf_export_default"]["#type"] = 'radios';
+ $form["foaf_export_default"]["#default_value"] = variable_get('foaf_export_default', 0);
+ $form["foaf_export_default"]["#options"] = array(0 => t('no'), 1=> t('yes'));
+ $form["foaf_export_default"]["#suffix"] = t('This can be overridden by individual users');
+
+ $formItemTemplate = array('#type' => 'select');
+
+ $fields = array('foaf_name', 'foaf_title','foaf_firstName',
+ 'foaf_surname', 'foaf_Organization',
+ 'foaf_phone', 'foaf_aimChatID', 'foaf_icqChatID',
+ 'foaf_msnChatID', 'foaf_yahooChatID', 'foaf_jabberChatID',
+ 'foaf_workplaceHomepage');
+ $fields["vCard:Street"] = 'foaf_street';
+ $fields["vCard:Locality"] = 'foaf_locality';
+ $fields["vCard:Region"] = 'foaf_region';
+ $fields["vCard:PCode"] = 'foaf_pcode';
+ $fields["vCard:Country"] = 'foaf_country';
+ $fields["bio:keywords"] = 'foaf_keywords';
+
+ $form["settings"] = array("#title" => t('Field Mappings'), "#type" => "fieldset");
+ foreach ($fields as $name => $field) {
+ if (!is_string($name)) {
+ $name = str_replace('_', ':', $field);
+ }
+ $form["settings"][$field] = array_merge($formItemTemplate,
+ array('#title' => t('Field for ' . $name),
+ '#default_value' => variable_get($field, false),
+ '#options' => _foaf_profile_fields()
+ ));
+ }

- $mapping.= form_select(t('Field for foaf:name'), 'foaf_name', variable_get('foaf_name', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:title'), 'foaf_title', variable_get('foaf_title', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:firstName'), 'foaf_firstName', variable_get('foaf_firstName', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:surname'), 'foaf_surname', variable_get('foaf_surname', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:Organization'), 'foaf_Organization', variable_get('foaf_Organization', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:phone'), 'foaf_phone', variable_get('foaf_phone', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:aimChatID'), 'foaf_aimChatID', variable_get('foaf_aimChatID', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:icqChatID'), 'foaf_icqChatID', variable_get('foaf_icqChatID', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:msnChatID'), 'foaf_msnChatID', variable_get('foaf_msnChatID', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:yahooChatID'), 'foaf_yahooChatID', variable_get('foaf_yahooChatID', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:jabberID'), 'foaf_jabberID', variable_get('foaf_jabberID', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for foaf:workplaceHomepage'), 'foaf_workplaceHomepage', variable_get('foaf_workplaceHomepage', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for vCard:Street'), 'foaf_street', variable_get('foaf_street', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for vCard:Locality'), 'foaf_locality', variable_get('foaf_locality', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for vCard:Region'), 'foaf_region', variable_get('foaf_region', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for vCard:Pcode'), 'foaf_pcode', variable_get('foaf_pcode', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for vCard:Country'), 'foaf_country', variable_get('foaf_country', ''), _foaf_profile_fields());
- $mapping.= form_select(t('Field for bio:keywords'), 'foaf_keywords', variable_get('foaf_keywords', ''), _foaf_profile_fields());
-
- $output.= form_group(t('Field Mappings'), $mapping);
- return $output;
+ return $form;
}

function foaf_xmlrpc() {
@@ -349,6 +365,7 @@
while ($row = db_fetch_object($result)) {
$output[$row->fid] = $row->title;
}
+
return $output;
}

Thursday, October 19, 2006

You can stop with the software releases now...

Songbird 0.2, Internet Explorer 7, Gaim 2.0.0beta4.

What a busy day.

Saturday, October 14, 2006

Tuesday, October 10, 2006

Stiff asks, great programmers answer

Interview with Linus Torvalds, Dave Thomas, David Heinemeier Hansson, Steve Yegge, Peter Norvig, Guido Van Rossum, Bjarne Stroustrup, James Gosling and Tim Bray.

Interesting read. Go read it, and if you like post your own answers in the comments here...

How did you learn programming? Were any schools of any use? Or maybe you didn’t even bother with ending any schools :) ?
mIRC scripts (hah!), HTML, and basic PHP. A bit of javascript. I then went off to AIT and went through iCarnegie.

What do you think is the most important skill every programmer should posses?
Humor, and the ability to work in a team without direction. Obsessive compulsive urges to document things and put in meaningful info into version control software / any public communication.

Do you think mathematics and/or physics are an important skill for a programmer? Why?
Not really; most math is terrible for preparing you to build a web application. Which is what I do.

What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
SPARQL backed web applications. Or apps based on XULRunner; like Songbird - half program, half browser, half finished, totally nifty...

If you had three months to learn one relativly new technology, which one would You choose?
I don't care about new stuff, I just want to be able to compile PHP extensions properly! On any platform I need to also...

What do you think makes some programmers 10 or 100 times more productive than others?
Attention to detail and the ability to communicate. If you can't articulate what's on your mind; how can you express ideas in code?

What are your favourite tools (operating system, programming/scripting language, text editor, version control system, shell, database engine, other tools you can’t live without) and why do you like them more than others?
Unix like environments, PHP 5, Editplus, SVN, bash, mysql, ZendCodeAnalyzer and PHPUnit. Oh, and firefox.

What is your favourite book related to computer programming?
*Shrug* - there was a decent one on refactoring, but I've lost it.

What is Your favourite book NOT related to computer programming?
A Fire Upon The Deep, by Vernor Vinge; or Revelation Space by Alastair Reynolds (I just finished it; it's awesome)

What are your favourite music bands/performers/compositors?
Derb; Cosmic Gate; etc. If it's hard trance, I'll tend to like it. My tastes wander a lot as I buy more vinyl.

What about you; readers?

Sunday, October 08, 2006

Jim Baen is dead :(

I know it's old news, but it's news to me.

I stopped back in to see some ebook pirates (arr); only to find out Dunamai (Hugh Miller) has passed on.

Attention: Hugh Miller, also known and loved as Dunamai, has passed away. His sister informed us that he was not doing well in the last few days of rehab, and suffered a major heart attack. He will be in our prayers.


Seconds later, I find out Jim Baen is gone too.

To contrast the two - Hugh was a dedicated book scanner; turned dead trees into ebooks time after time and sharing them with the world.

Jim Baen on the other hand was a bit higher up the food chain - a believer in ebooks without DRM (the baen free library).

Both shared common beliefs. Both are gone from us now.

:( Happy monday.

Last.fm vs Google Music Trends

Google Talk just got a 'show my music' feature; like MSN has and like mIRC scripts have been doing since the dawn of time.

I wonder
  • Is it easy to do what google talk has done as; say; a gaim plugin?
  • Does the jabber protocol have features for this?
  • How hard would it be to do a last.fm / audioscrobbler plugin that submits to google music trends?
  • How hard would it be to make the google talk client know what songbird is playing?
  • How hard would it be to make songbird export XSPF?

Pear, & Zend

The Zend Framework is getting a PEAR Channel; and PEAR's web app (pearweb) is getting a makeover.

What would you change about pearweb? How would you make it better?

Wednesday, October 04, 2006

ZF PEAR channel

I spotted this in my inbox today; from the Zend Framework developer lists.

Being able to do a simple:
pear install zend/Zend_Search_Lucence
will be awesome!


On 10/4/06, Gavin Vess wrote:

I have a green light from the Zend team for proposing this popular idea
to the Server Management Team:

Why?
- Friendly way to install *all* of the ZF, using well-known processes.
- Easy to update.
- Easy way to share an installation of ZF across multiple ZF apps.
- Easy way to provide access to "developer" release, although SVN is
preferred.

Where?
- Community Development Server.

Todo
- Create the pear channel.
- Create/update pear "components" (ZF preview release, and a developer
release).
- Add a wiki page explaining how to add and use the new pear channel.

All credits go to the many community members who first proposed this idea.

Cheers,
Gavin

Good vs Bad Agile

Good vs Bad Agile.

Bugger. It looks like I was somewhat right, many of the 'best practices' mentioned here are what I do at work.

  • Bugtracking software, not gantt charts.
  • Forget dates. Dates are a fiction. Release it when there's nothing left to do.
  • Queing theory.
Go read. It's worth it.

Monday, October 02, 2006

Songbird 0.2 Screencast


Songbird 0.2 Screencast: "Do you want to learn how to use Songbird 'more better'?

Behold! A new Songbird 0.2 Screencast has just been published to the 'nest, suitable for forwarding to friends.


There's a screencast out from the 'nest, about songbird 0.2. It's awesome to watch the small features demonstrated; like drag and drop saving of web links to my local mp3 list.

The problem I have is this; in a nutshell: to use songbird as the songbird creators suggest requires me to break down my existing barriers to doing such a thing. I'm so used to not being able to do these things; if I'm presented with the opportunity to do them; my mind rejects them as stupid / silly / impossible.

No idea what I mean? Go watch the screencast.

Ack!

I feel like my parents must.

Songbird, Extensions, & Windjay

Windjay looks promising - the current offerings don't do it for me, but perhaps I'll see my wanted songbird extensions yet...