The Great Indian Developer Summit (GIDS) 2012

Exactly 4 years ago I had attended the first Great Indian Developer Summit ever. And I was glad I had the opportunity again this year and this time, I had my colleagues for company. We had chosen the last 2 days of the summit, which includes the JAVA day and workshop day. The venue, IISc campus was well suited for a conference of this stature, my other favorite being the Foss.in events held here in the past.

Gids Main Hall

Keeping with the tradition of GIDS, the organizers Saltmarch Media, planned the event very well keeping the sessions as independent as possible. Which means you will be less torn for not having attended the ‘other ‘ session happening in other halls at the same time.

The Java day was kicked off by Venkat Subramaniam giving a session on ‘Refactor your Language Portfolio’.  His sessions had maximum attendance, and it was observed from the twitter feed that many were keen on following him for his different sessions around the campus; his passion for languages is contagious, he has so much inspiration to appeal to your geek self. We had sneak peeks into Java7/8. Notable observation was the return of functional programming concepts. Eg:- Clojure, scala and use of lambda expressions. His session on Concurrency was also a big hit.

The other favorite speaker for all was the ever enthusiastic Scott Davis. Sharing his profound knowledge of Javascript and CSS and largely the HTML5 as a web development platform. His notable workshop session was the ‘Airplane-Mode HTML5 – Making Your Website Mobile-ready.

There was also a hands on jQuery AJAX  workshop by Lakshmi Sri and Veena Bhatt, where a sample project was shared and we were asked to work upon it. I have shared the same here.

My colleagues Sundarmoorthi , Arun Ravi, Nagaraj , Ajay and Prabhat each one Toughtworks T-shirts after solving the Bubble sort algorithm challenge in their stall.

There was also an Interesting Session from GoldmanSachs VicePresident (Yes, a VP who still codes) – GS Colelctions , a collections framework for Java. It has JDK-compatible List, Set and Map implementations with a rich API and set of utility classes that work with any JDK compatible Collections, Arrays, Maps or Strings. More details here.

On the last day, I had a chance to attend the hands on workshop on Blackberry’s Webworks API. There was an introductory session for developing in HTML5 with Webworks API. We were provided with the SDK kit for blackberry devices in a Pen drive along with a Simulator installation file for Blackberry. There were tasks provided wherein we had to enhance existing sample applications to add new features. It was a daylong hands on session where lot of emphasis was laid on the future of blackberry platform and its internals. The whole workshop was targeted towards the developer community to attract them to explore the API further. In the tablet space, the only way to succeed is to have as much apps submitted to the Blackberry world ( Seeing the Android and iPad success). As a result we were all provided with a Blackberry Playbook tablet to take our interests further,  which was the most pleasant surprise of the day :)

For the two days I had also taken active part in tweeting about the event. On the first day I won a technical book (SAS programming) for my tweets and contributing to their picture gallery. On the last day I won the best tweet award and took home an executive golf kit. The winning tweet was :

Trivia of the day! In Dutch gids means ‘Guide’. How appropriate for what’s happened in the last 4 days.

The whole expo was an enriching experience, listening to various experts in the tech world along with networking with your peers.

Looking forward to GIDS 2013 already.

Setup Tata Photon (+) Plus on Ubuntu.

When you attach the tata photon+ dongle, you might notice that this was identified as a mass storage device instead of a usb modem.
Well, the reason for this is explained in this blog post here.

Several new USB devices have their proprietary Windows drivers onboard, especially WAN dongles. When plugged in for the first time, they act like a flash storage and start installing the driver from there. If the driver is already installed, the storage device vanishes and a new device, such as an USB modem, shows up. This is called the “ZeroCD” feature.

On Debian, this is not needed, since the driver is included as a Linux kernel module, such as “usbserial”. However, the device still shows up as “usb-storage” by default. usb-modeswitch solves that issue by sending the command which actually performs the switching of the device from “usb-storage” to “usbserial”.

Make sure you have installed these two packages.
usb-modeswitch-data
usb-modeswitch

Now run the following commands.

cd /etc/usb_modeswitch.d
sudo touch 12d1\:1505

Now copy the contents below to the newly created file 12d1\:1505

DefaultVendor= 0x12d1
DefaultProduct=0×1505

TargetVendor= 0x12d1
TargetProduct= 0x140b

MessageContent=”55534243123456780000000000000011062000000100000000000000000000″
CheckSuccess=20

Type ‘sudo usb_modeswitch -I -W -c 12d1:1505′ (You may have to run this every time you connect and disconnect the modem)

Now, once open the network manager you can add the new device identified as tata huawei modem
use the username and password as ‘internet’

Source

 

Ubuntu: Fix for Picasa missing titlebar on fullscreen.

