Sunday, April 29, 2007

Scary Conversations

I just read Why Learning Haskell/Python makes you a worse programmer, and have to agree with most of the article. It focuses on the idea that once you learn something better than what you have, it's hard to go back to tromping around in Java/C#.

I was surprised when I read the comments at how some people suggested embedding python into your work codebase - like this comment:

Be a human virus.

1) If what you are working on is a rather large application why not embed python in the applicaion? That's the bottom up approach. That way those peksy solutions wanting to get out can be a script in the tool.

2) It it's more of a utility program then top down is probably better. Use Python to provide an umbrella wrapper. Acting as glue, the underlying C# code can be used for those areas where it's needed most.

Caveat. You of course understand the dangers? Your prototype has to be at least 60% bullet proof and cause no harm to the underlying code base. Second you most likely need to be prepared to do a skip level introduction of your idea to management. My observation is that the line manager was most likely the one who selected the language and they picked it based on their comfort level. so you are going over their head in a sense to hopefully a more neutral third party. But there are risks.

But the reward, ah the reward, you get to use your skills. And is it worth it? Yep. A VP once told me -- "You spend 1/3 of your life working. Why waste that time in sloth and despair?"

Can you imagine submitting patches to the Subversion project, for instance, introducing a component written entirely in LISP? You'd get thrown out on your fucking ear.

Lone Cowboy Syndrome is a scary beast. On the other hand, at least we aren't still stuck with the design patterns of 1972.

Tuesday, April 24, 2007

Net_UserAgent_Detect

Finally, a patch I did a while ago got in to Net_UserAgent_Detect - specifically, a hasSVG() feature.

This means you can combine Net_UserAgent_Detect with Image_Graph and make some really awesome SVG graphs with a graceful fallback.

Rental Bikes

What do Adelaide and the French cities of Lyon and Paris have in common?

Rental bikes!
Adelaide has a very small pilot program, but in Paris, they've unleashed 20,000 of the things.
You go to a bike depot, if your credit card is already on file, you just check one out. If you get it back in the first half hour, it's free.

Sunday, April 22, 2007

Pompless China


China cracks down on pomp. Not bad for a country previously pretty big on giant constructions.

Under new rules, you can't have a giant government building - if you ignore them, your gold plated lobby can be appropriated and sold.

Saturday, April 21, 2007

Just add water

Just add water, to your downloadable 3D design. This is pretty awesome - you add the water to a 2d design, and as the water evaporates, a 3D shape forms.

Web of Data checklist

Danny Ayers' checklist for semantic web products - worth a read, even if all you are doing is providing webservices.

Tuesday, April 17, 2007

PHPUnit::SpaceOdysseyTest




class SpaceOdysseyTest extends PHPUnit_Framework_TestCase {
public function setUp() {
$spacecraft = new Spacecraft();
$spacecraft->addOccupant("Dave");
$spacecraft->addOccupant("HAL 9000");

$this->spacecraft = $spacecraft;
}

public function testSanity() {
$this->assertFalse($this->spacecraft
->getOccupant("HAL 9000")
->check("I can let Dave do that"));
}

public function tearDown() {

    }
}

Monday, April 16, 2007

Wilfred, & Bigpond Movies

"Most people want to do the right thing," he told CNET.com.au, adding that "they [the public] are aware that BitTorrent isn't providing payment to the content producers…[and] now that we're providing a legal alternative, people will come to us." --original

It's with that quote my Monday night of comedy has concluded, leaving only a sour taste in my mouth.

I've just watched Wilfred on SBS. I love this show. I've missed the first few episodes, and only just caught up with it.
Naturally, I'm interested in the idea of downloading it. SBS has just the right amount of credibility to sell me on something which few others can - trusting Australia's biggest telecommunications behemoth insofar as to be willing to buy something from them.
Also, I'm not afraid to watch something on a laptop. Further, I'm most of the way through a bottle of red wine. It's practically impossible not to sell me on something.
So off I go, and I Google. SBS have a #2 ranking on the web for Wilfred. Perfect. I play around a little with the flash-driven site - not much content, but what is there amuses me. Finally, a banner ad hooks me. Download next week's episode of Wilfred.

I click
.


Does anyone want a friendlier URL? Wilfred is just some random number to bigpond. It really shows. 70% of the job of selling me has already been done, but the moment I land on this page; they start to slip.
With what can only be momentum behind me, I even go so far as to add an episode I want to my cart.

Sadly for Telstra, it's there I stop.

Why?

  • I must be logged in to buy things
  • I went from a very well targetted wilfred sit to a lame one.
  • When I get to the lame site, there is no information about how the downloading side of it works - am I paying $3 an episode (which, by the way, is a perfect price point) for something crippled?
  • The about page doesn't do a fucking thing to calm my qualms on this issue.
  • A further googling brings me to a CNET article on the subject.
  • I read the words or impressions: Expiry, DRM, Sony, Telstra, self destructs after a period, regardless of what you paid, Windows Media 10 Digital Rights Management (DRM), BigPond Media Manager required, which only supports Windows XP... all of these in the same article. Can you pick anymore embodiments of evil?
