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.

2005-01-27

Battad

Back in the middle of October 2004, Sol and I went to Battad (I'd link to something there, but I don't see anything good in the first few links in Google, and there aren't that many hits). I'd been there before (in 1997, with danilo and kim, if they develop websites or blogs I'll have to come back here and link to them) and had been raving to her about how great it is there. Of course, this was in hindsight, and years after the difficulty of the hike up the mountain had receded into a pleasant memory.

This trip, we took the overnight bus to banaue, had breakfast there, took an overpriced (PHP 300) tricycle to the jump off point at Battad (long ago, we took a jeepney to I forget where, maybe Bangaan, got off at the junction and walked up the mountain). They've been building a road so the hike is much nearer if you jump off from the end of the road, and much nicer if you start walking from the junction. Here's a view


of the walk from somewhere around the end of the road down to the ridge that has the hostels where tourists can stay (click on the image for a larger version).

From the end of the road, it's still something like 45 minutes or more to battad itself. It's mostly downhill (and you can shave some time off that by taking the much steeper route, we didn't though since it was drizzling and slippery when we got there).

When you get to the ridge with the hostels, there are a whole range of choices. Most of them are about the same. There are slight differences in hostel "personality", but they're generally all good. This trip, we stayed at Simon's. We were going to stay somewhere else, but there were other guests there. Simon's is a bit out of the way (only a really little bit, it's just beyond Rita's I think it was, and beyond Simon's there aren't any more hostels). The rooms are basic. There are no 3 star hotel amenities here (although the bathrooms are very good, much better than they were during our last trip). There's not even any electricity in Battad (maybe in a few years there will be, there isn't now though, although I think one of the other hostels had solar power or similar, not sure what they used it for though). The room was very comfortable though. Everything at Simon's was great. I'm sure at the other hostels it's much the same.




I artistically disarranged the pillows there :). It's neater than that.

Here are views of Battad from Simon's. Click on the images to view larger versions.


a view of the village of battad from Simon's dining area
Battad from our bedroom window


The food in Battad is nutritious and good, but there's not that much choice. For the
sake of adventure, we had the pinikpikan chicken. It's interesting to think about, but I'm not having that again. It's not just because of what they do to the chicken, but also the fact that the soup is bathed in the smoke of the chicken's feathers. That gives the whole thing a strange bitter taste that I don't much enjoy. Last time I went to Banaue, Battad and Sagada, I had a lot of omelette. You can still get omelette wherever you go, that's probably the safest food choice for most people. You can work off the cholesterol walking up and down the mountains.

Simon's has reasonable pizza and pita (well, actually, they use the same flat bread for both).

We thoroughly enjoyed our stay. To be honest, the walk down wasn't that much fun. And the problem with staying in Battad is that one should leave early in the morning

to walk back up the mountain to the junction point. There are always great sights

along the way though.

We had contracted with our tricycle driver to pick us up at 9. We were a bit late, he waited for us and told us that he had some other passengers but he arranged for us to take a jeepney back to Battad instead.


2005-01-25

normal distribution

I had to write a program that needed to simulate random data that was normally distributed (bell curve distribution).

Fortunately, I was able to grab a copy of Numerical Recipes in C and found some code on p. 217. The code produces a normal distribution in the range -1.0 to 1.0 with a standard deviation of 1.

My program was PHP, so i translated it from C (K&R!, boy that's old :)

The PHP source is here

Unfortunately, I'm not a mathematician and I'll need to find ways to adapt that code or find some other code where I can adjust kurtosis, standard deviation, etc.

I'd look in Knuth's Seminumerical algorithms, but it might not be there. And anyway, my copy is in Mindanao. I won't be able to refer to that until I go in May.

2005-01-20

Email from idiots is spam

I use gmail, and the spam marking feature, and the fact that it's so easy to use, is very nice.

Every once in a while I see vacation messages posted to mailing lists. Every single one of those I mark as spam in gmail. Partly I do that because people who don't know enough to set selective filters on their vacation messages are too dumb to listen to.

The gmail filter will learn from vacation messages which words score high as spam and perhaps future vacation messages will be marked spam and I'll see less of them. Also, the authors may start to score higher as spammers. That's a good thing too, for me. I'll see less of their mail since their mail will automatically go to the spam mailbox, and when I go in there to confirm which emails are spam, I get a chance to despam those emails which are important.

I don't think I've seen gmail do that yet though (filter mainly on the sender's email address), I've seen Bob Reyes' spams about his hosting service end up in the spam mailbox, but that's just because the email was spam, not because the emails were from him.

2005-01-09

Lucky

Sol and I were lucky enough to go on CamiguinAction's Katibawasan Rapelling and Canyoning tour. She was supposed to do her confined water exercises and open water diver qualifying dives. That didn't happen though because of the weather. She did all that when we came back after New Years day instead.


On the 31st though, we were supposed to go back to Cagayan de Oro on an earlier boat, but we took the last boat instead (and lucky to have made it :) because Diggi had some guests who wanted to do the rapelling tour and it was a great opportunity for Sol to go on the same tour. I've done the tour several times, it's neat,


The tour is composed of a hike up to a point above the main falls, walking along the stream to the first wall, and rapelling down the first wall.







She slipped once, but the ropes and harness and the safety setup were excellent and she didn't fall. She just got back up and walked down the wall until she got to the ledge, disconnected the rope and jumped the five feet or so to the water below.







The second (or third,stage, I forget exactly) is a slide. The water wasn't very strong this time, even though it had rained the previous two days or so, but the slide was cool anyway. Everyone else did the slide, except me. I preferred walking down the wall :).










There's another wall, and some walking down the stream and finally we got to the top of the main waterfall. That's too high to rapell down, at any rate, it is for non-professionals. So we just enjoyed the view (there was a slight drizzle, making for a beautiful cool day) and Sol looked over the edge.







After walking down walls and sliding down canyons, of course, we had to do everything in reverse :). So we walked up the walls and back down the mountain.










At the end of the tour, everyone is exhausted, exhilarated, glowing.




2005-01-07

Sol is taking her PADI open water course with my favorite dive shop, CamiguinAction. She studied theory (DVD and book) for several days and then took her basic exercises, exam and qualifying open water dives in the last four days.

I went diving with them on dive #1 (Tangub bay) and dives #2 (Old Volcano) and #3 (Tangub bay again).

I missed dive #2 since I was sick that day (something I ate didn't agree with me).

All the dives were great. I don't think I've dived Camiguin this late in the year before (I lost my dive log around when I had my latest and most serious motorcycle accident, I need to find that, it's got to be around somewhere), and the diving is surprisingly good.

Of course, these are qualifying dives, so it's not like I was sightseeing. I was keeping an eye on sol and her classmate all the while, and dive #1 was only to 12 meters. Dive #1 was pretty good, even though only at a maximum of 12 meters. Tangub bay is great even at shallow depths. And while they were doing some buoyancy control exercises I was looking at four nudibranchs, all less than a centimeter long, but walking along the sea floor as if they owned it.

Dive #3, Old Volcano, is always great. There are pillars and canyons from the last volcano eruption, and the sea life is very rich (I saw my first turtle there, during one of *my* qualifying dives in May 2003). I saw a lionfish immediately, and there were large triggerfish, a tuna (in the depths, diggi and dodong saw it, but sol and i didn't), several different kinds of sweetlips, batfish, and lots of other fish which make camiguin diving incredibly beautiful. It's commonplace at all camiguin divesites (incredibly electric blue fish, brilliantly electric violet/purple fish, clownfish, nudibranchs, everything else) but it never palls.

Sol was a bit tense since I mentioned a current. But she calmed down (diggi is a really great instructor, divemaster, and knowing that i'd be around, that diggi was guiding, and that we've got trained boatmen who keep a watch out for us helps a beginning diver's confidence a lot) and we had a great dive.

Dive #4, Tangub bay again, was more interesting than the first dive since we went deeper (18m) and further out. There were still exercises (additional buoyancy exercise, swimming without mask, etc), but they didn't take too long. There was a flutefish much like this one. I thought it changed color to match the color of something it moved close to when we approached it. But sol didn't see that, so maybe I was imagining things. We need to get an underwater case for the digicam :).

There were also incredible nudibranchs, and all the standard fish, lots of triggerfish and it might have been that this was where we saw the batfish and not Old Volcano :).

Incredibly fun dives all around. The last dive at Tangub bay was pretty cold, but it was worth it.

Hay, I hope we can dive in May :).

2005-01-02

TSA experiences and impressions

I've seen a lot of ranting and negative reporting on the difficulties and indignities of TSA screening in the United States. I'm sure some of that negative reporting is on target. Something so new and (because it's so new, mostly) ad-hoc is going to cause problems for a bit. It may improve. In fact, I think it certainly will improve, although, like the US war in Iraq, it will always generate negative publicity because it is (although less so) still inherently weak.

That said though, I also have to say that, during my most recent trip to the U.S. (2002), I didn't really have anything to complain about. Things may be different now. Certainly I'd be severely bent out of joint if my name (or something similar to my name) were on a watchlist and I couldn't find a way to explain to the TSA that that was just someone else with my name. On the other hand, I doubt if there *is* anyone else out there with my name, so, unlike Senator Kennedy, I'm probably not going to have to ring up my (non-existent) high level friends to get my name off the list.

In any case, I didn't have any TSA problems at all when I was travelling. To be sure, I was flagged for the extra search just before boarding the plane at every single flight I was on. But I figured that was because of my age, gender, and country of origin. I thought it was kind of a stupidity to choose me, but they also choose little old ladies and 3 year old children, and I didn't mind much since I never missed any flights.

There's a lot of online and news ranting about rude TSA personnel, but I never encountered any of that. If anything, I was extremely impressed with the politeness of one older gentleman at Dulles airport. And everywhere else I found service pretty good. Of course, I don't feel the need to talk about bombs and chemicals and security stupidities in TSA lines. No doubt that helps. I'm sure that there are TSA stupidities that are due to rule inflexibility. But that's a general failing in the US, and it's not necessarily the TSA personnel's fault. Personal rudeness by TSA personnel is their own personal fault, but as I say, I've just never seen any of that.

Of course, the situation has changed a bit since I was last there. If (or when) I go to the US in a year or two, I won't be surprised to notice a few occasions of TSA rudeness, but I don't really expect to. I figure they're pretty rare. They just get blown up in the press (as they should be, so that individual abusive TSA personnel can get the sack, or at least reprimands).

2004-12-21

Reading Multiple GMail accounts using the computer user

I've had a bit of a hack in place for reading my two gmail accounts. I would open two copies of firefox (or mozilla), but using two different logins. The second would do an su and run the other firefox copy. E.g., I'd run firefox as user tiger, and then run firefox as user tiger1. I could then read my bopolissimus@gmail.com account as tiger, and the other firefox running as tiger1 would read bopolissimus.lists@gmail.com.

It worked out that way (couldn't read bopolissimus.lists@gmail.com as tiger) since when I'd surf to www.gmail.com, the browser would notice that it already had a cookie for there and would identify itself with that cookie.

I just noticed that it *is* possible to open two different gmail accounts as the same (linux logged in) user. Firefox has a -P parameter (for profile). The solution is:

1. start firefox with the -P parameter. This allows you to create,edit,delete profiles.
2. create two profiles (or one profile for the other account, use the default profile
for the first account).
3. when starting firefox, specify which profile to use with -P

This isn't as big a deal as it might seem, since the normal thing to do would
be to create a launcher (shortcut) on the desktop. For the main account,
set the program to run as "firefox -P default", and for the other account,
set it to "firefox -P [whatever_the_other_profile_is]".

Netscape has always had that feature, as does mozilla, I think. I just never
used profiles before. Now it comes in handy though.

2004-12-18

Misc Articles

I read a lot. mostly online, but dead tree too. I often find
something worth passing on, but I rarely do. No time, lazy,
not online. http://www.jerrypournelle.com is a good source
for good articles and discussion.

Here's one. Not my country, don't care that much. One of
the things that I didn't like about life in the US though.

A Nation of Wimps


Focus on the first derivative

2004-11-13

Things to do/learn

Things I need to do or learn when I find the time (not anytime soon, but maybe one thing at a time on weekends when current project is done).

1. Switch to Subversion from CVS (might do this soon).
2. Learn how to set up drbd (vmware or UML for testing).
3. Learn Postgresql Slony replication.
4. Set up bugzilla and mantisbt (the one just for fun, the other, probably for use).
5. Test setting up heartbeat and virtual servers (#2, maybe watch ian or cedric set this up?
More fun to figure it out on my own, but takes a lot longer :)
6. Test setting up ypserv and ypbind
7. openldap na rin for PAM and email and other auth...
8. Java this, Java that, lots of new stuff to look at there.
9. Test MySQL transactions (InnoDB) and subselects (latest version). Of course MySQL
really isn't usable yet for serious databases until something like plpgsql becomes
available for it. But it's getting there.

hahay, kailan pa ba magkaka-oras para sa lahat na iyan.

2004-10-08

GMail forwarding

Ian sison just pointed out that GMail now allows a filter to forward matching email to be forwarded to another email address. That looks like free email forwarding. I wonder how long that'll remain free. Mail.com had free email forwarding, but they eventually made that a payware feature (which is why I lost tiger@kami.com, since I couldn't remember the password, since I only used the forwarding).

This is a great feature, allowing easy off-gmail archiving of email (I've actually turned the corner and prefer using gmail, previously I couldn't stand webmail and only used eudora, sylpheed, kmail, or evolution, whichever of those clients I was using at the time).

CVS on USB flashdisk

I recently got a sandisk 128MB USB flash disk and I've decided to use it as my CVS repository (or arch, I'm looking into that, or svn, I'll look into that after I look at arch). I shuttle between multiple sites, and they're not all on the internet. Some of them are completely firewalled off from the world.

I don't share the repository with anyone, so there's no problem keeping it in usb. Of course that wouldn't work well for a team. But for me, well, I just like having all my code, editing history, and releases in a repository, so a USB disk is fine as a repository.

The only thing I'm worried about is the write cycle. Need to research on that. Some flash memories are supposed to have only a limited number of write cycles and beyond that limit it's not possible to write to the device anymore.

Porting blogs

I've got another blog on another server but I'll be moving those posts here. Did one already, I'll be doing the rest slowly. Maybe one or two posts a day. I won't be doing the comments though. Not motivated enough for that. Hmmm, I should go over there and get the mysql database so I've got it here, in case the server goes away.

2004-10-02

Consulting

I recently moved into consulting, after a few comfortable and enjoyable years developing software for an internet service provider.

I'm enjoying it a lot. It's not the money (I've seen more of that than I used to make, but I've also moved to where things are more expensive, so things even out). Rather, it's the fact that I work with many different technologies, so I get to learn more as I work.

Lately, I've been learning postgresql functions and triggers in plpgsql. I went back to something I used to do all the time, code generation. I wrote a multi-threaded program in C/C++ and learned the benefits of STL at the same time. Of course I already knew what the STL could give me, I just hadn't actually experienced the benefits yet.
After using STL for a few days, I dropped my handcrafted string and container classes.

Doxygen is great and I'll be getting into PHP+SOAP (it should really be java+SOAP or something similar, but I need quick wins, like results within a week, and java is too complicated for that kind of thing, maybe on my next project I'll work with java).

One thing about consulting is, there's always something different happening, so burnout due to boredom won't happen. Although burnout due to stress is always a possibility :). But then I can usually set my own schedule, so that's *less* likely than it seems.

2004-09-29

Frits Psot

http://bopolissimus.sni.ph seems to be down and I'm not sure when that server will come back up. So I'm starting this one.

2004-08-19

GMail Retroactive filter application

I‘ve wanted to apply filters retroactively in Gmail (i.e., if I‘ve got 10MB of mail in GMail and now I want to organize it into labels, I create the labels, create the filters to auto-archive and set labels, but how do I apply the same filter to old mail?). There didn‘t seem to be an obvious way to do that. But then that’s because I was thinking about it as “applying filters”. So naturally I was looking for it in the Filter stuff (create, edit, delete, test, etc).

As it happens, there’s a simple way to do retroactive filters in GMail. Just search for the relevant email using the search function. It’s not going to be exactly the same as filtering, UNLESS one uses the “Show search options” link. That brings up a dialog box similar to create a filter, except it works only for one search.

After the relevant emails have been found, it’s a simple matter to select them all and apply a label and (i like to do this so they go away from the inbox but are still in the label/folders) archive them. It’s not quite as easy as it might be, but it works. Now I just need to remember that that’s how it’s done.

2004-08-08

No I'm Not

Fratman wonders if I‘m a failed fraternity candidate sourgraping.

My answer is, No, I‘m not.

I never had the desire to join a fraternity. I just didn‘t need to (some people join because of the objective benefits they gain, frat study resources, etc), nor did i want to (some people join for barkadahan and belonging, i didn‘t need that from a fraternity, i joined UP Psych Soc instead, more fun, more girls, and all the study resources I needed).

I didn‘t need any of that pain either. Joining a group that would beat me up so I could prove I could take pain seemed illogical to me. Plus I have a pretty high pain threshold and quite a bit of pride. They might beat me to death because I wouldn‘t fold. I suppose if other people want to do it, well, that’s up to them. I‘m not too hyper about people getting into fraternities and getting beaten up even to the point of dying. after all, they made the choice to join. I grieve for their mothers, but, frankly, well, the candidates chose freely. So I don‘t get exercised by that.

What I rant about in that original post though is fraternities getting into frat wars and killing members of other fraternities. Sometimes, or perhaps often, members who weren‘t particularly war freaks anyway. I figure, if one or two people in one fraternity have a problem with someone else in another fraternity, they could find a way to have a fair fight between just the people involved. But no, usually it becomes a matter of fraternity pride and anyone on the other side is fair game. And the occasional innocent bystander hurt or killed in the rumble is just a statistic. Neither fraternity will pay anything for the innocent bystander’s pain.

But back to Fratman’s point, no, I was never a candidate for fraternity membership. I never wanted it, it never made sense, I don’t now and never have given a flying fornication for the idea.