2005-06-10

2005-06-08

2005-May Part 2 - Canopy Walk in Cagayan de Oro

sol and I took the whole of May 2005 off in preparation for the wedding, the actual wedding, diving and honeymoon travel. There will be blog entries about all of those later. There are a lot of pics and, actually, I haven't organized everything yet. I need to get pictures of the wedding itself from friends since we don't have any on our own camera (forgot to assign someone to take all the pics, we had kublai or jen in mind for that, but they were late for the ceremony).

On May 3rd we went to CDO to meet friends and go whitewater rafting (blog entry for that and pics, later). The rafting was on the 4th. On the 5th we went on the Claveria Canopy walk. There are two or three canopy walk adventures in the Cagayan de Oro area. The Claveria one is the first and the best.

It's a long drive (maybe 2 hours) to the jump off point. I'm sure everyone has pictures taken there. So did we, of course.



That sign says that it's 1.5 kilometers to the top station. It's not a difficult walk, but there is going to be sweating. Also, both times that I went on the canopy walk it rained (at different parts of the course). So don't bring anything large that needs to be dry. Or bring a drybag. The top station is a platform from which we clip on to a zip line




and are lowered to the first station proper.




There was a light drizzle when we got to the first station and the view of the forest in the mist was nice.




From the first station it's just walking over hanging bridges (while attached by 2 clips to another line above).



The bridges, and the line to which everyone is clipped, are very securely attached to the trees.



There are five stations altogether (with, I think, one more not in use, and possible additions as the site is enhanced, the organizers talked about a very long zip line down to the bottom of the valley and a river traverse back down to the pickup site). The bridge to the last station is downward, some people have trouble traversing that. It's all very safe though. At the fifth station, there is a break for lunch. It's usually lechon manok, puso (rice in palm leaf wrap) and some other things. Naturally, there had to be a picture of the lunch group.



There are lots of great views of trees and forest plants. These next ones are of plants that grow on trees.





This is what it's like to look down :-)


And in the distance, it's a little sad to see the contrast between the forest and the farms where forest used to be.

2005-06-03

Mandriva, kernel 2.6.11 and cpufreq

I installed Mandriva 2005 and my scripts for slowing down the CPU stopped working. Well, the cpufreq stuff has been modularized and now, with the stock 2.6.11 kernel that comes with Mandriva I have to modprobe p4-clockmod before the entries in /sys/devices/system/cpu/cpu0 become available.

I'm glad that it's all still there though, I was thinking I'd have to config and rebuild the kernel, something I try to avoid when running at 2.4Ghz in an un-aircon room :-).

2005-05-26

Pleasant Dumaguete experiences

Dumaguete is very nice. I wouldn't mind living here, if there were a good way to make a living.

The city isn't extremely large, noisy, busy, polluted or traffic-ridden. It's sort of what Cagayan de Oro was 15-20 years ago, or maybe not. More like 30 years ago, but with all the modern improvements (DSL internet, cell phone connectivity, motorcycles).

When we arrived there was one taxi and we didn't want to take it since I don't like taxis whose drivers act like pimps. We took a tricycle on a short tour of the big hotels. It's Santacruzan month, so when we went to the C&L Hotel (very nice, I had a good feeling about it) they had no space. Chris, the receptionist was very helpful though. She called around to two or three hotels and got us a room at the Coco Grande Hotel (also very nice, newly remodelled).

I'll be posting something big in a few weeks (need some time to get the pics ready and to get other pics from others who took pics at the wedding), I'm taking this opportunity though to post short impressions that don't depend on pics being ready :-)

Webmail and internet cafes

I'm in Dumaguete, at the SurfShop (an internet cafe right by Silliman University). They have kindly allowed me to use my own laptop for going online. I asked the other internet cafe just a house down (MC )and they didn't let me do the same.

