Wednesday, October 25, 2006

Dealing with the Devil

The company I work for is at a "crossroads" technically, and a choice has to be made. This choice is almost cartoonish but is deadly serious for us. And this choice is..

Windows, or Linux?

If it were just me, things would be very clear-cut. But unfortunately, our local technical team is only one of the many voices. And there's a loud voice in Colorado which says .NET Framework!

We are working on a "global integration platform" and as such, all of the affiliates have to be on the same page. Expectedly, each affiliate company in each country has its own core skill set (and agenda). For us here in the Philippines, that skill set is Linux, Perl, Apache, PHP, MySQL. A typical technology choice hereabouts. And we've done admirably with it.

The trouble is, globally the choices have been narrowed down to Linux (or generic UNIX) with Java, or Windows with .NET Framework. And the people I work with are pretty green at both these technologies.

Many's the time I regretted investing so much of my time in Perl. Perl's a great language. It's also a horrifically obscure language. Heck you can even write Perl programs in Latin. And the fellow responsible for this programming atrocity is widely considered to be the best Perl hacker in the world!

Anyhow, our entire software platform is currently implemented in Perl. And it's great. But it's not highly maintainable. And Perl developers are so hard to get ahold of, in a year we've only added a couple of them.

Perl suffers from too much choice. If you can program in Latin and wreak havoc with the language syntax, then you have too much choice. This choice precludes the existence of such civilities as automatic refactoring, syntax completion, halfway-decent code folding, an IDE for heaven's sake.. actually Eclipse has a syntax completion plugin for Perl. And halfway-decent code folding. And I've actually used it. But the experience is still decidedly second-rate, compared to say Visual Studio .NET 2003, which is the last version I used.

Anyway, the end result is that we are faced with two choices, neither of which is particularly appetizing: go with Java on Linux, or C# and .NET Framework on Windows. Sadly, we've missed the "develop on Windows, deploy on Linux with Mono" bus -- .NET 2.0 support in Mono is not yet mature, and going with a Microsoft solution entails going whole-hog in order to wring maximum performance from the technology. And whole-hog means it probably won't work on Mono.

Actually Mono is great. I use Mono for production (although only stubs to get my Perl mutant code to act nice toward Microsoft implementations). But I digress..

