Bootstrap with jQuery Wookmark demo

Bootstrap is a JavaScript and CSS library for faster and easier web development. It has been fantastic so far. It does the hard work of prettying up menus, drop downs, buttons and tables with minimal input from a developer. Basically any developer could be a good website designer. Yes designing icons and images still has to be done by designers. Bootstrap has been a phenomena ever since twitter released it more than a year ago.

I have created a sample application which uses Bootstrap to build the page layout, top bar and drop down menus. It then uses jQuery wookmark plugin to build Pinterst-style board with pictures. Currently it uses an API provided by wookmark  o pull beautiful images and show then in the board.

This is a very basic demo and could be helpful if you are thinking of getting started with bootstrap and wookmark.

https://github.com/syuraj/BootstrapWookmarkDemo

It uses bootstrap 2.3.0, jQuery 1.8.3 and jQuery wookmark .1 available at the time of building this demo.

I hope you guys enjoy the demo. Let me know your thoughts on comments. Below is a screenshot of the application.

image

LG Nexus 4 phone still has a battery problem

It is the latest android phone from Google without the loads of bloatwares from vendors. And yes, $300 for a high-end top notch smartphone is a steal.

But, the fact is the fact, it still has battery issues. Yes, it is of course much better than those Samsung Galaxy S2 and older likes. But, if you compare with Galaxy S3, it seriously lags. I see my friend with S3 playing games all day long. However, same cannot be said about me with Nexus 4. I have to conservatively use it to keep it alive. If I can avoid hard core games like Need for Speed, then it can sustain a normal day with frequent email checks, facebook wall trolling and some arcade game play.

At the end, I absolutely love it and highly recommend it. At least I don’t have to worry about charging all the time as I had to when I had Galaxy S2.

Facebook web app authentication made super easy

First, you have to create an web app at https://developers.facebook.com/apps and set canvas URL along with other details as always.

And that is all you need to do. There is no need to call their api for authentication. Instead FB will directly post a signed request to the canvas URL you provided while creating the app as soon as the app is loaded. Then, you can decrypt the signed request using secret key and ‘HMAC-SHA256’  algorithm. You can also use libraries like csharpsdk.org to do the job.

After decryption, you will get user_id, user details (country, age, language), OAuth token and some timestamps. Then you can use user_id for identification and token for further communication.

