30 June 2013

Ubuntu Fail

Recently I tried to switch permanently to Ubuntu, the logic was that I mainly do 3 things on my laptop: internet browsing, coding and watching movies/videos on VLC and none of them require Windows, so switching to the Ubuntu made sense, also it has got some tools which I wanted to learn, e.g. octave. I didn't want to loose my Windows 8 installation and wanted to install Ubuntu 12.04 LTS parallel to W8. Earlier attempt of installing Ubuntu failed due to a lot of EFI related issues.

Ubuntu 12.04

Installation was smooth and I was able to get the grub screen, which displayed a number of options to choose from. I logged into Ubuntu. The familiar Unity interface came up, which I did not like so I went ahead and installed GNOME. But it ran in fallback mode due to graphics driver issues. My laptop has hybrid graphics: ATI with + Intel 4000 . I looked on the web for the drivers but found nothing, Intel stopped developing a graphics driver for 12.04 due to some dependency issues but there was a driver for 12.10.

Another issue which I faced due to the lack of the graphics drivers was the pixelated video play in VLC. So I thought of upgrading from 12.04 to 12.10.

Ubuntu 12.10

After upgradation was done, I could not get the grub, it got screwed somehow. I got a blank screen, nothing else. I ran the live cd and did a boot repair. It restored the grub, but when I selected the linux option in the grub and hit Enter, a blank screen appeared and kept appearing until I switched of the system. I tried recovery mode, which logged me into the command line mode. There was a message which said I could upgrade to 13.04 from 12.10. Having known that Intel has provided a good support for 13.04 I decided to upgrade.

Ubuntu 13.04

Again I had to run boot repair to fix the grub issues, even after that I was not able to log in, the blank screen didn't go away no matter what I did. This time I thought of installing 13.04 from scratch, a fresh installation. Everything went smooth and I was able to login. After using about half an hour I noticed a weird issue of my mouse pointer moving a little out of place, the motion was not precise. It seemed to be a driver issue for Synaptics touchpad. A latest driver for Synaptics was already installed. I tried tweaking Synaptics settings, but nothing noticeable happened. And this issue was affecting my whole experience, I was not able to open links I intended to open, I was not able to close windows etc. It was worse than that graphics issue I had in 12.04.

So I went back to 12.04 and this time I installed Xubuntu desktop. It worked ok for some time until one day, I had to connect my laptop to a projector. Due to no graphics driver only one display was supported, I selected monitor option and my laptop screen went blank. When the job was done, I disconnected the projector hoping my laptop screen will lit up, it remained blank.

Xubuntu-desktop had another issue, the fan would start spinning at full speed after waking the laptop from suspension. I tried a patch which I found on the net, it did not help.

Linux Mint 15

Finally I thought of giving Mint a try, since it came with a lot of pre-installed software and drivers. Installed it after wiping the previous 12.04 installation. When I tried to boot I got a grub rescue screen, I tried many things to restore grub but failed all the time. Now I was not able to boot into any of the systems, neither Windows 8 nor Mint 15. I gave up, removed grub and booted into W8 and formatted the Mint partition. Now I have decided to run linux on top Windows; in VrtualBox.

Final Thoughts

Ubuntu 13.04 with GNOME has better looks than Windows 8 but when it comes to hardware support, many h/w companies don't care about this market segment (linux). GRUB is another rotten area in the Linux territory, if you are damn lucky then only it might work. Linux guys need to work together to create a better alternative to GRUB. Finally I still hope that one day I'll be able to make a permanent switch to Ubuntu or any other popular distribution.

27 June 2013

Angelhack 2013 Bangalore Experience

Angelhack 2013 was held at Microsoft Research/Microsoft Accelerator for Azure Office at Lavelle Road, Bangalore. We were given 23 hours to code/hack, from 2PM June 22nd till 1PM next day. Me and my partner divided the work and started to code. Soon we realized that there were issues with wi-fi connectivity at the venue, there was no internet for a long time and we were expected to code/hack without internet. After a couple of hours when technician could not sort out the issue, we were given a generic wifi access, which was slow to the death, occasionally inaccessible. For important things I relied on my mobile data connection, many had USB modem, this situation did not improve at all.

Organizers were happy to help/instruct.
Facilities were good, probably the best I've seen in an IT office.

I slept around 3AM after a 2nd git commit. Some did not sleep. I woke up around 6:30AM. We resumed our work around 7AM

Demo Time

Demo session started somewhere around 2:30PM, each team was given 2 Minutes for presentation + 1 Minute for QnA from judges. We'd prepared a video of whatever we could finish, it was not even half backed, just featuring some HTML mockups and FB integration.

Judging (Only reason behind this post)

