Thursday, November 10, 2011

PhoneGap under Incubation at Apache Foundation

When Adobe announced the acquisition of Nitobi, the creators of the nice cross-phonegaplogomobile  development tool, like many people I was worried that this would become a closed-source Adobe Air mobile. Adobe has recently been voicing that it would deprecate Flash mobile and instead move towards HTML5 and JavaScript. Thus, PhoneGap seemed like the perfect acquisition to make money out of the new generation of cross-platform mobile development.

The heart-warming announcement came a couple of days back when it was decided that PhoneGap was moved to Apache Foundation as an incubation project. The project is called Callback and the code has been moved to github for now. There are also some nice tools coming in Adobe Dreamweaver which can be used to work with PhoneGap and with the acquisition it might get better and better integrated. This means that Adobe will hope to make money out of the development and probably the build service, yet keep the platform open-source and free…

All in all, I think this is great movement for PhoneGap and cross-platform mobile development. What has been hard for ages since the promise of JavaME, seems more likely now. Good job Adobe!!

Thursday, September 22, 2011

A Review of NetBeans IDE 7 Cookbook

A few weeks (actually a month+) ago, I was sent a request to review the NetBeans IDE 7 Cookbook and blog about it. Incidentally, I was preaching/teaching Netbeans to a few students during the same time. So, although I thought it came at the right time, later I was travelling quite a bit and didn’t have much time to read through the book. Finally, in the last few days, I decided that I should read through the book and see what it is all about. 

The book is published by Packt Publishers and written by the Brazilian Rhawi Dantas. It is nicely arranged in terms of the chapters and the kind of details that it talks about. Starting from the basics of creating projects, importing projects, to designing GUIs, Web projects, Mobile development, Profiling and Testing… It covers most parts of the IDE pretty well.

What it lacks is the depth of coverage. Like Maven and some of the options like skipping tests is a very useful feature in Netbeans is missing from the book. Or the WSDL Editor. Or Navigation features like Go To Implementation is missing!!

In conclusion I’d say the book is interesting for beginners and slightly boring for experienced Netbeans users. If you are preparing for Netbeans Certification, then this is a book you should read, but otherwise I feel the web documentation of Netbeans is good enough to find your way through… I’d rate this book 2.5/5

NetCAT 7.1 Bug Counting

Since, I have signed to NetCAT 7.1 (Community Acceptance Program), I wanted a quick way to see the number of bugs that I have filed compared to the other top 20, I’ve written a small script to go through bugzilla. The one that is on the page seems a little complex to look at and has lots of numbers to look at.

I’ve done this instead:

Beyond the bugs, there is also the email count… We will get to that later!!

Sunday, September 18, 2011

Speeding up Unit Tests by running them in parallel

I just discovered an interesting parameter in the maven-surefire-plugin when using JUnit 4.7+, that tests can be executed in parallel. With multi-threaded CPUs, OS and the like, this helps a lot when you want to decrease the time of your test suites.

So, what are the configurations options that you have:
  1. Running test methods in parallel:
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.9</version>
    <configuration>
    <parallel>methods</parallel>
    </configuration>
    </plugin>

  2. Running test classes in parallel:
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.9</version>
    <configuration>
    <parallel>classes</parallel>
    </configuration>
    </plugin>

There are some things to take care when running unit tests in parallel. Some of them might not be independent, isolated and reproducible. There are times when you have some test methods that might depend on other methods in the test class. That time you should use the parallel test class execution. You may also want to tweak the number of threads and core on which these threads run, using this configuration:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<parallel>methods</parallel>
<threadCount>4</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
</configuration>
</plugin>

Saturday, September 17, 2011

Sad state of Dell service centers, but loving my new SSD

I had received my new Intel 320 Series SSD nearly 2 weeks back, but have been struggling to find a way to fit it in my Dell Studio 1749 laptop. Struggling because the SSD didn’t ship with a laptop connector/caddy and Dell’s extremely bad service centers in Mumbai.

