DEV Community

Cover image for XGH, or A Tale of Two Bridges

XGH, or A Tale of Two Bridges

lbotinelly profile image Leo Botinelly ・3 min read

Thus spake the Master Programmer: When a program is being tested, it is too late to make design changes.

Legend has it that in a faraway province there was a monastery where the Master Programmer shared his teachings. One of his dialogues was about the infamous practices of the court engineer Xingh, and the events surrounding the construction of the Two Bridges.

'Master', said one of the Software Architects of the Tang court, 'The work of the Yellow River North Bridge has begun, following the venerable KISS, YAGNI and DRY precepts - the true pillars that support our development process.

Yet recently the Emperor seems to be quite impressed with the apparent efficiency of Master Xingh's team. He ignores all the precepts of the old Masters in building the South Bridge - he care not about balance and harmony, instead reinforcing the scaffolding with whatever material is at hand.

His workers are also treated as slaves - waves of newcomers come and go, exhausted and disgusted. But still the South bridge rises, in a seemingly chaotic way, until the structure is covered and its appearance improved.

Our own engineers watch the Emperor praise the sycophants and feel disheartened, and in their inexperience they even start considering unit tests a waste of time. Should we also embrace chaos?'

'Your young heart wavers because it lacks confidence, and thus your resolve fades with the first breeze,' replied the Master Programmer. 'Chaos attracts chaos; Harmony attracts harmony. Trust the old Masters; they will not fail you.'

The Software Architect, embarrassed by the harsh words, quietly retreated to the field where the construction team gathered.

The Imperial Court met for the inauguration of the Bridges eight months later.

The North Bridge stood beautiful and delicate, in harmony with its surroundings; the pride of its artisans, its graceful form mirrored in the river. Nothing was amiss, nothing was in excess.

The South Bridge, however, had been declared completed four months earlier - and already had expansions that made it several times wider. Upon meeting the North Bridge Architect together with the Emperor, Master Xingh could not prevent a thin smile of derision from appearing in his face.

The Emperor, a man of numbers, gold and war, uttered raving compliments towards Master Xingh for his efficiency. Meanwhile the Crown Prince, admirer of the Great Masters, profusely thanked the North Bridge Lead Architect for the new jewel that now adorned the Imperial City.

The Emperor mounted Jíduān qù mǎ, his favorite horse, and headed for the South Bridge - at the same time as the Crown Prince rode for the North Bridge.

Surprise hit the gathered crowd when a roaring noise from the South Bridge accompanied by a gigantic cloud of dust and wood splinters signaled the moment when both the bridge and the Emperor crashed into the river below.

'Did anyone test if the bridge could handle horses?' Whispered in shock one of the South Bridge workers. They looked at each other in complete disbelief.

The Prince, who had already crossed the North Bridge, rode fast to the scene of the crash. His tears became one with the river upon finding the Emperor's broken body.

Mourning days came and went. The Master Programmer paid a visit to the now Prince Regent, and offered consolation: 'May the pain of your loss diminish over time, and lessons learned here never be forgotten. Let KISS, YAGNI, and DRY be the pillars of a long and harmonious reign.'

From that time much is gone and no longer exists.

From the South Bridge, only the infamous term 'like a Xingh Bridge' remains - and many are unaware of its origin. Nature has taken over the river banks, and even its cornerstone has been lost.

But visitors to the Imperial City are welcomed by the North Bridge; countless generations of emperors passed under their elegant arches, to which time only added dignity. As proud and gentle as it was on the day of its inauguration, its graceful form mirrored in the river still.

Cover Image: Along the River During the Qingming Festival, Zhang Zeduan, 1085–1145
Source: Original StackOverflow in Portuguese answer, What is Extreme Go Horse?
Quote: The Tao of Programming

Discussion (0)

Forem Open with the Forem app