On being smart.
Smartness is a function of time. It exists in the moment. For a brief period. Like Dirichlet function, it is discontinuous everywhere. No one can be smart for their entire life time. No. Its not possible. Even Einstein admitted that:
Anyone who has never made a mistake has never tried anything new.
Smartness is also a function of the “peer group”. An average person can be defined smart among a group of below-average people, and by extension, a below-average person is smart among a group of really dumb people. And so on and so forth.
Smartness, sometimes, can also depend on external parameters. Lets call that “environment”, which could have variables like:
a) An Inspiring mentor.
b) Educated parents.
c) Outlook.
d) Health.
e) Choices one makes.
Another line of thought that could be applied here stems from the quote:
Beauty lies in the eyes of the beholder.
I think smartness also lies in the eyes of the beholder. Every one has their own set of guidelines as to what is, rather, who is, “smart”. And when they superimpose these guidelines on their audience, they see a wide range of people – extra-smart, smart, okay, below-average, fool etc. To sum up, a person I regard as smart, may not appear as smart to you.
On a related note, if we were to quantify smartness, the career gap a person is trying to fill is directly related to his smartness. For instance, lets say Company A is a top-tier company, Company B is a second-tier one and Company C, third-tier. To me, a person making a jump from Company C to Company A is more smarter than the one doing it from Company B. Because the former is filling a wider professional gap. He may even be more smarter than the ones working in Company A, at his level, during the time of the jump.
So, when people judge other people by the following:
a) Person A made it to College X, that is a top-tier college and Person B couldn’t.
b) Person A made it to Company A, which pays Salary X that happens to be greater than Person B’s, who is employed by Company Y.
and conclude that:
Hence, Person B is less smarter than Person A. For the rest of his life.
I get pissed off. It appears to me that the person who is making the judgment is failing to see the larger picture. I think, the colleges we attend, the companies we work for, etc. are the boundaries created by us to boost our ego. People with trust issues, weak emotional quotient, etc. try to shove down such pseudo-realities down the throats of their neighbors to feel more secure.
I am not saying that People who attend a certain college, work for a certain company are not intelligent. I am saying the exact opposite. People who don’t attend a certain prestigious college, don’t work for a certain reputed company are not necessarily not smart. There’ s a subtle difference.
The bottom-line is you can’t/shouldn’t judge people by their academic/professional or “any” background really.
Everyone is uniquely smart.
PS: It occurred to me after this write-up that most of the arguments laid out above in defining smartness also apply for adjectives like beautiful, courageous, inspiring, etc
One tall pike, please.
The almost 1000-day old American in me does the following things differently from his older Indian counterpart – a) spend a lot of time in bagel/coffee stores during weekends, b) develop a sophisticated accent and feel proud about it, c) drink black coffee, d) have cereal/eggs/milk for breakfast, etc. Time to get back to reality, eh? It has been little more than a 1000 days since I left India, to start my journey abroad and to notoriously live the “US dream”. Little did I know about the culture, people, lifestyle, etc of a country that is approximately 10000 miles west of India. And even lesser clue on how I would make a living there. Yet, here I am, 1000 days later, sitting in one of my favorite places – starbucks, listening to jazz, sipping a hot cup of coffee and musing over entrepreneurism, quarter-life crisis, journey traveled thus far and the road lying ahead.
Learnt a few things during the last couple of months. Working with bigdata is fun and challenging. I guess I am fortunate enough to work amidst a bunch of smart guys who are always trying to push the envelope. Also, this is a refreshing change of pace, compared to a laid-back, more research-oriented work ethic back at Cornell. One of the main differences, I think, lies in the fact that when you work for a company, the business guys get to make a call on the end goal of a project. While the research may interest you, it may not align well with the business goals of the company. There is breadth in the product-line but not the depth. But, I could be wrong!
Seattle’s tech scene is vibrant with meetups, startup-weekends, and others. Was lucky enough to attend a few, and added few other to my ever-growing list. The aspiring entrepreneur in me, still, has a lot of learning, lot of meeting interesting people, lot of signing-up for social causes and a lot of catching up to do. I really wish he wouldn’t easily give up on efforts like this in the future. TED talks, open source conventions, news articles are keeping my spirits alive, for now. Here’s a very interesting article on how Seattle transformed to what it is today, in the shadows of Microsoft. It actually makes sense, given the fact that, roughly 50% of my team members have previously worked at Microsoft/Amazon before landing here.
Tech scene aside, there are other interesting things to do in Seattle as well. Now that Summer is around the corner, with days longer and nights shorter, my outdoor activity will hopefully increase. I guess I am falling in love with the ever-cloudy, constantly drizzling weather of pacific north-west. It kind of reminds me of the monsoons back in India, only more pleasant. There’s something magical about the scenic beauty of this region, for eg. the mountains (cascades & olympics), the concrete highrise buildings of downtown Seattle & Bellevue and Lake Washington. As I step out of my house, 7:30ish every morning, on the way to my office, I catch the glimpse of the mountain ranges cutting across the british columbian region of the US. The feeling is indescribable. There has hardly been a morning without this moment; followed by, my first cup of coffee for the day. A glimmering Lake Washington is another sight to die for – around 4ish in the afternoon. Although, you gotta be really lucky for the clouds to clear way for the sun.
Quarter-life crisis is quickly wearing its ugly mask, as I enter mid-20s. It is not unusual for Indian grooms to get arranged-married as soon as they are into their first job. Fortunately, my parents are understanding enough to let me pursue my career goals before embarking upon that big journey. I think I finally have enough time and space, that I’ve always wanted, at my disposal, to work on things that I like. Although, the big question is “what do I like ?“. Its not that simple, eh?
Today marks an important milestone in my career as my US dream continues, temporarily, for 3 more years. I can only hope that I would put it to good use and not squander it away. My H1-B visa has been approved. yay!
Just ordered another “tall pike” to go!
PS: Seattle is known for its Coffee. Pike is my favorite coffee. I usually drink it sans milk, to relish the raw taste of the beans.
Do what you love!
Do what you love.
It amazes me how many of us, out there, do things – working on a job, making personal choices, professional choices – that we don’t like, on a daily basis. We often don’t realize that we are, in fact, doing this unless and until, someone points out to us that it is the case.
A simple litmus test to reveal the facts would be to answer yourself the following questions:
1) Are you bored at your current job?
2) Do you easily get disinterested in things?
3) Do you always live life as it comes, without ever moving out of your comfort zone?
If most of your answers to the above questions are an “yes”, then you are certainly doing something that you don’t love.
A case in point.
I was recently having a conversation with a friend of mine on how Indian software service companies like TCS, CTS, Wipro, Infosys, et al are abusing the modern educational system in India. I know, abuse, is a strong word. But, what I mean by that is, these companies are creating a huge demand for software jobs in India, more than any other market segment had done, since the 70s. Also, the software industry revolution in India, created a notion of job security among middle class Indians, much like what the banking industry did during the 70s. It has created an economy, where a commoner could typically earn 4 lakhs per annum – providing him with enough momentum to start his career and support his family. While all of this is good, the sudden rise in the number of software jobs, started, sucking in people from various fields of study, giving them a false sense of financial security and creating a huge gaping hole in the present day engineering and sciences industry. When people with good academic backgrounds belonging to upcoming fields like Biotechnology, Electronics, Civil and Mechanical Engineering – start forgoing their ambitions to pursue their fields of interest, and start acquiring software jobs for an ephemeral economic stability, that’s a bad sign for a growing middle class in specific, and Indian economy in general. The software companies shouldn’t allow this to happen. They shouldn’t hire people from Non-CS background, just so they can fill in their manpower/workforce requirements. What happens when they do this? A generation of bright Indian middle-class suffocate to death in four walled cubicles doing something they don’t love, for the rest of their lives. They should be allowed to breathe in creativity and innovation, not just into their lives but also into mainstream Indian entrepreneurism.
I like what the US industry has done to its academia. There is a very strong bilateral agreement between the industry and academic institutions in the US. Multinationals, of all sizes, sponsor programs, conduct competitions to drive innovation and creativity among a growing american middle class. Students engage in Internships, while they are still in their undergraduate/graduate programs. They get a sense of how the Industry works, and they can directly relate their work experience to their field of study. That, to me, is a healthy sign of a growing economy. Industry needs smart students to thrive and vice-versa. Although this phenomenon is not a stranger to students attending elite Indian academic institutes like the IITs and the NITs in India, I would like it to penetrate further and embrace institutes of all sizes of talent in India. That’s when you really start to see an Intel, an AMD, a National Semiconductor rising in the slums and capital cities of India. A nation needs more individuals doing what they love, more so is the case with India.
Here’s a classification of college attending students of India, based on which schools they attend after they graduate high school, and how it affects their societal status and decision making for years to come, and how it affects the middle-class of a 65-year old India:
1) People who attend top-tier institutes like the IITs, NITs and the BITS, etc.
These are the ambitious kind. They achieve what they want, very early in their life. Their network of people contains equally ambitious people who either want to make a difference to the world they are living in, or are really good at finding companies that pay a butt load of money as salaries (read Finance companies). Either way, these people make smart choices in their life. Some of them do what they love, some don’t. The ones that are not super smart, also do well, as their social circle has a bunch of smart guys helping/influencing them in their decisions all through their life. Most of the times – these people have a direct say in how well to shape the Indian economy – partly due to their financial status and partly due to their influential top-tier fellow-geek network.
2) People who attend second-tier institutes – engineering colleges at the state level.
These people are either the ones who flunk at the qualifying exams of most country-wide top-tier institutes and then settle down with top-tier institutes at the state level, or the ones who just focus on exams at the state-level and bag good ranks in them. Lets call the latter type B; and the former type A. My personal belief is that people who belong to type A – who settle for something they didn’t originally plan for , always have this constant need of moving up the societal ladder and making their mark. These people will eventually gravitate towards what they want in life. Its their enthusiasm and prolonged passion that drives them forward. People who belong to type B, are the ones that generally fall to the whims and ill-practices of 1000-pound corporate gorillas like TCS, CTS, Wipro and Infosys. Unfortunately, these people are large in numbers and are loosely called the “working middle-class”. They have a direct say in shaping Indian economy due to their sheer size.
3) People who go to deemed universities, private institutions by paying huge chunks of tuition.
Kids with Rich dads, NRI parents and the party types fall in this category. They inherit their parents’ fortunes and hence, their businesses. They could have a say in shaping India’s future, if they want to, but they choose not to. They bring zero innovation to the table and are often a disgrace to the capitalistic scene of a growing economy.
Finally, what I want to say is, I think, a country’s middle-class is its economic lynchpin. A healthy middle-class reflects a healthy economic scene. Although some would debate the economic divide and how it directly affects the nation’s economy from a “99% vs 1%” perspective, I strongly feel, its the 99% that shape the economy – they could be lobbyists, entrepreneurs, politicians – who ever they want to. And for all this to happen, they gotta first, start doing what they love.
PS: The above classification is very loosely and directly based on my personal intentions. I am sure there are many sub-categories and exceptions to the what is already listed in there. This article is written not to offend any one. If anything, it is merely a stark look into how corporate practices are directly affecting the Indian middle-class and how the 99% have enough potential to reform the economic landscape of a growing nation like India, from a very self-motivated angle.
Questions create reality.
Yesterday, I watched this lecture on Youtube where the professor was trying to convey a point to the students. The professor showed the students a slide which had complicated geometric structures entangled with each other. He asked the students:
“How many individual geometric shapes do you see on the slide? you have 12sec to count.”
After the end of 12sec, he asked the students for answers. Some said 6, some others 15, and so on and so forth. In all the answers ranged from 6 to 200. The students were curious to know what the right answer was and expressed their surprise about the variety in answers.
Then the professor said, “I do not know the answer myself” and moved on to his next question.
“How many children were present in the bus?”
Most of the students were flabbergasted as they couldn’t recollect seeing any bus in the first place. And the professor went on to ask his next question.
“What do you think was the most dominant color in the right half of the slide”
The students had no idea.
And then the professor explained. “There were 5 students in the bus” and the “most dominant color in the right half was yellow”, and he justified the explanation by bringing the slide back on.
There indeed were 5 children and the color indeed was yellow. Then he explained, “This is how it works”
“I created a reality for you by asking you the question about the number of shapes in the slide. Even though there were other realities present in the slide, you just concentrated on the thing which mattered most to you – finding the number of distinct shapes. It was as if the bus, the children and the actual colors never existed for you.” and continued,
“This is increasingly becoming a concern because most people today gauge one’s confidence/strength/character by asking questions like -
“What are your weaknesses? Why do you think you failed at this task? What was your toughest challenge? etc.”
“If you think about it, they are creating a reality for you in which you only concentrate on your weaknesses, failures and tough challenges. Its as if your strengths, positives and other motivational things never existed for you even though they are present right there in your life – just like you could never see the bus, children and the colors”.
I think that’s a very interesting insight. Asking the right question matters. We knowingly or unknowingly create a reality with our questions and the answers that follow these questions are therefore often narrow-minded , biased and often include only some part of the actual reality that exists at that moment. Its as if the other things never existed for us.
Some of my other takeaways from this lecture were:
As revealed by a survey conducted among the most successful Harvard MBAs :
1) Successful people ask a lot of questions.
2) Successful people believe in themselves.
All in all, it was a great lecture. You can watch it at – http://goo.gl/K9UIk
PS: Today I reached 25. I spent some time reflecting on my past. I wanted to spend this time alone and all for myself. It’s very hard to realize the fact that one third of my life, assuming a life expectancy of 75, is already done. I can’t undo it. Steve’s words struck a chord with me – “Remembering that you are going to die is the best way you know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.“
160 days.
Its been a while since I blogged. And many things have been keeping me busy. A lot of things happened in this period. But I am going to talk about a few that I think are worth noting.
Interviewing 2.0
Technical interviews for a SDE position are a different ball game altogether. The things that you learn during Masters or while you are at a job can get you only so far in a career planning process. There’s a whole different aspect to technical interviewing called problem solving. And it requires practice. Masters/Bachelors help you broaden your field of study. They cover the breadth. They teach you where Databases, Systems, Compilers sit in the stack. They help you get a holistic picture of things. You are required to do a whole lot of practice and homework to explore the depth. Especially with companies like Amazon, Ebay, etc. which deal with BigData, not only does your solution have to be correct but it has to scale. What I mean by that is, its not enough if your solution works with data structures that fit in the memory. It has to work with data structures that grow beyond the size of RAM, to your hard disk, or to even a cluster in some cases. (Ref to MapReduce.). Time complexities also come into picture. Customers will want high response times. A vast amount of research goes into how to increase the time spent by a customer on a website. More time spent means more ads means more money. There’s a one-one equivalence between avg user time spent on a site and the revenue it generates. Google’s entire business model is based on this fact. They don’t charge fees to use their products like Google Maps, Youtube, Google Flights, etc. Instead they draw more number of users to their sites and hence make more money through their ads. But I digress.
During this 4-month period, I interviewed with companies like Amazon, eBay, LinkedIn, Foursquare and couple of startups. The devs at most of these companies were interested in knowing my basic knowledge with data structures viz Binary Search Trees, Priority Queues, Hash Tables, Stacks, Queues, LinkedLists, etc. More often than not, they would increase the input size to millions and make me ponder about the solution that I would initially give them. In some cases, because of a huge runtime overhead, I would then use a totally different data structure altogether which would better suit the needs. But the whole interviewing process was an amazing experience. It tried to bridge the gap between academics and the industry. The academics teach you about a particular concept. They don’t really teach you the engineering aspect, i.e. how well to design a particular problem? and why does it matter? Industries care about the latter. Its all about better engineering that drives the revenue. I referred books on algorithms like Algorithm Design Manual by Steven Skiena, Algorithms by Robert Sedgewick which totally blew me away with their amazing content. Their content on the various data structures is a technical treat. They changed my way of approaching a problem. The engineering managers , product managers and the VPs were interested in knowing how much innovation I could bring to the table. They would ask general technical questions and observe my rationale. For example one engineering manager asked me how I would design a version control system like svn, cvs, git, etc
All in all, it was a great experience, although I couldn’t crack most of the core companies that I interviewed with, I think now I have a pretty good picture about how to approach these. A second interview with any of these companies in the future will never be the same.
Lastly, I joined the Data Engineering Group at Intelius as an SDE. I am really excited about this opportunity as the data group deals with humongous amounts of data and it requires large scale data analysis and processing.
VIVO and the Semantic Web.
My work at Cornell took some interesting turns. When I initially joined Cornell in January, for a month or so I mainly worked with the visualization work that I had been doing at Indiana until upto that point. But soon after the 1.2 release of VIVO, I was handed over interesting assignments like a) Improving relevance ranking of search results in VIVO. b) Working through the transition from Lucene to Solr. c) Faster indexing and querying times. These interesting problems gave me the opportunity to learn search systems like Lucene and Solr, sharpen my multi-threading skills and inspecting the RDF graph to help identify what parameters were significant enough to be incorporated into the ranking algorithm of Solr/Lucene to improve relevance. While I mainly worked on improving the textual relevance, my colleague Anup worked on the semantic counterpart. Here’s some notes from his blog about the improvements made to the Search
1)http://knowledgesharing-anup.blogspot.com/2011/04/in-pursuit-of-semantic-search-part-1.html
2)http://knowledgesharing-anup.blogspot.com/2011/04/in-pursuit-of-semantic-search-part-2.html
3) http://knowledgesharing-anup.blogspot.com/2011/04/in-pursuit-of-semantic-search-part-3.html
Here’s one of the earlier presentations we did on our work
https://docs.google.com/present/edit?id=0AcTGl_UoS4vaZGZ4bWs5bnZfMTRjcXIyNHRrMw&hl=en_US
We would discuss the pros and cons of each approach, talk to our team leads and get them implemented. The design/development phase was very enriching. Towards the end of the development, we quantified the improvements made in search by doing the following.
a) Cluster analysis – Testing the distance between the search query and the mean of the search results from both the versions.
b) Precision/Recall graphs based on user judgement.
c) Cluster analysis to get the proportion of relevant/irrelevant search results in the total search results.
All these experiments authoritatively concluded that the search performed better than the previous version.
We finally presented our findings at the second national VIVO conference held at Washington D.C in August 2011. It was a great feeling. About 300 people attended the conference from all over the world and we got to hear some good feedback about our presentation. Semantic web pioneer Jim Hendler was present, Micro-triples evangelist Barend Mons was present. It was a great turnout.
What next?
After all the efforts, I finally joined Intelius as an SDE with their Data team. The position gives me a hands-on exposure to data analysis and processing at large scale. The learning curve is steep and I look forward to making a real contribution.
Hows Seattle/Bellevue?
This part of pacific northwest is really beautiful. East Washington is well known for its numerous hiking trails across the mountains. It has not rained as much as one would expect at this time of the year. The weather is pleasant. Bellevue has an urban setting with highrise buildings from Expedia, Microsoft, T-Mobile, etc. With Seattle, Kirkland and Redmond around this place, its abundant with tech companies. The tech scene in this region is thriving. I think I am going to stick around this place for a while. There’s a lot to explore technically, geographically and otherwise.
That’s all for now. Signing off.
Open Education – Khan Academy.

