Daniel Kendell

HTML5 Video - Rotten Apple

by Daniel on Apr.28, 2010, under Soapbox

Forgive me, but it’s a gonna be a long one…

Did anyone else notice Steve Jobs tearing a big-old centrefold page out from Microsoft’s book with regards to the whole HTML5 audio/video codec debarcle?

Just to get this clear, I’m not taking sides on what codec should be used, they both have their advantages and should both be supported in my opinion.

Before: Microsoft approached the PC OEMs and essentially bullied them into not including Netscape with their PCs. Going so far infact to threaten not to license Windows to them if they didn’t comply. (BBC Article) Microsoft successfully decided the future of the internet in regard to browser dominence and the familliar sight of “This site is best viewed in Internet Explorer”. Not to mention the hours of stress they caused web developers the world over, the relentless swearing at IE “quirks” that was to follow.

Now: Apple release a new “revolutionary” internet device, without Flash. This makes the web experience on the device today, less than revolutionary, and infact takes it a distinct step backward. To help alleviate that rather massive shortfall, they propose the all-singing all-dancing HTML5 and it’s <video/> element! Which is all very well and good but content providers are currently using today’s internet “standard” of Flash video. We’ll also temporarily ignore the fact that video isn’t the only thing Flash is used for.

To that end, they approach content providers, eg: Wall Street Journal, and Steve tells them to rewrite parts of their site(s) to accomodate his new device. (ArsTechnica) Just to keep perspective, this is one device, in a veritable ocean of web-enabled devices available to consumers. Or two devices if you really insist on pretending that the iPad is anything new. But Steve really does have the gift of the gab and it wouldn’t surprise me if these big-money content provider executaves swoon to him and do it his way. Maybe they all want to be him or just near him, he seems to be everyone’s favourite CEO lately. If all else fails a couple of hours in the Reality Distortion Field should do the trick.

Apple have decided that they can go ahead and do this because they support an interpretation of the HTML5 Audio and Video spec which is one that would see MP4 (H.264/AAC) used as the official format. Another interpretation would be one that uses Ogg (Theora/Vorbis) used instead. This is still a matter of hot debate.

I’m not going to go into detail on their respective pros and cons because they both have them and the intracacies of patent law quite frankly bemuse me. I swear it only exists to give lawyers something to do. Suffice to say there are good points for both. As it stands, Mozilla Firefox and Opera both support Ogg. Safari, in all it’s incarnations only supports MP4 as does the Android browser. Google Chrome is the only browser so far to support both. (Dive into HTML5) In my opinion they’re the only ones doing it right, but what do I know? If this stalemate continues for much longer then it’s only going to harm HTML5 audio and video.

But if Apple skips the whole formality of actually coming up with a fair compromise and goes straight to the content providers, then they can push the content providers to do it The Apple Way. Effectively they’re trying cut out the middleman and make the decision on behalf of The Internet without the hassle of involving other points of view. That just makes things more complicated, right?

Microsoft used their position of power to push Mozilla aside, now Apple are using their position of hype and popularity to do the same to Adobe. But not only that, also to strengthen the position of the codec they endorse as the future HTML5 video standard. Something that is causing quite a stir at the moment and nothing has been formally agreed thus far.

Now on the matter of Flash itself, I get that Flash isn’t exactly great or rather, the Flash player browser plugins. I use the Adobe Flash player plugin for Safari and Firefox on Mac OS X and Firefox for Linux. On my MacBook Pro, if flash is running, I notice. It gets hot. On linux, it’s just slow. Not slow in itself but it makes Firefox slow. The point is, dispite this, it is ubiquitious on the internet these days. Not because it was forced on anyone, but because there was a toolkit behind it that designers could use. Not developers. The combination of HTML, CSS3 and JavaScript is very developer-centric. Even with frameworks like jQuery or Prototype, it’s still “programming”, which is not a skill that all designers have, and those that do tend to have a reduced programming skillset since it’s not their main priority.

