Monthly Archives: June 2009

How can you fail spammers attacking your website?

Do you think we can stop spammers attacking our websites?

I think, NO! There is no way to stop spammers trying to attack your website, especially when your website starts getting popularity. But there are certain ways to prevent your website from spam attacks. Captcha is a way to fail spammers attacking your website.

Some rubygems are available for Captcha implementation under Ruby On Rails. You can find all of these Captcha rubygems here. Simple Captcha by Expressica.com is very popular Captcha rubygem out of the mentioned. A simple captcha Ruby/CAPTCHA is also good. ruby-recaptcha is another good example. Apart from all these, captchator.com also does provide a very good facility of using captchas in your website, which never requires you to install anything on your server to implement captcha validation.

But, the one I liked best suitable to my needs is Turing. There are number of reasons, why I liked it:

  • Easy to install (e.g. gem install turing)
  • Easy to configure (e.g. add “require ‘turing’” to config/environment.rb file)
  • Easy to implement (check here: example, entire manual can be found here)
  • Inbuilt glossary of words, which can be modified to meet individual’s needs, used to pick the random word for captcha images.
  • Various images used to pick as random background image for captcha
  • And the best part is: automatic removal of captcha images when you validate user input text with image text. (e.g. tc.valid_answer?(id, text))
  • No dependency on any website for captcha images or validation. Everything is done locally on the server
  • Turing is Licensed under GPLv2

There is no active development on Turing since 2007, however it fulfills most of my needs and works nicely without any kind of problem.

Despite these good features, there are improvement areas:

  • Along with making captcha images complex for machines to read, it should be made easy for humans to read. :)
  • OCRs might be able to decode your image text even though the captcha images look distorted.
  • Auto-removal of captcha images on the validation, which is being taken care by Turing, but I guess not by others.
  • Auto-removal of captcha images on the page unload event. Imagine a spam script continuously reloads a page every second. Your space on the server might get filled up in minutes.
  • Accessibility featues for disabled. Some captchas like ruby-recaptcha is successful in this area upto some extent.

I am still trying to find better ways of auto-removal of captcha images on the page unload event. Let me know, if you have got some inputs on it with respect to Turing rubygem.

/Ankit

Gujarati locale and standards…

Few years before I have got a chance to modify the Gujarati locale file, which was initially created by Karunakar. Since the locale file plays a very important role in computer localization for any language, it was really important task for me. So, I had to make sure that any kind of change I make to this file is very accurate. After taking reference from Dictionaries I had entered the appropriate entries in the locale file.

Since last couple of days, there has been a discussion happening on Indlinux-group mailing list for issues posted against Gujarati locale. Issues were basically posted by French guy called Bernard, who can speak fluent Hindi and can read Gujarati to some extent. I felt really good when I saw the initial posting, since I found someone apart from the existing localization contributors, interested in Gujarati localization.

The major issues highlighted in the discussions were:
1. Rupee symbol in Gujarati locale
=> According to Bernard and few others as well, Rupee symbol should be “રૂ” rather than “રુ” or “૱”.
=> I have done my secondary, higher secondary education in pure Gujarati medium and used or seen “૱” only.
=> Unicode chart also points to the rupee symbol for Gujarati as “૱” (U+0AF1)
=> have taken a reference from SSC (10th) Maths Question Book from Gujarat Secondary and Higher Secondary Education Board website: http://www.gseb.org/gseb/download/student/question-bank/gujarati-medium/std-10/Maths.pdf – Page no. 12, 13. Maths_PDF.p65
2. Translation of Thursday into Gujarati
=> Thursday translates to “ગુરુવાર” in Gujarati. But here the spelling should be “ગુરૂવાર” according to Bernard.
=> There is no fault from Bernard’s side since the calendar that he sees at home displays “ગુરૂવાર”.
=> In fact when I was editing the Gujarati locale file initially, I also assumed that the spelling should be “ગુરૂવાર”. But I had to refer to the standards, dictionaries, etc. and I realized that the correct spelling is “ગુરુવાર”.

Last weekend I got a chance to visit my hometown Bilimora. While reading newspaper (Gujarat Samachar), I have noticed they have also been using wrong symbol for Rupee (રૂ|.) and Thursday ( ગુરૂવાર ). Same wrong spelling for Thursday I found in a calendar at my house from Gujarat Samachar. You can see that here:

Wrong_Calendar

There was another calendar in my bedroom :)

Correct_Calendar

So, I think the print media has been using wrong spellings for some words, which creates a confusion among users and they tend to use wrong words which they have been seeing often.

I am not a Gujarati linguist, but I have done my school study from Gujarati medium and know Gujarati upto well extent. I have modified the locale file according to the definitions provided in the Dictionaries and standards. However, this discussion needs an authentic verification from a language expert.

Thank you for reading!
Ankit