Thursday, December 28, 2006

Microsoft bribes bloggers

Microsoft bribes bloggers with free $2,299 value laptops.

I don't know if I could be bribed that way to write pro-Microsoft posts. I doubt it, but if Microsoft wants to try, hey, go for it :-)

Tuesday, December 26, 2006

Postgresql - shockingly fast and scalable

I'm a postgresql nut. I have a bias against mysql because I think it's a great database for simple problems, and I don't have any database problems that simple.

Don't get me wrogn, I recommend using the right tool for the right job, and no doubt there are some jobs where mysql is the right tool. I just don't get those kinds of projects.

I would work with Oracle or MS SQL Server or IBM DB2 if I had the opportunity. However, when I work with a client, I recommend postgresql first, and only after they've rejected that (they really want to spend money) would I look at proprietary databases. That hasn't happened yet. Everyone faints with sticker shock. I know some people who use Microsoft solutions whenever they can, but then that's because that's what they know, and I don't think the cost of the software factors in since they just pirate it.

In any case, there's a great essay on how one guy used postgres and got incredible performance. As he says:

’ve pushed postgres on performance. And rather than finding it slow, I’ve found it shockingly fast and scalable. The traditional reward for a job well done is usually another, harder, job. But I’m not worried. I’m using Postgres. The worst that’ll happen is that I’ll get an excuse to actually get new hardware.

He used partitioning. I need to do that sometime. Maybe now, with version 8.2 out. Or possibly when 8.3 comes out. I'm concerned about some optimizations for queries that hit multiple tables (e.g., 160x30 tables). When people on the pgsql-general mailing list start talking about how great the optimizations on partitioned tables are, it'll be time to switch. For now, fat tables with appropriate indices and autovacuum/autoanalyze are good, and when queries still take too long (I have 300+GB of data at $DAYJOB) then I just build materialized views which are populated by triggers. Everything is good so far and I don't see any need to optimize further for another few years. Maybe when the data hits 1 terabyte (in 2-3 years) or when some individual tables hit 100GB I'll need to look into partitioning.

Sunday, December 24, 2006

The PRIME networking truths

From the twelve networking rules, the primes

(2) No matter how hard you push and no matter what the priority,
you can't increase the speed of light.

(3) With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead.

(5) It is always possible to aglutenate multiple separate problems
into a single complex interdependent solution. In most cases
this is a bad idea.

(7) It is always something

(11) Every old idea will be proposed again with a different name and
a different presentation, regardless of whether it works.

Saturday, December 23, 2006

why does schneier blog squid?

I've always wondered why Bruce Schneier has regular squid entries on his blog. A quick google search (i.e., a lazy google search) doesn't provide anything canonical. There's a comments page with some riffs on why schneier blogs squid though.

I thought it was just a riff on squid ink and security by obscurity. But on second though, no, that doesn't work well either.

Thursday, December 21, 2006

php problems

There's a list of problems with the PHP language.

I agree with a lot of it. But I still use PHP more than any other language just now. That may change again, but for now, there isn't really any language I'd rather work with when doing web development or command line programs.

At some point I'll find the next big thing, but for now, PHP, warts and all, is what I prefer to work in. I'll need to review those problems and comment on one or another of them, sometime.


I was informed that my day job is giving out a bonus equivalent to a month's pay, due tomorrow (21 Dec). That's cool. I'm very happy with work, and the team I work with, and I don't have problems at all with the organization, even if, as it grows, it ossifies in some ways.

But the bonus is good. We'll save most of it, but around 1/3 we'll keep for a vacation trip to Camiguin in May, for 2 dives a day, every day, for a week :-). I can't wait.

Hmmm, by then my brother Tim and his family might be back in Cagayan de Oro already. We'll bring them all along! It'll be the first cousins week for Timmy (who shares a name with his uncle :-).

I don't think we'll do that

There's an article on toilet training 3 month old babies, and using no diapers while doing it. Well, no diapers for number 2, anyway.

I don't think we have the courage or the adventure in us to try that. It's interesting though. Maybe I'll try to convince sol to try. Or at least, to read the article. She's so tired from taking care of the baby that she doesn't have time to check her mail, even with me helping as much as I can.

I'm told it gets better. I sure hope so, and the sooner the better.

DIY geekery

Knives! Magnets from old hard drives!!!. Alright, I don't know if the knives are geeky, but the magnets. from. old. hard. drives. sure are :-).

The article woke me up because I also happen to have a thing for knives, (and glue, and string, and tape, and fire, with which, one can fix anything :-).

Tuesday, December 19, 2006

Fun, Interesting and Long

Richard Feynman and the Thinking Machines Connection Machine.

Great article. Long, interesting, fun.