Yesterday, I watched this TED video http://www.ted.com/talks /salman_khan_let_s_use_video_to_reinvent_education.html that talks about Khan Academy. It quickly became clear to me that Salman Khan has a well-defined vision. He bought out two important objectives of Khan Academy that are worth mentioning:
1) The modern education system labels a student’s worth by stamping him with big fat grades, viz A, B, C, etc and he should bear those labels for atleast a few years before he embarks upon next major milestone in his career (college, undergrad, gradschool,etc. ) and the cycle repeats. Salman Khan explains that, via Khan Academy, he’s attacking this very problem. Khan academy is a consortium of lectures covering topics as diverse as finance, psychology and astronomy, etc. and every lecture has an objective. It has a set of exercises and every individual student can solve the exercises at their own pace. A student is considered to master a topic once he finishes all the exercises in that particular topic. And as mentioned previously, he can finish them at his own pace.
If you think about it, Khan Academy places importance on the mastery of topic rather than ranking/placement of a student amongst a group of students. And I think this is one of the biggest ideas that the modern day education is lacking, in that, it gives importance to how a student performs in a 3-4 hr exam and not whether he attained a mastery in the topic he had studied. You may say a student who finishes an exercise in the fastest time should be rewarded because he’s apparently the smartest of the bunch.
And my explanation to that is mentioned in the second objective
2) In the modern educational system, a teacher teaches the same lecture in the same fashion to the entire class. Whereas, every student understands/grasps things at their pace and need to be taught at their own natural learning pace. Khan academy achieves this very objective by making the teacher go to a particular student and help him with the topic in which he/she is the weakest. In other words, all the students in the class listen to Khan Academy lectures while the teacher monitors the progress of all the students through a centralized progress monitoring system and visits only those students that require help. And surprisingly, statistics reveal that on an average every individual finds atleast one topic difficult to comprehend. That is to say, if you draw a learning curve (time taken for a lecture vs no.of lectures covered) for all the students in the class, you will find that all the curves at some point during their journey encounter a blank line and then steadily rise upward.
There are some other interesting points mentioned in the video that I quite can’t recollect. Anyway, I think Khan Academy is the future of Education. And if implemented & adapted by most schools in the right way, the world will no more have big fat grades, that more often than not cause distress, and demotivate young students.
After all, the ultimate aim of education is “whether an individual, by himself, learns something at all” and not “how much an individual learns as compared to other individuals in the class”.
Google I/O 2011 Keynote 2 Summary

