August 2006

Painful battery recall

So as we all know, Apple followed Dell in recalling a large number of batteries. Although the number of batteries recalled by Apple is smaller (1.8 million against Dell’s 4+ million), in terms of market share thats a huge number for Apple and virtually every Powerbook 12″ user I know (myself included) is affected.

Now the problem is that Apple estimates 4 - 6 weeks time until new batteries are shipped and here in Singapore, I can’t simply order a replacement online and ship back my old battery. To replace my battery, I had to give in my old battery and now wait for 4 - 6 weeks for a new one to arrive. In the meantime, my notebook is nothing more than a brick. Of course, I can still run it on AC power but that’s pretty useless for two reasons - first, I use the laptop primarily on battery while at the library or while attending a talk or seminar. Second, Powerbooks are weird in that their internal time seems to be kept by the main battery, not a supplementary small battery, as is the case for most other computers. The result? Every time I turn off my Mac now, and fire it up again, I’ve traveled backwards in time to January 1, 1970. One doesn’t realize how much of a problem this is until one encounters it. Calendaring is useless for one thing. For another, SSL-based websites (like GMail) won’t load at all because they have time-limited certificates. So to use the computer reasonably, I have to set the time manually on each startup. There’s an option to automatically adjust time via a server, but I guess that happens only once in a while, and it’s never corrected this problem for me. I tried hunting on the net for a startup script that would sync the time, but couldn’t find one (apparently Mac uses NTP, but I couldn’t find the ntpdate command, or I’d have written one myself).

Anyway, thankfully I have Linux boxes at home and at work, and I’m pretty happy working on them, so I don’t absolutely have to use the Mac. A few people I know, however, are so dependent on the Mac that they’ve decided to risk carrying on with faulty batteries rather than wait for a month or two - and that does not bode well for Apple. I’m pretty sure if the Powerbook were the only computer I could access, I wouldn’t return the battery either. Enough of such cases, and if there are more Apple books spectacularly burnt up like the one in Japan - Apple’s credibility is going to suffer.

mac

Comments (1)

Permalink

Life’s little glitches

Scene I

Doctor’s waiting room. Electronic queueing system in place. My number - 184. 179 through 183 go by, ever so slowly. The next beep comes and I get up in anticipation, but the display shows nice round figures: 0000 in room 2. Nobody goes into room 2. Now, this is what happens when you’ve written too much buggy code and believe that Murphy’s Law runs the universe.

I’m convinced that was supposed to be my number; and one part of me starts thinking - OK, so they do say on the ticket “Number’s may not be shown in sequence” but 0000 is highly unlikely. Nevertheless, I can’t respectably go when 185 comes since I’ll be politely told to wait my turn and that it may not be in sequence. And then I start to think - OK maybe by 187, I’ll go and complain, or should I wait till 190?

The other part of me is thinking - I’m pretty sure the code would have returned a pointer to the next number; and for some reason a null pointer was returned which didn’t fail but just returned zero. Aah, maybe then all the numbers from then on will be zero, and then I won’t have to wait all that long.

The next number called was mine, and I went right in. Never found out why the 0000 came up.

Scene II

Welcome tea for the undergraduate program in Computational Biology in SoC, NUS. Only a few people registered with this programme so far, so they’ve decided to give an informal talk (with food). Some graduate students have been asked to be on display to encourage or warn the unsuspecting public of the effects of research. After a quick introduction, the students are asked to introduce themselves. And it goes something like this:

I’m ABC, and I’m really interested in Data Mining.

I’m DEF, a freshman undergraduate and my interests lie in the area of Computer Graphics and Artificial Intelligence.

I’m GHI, 1st year and I’m really looking forward to doing good work in Machine Learning for Intelligent Systems.

.
.
.

I’m LMN, 3rd year undergraduate, and I work in biology with Prof X.

I’m OPQ, 1st year PhD, and I’m studying for my QE and looking for a research topic

.
.
.

I’m XYZ, 2nd year PhD. (Awkward silence) Oh, and I’m working in, uh, systems.

And finally, my turn. “I’m Anshul, I’ve been here forever, and I’m really interested in the food getting cold behind us right now.”

Oops.

Fortunately, that last just happened in my head. Old survival instinct. But close.

fun
research
tech

Comments (1)

Permalink

Ridiculous ball-tampering row at the 4th test

I don’t think anybody will disagree: the situation at the 4th test between England and Pakistan can only be labeled ridiculous. If you weren’t aware of the circus show, there’s no dearth of places to read about it.