If you do not have deep expertise in either Java or .NET Framework, then either is a legitimate technology choice. Each has advantages and disadvantages. But they are equivalent, religious ranting aside. So what's not to like?

  • Java has a large ecosystem
  • Java is culturally similar to the open source community, and Java itself will soon be open source (hurrah!)
  • the telecoms industry is standardizing on Java (don't get me started on Erlang.. but it's safe to say they won't be using .NET for quite some time)
Unfortunately, Java comes with its own warts
  • the available IDE's can't match Visual Studio (but Eclipse is half-decent, and you can't argue with free-as-in-beer, the free-as-in-freedom is gravy)
  • it can be clunky
  • arguably .NET Framework performs better on the same hardware
Whereas if you go with .NET, you have to buy the entire Microsoft solution stack, and the price adds up real fast. For that you get a well thought out design, arguably the best-est developer tools money can buy, and the warm fuzzy feeling that somewhere deep under the earth, Steve Ballmer is laughing devilishly at finally possessing your immortal soul.

So for us, the choice between Java/Linux and .NET Framework/Windows is not a black-and-white one. It's not an easy choice either. Economically, the Linux solution really stands out (free OS! free IDE! free database!) but we have to consider that people halfway around the world are more comfortable with .NET, have deployed huge applications with .NET, while we have precious little Java expertise. And we have to work with them.

Tuesday, October 17, 2006

Home With The Flu

I have a pretty bad flu. Actually it's tolerable, but that's because I didn't turn on the airconditioning. I'm quite sure if I was in the office with the frigid central A/C, I'd be sniffling my nose off.

Unfortunately there's some work needs to be done for tomorrow's broad launch. And I can't access the servers. Have to ask someone to be my hands. The good news is, I can access our Subversion repository from here at home; so I was able to do the fixes, actually date localization for Malay. Finally, a use for POSIX::setlocale()! I don't need to hard-code the Malay language month names.

Here's the "trackball telescope," which is a ball-type telescope (similar to the Edmund Astroscan and the Portaball) but with the added wrinkle of built-in tracking. Very neat and elegant, actually:

Trackball Telescope


Anyway I was at True Value and saw this 14-inch diameter acrylic lighting sphere for 780 pesos (roughly $15). My calculations indicate that a 14-inch sphere is just big enough to accommodate a 10-inch mirror. Off we go!

Monday, October 09, 2006

The Wonders of Ibuprufen

The car's starter motor finally gave up the ghost yesterday. So we had to push-start it yesterday (with help from friendly neighbor Jambie) and this morning with only me pushing with all my might and Lalai at the wheel.

It worked after three tries, but later in the office, all my back muscles started hurting like hell and I had to beat a hasty (and early) exit from the office. Thank heavens for ibuprufen and paracetamol, they've made my time here at home bearable.

I actually went to Banawe. Turns out the starter motor was filled with mud, dirt, and crud, probably from the flood two weeks ago. Amazingly, after a good cleaning, it's back to normal. I also had the shop there replace the engine oil (since I never got around to it) and fix the brakes. So no more pulsing and ghetto shrieky noises now.

Saturday, October 07, 2006

svn commit -m "a miscellany of changes"

We had a really strong typhoon last week. More than a hundred people lost their lives, some ignobly (one, a taxi driver, was crushed in his cab by a falling giant billboard; and a family was sandwiched underneath a concrete fence that collapsed under the weight of rampaging mud).

Closer to home, a friend's Honda gave out in the middle of the storm. And he was on top of a flyover in the teeth of the typhoon. Lalai and I had to drive to find him through 10" deep floodwater and tow him out. In the process, we lost one fog-light cover; my A/C fan jammed on some twigs; and one fog light bulb burned out from the prolonged immersion. Poor 626. With its measly 6" ground clearance it was never meant to go traipsing through the flooded streets. Good thing the engine didn't stall, I had the gas pedal on the floor in 1st gear and it still was hesitating.

Work hasn't been bad, we've finally rolled out a couple of WAP microsites for a couple of large telcos outside our typhoon-benighted land (in fact I thought I wouldn't make UAT on one of them due to the storm).

I never did get that IAT mod in there. I did try (last weekend) to change the timing on the engine by rotating the distributor. After some initial hiccuping, things went back to normal; the engine still hesitates at higher RPM. However I did change the wiper blades, the busted fog light bulb, and put in an Osram H1 bulb for one of the high beams (H1 bulbs are getting so rare these days!)

Happily I was able to repair the busted A/C fan motor (although we had to endure a day of having no A/C because the engine temperature would climb inexorably higher whenever we turned the A/C on). Actually I opened up the jammed A/C motor, an inductor of some sort had loosened, probably from the shock of the fan blades hitting some errant twigs that got in the engine bay. This evil inductor got stuck between the armature and the permanent field magnets. Jamming the motor.

I removed the inductor but somehow broke the brush holders on the motor (and my epoxy didn't dry fast enough). Thankfully, I had a spare motor lying around. Actually it was a busted A/C motor. So I opened that up, and discovered that it was in pretty pristine condition! nice shiny windings and all (unlike the blackened windings of its jammed replacement, probably from overheating at locked-rotor current levels).

The old "busted" A/C motor had been swapped out because it wasn't turning properly anymore. The real problem turned out to be, firstly, an unlubricated front bearing (some canola oil took care of that); and, more importantly, carbon brushes that had been worn down to their springs. So I just took the carbon brushes from the "newer" (burned out from the jam) motor and soldered them to the old motor. Instant working motor.

In retrospect, a surplus motor is like 300 pesos (now 7.something dollars) in Banawe. Plus fuel costs and three hours of wasted time. So it's not like I saved any huge amount of cash (my fiddling around with the two motors took all of one afternoon). But there's some amount of geeky pride in fixing a cheap-ass motor that even the blue-collar Banawe mechanics wouldn't bother trying to repair.

I also bought a gallon of oil ("commercial grade," 20W40, for a measly 500 pesos or $10) from Ace Hardware when I was bored at work (walked from the office to Greenbelt 1). And a VIC-415 oil filter which allegedly is the correct one for the 626. And a can of carb cleaner for my "carbon clean" experiment which I shall do in a while. It's been 10 months and about 10,000 kilometers since the last oil change. Once again, I'm probably saving 200 pesos by doing this grease monkey work myself. But I'm bored.