Monday, September 14, 2009

Deleting Rows in Excel with VBA

Deleting and shifting Rows up in VBA is a straightforward task that nevertheless hides a few traps. Say, any Row that has a numeric value in Column 'A' needs to be deleted and the Rows below shifted up. A VBA solution such as the one that follows does not work.

Option Explicit 

Sub DeleteRows()
Dim LastRow, Ctr As Long  

'// find the last Row with data
    LastRow = Cells(65536, 1).End(xlUp).Row

'// loop through the Rows, deleteing Rows that have a
    '// numberic value in Column 'A' and shifting Rows up   

    For Ctr = 1 To LastRow
        If IsNumeric(Cells(Ctr, 1)) Then
            Cells(Ctr, 1).EntireRow.Delete Shift:=xlShiftUp
        End If
    Next Ctr
End Sub 

The problem is that if two or more consecutive Rows have numeric values in Column 'A', not all the Rows that need to be deleted get deleted. Why? Say that Rows 3 and 4 have numeric values in Column 'A'. When Row 3 is deleted, Row 4 moves up to take its place, in effect becoming Row 3. Meanwhile, the loop counter gets incremented in the next pass from 3 to 4, with the code scanning the value in Cell A4 but inadvertently skipping the value in Cell A3. 

An elegant solution to this problem is to start looping at the last Row with data in the Worksheet and move up one Row at a time, deleting and shifting Rows up when the required condition is satisfied. Here is the solution: 
Option Explicit 

Sub DeleteRows()
    Dim LastRow, Ctr As Long   

    '// find the last row with data
    LastRow = Cells(65536, 1).End(xlUp).Row   

    '// loop through the Rows, deleteing Rows that have a
    '// numberic value in Column 'A' and shifting Rows up    

    For Ctr = LastRow To 1 Step -1
        If IsNumeric(Cells(Ctr, 1)) Then
            Cells(Ctr, 1).EntireRow.Delete Shift:=xlShiftUp
        End If
    Next Ctr 
End Sub

Saturday, September 12, 2009

The Joy of Running

My tongue-in-cheek remark to a friend after reading Christopher McDougall's Born To Run was this: "Marathons are for wimps". Now, I have yet to run a marathon and I have no illusions about the dedication, hard work, toughness and tenacity required to complete a marathon but after reading about 'ultra freaks' running up and down the 10,000+ feet high Colorado mountains for 100 miles, or plodding 135 miles across the floor of the Death Valley in California in 135 degrees heat, one can be forgiven for thinking that marathons are a stroll in the park.

Born To Run opens with an all too familiar story. A beefy former war correspondent who is built like someone that nature intended 'to take a bullet for the President' rather than pound down the pavement, Mcdougall is doing the rounds of sports shrinks to treat his dodgy feet. In the winter of 2003, he is in Mexico chasing a missing pop star for The New York Times Magazine when he stumbles across a picture of a Jesus like figure running down a rockslide. Welcome to the secret world of Tarahumara Indians, the greatest ultra runners the world has never heard about.

Living like invisible ghosts in the shadowy recesses of the Copper Canyons of Mexico, the peaceful Tarahumara tribes have for centuries outrun their Indian and European tormentors alike just to survive. What is the secret behind their superhuman prowess that enables them to run for hundreds of miles without rest? This is the question that persuades Mcdougall to abandon his celebrity hunt and start another type of hunt, the hunt for a mythical gringo named Caballo Blanco, the 'white horse' who lives with the Tarahumara and runs like one.

Before the book finishes, there is a gripping duel over 100 miles of punishing Colorado trails between a Community College teacher named Ann Tracy and top Tarahumara runners who have been coaxed to participate in the Leadville 100 ultramarathon with promises of corn bags for their villages. I felt the description of this race alone gave all the bang for my bucks.

The book climaxes with a 50 mile foot race in the treacherous Tarahumara territory between the cream of the Tarahumara tribe and the superstars of the North American - which is to say, the world's - ultramarathon scene.

And the secret to the Tarahumara success? In a sentence or three, it is this: All humans are hardwired to run. As kids, all of us run with joyful abandon. As we grow up, we lose this sense of playfulness and sheer joy in running. The Tarahumara keep this playful spirit alive into adulthood, and they have over the millenia woven the art of running into rituals that govern their daily lives. Also, they do not buy expensive, gel-filled Nike running shoes that seem to do more harm than good.

Tuesday, September 8, 2009