When you consider Flash’s versitility, with the multi-platform multi-browser plugins and the designer toolkit, it’s no wonder it’s in the position it’s in today. It powers the vast majority of the video on the web, as well as all manner of interactive apps like games. - Flash is not just for video.

Getting back to the point…

Apple’s actions are not about whether or not HTML5 replaces Flash for video delivery. That is a convenient side effect. This is about keeping Flash out of Apples precious, and maintaining 100% control over the platform, what code can and can’t be run. But most importantly what users can have for free and what they have to pay for through the App Store. No free flash-powered video, go buy it from iTunes (consumers) or do it our way either through MP4 HTML5 or a native app (content providers)! No free flash games, go buy special Apple-endorsed games from the App Store! You must do it The Apple Way. Don’t forget that doesn’t stop at technicial implementation, but moral standards (TechCrunch) as well. If you don’t endorse something, you don’t have to provide it, but what gives you the right to stop users from doing what they want to, in their own time?

Call me old-fashioned, but I believe that when I give someone money, and they give me a gadget, that gadget becomes mine. If I want to throw it on the ground and jump up and down on it, that’s my choice. If I tied it to my dog, that’d be my decision. So why can’t I make my own software choices?

Remember the Commodore 64 emulator app that was rejected because it could interpret BASIC? Gizmodo Story: Fully Licensed Commodore 64 Emulator Rejected By Apple App Store

Leave a Comment :, , , , , more...

Buzz off Google Buzz!

by Daniel on Feb.11, 2010, under Soapbox

Despite their entry into the “social network” scene with Orkut some time ago. (Anyone heard of that one? Know anyone who uses it? No, I didn’t think so.) Google are at it again, this time with a more Microsoftesque approach.

*sighs* What is a monolithic corporate to do? There’s so much data out there that could belong to Google, and it doesn’t! Nevermind the fact that nobody outside of Brazil seems to give a damn about Orkut. If Muhammad won’t go to the mountain, then the mountain must go to Muhammad.

Build it into something we know people use so that they can’t get away from it! Something like Gmail, the almost ubiquitous free email service! Yes!

Oh, but remember Google’s catchphrase, “Don’t be evil”. So in the spirit of not being evil let’s add a splash page when you log into Gmail asking if you want to try Buzz or not, give people the choice. We’ll make the “Yes” button huge and hard to miss, and we can make the “No” button the smallest link you ever did overlook repeatedly. Oh yeah and not everyone should get to see the splash page, some people are blessed and can have it automatically, but more importantly, silently enabled. As was the case with my mother who didn’t have a clue what the hell was going on, all she knew was that suddenly she had “loads of stalkers on Gmail”.

Should “no” disable it completely? - Don’t be silly! We can’t deny them the one true social network of freedom, democracy and peace! What kind of commie are you?! Just make “no” mean “yes” and have it automatically follow everyone you’ve ever emailed and vice versa. I guess we should have a disable button somewhere, but people shouldn’t find it, let’s just make it one of the smallest and most inconspicuous links in the footer. (That’s where it is by the way)

Google have a monopoly, they know it and they’re using it. Yeah, not evil at all.

Google do make some really cool products. Some I really like. I also realise that a lot of the cool stuff they can only do because they already have the infrastructure in place to make it happen. I also like that Google have always made a point about being able to get your data back out again through free APIs. So all the time that’s the case I’m appeased.

Just remember that too much of a good thing is bad for you. - I think it’s time for Google to back off. I can’t help but suspect that a slippery slope is just round the corner.

I think that’s this rant more-or-less over. I can’t vouch for those within earshot though, they may have to hear it one or two more times. ;)

UPDATE:

I was talking with Dave about this and he, being better with words than I, found a way to phrase my main gripe with this whole affair. It “devalues” your Google account. By adding all these new social features it’s making my Google account noisier and crowded with people all chattering away about stuff that I quite frankly don’t care about. There’s nothing wrong with the features themselves, besides being a bit flaky and having to authorise someone four times and still have it not work! I love that I can “connect” other sites to my Google account. The fact that it’s on by default regardless of whether or not you wanted it is the step too far.

