Archive

Archive for the ‘Its My Life’ Category

I’m still here

September 13th, 2010 No comments

Well its been a while since I last posted, but I’m still here. Infact I’ve just realised that xkcd has stolen my plans for world domination.

XKCD - Password Reuse

I’m only kidding, what would I do with all that information? I have enough princes offering me the opportunity to help them move money out of West Africa! Alas, OpenSolaris is now dead (RIP dear friend), we’re eagerly awaiting word of OpenIndiana and The Illumos Project to see where things are going to go. The Android momentum has picked up and Windows Phone 7 is just around the corner!

I’ve also changed my jobs and now I’m working for Readify as a Senior Developer. A company full of talented bright people (the author of Autofac or Paul Stovel of Magellan fame for instance) & skills in so many different areas I’m ashamed to be even be seen in the office – which is a great thing because we’re a mobile office (some day!). You might even see me at a few local Australian developer events now and I’ll be sure to advertise them when I come across any.

Essentially, its back to the days of being more involved with the developer community, times have changed since Developerfusion (for one, we have StackOverflow) and getting into up and coming technology – which this time around is Windows Phone 7. So I’ll be starting a series of posts on Windows Phone 7 as well as Android soon.

http://www.illumos.org/
{lang: 'en-GB'}
Share

The Gospel according to Jobs: Thoughts on Flash

May 3rd, 2010 2 comments

Got to give it up for Steve Jobs, he responds to his followers when things are a muck in his church. But putting aside my dislike for Apple antics, I do agree with most of his comments.

Flash was great in the early days, we had the birth of the XaoXao videos and interactivity on the web, but in the past 5-6 years, the hip cool designers of the world have transformed the browsing experience to be  fully Flash driven – which drives me nuts. Do they not realise that content would not be indexable by search engines nor useful for anyone who doesn’t have Flash? Whats more, I’m not after their fancy dancy effects, I’m after content – the exception of Flash being used for animation in addition to content (like slideshows, video presentations or marketing bits) or navigation around a site.

One recent (2006) example is the Eclipse home page, back when I got the AVN6000 installed, I wrote a little blurb on the (then) DeveloperFusion blogs and sure enough took the bulk of the traffic for the keyword AVN6000. The entire site was flash driven up until 2008 and no-one had indexed the content of the site.  As the unit was installed a week after release, it got quite a bit of traffic – nice for me.

I have FlashBlock installed to avoid uninvited flash content (especially annoying opening up a bunch of news articles and one of them is playing a video!) and have no _real_ need for Flash on my mobile devices – youtube works. Android 2.2 (Froyo) will ship with some flash support but it doesn’t excite me as much as the JIT functionality. Gotta JIT that, Gotta JIT that

There are a few points you can criticise Jobs on (HTML5, CSS+JS is no where near the functionality of Flex nor Silverlight – gasp! but it has time and momentum to grow) and everything about Apple is proprietary (sure they have a few good open-source projects – DTrace & WebKit) but their business nature to lock you into fruity loops. I still haven’t got a decent way of avoiding installing iTunes if I want to use an iPod which is the only device my (ironically) AVN6000 supports. As for the latter, overall a job well done I say and well justified move for not having Flash on their devices.

Just like to point out one thing having come from working with the On2 VP6/VP7 bits whilst at Vividas.

Although Flash has recently added support for H.264, the video on almost all Flash websites currently requires an older generation decoder that is not implemented in mobile chips and must be run in software.

What he’s talking about here is that Adobe utilises the On2 VP6 for their video rendering in Flash (as of Flash Player 8) and as such there’s no standard accelerator for the On2 codec (yet!) – its all CPU bound (and prior to 2008 quite intensive to decode!). The VP6 and VP7 codecs (though quite differently utilised) powered (or still powers) the Vividas format (could be different now, I left in 2008). Compared to Flash Player 7, the enhancements that On2 VP6 brought to Flash Player 8 effectively meant that a lot of media was encoded optimised for VP6. Newer versions of Flash Player 9 Update 3+ support h264 however.