Even before I had my SSD, I looked through all the documentation on how to fit it in. I wanted to add the SSD to the second drive slot that is part of my laptop, but needed a caddy and L-shaped SATA connector. I had enquired the Dell customer care and they responded, they didn’t sell the stuff but should be available at the service centers in Mumbai. So as soon as the SSD arrived, I landed at the service center. But what stupidity on my part, to expect the dell service center engineers to know what I was going to talk about. One of the engineers bet with me that laptop’s can’t have two hard disks, another said I have to “burn some plastic” to fit it in. No one, out of the 7-odd engineers at the Dell service centers in Andheri or Mumbai Central had heard the word “caddy” in their lives!! (!!Damn Golf!!)

Nevertheless, after a couple of hours of trying to explain to these people, I had full faith on our lamington road fellows to have imported something from China. Sadly, it was just the regular “atta-chawal” (off-the-shelf stuff) that you can get at every computer shop around the city. Why would people come so far to lamington road, if they didn’t keep “not-so-common” parts?? Not that Dell has any small market in India… so the lamington road shopkeepers should have atleast heard or seen such a possibility… Nevermind, I realized from earlier that an eSATA cable for Seagate GoFlex Agent HDD (STAE103) is impossible to find in this market, forget my caddy!! After visiting over 30 shops and 5 laptop repair guys, I was convinced (… and even they were) that such a thing was impossible to find in India

So, I ordered online with priority shipping from the nice guys at newmodeUS. I say nice because I called them after ordering to clarify about the eSATA cable that I also purchased (already cut to work with Seagate GoFlex Open-mouthed smile) along with my caddy and they answered nicely. I couldn’t find anywhere in Norway that had these either!! Sad smile. It reached me in 2 days and I was happy again!!

DELL_1745_1747_caddy 2intel-ssd-320-series-small eSATA-GoFlex

Boot times from 35 sec to 19 sec; Shutdown from 15 sec to 6 sec. Netbeans starts in less than 7 sec compared to 25 sec. Overall amazing performance upgrade!!! The laptop even earlier was a performance beast with 8GB RAM, 500HDD, 4-thread, 3+Ghz i7 processor… but this speed boost is awesome!!

Wednesday, August 10, 2011

0-day already out to exploit yesterday’s IE bugs

If it wasn’t already known to Microsoft, I can confirm first hand that today I downloaded and played with available 0-day to exploit Internet seccenter-iconExplorer bugs in the wild. Microsoft has just released the patches to fix these exploits, but I was surprised to see that the exploits are available free for the world to use.

The exploits basically allows remote code execution from a website once visited through Internet Explorer. Once such a malicious page is visited, the hacker is able to take control of the machine and perform administrative operations, including but not limited to adding backdoors, steal information or make hacked computers act as bot to mass attack servers.

I will not disclose where the code is available to play with, but it is surely a warning for all Windows users to update their installation with the patches released yesterday. It is not just about your information, but your computers could be used to launch other attacks,

Details of the patches can be found here and here. Microsoft releases security patches on Tuesdays, but critical patches should be released asap!!

Monday, August 8, 2011

Maven dependency for tools.jar in JDK7

Although it has been known for sometime now that JDK7 will bring the change to vendor properties name change from “Sun Microsystems Inc.” to “Oracle Corporation”, I thought it would serve as a good reminder since Java 7 final was just released.

If you have a maven project that uses tools.jar and adds that as a dependency to the project as follows:

...
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
...

For making this work with JDK 7, you have to change the java.vendor value to Oracle Corporation like this:

...
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Oracle Corporation</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
...

Wednesday, March 9, 2011

WebGL & Hardware Acceleration in Different Browsers

There is a new race these days in the world of web browsers and it is how fast they can render graphics. As more and more people are trying to make web browsers as the rich media client, we see that hardware acceleration in browsers is getting the next point of race among the web browsers. If JavaScript benchmarking wasn’t enough, most new benchmarks these days are looking towards at WebGL (The JavaScript for 3D) and hardware acceleration in browsers.

There aren’t too many games out there yet, that use the WebGL extensions and so I believe this is another race from the browsers that isn’t about better user experience but more to win points in the benchmarks. Nevertheless, since the worst fairing browser IE9 has improved on the performance of WebGL and uses your computer’s graphics card to accelerate graphics in browsers, it is the every alternate browser’s moral responsibility of sorts to give you enhanced performance. This means that every other browser vendor will now tell you to update your graphics drivers, to prevent crashing of your browser and improve performance. While updating graphics drivers is not what the average computer user would do, the browser manufacturers will blame that crash on the graphics driver.

