Thursday, February 10, 2011

HTML 5 : Video

Boulder Java User group meeting. Presentation by Scott Davis : look at source of google.com apple.com they use html5

when working with public facing web site, idea of video is a very big deal. 

animated gifs : first time moving pictures on the web circa 95
interlaced jpegs, interleaved gifs, progressive downloads same to interbet for downloading on modem

now progressive downloading in movies : first by apple : moved meta data to the front of file (it was the at the end of the file). enabled streaming with quicktime circa 97

netflix moving to html5 (currently supported on ps3 & )
html5 is big on mobile

the big battle on html5 will be on TV set.

web video increased to 54% in oct2010 from 10% in jan2010. but on mobile html5 is almost exclusive,

    <video>
    container/codec
    html5 streaming

    <video src='file.ext' width='300' height='200'>

    similar to 
    <img src='file.ext' width='300' height='200'>


    <video width='300' ...   preload autoplay controls>
        <source src=".....ogv" type="video/ogg;codec=..>
        <source src=".....ogv" type="video/mp4;codec=..>
        <object> .... for flash
        <p> downlaad from    < dislay a message to user to download it
    </video>

    tries to play  first source if it cant tries second etc.... the object. if everything fails download message is displayed

Video containers video files are containers that contain video track, auto track meta data etc. popular container are mpeg4 (.mp4 .m4v), flash (.flv) ogg (.ogv) webm () AVI ()

    mp4 : patent for encoders/decoder
    flash : cpu/memory hungry, no silicon encoder/decoder
    ogg : no patent encumberance like mp4
    webM  : not open standard, just google, google own patents

    flash plugin supports mp4
    quicktime pligin supports ogg
    webM :  also supports  ogg

encoders when we watch video 1. interpreting the metadata 2. decoding video 3. decoding ideo

    3 codecs : h.264, Theora, VP8

    mpeg4 = h.264
    ogg  vorbis=audio, theora=video   (no patents)
    vp8 = webM  (brand new, no onchip container)

    h.264 : both low bandwidth (mobile) high bandwidth (blue ray eyc)

HTTP live streaming (HLS) invented buy Apple submitted to IETF.

    A big file say 30 mins file into small 10 sec segments
       => can be served up by simple apache server
    .m3u stores index file, .tm file are file segments

    files can be encoded different bit stream, so if mobile app moved from wifi to 3g, it can ask for lower bitstream

    Mediasegmenter takes in the original file and segments it

Tuesday, February 8, 2011

HTML 5 presentation by Scott Davis: ThirstyHead

Q. How many are are doing android dev A. 3 hands went up : Teacher eval, Qwest phone features, Time warner cable

Q. How many desktop A. 50%

Q. HTML5 A. no hands

Local Storage & Application Cache : Can be used for both desktop and mobile app, but mostly on mobile

HTML 5 : Dive into HTML5 by Mark Pilgrim by O’reilly free online at diveintohtml5.org

local storage

old style persistence : cookies disadvantage : turned off, small (4k), all cookies send back & forth with each request

Q. anyone playing with nosql A. no

local storage is name value pair : its like no sql. almost like hashmap 5 MB storage for each origin

localStorage["name"] = value
localStorage["name2"] = value2
for(var i=0; i<localStorage.length; i++)
    var key = localStrorage.key(i)
    var value = localStorage.getItem(key);

Typical usage: we can store facebook updates, twitter updates on the local storage when your phone is in airplane mode. when we go online the updates from local storage is submitted.

today most TV guide are java1.1 or embedded C, most TV manufacture are converting to HTML5 and will use local storage to persist it.

There is also session storage for the current session.

polyfill : polymorphically backfilling the brower that doesnt provide the functionality that browser should support natively. there are polyfill aviable for localStorage ay github

WebSql

no support in IE (as its GPL), firefox due to develop aesthetics : sql is last gen, localStorage keyvalue

can open a db and run sql database. but not on IE or firefox, that makes it not go anywhere

storage is 25 MB

Question : how do we clear the storage, or age out after time like cookies Answer : cant age out, but can clear via offline storage : (firefox - advanced:network)

Question : shared across tabs Answer : yes

Application Cache

all requests are sent to cache and then rendered. all subsequest request hit the browser cache first

cache is king when it comes to writing performant code

great tutorial : Caching tutorial : http://www.mnot.net/cache_docs/ great book : High Performance web sites : recoomendation in books implemented in tool YSlow http://developer.yahoo.com/yslow/

App cache will be supported in IE9, not in IE 8, but in all browser including in iphone and android

html5rocks.com : great site for all things html5

html 5 uses server side hints

manifest file: text - non xml etc file is named as .manifest has 3 sections in any order : CACHE, NETWORK, FALLBACK
the session can appear multiple times