At the end of the day, the fourth umpire communicated that there would no more play today. No word on whats happened to the match or if there will be any play tomorrow. Meanwhile 20,000 people are at the ground who were told nothing of what was happening and another 20,000 are probably due tomorrow. And millions of followers of cricket are completely confused about the game.

Forget about whether what happened and who was right or wrong. This is a sport, governed by rules and adjudicated by a match referee; yet what’s happening here is that officials are “locked in talks” to try and get the match to resume - and have been doing so for a couple of hours now. Since when were decisions in sport debated upon and decided during the course of the game? Just decide whats to happen already by the rules applicable and then deliberate later on who did the wrongdoing and pass appropriate judgments.

I certainly don’t know all the facts (no one does except the people involved) - but I think - fine, if Darrell Hair says the match is over, so be it. He’s the controlling authority for this match. Ask for evidence of ball-tampering later and if there is no satisfactory evidence, charge and punish him as appropriate later. But please, do not make this a standing joke on Test cricket. The game is slow enough as it is without having to take time off in between the game to solve individual ego clashes. Right now, the whole game of cricket is being made to look more immature than kids playing hide-and-seek.

sports

Comments (1)

Permalink

Using gmail as KDE’s default mail client

I found this script which, when set as your default mail client, opens up a gmail compose window from KDE apps instead of KMail.

I had a couple of problems with the automatic browser detection of the script, though, so I simply set the BROWSER variable to “firefox” instead of the command in the script.

To use, save the script in a file, make it executable, then point to the script from Control Center - KDE Components - Component Chooser - Email client.

linux

Comments (1)

Permalink

Happy Independence Day!

IMG_4059

India’s 60th independence day, and the 10th that I celebrated outside India. A decade ago, there used to be just a handful of people who attended the ceremonies on 15th August and 26th Jaunary at the High Commission. To have a family there was extremely rare, and mostly it was just students and officials who attended.

The story now is quite different. The high commission grounds are usually teeming with people, and families with kids outnumber university students by about 8 to 1. I suppose the presence of families is explained by a large number of people moving from India for work, but I am quite surprised (and a bit sad) at the decline in the number of students who attend - I know for sure there are many more Indian students studying here than ever before.

The rest of the photos are here.

Jai Hind!

india

Comments (0)

Permalink

Overdue book reviews

I’ve been meaning to write some book reviews for a long time, but haven’t gotten around to it. Today I finished yet another book I’d want to write about, so I decided to clear the backlog. Here goes.

A short history of nearly everything - Bill Bryson

short-history-of-nearly-everything.jpg

This is the best book about science I have ever read, and that includes Asimov’s guide to science. Bill Bryson intertwines scientific fact, scientists’ life stories, and the impact of science on society in a seamless and brilliantly entertaining way. The book touches on areas as far apart as astronomy, geology, genetics and quantum mechanics. The discussion is never overly technical, (though I did get some revealing insights) and mostly shows science from a human standpoint. An important thing about the book: the author says (and I believe him) that the idea for the book struck him because there were so many things that science tells us (like homo sapiens first appeared 500,000 years ago, or that the world was once just a single continent) - but he had absolutely no idea how they managed to figure this out in the first place. And so his quest for the answers led him to write the book in which his thorough research including visits to many sites and interviews with many scientists figures.

Definitely recommended reading for one and all.

Rating: 5/5

The Axis trilogy - Sara Douglass

axis1.jpgaxis3.jpgaxis2.jpg

This tri-part story consists of the novels BattleAxe, Enchanter, and StarMan. A fantasy tale in which Humans are the dominant race in the beginning, but must unite with two other races according to Prophecy in order to withstand destruction. The plot is quite well done, with reasonable depth in politics, relationships, magic and battle. The first book was a little slow for me, but I got hooked onto the story and went through the latter two books at great speed. As I said, the plot is reasonably complex (each book is over 500 pages) without being an epic like the Wheel of Time series; and quite enjoyable for a fan of the fantasy genre. I especially enjoyed two things: battle scene descriptions and attitude transformations of the three races as they struggle to change beliefs strongly held for centuries.

Rating: 3.5 / 5

The curious incident of the dog in the night-time - Mark Haddon

curiousdog.jpg