Here are some numbers comparing browsers in simple WebGL benchmark on a Windows 7 with Intel 2.5Ghz i5 and 4GB of RAM:

Browser (version/platform)

Frames per second (higher is better)

Firefox 3.6.15 6 FPS
Opera 11.01 14 FPS
Chrome 10.0.648.127 12 FPS
Firefox 4 Beta 12 60+ FPS

All browsers in the list are released stable versions, other than Firefox 4 which enables hardware acceleration only version 4 of their browser, but is still unreleased. Clearly, Firefox is very fast and possibly the ones who are running ahead in optimizations of WebGL. Nonetheless, other browsers (Opera 11.50, Chrome 11 and IE9) are also competitively close. I wanted to highlight really how fast things can get with some hardware acceleration.

Monday, March 7, 2011

Socio-materiality: Creating words for the heck of it

While last week, I was in NTNU, Trondheim for a friend’s PhD defense, I decided to stay back and listen to a seminar on “Socio-materiality”. The “jargon monoxide” (super lol!!) to describe that technology, work and organization cannot be viewed separately. We’ve definitely heard that human & non-humans are an assemblage and cannot be looked at separately... and I completely agree that academics deserve ridicule, when they do such things!!

Nonetheless, after the seminar I couldn’t believe that the whole 3hrs, we repeatedly kept hearing that technology changes social behavior and that in turns shapes technology and there is a case of “entanglement” that makes the social/human and material/technology to be only looked at as a single object. The cases were interesting (especially the case of Gartner and their Magic Quadrants) and in each of the case we see the entanglement and mutual shaping. What I still don’t understand is that why we didn’t have an uproar from the audience (… and those much more interested in the concept than me) to this jargon monoxide!!

As researchers we continuously look at ways in which we understand the things around us. Language is one to interpret, understand and communicate the different interpretations inside our head. My father shouts out while I’m writing this, “Research is only searching again and again, what already exists and is probably already known”. If that were true, then jargon monoxide is the basis of research… We create new jargons and retire old ones!! Is that our primary job??

Saturday, March 5, 2011

Apple wants 17+ yrs old only to use Opera

In another of Apple crazy works at the App Store, Apple does not allow users under the age of 17 yrs to download Opera. Opera is the first Operanon-Apple web browser to be made available at the App Store, but with that crazy restriction. Now Opera, just like Safari opens web pages. It actually does it better depending on which benchmark you are looking at.

Opera reacted in the following manner:

“I’m very concerned,” says Standal. “Seventeen is very young, and I am not sure if, at that age, people are ready to use such an application. It’s very fast, you know, and it has a lot of features. I think the download requirement should be at least 18.”

For those under 17, there is a workaround. Just visit www.opera.com and download it. We do not ask for your age or your credit card number. Please, get your parents’ permission before using this browser

Opera does have a sense of humor Smile with tongue out

iPad 2 : Something about Apple just fascinates people

Why do people get fascinated with Apple products? I’ve always wondered… Is it really that Apple products are so much better than what’simage available in the market? They had the iPod, the iMac, the iPhone and the iPad (…to name some) and gave them cult status. Now with the iPad 2, I see the same fascination in people in response to the launch and the ads.

The iPad 2 really isn’t the best in terms of hardware packed into the device. Motorola Xoom/Samsung Galaxy Tab 10.1 has the camera on both front and back better than the iPad 2. Battery life and processors are equally competitive. The ecology around Android is really awesome and growing rapidly. The iPad 2 is thinner, but wasn’t the iPad already thin?? The iPad 2 doesn’t have USB. It does not run flash. It will use proprietary formats for connecting to other devices. It does not have an SD card reader. So why are people still fascinated with the Apple iPad 2?

One thing is how Apple sells you the stuff... The ads make an emotional connection with you. The people who tell you things in the Apple ads, just like Steve Jobs speaks at the launch of these devices, make you feel fascinated. The “cool-ness” of Apple devices are another fascination. The external design and look-and-feel of Apple products are these days probably similar to other high-end devices, but the overall experience of the Apple software in my opinion is the biggest difference. How many times on the iOS have you seen a “Force Close” dialog, that an Android device would often throw? How many times do you feel an interface element to be out of place, when using an Android device?