Shantaram: Crime and Redemption

If one has to summarise in three words Gregory David Roberts' 2004 debut novel Shantaram, then it has to be this: "Dostoevsky meets Bollywood". 

Or, that is what I thought after yet another scene in the novel in which Bombay's (when the story unfolds, the bustling Indian island city is about another couple of decades away from being re-named Mumbai in response to a Hindu nationalist popular groundswell) chic set banter and indulge themselves in one of the city's fashionable tourist haunts by the sea. 

And what a chic set it is. Roberts, who tells the story in first person, drinks, smokes, eats and philosophises with local Indian journalists, film producers, mafia enforcers, Iranian army deserters, washed-up Palestinian fighters, Pakistani spies, European outcasts, and an Afghan mafia boss who claims to have found the rational basis of morality.   

And just like Bollywood movies that the author claims to love, the novel packs a lot of action, and enough surprises to satisfy even the most demanding fan of Bollywood suspense thrillers. However, the book is much more than a pulp version of Bollywood. 

At the heart of the narrative is that eternal quest for meaning, love and redemption that inform all great works of art. Roberts, who escaped from a maximum security jail in Victoria while serving a sentence for armed robbery, finds all of these and more in the most unlikely of places and persons. 

Towards the very end of the 933 pages long book, Roberts declares: "The truth is that, no matter what kind of game you find yourself in, no matter how good or bad the luck, you can change your life completely with a single thought or a single act of love". 

One can only say "Amen!" to that and recommend the book as a must read.

Sunday, August 23, 2009

Muna Madan

Gurkha Nepalese Community (GNC), a Sydney-based Nepalese community organization, is staging Muna Madan as part of its annual Dashain festivities this year. A casual conversation with a dear friend of mine who also happens to be one half of a GNC power couple inspired the following thoughts about the most popular lyrical drama of the youngest Himalayan republic.

  • Muna Madan is arguably the greatest work of Nepal's unarguably the greatest poet, Laxmi Prasad Devkota

  • A miniature masterpiece, the work partly owes it popular appeal to its use of folk idioms and metres

  • The drama centres around the trials and travails of a high-caste migrant worker journeying to Lhasa (Tibet) for work and back

  • Apart from the constraints placed by a traditional society on romantic love, the drama also highlights the twin evils of casteism and manpower drain that have impeded Nepal's emergence from the dark shadows of its past

  • The most famous line from Muna Madan, spoken by the high-caste protagonist to a "lowly" Bhote who nurses him back to health, is: "Man becomes great not by caste, but by heart"

Friday, August 21, 2009

Removing Excel VBA password

For whatever reason, one sometimes confronts the need to remove Excel VBA project passwords. Here is an easy way to do it. Hopefully, this will one day spare you hours of googling and frustration.

Monday, August 17, 2009

My City2Surf 2009 Performance

My preparations to run this year's City2Surf under 60 minutes were derailed by a combination of flue, nasty weather and good old inertia (the complete list of excuses actually runs longer than the world's biggest fun run!) Anyway, I clocked 69 minutes 9 seconds, improving last year's result by 39 seconds.

The unexpected 'improvement' - after a month of inactivity, my preparation consisted of four comfortable jogs over the week leading to the event - illustrates what I suspect is the exponential nature of the efforts required to improve one's speed. After a certain point, disproportionate inputs seem to require to exact minuscule gains in speed. Conversely, comfortable pace is not necessarily a prelude to a catastrophic loss (or, is that gain?) in time.

In a sense, running, even the fun ones, is all about timing. One has to know when to hold back and when to give all. As my preparation was far from ideal, I checked my impulse to go all out in the first kilometers even as other adrenaline-fueled runners zoomed past me. It was not until after around 10 km that I upped my tempo. When I crossed the finish line, I still had enough left in the tank to run another 5 km. Perhaps, I held myself back a bit too long but this did not prevent me from feeling very satisfied with my performance, especially considering the comfortable pace that improved on last year's result, which was achieved through far more lung-busting efforts.

Sunday, June 28, 2009

Interesting Python Functions

This post will contain a collection of Python library functions that I found interesting. I will keep adding to the collection as I encounter more interesting functions.

#----------------------------------------------------------------------------
# range() - this function generates a list of numbers
#----------------------------------------------------------------------------

upperBound = 5
range(upperBound) # this generates [0, 1, 2, 3, 4]