People use different tools for different things and have different circles of friends that they may want to keep separate or just don’t relate. My “rocker” friends and “geek” friends don’t tend to mix much. I use my Google account for all my Google related gubbins. I use Facebook for being “social” online. Because that’s where my friends are. While it’s great that the capability is there, *I* don’t want Google to automatically broadcast everything I do on YouTube or any other site it happens to own.

Google seem to think that people have lost the ability to communicate with one another on their own and we need a web-app to do it for us. “They” talk about how technology and the Internet is making people more isolated than ever before. Why should I talk to someone when they can just watch my online activity in almost real-time?

Leave a Comment more...

Zend_Form_Decorator_ViewScript

by Daniel on Dec.08, 2009, under Blog

Ok, not exactly breaking news, but I’ve just discovered the Zend_Form_Decorator_ViewScript class, the Zend DevZone article covering it, well, it helped me find it, but the examples are pretty useless if you want it to actually work! (No surprises there then, sorry DevZone.)

So to that end I thought I’d blog.

Zend Form Decorators can be hard enough to twist your brain around at the best of times. But the ViewScript Decorator makes forms easy again. You can apply the ViewScript decorator to any Zend_Form element, though I’d have thought that using it on the Form itself is all you’d really need.

File: ./application/forms/Example.php

<?php
/**
 * ViewScript Decorator example form
 */
class Form_Example extends Zend_Form
{
    /**
     * Initialise
     *
     * Set up the form, that's down to you,
     * set the ViewScript decorator for the form
     * @access public
     */
    public function init()
    {
        /* ... Initialise my form ... */
        $this->setDecorators( array(
            array( 'ViewScript', array( 'viewScript' => 'forms/example.phtml' ) )
        ) );
    }
}
?>

Remember that the path forms/example.phtml is relative to the configured view script directories. So in my app these are ./application/views/scripts/:./application/modules/default/views/scripts/:./application/modules/admin/views/scripts/.

Inside the view script, the form element you’re decorating is assigned to the element view property. So inside the view script ( $this->element instanceof Zend_Form ) === true.

That just leaves you with the view script itself now. Well, they’re just like any other view script except you only have $this->element property, your view helpers remain available to you as always.

File: ./application/views/scripts/forms/example.phtml

<form id="exampleForm" action="<?php echo $this->element->getAction() ?>" method="<?php echo $this->element->getMethod() ?>">
    <h2>Your Details</h2>
    <?php echo $this->element->email ?>
    <?php echo $this->element->dob ?>
    <h2>Account Details</h2>
    <?php echo $this->element->username ?>
    <?php echo $this->element->password ?>
    <?php echo $this->element->passwordconfirm ?>
    <h2>Terms & Conditions</h2>
    <p>Read our <a href="<?php echo $this->url( array(), 'terms_and_conditions' ) ?>">Terms & Conditions</a> before signing up.</p>
    <?php echo $this->element->termsandconditions ?>
    <?php echo $this->element->submit ?>
    <p class="small">NOTE: This is where you may want reassure your visitors that you're to be trusted.</p>
</form>

Now that’s a pretty simple example of how you’d use the ViewScript decorator. You may be able to achieve that markup using only the other decorators. I don’t know, and I can’t really be arsed enough to find out. I plan to just keep it simple and have a view script for each form that needs it, and use other decorators for the individual form elements.

It is now down to you to build the <form/> element, the individual form elements are still automatically generated though so you still get all those fancy features that made you want Zend_Form in the first place. Simply echo them out.

Leave a Comment :, , , more...

Main Config with Zend_Application

by Daniel on Nov.02, 2009, under Programming

Mainly a note to myself, but it’s handy to know.

When you instanciate Zend_Application, you provide it with a path to the config file (Or an instance if you’re feelin’ kinky) Zend_Application loads this into a Zend_Config object and does it’s bit with it.

What’s less obvious is how to retrieve that config from within a Zend_Controller_Action::method().

My solution until recently was to have an _initConfig() in my bootstrap class that read in the file again, and stored the instance in a Zend_Registry entry. However I think I cracked the “proper” way or “better” way to do it.