However, if the user has not authorized the app you will get null for user_id and token. Then, you can ask for authorization by redirecting to the authorization URL (e.g. https://graph.facebook.com/oauth/authorize?client_id={0}&redirect_uri={1}&scope={2}). 

You have to pass redirect_uri so that, FB returns the user to previous location and you can continue from there.

This is a very nice move by Facebook as it reduces dependency on external Facebook libraries vastly.

A small Facebook App that I created using above described technique is available at codeplex at http://jackpot.codeplex.com.

Also, it will be hosted at https://apps.facebook.com/badhshala.

Reference: https://developers.facebook.com/docs/howtos/login/signed-request/

Image with semi-transparent border

This is a simple CSS trick you can use to have image with semi-transparent border. Browsers do not support opacity property for border. 

This example includes the border inside the image itself as shown below.

Image with semi-transparent border

Basically, I had to create 2 containers, one inside another.

<div id=”container”>
        <div id=”inner-container”>
        </div>
    </div>

Then added CSS as shown below. The outer container has image as background and inner container has opacity. The width & height of inner container including border is equal to width & height of outer container, which gives an illusion of a single image with semi-transparent border.

#container
{
    width: 150px;
   height: 113px;
    background-image: url(‘http://www.w3schools.com/css/klematis.jpg’);
    background-repeat: no-repeat;
}
#container #inner-container
{
    border: 10px solid;
    width: 130px;
    height: 93px;
    opacity: 0.5;
}

However, you can use rgba format like following example to have semi-transparent border. But, the border will be outside the image.

div {
    border: 1px solid rgba(255, 0, 0, .5);
    -webkit-background-clip: padding-box; /* for Safari */
    background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
}

ref: http://stackoverflow.com/questions/4062001/css3-border-opacity
Nokia Lumia GPS sucks

Nokia drive was touted as a key feature in Nokia Lumia smartphones. It even allows you to download offline maps state by state. I thought the days of GPS devices were over.

When I got my Nokia Lumia 900, I went on to order a handle for Nokia Lumia so that I can snap it into my Camry’s windshield while it displays turn by turn navigation. The feature that caused Apple to develop its own mapping software and replace Google maps from its iDevices. I waited impassionately to receive the handle through free shipping from eBay. Finally it arrived and I tried it in a couple of short trips. After those two rides, it was clear that Nokia drive is nowhere close to replace Garmin or TomTom, not yet. 

The first basic problem is smartphones become really hot when you put in front of windshield in sunny day for hours. I haven’t tried it’s ultimate limit but I am sure at one point it will burst. Maybe something like those old Nokia mobiles :). So, smartphones got to deal with this issue if they ever think of replacing good old GPS devices.

The most important problem is that it just can’t locate you. Yes, if you are in a road with multiple parallel roads which cross at some point or under an overhead bridge, then the location pointer keeps jumping from one road to another. Which means recalculating route every few seconds. It almost got me into trouble. Which means, basically you cannot use it unless you know the route enough and are using Nokia drive for secondary help only. I am guessing it is more of a hardware issue than a software glitch as other apps also have trouble getting location information quickly.

However, it does have one nice feature. It warns you whenever you cross speed limit. And it does it quite accurately. As soon as you cross a speed limit post, it updates and warns you if necessary.

In any case, the inability to locate user accurately is a deal breaker for me. Apparently there are many users facing similar problems. Hopefully Nokia will gain some wisdom and not make same mistakes again and again.

Nokia Drive

tablet is an ereader plus much more distractions

I had a Kindle Touch ereader since a year ago and I loved it. I took it everywhere I go. I read in my train ride to the office. I read in my lunch time at the office. It had changed my life in some way. But, about a month ago, I bought a Nexus 7 tablet. And it again changed my life in some other way.

I almost completely stopped using my Kindle ereader. I spent much more time in tablet than I used to in Kindle. Mostly, checking email, reading news through Pulse app, facebooking, playing Bad Piggies and Hot Pursuit and then back to checking email, reading news and so on. It is an endless loop of surfing web without any purpose. Even if I try to read book from Kindle app in my Nexus, I get easily distracted. And also ereader provides superior experience when it comes to reading book.

The main culprit here is the speed of Tablet. With 5 cores processor, 1 GB RAM, 8 GB Storage, Nexus 7 is blazing fast when it comes to loading games, web pages, emails. It allows quick switching between apps which leads to continuous switching and thus distraction.

Unlike tablets, ereader is a much slower device given its hardware constraints. Even turning pages, navigating to home page, scrolling through the list of books, browsing Kindle store is much slower. Browsing web page is an awful experience. So, you end up sticking with one book until you finish it. 

If you have a tablet, there are good chances that you almost always use it in bed before good night’s rest.The problem is that tablets have glossy backlit screen which causes headache and sleeplessness. Also according to recent article in Mashable.com, these backlit tablets suppresses melatonin thus increasing sleeplessness. 

Nexus 7 Pulse News app

Cheap plastic boxes from Samsung Galaxy line up

I always wondered what’s the deal with cheap plastic cases used in Samsung Galaxy smart phones despite being world’s most advanced smart phones. It makes whole experience bad. 

It makes phone significantly lighter thus feels like cheap device. Also, back cover can be easily opened to replace sim or battery which goes against closed container idea around iPhone and Nokia Lumia cases. Also, it might easily break if you take out and put it back quite often. Nokia Lumia and iPhone also have scratch resistant superior quality casing. 

It seems that millions of buyers have proven that phone’s case does not matter much. Samsung keeps on adding features so that, it could boast against other phones on feature by feature comparison. For example: Samsung’s recent “It does not take genius to figure out” ad where it shows feature comparison with Apple’s iPhone.

But it is about a good feeling. Having paid substantial amount to buy world’s most advanced smartphone, a consumer may not except a smartphone which feels like cheap plastic box.

In Steve Jobs biography, he has mentioned several times that it is equally important to polish hidden side of a product even if that side won’t be directly visible to consumer. He applied this idea everywhere from painting backside of wooden rail to designing internal parts of a Mac.I hope Samsung can learn a lesson from there and also focus on these small features. Even though it cannot boast on this feature immediately, in longer term it will pay off. It will improve brand image and set a level of expectation from Samsung in consumers mind. Otherwise, consumers will think that Samsung produces devices of varying quality and it is necessary to examine every product they buy.

Samsung Galaxy back cover

Why is Google still selling defective Nexus 7 tablets

When Nexus 7 came out, many tech enthusiasts announced it as the best Android tablet. It sold out immediately. Online orders began to pile up. Then, consumers began to report defects on Nexus. Mainly glass separation, light bleeding defects. The defects were widespread. A consumer reported on AndroidCentral that he received 7 Nexus tablets one after another and all 7 of them were defective. After 7th tablet, Google is refusing to issue new RMA.

I believe him. In fact, my friend also got Nexus with glass separation issue few months ago and the one I got 2 weeks ago also had the same defect.

Despite fire outcry from tens of thousands of consumers, Google and ASUS have not taken any action to remove defective tablets from their store. It sucks. It really does. I understand that they have very thin profit margin. But then again, you cannot screw consumers even if that means taking loss or increasing end price. Apple has made a empire on happy consumers. 

Google never gets it.They just want to develop new cool technologies without bothering about implementation, adoption and consumer support. When Google Nexus smart phones came out, customer support was a nightmare. It has happened with many other Google products that failed. This is the area where Apple has always excelled in. They have very well designed products, very well managed stores and good customer support. A tight integration end to end. iPhones have few features, smaller screens compared to similar Android phones. But still, thousands line up outside Apple stores every time a new iPhone comes out. So, consumers are very important part of the equation. It is hard to gain consumers but easy to lose. So, mind it Google.:)