lowerBound = 2
range(lowerBound, upperBound) # this generates [2, 3, 4]
range(1, 11, 3) # generates [1, 4, 7, 10].
# range(lowerbound, uppperbound, step)

# an example of range() in action
monthList = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
for i in range(12):
print monthList[i], # prints all the months of the year

#-----------------------------------------------------------------------------------------
# randrange() - generates a random number from a range of numbers
#-----------------------------------------------------------------------------------------

import random # this module is required to use randrange()
random.randrange(6) # generates a random number between 0 to 5 inclusive
random.range(6) + 1 # generates a random number between 1 to 6 inclusive

#--------------------------------------------------------------------------------
# choice() - returns a random element from a sequence
#--------------------------------------------------------------------------------

vowels = ('a','e','i','o','u')
osList = ["linux", "BSD", "UNIX", "NT", "Solaris"]
random.choice(vowels) # randomly selects a vowel
random.choice(osList) # randomly selects an os


Friday, June 26, 2009

A Story of Darkness

Once in a long while, you come across a book that makes you feel like Dostoevsky when he allegedly ran through the streets of St. Petersburg waving a copy of Tolstoy's Anna Karenina and shouting, “This man is God of art!” My own reactions when reading Aravind Adiga's 2008 Man Booker Prize winning debut novel White Tiger was, “This man is a poet of Truth!”

White Tiger is an unflinching look at what the author calls the “Darkness”, the vast underbelly of India where people live on the edge of survival, chaffing under crushing poverty, corrupt institutions, and inherited beliefs and practices that perpetuate their cruel fate. It provides a savage, angry counterpoint to the currently popular narrative of India that has it marching inexorably to unprecedented prosperity and global dominance.

Early in the book, Adiga introduces the theme of the novel in a typically lyrical paragraph:
I am talking of a place in India, at least a third of the country, a fertile place, full of rice fields and wheat fields and ponds in the middle of those fields choked with lotuses and water lilies, and water buffaloes wading through the ponds and chewing on the lotuses and lilies. Those who live in this place call it the Darkness. Please, understand, Your Excellency, that India is two countries in one: an India of Light, and an India of Darkness. The ocean brings light to my country. Every place on the map of India near the ocean is well-off. But the river brings darkness to India – the black river.

Adiga, who did part of his schooling in Sydney, cut his writerly teeth as a correspondent for the Independent, Time and other quality media outlets. This shows in his writing. The narrator, an inhabitant of Darkness who yearns for Light, tells his utterly absorbing story in a language that is a joy to read. Simple, unadorned sentences crackle  with wry humour, sharp wit and sardonic observations that only a uniquely gifted artist can make. Adiga refuses to couch his narrative in Marxist or Manichaen terms, which saves it from being just another banal polemical tract for the underdog.

Unlike some other famous Indian writers, Adiga's voice does not come across as calibrated to appeal to the Western ear. His overriding concern seems to be holding a pitiless mirror to the denizens of the Light and Darkness themselves, and not entertaining distant readers in the cafes of Manhattan or Glebe with fantastic tales of an imagined Orient. Unsentimental, harsh and scathing, Adiga does not absolve the inhabitants of the Darkness themselves from their fate, which he compares to those of butcher-bound roosters trapped in a coop. It is clear to Adiga that the domain of Darkness is not confined to material disparities or geographical boundaries. It subjugates, corrupts and rules the very souls of those who are in its thrall. He has no sympathy for the "human spiders" of the Darkness who, when not wiping tables in cheap roadside tea stalls with dirty rags, occupy themselves with propitiating the absurdly huge array of gods and goddesses of the Darkness, or watching cricket and toothpaste ads on TV.

Monday, June 22, 2009

Tuple, List and Dictionary

This series will feature short notes on Python topics. The idea is to reinforce my learning through "note taking".

Tuple



  • Tuple is just like an array. It is immutable, and holds a sequence of values. However, unlike a C/C++ array, a tuple can store values of mixed types. An example:
      myTuple = ("Python", "PHP", "Ruby", 3.1428, 2009, "Django")


  • Just like a string, a tuple can be indexed, sliced and concatenated with another tuple. When called on a tuple, the len() function returns the total number of elements in the tuple.
    totElements = len(myTuple)
    print totElements # It prints 6



List



  • A list is like a C/C++ dynamic array. Elements can be added, deleted and sorted

  • Just like a tuple, it can store data of mixed types.

  • A list is enclosed in square brackets. For example:
    myList = ["Python", "PHP", "Ruby", "Perl", ('a', 'e', 'i', 'o', 'u')]
    emptyList = [] # this creates an empty list


  • All the tuple operations are applicable to lists


