Friday, September 16, 2011

Good day for Developers

It seems that today is a very good day for Developers!
On one hand, Google, launched its APIs for the Google+ platform here.
On the other, Windows is offering a free download of its' latest Win8 build here.
Hmmm ... decision, decisions, time crunch!

Tuesday, September 13, 2011

State of Mobile OSes

What with Android, webOS, MeeGo, bada, WinMo7 in the race to become stable and the de-facto standard after iOS, things don't look very good for end-users. QuiksMode blog has a very nice entry summarizing the current fragmented & cloudy (pun intended) state of affairs for mobile OSes here. From this report - it seems that Apple may continue to be the winner unless webOS or MeeGo manage to turn the tables around.

Happy Programmers' Day!

Today is 13th September - the 256th day of the year. The number 256 holds a special place in the eyes of (most) programmers as it is the highest value that can be represented with a byte: 2^8 or 0b11111111. Since this is the highest integer less than 365 (days in a year) that can be represented with powers of 2, this is celebrated as Programmers' Day. Read more on the history of Programmers' Day at Wikipedia.
Sadly - Google does not have any Doodles for this on their home page even though they are a very techie company.

Sunday, September 11, 2011

Better Blogger Interface

Blogger is working on a vastly improved interface and I got a preview of it recently.
The new interface is really nice and am hoping it will become the standard interface soon.

HomeBrew on HP TouchPad

On HP TouchPad, side loading of apps - referred to as HomeBrew - is very simple and consists of a few simple steps! No complicated rooting, jail-breaking or difficult procedures as all. As detailed in this site, the steps are as follows:
  1. Enable "Developer Mode" by typing webos20090606 in the "Just Type" box at the top of the home screen and enabling it
  2. Download webOS Quick Install (WOSQI) developed by Jason Robitaille from here and install it on your computer.
  3. Connect TP to this computer and click on close when prompted to enable USB Drive mode
  4. Launch WOSQI on the computer and click on the globe like button on the right to install the Package Browser/Installer (note that it may take some time to load all the feeds and you may be prompted to load drivers from NovaCom - this is ok)
  5. Launch Preware from Downloads and read through the notices - you can safely skim to the end
  6. Search for and then Install the following patches to improve performance of your TP - note that you can restart after you have installed all these apps instead of once each time each app is installed:
    1. Unset CFQ IO Scheduler
    2. Muffle System Logging
    3. Remove Dropped Packet Logging
    4. Unthrottle Download Manager
    5. Quiet powerd Messages
    6. Faster Card Animations HYPER Version
  7.  Reduce logging level - you can safely ignore the warnings that pop-up:
    1. Open the Phone application and dial ##5647# followed by the green send button to open the logging menu
    2. Clear the existing logs
    3. Set logging level to minimal
    4. You can also delete the trace/dump file from the menu on the top left
All of this took me only 15 minutes from beginning till very end!
Hopefully after reducing logging levels and speeding up the card animations, performance on TP should be vastly better.