It's nice to be able to work with an internet cafe that knows what they're doing, or at least are helpful and flexible (it's likely that the other cafe is run on fascist leadership lines, something far too common in the Philippines, so that the staff won't allow anything they don't explicitly know is allowed, and they won't call the owner to check if they come across something that's not allowed, here at the SurfShop, they called the owner.

Now, I'm perfectly willing to just surf around on insecure internet cafe PCs (they're invariably windows and, i'm sure, just chock full of viruses and spyware no matter how fascist the security posture because, well, it's just basically impossible to secure windows computers that are open to be used by the public), but I'm just not going to trust any important passwords to internet cafes. As it happens, I had to send an email, so I just created a throwaway email address (bopolissimus_temp@hotmail.com) and used that to send the email, and then all I did was surf around.

But now I brought my laptop over and I'm online, so it's downloading my gmail and I'll read and reply offline (that's around 2 weeks worth of email and there's going to be a lot of it).

2005-05-14

evolution spamassassin and gmail on slow links

I'm on camiguin and the internet access here is slow. I was trying to download my gmail to evolution and it wasn't working, I was getting frequent timeouts (gmail would stop responding). Finally I thought to turn off the automatic spam checking in evolution. Now, the CPU isn't pegged at 100 percent and i'm getting my mail. The mail still takes a while to arrive, but at least I'm not getting disconnected from gmail so often.

I'm using the 2.6 kernel's CPU frequency scaling control functionality to set my laptop at only 300Mhz. that's not why i was timing out though, since even at 2.4Ghz and with remote checking disabled, it was still timing out. SA is just fat and slow and should be disabled when checking gmail on slow links.

I'm running at 300Mhz because this laptop runs so hot (it's not a low power CPU) that it would burn my thigh. I work around that by putting the laptop on top of a hardbound book, but then the CPU still runs so hot when i'm doing CPU intensive things (e.g., compiling postgresql, or the kernel, or even just some modules in the kernel) that the laptop will beep three times and turn off without giving me the opportunity to shutdown properly. Running at 300Mhz lets me do anything I want (albeit slowly) and not run the risk of heat related outage. I've tried at .600,.900 and 1.2 Ghz and those all work too, but i'm being conservative since i don't really need all that power anyway.

Wedding Dives

Sol and I got married on the 8th of May and we're taking the month off. It's been great. Details later, but these are notes to myself so I have an idea what to elaborate on.

1. whitewater rafting and canopy walk in CDO area with tim, tina, mace, mark, hazel. great fun. some pics of canopy walk, but need to develop the underwater camera pics for whitewater rafting.

2. came to camiguin friday, rested that day, saturday many manila guests arrived, the younger set went to white island for sunset, bonfire, lechon and beer. great time, great pics.

3. sunday was wedding day, but that was still for the evening. in the morning we had organized a group trip to mantigue island. sol and i were going to dive the wall with barb, salve and katya, and diggi was going to conduct intro dives for seven people. everyone had a great time. pics in a future, more complete post.

4. wedding sunday afternoon. at the last minute (well, 3 hours or so before the last minute), judge borromeo determined that it would be possible to have the ceremony at the hotel, so that's what we did. that made things much more convenient and everyone could look on. short wedding ceremony, judge quoted from shakespeare. good party after, with tina and cecil emceeing. we forgot some things (sparkling wine poured at all tables for toasts, so eugene started the water toast :).

5. we started the advanced open water diver course. great dives. navigation at tangub, peak performance buoyancy at old volcano, drift dive at white island today, night dive at tangub tonight. deep dive tomorrow at old volcano. or maybe canyons.

it's been a great 1.5 weeks so far. the rest of the month is going to be awesome. and then i'll be excited to go back to work.

2005-04-20

Cagayan de Oro online phone directory

I had to get phone numbers for some Cagayan de Oro hotels so that friends who were going there could query prices and book (they still don't have web sites, or the web sites don't come up early enough in google) and I remember that there's a handy site for searching for CDO phone numbers. CDO-ID is a searchable site for numbers.

Now, the front page hasn't been modified since around 2001, so possibly the phone numbers aren't the latest either, but most of the numbers will still work.

I remember that when I used to work for an internet provider in CDO I wanted to do something like CDO-ID too. Years before that I'd gotten hold of the Misortel phone data and had a searchable site (long gone now, hosted by weblink i think). Well, I tried to get the data out of the telcos, but they were incredibly unimaginative and I never really could get the data out on a regular basis so that I could have a reasonably up-to-date directory. Eventually I gave up trying, particularly when I found out that CDO-ID already had a site.

