Friday, January 22, 2010

YouTube, HTML5 on Chrome

http://www.youtube.com/html5 says that Chrome works with HTML 5.  But this is what I get to see on Chrome.


Strange.  Did I mess up anything or someone at YouTube constructed the HTML as follows:


<div class="yt-static-tt-entry"> 
<div class="info"> 
<h3>Supported Browsers</h3> 
<p>Right now we support browsers that support both the <video> tag in HTML5 and the h.264 video codec. These include:</p> 
<ul style="list-style-type: disc;"> 
<li style="margin-left: 2em">Google Chrome</li> 
<li style="margin-left: 2em">Apple Safari (version 4+)</li> 
<li style="margin-left: 2em">Microsoft Internet Explorer with Chrome Frame installed (<a href="http://code.google.com/chrome/chromeframe/">Get Chrome Frame</a>)</li> 
</ul> 
</div> 
</div> 


Thursday, January 14, 2010

Google Spreadsheet - Excel Export Compatibility Issues

In Google Spreadsheet, the function ROUNDUP expects two parameters - the value and number of digits. But the second parameter is optional, defaulting to 0. If you had given just one parameter for the function, it works fine until you do an excel export.

In Google spreadsheet, the formula was:
=IF(ROUNDUP('Sheet1'!B52+'Sheet2'!B52+'Sheet3'!B52)-'Sheet4'!B51>='Sheet1'!B52,'Sheet5'!$E53,0.0)

In the exported excel, it came out as
=IF(((ROUNDUP((('Sheet1'!R[24]C+'Sheet2'!R[24]C)+'Sheet3'!R[24]C))-'Sheet4'!R[23]C)>='Sheet1'!R[24]C),'Sheet5'!R[25]C5,0.0)

Really weird export. It took me a while to suspect that the missing parameter was causing the problem. Once the parameter was supplied, the exported excel looked fine.


Monday, January 11, 2010

Interview Questions

Tired of being called to interview fresh graduates who can't think, I gave our HR person three sets of questions as follows. I didn't want to copy paste objective type questions. I wanted to see how they think, present etc.

Set 1

1. Write the events that happen between requesting for a web-site address in browser's address bar and the retrieval of the web page. State your assumptions on internet / intranet, static / dynamic web sites.
2. Write a function (secondLargest) to find the second largest number in a given array of integers. (Expectation is just the function in such a way it can be reused in multiple programs with the most optimal solution in any programming language.)
3. Write a data structure in C/C++/C#/Java to store folders and files in a computer.

Set 2

1. Give step-by-step instructions to go from your home to college. Be clear that a stranger to these places can simply follow the instructions and still reach the destination with no additional help.
2. Write a function (shuffle) to shuffle elements in an array of 54 entries to mimic the shuffling of cards.
3. Give the data structure for playing cards that can be used to construct games like solitaire, freecell etc in any programming language that you know.

Set 3

1. Give a checklist to help an eight standard student to prepare and attend Science / Mathematics examination without surprises and panic.
2. Write a function (fizzbuzz) to print sequence of numbers on screen. For 7 and multiples of 7, it must print 'fizz' and for 7 and numbers ending with 7, it must print 'buzz' and for all other numbers, it must print just that number. If a number is a multiple of 7 and ends with 7, it must print both 'fizz' and 'buzz'.
3. Map to an appropriate data structures, the following with explanation: Storing newspapers, On-boarding of passengers in a bus, Grading of students in a class, Distribution of product from manufacturer to consumer, Real-Estate Brokers

The expectation was, if they write something close to common sense, they can be trained. If they were surprised at these questions, they can go home, prepare and come back to give the test after a week. The second test could be a bit more difficult.

In the past two-three weeks, a number of fresh graduates walked in for the test, not one answered these to meet our expectations. They had expressed surprise, but never cared to come back.

I am worried at the state of education in this state.