Bam! I went from sold to unsold. I'm a 50% of the time Ubuntu user, I'm not stupid, I'm one of the few who actually downloads movies for watching and who cares about copyright. I can understand paying $3 for a movie or tv show on DVD at the local video store; on the condition I return it.

I'm sure as hell not paying $3 for your defective by design software to remove itself at the end of a contract. I don't want that. I want to pay $10 to 30 for a full episode that I own forever and can give to my friends. Failing that, $3 for a copy, low quality, to which I can do the same.

Telstra have just steered me away with their top ten google results - the bad review strikes again. I don't hold a grudge against SBS - a big company offers them a distribution deal in return for very prominent plugging. You'd be stupid not to enterer into a deal like that. Even better - SBS delivered on their end. SBS gave Telstra a customer ready and willing to pay for content. They provided a targeted, plush website, fully prepared to milk money from fans.
What does Telstra do in return?
Tries to force their own shitty products onto me; rather than just giving me choice.

Sunday, April 15, 2007

Toronto, & Bikes

Toronto Bike riders step it up against cars.

I wish there was such an active group here in Adelaide; sadly my anger goes unheard all too often.

Thursday, April 12, 2007

Javascript Charting, and Canvas

This javascript charting library looks fairly decent.

I'm going to wait until it's got a bit more documentation available first, though.

Wednesday, April 11, 2007

Defining the Web of Data

Dany Ayers points us to Tim Berners Lee on the Semantic Web.

It's a pretty awesome video, and gels nicely with what I was selling today.

At work, having new computers for new staff with... you guessed it, new microsoft software, I'm trying to sell people on iCal, and RDF output from our work application.

A few months ago, there would have been no point. I'd have to sell them on thunderbird, lightning, the concept of rss, the concepts of open webservices; and I didn't have a compelling problem to solve.

Now however, I have that problem.

We need to manage the working days of our valuers.
  • Where they drive
  • How many appointments they make
  • When they make those appointments
  • And the most efficient route between it all
  • Doing that means we can give them more work
  • But to do all that, we need to do it from a communications hub
  • Communications hubs mean we can keep the customers informed all the way along.
If you haven't guessed, it's half the email client, half the web application.

With the release of Outlook 2007 supporting iCalendar, with Google supporting GeoRSS; and with the ability to very easily give people links to google maps rendering said rss, I can now provide a very, very low effort implementation of our web application outputting data.

Combine flashy demonstrations (Google earth reading KML of where all of our valuers are today) with pressing needs...

For instance, we're currently not doing so well in keeping up with the changing requirements on our reporting appliance - everyone just needs more data, and we can't write reports quick enough! It's much better to just put the data out there, and let anyone who wants it stuff it into Access or similar.

We're also putting a lot more oompf into our soap based webservices - everyone wants to connect to us; to standardise.
We're becoming a webservices hub of sorts, allocating work and managing the details so our clients don't have to.

So it's only natural to begin to think of Valex as two steps away from Web 3.0 ... but maybe I should start to think a little bigger than that.

Organic Fruit is Better?

Organic fruit is better - who'd have thought there was a difference.

Folding Furnishings

About two months ago, I got inspired. I tried to make a chair out of empty beer cartons (alright, I say inspired, you say drunk) based on an image I saw on the internet.

You know, it would have worked if only the damned thing wasn't so slanty.

Now I can relax, though, with downloadable chairs instead from Foldschool.

Tuesday, April 10, 2007

Hot Hands & Hot Laptops


The Beast
Originally uploaded by CloCkWeRX.
NEC develops heat radiant laptop. Dan gets worried.

I don't know about you, but my hands take in heat pretty darned well.

I constantly feel hot, bothered and irritated when I sit at the laptop too long; and the solution is to go and wash my hands.

How would I feel using the NEC laptop?

Hamachi is pretty nifty.

I actually tried out Hamachi; and I'll be the first to admit it does exactly what I need.

For those of you who don't know, Hamachi is a zero-conf VPN tool. If you've got a computer at home, a computer at work, and you need to make them talk... a few clicks and you have a VPN.

It does it well, too.

Install, easy; connection, easy. Add a few entries to my HOSTS file, and I'm hooked right back up to work. Too easy.

The only qualm I have now is how to reconcile this with consuming too much energy! Perhaps I can offset it by taking the bus more.

How does pollution affect cyclists?

Do you know? I don't know, but treehugger does.

I have to say it's a little unsettling after reading about Dabbawala, then reading about Pirates, one of which died of Dropsy; and knowing about the links between global warming and the marked decline in pirates.

Even worse, on in the background is The Planet. It's covering climate change and all of that jazz - but it's not just all of that jazz.