This resistance to putting up phone numbers on the internet is a major stupidity for any telco. After all, if the phone numbers are online, people can search for them and they're then likely to make long distance landline calls. The cellular telcos should probably also do something similar, at least for their postpaid accounts, and maybe some sort of interactive prepaid directory too (aliases allowed, but maybe filtered for obscenity and illegal names). That would probably drive up voice traffic.

But I don't see the celco's doing that either. They don't like change, despite their business being founded on technology, where change is so fast, it's essential to embrace it.

2005-04-19

Istana Bali

I was with sol at Club 650 (Libis, near Shopwise and Eastwood) yesterday for badminton with friends. After the games we went up to Istana Bali, a new restaurant there. The food was OK. A bit overpriced, but that's just me, newly in from the provinces and eternally afflicted with sticker shock. Except for the draft beer. A mug of draft is only PHP 25. That's cheaper than the Pale Pilsen, SM Light, Super Dry and Strong Ice! In fact, it's almost half the cost, since the other beers are either 45 or 55 (i wasn't paying enough attention to remember exactly).

I'm going back there. Not just because of the draft (although that's a big deal) but also because it's pleasant, cool, the restaurant is new, so the owner and the staff are doing their best to make a good impression. We ordered one item and changed it to a lower priced item, but the bill came back with the original item on it. It was certainly an understandable mistake, I'm glad I caught it, but I'm sure it wasn't intentional. But because of that we got another (small) item taken off the bill and the owner apologized for the mistake and was very nice about it. That's not something I see a lot and I appreciated it.

one letter passwords

I was listening in on a conversation on passwords the other day. One of the people in the conversation mentioned that they knew someone whose password was "A". Just the one letter. And there was a conjecture that maybe that was a really hard password to guess since, most people would think 3 was short and no one would think that anyone would use a one letter password. This was for windows login passwords, so it's not something that would normally be attacked via brute force somehow, although in an organization with lax password controls, the same password might also be used for email, file shares, etc. In which case the situation suddenly becomes worse.

Anyway,I thought about that a bit, and yesterday the refutation came to me. A one letter password is a dead giveaway because it's so easy to shoulder surf. It's not even necessary for the shoulder surfer to actually see what's being typed. It's sufficient to see that only one character was being pressed. After that, it would be trivial (in the lax organization, more security conscious organizations would have failed password limits and timeouts) to try all the one character printable characters on the keyboard and log in.

2005-04-11

usb thumbkey svn repository speed

I store (most of) my source code in a USB flash drive. Originally it was ext2 (because my previous thumbdrive was ext2, because i couldn't put reiser on it, at 32MB the old drive was too small and reiser wouldn't mkfs on it). Yesterday I got frustrated because commits were taking too long (small commits, but they were taking 2 minutes or more). So I did an svnadmin dump and also tar-gzipped the repository and rebuilt the filesystem as reiser.

Reiser said how much of the disk it would eat, and then proceeded to make the filesystem. After the load, checkouts, commits and updates are very much faster. I think I'll stay with this. I'm not sure what the problem was though. It might just have been that svn was trying to update too much data there (maybe the strings file, which is 6MB) and was just slow yesterday. Or it might be that reiser is just doing something good and it's a better match for SubVersion. I'll keep track of when it gets slow again. If it never does, then I'll stick with svn, but if it does get slow, I'll try xfs and jfs for svn, just for fun :).

long time

The older I get the more memories recede into a haze. But some things stick. One event I particularly remember had me with my face being pushed in the grass by some neighbors. I'd probably been snotty or something, and so these two kids (they were smaller than me, so it was only fair that they gang up) started beating on me. I put up a good fight, but eventually the sum of their masses began to tell and they had me on the ground eating grass.

My brother was at home, maybe 200 meters away, but he seems to have noticed the commotion. Instead of going out the front gate, he climbed the back fence, ran over, and took the boys off me. He didn't go and fight them himself (he probably knew that I'd been snotty :), but it was cool that he took them off me so I could get up.