In the meantime, we were having a lot of trouble explaining to people what we were doing with cellular automata. Eyes tended to glaze over when we started talking about state transition diagrams and finite state machines. Finally Feynman told us to explain it like this,

"We have noticed in nature that the behavior of a fluid depends very little on the nature of the individual particles in that fluid. For example, the flow of sand is very similar to the flow of water or the flow of a pile of ball bearings. We have therefore taken advantage of this fact to invent a type of imaginary particle that is especially simple for us to simulate. This particle is a perfect ball bearing that can move at a single speed in one of six directions. The flow of these particles on a large enough scale is very similar to the flow of natural fluids."

This was a typical Richard Feynman explanation. On the one hand, it infuriated the experts who had worked on the problem because it neglected to even mention all of the clever problems that they had solved. On the other hand, it delighted the listeners since they could walk away from it with a real understanding of the phenomenon and how it was connected to physical reality.

Saturday, December 16, 2006

Great talk on designing a good API

Josh Bloch's great presentation (video talk) on designing good APIs

It's a long talk and I'm only at the very beginning of it. Sounds good so far though.

Thursday, December 14, 2006 not resolving

I'm an internet addict and I regularly go to Reddit for my daily fix. I can't go there just now though. DNS isn't resolving. I tried to go to a ping gateway, but the hostname wouldn't resolve there either. There's probably something wrogn with their DNS server just now. I don't see any mentions of what might be wrogn though. But I only wonder since I'm starting to miss my fix (heheh, not really,there's always Digg).

Old laptop, old distro

I had a problem with the right LCD hinge of my previous laptop a Winbook J4 733E pro. I sent the laptop back to be repaired and it's back and working perfectly. That laptop had Mandriva 2005 on it. In the meantime, I've been using a toshiba laptop with ubuntu dapper drake on it. I'm now trying to decide which laptop to stick with.

Ubuntu won't install on the Winbook. It fails around 80% of the way through the install progress bar. I'd forgotten that ubuntu wouldn't install here. So I've installed Mandriva 2006 (I don't have 2007 yet since I'd stepped away from Mandriva for the duration). It's now (slowly) downloading upgrades and new packages that I didn't install from the DVD but which have been upgraded so they need to be downloaded.

I like the winbook and can deal with its minuses (mainly the fact that it looks lived in, it doesn't look brand new by any means, plus the weight and the fact that it runs hotter than the toshiba since that's a desktop P4 chip in there, not a mobile P4). The Toshiba certainly is prettier, but pretty is actually a minus with me. A laptop (and a motorcycle, or shoes, etc) that doesn't look lived in doesn't feel as good or as comfortable.

On the other hand, I don't know how to get the wifi on the winbook working. This was never a problem before since I was always wired. But now that we've got wifi at home, if the wifi doesn't work, then I can't use the laptop (well, I could buy a PCMCIA card I guess, or a USB wifi device that linux supports). That's probably the biggest problem. I was getting used to the crypto /home filesystem on ubuntu and I'll need to figure out how to get that working in Mandriva.

While trying to get Ubuntu installed on the winbook (I swapped the toshiba and winbook drives due to drive size) I might have made a mistake with the ubuntu gui installer and trashed my encrypted /home partition. I'm keeping the partition around for a while (lots of space on this drive) and I'll try to recover the data later, if that's possible.

All in all, it's going to be an eventful distro switching Christmas experience. If I get tired of all this, well, I'll probably just switch back to the Toshiba, although I need to figure out some things. Among other things, the toshiba turns itself off when I run anything extremely CPU intensive (like a chess game) that runs for a long time (say 5 minutes). This doesn't happen in Windows (I'm told), so the current conjecture is that toshiba has special thermal control functionality that its windows drivers know about, but which Linux doesn't know about, so linux doesn't know how to make the fans spin faster, or whatever is needed to keep the laptop from turning itself off.

Damn, I might have to sell both of these laptops and get a lightweight, less powerful, non-desktop-replacement laptop for everyday use. I've got two other lightweight winbooks for just that purpose (everything works perfectly except for sound, but that's easy, I've got that working before, I just don't remember what module to load), but I like the power of the toshiba and the Winbook J4, so I'll try to get them both working first before giving up, restoring windows on them, and selling them at a bit of a loss.

Tuesday, December 12, 2006

Cancelled Interview

I had a candidate for a software development position scheduled for an interview today (Monday). She emailed early that she would not be able to make it because she had already received an offer from another IT company.

This was fine. It was a good break for her, and I was glad to have her email me early to inform me of the change in plans (shows good sense, consideration and a certain maturity).

I thought she made the wrong call though. Currently, in the Philippines, it's a geek's market. There is more demand than supply for good developers. I think that even for mediocre developers there is more demand than supply, although I don't want to have anything to do with that class of developer.