On Ubuntu you may have noticed that when running Picasa in fullscreen mode and returning you would notice the titlebar will be missing on the picasa. Normally this can be fixed after closing and re-opening picasa again.

But there’s a simple fix for that, Simply Unmaximize picasa. This can be done by right clicking on the titlebar and choosing Unmaximize. Resize picasa manually to fit your screen and you will not loose your title bar again.

Ubuntu : Fix for Firefox to download picasa albums

There is a simple guide to install the latest picasa 3.8 (as of this writing) in Ubuntu as shown in this post..

However, I have noticed that, atleast in Ubuntu 11.04, that the “Download to Picasa” option doesnot work under Firefox. We would get the popup message as shown below.

Which says “Firefox doesn’t know how to open this address, because the protocol (picasa) isn’t associated with any program.”

Most searches resulted in the following solution:
Open firefox tab and type about:config
set network.protocol-handler.expose.picasa to false
set network.protocol-handler.external.picasa to true
set network.protocol-handler.app.picasa to either /usr/bin/picasa or /opt/picasa/bin/picasa (/usr/bin/picasa is a symlink to /opt/xxx)

If the above doesn’t work for you then try the method which was mentioned in this post. It was originally meant as a fix for chrome, but works fine with firefox too.

Open the file ~/.local/share/applications/mimeapps.list (remember to back it up) and add the following under [Added Associations]

x-scheme-handler/picasa=picasa.desktop

Thats it. Now choose “Download to Picasa”, you will get a popup to choose the picasa application, here browse until the location of the picasa binary. /opt/google/picasa/3.0/bin/picasa in my case

Netgear wireless adapter WG111v3 driver for Windows 2003

For some odd reason, the netgear wireless usb adapter WG111v3′s driver does not install under Windows 2003. And the experts reason this being a “server”, so it should not have wireless feature!!

A little search online lead me to this post, which provides a workaround to use the the driver installed on an Windows XP machine and to use the same under the Win2k3 machine.

The solution stated is as below.

1. install the Netgear WG111v3 USB Wireless to a WinXP Workstation
2. Verify that it fully works and connect to your WLAN
3. Open Windows Explorer and Go to <%WINDIR%>\Inf\WG111v3
4. Open the file called SetDrv.ini with Notepad and take note of the value of the field called ‘FileName’. You will need this file and corresponding PNF file
5. Copy the entire contents of WG111v3 and the file SetDrv.ini is pointing to and its corresponding PNF file to a flash drive.
6. Also copy the entire folder called WG111v3 under c:\Program Files\NETGEAR to your flash drive

SERVER SIDE
7. Install the driver again this time to your Win 2K3 Server until the point where it fails.
8. Copy the two files that SetDrv.ini was pointing to the folder in your server called <%WINDIR%>\Inf
9. Copy the two WG111v3 folders on their corresponding folders on your server
10. Open Device Manager and attempt to re-install the driver and point to a specific location (<%WINDIR%>\Inf). At this point the device should start to work.

Ubuntu: VMware and mount.ntfs high cpu usage fix

If we run VMWare player on Ubuntu to run guest OS, and if the virtual machine files are stored in a NTFS partition (like a large External HDD), then chances are that you would notice mount.ntfs taking up almost 100% cpu usage once the Vmware’s Image is started. This will most certainly leave your system unusable until you are able to get the vmware down.

The old remedy of changing the .vmx file and adding mainMem.useNamedFile = "FALSE" does not work any more. As per this post, the solution is to provide a non-ntfs location for storing the vmware suspend and snapshot files as a working directory. The same can be edited in the vmplayer’s option screen as shown below or added as a line in the .vmx file as workingDir = “../../../opt/vmware”

Ensure the directory provided has write permissions for the user configured to run the vm.

Python error in strftime ValueError: Invalid format string

Using python 2.7.1 interpreter on windows with the below format of string using strftime will lead to this error “ValueError: Invalid format string”

eg:- strftime(“%a %b %02d %H:%M:%S %Y”, self.gmt) will work fine on Unix machines but to make it work on windows you have to change it to this.

strftime(“%a %b %d %H:%M:%S %Y”, self.gmt) i.e remove the 02 from %d

Ubuntu : Convert video for Nokia Mobiles in MP4 format

Most Nokia handsets feature symbian s60 platform v9.0 and upwards. Natively they have option to record and play MP4 files with MPEG-4 part 2, which is h.263. Higher end Nokia mobiles like N8 will support mp4 files with MPEG-4 part 10 H264 codec. This means that most videos you find on the internet viz. youtube will play on these devices.

However for little older models like Nokia e63 ,71,e72,5800 mp4 files with MPEG-4 part 2 (h.263) codec are only supported.

