Demand

The other day Grace took Bryan to visit our neighbor and her cats. Before they left, Bryan refused to return one of those cat toy feathers. His excuse? He wanted it for one of our cats! While he was holding on to the toy, he kept saying “Wawa… Wawa…”

And as soon as they walked in the door, I heard Bryan screaming “Wawa! Wawa!” while victoriously waving the feather in the air. I guess now we enter the stage of “possession” when they start to form the idea of ownership. But we are more interested in the fact that Bryan has learned to use other objects to play with our cats and having a lot of fun doing it.
.
.
.
Young toddlers — they are so cute and cuddly when they behave. But when they have tantrums, I swear they must be mini-devils sent to earth to make adults suffer. A couple of days ago I had a “debug-a-thon” for 16 hours straigt… 12 of which working with clients via emails and IM… And just when I felt like I could finally take a breather and go to bed at 4AM, guess who decided he had enough sleep? My “boss”.

After spending almost an hour entertaining him, I finally “ran out” of good mood and started getting impatient with him… That’s when Grace stepped in and took over.

I guess good parenting also means good collaboration between the parents. Grace and I try to take turns to make sure we are in best of our moods when Bryan’s around. If one of us starts to feel fatigue having spent a lot of time with him, the other person can usually tell and grabs Bryan giving the first parent a break. On that, we have GREATEST respect for single parents! Or… heck, stay-at-home moms/dads who are along with kids ALL DAY!

Super “Bombs”

Up until 2 days ago, stories of parents exaggerating about just how messy their babies/toddlers’ poops at one time or another were had been, well, just fairy tales.

Bryan had a diarrhea — I suppose this phrase alone should foreshadow what’s about to follow. And the problem with that was, he’s had a LOT of food prior to the “event”. So when it DID happen… let’s just say an atomic explosion had been witnessed where it shouldn’t have been witnessed. Even worse, I was contaminated with the “material” unknowingly until it was way too late — it was over my clothes, jeans, and it left a 10-meter trail.

But Bryan had the worst end of the stick. His lower body was practically soaked with the “stuff”, and EVEN he knew that this was HOLY SHIT bad (no puns intended). When I put him down on the changing pad, he kept his legs up high and just gave me a face (“Hurry up, buddy. This isn’t going to be pretty!” ). You probably think this can’t get any worse — OH YES IT CAN!

Wondering why his butt is so watery, Bryan kept reaching to touch his butt, which made the already frenzy experience even more dramatic. And then there was the part where I had to peel off two layers of his clothes, both of which were worn over the head, without the “stuff” touching his face (too much). All this was happening while his hands were waving around with the “stuff” on (in spite of me trying to whipe as much of it off as quickly as I could).

Bryan ended up having to take a second bath for the day.

Just when I was about to hit “Submit” for this entry, Grace frantically came running from the front door announcing yet another messy diarrhea that took place while they were at Costco. So we went through the whole routine again, except this time Bryan went straight to the tub!

We may laugh about it now, but both experiences have been somehowat traumatic for Bryan. He was very confused and cried as if he did something wrong (as we know, it’s a scientific fact that the universe revolves around toddlers). So we tried to keep the mood light and go through the notion that it’s okay to be messy sometimes.

Organization Freak

For those of you who’ve know Grace for long enough, you know Grace is an organization and clean freak. Everything in the Universe has to be in certain order — her order. For example, anything with a 90 degree angle MUST line up with perpendicularly with the edge of the table the object is sitting on. If it’s even one degree off, she’ll take the time to realign it no matter how busy she is.

So you can imagine I kind of live in a Cubist household where everything is lined up straight.

Ever since Bryan has become “mobile”, we noticed that he’s taken on this particular habit of Grace’s… at the age of 15 months… Three examples here:

1. Grace taught Bryan to put his toys back to where they belong before we pick him up from his playpen. The other day when I went to pick him up from the playpen, the first thing he did wasn’t putting his hands up, waiting for me to grab him from his underarms. But rather, he immediately started putting all the smaller parts of his toys into this “cooking pan” and even put its lid on. What’s more is, if an angular toy was misaligned in some way, he’d also take the time to put it back “in order” before he even closed the lid (i.e. if a toy was put in there side ways, he’d flip it around to make sure it’s in standing position). NUTS!

2. Bryan crawls all over the place in my work room when he plays. He’d throw things around and crawl to fetch them himself. One time I saw him, god forbid, accidentally bumped my computer bag out of “alignment”. He intuitively reached out his right arm to adjust it so that its back is flushed to the computer on the floor! WHAT THE….