Therefore, I think that software developer candidates (particularly the really strong ones, but even those with no experience but who came from good schools) should not take the first offer they get. They should be willing to interview for a month or two (if things don't work out, there are always call center jobs available) and they should look at factors other than the pay. How much challenge will there be on the job? How many different languages/platforms/frameworks will be used on the job? Does the company have a commitment to helping make its developers as mature and strong as they can be?

For developers just out of school, how much will they learn in the first 3-5 years at the company? If they're going to be pigeon-holed into some specialization (e.g., SAP, Siebel, Peopleware or only one language or database), then that's the wrong company. The first 3-5 years out of school are a great opportunity to expand the developer's mind. Pigeonholing limits the developer and (except for those who actively search out new ways of doing things, a minority in everything) stunts his or her growth. Perhaps (likely, certainly, for most developers) forever.

Sunday, December 10, 2006

Exceeding Gmail's 2GB limit

Brajeshwar posts his observations on what happens when you exceed the 2GB gmail storage limit.

Mildly interesting but, frankly, a bit dumb. If you're approaching the limit, take countermeasures. In the comments someone suggests downloading to thunderbird or outlook. I strongly recommend that no one should trust any web-based system with all their email. Gmail and yahoo (and particularly hotmail) have been known to lose email. Yahoo and Hotmail will expire an email address if the email is not checked for a certain period (a month or two), apparently MySpace will take profile names whenever they find a commercial reason to do so ("Bones"). Gmail doesn't have that weakness, but there are recent comments that Gmail seems to be slowing down. The company isn't going to go away, and it's as good a web-based brand as any, but trusting gmail completely is a bug (and trusting hotmail or yahoo even just a little is a stupidity and not merely a bug).

So backup your email. And why think about removing spam? Just go ahead and do it. Unless you're collecting spam for whatever reason, in which case, forward your spam to another email address or (if that can't be done, i haven't tried it, frankly), forward your legitimate email to another gmail address. Or forward all emails above a certain size to another email address.

Asking gmail for more space may help. I think it's just obnoxious whining though. Workaround your problems first. If you've got 2GB of email, there is something wrogn with how you're using gmail. And frankly, if gmail actually gives you more space so that you can abuse the service some more, there is something wrogn with that decision too. But it's their network, they can do with it whatever they want :-).

Saturday, December 09, 2006

internet cafe computers

I was at SM Megamall today, at the Villman internet cafe which is located in the middle of the promenade among all the computer shops.

I wanted to post this (or a similar) article from there, but I didn't. No internet cafe computers can be trusted with my password (not even for throwaway accounts like my hotmail spamcatcher account), and certainly I wasn't going to type my blogger password there.

The computer was supposed to be locked down. After the internet cafe support guy enabled sol's terminal and mine, I saw that I could select from a few categories (I chose internet). And once a category was chosen it let me select internet explorer (strangely enough, windows explorer was an option, so I might have been able to run an internet game, or solitaire, or whatever).

I can't stand explorer though (although I haven't seen IE7, which is supposed to have tabbed browsing, that might make it usable instead of instantly execrated). And anyway, explorer was a bit weird because I couldn't right click on links (if I can't open a tab, I want to at least be able to open a link in a new window). Sure, I could have done Alt-F (something else to get to new window), but that's too much work. So I surfed on over to and found a link to download and install firefox. I was surprised that it installed. I was pleasantly surprised since at least I'd be able to use a competent browser instead of the crap that comes with XP, but I worried some more since clearly I could just as well have downloaded any trojan or virus or spyware I wanted and it would probably have installed.

Possibly that computer had antivirus, but I doubt that. Too much expense for a cafe computer. Or if it did, then it would have been pirated (actually, I assume everything on that box was pirated, but maybe it wasn't, if installed in an SM). Anyway, that is a seriously incompetent setup. Maybe they reinstall everything from a ghost (or similar) image every day, but anyone could still install keyloggers and such and at least harvest a bunch of people's passwords all day.

If Villman can't even get this right (and they're big enough to know how to do things right), who *does* get things right? Maybe Netopia?

Sunday, December 03, 2006

15-20 minutes

Bill Gates took 90 minutes to solve Petals on the Rose, I took a bit less. I doubt if I'm smarter. For one thing, I don't have the memory to do the memorizing trick he did to partly solve it early on. I also had the advantage of not having to wait for the next roll. I just read through the article, looking at the rolls and the answers.

The name of the game also helps. And I think maybe I might have seen the story (or the game) before. Maybe in Scientific American or something similar, related to or discussing Godel, Escher, Bach.

Actually, I didn't time myself. I might have taken less than 15 minutes (that's about my threshold for puzzles, if something takes longer to solve than that, then I need to be paid to pay attention). But it certainly wasn't less than 5 minutes.