I write this as I’ve just finished playing with a friend’s Motorola Xoom while at the library. I’ve tried the Galaxy tab, the iPad, but none of them are “Post PC” as Jobs describes it at the moment. Somebody nicely said, its an Apple vs Oranges comparison. You choose the fruit you like… I don’t like both yet!!

Saturday, January 8, 2011

The Mirage of Mobile Number Portability

Just like a thirsty traveller in a desert follows the mirage thinking that its water, Indian mobile subscribers have been waiting for mobile number portability for long. Little do they know that when mobile portability actually arrives, it’ll only be a mirage of what they hope for!! Mobile Number Portability is the ability for a subscriber to carry their mobile phone numbers and switch operators. Thus, by just paying a small fees of Rs. 19/- you would be able to change your mobile operator and still keep your same phone number.

Mobile Number Portability (MNP) exists in a lot of countries. Basically in most of these places, mobile numbers are considered as assets or belongings of an individual, similar to your house address. In India, it is being advertised by operators as an opportunity for customers to move to a ‘better’ operator, when you are dissatisfied with your current operator… and this is exactly why I say it’s a mirage!

Every operator has some number of customers who don’t like their service. From most people I have talked to, every operator has this group of dissatisfied customers. But since anyone who was dissatisfied would previously just change their phone numbers, it wasn’t a big deal for these customers… They are so fed up with the operators that they have already moved to the next operator. On the other hand, people who cannot change their phone numbers because the phone number is really important for them, generally adjust with the operator and the ecosystem balances itself naturally like any mature market does. What Mobile Number Portability is not doing is changing the infrastructure or the technology deployed by the operators. It does not change the policies, tariffs or customer service of the mobile operator. For a sector which is somewhat saturated in a lot of circles, it really is not much of a change agent.

If the reports from the pilot in Haryana is anything to go about, there really hasn’t been a large change in the customer base and market shares of the mobile operators. Other than Idea, most operators have not advertised a lot about MNP. Most operators are following a wait and watch policy and not many want to be first-movers in grabbing customers from others. Its been over a month for MNP in Haryana and that should have been enough to see the change factors because of MNP. But the lack lustre effects of MNP have shown that it is something that the market and the customers are not enthusiastic about. May be in other circles the market might be more dynamic, but we’ll only know when the nation-wide launch happens on 20th Jan, 2011. It will be interesting days to see how the different telecom circles work their way in the post-MNP era.

I think of the mobile operators today like politicians. Everyone is dissatisfied with politicians. There is always something to complain about them. Still you expect everyone should be voting and democracy should run smoothly.

Thursday, January 6, 2011

Apple’s Magic Mouse and now Microsoft’s Touch Mouse

Apple was the company that made the GUI and the use of the mouse popular back in the old days. But ever since, Apple hasn’t been the best designers of the mouse and Apple has been often been criticized for not being able to make ergonomic pointing devices. Apple has tried numerous times to redefine the mouse with different shapes, design, button positions over the years, but the simple two/three button with scroll mouse has nearly been the market favorite including those who swear by Apple devices.

Last year Apple came out with what was another attempt to redesign the mouse. They called it the Magic Mouse. It was a failure at ergonomics and not many people loved it. Today at CES 2011, Microsoft Research presented what it hopes to be Mouse 2.0. It is a mouse without buttons, similar to a laptop trackpad. It does not have scroll or buttons and works based on the touch of the fingers. Thus you can swipe your fingers, perform pinch and zoom gestures etc. on the mouse surface. "One finger lets people manage individual documents or pages by flicking to quickly scroll, pan and tilt, and one thumb lets people move back or forward through a Web browser. Two fingers manage windows, letting people maximise, minimise, snap and restore them. Three fingers let people navigate their whole desktop, showing instant viewer or clearing their desktop."

apple-mouse ms-mouse

Apple’s Mighty Mouse

Microsoft’s Touch Mouse

I am of the opinion that both the mice do not have what it takes to be called a revolution. There is already an installed base of users who are used to the two buttons and scroll and will not see any real benefit to move to these new gadgets. These do not have special features that are extremely important to computer users. If you have a laptop, you already have the trackpad do it for you.