3. The other day a friend from L.A. was in the area with his wife and 13-month-old (whom, by the way, has been WALKING since 12 months). The kid was walking all over the place and kicked the rug hard enough so that one corner was turned. Bryan, who was crawling behind him, immediately made sure the corner was put back in place before he crawled on to his play.

Now that’s discipline.

Plans are in the works to turn him into a back-scratching, shoulder-massaging, dish-washing and foot-rubbing machine.

Review of Mac PHP Development IDEs

Coding, some argue, is an art form. You try to achieve the best results with the most elegant codes you put together within the deadline. And those codes often go through different stages of metamorphosis as you gain more understanding and insight in the knowledge of coding… I don’t mean to get all “Zen” about this, but true geeks know what I am talking about.

And that’s how some people approach the kind of tools they choose to use doing what they do. I, for one, like the minimalistic and swiftness an all-purpose text editing tool like BBEdit offers. It’s light, fast and pretty powerful. And more importantly, it doesn’t screw up my codes like Dreamweaver probably would. But after having dealt with a couple of decent-size web developments, it’s become pretty evident that BBEdit is showing its weaknesses in areas like, for example, debugging, syntax auto-completion and project organization. So I started investigating using IDE to speed up development time and accuracy. I looked at and tested the following packages for Mac OSX:

Apple Xcode
Zend Studio
Eclipse (via PHP plugins: phpEclipse or PHP IDE for Eclipse)
ActiveState Komodo

I also checked out a couple of other simpler, not-quite-IDE, apps just for comparison’s sake against BBEdit:
PHP Studio
Smultron

For you Windows people, someone at IBM also did some homework for you…

Apple’s Xcode was pretty much out of the game as soon I started looking at the specs. There’s no debugging for PHP at all. PHP support stops at syntax coloring. Considering that the IDE is really meant for Macintosh desktop application development, there was no reason for me to pursue further… though I secretly wished it would just somehow magically work…

Next I tested Zend Studio along with Eclipse. Zend’s PHP debugger is very useful in catching even the most insignificant things like if a variable was declared but never used. It also supposedly comes with a “profiling” feature that tests which parts of my codes take the longest to execute so that I can perhaps write a more efficient code. But I never got that feature working. Even Zend’s own documentation and online forums are useless in solving the problem. Another very annoying thing Zend did was including features that are NOT supposed to work unless I paid for and installed Zend’s other products. Zend should at least have the courtesy to gray out those features. But instead, the company simply assumed that those products were already there and lets the user generate endless errors. There are other issues I ran into which made me feel that no one should have to pay for this software — it felt like a cheap beta.

Eclipse is an open source software which plenty of Java developers seem to love. Kyung first told me about Eclipse when he was using it. The setup was pretty straight forward and the debugger was also pretty nice, but its messages weren’t as contextual and as helpful as those in Zend Studio. But it was still a lot more helpful than PHP’s useless error messages. The only complaint I have about Eclipse is its performance on my aging PowerBook and lack of straight forward support for profiling (no graphics, just a bunch of tables).

Komodo is made by the same company that makes ActiveState Perl for Windows. It has by far the BEST user interface of all IDEs for Mac that I’ve tested, and it’s also most Mac-like. Unfortunately, it complained that my installation of PHP was bad (and won’t say why) and refused to work with it. And in order to get profiling to work, I’d have to install xDebug (which I did) and mess with a bunch of settings… It was pretty disappointing not getting Komodo to work.

PHP Studio and Smultron are pretty much like BBEdit except that PHP Studio has a more superior IDE-like code organization (like recognizing functions and classes that I’ve written within the same project and put them nicely in a side panel) which BBEdit doesn’t even come close to having. Unfortunately I could only work on one file at a time (no multiple tabs!). Smultron is pretty much a free version of BBEdit with a few things missing (which I don’t really care about). I probably wouldn’t have paid for BBEdit if I’d known about Smultron sooner….

So at the end, open source rules again. Come to think of it, I’d be pretty embarrassed if I were the project manager woking for Zend Studio or Komodo for making such awful products (though I should give Komodo the benefit of doubt since I couldn’t get it to work).

No wonder Apple ended up making its own IDE seeing that the mac programming IDE market is littered with such inferior alternatives. I wish someone would write an extension/plugin for Xcode and actually make it useful in coding web-based projects (PHP, Javascrit… etc). Maybe Xcode 3?

Damn Chinese Characters

