October’s Cloud

Categories: blog



Its this time of day again. Thanks to google calendar. I get to keep track of it. Time for my October’s Tag Cloud on Delicious!

October's Cloud

Any emerging patterns? I can’t see one right now. Maybe its too early.

Stolen

Categories: blog

My bike got stolen. :(

On Saturday (18 October 2008) or maybe Friday.

Now I have to go around with busses and walking and carrying Python Pocket Reference in case I get bored while waiting for bus or for long walks.

The reason I’m carrying the pocket reference is that it fits into my pocket unlike stuffs that I like, PC Gamer which is a hassle to carry around unless I wear my jacket.

CSS Framework

Categories: blog

There’s been quite a lot of noise coming out from the post by Jeff Croft about CSS Frameworks and its follow-up post to clarify the original post. I’ve been using Blueprint for quite some time, a year or so and I’ve been using it for all of my projects.

Things that blueprint can’t do doesn’t bother me as I can do it myself.

Life as a wiki admin

Categories: blog, rants

Well, today really sucks. I was pissed off by a colleague giving sarcastic remarks when I was trying to do what I think is something good for everyone, by politely requesting them to put information into our department’s wiki. Thus ruining the whole day.

I really don’t know why I bother with the wiki. Nobody is giving any cooperation.

Everyone is keen on using word of mouth and take notes on their own. This is killing my enthusiasm and my spirit. Very depressing. I guess I’ll try confront this colleague and give a piece of my mind tomorrow.

I’m gonna set my expectations of everyone to none. Just face it. Nobody is going to update the wiki with info (except the librarian). Nobody is using it as reference (except for me). *sigh*

Research and planning for scaling..

Categories: blog

Argh! Somehow after the time I took to write this post it got lost and was not saved by wordpress. Now I can’t remember what I typed but I’ll try anyway. So here goes whats left in my short term memory…

I’ve been doing lots of research on MySQL and application clustering, load balancing, web application testing and other kind of stuff to make the company’s application scale and meet future demands.

There’s no blueprint in making an application scale but there’s lots of guidelines to make it work. Posts from HighScalability.com lets you see the stories behind few of the biggest web applications on the web today and how they are doing it. Centalized? Distributed? These decisions are made with the network team (since they know the network better than us developers). Use real options in strategic decision making.

So anyway, to make a long story short, I voiced my opinion on centralized system with support of CDNs. It is much more cost effective than opening up regional centres and doing synchronization between regional system (which I think would be a nightmare). They decided to go with the CDN (I’m so happy they listened to me :D) and now I have to plan on making this all work!

Lots of planning and less coding for me nowadays. Hopefully I’d be able to comeback up to speed in developing applications and posts more of my code snippets.

September’s Cloud

Categories: blog

I’m doing an experiment. Post my Tag Cloud (from my delicious account) using Wordle every month. And see the progress. Over the months or years.

There might be a pattern that I’m missing.

September’s Cloud

Take a step back and think!

Categories: Troubleshoot

On the weekend, I reviewed the tree traverse function that I did for an ongoing freelance project. Each node have 3 child. I tried to insert 200 records and it took quite a long time to insert the records into the database. 23 seconds.

thinking cat

I am quite sure of the code that I didn’t bother to look at it first and search for other means of alternative on improving the insertion. I googled around for MySQL performance and found a few posts on MySQL Performance Blog. Merge Tables. I need to find out more about this storage engine. I opened up High Performance MySQL, and read up on it.

After an hour reading the book, thinking of ways to implement it and including the constraints of current web host, I thought to myself, this is too hard and complicated, not that I can’t solve hard problems. Haha! I took a few steps back, and try to do something else like watching a funny anime, Gintama. Sometimes taking a break unravel the mind from all the messy thinking being done and makes it easier to think clearly.

Later on I try to think about it again and found out that I’m doing a depth-first search. Which is why it is taking such a long time. I rewrote it to use breadth-first search and it solved my problem for the mean time. I still have to test if it can handle 6165 data insertion.

Check for valid date

Categories: blog, code, php

Maybe I’m missing something here. I really think something like this already exist out there. Could not find it so I tried my own.

$pattern = '/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}$/';
$subject = array();
$subject[] = '30/04/2008'; // valid date
$subject[] = '/30/2008';  // invalid format
$subject[] = '111/30/2008';  // invalid format
$subject[] = '04/30/2008'; // invalid date

foreach($subject as $item)
{
  preg_match($pattern, $item, $matches,  PREG_OFFSET_CAPTURE);
  print_r($matches);
  if($matches)
  {
    list($day, $month, $year) = split('/', $item);
    if(!checkdate($month, $day, $year))
    {
       print "
invalid date: $item"; } } else { print '
invalid format'; } print '
'; }

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.