<?php

class MyController extends Zend_Controller_Action
{
	/**
	 * @var array The application configuration
	 * @access protected
	 */
	protected $_config;

	/**
	 * Init
	 *
	 * Retrieve and assign the application configuration
	 *
	 * @access public
	 * @return null
	 */
	public function init()
	{
		$this->_config = Zend_Controller_Front::getInstance()
			->getParam( 'bootstrap' )
			->getOptions();
	}
}

?>

Edit: In that particular example there is actually an instance of Zend_Controller_Front closer to hand, you could use $this->_frontController. But I’ll stick with ::getInstance() for the example since since it gets the job done.

Leave a Comment :, , more...

No carbon offset for me

by Daniel on Mar.21, 2009, under Blog

No Carbon Offset for me

So, how do you run out of carbon offsets? For that matter, what kind of carbon offset will 50p buy me anyway? I mean, it can’t really cost a mere ( 50p x $number_of_rockers ) to “offset” ALL the evil anti-green-enviro-stuff entailed in putting on the festival, if it costs ( £10 x $number_of_rockers ) just for Ticketmaster to sell the damn tickets over t’intertubes.

Now, Download is put on by LiveNation, and I had a suspicion that Ticketmaster were owned by LiveNation. A quick google has told me that they weren’t bought but “merged”. So yeah, my “outrage at the evil faceless corporation queezing the blood from the innocent” nerve is running on overdrive at the moment.

Leave a Comment :, , , more...

Reflection

by Daniel on Mar.18, 2009, under Blog

Just spotted this on Google Maps. One of the boats in Fareham Creek, just down the road from where I live has reflected perfectly into the camera. Looks quite striking. :)

Reflection

Leave a Comment :, , more...

Sunjuice!

by Daniel on Mar.16, 2009, under Blog

The sun shining through my bedroom window is now enough that it is starting to wake me in the morning before my alarms (yes, all five of them) go off. So I thought I’ll pull out that solar panel I so ingeniously bought during the winter!

Solar Panel

Even at the time I took that picture, it’s not terribly sunny but I was getting 11.3 volts out of it, in direct sunlight I got 20-odd so I’m quite happy with it. :D

Sunjuice! (Yeah, I need to vacuum)

Big-ass battery, heavy-ass battery too. Charge controller on top (duct-tape again), nothing hooked up to the load at the moment, need to get me some car-stylee sockets and a MacBook Pro charger. Though I may grab an inverter and give it a go with a few things. But I’d rather not take 12vdc turn it into 240vac (or whatever it is now) just to turn it into 17.5vdc!

In the mean time it’s just been powering a breadboard, again duct-taped to it, with a 5v regulator powering my Arduino via a spare USB PCI backplate I had knocking around. The Arduino just slowly fades a green LED via the successfully constructed Power LED driver circuit. Only, I don’t have an appropriate R3 (see diagram on previous link) for my Luxeon stars (d’oh) so it’s a bit superfluous at the moment. But all that together, Rube Goldberg would be proud!

Leave a Comment :, , more...

EYEBROWS! :D

by Daniel on Feb.09, 2009, under Blog

I love this one! It’s brilliant! Anyone who hasn’t seen it yet needs to do so now…

Leave a Comment :, , more...

More Blinkylights

by Daniel on Feb.07, 2009, under Electronics

Behold Blinkylights Two!

As of yet I still haven’t got much in the way of input for the arduino so it’s limited to just flashing sequences for the time being. Although I do have some potentiometers I can hook up, adjustable fade time would be nice.One thing that has bitten me though is how much I suck at maths. :P

I may want to consider getting a couple of those 16-Channel PWM chips I linked to previously. Then I’d be able to really get some shine on! :D But next step should be actually assembling some of those power-led driver circuits.

Leave a Comment :, , more...

Snow!

by Daniel on Feb.02, 2009, under Blog

It snowed last night!

Snow on the bushes
Snow on the burny thing

Dougie enjoyed the snow too!

Dougie in the snow

Alexie made snowballs. Her college called a snow day, alright for some.

Snowballs

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!