I finally got around to upgrading the user forum at SCAD‘s Chinese Student Association website the other day. I got fed up with phpBB last year after Lawrence and I were endlessly patching the damn forum for security and spam breaches. Thank god he found Simple Machines Forum (or SMF for short) and we’ve been happily using SMF ever since. For one thing, SMF runs a lot faster and cleaner with a lot more useful features came included in the base install. And additional mods were in the form of plugins and add-ons. And even then, I can easily find AND install plugins/themes from within the control panel! Under phpBB, installing mods means literally opening up half a dozen files (sometimes more) at a time and manually add codes to the base install, which is extremely unsanitary, messy and makes version upgrades a pain in the ass.

One of the legacies that phpBB left after the migration was lack of support of UTF-8 Unicode standard for Chinese character sets. As a result, the damn forum is unreadable if a visitor happens to be on a machine without the appropriate character sets installed. Worse, we have had to support both Simplified and Traditional Chinese, which is a real pain because by selecting one character set means making the other unreadable.

So when I upgraded the SMF forum, I tried converting the entire database from a dirty mix of Big5 and GB Chinese character sets into UTF-8, but something went wrong in the prepackaged SMF UTF-8 conversion tool. And the all the Chinese characters were made into garbage text! Thank goodness SMF made a backup during the upgrade and I was able to fully recover every piece of content.

I guess I will try again the next time SMF releases an upgrade.

The next big thing for the site is to seamlessly integrate some kind of content management system and a wiki so that a single login session session can be used on everything else. This has proved to be a lot tougher than it sounds so far. A couple of kids tried remaking the site as their “independent study” projects. But at the end, that was all it was — a project. The designer-types made the whole site (minus the forum, which is my domain) in HTML, which made updating nearly impossible. That then perpetuates into nobody wants to learn how to mess with the HTML content. Hopefully a wiki and an easy-to-use management tool will make things easier when I get around to doing it…

The site has grown in importance over the years. It’s so far still an “underground” organization as far as SCAD is concerned (or else we’d be shut down by now). But personally, I think the damn site is responsible in recruiting at least 80% of potential Chinese-speaking kids who eventually end up at SCAD. And for that, maybe SCAD oughta pay for the hosting!

VNC on Fedora Core 6

Setting up VNC on a Linux box is always such a hassle. But I had to do it again today so that I don’t have to deal with two sets of mic and keyboards when I am testing my work in VMWare.

Thank goodness for this article that I saved a bunch of time having to figure things out myself. Maybe in the [always] good old college days, I’d have done that. But now time is of utmost importance with an active child in the house and all…

The only hiccups I got was that the above setup failed to discuss the issue with firewall and iptables. To allow outside access (even within the same home network), a port must be open to allow the traffic to flow through. There are a couple of ways to do that:

Adding a rule through a GUI in Gnome:

1. Go to

1
System -> Administration -> Security Level and Firewall

2. (enter the appropriate password when prompted)
3. Under the

1
Firewall Options

tab, click on the white arrow at the bottom that’s labeled

1
Other ports

4. Click on

1
Add

and enter the port number you are allowing access; in my case, it was

1
5902

for display number 2. (Leave the

1
protocol

at default, which should be

1
tcp

5. Click

1
OK

all the way out, and iptables should have been restarted with the rule in place

A geekier way to do it is through command prompt:

1.

1
sudo vi /etc/sysconfig/iptables

2. Add the following line to the rule:

1
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT

3. Restart iptables by issuing:

1
sudo /etc/rc.d/init.d/iptables restart

Another thing that many Linux novice (like myself) don’t quite grasp is the fact that Linux’s GUI is not at all tied to the operating system. You can have Gnome, KDE, Flux or Blackbox as GUI options installed on the same OS. And you can switch around as you please upon setting the preferred desktop and log/in again. When you are viewing the remote system through VNC, you can do exactly the same thing — you can define what type of GUI you want to see as you launch your preferred VNC viewer client:

Edit

1
/home/_vnc_user_name_/.vnc/xstartup

as such:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" -e ./menu &
#twm &
#fluxbox &
gnome-session &
#startkde &

Noticed I commented out (#) some desktop GUI options at the bottom except Gnome. Basically you can use any one of them anytime as long as you restart the

1
vncserver

after you’ve made the changes.

Hello to Tai

Patrick and his wife, Ee-bin, had a baby last night (the big-C). They named him Tai, or “Lucky Tai” to be precise. They say he brings luck to Patrick because ever since Ee-bin’s pregnancy, Patrick’s screen writing career’s been going pretty smoothly. Hard work, you say? Blah! Hard work is overrated — luck is everything… 😉

Lucky Tai

Speaking of Patrick and luck, he and his partner, Marcus, are having a ball with some of the latest projects they are working on. Rumor has it that they’d been contracted to write the script for The Saw 4!

Here’s the clip for which they got picked and went on to win the Project Green Light.