Nexus 7 glass separation issue

my experience with a fraudulent merchant from Wisconsin

I was looking for a DSLR camera with a limited budget and I almost bought it from a prospective fraudulent merchant from Wisconsin. The deal was too good to be true. A DSLR Nikon D3100 was listed for $300 while its regular price was around $550. They go by the name Viable solutions. Their website show a physical address which turns out to be a luxury apartment in Milwaukee, Wisconsin.

Despite the doubts, I called them at a phone no. listed in the website and asked if the item listed in website is still available. A guy with an accent (probably the owner) picked up the phone. The tone was rude.I heard keystrokes from other side which felt like he is trying to search the item from the inventory. After few seconds, he told me that it is still available and I could order from the website. 

A quick check from  www.scamadviser.com showed that their website was registered just 14 days ago at the time I was about to make purchase. Also, the site was plain & simple, probably hosted in enom.com (a cheap hosting provider) and constructed using template from highwire.com. So, basically anybody, even without much technical knowledge, can setup a site like that. It was huge red flag.

Scamadvisor

I read many stories of other fake merchants from Internet. Since this one was new, I could not find any stories on them. Despite the red flag from scamadviser.com and horror stories, the deal was too good to ignore. 

So, I tried to make payment through their site using Paypal. It failed. I found a contact email address (of course from free email provider)  from their ‘contact us’ page and informed him (probably the same guy on phone) about payment failing. He said that they are having issues with their credit card and Paypal payment processing. (I wonder why would he ask me to make payment from their website during phone call. Probably to show that they are legit.) So, he asked to make payment from Western Union and to find out a local Western Union agent. But, I asked him if I could make payment to his bank account or Paypal account directly. However, he was sticking with Western Union and offered me help to locate nearest Western Union agent. May be he thought I don’t know Google Maps :). He also mentioned that I could make payment from Western Union using credit card. I contacted Western Union chat support to know if payments made through them are revocable. The support guy said that they are in the business of securely transferring money but not in handling disputes and revoking. However, he mentioned a certain complex clause where I can raise a dispute. 

