300 the movie – skip it

After two weeks of ticket-less sojourns to Inox, finally got to watch the movie 300 (front row seats nevertheless 🙁 ). And my review – skip the movie. It is definitely not worth the hype that is being generated. One possible reason why the movie is not good is that there hardly is any storyline at all. To provide you the spoiler – the movie is about 300 Spartans under the king Leonidas, who are trying to ward off the Persian king Xerxes. Now, if you are imagining, a movie like BraveHeart or even The Patriot, then you sure will be disappointed. The dialogue is absolutely lackadaisical at best. The screenplay also leaves a lot more to ask for. The movie though, I guess to keep the historical effect, has been shot in low light, and has a grainy tinge all the while (there must definitely be a technical photography term for what I am trying to explain; if you do know it, please leave a note). The acting was passable by all the actors in the movie – all in all, I will not suggest this movie.

WordPress password being sent in cleartext

I was shocked when I found out, just now, that the password for wordpress authentication on weblogs.us is sent in clear text. This is really scary. I used LiveHTTPHeaders to get the session for the login on weblogs.us, and if you look, you will see the password (of course it is masked)
POST /wp-login.php HTTP/1.1

Host: chaos.weblogs.us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://chaos.weblogs.us/wp-login.php
Cookie: dbx-postmeta=grabit=0+,1-,2-,3+,4+,5-,6-&advancedstuff=0-,1-,2-
Content-Type: application/x-www-form-urlencoded
Content-Length: 67
log=*****&pwd=*************&submit=Login+%C2%BB&redirect_to=wp-admin%2F

HTTP/1.x 302 Found
Date: Thu, 08 Mar 2007 17:18:32 GMT
Server: Apache/2.0.53 (Win32) PHP/4.3.10
X-Powered-By: PHP/4.3.10
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Thu, 08 Mar 2007 17:18:32 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Set-Cookie: wordpressuser_0eaec195f4880f15777a7d6a650e91a1=*******; path=/
Set-Cookie: wordpresspass_0eaec195f4880f15777a7d6a650e91a1=*********; path=/
Location: wp-admin/
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=2, max=300
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

This is not good. This definitely is one of my d’oh moments. I think I need to post this on weblogs.us forums. There must be some plugin, as a user I must enable. I am not a very web-app savy person, and looks like its time I become one 🙁

What is constraint propagation

Constraint satisfaction problem (CSP) is a problem composed of a set of variables, each with a domain of values, where we have a set of constraints that restrict combinations of variable assignments. We are then to assign values to variables, satisfying those constraints (or show that no assignment exists).

An essential part of constraint programming is constraint propagation. Constraint propagation, put simply, is a way for a system to spontaneously produce the consequences of a decision.What this means is that, propagation sets the values of certain variables based on the values that other variables hold. So, if some variables hold some values, by propagation, we can set the values to the other variables based on the constraints. This automatic inference of the values for the second set of variables is called constraint propagation. Constraint propagation provides a natural way for a system to spontaneously produce the consequences of a decision.

One of the ways for constraint propagation is arc consistency. It can be explained via an example. Consider thus: X = {23…45} and Y = {35…76}
And the constraint is: X > Y
Using arc-consistency which says variable x (belonging to set X) is consistent with y (belonging to set Y), if, for each value a in the domain of X there exists a value b in the domain of Y such that (a,b) satisfies the constraint between X and Y.
So, using arc-consistency, for the constraint X > Y, we can reduce the set X to {36…45} because X should always be greater than Y. Applying arc-consistency on Y, for the reduced set X, Y reduces to {35…44}. Now, this is not the solution for the constraint satisfaction problem (CSP). Just because we have non-empty sets after reduction, doesn’t give the actual solution. Also, the exact tuples (as there are only two variables in the constraint), are the ones that constitute the solution, and not the reduced domains of the variables. To get the solution, we need to drop to the search part of the solution.

For each variable x belonging to X’ and y belonging to Y’ we need to evaluate the constraint validity. Only after we get the resultant set can we be guaranteed that we have a solution. In this case, the solution will be:
(36,35) (37,35), (37,36)……

As this link puts it, constraint propagation is an *inference* rule for finite domain problems that narrows the domains of variables.

I didn’t know how to include mathematical symbols in wordpress (may be using MathML), so have expanded the text corresponding to the generally mathematical symbols.