Vic Gundotra steps in and mentions a bit about the previous day event’s success and the Samsung tablet that Google is offering to everyone (5000, yes that’s right! Thats how many) at the event. I am so sad that I couldn’t make it to the event. I have been planning to attend one ever since I had seen the Google IO 2010 event. It just blew me off. Anyway, I digress.
Vic Gundotra hands the stage over to Sundar Pichai, who is the Senior vice president for the Chrome team at Google. Sundar walks in onto the stage and starts talking about Chrome. He particularly mentions about the frequent releases the Chrome has been doing for over 8 months now. That is, since last Google IO event, there has been a release every 6 weeks. (Wonder how that feels like when you are actually working in one of those teams. The current release window at my workplace is more like 12 weeks.)
But yeah, the new features that Chrome has been rolling out are just amazing. There is 3D CSS, Speech support, etc. Then sundar hands over the control to Ian Wilson, who starts demoing some of the cool features of Chrome. Speech support is particularly striking. Ian opens http://tv.clicker.com and adds in this attribute to the <input> element “value=x-webkit-speech” (opens Google developer tools and makes changes to the source of the page) and voila, there appeared a microphone right inside the textbox and when he clicked on it, it said “talk to enter” and he said “emma caulfield” and voila again, it did the right speech transformation and searched its database for “emma caulfield”. I think that’s just plain awesome. Just imagine the kind of tools that people can develop with speech support. Another revelation that Ian makes is that in just a span of 10 releases, javascript has been made 10 times faster.
Ian Wilson then goes on explaining how the new Chrome leverages GPU acceleration. This is pretty cool. Let me explain. So he mainly talks about three technologies and runs a game (a fishy tank) using those three technologies, while comparing the pros and cons of each. Fishy tank is a simple game that stress tests GPU acceleration by animating lots and lots of sprites (in this case, fishes) on the canvas. Using CSS transforms and Canvas2D, there is a 10x speed improvement in the frames_per_second of the fishy tank when played on a newer release as compared to an older release of Chrome. Guys at Mozilla go a step further and port the game to use WebGL. With WebGL, there is another 10X improvement in the speed. So, finally he goes on to explain, with the support for Canvas2D, CSStransforms and the use of WebGL, Chrome12 runs animations, games much faster than the previous releases. (That is when hardware acceleration is enabled.)
Took a minor break. Its been overwhelming so far and I decided I would watch the entire video and then write summaries about individual parts.
Sundar Pichai comes back onto the stage, talks a bit about Chrome webstore (Yeah, its an online store where you get to sell Chrome apps. Android : Appstore :: Chrome : Webstore.) and calls for Vikas Gupta, the product manager for Google Payments. (Evidently, Google has a lot of Indian developer base.) Vikas Gupta comes onto the stage, talks about the pricey options that other stores offer (Apple charges 30% for iPhone apps, Amazon charges about 20% for Android apps?) and reveals Google’s business model. So Google is going to charge a mere 5% on all the Chrome apps ever uploaded to the Chrome webstore. That’s just great, isn’t it? A lot of motivation for the developers as they get the major share and to be honest, I think that’s a fair share. Angry Birds developer (I didn’t know that Angry Birds is being developed in Finland) then comes onto the stage and announces that they start shipping “Angry Birds” for Chrome pretty soon. He then demoes the app. It looks pretty cool, with all the graphics. I also tested it on my Chrome (http://www.chrome.angrybirds.com) and its very slick. The Finnish guy mentions that they internally use GWT for developing “Angry Birds”. That kinda came as a shock to me. As I myself got my hands dirty with GWT couple of days back and had found out that it actually is a closed sandbox that won’t let you use external JS libraries in your web application. But I am clearly wrong. Need to look more into how effectively I can use GWT to make stronger/richer web applications. Seemingly, angry birds supports “offline gaming”. What that means is that you can play the complete game even when you are not connected to the internet. The “App Cache” feature of HTML5 makes this happen. I haven’t quite delved deep into HTML5 yet. But it looks promising.
Sundar Pichai comes back onto the stage and calls for “Erin Goblin”. The next few moments can at best be described as “magic”. I was just awestruck looking at what this guy had to offer. Alright, lets talk about that now. So Erin works for the Google Creative Labs team and they wrote a script for this game called “Dreams of Black”. When he demoed the game/video/animation, it looked like this. It is cool 3D magic universe where you can morph objects into other objects, make changes to the animation, while the animation is playing, etc. Erin, towards the end of his demo, reveals that they used this JS library called Three.js along with WebGL to make “Dreams of Black” happen.
Sundar Pichai now hands over the stage to Kan Liu to discuss a bit about ChromeOS/Chrome notebooks and their new offerings. Kan Liu demoes the ChromeOS. So now ChromeOS right off the does the following things. a) Play video b) Open PDFs, docs. c) Play music. d) When you plug a SD card into the notebook, it automatically detects that and shows you photos. And there’s more. It displays options to upload them to Cloud (Picasa, Box.net, Dropbox, etc). Very cool.
The final few minutes of the event talk about “Chrome Notebook for Education” and “Chrome Notebook for Business” as a kind of , what Sundar Pichai dubbed as, “Hardware and Software as a Service”. I mean we have seen Platform as a service (PaaS), Software as a Service (SaaS), Internet as a Service (IaaS). Now this is something entirely new. This simply means that you can rent Chrome notebooks for price as less as $20 / month. And it comes with automatic hardware upgrades/ automatic software updates, etc. The justification Google gives, for this type of offering is that costs that are associated with manually upgrading systems at small/medium/large organizations are very huge and hence, organizations generally tend not to upgrade their infrastructure frequently. Using HaSaaS, Google gives them a reason to change their infrastructure much more frequently.
PS: The real deal is, all the 5000 IO attendees proudly walk out of the event with a) Samsung android tablet b) Chrome notebook. I am just jealous. So very jealous.
Increasing heap size of Google App Engine.
Today, I ran into issues with shortage of heap size. Basically, I was doing this costly File I/O where in at one point, I had to print all the contents of the file I read using my program onto the console, and this is where I would get the “out of heap space” error.
Obviously, the string that I was trying to dump in all the contents of file did not have enough space to be created in the heap.
And I added the following flag to my dev_appserver.sh
--jvm_flag=-Xmx2000m
Remember the jvm_flag setting must go just before $*. Earlier, I tried adding just “-Xmx2000m” to the java command and it didn’t work.
Dealing with mysql.sock problem on MacOSX.
Sometimes when you install mysql on mac and forget to add mysql user it can create a whole lot of problems later down the line, unless you start, stop mysql with root privileges. If you start mysql with the following script:
/usr/local/mysql/bin/mysqld_safe
and it throws you HY2002 ERROR : Can’t find /tmp/mysql.sock, it could be because you are starting the script with your permissions and you may not have write permissions to /usr/local/mysql/data where some logs are directed by mysql daemon.
The trick that worked for me is
chown -R <user> <file> on /tmp , /usr/local/mysql and /var/lib/mysql
and
change the user from ‘mysql’ to ‘user’ in mysqld_safe script.
Basically, you are changing the ownership of some of these files from mysql to yourself and that should work.
Remote debugging a webapp deployed in tomcat using Eclipse
If you are using shell scripts from tomcat, run
./catalina.sh jpda start
Now start Eclipse, Select Run->Debug Configurations->Remote Java Application -> Apply
By default, eclipse listens to 8000 on localhost.
Now, set the break points, and point the browser to the specific URL that’s supposed to run the code with breakpoints. There you go.
Resources – http://wiki.apache.org/tomcat/FAQ/Developing , http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html