Initially when the judges were ROFLing and making fun of the ideas and passing stupid comments, I was forced to think that these people really knew what they were talking about. But when a team presented an idea of querying the data by typing the human readable questions in a text field, one judge (the dominating one!) started to compare it with Wolfram Alpha, and went on saying that Wolfram Alpha was not present in Indian market, but when they come, your app wouldn't stand a chance.

Another team presented an app based on some medical data, it could tell you what disease you might have based on your symptoms. One Judge suggested him to participate in a kaggle competition "The Heritage Health Prize" . BTW that event ended in April 2013, it may re-start this year sometime, but no announcement has been made yet about the dates.

When we presented an idea about a generic platform for peer to peer learning, the judges responded with "many tried it and failed".

One guy presented an app which created cinemagram of a video, he explained how it worked and claimed that it was faster than the apps present in the market. When judges asked why it was faster, he simply said that he didn't know. Guess what? he won the hackathon.

Finding out that something like cinemagram already exists was just a google search away, in fact there is a company named cinemagram which has got apps on both Android as well as iOS app stores. And when you search cinemagram on Play Store you get more that 60 apps.

Why am I pissed?

My hackathon partner has a startup and he told me that he'd met most of these judges at least once for pitching his product. They are well known in India's VC circle, kind of celebrities in startup world in Bangalore.

This is what upsets me, at an event like hackathon we don't need celebrity judges, who can only focus on India when the event clearly wasn't about India. These people have a certain mindset, for example "this has failed before and would fail again" or "this already exists" or the ignorance about what has been happening around the world, like this cinemagram concept. Judges had great knowledge about Indian market and showed complete ignorance about outside world. Imagine about the people who seek funding from these ignorant people. Lots of great ideas may be dying everyday.

Now I am a bit concerned, because I'd be launching my startup in near future, and if the whole Indian industry is filled with such idiot VCs, I am going to face some really hard time.

25 June 2013

Extracting (meaningful) text from webpages - II

I was looking at the Readability Java clone snacktory to replace the very slow boilerpipe lib in my project, snacktory seemed faster but did not produce better results than boilerpipe. For example for the following url: http://alumniconnect.wordpress.com/2013/06/04/a-monk-who-didnt-care-for-ferrari-teaching-to-serve-society/ snacktory extracted just a small paragraph, about 25% of the whole text.
I forked the project and tried to fix it, but soon it turned out to be a challenging job. Snacktory's approach is totally based on the HTML markup, which makes it fail sometime, for example text inside <span></span> is ignored. That's exactly what is going on in the above case.

I thought of modifying the snacktory in such a way so that it can ignore HTML tags and still give better results. But soon realized that I'd have to change the whole logic behind the lib so I went ahead and created my own project NiceText.

How does NiceText work?

Instead of looking for particular tags and block sizes, NiceText calculates the ratios of all the text blocks w.r.t. the largest text block. Then it excludes the blocks with a smaller ratio than a give limit (say a ratio of 0.15). After that it clusters the nearest blocks into multiple clusters by checking the distance between two blocks, each cluster contains several text blocks, the largest cluster is marked as the main text.

Google’s Cloud Platform is slowly becoming ay fully featured environment for running complex web apps, but it’s not easy to just give it a quick try. To get started with Cloud Platform, after all, you have to first install the right and other tools on your local machine. Today, however, Google is launching its browser-based Cloud Playground, which is meant to give developers a chance to try some sample code and see how actual production APIs will behave, or to just share some code with colleagues without them having to install your whole development environment.Cloud Playground, Google says, is meant to be a place “for developers to experiment and play with some of the services offered by the Google Cloud Platform, such as Google App Engine, Google Cloud Storage and Google Cloud SQL.”For now, Cloud Playground only supports Python 2.7 App Engine apps, and Google considers it to be an experimental service (so it could shut it down anytime).To get started, you simply head for the Cloud Playground or, if you just want to see it at work, head for Google’s getting started documentation, which now features green Run/Modify buttons that allow you to run any of the sample code on these sites. The Cloud Playground itself features numerous sample apps and also gives you the option to clone other open source App Engine template projects written in Python 2.7 from GitHub.The project itself is open source and consists of a basic browser-based code editor and , a Python App Engine app that serves as the development server.
Which is what we need !! I'm also working on a summarizer, which will be integrated in NiceText. Some part of it is already there, but it needs a lot of improvements. Here is the summary of the above text; produced by SimilaritySummarizer.java (present in the repo):
Today, however, Google is launching its browser-based Cloud Playground, which is meant to give developers a chance to try some sample code and see how actual production APIs will behave, or to just share some code with colleagues without them having to install your whole development environment.
I have yet to create a jar, however you can download the files from github repository. NiceText has a dependency on Jsoup.