cache : cache things listed here network : users has to be online fallback : show alternate pages to be shown when user is offline

application cache also gets 5 MB

Friday, February 4, 2011

Kid-safe version of mainstream sites

Kids are becoming smarter with each generation. They are getting comfortable with technology at earlier and earlier age. Today intenet forms a very integral component of my kids both education and entertainment needs. This blog post is an attempt to attract attention to an unfulfilled need of an kid friendly need for main stream sites.

I am aware of the superior parental control features of the the computer. But in todays age most of the stuff kids (at least my kids) do is online, not on the computer. I do use parental control to block sites, or better still do it via opendns. but it is a all or nothing deal. I dont want want to block the mainstream site itself, I want to sandbox the site.

My kids use gmail, youtube, google, wikipedia, google image search. I want them to get started with blogging and start tweeting/and facebooking. All of these sites are designed with an adult in mind. Infact I cant even get an account for my kids. They point me to [COPA][http://www.ftc.gov/privacy/privacyinitiatives/childrens.html]. Most sites require you to be atleast 13 to legitimately open an account. Are they serious ? Can today’s kids can live off the internet till they are tweens ?

I think there are legit concerns about the privacy/safety online. Big sites also might be concerned about the potential liability. and ofcourse as the kids cant have the cerdit card and buy stuff online they might not be an attractive marketing target and thus are more trouble they are worth to most site.

Anyhow, what I am dreaming or hoping one of the internet giants will do is the following. and hopefully if one of them shows the way they other will have to follow :)

  • Have a kid friendly version of the site. Kids need to have their ids tied to their parent account.
  • Kids are allowed to communicate (send/receive) messages from only those “friends” that are approved by parents.
  • Any invites/friend both inbound/outbound is sent to the parent account to approve
  • All account activity is logged with the summary support sent to parent account
  • All posts from adults have to self attested as “kid-safe” to show up on kids account, any adult post that show up on kids accounts always also show up on the parent account too.
  • Any search is hardwired to the “safe” filter (similar to what google uses in its searches)

Just some ideas on what will make mainstream internet sites kids friendly. If one of the Big Guys dont step up, hopefully there will be a overlay site that bolts on these features.. Just wishful thinking

I do realize that as parents our responsibility would not end if this were a reality today, we do need to continue to supervise internet access. In my house Internet access is limited to the imac in the family room, so that an adult always has an eye on. No “personal” computers or laptops just yet.

Monday, January 3, 2011

The Good, the Bad & the Ugly of the iAd

Apple launched iAd with much fanfare as an advertising platform for its iOS devices. It is intended to keep the apps in the app store free or low cost. Apple apparently curates the ads on iAd to keep the quality of ads high. This post is from the consumer’s perspective (iOS user), not from a developer or an Ad producer/buyer perspective.

The Good : iAd ads are definitely high quality. They do have an Apple intrigue. When ever I see the iAd banner on the app I am using, I am temped to click om them, just to see the new Ad. Ads themselves seem like full blown apps in themselves which encourage the user to interact and explore the product. They are engaging and captivating. And when you are done, you go right into the app exactly where you were before you clicked on the iAd.

The Bad : The iAd, being almost a parallel app seem to be heavy weight. When ever I see one, I know that clicking on it will take me out of the host app for a few mins. In almost every case, when I have clicked on the iAd, I have to wait for a very noticeable time (15-30 secs) before the iAd “app” renders itself. It almost seems ridiclous to have to sit and weight for an Ad to show up. quite a few times I have just given up and went back to the app after waiting 5-10 secs. Apple has to find a better way, may be the iAd downloads before showing the banner or something. may be it is the slow AT&T network. what ever it is, I now have an perception that iAds are slow and I only click if I have some time on my hand.

The Ugly : iAd uses up my precious data plan. Infact not I end up waiting for iAd to show up, I am also paying to see it. With default iPhone data caps being very low (200MB in US by AT&T), I come very close to exhausting it each month, I definitely don’t want ads taking a big bite out of it. Its really non intuitive, and static app, which has no online component (say a game like chess, played agains iphone, or a game like solitaire), constantly uses my data plan to download ads. It is almost unacceptable to me to have an essentially offline app use up my precious data limit all in name of showing me ads.

Here is a neat trick, I am slowly getting into the habit of turning off my network data preferences, whenever I am using a App that is essentially an offline app. This way ads are not downloaded and not shown. win/win : I save on data, iphone runs faster, and no ads (apps run full screen)

Wednesday, December 29, 2010

Things I want in 2011

New year brings freshness, excitement, energy and also expectations. Here are a handful of things I hope 2011 brings for me. These are not predictions by any means, just some wishful thinking on my part enroute to India.