A wonderful book; the reason for this post. I started the book about three hours ago and read it from cover to cover (it’s quite small). I wanted to write this while I was fresh with the book. Sometimes books make that kind of an impact on you, and this one certainly did. It describes a time in the life of an teenager, Christopher Swindon. Being autistic, he has an amazingly logical mind but little appreciation for uncertainty and anything that brings uncertainty with it - like human emotions, crowds and new places. Yet when he finds a dog who was murdered, he decides to investigate - and it brings lots of uncertainty and the attached turmoil into his life. The book is about how he deals with it.

It’s written in first person so you view the world from his perspective. The reviews at the back of the book call it all sorts of things, like “lovely, eccentric, intelligent”. I have just one word - scary. Christopher’s thought process is basically like a computer - or code - and perhaps because of that, I could identify so completely with it that I was literally hanging on and reading the book for dear life. It’s as if you let loose a robot in the real world - a very intelligent robot definitely - but nonetheless a being that expected the world to be ordered, governed by rigid rules and bent upon finding them, having only been used to a very narrow and controlled environment before. Except it wasn’t a robot but a life. The only times I stopped were to keep the book down and take a walk and calm myself because it’s just a story - and then I remember that there really are autistic people in the world. I’ve read Stephen King books and watched horror movies aplenty but no piece of fiction has ever scared me as much as this story did.

Enough said - you must put yourself in the shoes of this person who’s so different from all the rest of us, but yet essentially the same. An absolute must-read.

Rating: 5 / 5

books
reviews

Comments (5)

Permalink

Playing God with Scheme

Pretty sensitive issue this - whether man should be allowed to play God or not. I was a debater once, and I’ve pretty much debated this with dozens of arguments from each side. One thing you can’t argue with, though: playing God is fun.

I was playing around with Scheme today (for the uninitiated and/or the young, that is a programming language). I was pretty uninitiated too, which is why I had never bothered to try out Scheme before… but this is the closest to playing God that I have come. Here’s why.

Weird but cool syntax: Almost everything in scheme feels like it must have been created around the beginning of time. Scheme is to C++ what Sanskrit is to Hindi. For instance, here’s how you add two numbers in Scheme:

(+ 2 3)
5

This seems simple enough to follow at first - but then you realize everything in Scheme follows this rule - and so if you want to write an absolute value function, this is how you do it:

(define (abs x) (if (< x 0) (- x) x))

It all goes downhill from there.

Warp the world: The scheme book I was reading unwisely told me that anything and everything in Scheme was changeable. I did not read a sentence further and went ahead and wrote this out:

(define (+ a b) (* a b))
Setting compiled read-only variable+ can yield to incoherent state
+

This basically tells the interpreter that I want addition to mean multiplication. Despite the warning that I was entering a demented world, I was overjoyed that this appeared to work. And, sure enough:

(+ 5 10)
50

Bending the fabric of reality: Upward to enlightenment, I realized that + was just a name, and could really point to anything. We often hear these days that “everything is an object”. But really, in Scheme, “everything is what you want it to be”. And so, after turning my world upside-down, I turned it inside out.

(define + 2)
Setting compiled read-only variable+ can yield to incoherent state
+

Which says I want + to be a variable with value 2. For an ideal God, of course, the world would just carry out orders without cursing, but hey, I was just playing God! And was indeed bending the world to my will. And so I can now enter this, which looks positively alien, but is perfectly logical and returns a nice round figure:

(* + (- + +) (/ (* + +) +))
0

By this time, of course, subjects of the now-warped-and-bent-beyond-recognition world were, as you can imagine, feeling like Neanderthal man presented with the supernova of the Crab Nebula (or bash users presented with the Windows command line), and I thought it was about time to un-warp the world again. Even without restarting the interpreter, this is quite easily done:

(define (+ a b) (- a (- b)))

…and there was light :D (though of course the original + procedure can take any number of arguments, I’ll figure that out someday)

If you’re feeling down, I heartily recommend an episode of playing God to get you feeling on top of the world.

Uncategorized
fun
programming

Comments (5)

Permalink

The Lame Leopard

As promised, Apple introduced their next operating system, Mac OS X Leopard at the WWDC Keynote today. What I think of it should be evident if you bothered to read the title of this post.

But first, lets start with the stuff I *did* like. Yeah, I’m talking about the digs at Microsoft:

“Redmond has a cat, too. A copycat.”

“Mac OS X Leopard - Introducing Vista 2.0.”

“Mac OS X Leopard - Hasta la vista, Vista.”

“Redmond, start your photocopiers.”