With so many doubts, I asked the New Solutions guy that why he cannot accept paypal payment directly. I can understand technical problems with their slow website. He said that his Paypal account is under editorial review due to excess funds. He forwarded me a link to manta.com where his company was listed as a company providing computer related services in that area. He also sent me payment details for Western Union Money transfer. The receiver was an another new person from Alda, Nebraska. Totally different state than what Viable Solutions are supposedly located. That was also a huge red flag.

Knowing that there is less than 90% probability of getting the purchased item, I still made the payment through Western Union money transfer online using credit card. But, since my account was just opened and not verified the payment was pending. I was supposed to wait until a WU transaction with a code appear in my credit card (24 to 48 hrs) and use that code to verify my WU account. Only then my payment will be processed.

The delay turned out to be a lucky one for me. I get a chance to think it through. Earlier, I was so eager to get the camera in cheaper price before other gets it. I did some Google search and found out that the fraudulent merchants ask payment from WU so that, it cannot be revoked and traced back which is what exactly happened with me. I immediately cancelled the pending transaction from WU and wished the guy good luck with other stupid customers. :).

While doing further research, I noticed very few people have actually purchased from merchants like these. And very few of them actually got the right product. Many were sent multiple quantities of same product and charged for it. 

I also noticed many websites with similar looks and feel and listing similar products from ‘Google Shopping’ search.They even have same names for online chat support person. Most of them are originated from outside US (like China or some south american countries) according to scamadviser.com. These are the sites which come at top in Google Shopping search with excessively low rate when you order the list from lowest to highest price. All of these clues clearly suggest that they are fake and waiting to get our hard-earned money illegally.

All these sites which list deeply discounted items are highly suspicious. It is likely that some few are legitimate but most of them are either bypassing taxes or screwing customers some other way. It is always a good idea to do some research on the physical location of the company, website review (from sites like scamadviser.com), other customers experience with them and payment method. Hopefully, Google will remove these sites from their search results in the near future. Happy shopping. :)

[Update] It turns out that a consumer is tricked to buy 4 TV’s from them.

http://www.avsforum.com/t/1421928/viable-solutions-llc

Why can’t there be a simple close button in a mobile app

Having used an iPhone, an Android phone and a Windows phone for more than a year, it always amazes me that there is no simple close button in any of the mobile apps. In iPhone you have to hit home button twice to get apps running in background, from where you can close those apps. Actually, I even didn’t know about this for a month. I was under the impression that as soon as I press home button, the app shuts down in a while. Home button in iPhone is already overused. So, chances are that after one or two years, it won’t react as fast as you expected to.

Closing app in an iPhone

At least in iPhone, you can stop apps from using mobile data(3g, 4g).In Android it is even worse. You have to press series of back buttons to exit or you can use some task killer to kill the background apps.  Also, what sucks is there is no way to limit mobile data app by app as in iPhone. Some apps come with a background service and it will keep running no matter what. So, your best bet is to kill all tasks frequently.

Windows (7.5) is even worse than Android when it comes to closing the apps. There is no easy way to kill task in Windows phone other than hitting back button number of times. Windows puts maximum of 5 apps in background, which you can see by pressing and holding back button. So, when sixth app starts, it will knock out oldest app from memory. But problem is if you reopen an app running in background by clicking it’s tile in home page or side menu again, the app will launch from beginning. Which sucks. However, it does not happen with in built Internet Explorer.The good thing about Windows phone is you can turn off background services installed by apps if you want to.

I agree that having a dedicated close button inside the limited screen space of a mobile may be too much. But, you cannot let those apps keep running in background after you switch to home page or other app. Simply because it will eat your processor capacity and your mobile data. Hopefully, someone will come up with an idea of dedicated capacitive button or some other trick to shut down a running app in near future.