Author Archive

Our shiny new iMac

Saturday, November 8th, 2008

Just got our new iMac

08112008157.jpg

Starting work on the iPhone and Android platform

Friday, November 7th, 2008

We are very excited to be starting work on iPhone and Android projects starting next week.

Though our team has experience with mobile technologies and location based services, we last worked on them in 2002/2003 for the Japanese, US and the Indian market. Things have changed since then.

Location based services were still in their infancy then, and now they are all the rage. Its exciting to get back to the small devices and the challanges they present.

We’ll have fun!!

HTTP/SSL requests from flash in IE when response is XML

Thursday, October 16th, 2008

If you happen to get an error #2032 when your flash file (running on IE) requests for XML content over an HTTPS connection, its an issue with the headers IE wants. This error does not occur on Firefox, only on IE.

After some searching, thanks to this, we fixed it. Phew.

Am I using google chrome?

Friday, October 10th, 2008

Well, a picture is worth a thousand words, and here’s a glimpse of what happened when I visited orkut.com using gogle chrome:

Click on the picture to view full size (570KB)

orkut on chrome

Interface translation in symfony - tool for teams

Wednesday, July 16th, 2008

I mentioned in my previous post how we decouple the translation dictionary completely from the source so that a change in any text does not affect the templates. That has helped us a lot in several large projects.

Another issue which we frequently encountered when multiple people worked on the same project is conflicting and merging of the dictionary files. Since these files have sequential numbers in each <trans-unit> block, if multiple people want to add translations, these suquential numbers almost overlap and have to be rewritten manually while checking in.

So we decided to generate these symfony interface translation dictionary files using a script. So here’s what we do:

  •  put the translations in a properties file: Create one properties file for each language. So for English we create “translations.en.properties”. This has translations like:

USERNAME_LABEL=Username
PASSWORD_LABEL=Password

This ensures that even when multiple people add translations to these files (using a source control like CVS or SVN) there are no issues.

  • Also put the following file createXML.php in the same i18b folder.   
  • Now you can simply call this script from the command prompt to generate the xml dictionary.

php createXML.php > messages.en.xml

That was pretty simple to do. There are some enhancements this requires, like it should by itself generate all translation files based on the properties files available. But thats for when i get more time to work on it.

Passwords in clear text

Friday, July 4th, 2008

I just received a newsletter from a social network site (brijj.com) and was surprised how they had embedded my username and password in clear text. It speaks volumes on how seriously they take security. I think when storing passwords all sites should go by few rules:

  • Do not store passwords in cleartext. Never ever.
  • Use any encryption technology, preferable a 1-way hash so that nobody can decipher the password.
  • If you break the above rules, which several sites do, at least do not send out passwords in emails without being asked for. That’s the worst you can do.

Everyone should realize that people tend to use same passwords for several sites and accounts so sending out passwords in clear text not only compromises the user’s account at your site but possibly at other places as well.

STPI incubation facility in Bangalore

Wednesday, September 19th, 2007

We recently came to know about the incubation facility that STPI provides to new startups looking for a cost effective and worry free infrastructure. This is really suitable for new units who have not invested in their existing infrastructure and plan to get their own office (leased/owned) in a year’s time. Apart from the infrastructure they also help with HR, legal and accounting functions at extra cost.

It did not turn out suitable for us since we have already invested in our own infrastructure. But had we been aware of this facility when we started, we would have definitely opted for it.

You can contact Remali.R at STPI Bangalore for further information.

Employees in startups

Saturday, August 18th, 2007

Anuj Khurana has some great pointers of what the employees in a startup should be doing and expecting.

I specifically like points 4, 5 and 7:

  • The company’s success is your success, and vice versa
  • Always remember it’s your company
  • Self-drive and self controlled

Read the full post here

Interface translation in symfony

Thursday, July 26th, 2007

Symfony provides interface translation using the XLIFF standard. While using the XLIFF standard here is good, it has one pain point. The pain point becomes apparent when the need arises for changing/editing the phrases. If the phrase is used in several templates, you need to search all the templates and change there as well as in the dictionary.

For example, lets say we define a simple label like “Username” in the dictionary and in several templates. The dictionary will look like:

<?xml version="1.0" ?>
<xliff version="1.0">
  <file orginal="global" source-language="en_US"
    datatype="plaintext">
    <body>
      <trans-unit id="1">
        <source>Username</source>
        <target>ユーザー名</target>
      </trans-unit>
    </body>
  </file>
</xliff>

And in all templates that use the label “Username” we will use the following to translate it based on user’s culture:

echo __('Username');

This is good, but lets say down the line we decide to use the label “User Id” instead of “Username”. To do that we need to update all the templates and the dictionary. This becomes cumbersome if you have a large number of templates that reference this label. If you notice, the cause of the problem lies in the fact that we have used the actual text itself to identify the i18n phrase within all templates.

To get around this problem, what we did was to use a code to identify the phrase and use that in the template. And we provide a dictionary for each of the supported language. So in this case we create an English and Japanese dictionary both. But what about the source language, you would ask. Well, thats a hack: we ended up providing a non existent ISO code. Based on the comment from Dennis, we use English as the source since translation happens even if source and target languages are same.

So here is what our English and Japanese dictionary look like:

<?xml version="1.0" ?>
<xliff version="1.0">
  <file orginal="global" source-language="en_US"
    datatype="plaintext">
    <body>
      <trans-unit id="1">
        <source>LABEL_USERNAME</source>
        <target>Username</target>
      </trans-unit>
    </body>
  </file>
</xliff>

<?xml version="1.0" ?>
<xliff version="1.0">
  <file orginal="global" source-language="en_US"
    datatype="plaintext">
    <body>
      <trans-unit id="1">
        <source>LABEL_USERNAME</source>
        <target>ユーザー名</target>
      </trans-unit>
    </body>
  </file>
</xliff>

And the phrase in the template looks like:

echo __('LABEL_USERNAME')

So now if you want to change the English version of the phrase, you simply update the dictionary and no need to change the templates.

Quizzing in a connected world

Tuesday, June 5th, 2007

Few days ago I played an interesting quiz. You should try it when you have time. I enjoyed solving it. Once done, though I was feeling happy to have solved it, I was not satisfied. Why, because I was wondering as to who really solved it, me or the search engine?

In todays connected world that has so much information available on the internet, solving a quiz is no longer a feat. Instead of trying to ponder over adwork through the quiz questions, I was clicking happily on the results the search engine had spit out. And on the more difficult ones I was trying to analyze which search results are more relevant. So much for instant gratification. Had it been 6-8 years ago, it would have taken me a few hours to finish it, or maybe even more. But at the end of it, I would have felt satisfaction and real happiness. And in the process I would have probably remembered the answers to all questions for the rest of my life. But on the bright side, I am getting better at searching and finding relevant informaion faster on search engines ;)