Present Location: News >> Blog >> Blog Tweaks

Blog

> Blog Tweaks
Posted by prox, from Charlotte, on February 11, 2010 at 16:38 local (server) time

Apparently the math question for comments (to prove you are not a stupid spam bot) on my blog hasn't been working consistently:

14:12 < cnj> your math is broken, prox.
14:27 < cnj> what would you do to imporve last.fm...
14:33 < prox> Hm?
14:33 < prox> What math?
14:35 < cnj> your news
14:35 < cnj> It also doesn't transfer your entry when you click retry.
14:35 < cnj> but it's ok, cause it won't actually post.

Apparently I had some floating-point precision issues that started causing problems when the user-submitted math answer was compared with the generated one.  I was seeing things like 11.1 != 11.1.  I hate floating-point data types.  So, I just dropped the decimal point and now the math questions are generated by two calls to rand(1,100).  It seems to work.

Also, I fixed the form so it keeps existing input if you enter the math question wrong, and fixed a few miscellaneous bugs.  I probably should have done this sooner.

In other news, I had my 2009 review, today.  Apparently I've been doing something right, since my boss had some good things to say about my performance over the last year.  Now, we'll see if I can manage to not slack off in 2010.  Fingers crossed!

> Add Comment

New comments are currently disabled for this entry.