Then we went home. No fuss, just a regular day.

boost regex!

I posted on the PLUG mailing list about regex libraries in C/C++. Matt Baluyos pointed me at PCRE and paolo falcone pointed me at Boost. I decided to go with boost because I couldn't stand the PCRE library.

That's not to denigrate the quality of the library, it works, very well. I use PCRE implicitly in PHP and it's a great help and is incredibly easy to use there. But C is now just too low level for me and while I can work there, I don't like it much. If I can, I work in PHP (perl is far too ugly for me, although that could change if i were to work in it instead of just reading it). I'll be working in java soon, but I tend to have a bias against it for small projects. I'm sure it's great for large projects, but even there, the libraries and frameworks seem over-engineered. But that's probably just a function of the fact that they're large enough that I can't get my brain around them in a week.

For anything lower level that I can't do in java or php, i like C++. And that's where I use the boost regex libraries. I've written utility functions that hide some of the details of the boost implementation (just pass string pattern, string data, vectormatches, and internally it does everything else). there's also a similar set of utility functions that passes the pattern as a regex const reference instead (so that patterns that are used all the time aren't re-compiled).

it's very nice to be able to say:

vector matches;

if ( re_search(pat, line, matches) )
{
for (int ctr=0; ctr < matches.size(); ctr++)
do_something_with_match(matches[ctr]);
}

2005-04-07

php, popen, stream_set_blocking(...,false)

So I thought that I could make a "multi-threaded" (but not really) program in php by using stream_set_blocking. Well, the things I need to do simultaneously involve calling popen on external programs and then reading the data and doing something with them.

Well, popen doesn't work with stream_set_blocking(..., false), so I can't do things that way. Unfortunately, I've spent a week or two setting up the framework for all this (so it would be easy and convenient) but now I find it can't be done.

Oh well, time to give up on trying to do that in PHP then, and just buckle down to doing it in C++ (the original version is in C++, but frankly, I just don't want to maintain that code anymore, no choice now though).

2005-03-20

The American Empire and the End of Freedom

One should, of course, take what is said with a grain of salt, given the
source. The guardian is consistently anti-american.

On the other hand, there is no doubt that much of the article is true.

As a practical matter, the US government, and, in fact, most (but not
all) of the americans on the ground care far too little about the rights
and welfare of the people they walk over. They are too focused on their
own needs. As far as that goes, so is everyone else, focused on their
own needs.

But the U.S. does itself a disservice by hewing closely to the theory
that the rights enshrined in their constitution apply only to their
own citizens, and apparently, only to those who are convenient and
are actually on their own soil.

http://www.guardian.co.uk/afghanistan/story/0,1284,1440836,00.html

For myself, well, i watch, mildly amused, while U.S. policy, and many
of their "heroes" (they're not heroes, they're kids put into warzones,
defending themselves, and all too often brutalizing the population
because they don't understand the local culture and because their
american pride [and those attack helicopters, bradleys, tanks, humvees
and overall military superiority] make them accept without questioning
the importance of their own survival as opposed to the trivial needs
and rights of the populace) descend into the natural depravity of
absolute power and empire.

Probably, many americans would vote against their own government
instantly if they understood what their government is doing to
non-americans, and to the american ideal. But most of those americans
are too comfortable and are unwilling to risk the difficulties that
would come of trying, vigorously, of changing their government's
policy. For those few, I wish them luck. For the rest, well, I wish
them luck too. It's going to be a difficult century, or longer. The
descent into depravity from power is long and fun for a bit, and then
it gets worse.

2005-03-14

So you want to be a consultant?

I saw So you want to be a consultant? long ago. I'm looking at it again since someone on a mailing list pointed at it.

I'm learning again. Some of those lessons I haven't internalized yet. It'll take a while, a lot of things do. I'll get there yet :).

2005-03-10

Rsync and compressed files

I did some testing and I find that generally, it is better to rsync uncompressed files rather than the corresponding compressed files or archives. at any rate, tar.gz archives are bad for rsync. tar files are OK.


  1. i took a directory of source code and test data, around 9MB.

  2. copied it to a remote box

  3. tar cvzf on both sides to one file and also tar cvf to another file.

  4. on the source box, edit one source file, insert only one line.

  5. tar cvzf and tar cvf on the source box. the source box should have sources, tar and .tgz which vary in only one line in only one internal file.

  6. rsync of the source gives a speedup of 450 (14K sent, 94 received), rsync of the tar file gives a speedup of 85000+ (78 bytes received, 20 bytes sent), rsync of the .tgz gives a speedup of 1.48, (2.4MB sent, 12K or so received).

so rsync of a tar file is best (because only one file needs to be analyzed to see where the differences are). rsync of a compressed file (at any rate of .tgz, but probably of any compressor) is bad. not sure why, but i wouldn't be surprised if the compressed representation of a lot of data depends on what has come before, and there may be other effects like that which
confound the difference finder since too much is found to be different.

2005-03-09

Sagada Mountain Tea

I'm almost out of Sagada mountain tea. This is not good. Sol and I are going to have to go back there and bring more back. Maybe ten bags instead of the measly two bags we brought back last time :).

I've been googling for the tea and I can't find anything that says it's for sale in manila. There's got to be somewhere that has it. I just can't find it. Maybe it's time to ask the mailing lists. That might save a trip to sagada. It would be good to go, but I need to save money for the wedding in May.

Saisaki music

I was at Saisaki megamall the other night. I would have a link there, but I don't since i don't see an official saisaki web site on the first or second page in google. these people need to hire an SEO :). the one link i clicked on was some whining about a "saisaki trap", which is, i suppose, bad enough, but... if that comes up ahead of the real saisaki web site, well, they need to hire an SEO.