Don’t forget that JavaFX also utilises VP6. While you’re there, checkout Gosling rant on Android and his thoughts on the Apple OS X Secret API hooks for the JVM.

With Google having purchased On2 Technologies earlier this year, there’s a bit of excitement and worry about the future of VP8 and whether it will become open-source and what will happen to h264 or Theora (a derivative of On2 VP3 which On2 open-sourced).

Having said all that, I can’t leave you without leaving something to ponder about when it comes to Apple and its many evangelists enthusiasts – maybe you’re one of them?

It’s funny because its true (!), don’t Think Different. Be different 🙂

I guess its time for Adobe to chime in and see their take on things, it better be something flashy!

{lang: 'en-GB'}
Share

FIX: WordPress Older Posts not working in IIS with Permalinks

April 28th, 2010 2 comments

I spent some time tweaking my blog today after moving it to some fresh hardware. You may find that everything is loading much faster now which can be attributed to two plugins in addition to the hardware upgrade – wp-super-cache and wp-widget-cache.

I’ve also fixed a long standing bug with my particular configuration of WordPress that runs on IIS which causes the “Older posts” link at the bottom does not function for the second page. The WordPress generated URL for this is

http://www.thushanfernando.com/index.php/Index.php/page/2

Which is a bit problematic, this ofcourse can be reproduced only on IIS from my musings (serves me right eh?). There are a couple of suggestions by people on the forums already, but I wasn’t too keen on them as they seemed too high-level fixes.

I’ve enabled Permalinks with this format:

http://www.thushanfernando.com/index.php/2010/04/28/sample-post/

So I looked through the sources to see why this was happening. After a bit of snooping about I got to the get_pagenum_link function in wp-includes/link-template.php file.

Heres a bit of source for reference – this is with WordPress 2.9.2:

function get_pagenum_link($pagenum = 1) {
	global $wp_rewrite;

	$pagenum = (int) $pagenum;

	$request = remove_query_arg( 'paged' );

	$home_root = parse_url(get_option('home'));
	$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
	$home_root = preg_quote( trailingslashit( $home_root ), '|' );

	$request = preg_replace('|^'. $home_root . '|', '', $request);
	$request = preg_replace('|^/+|', '', $request);

	if ( !$wp_rewrite->using_permalinks() || is_admin() ) {
		$base = trailingslashit( get_bloginfo( 'home' ) );

		if ( $pagenum > 1 ) {
			$result = add_query_arg( 'paged', $pagenum, $base . $request );
		} else {
			$result = $base . $request;
		}
	} else {
		$qs_regex = '|\?.*?$|';
		preg_match( $qs_regex, $request, $qs_match );

		if ( !empty( $qs_match[0] ) ) {
			$query_string = $qs_match[0];
			$request = preg_replace( $qs_regex, '', $request );
		} else {
			$query_string = '';
		}

		$request = preg_replace( '|page/\d+/?$|', '', $request);
		$request = preg_replace( '|^index\.php|', '', $request);
		$request = ltrim($request, '/');

		$base = trailingslashit( get_bloginfo( 'url' ) );

	if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) )
		$base .= 'index.php/';

		if ( $pagenum > 1 ) {
			$request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( 'page/' . $pagenum, 'paged' );
		}

		$result = $base . $request . $query_string;
	}

	$result = apply_filters('get_pagenum_link', $result);

	return $result;
}

This function (from reading through) essentially generates the links for the page numbers & page navigation taking into account Permalinks if configured. This is all fine and dandy for Unix hosts but for Windows, unfortunately this bit of code fails us.

...
$request = preg_replace( '|page/\d+/?$|', '', $request);
$request = preg_replace( '|^index\.php|', '', $request);
$request = ltrim($request, '/');
...

As the preg_replace is case sensitive, it will not replace the invalid Index.php that is seen on IIS. So the easiest fix is to tweak the regex pattern a little bit and tell it be case insensitive.