Note that for reducing logging level, you do not need to pair to a phone or setup a phone application. Just open the included Phone app and select your own webOs account.

      Thursday, August 18, 2011

      Track your Phone / Laptop using Prey

      Now you can track your stolen laptop / phone (but not iPhone yet) for free using an open source software called Prey. It is a very small & lightweight software that can be installed on your Mac, Windows, Linux or Ubuntu Laptop or your Android smart Phone. Set it up and then you can wake it up in case your device is (God forbid) stolen. There are paid Pro version too for those who want a greater feature set and active monitoring.
      This was recently used by self professed Info Sec Evangelist Greg Martin to track his stolen MacBook in the aftermath of the London riots.

      Tuesday, August 2, 2011

      Java 7 Summary of New Features

      Here is a summary of the new features released in Java 7 as part of Project Coin language enhancements are:
      1. Improved Numeric Literals - Binary integral literals and Underscore in numeric literals
      2. Strings in switch
      3. Diamond operator or simpler type inference for generic instance creation
      4. try-with resource statement
      5. Multi-catch and more precise throw
      6. Simplified varargs method invocation
      7. Fork & Join enhancements
      8. NIO 2.0 & File system access enhancements
      These are explained in detail below.

      Improved Numeric Literals
      Integral types (byte, short, int, and long) can also be expressed using the binary number system by prefixing "0b" or "0B" to the number's binary representation as:
      int binaryLiteral = 0b110011

      You can have underscores in numeric literals to make them more readable like:
      int tenMillion = 10_000_000;

      Strings in switch
      Till Java6, only numbers or enums could be used in switch statements. Now strings are also allowed:
      String switchString = getStringValue();
      switch(switchString) {
          case "foo": doFoo();
                      break;
          case "bar": doBar();
                      break;
          case "fuu": doFuu();
                      break;
          default: doDefault();
                   break;
      }
      
      Diamond operator
      This is a short cut to reduce typing and make it simpler to infer generic types during instance creation
      Map<String, List<Pair<String,BigDecimal>> myMap = new HashMap<>();

      Simplified varargs method invocation
      When a programmer tries to invoke a *varargs* (variable arity) method with a non-reifiable varargs type, the compiler currently generates an "unsafe operation" warning. This proposal moves the warning from the call site to the method declaration. This merits more detailed explanation and a separate post.

      Multi-catch and more precise throw
      Now you can catch multiple exceptions in the same catch clause and also re-throw final exceptions without declaring the method with the "throws" clause.  More Precise Rethrow allows you to catch a high level exception instead of each possible exception, but when you re-throw this caught exception, the correct sub-class is thrown instead of the higher level exception. This merits more detailed explanation and a separate post.


      Fork & Join threading enhancements
      New Fork / Join framework as an implementation of the ExecutorService to help take advantage of mulit-core / multi-processor machines.


      NIO 2.0 & File system access enhancements
      NIO 2.0 & File system related changes make it easier for traversing file system trees and access file properties.
      There are numerous changes and these could be a good candidate for a separate book in itself.


      Check out the Summary of Java 5 features that are also hold good and are very useful.

      Java Diamond "<>" operator

      As part of Project Coin - Language enhancements, Java 7 has introduced the Diamond operator "<>".
      In reality, this is just a short cut for a simpler type inference for generic instance creation.
      So instead of this:

      List<String> stringList = new ArrayList>String>();

      one can use this in Java7:
      List<String> stringList = new ArrayList<>();

      So you say "big deal"?! The real benefits show when the type being inferred is very complicated and has multiple types nested in it like:
      Map<String, List<Pair<String,BigDecimal>> myMap = new HashMap<>();

      You are saved from repeating the same thing - less typing and less errors!

      Friday, July 29, 2011

      Eclipse support for Java7

      Good news for Eclipse users is that all new builds of Eclipse 3.7.1, 3.8 and 4.2 will now fully support Java 7.
      Earlier development of Java7 support in Eclipse was being done in BETA_JAVA7 branch which now has been fully merged into the HEAD and the R3_7_maintenance branch.


      So the implication is that if you want Java7 support, you need to move to the latest builds of Eclipse Indigo (3.7.x) or higher. Cannot use Eclipse Helios (3.6.x) or even the initial versions of Indigo as the older JDT & Core packages do not understand the new Java7 features as Eclipse uses its own compiler and the ones built into older versions of Eclipse do not support Java 7. Also, as noted in the Project Plan For Eclipse Project, version Helios, support for Java 7 is deferred and decoupled from the 3.6 release since Java 7 release will be after the official release of 3.7.

      Note that you will need to download a 3.7 maintenance build (>= M20110729-1400), a 3.8 build (>= I20110729-1200), a 4.1 maintenance build (coming soon) or a recent 4.2 build (>= I20110729-0200) to get Java7 support in Eclipse.

      Java 7 GA release finally available

      Java 7 was finally release into the wild today and made "GA" - Generally Available!
      Download the latest from here.
      Here's a very high level list of the new features/changes that made into Java7:

      VM
      • Support for dynamically-typed languages using the new InvokeDynamic instructions
      • Strict class-file checking

      Language
      • Small language enhancements from Project Coin like Strings in switch statements, try-with-resources statements, diamond operator, etc.

      Core
      • Upgrade class-loader architecture to avoid deadlocks in non-hierarchical class-loader topologies
      • Concurrency and collections updates in form of a lightweight fork/join framework, flexible and reusable synchronization barriers, transfer queues, concurrent linked double-ended queues, and thread-local pseudo-random number generators

      Internationalization
      • Support for Unicode 6.0
      • Separate handling of locales to separate formatting locales from user-interface language locales

      I/O & Networking
      • New APIs for filesystem access, scalable asynchronous I/O operations, etc
      • New NIO.2 filesystem provider for zip and jar files
      • API for the Stream Control Transmission Protocol (SCTP) on Solaris
      • SDP (Sockets Direct Protocol) support for reliable, high-performance network streams over Infiniband connections on Solaris and Linux
      • Networking code modified to use the Windows Vista IPv6 stack, when available, in preference to the legacy Windows stack
      • Support for Transport Layer Security version 1.2

      Security & Cryptograpphy
      • Implementation of the standard Elliptic Curve Cryptographic (ECC) algorithms to allow Java programs to support it out of the box

      Database Connectivity
      • JDBC 4.1 and Rowset 1.1

      Client
      • New Java2D graphics pipeline based upon the X11 XRender extension, which provides access to much of the functionality of modern GPUs
      • New platform APIs for features originally implemented in the 6u10 release namely Translucent and shaped windows, and heavyweight/lightweight component mixing
      • Cross-platform Nimbus look-and-feel for Swing
      • SwingLabs JXLayer component decorator added to the platform
      • New Gervill sound synthesizer created and made available

      Web
      • Upgrade of the components of the XML stack to the most recent stable versions: JAXP 1.4, JAXB 2.2a, and JAX-WS 2.2

      Management
      • Enhanced MBeans to report the recent CPU load of the whole system, the CPU load of the JVM process, and to send JMX notifications when GC events occur 

      Pheww - that was a long list to say the least ;) No wonder the release date for Java7 was a very difficult moving target.
      I will be putting out a detailed post on each of the features soon - so keep watching this space!

      LinkWithin

      Related Posts Plugin for WordPress, Blogger...