Sing in RSS

Özlem Hancıoğlu

"Bir şeyi gerçekten bilmek, onu anlatmakla olur"

reCAPTCHA and BlogEngine

by ozlem 22. Eylül 2009 06:02

The mail folder that I create for BlogEngine comments was full of spam comments when I returned from my short vacation and it made me really happy to be that popular. But then, when I read comment mails one by one, my happiness turned into boredom. The process of deleting all spam comments one by one from all posts was really painful. Then I started to search for a solution to this problem.

I knew that I can use Captcha for these kind of issues. Captcha is defined in Wikipedia as:

"A CAPTCHA is a type of challenge-response test used in computing to ensure that the response is not generated by a computer."

So I was sure it could protect my comments from bots to add fake comments and I started to search for a Captcha extension for BlogEngine.

First, I find the Wu Peng's solution given in here. Thanks to him that he translated his blogpost to English from Chinese. I applied it to my blog but then, I recognized that it is not working with my blog because our BlogEngine versions were different. Then, I received some mails says "We cannot add comments to your blog", so my blog was so secure that no one can add comments :)

Then it fell to my lot. I decided to solve my own problem. First, I read about the reCAPTCHA as it is the well known Captcha solution. So I started to make a research about it and finally found its API from here. So, first, I wrote a generic handler named CheckCaptcha.ashx to check if reCaptcha challenge is correct or not (according to reCaptcha API). The Source of CheckCaptcha.ashx is as follows:

Fazlası...

Code Jam 2009

by ozlem 28. Ağustos 2009 21:34

code jam

"Bir programcı olarak, karmaşık zor problemleri çözmekten zevk alır mısınız?" başlığını görünce, algoritma yazmayı eğlenceli bulduğum için ilgimi çekti ve Code Jam yarışması ile tanıştım :). Öğrenciler ve profesyonel programcıların sınırlı bir zaman dilimi içerisinde, algoritmik bir problemi çözdükleri bir code yarışması. İlk 4 roundu online olan yarışmada seçilen en iyi 25 kişi, California'ya 5bin dolar için yarışmaya gidecek. Programlama dilini ve yazılım platformunu ya da text editorünü katılımcı kendisi seçiyor. Sadece, compilerın ücretsiz ve kolay indirilebilir olması gerekiyor.(Visual Studio Express gibi)

Son katılım tarihi 2 eylül olan google code jam yarışması hakkında detaylı bilgiye bu bağlantı üzerinden ulaşabilirsiniz. Bu bağlantı üzerinden de, önceki yıllarda çıkmış sorulara ulaşabilir, ve yarışma ortamında soruları çözme şansını yakalayabilirsiniz.

Biraz da algoritma...

by ozlem 9. Eylül 2008 20:43
Microsoft Student Partner olurken hedeflerimden biri olan Microsoft Redmond kampüsünde staj için, mülakat soruları araştırırken, ilginç sorular buldum. Eğlenceli ve zevkli bu sorulardan birkaçını sizinle de paylaşmak istiyorum.
 
  • Multiple by 8 without using multiplication or addition.
 
  • Given an array of characters. How would you reverse it. ? How would you reverse it without using indexing in the array
 
  • Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
 
  • You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighings how do you find the defective one?
 
Soruların cevabını hemen vermiyorum. Bakalım kimler ne cevaplar verecek =)