Dictionary



  • A dictionary is like a hash table in other programming languages. It stores data as key-value pairs.

  • A dictionary is enclosed in curly braces.

  • The key must be an immutable data type, i.e. string or tuple. For example,
     
    myDict = {"name" : "Charles Martel", "occupation" : "Palace Mayor, coup leader", "country" : "France"}
    emptyDict = {} # This creates an empty dictionary


Saturday, June 20, 2009

After Missing the Recluse on the Western Mountain

Is there anyone who does not wish to visit a hermitage like the one described in this poem?

AFTER MISSING THE RECLUSE ON THE WESTERN MOUNTAIN
By Qiu Wei
To your hermitage here on the top of the mountain,
I have climbed, without stopping, these ten miles.
I have knocked at your door, and no one answered;
I have peeped into your room, at your seat beside the table.
Perhaps you are out riding in your canopied chair,
Or fishing, more likely, in some autumn pool.
Sorry though I am to be missing you,
You have become my meditation --
The beauty of your grasses, fresh with rain,
And close beside your window the music of your pines.
I take into my being all that I see and hear,
Soothing my senses, quieting my heart;
And though there be neither host nor guest,
Have I not reasoned a visit complete?
... After enough, I have gone down the mountain.
Why should I wait any longer?

Tuesday, June 16, 2009

Finding One's Place in the Sun

Margaret Throsby interviewed internationally renowned British writer and foremost authority in innovation, Sir Ken Robinson, in today's ABC Classic FM Morning Interview. What follows is the gist of what Sir Robinson had to say on imagination, creativity, and finding one's calling in life.

  • Imagination is an agent that brings to mind something that does not exist physically yet

  • Creativity is the practical application of imagination. It produces valuable original ideas

  • Everyone is born with creativity but it gets inhibited by "assembly line" education and adult misconceptions about creativity

  • IQ does not test intelligence. It only reveals the ability to do IQ tests

  • "People feel that if you can't count it, it doesn't count". IQ test is a product of the Victorian bias for the scientific method

  • The question to ask is not how intelligent one is but how one is intelligent

  • Being in one's element means doing something that one has aptitude for. Sir Robinson offered the example of a female snooker player who lost the sense of time when playing snooker

  • Watch children to find out what ticks them in order to find their aptitude

  • The current education system was designed along factory assembly line that churns out finished products. A more appropriate metaphor for education is gardening. Both gardening and education are organic processes that never stop

  • What adults remember about their education are their teachers. Teaching is the heart of education

  • To find your aptitude, do two things: (1) Spend some time with yourself. List the things you enjoy and try to find the commonality in them and (2) Try something you have always wanted to do

  • It is never too late to find one's true calling in life

Sunday, June 14, 2009

A Message to Censor Du Fu At His Office in the Left Court

Way back in my undergraduate days, I printed out 300 Tang Poems, a popular anthology of 310 poems compiled by an 18th century Qing scholar named Sun Zhu. Apart from my fascination with the poetry of the Tang Dynasty (618-907), which presided over China's golden age, the other key motivation for printing out the poems was a substantial, unused print allowance I still happened to have at the end of a semester. What better way to use up the remainder of my print allowance than by printing out Tang poems?

After I got the printouts spiral-bound with a transparent plastic front-cover, I shelved the volume and forgot all about it. It had been gathering dust in my book shelf ever since, until I happened to chance upon it when casting about for something to read on a wintry Sunday evening. Flipping through its pages, I was again struck by the singular beauty of the poems. This has led me to a decision to dip into the collection at random, whenever occasion permits, and, if a piece appeals to me, present it here.

The first offering, by Cen Can, is addressed to Censor Du Fu, who himself comprised, along with Li Bai and Bai Juyi, the poetic triumvirate of the Tang.

A MESSAGE TO CENSOR Du Fu AT HIS OFFICE IN THE LEFT COURT
By Cen Can
Together we officials climbed vermilion steps
To be parted by the purple walls
Our procession, which entered the palace at dawn,
Leaves fragrant now at dusk with imperial incense.
Grey heads may grieve for a fallen flower,
Or blue clouds envy a lilting bird;
But this reign is of heaven, nothing goes wrong,
There have been almost no petitions.

Saturday, June 13, 2009

City2Surf 2009

