Hello all!
It's almost Bug Triage Day again, which will be taking place on December 6th/7th
If you are a user of PEAR and have wanted to contribute to an open source project, here's a great opportunity.
We run a bug day every 3 weeks or so, on irc.efnet.org #pear & #pear-bugs across two days. We basically try to improve the quality of incoming bugs reports and write test cases, make sure they are reproducible problems.
We also try to boost overall code quality - unit tests, documentation and other improvements.
If you've got a package you use commonly, or bugs you filed some time ago that haven't been fixed; this is a good time to get involved.
Join us on Dec 6th/7th; or pop into irc.efnet.org #pear to say hello and ask questions; or respond here!
My main focus:
Text_Wiki is a heavily used package which could use a little love!
There are numerous feature requests and bugs open for it which could no doubt use some attention:
http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Text_Wiki&status=Open
Other pear developers, if you've got a specific target in mind, chime on in!
Here's what happened at the last one.
Half person, half home automation, an under loved blog for all things Ruby, python and more in Adelaide
Saturday, November 29, 2008
Thursday, November 27, 2008
Wrong Metrics
It was exam time recently. Lots of people talking about assignments and word limits.
"ARGH! I need to do a 30 trillion word essay on earwigs!" was not an uncommon utterance.
If there is anything about writing software that I know, lines of code is completely the wrong metric.
Understandability, correctness, and simplicity are far more useful from a software point of view.
You might say that the English language isn't designed for a computer - and I would argue that neither are modern programming languages.
I would suggest that a "word count" is just the same as lines of code. If we've spent 30 years or more knowing that lines of code is a horrible measurement, why hasn't this insight spread to other fields - particularly universities and centers of education?
Why are people still required to create essays of a given length?
Why not set a different requirement out: convincingly argue X in clear and rational terms?
"ARGH! I need to do a 30 trillion word essay on earwigs!" was not an uncommon utterance.
If there is anything about writing software that I know, lines of code is completely the wrong metric.
Understandability, correctness, and simplicity are far more useful from a software point of view.
You might say that the English language isn't designed for a computer - and I would argue that neither are modern programming languages.
I would suggest that a "word count" is just the same as lines of code. If we've spent 30 years or more knowing that lines of code is a horrible measurement, why hasn't this insight spread to other fields - particularly universities and centers of education?
Why are people still required to create essays of a given length?
Why not set a different requirement out: convincingly argue X in clear and rational terms?
Monday, November 24, 2008
Bus anger
I'm sick of Adelaide's transport system; or at least the people behind it.
Today, I missed my bus by 20 seconds. This was 8:37am on Prospect Road. I settled in for the wait, being a 'GO Zone', knowing that it should only be a maximum of 15 minutes before the next bus.
Finally, 9:00am rolls around, and so does the bus. 23 minutes have elapsed. 8 minutes late. I wouldn't mind, except the entire bus trip into work from my house takes only 21 minutes. The bus is so late, it could have gone to Adelaide in the elapsed time. What the hell was it doing?
Worse, I get on the bus, and they charge me $4.20 - full fare. If I had waited 60 more seconds, that would have been $2.60.
Frustrating, yes. If this were a one off, I'd live with it. Unfortunately, this is not the first time and I doubt it will be the last. This is a regular occurrence on my bus route.
So far, everyone I've met involved with public transport in SA has been a complete dolt. In my last encounter, I had been assured that Adelaide metro data would end up in Google Transit - but that was a year ago, and there has been a complete failure to do it.
Day to day travel costs have risen, the buses and trams remain uncomfortable, I get ticket inspectors acting like the gestapo trying to fine fare cheats, I get a substandard way to access transport information, and I have little faith in certain bus routes actually delivering buses when they say they will.
What gives? Am I alone in thinking this?
Today, I missed my bus by 20 seconds. This was 8:37am on Prospect Road. I settled in for the wait, being a 'GO Zone', knowing that it should only be a maximum of 15 minutes before the next bus.
Finally, 9:00am rolls around, and so does the bus. 23 minutes have elapsed. 8 minutes late. I wouldn't mind, except the entire bus trip into work from my house takes only 21 minutes. The bus is so late, it could have gone to Adelaide in the elapsed time. What the hell was it doing?
Worse, I get on the bus, and they charge me $4.20 - full fare. If I had waited 60 more seconds, that would have been $2.60.
Frustrating, yes. If this were a one off, I'd live with it. Unfortunately, this is not the first time and I doubt it will be the last. This is a regular occurrence on my bus route.
So far, everyone I've met involved with public transport in SA has been a complete dolt. In my last encounter, I had been assured that Adelaide metro data would end up in Google Transit - but that was a year ago, and there has been a complete failure to do it.
Day to day travel costs have risen, the buses and trams remain uncomfortable, I get ticket inspectors acting like the gestapo trying to fine fare cheats, I get a substandard way to access transport information, and I have little faith in certain bus routes actually delivering buses when they say they will.
What gives? Am I alone in thinking this?
Saturday, November 22, 2008
Simple Content Negotiation for RDF service application with PHP
Need to serve up HTML for most users, but have an RDF representation of your resource?
Simply pop in:
Simply pop in:
$accept = explode(',', $_SERVER['HTTP_ACCEPT']);
if (in_array('application/rdf+xml', $accept)) {
header('Location: path/to/rdf/version.rdf');
die();
}
OpenAustralia.org
How neat is OpenAustralia.org? I just found it today via twitter.
Even better, there's structured data available of the Hansard. I wonder if I can turn this into RDF or make it GRDDL-friendly.
I'll have to learn how to use git to get the source though.
I just made a quick politics GRDDL transformation and ontology to extract data out from the hansard.
Even better, there's structured data available of the Hansard. I wonder if I can turn this into RDF or make it GRDDL-friendly.
I'll have to learn how to use git to get the source though.
Update
I just made a quick politics GRDDL transformation and ontology to extract data out from the hansard.
Monday, November 17, 2008
PEAR Bug Triage Day, November 15th/16th
A quieter bug triage this time around, spread a bit over the preceding days and a brief sprint on the weekend itself.
PEAR's wiki is moving, so the results live in a new place.
Probably the biggest efforts of the day came from from Igor (ifeghali, MDB2_Schema), Lorenzo (quipo, MDB2 & friends) and Michael (gauthierm, Crypt_GPG / unit tests).
Igor got out a new release of MDB2_Schema, driving it from having a high number of open bugs to somewhere way down in the depths of obscurity on the bug statistics wall.
Michael refused to sleep until Crypt_GPG's unit test coverage was much improved, and Lorenzo was more or less on the prowl for anything that could be fixed.
cweiske got his new server almost built (so it can run unit tests lots). That was until ...
Oh dear.
Additionally, Greg (gsherwood) started adding new coding standards improvements to PHP_CodeSniffer - it'll be interesting to see what happens to the stats.
There were also some sensible discussions around Coding Standards driven by Alexey.
Finally; there was also a Mock Driver added to HTTP_Request2 by Alexey as well - it'll be a great help to overall code covereage within PEAR over the coming years.
Next bug triage day is for 6th-7th December.
PEAR's wiki is moving, so the results live in a new place.
Probably the biggest efforts of the day came from from Igor (ifeghali, MDB2_Schema), Lorenzo (quipo, MDB2 & friends) and Michael (gauthierm, Crypt_GPG / unit tests).
Igor got out a new release of MDB2_Schema, driving it from having a high number of open bugs to somewhere way down in the depths of obscurity on the bug statistics wall.
Michael refused to sleep until Crypt_GPG's unit test coverage was much improved, and Lorenzo was more or less on the prowl for anything that could be fixed.
In other news
cweiske got his new server almost built (so it can run unit tests lots). That was until ...
cweiske: we got stuck while installing php on it from debian testing
cweiske: it crashes on cli when you load the mysql extension
Oh dear.
Additionally, Greg (gsherwood) started adding new coding standards improvements to PHP_CodeSniffer - it'll be interesting to see what happens to the stats.
There were also some sensible discussions around Coding Standards driven by Alexey.
Finally; there was also a Mock Driver added to HTTP_Request2 by Alexey as well - it'll be a great help to overall code covereage within PEAR over the coming years.
Next bug triage day is for 6th-7th December.
Thursday, November 13, 2008
PEAR and Unit tests - HTTP_Request2
Alexey is chugging away putting together HTTP_Request2, a PHP5 friendly next version of HTTP_Request.
When you look the previous package, HTTP_Request, it's pretty widely used. Within PEAR, these packages make use of it:
* Cache
* File_Sitemap
* HTTP_Client
* HTTP_WebDAV_Client
* Net_CDDB
* Net_DNSBL
* Net_Monitor
* Net_SMS
* pearweb
* Services_Amazon
* Services_Amazon_S3
* Services_Compete
* Services_Delicious
* Services_DynDNS
* Services_ExchangeRates
* Services_Hatena
* Services_OpenSearch
* Services_Pingback
* Services_Technorati
* Services_Trackback (versions <= 0.4.0)
* Services_TwitPic
* Services_W3C_CSSValidator
* Services_W3C_HTMLValidator
* Services_Weather
* Services_Yadis
* Services_Yahoo
* SOAP
* Testing_Selenium (versions <= 0.2.1)
* XML_GRDDL
Outside of PEAR; I'm sure there are lots more direct uses of HTTP_Request.
I know it's a valuable part of my code kung-fu kit and I love its API simplicity. It just works. Works well, too.
So HTTP_Request2 is the next iteration of the package - it features the notion of Adapters, so you can use the HTTP library of your choice - be it CURL, be it raw sockets, or for the more esoteric, TCP/Pidgeon.
The other great bit to this is the Mock Adapter. That's right ladies and gents; unit testing just got a whole lot better - just inject an instance of HTTP_Request2 with the Mock Adapter in, and have your tests run in mere moments!
Observe how you might choose to execute all possible paths in this googlez() function.
If you are doing it right, you will get:
YAY; we gots a response, we can haz googlez
NAOOOOOO googlez forbidden
Swapping this over to PHPUnit would be trivial.
Keep your ears open for the upcoming HTTP_Request2 release, and I would strongly encourage people to adopt it for their existing packages :)
When you look the previous package, HTTP_Request, it's pretty widely used. Within PEAR, these packages make use of it:
* Cache
* File_Sitemap
* HTTP_Client
* HTTP_WebDAV_Client
* Net_CDDB
* Net_DNSBL
* Net_Monitor
* Net_SMS
* pearweb
* Services_Amazon
* Services_Amazon_S3
* Services_Compete
* Services_Delicious
* Services_DynDNS
* Services_ExchangeRates
* Services_Hatena
* Services_OpenSearch
* Services_Pingback
* Services_Technorati
* Services_Trackback (versions <= 0.4.0)
* Services_TwitPic
* Services_W3C_CSSValidator
* Services_W3C_HTMLValidator
* Services_Weather
* Services_Yadis
* Services_Yahoo
* SOAP
* Testing_Selenium (versions <= 0.2.1)
* XML_GRDDL
Outside of PEAR; I'm sure there are lots more direct uses of HTTP_Request.
I know it's a valuable part of my code kung-fu kit and I love its API simplicity. It just works. Works well, too.
So HTTP_Request2 is the next iteration of the package - it features the notion of Adapters, so you can use the HTTP library of your choice - be it CURL, be it raw sockets, or for the more esoteric, TCP/Pidgeon.
The other great bit to this is the Mock Adapter. That's right ladies and gents; unit testing just got a whole lot better - just inject an instance of HTTP_Request2 with the Mock Adapter in, and have your tests run in mere moments!
A Quick Example
Observe how you might choose to execute all possible paths in this googlez() function.
<?php
require_once 'HTTP/Request2.php';
require_once 'HTTP/Request2/Adapter/Mock.php';
function googlez(HTTP_Request2 $client) {
$response = $client->send();
switch ($response->getStatus()) {
case '400':
print "YAY; we gots a response, we can haz googlez\n";
return true;
break;
case '403':
print "NAOOOOOO googlez forbidden\n";
return false;
break;
}
}
$mock = new HTTP_Request2_Adapter_Mock();
$mock->addResponse(new HTTP_Request2_Response('HTTP/1.1 400 Success'));
$mock->addResponse(new HTTP_Request2_Response('HTTP/1.1 403 Forbidden'));
$client = new HTTP_Request2('http://google.com/');
$client->setAdapter($mock);
// I can has googlez?
assert(googlez($client) === true);
// LOLWUT; I shouldz find out wha happenz if google explodez
// I fink it willz give me false.
assert(googlez($client) === false);
If you are doing it right, you will get:
YAY; we gots a response, we can haz googlez
NAOOOOOO googlez forbidden
Swapping this over to PHPUnit would be trivial.
Keep your ears open for the upcoming HTTP_Request2 release, and I would strongly encourage people to adopt it for their existing packages :)
Tuesday, November 11, 2008
Letter to Kate Ellis
Dear Ms Ellis,
I am concerned about the ALP's policy to implement a Clean Feed internet filter. As I understand it, you are somewhat aware of this issue; and have met with Mark Newton; who discussed various technical details with you.
This is evidently an emotional issue from both sides – Sen. Conroy taking the save the children line, and many others, including myself, saying fine, but don't break my internet to do it.
My concerns stem from the fact I make my living as a software engineer, and my work literally could not exist without a free and open, responsive internet.
An internet filter as has been described would damage me; not to mention the Australian economy – it is no coincidence that breakthroughs in mass communication are tied to massive economic growth.
Also, by pursuing this technical solution so aggressively, Sen. Conroy has disregarded legitimate technical concerns; and demonstrated he is out of touch with the very field he is meant to be the Minister for.
I can only imagine that many employees of the Department of Broadband, Communications and the Digital Economy are embarrassed beyond belief; by the factual errors, by the rhetoric.
Let's not even touch on the fact they are meant to be providing both a Clean Feed (which will slow the Internet) and ubiquitous, fast broadband to all Australians.
So; my questions:
Is your position still one of support for the Clean Feed?
Have you researched more into the technical issues after your discussion with Mr Newton?
Would the ALP be open to different proposals; such as increased funding for policing and enforcement against child pornographers?
Or funding / encouraging the creation of ISPs like http://www.webshield.net.au/ ?
See also: protest pictures, nocleanfeed.
I am concerned about the ALP's policy to implement a Clean Feed internet filter. As I understand it, you are somewhat aware of this issue; and have met with Mark Newton; who discussed various technical details with you.
This is evidently an emotional issue from both sides – Sen. Conroy taking the save the children line, and many others, including myself, saying fine, but don't break my internet to do it.
My concerns stem from the fact I make my living as a software engineer, and my work literally could not exist without a free and open, responsive internet.
An internet filter as has been described would damage me; not to mention the Australian economy – it is no coincidence that breakthroughs in mass communication are tied to massive economic growth.
Also, by pursuing this technical solution so aggressively, Sen. Conroy has disregarded legitimate technical concerns; and demonstrated he is out of touch with the very field he is meant to be the Minister for.
I can only imagine that many employees of the Department of Broadband, Communications and the Digital Economy are embarrassed beyond belief; by the factual errors, by the rhetoric.
Let's not even touch on the fact they are meant to be providing both a Clean Feed (which will slow the Internet) and ubiquitous, fast broadband to all Australians.
So; my questions:
Is your position still one of support for the Clean Feed?
Have you researched more into the technical issues after your discussion with Mr Newton?
Would the ALP be open to different proposals; such as increased funding for policing and enforcement against child pornographers?
Or funding / encouraging the creation of ISPs like http://www.webshield.net.au/ ?
See also: protest pictures, nocleanfeed.
Sunday, November 09, 2008
Australia Post, reduced delivery costs
Why don't Australia Post let you upload a common document format (PDF?), add address information, and charge you on your credit card or similar.
They then render it at the local post office, and mail it out for you.
I would pay up to $3 to do this, because I wouldn't need to buy a home printer then.
I get the quality of a physical letter, they get a reduced delivery cost, and accurate addresses, and my need a printer is gone.
They then render it at the local post office, and mail it out for you.
I would pay up to $3 to do this, because I wouldn't need to buy a home printer then.
I get the quality of a physical letter, they get a reduced delivery cost, and accurate addresses, and my need a printer is gone.
Wednesday, November 05, 2008
PEAR Unit test results via Twitter
I just set up a few cron jobs to publish PEAR Unit test results, on the web, and via Twitter / Identi.ca / Atom feed, each and every night.
Go take a look!
Go take a look!
Saturday, November 01, 2008
No Clean Feed Protests - Adelaide
I'm just up the street from the Adelaide No Clean Feed protest. It's pretty decent, and it's kind of mind numbing to be able to reach out and interact with the Melbourne protesters via SMS and internet.
We've got about 30-40; Melbourne has 50; and we've yet to hear in from Sydney.
There's shots of me even; how neat is that.
As soon as I can get home, I'll dump photos onto flickr.
Tune into the twitter #nocleanfeed stream.
We've got about 30-40; Melbourne has 50; and we've yet to hear in from Sydney.
There's shots of me even; how neat is that.
As soon as I can get home, I'll dump photos onto flickr.
Tune into the twitter #nocleanfeed stream.
Subscribe to:
Posts (Atom)