Smooth comments
Posted on 2007/01/11 - 19:05D'oh! I stepped out of my bed, thought, Hmm, I got this feeling I did something wrong, and then it hit me. I talked about neurons yesterday and how their action potential couldn't change the phase angle, but I realised that they don't have to. That stuff is relative to the place of the receiving neuron anyway. God I felt stupid, that I missed such an obvious thing. Oh well, my theory still holds and so does Jeffress' model but I lost interest for the moment in the subject and decided to do something else.
Because there was one thing that was still bugging me, I didn't have a comments area here! I had a few cool ideas for it but was holding it off all the time because I don't have a proper database on this server. You can make a comments area without a database, but in general it doesn't end up being a pretty thing to look at code-wise. Still, impatient as I am I decided I needed it pretty badly and got to work. Soon I found out that the PHP on this server was pretty bad too, since it's running version 4 while version 6 has been out for ages. Oh well, I want comments!
One of my ideas was that I would simply spit out the raw comments data to the browser, and let JavaScript make it look nicer. This would save some bandwith, cpu cycles on the server, and make everything look more responsive too. It turned out this was pretty easy which made me wonder why there aren't more webservers out there doing this. But anyway, I couldn't do everything in the browser since I need to validate whatever the user types in the form before I drop it in my *cough* database-thing. Luckily, that wasn't so hard either (ignoring the lack of decent modern PHP tricks) and you can look at the PHP source right here. If you spot some bug, security hole or other kind of error, please let me know about it. Anyway, that file, including some new JavaScript gives a sweet little comments area below my entries. All I need now are some actual readers which will feel like posting something.
[: wacco :]