...
$request = preg_replace( '|page/\d+/?$|', '', $request);
$request = preg_replace( '/|^index\.php|/i', '', $request);
$request = ltrim($request, '/');
...

This will then generate the (invalid) urls and the preg_replace will remove any additional Index.php’s from the request URL as its already mentioned in the $base variable a few lines below:

...
if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) )
$base .= 'index.php/';
...

Once you make the change and upload the files, your “Older posts” will start working again. I’ll submit a patch to WordPress I’ve submitted a patch to WordPress Trac, now its just a wait and see what they say, in the meantime here’s a patch file if you don’t want to modify sources manually. If there any issues, post a comment 🙂

{lang: 'en-GB'}
Share

Disputing a parking fine, Melbournian style!

April 7th, 2010 2 comments

Back when I was at Uni, a close friend (who drove a Toyota Supra) and I used to attract parking inspectors like magnets (needless to say, our girlfriends were not impressed!). There was very little we could do too, some of the inspectors would “camp out” and await our batch of cars (we had a system!) as we swapped each others cars in the hopes we don’t get fined, then BAM! fined. Anyway, those days are long gone. Most of the areas we parked are now permit zoned but these days, inspectors seem to be far more aggressive with fines with very little leniency.

Here’s a letter sent to the City of Melbourne disputing a fine, thought this was hilarious – and encouraging.

Australian Parking Find Dispute

Source: NextRound.net

Anyway, that was win for you and me kiddo. For the helpless people that need hope and encouragement, we may not win the war, but we’ve won the battle.

Add that to the collection of Aussie funnies! I wonder if there’s a “Parking Inspectors” forum like the OzLiberty forums, they all get together and marvel at each others fines – time to troll!

{lang: 'en-GB'}
Share

xkcd goes CLI!

April 2nd, 2010 No comments

This is cool, xkcd is now command line based! Try it!

{lang: 'en-GB'}
Share

Beautiful wallpapers for you to relax with.

March 8th, 2010 No comments

Some really cool wallpapers from Windows 7 Technical Evangelist Mike Swanson.

I’ve got the new Audi RS5 wallpapers on my work and home PCs if cars are your thing 😉

{lang: 'en-GB'}
Share

Ninject 2.0 is out, now with more ninja!

February 27th, 2010 1 comment

Nate Kohari (the head Ninja of Ninject) has announced the availability of Ninject 2.0 which has been a long time coming – being a complete rewrite. The sources are on  github repository. Oh and checkout the new website, its got more ninja references that you can poke a ninja with!

As for .NET 4.0 compatibility,  whilst not officially announced, we’ve been using Ninject 2.0 (betas) and now just moving to the final release with .NET 4.0 without issues. All documentation and material are available on the wiki however.

{lang: 'en-GB'}
Share

When captcha’s know too much….

January 29th, 2010 No comments

I was innocently attempting to post a comment on an article in the Sydney Morning Herald.

Then after a few refreshes, it decided to take it to the next level.

It was not to be however, even after several attempts the CAPTCHA failed to validate! A good way to end the week!

{lang: 'en-GB'}
Share

Ars reviews the Nexus One!

January 14th, 2010 No comments

Excellent review of the Google Nexus One on ArsTechnica – as always. Don’t forget that the Nexus One SDK got released too recently.

Impressive! Definately awaiting the launch here to get one to replace the Windows Mobile phones. Whats even more impressive is the fact that it ships with a 1Ghz Snapdragon (ARM Cortex A8) processor with 512Mb of memory! Smooth cat!

{lang: 'en-GB'}
Share

Seek ad for an IT Developer for BorderExpress

January 11th, 2010 No comments

After last year’s search for Credit Superhero on Seek, I bring you, the IT Developer for Border-Express with….

The original ad has been scaled back a bit as I doubt the right candidate could be found in time. Full credit to TheRegister.

{lang: 'en-GB'}
Share