Broadband Anywhere We pay for broadband access many times over. Wired broadband at home, 3G/4G for smart phones. And increasingly on device specific plans, monthly (as in ipad) or part of the device (as in kindle). If you own multiple connected devices, chances are you also are paying multiple carriers for same internet access sliced and diced differently. I hope in 2011 carriers come out with unlimited internet access plans with no restrictions that work everywhere, or any device of my choosing.

Digital wallet Our smart phones are becoming smarter with each revision. I hope in 2011 they take over our wallet. I recently lost my physical wallet and had to go through the pain of individually calling the various card providers and then waiting for a physical replacement to arrive in mail. I hope smart phones become smart enough to replace a physical wallet. Upcoming technologies like NFC, or Pay-by-sms are promising steps in that direction. Phones should be able to allow me to complete a transactions via a payment method of my choice (via secure pin, phrase, finger print recognition etc) and let me remote wipe it, if I were to loose a phone (and thus the digital wallet). This Idea can be extended to other physical cards typically carried in a wallet i.e. membership cards, passes etc. I hope in 2011 smart phones get rid of my wallet

Video on demand 2010 was a year where a myriad of devices struggled to get video on demand to our TV sets. I believe a large number of people are waiting for a true video solution in order to get rid of their cable/satelite TV. Google TV, Roku, Boxee, Apple TV are just a few players. They all are struggling to sign up enough content from the various content producers to make video on demand an viable alternative. I think technology is there and it is waiting for a business model/plan to make it work. I hope in 2011, the players in this space get together to give us a true video on demand, where I can watch what I want, when I want for an decent price - iTunes for Video.

Death of CD We all thought CD was dead. Apple even told us so [TBD]. But wait, why did I buy handfull of them just in a last few weeks ? Game Consoles rely heavily on CDs for their games to prevent piracy. Most of my games are kid oriented. kids and cds dont go togather, I am always worried about cds getting scratched and unplayable. I hope with Kinect, Move & Wii focusing on more kid oriented games, an kid friendly alternative to CD is developed in 2011. That will save me some yelling.

Try-before-you-buy-apps Not sure if apple realizes, but in my opinion the biggest obstecle to an even more widespeard use of apps is lack of “try before you buy”. I hope in 201l, the appstores come out with an innovative way to let us try apps, before we acutually purchase them. They can just hold charging the card for a day or so. I know, I would definitely buy a lot for apps, both for me and my kids if I could experience the functionality before making a commitment. Like dating before you pop the question ;)

What does the techie inside you want in 2011. Post your thoughts in comments :)

Friday, December 17, 2010

10 significant tech tends of 2010

As this year comes I started to wonder about the tech trends that have affected me personally. There are quite a few and I decided to pen 10 of them down. here they are in no particular order.

Cloud Sun had been saying for years network is the computer. Google continues to convince us of moving to cloud by “assembling” google documents as a credible alternative to office. But its only now that cloud is showing signs of coming of age. The rise of smart phones and apps has led to radical shift in the way software is architected. Instead of thinking of applications as client/server or as a 3 tier systems, we have started thinking of them as set of cloud based services that can be accessed from anywhere: web, smart phones, tablets, PCs etc. They continue to work when offline and magically sync back once online. dropbox evernote two apps I love the most and use regularly on various devices are perfect examples of such apps.

iPad I don’t own ipad yet but lust after one. Its a game changer. It is single handedly killing the netbooks. Ipad’s sucess has beeline of vendors touting their android netbooks. Msft will attempt to re-peddle its tablets too. Like iphone reinvented the smart phones, Ipad reinvented the tablets. It has encouraged us techies to think about form along with the function. also, if they complete its ok to drop the function in order to keep the form. This usualu goes against our engineering acumen, but iPad proves it by doing less than otehr tablets, but doing is extremely well. I am looking forward to see how the tablets evolve in 2011

Developers,Developers,Developers 2010 was a great year to be a developer. Success of apple app store and its reimplementation by almost every other platform is very exciting to an individual developer. It is nice to feel wanted for a change :) The app phenomenon can and will turn the life around for many a developers. We just need a strong passion, lots a caffeine and a strong belief (and may be a understanding spouse ;), almost all tools needed to be an app developer are very affordable or available for free. Also, social media makes a good product take off virally.

Andorid is rising up fast. It is showing a lot of promise. Almost every single manufacturer has an android offering or will shortly. Andorid is being used in almost every major consumer electronic appliance: phones, tablet, tvs, stbs etc. Android will surely become the “windows” of the consumer device market and thus it will become increasingly hard to avoid it. Android definitely provides healthy alternative to iOS. It will be interesting to see how the eternal open vs close battle plays out. I think technically they both are about the same and there is a place for both of them.