To give you the gist:
It's not that hard to understand. The economy is a system. The biosphere is a system. Economic growth is the main deal that society is focused on. Economic growth typically means more people. More people need more things. More things consume more materials. Where do the materials come from? The biosphere. The economy derives huge amounts of raw material - food, crops, wood - from the biosphere, turns it into junk for 20 years and then gets it thrown back into the biosphere.

It's really just a question of how much we can take and throw back before the biosphere becomes fed up; and we start to experience Uneconomic growth - where it costs far too much to get too little.

Snap Poll: should the pear installer...

Store things channel by channel?

Ie, if I install a pear package over there, and a zend framework over here, should the docs all be heaped together?

I'm personally of the opinion that everything should be given its own 'channel namespace'; but two pear devs don't think so.

Does anyone else want to weigh in on this?

Flickr Pro


Francis, Chloee, Me & Niall
Originally uploaded by CloCkWeRX.
Well, finally it happened! Someone got me a flickr pro account. If only I had a camera...

Pidgin Poop

I know you can't foresee everything, but when you close your old bug trackers, can't you check that normal people can in fact log new tickets on your shiny new bug tracker?

developer.pidgin.com isn't currently logging me in properly; and has no "new ticket" link.

So when I got an email from sourceforge:
Comment By: Luke Schierer (lschiere)
Date: 2007-04-09 21:14

Message:
Logged In: YES
user_id=28833
Originator: NO

As we are closing this tracker, please submit any feature request that is
still valid to http://developer.pidgin.im. Thanks.


it's very frustrating that I can't log my issues - fixed! Hurray!

Further:
  • The new mailing list software no longer puts in gaim-devel, so I have to get off my ass and change my email filters.
  • The release notification plugin went splat, as I'm sure 95% of you all noticed.
  • Grrarrgh

Monday, April 09, 2007

Windturbines

Take a look at this video of a windturbine. It's one of three in the world with a viewing area; and the view is astonishing.

DBPedia redux

I'm not hearing much buzz about DBpedia, but it's made a slight comeback.

It's pretty exciting stuff - only I can't think of a use case for it at the moment. I don't really need to see pictures of "Apocalypse Now" actors; but maybe population of towns in NSW I can see.

Unfortunately, Wikipedia isn't complete; because I know there are more than 37 towns in NSW! But it's a start. And it's a good one.

Everyone is talking about Hamachi

... if the systems people at work and your own father namedrop the same product in the same fortnight; either
  • That's one hell of an adsense campaign
  • Or it's actually a product worth looking at.
Note to self: when I'm back on my windows boxen, I have to take a look at Hamachi.

Google Stubs

The Google Testing Blog points us to stubs; one of the things I never get right with unit tests.

To summarize:
  • Test Double is a generic term for any test object that replaces a production object.
  • Dummy objects are passed around but not actually used. They are usually fillers for parameter lists.
  • Fakes have working implementations, but take some shortcut (e.g., InMemoryDatabase).
  • Stubs provide canned answers to calls made during a test.
  • Mocks have expectations which form a specification of the calls they do and do not receive.
... which I rarely make use of.

Instead of actually connecting to a database and reading information, a stub just returns the results you'd expect, or simulates a failure; and so forth.

Behaviour Driven Development

Behaviour Driven Development swept in like a breathe of fresh air.

Basically, it's unit testing (ala JUnit), but at a higher level - it's also an implementation of capturing user stories.

For example:
Scenario 1: Account is in credit
Given the account is in credit
And the card is valid
And the dispenser contains cash
When the customer requests cash
Then ensure the account is debited
And ensure cash is dispensed
And ensure the card is returned

becomes
public class AccountIsInCredit implements Given {
public void setup(World world) {

}
}

public class CardIsValid implements Given {
public void setup(World world) {

}
}

public class CustomerRequestsCash implements Event {
public void occurIn(World world) {

}
}
... and so forth.

All of your assumptions then get instantiated, and evaluated, before passing off the results to the outcome handling bits.

Doesn't sound like much, does it, but I'm always running into problems like this.


public function testDoesntAllowDatesInThePast() {
$foo = $this->document;

try {
$foo->Date = "1900-01-01";

$xml = $foo->asXML();

$this->fail("SanityFailureException expected!");
} catch (SanityFailureException $sfe) {

}
}

public function testDoesntAllowDatesInTheFuture() {
//... The same expectations are checked, across 95 other tests as well.
}


With JBehave, I'd be able to piece together several different pieces of setup - make the objects, set values x,y,z; call some other function over there; and then inspect the results I get back at a much higher level of detail.
I could simply have a "does it validate against an XSD" outcome written, as well as two or three other fine grained ones.

Using Agile Documentation, you can make something somewhat comprehensible to business people; as well.

The above example would become
XMLDocument
- Doesnt allow dates in the past
- Doesnt allow dates in the future


Go and have a read of Dan North's blog for more about this