I will be participating for the second time in Sydney's premier fun run, the City2Surf, that starts at Hyde Park in the heart of the CBD and ends in Bondi Beach. The 14.1 km run will take place on August 9.

My tentative goal for this year is to shave off 9 minutes from last year's time, which was 68' 14'' (The winner, Martin Dent, did it in 41' 12''). It is a big ask. My weekly regime for achieving this goal is as follows:

  • At least two easy runs to enhance my cardiovascular fitness and correct my body posture, transforming my body into a lean, efficient oxygen engine

  • Trim down to my ideal running weight (which is around 56 kg)

  • One fairly difficult hill run to strengthen my leg muscles, i.e. do the round trip circuit from Macquarie Park to Epping train station

  • One interval training to improve my pace

  • One resistance training session to boost my upper and lower body strength

  • Enjoy each training session as much as possible, always keeping in mind Polar's motto: "Listen to your body".

Thursday, June 11, 2009

Hadji Murad

Some thoughts on Tolstoy's Hadji Murad, which I finished reading today:

  • Published posthumously in 1911, the novella tells the real-life story of the eponymous Chechen freedom fighter who defected to Tsarist Russia in 1851 with disastrous consequences.

  • Tolstoy penned the novella in the twilight of his career, when his prophetic fervor had made him disown his earlier works, having condemned the art of fiction itself on religious grounds.

  • In the story, Tolstoy contrasts the pious and ascetic lifestyle of the Avar leader and his followers with the dissolute lifestyle and moral turpitude of Russian army officers and soldiers.

  • Battlefield manipulation of truth and wanton punishment of civilians in the story resonate with certain contemporary events. This brings to mind Ezra Pound's claim that literature is news that stays news.

  • Tolstoy is unstinting in his admiration of Hadji Murad. He is savage in his contempt of Czar Nicholas I. The former is gentle, brave and noble. The latter is vain, pompous and tyrannical.

  • The last word belongs to the critic Harold Bloom, who claimed Hadji Murad to be "my personal touchstone, for the sublime of prose fiction, to me the best story in the world, or at least the best that I have ever read."

Tuesday, June 9, 2009

Bobbin Head: Sydney's Best Kept Secret

Just half an hour's drive from Sydney CBD, Bobbin Head, located within Ku-ring-gai Chase Nationa Park near North Turramurra, is one of Sydney's best kept secrets. The scenic area boasts a rich biodiversity in a sandstone landscape dotted with pockets of rainforests, grassy woodlands and dry eucalyptus forests.

Facilities include coin-operated gas barbecues, a children's playground, fishing spots, walking trails, a cafe, a marina and a historic inn. It overlooks the placid waters of the Cowan Creek.

A mangrove boardwalk after barbecue lunch caps a fine outing for many. The more adventurous can walk up to Wahroonga or Mt Ku-ring-gai train station, which are 5 to 7 kilometres away.

I took some snaps of the area yesterday, and they are posted here for your viewing.

[caption id="attachment_23" align="alignnone" width="300" caption="Marina on the Cowan River"]Marina on Cowan River[/caption]

[caption id="attachment_24" align="alignnone" width="300" caption="The Cowan River"]Cowan River[/caption]

[caption id="attachment_26" align="alignnone" width="300" caption="Another view of the Cowan River"]Cowan River[/caption]

Sunday, June 7, 2009

My interview with Margaret Throsby

Lately, I have been diverting myself with a fanciful sport. It goes as follows. ABC Classic FM's Margaret Throsby invites me for her 10:05 Morning Interview program. As per the rule of the game, I have to name about five of my musical choices, which will be aired in between gentle grilling by the charming hostess. Usually, Throsby wants to know the stories behind particular choices. After wrestling with the seeming impossibility of the task, I come up with the followings:

  1. Flute Concerto No. 3 'The Goldfinch': Allegro (Vivaldi) - This flute concerto was the first work of Western classical music that I connected to. At the time, I was trying to learn bamboo flute. For some reason, this delightful piece conjured up alpine images for me. The association has stuck in my mind. There is something lofty and ethereal about the playful dialogue between the flute and other instrument(s). (In this YouTube arrangement, the flute duets with a piano).

  2. Autumn Moon Over the Han Palace - One of my friends once observed that there is melancholy at the heart of this famous Chinese classical number. To me, it is a textbook example of the traditional Japanese aesthetic ideal of wabi-sabi, which centers around the concept of beauty tinged with sadness at the transience of things. Wabi-sabi has its roots in Buddhism. Autumn moon is a recurring trope in classical Chinese and Japanese literature and arts.

  3. Chanson de Matin, Op. 15 No 2 (Elgar) - I remember the exact moment when I first fell in love with this charmer. I was returning home on train from work, listening to ABC Classic FM on my mobile. I looked out the window, and it was a glorious late afternoon, with wide open skies flecked with glowing clouds. ABC FM was playing this piece, and I was entranced. This sweet music is about another sky, the inner sky. It gently explores the "lonely spaces" of the heart, in the words of the ABC host.

  4. Nulla in Mundo Pax Sincera (Vivaldi) - One of the most uplifting moments in cinema (for me, anyway) is the scene in Shine (1997) in which troubled pianist David Helfgott (played by Geoffrey Rush in his Oscar winning performance) jumps up and down in slow motion to the tune of this music. The rare purity and delicate beauty of this work makes it a genuine heart-stopper.

  5. Prelude from Cell Suite No 1 (JS Bach) - The great statesman, aesthete, writer and former Prime Minister of Nepal, BP Koirala, confessed to feeling the presence of god when attending Ravi Shankar's first concert in Nepal (I was lucky enough to attend Shankar's second concert in Nepal, staged at the Royal Academy Hall, Kathmandu, in which the famous Sitar maestro was accompanied by his nubile daughter Anushka Shankar, around 16/17 years of age at the time). Koirala must have felt as I do when I listen to JS Bach.

