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