June 2012


There is a Market For The Nokia PureView

Today I remembered about the Nokia PureView because of The Verge’s sample pictures and videos, and I after thinking about the concept of that phone for a while I finally understood the potential market, besides their fan base, that they might be aiming at with that device.

First of all when Nokia unveiled the PureView at this year CES my first impression was really bad, since I’ll never ever understand camera phones. Also it was running Symbian, which for sure was the best choice since Microsoft would never let them customize Windows Phone to their pixel needs and because this was really on development for at least 2 years. Another thing that I noticed was that it was extremely thick, making it really a camera also does phone calls. This happened because of the entire camera mechanics they used, which impressed me a lot because of the way they did it, by inverting the way the lens moves instead of just doing like any point-and-shoot camera, in and out, they made the lens go up and down, removing the need of that popup lenses.

But now I saw that this product was targeted at people like for example journalists (more specifically from the independent media) so they wouldn’t need to carry a camera with them while they are at a conference or just out gathering information for their article. I realised this after I started thinking about how many times I saw journalists using iPhones/point-and-shoot cameras to capture photo, video, or audio for their job.

I hope Nokia can get some attraction to this new device because I really liked it after realizing this.


Conclusions From The Microsoft Surface Keynote

I’m watching the Microsoft keynote at the same time as I write this, so if I commit any error just put it in the comments.

List of problems with the Microsoft Surface:

  • 16:9 aspect ratio
  • Confusing products (ARM and Intel)
  • No pricing confirmed

The 16:9 aspect ratio for a 10″ tablet is the worst one you could ever use and still Android manufactures and Microsoft thinks it’s a great thing. It’s just impossible to feel comfortable with a 10″ 16:9 tablet in your hands while in portrait and the same happens for landscape. Every time I get my ASUS Eee Pad Slider to do something I immediately want to go back to my iPad.

Having the same name for completely different products that look exactly the same is the worst thing Microsoft could ever do. They made a professional tablet, using a Intel chip, running Windows 8 Pro (another terrible name) that “might be capable” of running all those those so called “classic” applications. And another tablet that looks just the same but with a ARM chip and running Windows RT, and won’t be capable of running “classic” applications, which I’ve already discussed how it will be a nightmare on a past article.

The last thing that wasn’t presented and also haven’t talked about is the availability. I’m almost sure it won’t be available on developing nations like Brazil neither countries that don’t have Microsoft Stores.

Anyway I won’t be buying one of these because I seriously don’t care about Windows anymore, it’s boring since Windows Vista and it’s still boring, but now it will be a lot worst with all the fragmentation problems that are going to come with the release of Windows 8 and Windows RT.

Some interesting quotes I selected:

We believe that any intersection between human and machine can be made better when hardware and software are considered together.

Looks a lot like the Apple approach huh?

Take the mouse. Windows needed one, so we built one. Early reviews were not very positive — in fact, it was so new that Canadian customs quarantined it.

I won’t comment on this one.

“I say perfect a lot — it’s part of our team culture.”

I still remember Windows Vista.. Also that’s not part of your team, it’s more part of the Apple team.

We took the time to get Surface and Windows 8 right. To do something that was really different and really special. We’re proud of the Surface like we’re proud of Windows 8. Because of Windows 8, the Surface is a PC, it is a tablet… it’s something new.

Looks like a Transformer Prime running Windows 8 for me…


Using bbUI’s onscreenready and ondomready to Dynamically Change Your HTML

I started playing a bit with BlackBerry development these days and since I’m not the best at Java (also hate how it’s difficult to do simple things with it) I choose their awesome framework for HTML5 native web development called WebWorks. I really loved it because it’s like PhoneGap, but a lot easier to build plugins (extensions on WebWorks) for it to make your native WebApp feel a lot more native.

Another great thing that RIM did to make the life of WebWorks developers easier and create apps that are exactly like native ones is a Javascript framework called bbUI.js, which is like jQuery Mobile, but seriously, it’s a lot more than just a UI framework. It makes it a lot easier to interact with the OS, override the back button for example, and makes your development cycle look a lot with native development by using screens. On this post I’ll teach you how to dynamically manipulate the screen’s HTML before it’s processed by the bbUI library.

One of the first things that you’ll notice after you start working with bbUI is that it’s not just a collection Javascript functions and CSS stylings, it actually reformat and customize your screen’s HTML before it’s shown to the user. As an example, this simple image-list item declaration in your screen HTML source looks like this:

After it’s processed by the library and shown to the user it will look like this:

Hopefully we can easily manipulate our screen elements and other things before and after it’s processed by bbUI. This is done with the bb.init() function (you can always read more at their documentation). This will be called when the application starts and can be used to listen to events like when a screen is loaded. The main ones are onscreenready and ondomready.

onscreenready: This event will be fired before the sources get processed by the library, so here is where you should manipulate, add or remove things from your HTML source using Javascript, so after it’s done the code will be passed to bbUI to be processed.

ondomready: This event will be fired when the screen finished loading and it has been already processed by bbUI and shown to the user. Here you can put things like alerts and other things that will be used to interact with the user, also some little editing to the screen’s source like renaming a field grabbing some information from a field and etc.

Here is a example of a bb.init() call:

bb.init({
  onscreenready: function (element, id) {
    if (id == "main") {
      // code to be executed before the "main" screen is loaded.
    } else if (id == "add") {
      // code to be executed before the "add" screen is loaded.
    }
  },
  ondomready: function (element, id) {
    if (id == "main") {
      // code to be executed after the "main" screen is loaded.
    } else if (id == "add") {
      // code to be executed after the "add" screen is loaded.
    }
  }
});

The code is almost self-explanatory. The id is the name, second argument, you gave to a screen when you call it to be processed, for example bb.pushScreen(“screen/main.html”, “main”). And element is the screen source code, which is used to be manipulated before the screen is loaded.

A little problem that some developers might come across while using bbUI for the first time is that when you want to append or change the HTML of the screen before it’s processed by bbUI you might write your code like if the HTML was already loaded onto the screen, but it’s not. Here is an example of a code that won’t work, used to populate a image-list and then show a button that was hidden (using jQuery):

bb.init({
  onscreenready: function (element, id) {
    if (id == "main") {
      var item = document.createElement('div');
      item.setAttribute('data-bb-type','item');
      item.setAttribute('data-bb-title','my title');
      item.innerHTML = 'my description';
      item.setAttribute('data-bb-img','foo.png');

      document.getElementById('mylist').appendItem(item);

      $("#button").css("display", "block");
    }
  }
});

The main problem here is that it’s using document as the source to be manipulated. Since bbUI still hasn’t appended the screen into the document it will give you an error. In order to correct this you should replace document with element, that is passed by the onscreenready event. If you have any jQuery code, just add element as a context argument as shown below in the corrected code:

bb.init({
  onscreenready: function (element, id) {
    if (id == "main") {
      var item = element.createElement('div');
      item.setAttribute('data-bb-type','item');
      item.setAttribute('data-bb-title','my title');
      item.innerHTML = 'my description';
      item.setAttribute('data-bb-img','foo.png');

      element.getElementById('mylist').appendItem(item);

      $("#button", element).css("display", "block");
    }
  }
});

That’s it! Now you know how to use the onscreenready and ondomready events to dynamically insert or modify your bbUI screen’s. Any questions or suggestions just leave a comment and I’ll reply as soon as possible.


Stephen King and eBooks

“I love crime, I love mysteries, and I love ghosts, I also loved the paperbacks I grew up with as a kid, and for that reason, we’re going to hold off on e-publishing this one for the time being. Joyland will be coming out in paperback, and folks who want to read it will have to buy the actual book.”

After Stephen King made that announced all the news sites when crazy to report it. I got the news pretty fast since my Twitter feed got flooded with the news coming from the most varied sources. When I started reading the articles about it I got shocked, how someone can do such thing in the middle of the eBook revolution? A lot of people, like me, prefer to read on eReaders than on the actual book, also there are a lot of people that prefer because it’s easier and more convenient to buy and digest the content of the eBooks.

I know that Mr. King (and Mrs. Rowling in the past too) is extremely famous and has the power to decide such thing, but letting a entire segment of the market, which was already used to your eBooks, without your new piece is just unfair. Many authors make this move because of disagreements with online stores, but those usually don’t affect well-known authors, usually just the small ones that really need to generate some revenue from their eBook sales.

eBooks seriously revolutionized the 600 years old industry. For the first time in the history we can buy books on affordable prices and with extreme comfort, this made the reading habits of many grow, which contributes to this generation to have more access to culture. Denying or delaying too much the release of an eBook is an act of denying knowledge and culture. The eBook revolution is future and in the future there is no place for paper.

Sources (to read more about the news): The Verge, BBC, LitReactor, Revolução eBook