Sol and I met francis, my brother. He's in from the U.S. and is nuts about japanese food. Sol asked me what francis looks like and I couldn't answer. I'm just no good with faces. When francis arrived however, it struck me. he looks like Ming Tsai! :).

Anyway, the food is always wonderful there. I always love the salmon sashimi. Sol ordered the uni for us, my first time, and it was incredibly good.

but the music sucks. I mean, country muzak is really, really bad. Whose damn fault is that?

2005-03-03

corporate peer to peer

is almost always a mistake. at any rate, it is anywhere where bandwidth is expensive.


I was just talking to someone at a company I do some consulting with. I was working remotely, and the link was ridiculously slow. Ping times were at around 1 second, and sometimes 1.5 seconds. I could still work (i've got some techniques involving rsync, for very bandwidth starved links, and i just type ahead), but I could work better if the bandwidth weren't so slow.


So I talked about the serious need in corporations to take steps to block p2p, and then, since it's impossible to block it completely, probably, to do as much as it can to monitor p2p and then to have a policy about p2p use (probably that it should not be allowed at all, and that it would be blocked and monitored, and violation would affect performance reviews).


That may sound draconian, but it's necessary.


  1. bandwidth costs money. even if it were cheap, if peer to peer didn't soak bandwidth the company wouldn't need that much bandwidth and could contract for less, thus paying less every month. That's money that goes straight to the bottom line.

  2. the company i'm using for my example runs its own publicly accessible mail and web servers and therefore their bandwidth is all fixed IP. That's a bit of a bug on the part of IT management, they could go with 80% dynamic IP bandwidth and then 20% fixed IP for mail and web. They would save quite a bit of money right there since fixed IP bandwidth carries a very high premium in the philippines. they would save more money just by buying dynamic bandwidth for staff time-wasting surfing and buying less fixed IP bandwidth for those services that require the bandwidth.

  3. in a litigious world, it's for the company's good that peer to peer is blocked and violations monitored and punished. The same company has received a warning letter from a RIAA/MPAA related agency, apparently someone had left their bittorrent client on and had been downloading and serving enough files that they attracted someone's notice.


Naturally, this sort of thinking won't sit well with employees. But frankly, I don't think it matters. The staff aren't being monitored for wasteful surfing (of which, perhaps half of all surfing at the office is wasteful and not work related or only very peripherally work related), so their surfing for entertainment is a free benefit of employment. It's only fair that those online activities which might be damaging to the company be disabled so that other online activities of neutral or only mildly negative value may be allowed.