Saturday, February 20, 2010

Day 2

I didn’t leave on a very good note at the end of day 1 of this journey – that’s bad news. The good news is that I have some good stuff to report today. I found an Apple computer to play with. It has Mac OS X Leopard (version 10.5) installed! A nice thing about my occupation is that we might not have much of anything (yes, that’s including money), but we won’t be short of computers: any kind and any make. If I set my heart on and my eyes opened wide, I will find one – at dark corner of someone’s cube - dust coated, abandoned and desperate for attention.

I fired it off and the machine came back to life. I am so excited. I haven’t touched a Mac computer for a long time. Last time when I used a Macintosh, I was still in grad school in different major and PC a new kid on the block. Looking back, it is interest to see how things have evolved and fortune has been changing hands from one to another and back for a few times. It is always exciting to see something old come back anew.

Oblivion of the nice GUI in front of me (some claimed this is the first time Unix and GUI are coming together), I go to hunt down something mundane and banal but infinitely powerful: the console box – for people familiar with Unix, the shell. Under Go/Utility menu, I found it. The default is a bash. Just type a few commands (actually my finger clicks the keyboard out of its own muscle memory, outside neurological command from my brain). They all work! Now I feel much comfortable. It seems I am quite familiar with this terrain.

Well, looking around I also saw something peculiar: something incongruous with the rest of landscape. It is very much like seeing a lush green willow tree popping out of sagebrush in the middle of a desert – questioning your own sanity at the sighting. Here is what I actually see: the command and file names are case insensitive! So “vi” is the same as “VI”, or “vI” or “Vi” for that matter. It is so un-Unix like. Case sensitivity is a piece of holy grill held by Unix devotees, dearly to their heart. I am sure Apple’s practice had made a lot of people uneasy about its intent and conformity. To them, “apple” is different from “APPLE” (Apple – macintash, APPLE – golden delicious, aPPle - granny smith, and so on). Using case sensitivity, we can encode 32 different species under a single pronunciation – is there anything more graceful than this (kidding)? But for normal user, case insensitivity makes more sense, I have to admit. Later I find out that Apple does provide a way to keep the case sensitivity (under political pressure from die-hard Unix programmers, I supposed), at time of installing Mac OS. I, indeed, re-install the OS with that option chosen.

Another oddity I found has something to do with how Mac OS marks the line ending in an ASCII text file. As we know, Windows (and Dos) uses CRLF (0x0d 0x0a) as the marking. Most Unix (Linux included) uses LF. When I saved a text file from vi on Mac, I found “vi” ended the line with CR. Not clear to me is it a choice of the vi program itself, or the rest of Mac OS demand the CR as the standard end-of-line marking. I guess I will soon figure that out – when I download some of my popular scripts from my Linux box. It seems everyone wants to do things in slightly different way – causing problem and headaches for everyone else to endure and suffer. That’s one of the problems that have plagued Unix development since its early years: lack of conformity (and respect) to each other. I heard Google gonna release its own OS, let me put a dollar on the table that Google will use LFCR as the line breaker on its OS as it is only combination of CR,LF left unused.

With all the familiarity I enjoy, I am still hindered by my lack of knowledge on some basic operational skills to get me around on this new platform. I have stumbled on as simple/trivial task as how to eject a CD out of the CDROM drive. It drives me nuts to find myself immobile in front of the new toy – all my existing knowledge serves me no good and has to be cleansed, all educated-guess are approving wrong. So I start to compile a list of how-to’s here. The list is dynamic. I will add more as I go.

Boot from DVD - Press C key while the system booting up

Eject CD/DVD - Drag n’ drop the CD/DVD icon to the waste basket

Boot to single user mode - CMD + S (Press command key and S key at boot up)

Boot to verbose mode - CMD + V

Boot to firmware(the bios on PC) – CMD+OPT+O+F

That’s all for today…

No comments:

Post a Comment