Monday, February 24, 2014

Hopefully this Apple TLS/SSL bug debacle settles the age old coding-style debate...


... about whether you should omit curly braces around your if block, if there's only one statement.

Just go ahead and add them in.

Read Adam Langley's analysis about the issue here: https://www.imperialviolet.org/2014/02/22/applebug.html


Friday, July 12, 2013

[ruby] Calling :methods on BasicObject


So, I just learnt a couple of days ago that you could pass in false to  :methods , and it'll filters out the inherited methods and return an array of only the methods that are defined in the class.
And as I spent time playing with it, I thought I'll check how BasicObject would respond to, if I called methods(false) on it.

My assumption was that BasicObject would possibly be the only class which would return back the same array for :methods(true) and :methods(false) - since it doesn't inherit from anything.

So here's what I did

BasicObject.methods(false) # => []

An empty array? Given that BasicObject is the root of Ruby's object hierarchy, it didn't make sense that BasicObject could respond differently for :methods(true) and :methods(false) - So where were those methods coming from?

After a few mins of trying to Google, I reached out to [Chew Choon Keat](http://blog.choonkeat.com/) and he figured the obvious problem here. It wasn't BasicObject responding to the call - The receiver was instead a Class object.

:instance_methods seems to be respond like how I expected it to though.

Oh, and :methods is defined in the Kernel module, that gets included into Object class.

#TIL

Thursday, July 11, 2013

RVM install fails when you have developer preview of xcode5 installed

I was just installing ruby-2.0.0-p247 on my machine (high time, I know!), and rvm kept failing silently.  It would download ruby, extract, proceed till configure, and failed at the installation phase.

So I ran

rvm install --debug ruby-2.0.0-p247 

And this exposed the location of the installation log file.  

The log, showed that the failure was with a missing path within Xcode.app - 

Apple's Xcode5 developer preview app 1 & 2 were just named Xcode5-DP.app, but with the Developer preview 3, the app's called Xcode5-DP3.app - And for some reason rvm's install scripts were looking for a path inside Xcode5-DP.app. Strange.

Anyway, I then proceeded to symlink Xcode5-DP3.app as Xcode5-DP.app, did a rvm install again, and this time, installation went smooth.

Blogging this, just in case someone else runs into the same issue. I can't be the only one who's so late to the party? 

Monday, March 11, 2013

Learn Ruby on Rails in Bahasa Indonesia

Nia Mutiara, a dear friend and colleague of mine has started writing Ruby on Rails tutorials in Bahasa Indonesia, (and has created this try.ruby like application too!), to help her local developer community adapt Ruby on Rails.

Here's an attempt to send her some hits. If you have friends in Indonesia contemplating learning programming, send them over to her page!  http://nyan.catcyb.org/mengenal-ruby/



Wednesday, June 27, 2012

Apple iTunes store launches in Singapore

iTunes store arrived in Singapore today. It only took about 9 years, but hey! we can finally buy music tracks legally online! All 16 billion of them! And movies rentals too!

They also launched it in a few other neighbouring countries (WJ article).

http://www.apple.com/sg/itunes/






You next Google music.

Talking about being unavailable in Singapore, Adobe CreativeCloud is right on top of that list for me. Go adobe! 

Tuesday, April 24, 2012

Adobe CreativeSuite 6 launches. No CreativeCloud outside US, Canada and Mexico


Update: Creative Cloud for teams is now available in Singapore too. Read more

The Creative Suite 6 launch event just ended.

The most exciting piece that I was looking forward to was the CreativeCloud subscription license that allows access to almost all CS applications (and more) for USD 49.99. Sounded like a great deal, and was super excited! Only when I tried to preorder did I notice the country choice for Billing addresses only allows USA, Canada and Mexico. A customer care person on the online chat support page confirmed this too.


Everyone would agree that most software piracy happens in places where people can't afford to spend a couple of thousands of US dollars on software. They probably don't make that much money in a month. This subscription license seemed to have a potential to change that. At $49.99 a month, adobe would've potentially had a chance to earn possibly millions of new paying customers. Sure Adobe must know this and they must be working on releasing it to the rest of the world over time. But delayed launch of this is going to make pirated versions available in these regions and then adobe coming in late with a subscription license gives these users a choice of choosing between $49.99 and a free version. *sigh*

Update: Adobe Customer Care responded to my tweet pointing me to their FAQ that says
We intend to make Creative Cloud as widely available as possible. Adobe will share more details about country availability over time.

Saturday, September 10, 2011

Why Flash Media Server 4.5 is NOT the end of Flash

Adobe announced Flash Media Server 4.5 couple of days ago at the IBC conference. It didn't take long before the 'tech journalists' started writing ill-informed posts about how this marks the demise of Flash. This post is my humble attempt to educate them about what Flash ecosystem really is.


"Flash content" ≠ videos.

Almost all posts in the above techmeme cluster seem to interchangeably use "flash content" when they are really talking about just videos. 'Flash content' means anything that can be interpreted by the Flash Player aka the Flash runtime. 

The notion of FlashRuntime being a video player seems to come from the common reference of 'Flash Player'. It was originally called a player because it used to be a player for streaming vector animations. Over the past decade, Flash player has grown to do a lot more, and hence its more appropriate to consider it the 'FlashRuntime', than as 'FlashPlayer'. 

I will henceforth refer to FlashPlayer as FlashRuntime to be unambiguous. 

The FlashRuntime is a programmable environment that can download Flash content (packaged as .swf files) and execute it. Flash content can include text, images, audio, video and vector drawings. Soon this will also include native 3D content.

Since Video is one of the content types that FlashRuntime understands, a developer can write a videoPlayer that works inside FlashRuntime. All those video players you see on youtube, vimeo, hulu etc are created by those website developers, not Adobe. FlashRuntime provides a platform for them to build it. Adobe just provides the platform ( and sells tools to create flash content).

There are other types of Flash content that people use all the time. Browser based games like Farmville, angrybirds, Planet vs zombies etc. are also Flash content. 

scribd.com serves documents online through a Flash based reader. This is Flash content too. 
aviary.com allows editing images in the browser using an application written for the FlashRuntime.
audiotool.com helps artists create electronic music from the browser. This application is created using Flash too. 
You could call these applications 'flash content' too. Thats what they are, from the FlashRuntime's perspective.

So video can be part of Flash content. But not all flash content is video.


Flash Media Server does not serve all Flash content.

Flash Media Server  provides services that help create Flash content. One of the main uses of Flash Media Server is streaming Video content (Read more). So a developer can create a videoplayer that plays streaming video from Flash Media Server. 

What changed in Flash Media Server 4.5

In its earlier days, Flash Media Server used to stream live video only over a custom protocol(RTMP). So, users who had restricted access to the web (for eg., inside corporate firewalls) were not able to view these videos. Adobe then came up with HTTP Dynamic Streaming protocol. This allowed live video to be streamed over standard HTTP. Anyone with access to HTTP could now watch videos from Flash Media Server. 

When Apple built iOS, they created a new protocol - HTTP Live Streaming - to stream live video to iOS devices. This protocol was the only way to stream live video to iOS devices. 

This created a problem for Adobe's Flash Media Server customers. They didn't want to create two servers - one for iOS devices and another for everything else. Enter Flash Media Server 4.5.

Flash Media Server 4.5 now streams videos using Apple's protocol too. This helps Adobe's customers to stick to their existing infrastructure. If an iOS video player needs the HTTP Live Streaming stream, FMS will deliver that. If another video player asks for the RTMP stream or HTTP Dynamic Stream, the same FMS will deliver that too.

Thats all to it. This new feature in FMS4.5 will not allow *all* flash content to be available on iOS devices. It streams videos to iOS devices. It allows Adobe to keep their FMS customers from switching to its competitors in the video streaming server market.

Will this have any impact on Flash Runtime usage? 

The FlashRuntime has been capable of handling videos from non-FMS servers since the time flashRuntime included external video capabilities. Google videos, for example - built their custom video streaming server right from the beginning. This is the server app that now serves youtube videos.

Youtube will probably replace their FlashRuntime based video player  when HTML5 enabled browsers reach a substantial chunk of their user base. 

This FMS4.5 release does not change anything. 

Is Flash dying? 

When I first started developing Flash content, there was a lot of chatter about how flash is 99% bad and Flash is evil. Then video came along, and Flash not just survived but became the best tool for video delivery. Now that browsers are catching up with native video (and canvas), the anti-flash chatter seems to gain momentum again. Meanwhile, Flash Runtime seems to be on the verge of another pivot with the upcoming FlashPlayer 11. This upcoming version includes hardware accelerated 3D support. May be Flash will move on in this direction, and become a defacto standard there. May be not.  The point is - to hurt Adobe, developers will have to stop using Adobe tools. If Adobe built tools that enable developers to create Flash like content, but native to browsers (HTML+CSS+js) and Flash developers will move on to using those tools, Adobe might not even mind FlashPlayer dying.

FMS4.5 will only help Adobe make new customers. Existing customers are not going to move away - infact their lives just got a little easier. So please stop writing Apple - 1 / Adobe - 0 posts.  Thank you. Now, do this:

Friday, July 29, 2011

[Singapore] How to get Starhub ZTE MF626 USB modem working on OSXLion

Update 18th Nov 2012: I upgraded to a new machine, and this broke again. The link below to the Vodafone Broadband Manager doesn't exist either.

So I went to Starhub today, and was told there was no way out other than to buy a new modem ( the one from Huewei starts at S$88) I didn't want to spend money on this, so went to look for the latest Vodafone broadband software. Found it here: http://www.business.vodafone.com/site/bus/public/enuk/support/10_productsupport/laptop_connectivity/40_software/software/10_latest/p_software.jsp. Sure enough, after installing the vodafone software, the starhub connection manager started working again. Vodafone - 1 ; Starhub - 0.

Dug around a little bit this time, apparently the drives that ship with the modem are 32 bit drivers only. OSX Lion and above don't load 32 bit drivers anymore AFAIK, so that's why the bundled driver software doesn't work anymore.

Wish Starhub updated their software and hosted it somewhere on their website.



-------------------------------------
Old post:

Starhub's ZTE MF626 modem doesn't work on OSX Lion (10.7). Looks like the USB modem driver is outdated. Starhub doesn't seem to have an upgrade available yet. So, DIY time!

Thankfully, Vodafone has updated their connection manager for OSXLion ( thanks http://openmindlifestyle.wordpress.com/2011/07/22/tip-workaround-for-zte-mf626-broadband-modem-on-mac-os-x-lion-10-7/). Here's how to setup Vodafone's upgraded modem driver and connect to Starhub.

  1. Remove existing ZTEUSBModem Service from your network preferences panel.
  2. Install the Vodafone Broadband manager available here. This installs the drivers as well.
  3. Restart.
  4. Go to System Preferences > Network. Choose ZTEUSBModem. Key in *99# as the phone number to dial to. Click Connect. (Might take a couple of minutes to connect)
The Starhub Connection Manager doesn't seem to be able to use this updated driver. Just check the 'Show modem status on menu bar' option in the Network Preferences panel; Its simpler than using the Starhub Connection Manager anyway.

Friday, December 31, 2010

HTTP PUT & DELETE from an Actionscript REST client

REST based APIs use the HTTP verbs - POST, GET, PUT and DELETE to accomplish Create, Read, Update, and Delete operations on data respectively. Flash player for various reasons only supports GET and POST. This makes writing REST apps a little harder (an additional line on the client side, and support for an extra request header on the server end) than it should be.


Thankfully, most popular web frameworks provide some support to accomplish this. Ruby on Rails supports overriding the http method using the X-HTTP-Method-Override request header.

The below code tells the RoR server app to consider the request as a PUT operation:

var request:URLRequest = new URLRequest(resource);
request.data = dataToUpdateOnResource;
request.method = URLRequestMethod.POST;
request.requestHeaders.push(new URLRequestHeader("X-HTTP-Method-Override", "PUT" URLRequestMethod.PUT));
var loader:URLLoader = new URLLoader();
loader.load(request);

HTTP DELETE can be achieved using the same.

Saturday, March 27, 2010

Flex 4 launch event at Singapore

Adobe announced the availability of Flash Builder 4 and the opensource Flex SDK 4 earlier this week. This release brings us a major overhaul of the Flex SDK, while also adding support to new technologies(FXG), and future tools like Flash Catalyst.

Here is an excerpt from the official blogpost, detailing where to go to learn more:


As you can see, there are lots of great new features and enhancements in Flex 4 and Flash Builder 4 - too many, in fact to list here. We recommend that you read the "What's New in Flash Builder 4?", "What's New in Flex 4?", and "Introduction to Spark" articles, as well as check out the rest of the new content published on the Adobe Developer Connection site to learn more. Additionally, you can watch David Wadhwani, Vice President and General Manager of the Flash Platform Business Unit describe the new set of products being added to the Flex product family.
I like the Flex testdrive page that they put up as well.

To commemorate the release, The Flex User Group, Singapore and Adobe Singapore have planned a launch event. Flash Platform Evangelist Harish Shivaramakrishnan will be flying in from Bangalore, India to introduce Flex 4 features, and Flash Catalyst. Hu Shunjie will also be discussing the new Spark component architecture. For detailed Schedule, head over to the official FUG blogpost here.

Attendees also stand to win a Flash Builder 4 Premium license from Adobe. Seats are limited, so go ahead, and register for your seat now.

Friday, October 02, 2009

Now everyone can be at Adobe MAX

Virtually, that is :P

Adobe Max 2009 is couple of days away. Fortunately, I happened to be here in the bay area, and my boss was kind enough to let me go attend MAX, despite the tight schedule. I've been at the MAX Asia conferences before - 2005 in Bangalore, India, and 2006 in Singapore, but lets face it - the one in US is undoubtedly the mother of all MAXes. And I'm very very excited about being there this year.

So if you are reading this and thinking, ' wish I could go' but those pesky deadlines at work didn't let you go - worry not; Not everything is lost. Last year, the MAX team posted the sessions on adobe tv, within a few weeks of the event. This time around, Adobe is also streaming the keynote talks, live! All sessions will be available online latest by October 11, 2009. So yea, go ahead and register yourself for viewing the live videos, here.

You can also keepup with tweets using the adobe max companion. Its a thin twitter client, which filters tweets about adobe max and lets you post tweets as well. You can also check out details about the sessions, and the session location etc. Sweet!


If you are going to be at LA, see you there! You can reach me on twitter at @arulprasad

Friday, July 24, 2009

The Actionscript Conference - Edition 2 is on!

Last year, the Singapore Flex User Group successfully organized a one day Actionscript conference. Due to the overwhelming response from last year, this year we decided to do a two day conference, with more speakers, sessions and added seating capacity.

And now, the dates are official. The 2nd Edition of TAC will be held on September 14th and 15th 2009. Registration for seats is open as well!

Check out http://www.tac.sg for detailed speakers list and sessions information. There is more sessions coming, so keep track of the site for updated information!

Registration of seats is open now. And we have a massive lucky draw around the registration process. One in every 10 tickets bought will win a FDT - Pure Edition. Thats 50 licenses that would be given away free. Apart from the monetary value of €99, using FDT will increase your development speed tremendously!


So yea, go ahead and reserve your seats!

Tuesday, June 23, 2009

download Facebook video - bookmarklet for browsers

A friend just asked for some help to download a video from facebook. I patched up a lil bookmarklet that does the download.

Get Facebook Video

Drag the Get Facebook Video button to your bookmarks toolbar in your browser.

Am sure there must be other bookmarklets that already that; guess I just wanted to do something else than my usual work. Anyway, usual caveats apply about usage of the bookmarklet - Use at your own discretion.

I didn't test it on anything other than Firefox 3.5. Must work other browsers as well, I guess.
I check if the current browser location is http://www.facebook.com/video/video.php. If not, this bookmarklet wont do anything. So, make sure u r in the video's homepage when u use it :)

Thursday, June 18, 2009

Creative Crew Singapore - Special meeting - "Into the code"

Creative Crew Singapore - The adobe usergroup for Creative Suite tools is doing a special usergroup meeting this weekend. This time, the sessions will concentrate on code and programming! The creative crew website has a detailed blogpost, complete with the schedule and venue details here.

I'll be doing an introductory session of the upcoming Designer-developer workflow changes - around the introduction of the Adobe Flash Catalyst (previously codenamed 'Thermo'). ArulKumaran from the Singapore FUG will be doing another Flex session titled "Thinking in Flex for Designers". There are couple of sessions from the Creative Crew core members as well. More details here.

When:

Saturday 20 June, 2009 from 2:30pm - 4:30pm

Where:
Bukit Merah Community Library
3779 Jalan Bukit Merah
Singapore 159462 - map

RVSP here

Friday, May 08, 2009

Using firebug on firefox 3.5 beta

I updated to Firefox 3.5 beta a while ago, and almost all extensions became incompatible. And today, I just couldn't avoid not using firebug (I had Firebug 1.3.3) , so decided to make it 'compatible'.

This is what I had to do:
  1. OSX, find the install.rdf file at ~/Library/Application Support/Firefox/profiles/xxxxxxx/firebug@software.joehewitt.com/install.rdf (On Windows, I guess it should be at C:/Documents & Settings/username/Local Settings/Application Data/Firefox/profiles/xxxxxxx/firebug@software.joehewitt.com/install.rdf )
  2. Find a node like 3.0.*
  3. Change the version number in the above node to to 3.5.*.
  4. Save the file, and restart Firefox. Firebug should now be active, and available for use!

Disclaimer:
Of course there might be something new in firefox3.5 that isn't compatible with Firebug1.3.3, so it might give u some unexpected errors. I've been using it for a while, and its alright at my end. But use it at your own risk :P

Friday, April 03, 2009

A bookmarklet for Digg.com's new Diggbar

Kevin Rose announced DiggBar today. Read the official blogpost here

Diggbar is a 'toolbar' for Digg - but without any traditional installation process. Unlike traditional browser toolbars, this is a html toolbar which gets appended on top of any website that you visit the webpage with "digg.com/" prefix-ed to the url. Digg also creates a short url for all those webpages that you visit using this feature.

I personally like this feature, and can see a lot of uses to this - but am too busy with work to pen down my thoughts. You all can read what those pro-bloggers have to say instead :P

Am sure there are some lazy buggers out there who find having to prefix the "digg.com/" a tiring task. So I put this lil bookmarklet together:


DiggBar



Drag the DiggBar button above to your bookmarks toolbar in your browser*. Now you just have to click on that bookmark link everytime you visit a website that you wanna Diggbar-ize. Cool stuff, huh? ;)


* - Tested on Firefox & Safari. Not sure if it works on IE, Sorry. If you tried this on IE, leave a comment. Thanks!

Happy Digging!

Tuesday, March 24, 2009

BugQuash - Don't just complain, do something about it

The line "Dont just complain, do something about it" nailed it for me.

From the pre-event kit:

All of us have run into bugs with all types of software. Every now and then we even run into some that are a part of the Flex SDK. These bugs can be aggravating due to their elusive nature - you think the bug is something that you are doing wrong while all the time it is a bug in the Flex SDK that was likely missed during various testing - this is not uncommon! Now that the Flex SDK is open source, our community has the exciting opportunity to help eliminate bugs in the SDK. Adobe has designated numerous bugs as Community Bug Fix Candidates which they believe are the best candidates for the community to tackle. However, you're not limited to fixing the Community Bug Fix Candidates. Do you have a bug that's been deferred or not yet resolved? If you're passionate (or rather irritated) by other bugs, we encourage you to quash those too! Our goal at the Flex BugQuash is to eliminate these bugs and contribute software patches to Adobe for their approval. We want to quash as many bugs as possible within the time allotted! Wouldn't you love to be part of it?



Want this for your site?


Visit http://bugquash.com/ for details. If you are in Seattle WA, you can physically attend the event, and if u are away, online option is available as well.

Tuesday, February 10, 2009

RIAction Singapore - the big 3's in RIA come together!

After a successful TAC, the Flex User Group here in Singapore presents - RIAction. Its a - first of its kind - one day Rich Internet Apps 'event' sponsored by the 3 ultimate names in RIAs - Adobe, Google and Microsoft. There will be sessions on Adobe Flash platform, Microsoft Silverlight, and AJAX based RIA development. And there will be non-technical sessions about effective RIA development methodologies as well! February 26th 2009 is the date, and Microsoft Singapore, the venue. Since the sponsors picked up all the costs, attendance to the event itself would be free!

Special thanks to Shunjie Hu, the Singapore FUG manager, for arranging this event in record time.

Learn more about the event here. If you'd like to attend the event, please register your details here.

See you at RIAction!

Monday, January 19, 2009

Fusiongarage just got techcrunched...

...but, not in the same way that startups usually get 'techcrunch'ed; We have been collaborating with TechCrunch building the software for TechCrunch's tablet pc project, pet named 'Crunchpad'. Though we've been at it for a while now, I couldn't 'publicly' discuss this - due to obvious reasons. But last week, that changed - when Mike Arrington wrote an official blogpost announcing the status of the latest prototype, and in the process, mentioning our involvement in the project. So yea, for all those people who have been asking what I do at Fusiongarage, and been hearing some seemingly disconnected replies, here you have it.

The last year had been pretty eventful. February 2008 we were just setting up fusiongarage's office space. By day, we were assembling furniture we got for FG, from IKEA and by afternoon we were busy brainstorming our product idea. Once we settled on the core product idea, we set out to build a prototype application. We ended up building some really cool stuff in the next few months.

When we eventually had a demo-able version of our idea (it had a 'grander' vision of what we are building now), it was also that time of the year, when TechCrunch had started accepting applications for the TechCrunch50 2008 conference.

We decided to send our entry and a few weeks later, we found ourselves at the demopit in the conference venue. We didn't really launch our product/startup there, the plan was to showcase the concept to the attendees and gauge their interest and gather feedback. People generally seemed to like our idea, and some interesting meetings were scheduled for the next few days.

The week following TC50, we also attended Mobilize '08 - a conference targeting the mobile web space, organized by GigaOm network. People liked our ideas there as well, we even won the audience choice award! There were a few very interesting observations made here as well.

So after a fruitful 3 weeks at SFO, we were back to singapore, only to start preparing our software for the Intel Developer Forum, at Taipei, Taiwan. What better place to present our software to Intel based hardware manufacturers, than the IDF! So off, we went. ( More of that later, as things get 'declassified' :P )

The collaboration over the Crunchpad project happened as a result of meetings we had with Mike Arrington and co, subsequent to TC50. We worked closely with Louis Monier in getting the software in shape for the hardware prototype B. We continue to work with them in getting the software in shape to make crunchpad a 'simple to use' device. This is where we stand as of prototype-B: (Details over at TechCrunch's update )



As I said, 2008 had been a very exciting year for FusionGarage. We expect, that 2009 is gonna be no less exciting!

[EDIT 30 Jan 2009: Though I started writing this post on Jan 19th, I only posted it today. sigh.. lazy me!]

Wednesday, December 17, 2008

Developing crossplatform AIR applications

Though Adobe AIR is a runtime for creating cross platform applications, it is very much possible to create an AIR application, that runs fine on - say, Windows and screws up on Mac OS X and Linux. Its up to the developer of individual applications to make sure that his/her application remains truly crossplatform.

Charles Ward from Adobe documentation team has put up an article on devnet highlighting areas that developers need to be careful about when they develop AIR applications. Go take a look.(http://www.adobe.com/devnet/air/articles/developing_crossplatform.html)