Alright! I just stayed awake for 23 hours! No, I'm not a cyborg, although the title of this post, and several other reasons, may prompt you to think so! No, all the exclamation marks are not a result of a caffeine overdose! *cough* Ok, I'll stop now.

Well what did keep me up for 23 hours (12 of which were spent at work), or to put it another way, awake till 6:32 AM, was the big change I was making to the site. I know a lot of you will wonder what I'm talking about, given that the site looks practically the same. The difference is in the way the site now exists on the server side. TheincredibleRoach is now a whole lot "smarter" with PHP scripting, and connected to a MySQL database.

With PHP and MySQL, although the content of this post looks pretty much the same as the one in the last post, the difference is that it isn't part of the HTML anymore. Instead, the post Title, Date and Text are all stored in the MySQL DB, and is getting pulled out and displayed here for you to see by PHP.

So why go through all the trouble - it still looks exactly the same doesn't it? It does, but it also allows for me to build in some neat features in the future. This Newsfeed, as I had originally envisioned, will slowly evolve to include features you find on a blogging site and more. Here's what's planned:

  • Integration with facebook... to allow sharing and commenting
  • Making the posts searchable... with MySQL - a viewer can actually search through all the posts (not just the Titles) for a specific word or phrase
  • Server-side pagination... so that the site loads just the latest 10 posts when the viewer comes to the Newsfeed, and gets the next 10 when the viewer is reading the second last post - when the posts start adding up over time this can make a significant difference in how fast the page loads
Currently the pagination on this page is occurring at your end, i.e. client-side, using a JQuery plugin.

I've used PHP and MySQL back in 2005, with the old site. Needless to say, getting back to using it now is like learning it all over again, with the added frustration of not being able to understand code I myself had written back then. And of course, a lot of hours are spent solving mundane problems - like PHP not being able to talk to MySQL. Yeah, that took me about an hour to fix. JQuery too is new to me, and I'm still figuring it out, along with facebook Connect.

Luckily I've been involved in some UI development at work (I've become the unofficial "UI consultant" in the team) so my HTML and JavaScript isn't terribly out of shape. The same can't be said about me though... but as long as my site looks good, the chicks will still dig me. *force mind-trick on self*

This site is as much a way for me to share my thoughts and creations with the world as it is a way for me to learn and experiment with new tech and concepts. The roachLab section keeps a record of the way the site evolves and changes over time.