“If you can’t innovate, impersonate.”

Some of these sayings speak of positive genius - genius that could have been better employed elsewhere, say, in the development of Mac OS X Leopard. And, unfortunately, it’s time to start talking about that.

The first thing that was said: “There are some top-secret features that we can’t show you - can’t have those photocopiers started too early”. Sorry, not buying that. We all know fully well that Vista is nearly at a release candidate stage and Microsoft would simply be unable to “copy” anything that they showed today. In fact, any major improvements they could showcase would only add to Microsoft’s pains as they’d be totally impotent to do anything about them. I read Apple’s claim as “Wow! They really did release some decent stuff in Vista! We’ll try and come up with some cooler stuff by next spring.”

Moving on to the ten features of Leopard that were actually touted.

64-bit UI Applications: You can now have 64-bit apps at the UI layer, as opposed to the Unix layer in Tiger. I’m really not sure about where this makes a difference. 64-bit and 32-bit apps can coexist peacefully without need for emulation or slowdowns apparently. Which is good, I’m glad to hear it - but no less than I would have expected (if it *were* to create problems, there wouldn’t be a reason for Apple to move to 64-bit since nobody at the desktop/laptop level probably uses them). Fair enough.

Time Machine: This is a system which will essentially keep backups of *all* your data. Its basically like storing the entire hard drive as a SVN repository, which tracks changes on a per-change basis. So you can move “back in time” for a particular file, or a folder, or your entire drive. So, for example, you can check out what was on your desktop a week ago. Sounds cool, right?

First, did some of the photocopiers start working in reverse? Vista already has this feature - previous versions of files. Apple, of course, conveniently chose to avoid mentioning that fact.

Secondly, it’s pretty obvious that this kind of mechanism would lead to horribly inefficient usage of storage space. That is the biggest concern to me. In the keynote they showed how photos you deleted a week ago could be undeleted by moving the iPhoto library back in time. This is serious. Lets say I filled my 2 GB SD card with photos, copied them to my hard drive, and later deleted 75% of those photos as snaps I did not want. But hey, I can recover them anytime, so they’re still taking up space, right? While I’m sure this kind of thing will be configurable and backups to network will be possible somehow; this kind of thing is usually a mess. I would be much more comfortable with an opt-in mechanism which says - here are the folders I want to keep safe (say, Documents) and the rest can be ignored. Thats what I do with my research and document folders - I keep them in an online SVN repository.

There are animations you can watch as you roll-back Finder windows in time; and while I’m pretty sure they’re cool to watch, I’m pretty sure they’re cool only once. Nobody is going to buy a Mac and spend his or her time looking at how beautifully a folder’s look changes as it goes back in history. More to the point, I am not sure this feature (which is a big thing for Leopard, judging by the amount of time they spent on it at the keynote) is solving a real problem. Yes, people are bitten by lack of making backups but not so often. And I’m not sure how many would be willing to trade drive space for this. Personally if I had a choice the first thing I would do to the Time Machine is to point it back to 5,000 B.C. and command it to stay there.

Boot camp, Front Row, Photobooth: Apparently will be enhanced and delivered in a “complete” package with Leopard. No evidence of new features presented. Yawn.

Virtual Desktops: Apple calls this “spaces”, and of course, they were discussed at the keynote as if the “intuitive” idea of clustering apps together had never occurred to anyone before. And hey, did you know you could drag information from one virtual desktop to another? I wonder if Steve Jobs’ famous reality distortion field could distort the fact that Red Hat Linux had virtual desktops in like 1999. Not to mention DesktopManager, a cool app that allows limited virtual desktop usability for the Mac.

Spotlight: Apparently spotlight will be able to search computers on your network if it has permissions. Gee, did Apple actually find a way to SSH into one machine, run mdfind and return it to another machine given authentication? Wow! That must have been keeping them busy since before Tiger was released! Oh, and just so you know, Apple is working hard to convert Spotlight into a “great app launcher”. QuickSilver developers at BlackTree, you have my sympathy; but I can’t say this was unexpected.

Core Animation: So last time it was Core Image which would enable fast rendering of images, and this time it’s animation. You can write a screensaver in half the lines of code. Automatic figuring out of keyframes, opacity, layers etc. Not too bad, but still mostly for developers.

Text-to-speech: This is the first feature that I would really want to have. According to the keynote coverage, the engine produces very human-like sound. Apple is touting it for accessibility, but I think this would be perfect for reading e-books, a market that rumor has it Apple is going to get into soon.

