SwiftlyTilting: usability, reusability

Sunday, October 31, 2004

SwiftXML: A PHP class for easy access to XML data

I put together a PHP class to accessing XML data recently. I’ve tried to make it as easy to use as possible, and I hope you find it useful. Here is a quick example of how to use SwiftXML to convert the SwiftlyTilting RSS feed into a web page:

$XML= swiftXML_use_file(’http://www.swiftlytilting.com/feed/rss2/’);

echo “<h1>”.$XML->get(”/channel/title”).”</h1>”;
echo “<h2>”.$XML->get(”/channel/description”).”</h2>”;

foreach ($XML->get(”//item”) as $item)
{	$url   = $item->get(”link”);
	$title = $item->get(”title”);
	$desc  = $item->get(”description”);

	echo html_entity_decode(”<h3><a href=”$url”>$title</a></h3>”
				. “<p>$desc</p>n”);


See the output of this code.

Download the SwiftXML 1.0 Package.

Requires PHP 5.0 or higher

Wednesday, October 27, 2004

Wordpress needs better separation between code and templates

Currently the templates for the main page and comment codes are rife with PHP code. There is no reason why code needs to exist in the template, so I’m planning on integrating some of my existing templating code into Wordpress. Once I convert my template class to PHP 5 I’ll release that here, as well as the Wordpress template stuff. I’m working some other things right now though so it might be a while.

Sunday, October 24, 2004

Wired News: Toe-to-Toe Over Peer-to-Peer

According to Wired News, several ‘for-pay’ peer-to-peer networks are set to launch in the near future, though the question remains whether anyone will use these services as opposed to their free brethren. It seems that these companies are a victim of the capitalist system they love so much; people are choosing the lowest price, which happens to be free.

Wired News: Toe-to-Toe Over Peer-to-Peer

Friday, October 22, 2004

SF to provide Internet access to everyone, for free

San Francisco Mayor Gavin Newsom wants everyone in his city to have free internet access. If city-wide wireless came to my town I think I finally would get a palmtop; who could resist surfing the net while in line at the grocery store?

Reuters: San Fran wants free citywide WiFi

Wednesday, October 20, 2004

The Next Generation of P2P: BitTorrent and Beyond

I recently discovered BitTorrent, and I instantly fell in love. Ridiculous download speeds and brand new content, organized around the web instead of inside the client. But I find there is one problem with BitTorrents: It’s not easy to distribute your own content. You must either run a web server, or find a web server already running the software needed to distribute a file, known as a tracker. A tracker keeps a list of who is downloading the file, so that everybody downloading the file knows who else is downloading, and without a tracker, a torrent is useless because nobody knows who else has the file.

The tracker is the one centralized part of the BitTorrent protocol. A decentralized tracker system would be the logical next step for torrents. Each peer could host their own tracker, so that anyone who cared to share the file could easily do so, even if the original tracker was down. While it may take a while for this system to be built, BitTorrent client developers in the mean time could start including trackers in their clients now to encourage more file sharing.

Try out these PHP based tracker packages.

Recomended BitTorrent clients:
ABC (yet Another Bittorrent Client)

Read a Bit Torrent FAQ

Tuesday, October 19, 2004

Javascript Cookies Made Easy

I wrote a javascript object a while back called CookieJar to make it easy to access browser cookies via javascript. Instread of storing each ‘key-value’ pair in a separate cookie, the CookieJar stores many key-value pairs in one cookie, which saves room in the browser’s cookie cache.

Learn more and download the script from the CookieJar Sourceforge page.

Sunday, October 17, 2004

Nasty IE Render Bug

I noticed this bug while working on the layout for this site. Text will become hidden if a DIV contains floated block and another block with ‘clear:left’ after it to make sure the container holds the floated block. The background somehow gets redrawn and will cover it up. This only happens on DIVs above the scroll. IE users, observe:

Can’t read this in IE
IE hides the above text

Saturday, October 16, 2004

SwiftlyTilting.com goes live!

This will hopefully be a place for me to document random musings as well as provide a platform to release various programming projects.

Validate XHTML | Word Press