To convert media files to be played nokia mobile phones Use Handbrake, a GUI tool to convert media files to be used for Apple products like iPod, iPhone and the iPad.This is an cross platform tool that works on Mac, Linux and Windows.

 

Launch handbrake, and choose Normal preset shown on the right of the screen.

Container: MP4

Video Tab:
Video Codec: MPEG-4 (FFmpeg)
FrameRate: Same as Source
Avg Bitrate: 240 or 320 (Depending on the quality you want, for small screens such as e63,
a 240 kbps bitrate looked fine.
Audio Tab:
Audio Codec: AAC
Mixdown: Stereo
Bitrate: 96
Subtitles: Add subtitles if any.

Picture Settings:
Anamorphic: Off
Size: Choose 320 as the width , select keep aspect ratio so the correct height is selected.
Generally its 320×240 or 320×176

Save the preset and give it a name like ‘nokia mp4′.

To encode video files for Nokia mobile phones the best option in Ubuntu is by Far Handbrake. Although you can compose few scripts using mencoder to encode video files, but still the best transcoder for movie files is still Handbrake.

For more info on MPEG-4 codecs check this post here.

Ubuntu 11.04 : Uninstall Gnome3 and revert to Gnome 2.x

Ubuntu 12.04 Update:

In the latest Ubuntu Precise Pangolin 12.04 LTS, the classic option is back. All you need to do is install gnome-panel like this.

sudo apt-get install gnome-panel

Logoff and choose classic from login screen. A Note: It is still believed to be in work in progress, not 100% ready yet I believe.

Ubuntu 11.10 Update :

If you are coming here to revert or remove gnome3 or unity from the latest Ubuntu 11.10, then the original solution in this page (found below) is not for you. To get a gnome classic like(not exactly gnome2) experience in Ubuntu 11.10, you would have to install the gnome fallback session as shown below. This infact is a fallback of the gnome3 shell.

sudo apt-get install gnome-session-fallback

Logoff and choose gnome classic from LDM. Also to add applets in Oneiric Ocelot, you would have to do a Alt + Right Click on the panel instead of simple Right Click as it was in Gnome2 (God how I miss it).

A little more detailed info to give gnome3 a ‘classic’ look and feel is provided in this post

For Ubuntu 11.04 users to recover from a broken desktop post installation of gnome3, the solution is given below.

If you installed gnome 3 from ppa:gnome3-team/gnome3, it disables or breaks all other desktop logins be it Ubuntu Classic or Ubuntu default (Unity as in case of Natty). For a sec, I panicked as I use a shared computer, and trust me gnome3 is not yet ready for a newbie user. Although, I was surprised to note that removing gnome3 did prove tricky. However thanks to this post It was a simple task.

Follow the below steps to remove gnome 3 and revert to Gnome 2.x.

sudo apt-get remove libgtk-3-common
sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3
sudo apt-get install gnome-panel

Reboot and you should be back to good old classic gnome. In case you don’t find gnome back again. try this.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop
sudo apt-get install gnome

I would try to lookup a post which allows us use gnome 2.x and 3.x together. If there is a choice I would always go for gnome3 > Unity.

Update 1:
Linus Torvalds hates Gnome 3, calls it a unholy mess!! http://www.theregister.co.uk/2011/08/05/linus_slams_gnome_three/

Also he had demanded that there be a fork for gnome2, and this one looks like one of them.

Update 2:
omgubuntu.co.uk (OMG! Ubuntu) has confirmed that development for Gnome2 fork ‘Mate’ is underway. http://www.omgubuntu.co.uk/2011/08/gnome-2-forked/

Update 3:
The Mate(gnome2 fork) is installable in Ubuntu 11.10/12.04, the instructions are given in this article here.

Update 4.

Another suitable alternate to Unity/Gnome3 classic for 11.10/12.04 is Cinnamon. I am currently evaluating it. For instructions to install check this article.

Oh and another alternative is to try LXDE

sudo apt-get install lxde

 

Ubuntu : Automatically receive files over bluetooth

In Ubuntu 10.10 maverick meerkat, the default setup of bluetooth would not allow you to automatically receive files over bluetooth. For every file(s) transferred you have to manually accept the request. This gets annoying when you have to send multiple files sitting away from your System.

This can be fixed. Goto System->Preferences->Bluetooth as shown below.

Click on Receive Files. Most probably you might see the error mentioned below.

Cannot start "Personal File Sharing" Preferences
Please verify that the "Personal File Sharing" program is correctly installed

To fix this install the following program .

user@computer:$ sudo apt-get install gnome-user-share

Now when you click the Receive Files from the bluetooth preferences dialog. The following screen appears.

Make the settings as shown in the image. Restart bluetooth service and henceforth your system will accept files without confirmation from your bluetooth enabled mobile device.