PIM features: Remember all those nifty features in your PDA phone? Well, now you can have them on your Mac, improved! I cannot believe the amount of fuss that was made about to-do lists, sending mails to yourself and keeping them as “notes” and embedding “stationery” (a.k.a. embedded images with HTML markup) in outgoing mail messages. At one point the presented was quoted as saying “It’s that easy to create ToDo’s!” Like only an Einstein could do it before Leopard came along. But yeah, maybe I’m being a bit unfair here. As a devoted citizen of the command line, I manage my life with text files, and use Thunderbird or GMail and Google calendar. I suppose these features would be a real benefit to people who believe in the Apple way.

Dashboard: New developer tools, with debugging and what-have-you. No mention of performance which is a sore point with Dashboard if you’ve ever used it. When you startup your computer and run it for the first time it stares blankly at you while it loads for 20-30 seconds depending on how many widgets you have open. There is an option for an easy way to generate widgets from live webpages which I thought was actually quite cool.

Enhanced iChat: You can show photos to another person while talking in iChat, which is decent (why, oh why, couldn’t they have come up with a whiteboard in iChat?). There are tabbed windows, nothing new.

Other misc stuff - video as a desktop background, XCode 3.0, dramatically enhanced parental controls (yeah, right).

I couldn’t believe it when the coverage ended and it left me feeling totally hollow. Long story short, there is not a single thing in Leopard that will make me wait for it, or even buy it. Except, of course when it’s a few months into Leopard and all the new Mac apps start mysteriously requiring OS X 10.5.x. Apple is known for it’s innovation but remarkably little of it showed today. Although I don’t use Spotlight and Dashboard all that much, when they came out with the release of Tiger, it was exciting, a whole new way to use the computer. That feeling isn’t there with 10.5. The Leopard, as showcased, is lame.

Update: If my post was too wordy for you, give AC’s hilarious poem on the same subject a try!

mac
tech

Comments (3)

Permalink

Heart in mouth

This is how Linux keeps you on your toes. I did a “yum update” on my system, and after that yum stopped working. Ouch. The error I was getting was this:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named cElementTree

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

Thankfully, after a little Googling, I found the solution. First, you erase the following packages: pyhton-elementtree and yum (and if you have pirut installed, that too since it depends on yum):
rpm -e yum pirut python-elementtree

Then download the following packages: yum-2.6.0-1.noarch.rpm and python-elementtree-1.2.6-4.2.1.i386.rpm (I got them from here) and install them using:
rpm -ivh yum-2.6.0-1.noarch.rpm python-elementtree-1.2.6-4.2.1.i386.rpm

And yum is up and running again. Phew.

Oh and you might want to add the following line under the [main] section of /etc/yum.conf for now:
exclude=python-elementtree

to make sure another yum update does not break itself.

linux
tech

Comments (2)

Permalink

Neo and the glitch in the Matrix…

You can obtain a copy of MS Office 2007 Beta for US$1.50. That beta, I believe, is valid for a year; and it’s a beta of a program that when released, will cost hundreds of dollars.

You can obtain a copy of Neo Office 2.0 Beta (NeoOffice is a Mac OS X office suite, closely based on OpenOffice) for US$25.00. This for an open source program that, when, released, will be available free for download. In fact the beta version will also be available free for download after Aug 29.

Just so we’re clear here… this is like an ad saying, “Get this software NOW! Only for the month of august, you get to actually PAY! After August, the software will become free and you’ll lose the right to pay for it! Hurry!

The NeoOffice team is justifying this by saying this is an appeal for donations because they don’t have enough cash. I feel that they could simply ask for donations nicely and the willing would pay. Few people, I suppose are dying so much to have a beta of NeoOffice 2.0 that they’d rather shell out $25 for a beta version now than wait for a month. And the people who will pay in the spirit of donation would have paid anyway to a big appeal. Remember also that anyone can at any time download the source code and compile Neo Office 2.0 at any stage, including the beta, for free.

The problem here is that beta tests are supposed to be for weeding out bugs, not making money. And if a lot of testers are deterred from testing out Neo Office 2.0 it may end up being more buggy, which will be a bad thing not only for NeoOffice, but for open source as a whole. I can definitely appreciate that they need money, and I hope they make loads of it with this program, but I’m not sure they will.

[news report via DailyTech]

mac
tech

Comments (1)

Permalink