Location based services will increasingly become popular. Rise of the “checkin” based services like 4square, gowalla, facebook places, and location tracking apps like latitude and loopt are constantlt evolving. Slowly these apps will become commercialized with vendors offering e-coupons or other forms of incentives. This combined with social element, local content providers and crowd sourced reviewes/recommendation will make location based apps increasingly popular. I think gps enabled mobile devices & location based apps form a very symbiotic relationship and if traditional gps providers don’t do something soon, everybody else will eat their lunch.

HTML5 is a crowned prince of the internet, its just waiting for flash to die before it can take its rightful place on the net. Flash is being kept alive by the community to differentiate themselves from the iOS (so they can have an extra checkbox). Its been proven again and again that there is some truth to Steve’s rant. Mobile devices are defining the landscape of tomm, they need battery life and reliability (no bosd). Any technology that can provide that will be the king, and others will die off. HTML5 is a step in that direction. Its still premature to write a flash eulogy. I just hope in 2011 html5 becomes the platform on which web development is based on.

Family Gaming is another welcome development of 2010. Microsoft & Sony one upped nintendo by releasing kinect & move. They both seem to be family oriented gaming platform with a large variety of “E” rated games. They are definitely fun to play with. I think they will make parties more interesting and may be will bring back the family game night :)

3D TVs tried to make a big splash this year, riding on the avatar wave. They still might have a ways to go. I personally don’t seem to be interested in watching regular TV fare in 3d. It might have some potential in games. 3D Kinect game does sound very appealing to me

Google TV made a big splash with some marquee manufactures behind it. The major networks were quick to pull the rug. Video still remains a tough nut to crack, thus there is still time where apple/google tvs, or services like roku/boxee become mainstream.

Sun being acquired by oracle might have a major implications on tech industry. Oracle is slowing either closing down or significantly altering the open source technology landscape that blossomed under Sun. There already have been lawsuits flying with oracle & google for use of Java as part of android platform. I just hope these technologies continue to thrive elsewhere and continue to fuel the tech startup industry

These are a few things that caught my attention in 2010, I am looking fwd to what 2011 will bring to us. Its really a exciting time to be part if the tech industry

Sunday, December 5, 2010

Is Ad-Blocking unethical ?

I Hate Ads. Both on TV and online. There are 5 main reason I hate online ads.

1. Ads slow my browsing experience. Significant number online ads are use rich media (google text ads are notable exception) and thus take up a significant bandwidth on an page. Its unacceptable to me that ads slow my browsing experience, even more when I am browsing for text (like news sites or blogs), or researching something online. See Venturebeat study.

2. Ads are a battery drain Its been proven that flash drains battery a lot faster. Significant number of non text ads are in flash, and I don’t want them draining my precious battery. See Ars Technica study.

3. Ads are a bandwidth hog. We now live in era of tiered mobile data plan. We tether our computers to our smart phones, browsing via our mobile data plans. I want to maximize my browsing experience by seeing the content I am interested in, and do not want ads taking a bite out of our data plans.

4. Ads compromise my privacy. Quite a few ads plant tracking cookies. I hate being tracked online, as much as you would if you were tracked in real life. see this article

5. Ads profile me. Most ads I see are totally irrelevant, or profile me. They tend to be just white noise that I would rather not have. Look at this Wall Street Journal study.

All first tier web browsers have very effective ad blocking plugins (chome, firefox, safari ). These plugins are smart enough to prevent the browsers from downloading the section of the websites that looks like an “ad”, they use variety of heuristics to do this - they look at the size of the image, the source of the image, placement of the image etc to determine that. By blocking Ads they promise a faster, more secure online browsing experience, a longer battery life and saving on the data plan. All this for free. Also the ad blocking plugins preserve the site layout, and thus they do not compromise the content. I use ad blocks on all my browsers. It is the usually the first plugin I install. In fact, I don’t even upgrade to a newer version of the browser if the ad blockers are not available.

While the venture capital industry is crediting with fueling the tech startups, the Ad industry is truly responsible for keeping them alive. Most startups depend heavily on Ads as a revenue source. I do understand the online rule : If you do not pay for your product, you ARE the product. And I do not want to pay for stuff. So per the law I need to give up my privacy and let the site productize me, or I compromise my browsing experience by viewing ads. Hence my ethical dilemma. I don’t want to pay of stuff online. I don’t want to watch ads (which indirectly pay for my online stuff). This means I essentially want to consume my online services for free. Is this analogous to shop lifting ? Am I being unethical by blocking ads and disallowing the potential revenue the site could have made ?

I think the ad industry needs to innovate. They need to make sure that the ads are not a nuisance.

1. They are not heavy (the ads should not increase the bandwidth usage/download time by say 5 to 10% of the actual content).
2. They don't use technologies that are detrimental (flash).
3. They should not track me, if I don't want to.

I think Ad industry is taking a right step with Open data alliance. Hopefully they will figure out a way so I can live with ads, and do not feel like a shop lifter when I am browsing.