Tuesday, June 2, 2009

Ornament of the World



A few random notes from my recent reading of David Levering Lewis's God's Crucible: Islam and the Making of Europe, 570-1215:




  • The famous 732 Battle of Poitiers, in which a Christian coalition halted an Islamic force in what is now France, may have been retrospectively elevated and mythologised as a turning point by Western historians but it was a minor, temporary setback in a skirmish at the periphery of the empire as far as the Islamic rulers in Damacus were concerned.

  • Before Baghdad of the One Thousand and One Nights fame, Damascus was the Caliphal seat of the Islamic empire. Caliph Abu Ja'far al-Mansur (754 - 74) ordered the construction of Baghdad beside the Tigris "with the point of his sword". It was finished in four years. Madinat al-Salam or "The City of Peace" was rivalled only by Constantinople in grandeur.

  • In the battle of Poitiers, the Christian coalition was led by Charles the Bastard, whose political and battlefield exploits would earn him the sobriquet Hammer (Martel in Latin). Martel's grandson, Charlemagne, would be crowned the first Holy Roman Emperor.

  • In his role as Palace Mayor (Prime Minister), Charles Martel virtually brought down the curtain on the Merovingian line, which is now regarded as the first French royal dynasty. Charles's line was officially formalised and divinely sanctioned when his son and heir Pippin the Short successfully sought papal blessing for a palace coup, signalling the ascendancy of the Carolingian dynasty.

  • Charlemagne once executed forty-five hundred defeated Saxons in a single morning after they refused to recant their pagan beliefs in favour of Christianity.

  • A fierce Germanic tribe with long beards challenged the temporal power of papacy. Eventually pacified by Franks under Charlemagne, the tribe settled in a part of the continent that came to be known as Lombardy, the home of the long beards.

  • The celebrated deeds of the eponymous hero of the Song of Rolland was inspired by a disastrous chapter from one of Charlemagne's military expeditions into al-Andalus. However, it was not Muslim treachery or cowardice but the opportunistic attack of independent-minded Basque partisans that trapped and martyred the archetypal Christian knight in a narrow mountain pass.

  • Cordoba attained its exalted status as the "ornament of the world" under the Umayyad rule transplanted by Abd al-Rahman I from Damascus to the Iberian peninsula. Prince Abd al-Rahman I fled Damascus after losing his Caliphal inheritance in a bloody power struggle against an Abbasid usurper. His enlightened policy encouraged the famous convivencia, the civic collaboration of Muslims, Jews and Christians that resulted in an unprecedented efflorescence of arts, culture, science and commerce. Al-Andalus would turn out to be the conduit of the flow of ancient Greek knowledge preserved and enhanced by Islamic scholars to then backward Christian dominions.

  • Abd al-Rahman's architectural masterpiece, La Mezquita or the Friday Mosque, had the following self-referential inscription: It embodied what came before. Illuminated what came after. The inscription could have been the motto of the Umayyad Cordoba itself.