Electronic Lecture Notes Revisited

Posted in Maths & Science, Personal, Software on February 3rd, 2010 by Noldorin – 2 Comments

As I promised, I have finally gotten around to evaluating the effectiveness of taking lecture notes using an Eee PC (a first model version, borrowed from a friend). I say evaluate, but I am effectively referring to one thing: the annoyance of typing mathematics in LaTeX on a keyboard less wide than my handspan. Although as a physicists student, this plan has turned out not to be the most effective, I would be inclined to think that many of the problems would be eliminated if you were just taking notes for a history lecture or such (pretty much any humanity for that matter, including law, as I’ve been told). Regardless, reST is at least a pretty nice format in which to write, and using doctutils to pdf-ify the notes is still the way forward, I would say. So to summarise, the quite horrible ineffiency (and concentration required) of typing was the main reason that led me to abandon the (initially very hopeful) endeavour by two weeks into term. I can’t be sure how much one of the newer Eee PC models would have helpd me – somewhat, but not hugely, I would think.

As it is, I am fortunate enough that all my lecturers have decided to hand out printed (and generally pretty complete) notes for the subjects this term. Me, being the lazy student I am, am finding it a good excuse to not bother with any notes for the current term. Saying that, at least it’s letting me focus more on actually understanding the (painfully opaque) material of the current courses, which is surely a good thing!

Well, at the least, I hope I have give some thoughts to anyone else considering a similar plan for lecture notes. It would be actually be quite satisfying to hear if there are any humanities students out there that have adopted the reST/PDF approach. Equally so, I would  be rather surprised if any science guys have managed to make the thing work with an Eee PC.

Musical Gem of the Week #1

Posted in Humanities on January 29th, 2010 by Noldorin – Be the first to comment

Due to the great irregularity of my post frequency, I have decided to bring upon myself the task of a weekly series of posts. Having considered a few potential topics, I came to the conclusion that some posts on particular (extraordinary) pieces of music in my (sizable collection). By extraordinary, I mean both compositions of great quality and those which are well outside of the repertoire of a layman, or even a fan of the genre. As anyone who knows me well enough might guess, I will inevitably be focusing on classical (largely common practice period) music. In fact, now that I consider it, I rather fancy doing this series chronologically.

Philistines, proceed with caution… Experts equally so, perhaps, since I am but a dilettante here!

Unsurprisingly, my first “gem” of the series will be a Baroque piece. I have chosen the little known piece, a Viola Concerto in G major, written by a one Georg Philipp Telemann. Telemann, a contemporary of Johann Sebastian Bach and resident of Germany (the Holy Roman Empire at that time), was in fact much more highly regarded than Bach (whose music was considered to be turgid and old-fashioned) in his day, and yet far less since – a fact that rather surprised me upon reading it.  He was, however, a most prolific composer, rivalling his other contemporary in Italy, Antonio Vivaldi, in this respect. Despite his fame being somewhat diminished by time, he was without doubt a musician of great talent, the Viola Concerto among his finest works.

Since I am neither inclined nor qualified to launch into a theoretical discussion of this piece, I hope you will simply hearing its beauty. Hearing and admiring such a work is, in my opinion, a very personal thing that should only be done through oneself, gradually, and in a holistic way.

1st Movement, Largo

2nd Movement, Allegro

3rd Movement, Andante

4rd Movement, Presto

Note: This recording, while quite decent, is not my preferred one, and I have included it mainly because is is Open Audio. My favourite recording of this concerto is actually available free from the Lancashire Sinfonietta website – you just need a quick registration before you can download the complete work.

I still remember the sensation of hearing for the first time a particular phrase near the end of the Allegro (you’ll know which I mean one when you listen). A feeling of recognition that is, but alas, I cannot remember the source. If anyone could suggest where I might have heard this before, that would much alleviate this ongoing irritance!

Expect (nay, rely upon) my second post in the series next week. Until then, I hope I have given some of you enjoyment in sharing this first piece. Comments and suggestions welcome, as always.

WPF on IRC

Posted in Programming, Software on January 29th, 2010 by Noldorin – Be the first to comment

Being a long-time member of the ##wpf channel over on the Freenode IRC network, I thought I would bring it to the attention of any readers who are interested in this wonderful technology. Since the post is really only of interest to developers who already know WPF (or are at least keen to learn it), I shall not say anything about the technology except that it is a superb (and very modern) user interface/presentation framework for Windows applications – I strongly recommend it to anyone who develops complex (or even simple) user interfaces as a replacement for whatever library/toolkit they are already using.

The channel is currently the most popular WPF-related channel on any IRC network (of which I know), and sees regular activity, though not quite as much as we hope, hence this post! While the channel averages around 20-30 users at any time, it has not quite seen the growth it deserves as WPF gains more and more popularity. Hence, I urge anyone interested in the subject to at least pop in and check out the channel, perhaps idle around for a while. We’re a friendly lot, I promise, and will be glad to help out any newcomers!

Designs for a Computer Algebra System

Posted in Maths & Science, Programming, Projects, Software on January 8th, 2010 by Noldorin – Be the first to comment

Creating a modern computer algebra system from the ground up, as has been a plan of mine for some months now, is no trivial goal, as anyone who has even a vague conceptual understanding of computational algebra must surely know. My efforts in this area, grouped under the title of “the Syracuse Project“, have involved mostly research and large amounts of contemplation so far, but I feel that I have finally managed to formulate enough solid ideas that they are worth presenting in a short article. I was also fortunate enough to find someone on IRC (in #math-software on Freenode) with whom I could discuss and refine many of our mutual ideas. The ideas discussed in this post are the culmination of my own thoughts and much of the knowledge I gained from my conversations with Robert Smith (nickname ‘Quadrescence’) online, which has served as the basis for some of my own investigation and explanations here, in a modified form.

What I am going to focus on here falls mainly under the domain of my Euclid.NET project, which is essentially the core of Archimedes, which one might describe as the “CAS kernel”.  Think of Euclid.NET as the framework for symbolic mathematics upon which Archimedes is built. Its primary purpose is to handle such tasks as expression evaluation, simplification, differentiation, series expansion, and so on. (Bonus points if you can spot the connection between the names of Archimedes and Syracuse.)

TeX.NET, which is the primary parser (expression tree builder) for the project at this moment, has already seen a stable release, and will soon see the second with any luck. As you might guess from the name, it takes input in TeX syntax (well, actually LaTeX, with a few extensions).

To begin, I thought I would tackle one of the tougher aspects of computer algebra systems, namely, simplification. More trivial features such as expression evaluation and differentiation are essential to a CAS, yet are hardly worth an in-depth discussion, at least not for now.

So what is simplification?

Simplification, to state the banal, is concerned with making an expression more “simple”. Unlike many every terms that have been borrowed by mathematics, “simple” or “simplification” truly does not have a more rigorous definition. The problem here largely stems from the fact that the definition of what is simple is somewhat fluid – it depends to a great extent on the context. To illustrate this nature more concretely, here a few examples.

  1. (x+1)^2 or x^2 + 2x + 1?
  2. y^{-3.5} or 1/y^{3.5} or 1/(y^3 \sqrt{y})?
  3. \tan x \sin x or \dfrac{\sin^2 x}{\cos x}?
  4. e^{A(2x-y)} or e^A\left[\dfrac{e^{2x}}{e^{y}}\right]?
  5. 4 \sqrt{x^3 + 6x^2 + 9x} or 4(x + 3)^2 \sqrt{x} ?

A simple expression treeA visualisation of a very simple expression tree. The equivalent infix expression is (2 + 2) + (2 + 2) + (3 + 3). Note that in general such trees are not restricted to be binary.

I think that anyone who has had sufficient experience using maths and manipulating many formulae and expressions will realise that in some scenarios, one of the given equivalent expressions in 1 to 5 is desired in a certain scenario, while another is desired in a second situation. Hence, any conceivable simplification algorithm cannot be treated as a rigid mechanical process, bur rather must adjust itself depending on the parameters it is given, which hint at the sort of result that is desired.

When humans perform simplification of mathematical expressions, they often use so-called intuition, developed from much prior experience, along with trial and error, to (in most cases) quickly and accurately simplify maths. It is inevitable that even the best mathematicians hit dead ends when trying to simplify complicated expressions. A computer, perhaps unsurprisingly, cannot do any better. Moreover, mathematical simplification is, in my view, one of the few aspects of mathematical methodology that overall better suits a holistic intelligence, rather than the traditional sequential one that is most often associated with maths (theorem proving being a notable exception). In fact, mathematics is not all so logical and all-encompassing as even mathematicians not long ago thought – thanks to the magnificent Incompleteness Theorem proposed by Kurt Godel in the 1930s – this is however a subject for another day.

How can we measure simplicity?

Fortunately, and perhaps surprisingly, the field of evolutionary computation presents a rather handy way of treating the “simplicity” of expressions, that is, a fitness function – in its most abstract sense, something that measures the absolute “fitness” of any given solution for a certain optimisation problem (most commonly genetic algorithms, which lent the term “fitness”). The “fitness” may be thought of qualitatively as the value, worth, or suitability of a particular solution. The solutions, in this case, are of course expression trees.

To begin, it is greatly helpful to reduce the problem by extracting a certain (small) number of parameters from the expression tree, rather than trying to analyse the entire thing holistically. This reduces the parameter space (the set of all possible parameters) dramatically, which is typically highly beneficial in optimisation problems. The fitness function itself is allowed to take any form in general, though we shall see shortly that one or two classes of function in particular are desirable. For now, let us just focus on the set of parameters. After some consideration, I came to the conclusion that any effective parameter space must consist of the following variables:

  • Size of the expression tree (i.e. the number of nodes)
  • Height of the expression tree  (i.e. the number of layers)
  • Width of the expression tree (i.e. the number of nodes in the bottom layer).

These are all of course integer values, and thus the value of the function is restricted to lie within the set of integers. After building up an image that measuring simplicity is a tricky thing, this may seem like a rather straightforward framework; indeed, it is in some ways, thought it is worth noting that the apparent problems arise when we decide what function to use and when it should be applied. The reasons for the choice of these parameters should become apparent soon.

Let us first consider a basic fitness function that simply weights each parameter individually in a linear combination. In other words, the fitness function, F(S, H, W) may be defined as the following, where S, H, and W correspond to the size, height, and width of the expression tree respectively.

F(S, H, W) = aS + bH + cW

The constants a, b, c may be any integer (postive or negative), and should be passed to the simplifier routine rather than predefined, according to the desired output. It should be quite evident that by choosing different magnitudes as well as signs for these constants, each of the three parameters may be independently rewarded or penalised to greater or lesser extents. The question you might then ask is: why not a more complicated function depending on S, H, and W? My answer is a straightforward one: there is no need. A linear combination of terms gives enough control over the desired function that extending to the function to add higher-order or even exponential terms would be quite pointless and arbitrary. I have, however, far from closed my mind on this matter – as I design and test the system progressively, certain discoveries may be made that suggest a slightly different approach.

Indeed, my only other real consideration for a fitness function thus far is one of even more basic form. Suppose, for example, that the fitness function only depended on two things: a) which parameter should be prioritised, b) whether this parameter should be promoted or demoted. The other two parameters would simply be minimised in the case that the first shows no preference between two trees. I have not finalised the implementation of this, but hopefully this brief description should give you an idea.

I now only leave, as an exercise to the reader, the five example expressions given in the previous section, and considered how any desired result (simplified form) can be achieved through the selection of the appropiate fitness function (using either of the two I have just proposed). Of course, feel free to post a comment regarding any queries or findings you have regarding this matter.

An effective algorithm for simplification

So far, I have discussed how simplicity can be measured in absolute terms, and how in this way the most “simple” of a set of solutions (expression trees) can be chosen as the result of the algorithm. What I have not really mentioned, however, is how an algorithm might actually search out the possible solutions. Although the nature of the algorithm is mainly independent of the fitness function  and the evaluation of expression trees, it is helpful to discuss this second so as to give a clearer image to the approach as a whole.

Simplification when done by a computer, as when done by humans, involves at its heart the application of a large number of mathematical rules that transform expressions. To give some examples of a few of the more basic rules:

  • x + 0 \rightarrow x
  • 1 * x \rightarrow x
  • x * x \rightarrow x^2
  • x * (y / x) \rightarrow y
  • x^2 - y^2 \rightarrow (x + y)(x - y)
  • \sin^2 x + \cos^2 x \rightarrow 1

Given a complete set of all simplification rules, we can find a path (or derivation) between any two equivalent expressions. (In theory, this is no issue, since the set is finite, though rather large. The practicality of  all the required rules is another issue that I will not go into here.) Note that the rules are bidirectional; they allow you take a simple expression and sequentially transform it into an arbitrarily complex, yet still identical one. (For example, x \rightarrow x + 0 - 0 + 0 - 0 + 0.)

Assuming (quite reasonably) that this assertion that a “finite number of application of simplification rules can derive any equivalent expression from the original” is valid, we must then consider how the search should proceed. Under the utterly naive brute force approach, the algorithm is clearly non-terminating, but we can do a lot better than this.

The search algorithm is all about compromisation in essence. If we search every possible derived expression (up to a certain size), then it could take an unreasonably length of time to simplify even relatively tiny expressions. On the other hand, we make too many assumptions and cut off many branches in the search tree prematurely, the algorithm may terminate quickly, though not necessarily with the simplest solution (or even anything close). Hence, the idea of using genetic algorithms, albeit initially appealing, is in my view to restrictive to a problem that requires a “perfect” answer in most cases, and should not have any stochastic nature.

My currently planned approach is one that does not differ greatly from a simple brute force evaluation of all the simplification paths. The main improvement is one that falls out rather naturally from using a fitness function. The idea is that each node of the search tree is evaluated by the fitness function upon its creation, and if the fitness is below a certain (specified) threshold, the search from that particular node terminates. For a start, this prevents originally small/simple expression trees being transformed into ones that are absurdly large, while still allowing some limited expansion of expression trees in the hope that they may later be simplified very effectively. Many nonsensical (what we might call counter-intuitive) paths of reduction of the expression would also be eliminated in a similar way. There is also one practical problem of important note here: many disparate simplification paths along the tree do converge to the same solution during a search (some quite quickly), so it would be quite foolish to branch twice from identical nodes of the search tree. Instead, we really want to cache any nodes (expression trees) already visited during the search process, and not compute their descendants (derived children) more than once. A simple hash table (set, in fact) would seem like the most effective way of accomplish this. Creating an efficient and relatively collision-free hash function for an arbitrary tree structure is however no trivial task. I was to get a number of quite sensible and useful responds when I asked the question on StackOverflow.

Apologies if this discussion of “search trees” and “expression trees” and their corresponding nodes has led to some confusion regarding what is what. It is most important to recognise that the node of a search tree is itself an expression tree (what I sometimes call a “solution” to the “simplification problem”). Due to the risk of losing reader interest at the cost of an even longer post, I shall stop my ramblings here, and leave further elaboration of the search algorithm for another post.

The future of the project

What has been discussed so far is largely theoretical, yet I have tried to present it in such a way that the method of implementation is for the most part self-evident. Work on this project will likely proceed slowly in the short-term future, though as it advances, the features will surely solidify. I am hoping that at least by summer there should be some tangible results to these efforts. Regardless, I shall try to give status updates along the way.

The Fall of the Roman Empire

Posted in Humanities on December 27th, 2009 by Noldorin – Be the first to comment

Today I thought that I would take a little diversion from my usual ramblings of science, technology, and software, and instead explore a long-time amateur interest of mine; namely, history. If you are a regular reader of my blog and the subject of humanities holds no appeal to you, there is no need to read further, for there is no hidden technological sub-plot to this post I’m afraid. Equally, I do however urge you to read on if have but a passing interest in history and human affairs, regardless of any education in the field. Indeed, my own knowledge is very much amateur; this post is mainly the result of the desire to share my fascination with a certain area of history. While virtually all eras and aspects of humanity’s past capture my curiosity, ancient history - that of the great civilisations of antiquity – does so the most. It is in particular the macroscopic events, important achievements, as well as disasters of these peoples that are both the most wondrous and poignant to me, and in some ways the most informative to us as the human race.

Few events since the birth of Christ have been of such immense and far-reaching consequence as the fall of the Roman civilisation. One cannot escape either the effects of its 1500 year endurance, arguably unparalleled by any other civilisation to date, nor the shock-waves generated by its final collapse, still running their course through to the present. In modern times, as over the past centuries, it is an event that has be shrouded in much confusion and misinterpretation. The so called Dark Ages, while not perhaps an impenetrable as the name suggests in our minds, lost much of what was known and discovered during the classical era, mostly only recovered in the post-medeival years, and some not even to this date.

Now, before I arrive at the core of the discussion, I  feel it would be rather helpful to dispell some of the haziness surrounding this subject but defining some of the phrases and concepts more rigorously. Indeed, one cannot even begin to discuss the fall of the Roman Empire without the context of its beginnings and developments before that time.

What actually is the “fall” of a civilisation?

No civilisation has or ever will endure forever. Common sense, if not familiarity wish history itself, should tell you that and more. Yet their durations and the methods by which they falter are many and varied. While some grow quickly and are destroyed with equal speed, others experience modest advancement, a long peak, and a gradual decline. Between theses two extremes are a host of other patterns, every one unique and some quite extraordinary. The Roman Empire is one of the most astounding, in my view. While empires created by the Macedonians, Mongols, Spanish, and British, were magnificent in their own ways, and undeniably left their significant marks on history, their span from birth to death numbered no more than several hundred years. On the other hand, we can consider the Roman Empire, which accounting for the pseudo-empire of the Republic, endured almost a millennium. Slightly subtle, but most striking, is the fact that what is often referred to as the greatest empire of history is named after what was once e small village in the middle of a southern European peninsula. Not a country, not even a region, but what was originally a small group of tribal folk managed to conquer over 5,000,000 square kilometres of land and rule over a population of 100 million at its apex.

Although one could define the fall of a civilisation in various complex sociological and economic terms, among other rather technical ways, I find it more useful to a take a less rigid view. To list a few of the “defining” features (but by no means a definition), should just help to solidify the idea.

  • A steep decline in the wealth and prosperity of society. Standard of living, level of technology, complexity of society, may all become hugely diminished.
  • Loss of knowledge and skill; literary, scientific, architectural, historical, et cetera.
  • The replacement of the principal culture or ethnic identification of a civilisation by a different (often a more “barbarous” one).
    Both culture and language may undergo enormous transformation, with a varying degree of absorption.
  • Great losses of territory considered to be ruled or controlled by the civilisation.
    The causes can range from withrawal of governance/troops, rebellion, or foreign invasion.
  • A weakening/collapse of the military forces of the nation.

Many, if not all of these features are apparent in the downfall of great civilisations, rarely more pronounced than in the case of the Romans. Before we get to specifics here, let us first “set the scene” with a bit of background. Yes, I say a “bit”, yet Roman history is so vast that even a few thousand word summary can barely do it justice.

The beginnings and evolution of Ancient Rome

Rome in 800 BC showed few, if any, signs of the great civilisation it would become centuries later. Visiting the area that is known as Lazio in modern Italy (or Latiumin Classical times)at around this time in history, you would likely see sparse collections of wood and stone huts and small buildings organised at best into a petty kingdom, with minor and primitive fortifications at most. Society there was likely little more advanced than elsewhere in central and southern Europe (except Greece). Rome itself was a small settlement on top of the Palatine Hill – later to be the site of vartious temples and imperial palaces. When we consider that the Mesopotamian cultures were thriving in the advanced cities, with levels of technology unimaginable to most contemporary Europeans, and the ancient Greeks were beinning to produce astounding works of literature and art, the simple Latins were but squabbling with other Italic tribes over tiny patches of land to rule and farm.

No one knows very well the exact origin of the Latin tribes, or many of the other ancient peoples of the Italian peninsula. Certainly, the Etruscans (who give their name to the region of Tuscany) had a fundamentally different civilisation that preceded that of the Italics by a couple of centuries, yet was soon enough amalgamated by the Romans. The legend of the Trojan prince Aeneas sailing to the area around Rome following the destruction of Troy at the end of the 2nd millennium BC is likely little more than elaborate fiction and myth. Together with the story of Romulus and Remus, it is a “foundation tale” common in the mythology of almost all civilisations, that was likely fabricated and expanded around a core of historical fact in the following centuries to give a grander vision of the Roman people’s origins. What we know know, however, is that Latin and the other related languages of the region at the time were from the beginning Indo-European languages, likely brought my migrants to the peninsula in the 2nd millennium BC, who subsequently integrated with the existing population. Unlike Etruscan (which surely had some influence on both the Latin language and culture), Latin shares common heritages with languages as diverse and distant as Irish, Greek, Danish, Russian, and Hindi (both in their modern forms and their antecedents).

The legendary founder of Rome, Romulus, having slaughtered his brother Remus in an argument over who would become the first to rule the fledgling city of Rome, began the era of the Roman Kingdom, which lasted from 753 BC until 507 BC, as far as our best estimates can tell. Little is known of this period, although it undoubtedly had a vital role to play in the establishment of Rome’s dominance. The Sack of Rome in 387 BC by the Gauls (the ancient Celtic peoples of France and central Europe), despite not affecting Latin culture, destroyed the vast majority of early Roman records, not to mention architecture, such that we have to day is at best due to second or third hand accounts. After a couple of centuries of monarchy (albeit of a slightly unusual, non-hereditary form), Rome was in the clutches of its 7th king, the cruel and tyrannical Lucius Tarquinius Superbus - the third of the Etruscan line that had gained dominance in the latter years of the Kingdom. It was thus quite inevitable that the population of the city soon rebelled and overthrew him, forming the much better known Roman Republic in the process. This movement, led by the senator Lucius Junius Brutus, created a strong and enduring (pseudo-)democratic republic in which the Senate (led by two elected consuls holds year-long terms) effectively governed the state. The Roman Republic proved to be a model of great success, as Rome quickly developed into an advanced civilised society, inspired to a great extent by the success and culture of Ancient Greece, while still unique and proud in its own right. Over time the plebs (common populace) increased greatly in power and influence compared to the patricians (nobility), so much so that (although they were typically not able to vote), could rise to the highest positions in the Republic, even as far as consul and governor of the provinces. The famous motto SPQR (Senatus Populusque Romanus – “The Senate and People of Rome”), which even now covers certain buildings and the manhole covers of modern Rome, represents well the nature, spirit, and pride of the Roman people.

From the founding of the Republic, it was not long before the Latin peoples managed to subdue their neighbouring tribes, and by the 3rd century BC most of ancient Italy was under the rule of Rome. It was around period that the Romans also began to battle the Carthaginians, a trade empire based around the city of Carthage in modern Tunisia, originally an outpost of the Phonecian civilisation. These so-called Punic Wars are generally not considered to have been initiated for Rome’s desire to expand its territory, but rather to insure its supremacy in trade and limitation of Carthaginian influence. In the end, the Romans were of course victorious, in spite of several set backs, eventually defeating Hannibal and razing the city of Carthage. Thus began the conquests of Rome, and its eternal lust for glory and power. This small republic of minor importance in the 5th century BC had already become the superpower of the Mediterranean by the time of the assassination of Julius Caesar in 44 BC. At the same time, however, the seeds of its destruction had already been sown. It is at this point, still 500 years before the fall of the Rome, that some consider to be the source for its later decline.

Roman territory at the end of the Republican era

The lands of the Roman Republic upon the assassination of Julius Caesar in 44 BC.

By a quirk of history, it was a man by the name of Marcus Junius Brutus, a descendant of the heroic founder of the Republic, who would participate so markedly in its demise. A long-time friend of Julius Caesar, Brutus was the leader of the conspirators who assassinated Caesar on the Ides of March, and to whom the famous utterance of “Et tu, Brute?” was made by Caesar in his dying breath. (More likely, the actually words were the Greek “Kai su, teknon?” – “You too, my child?”. It was customary for the elite and intellectuals of Rome at that time to converse as well as write academic texts in Greek.)

Although there was a brief time in which many thought the Republic had been saved by those who conspired against the dictator Julius Caesar, it was not so. Caesar’s rule having been preceded by two devastating civil wars in the first century BC, much of the populace, thanks largely to his shrewed political tactics, the stability and peace he brought to the Republic, and his conquest of all Gaul, respected him, even as a hero and a worthy “dictator for life” (despite the lack of precedence of such power or title). Indeed, the conspirators, despite being given full amnesty by the Senate for his murder, were forced to flee Italy and were later killed or committed suicide in the ensuing wars. What cemented the transition in the end was the great ability and cunning of the first Emperor, Augustus (born Gaius Octavius Thurinus), which enabled him to manipulate the Senate while maintaining the facade of a return to a Republican system, eventually coercing the senators into appointing him emperor (interchangeably referred to as Augustus, Caesar, and Imperator during the period). In this tumultuous and tragic fashion was the glorious Roman Empire born.

The Roman Empire at its apex.

The extent and regions of the Roman Empire at its peak under Trajan in the 2nd century AD.

I will not dwell too much on the history of the early amd mid-Empire; suffice to say that it was governed by an eclectic mixture of men ranging from the wise and clement to the insane and cruel. The early 2nd century AD saw a time of both great prosperity and peace, often referred to as the Pax Romana, culminating with the rule of Marcus Aurelius (the last of the “Five Good Emporers“). Besides the Empire reaching its greatest territorial extent, it was also at its social and economic pinnacle, seemingly unshakable. (As a note, the film Gladiator was, at the very least, more or less along the right lines in its portrayal of Marcus Aurelius and his son and successor, Commodus. Unfortunately though, Commudus was not slain in the Colosseum by the vengeful Maximus Decimus Meridius, but was rather strangled in the bath tub by a wrestler after a failed poison attempt). Clearly, this “benevolent dictatorship” did not last as long as one might have hoped. The Crisis of the Third Century, beginning not long after the death of Marcus Aurelius, is considered by most to demonstrate the first (or at least clearest) signs of imperial decay. This is the subject on which I shall now focus.

The Decline and Fall of the Roman Empire

Now, let me first admit to this heading  not being of my own making. It in fact stems from Edward Gibbon’s masterpiece on the subject, written in the late 18th century, and has since been an inspiration in the study of late Roman/early Medieval history, as well as having become an almost cliched style of title.

With notable decay commencing in 3rd century, the power and grandeur of the empire gradually declined, with but several short-lived and quite modest resurgences (such as Constantine the Great’s reunion of the East and West halves of the empire, which later split again). The Crisis of the Third Century, although technically over by the closing decades of the century, never wholly subsided. The economic collapse, social unrest, numerous invasions, and incompetent emperors continued for the most part until the momentous Sack of Rome in 410 AD by the Visigoths, the first to occur in roughly 800 hears, and by far the most devastating. Although the Empire and certain aspects of Roman civilisation continued in a paltry and diminished form, a subsequent Sack of Rome in 455 AD by the Vandals (another Germanic tribe),  put the proverbial nail in the coffin. The somewhat more stable and populous eastern half of the empire, which became known as the Byzantine Empire (with a predominantly Greek culture) lasted amazingly for another millennium, until its capital Constantinople was sacked by the Ottomans (Turks) in 1453 AD, having been reduced to a shadow of its former glory centuries before by the Arab and Turkic expansion. When I refer to the “Roman Empire” in this article, however, I solely mean the Roman Empire as a whole entity, that which was dominated by Roman culture and the Latin language.

Backtracking slightly, let us now examine the potential causes of the decline, starting with what are perhaps the more evident ones.

  • The system of governance of the Roman Empire was flawed from the start. Unlike the Republic, there did not exist a strict set of rules determining who had the power to command what. The “checks and balances” developed during the Republic were far out of place by the time of the mid-Empire. The Empire was born out of civil war and turmoil, and not given any much consideration or foresight. What is more, the method of succession was not fixed – the Emperor could nominate whoever he chose to succeed him, or in the event of his death it may be whoever bullied their way to the top. In the latter years, the Praetorian Guard, the supposed protectors of the Emporer, often murdered the Caesar and replaced him with someone of their choosing. Even the Roman Kingdom, despite being an autocracy, had rules and traditions in place to protect against such chaos. Beginning with Caesar Augustus and lasting until the reign of Marcus Aurelius, the majority of emporers had enough sense and acumen to maintain, solidify, and even expand the boundaries of the empire, while the worst ones did not at least get chance enough to do too great harm. Beginning in the 3rd century however, this no longer applied.
  • The empire simply expanded too quickly, and as it did so, put unbearable strain on its resources. Food, money, and troops all became harder to maintain as its size increased, and particularly, as the externel threats amassed. Protecting and supplying the frontiers, and sometimes even the central provinces, became a difficult task. The sheer level of infrastructure required to hold onto to newly conquered provinces was immense, and the end result was monetary devaluation and rocketing taxes, hurting tremendously the lower and middle classes of society in many areas. This is a fate that has been shared by many great empires since, and thus must be taken quite seriously.
  • Most notably put forth by Edward Gibbon, the empire’s decline may be attributed to loss of “civic virtue”, or societal decay. The morals and ethics of the people of the Roman people was considered by many, including contemporary historians (as far back as Pliny the Elder, who lived in the early first century) to have collapsed. The Roman virtues, once highly esteemed in the Roman Republic, had been all but forgotten a hundered years into the Empire. Valour, duty, and learning were replaced by idleness, egotism, and indulgence. Men were more interested in attending luxurious parties and viewing theatrical spectacles than marching on the battlefield, while women would flaunt themselves in translucent silk dresses. Once this process began, there was little to stop its runaway course, except for the remote chance of radical and intelligent reforms, which no Emporer had the courage or perhaps capability to perform. The fact that the height of this decay corresponds with Constantine’s conversion of the empire from paganism to Christianity has been noted by some historians as a factor. (The argument boils down to: when people believe that the afterlife is the ultimate goal, and such qualities as meekness are desirable, how can those same people must force to conquer the world?). This viewpoint is however doubted by many, and I personally consider the underlying cause to be more complex and deeply embedded in the society and its development.
  • Closely linked to the previous point is the weakening of the Roman military. Beginning in the 3rd century, it became custom to generate much (eventually the majority) of the force by creating loose alliances with barbarian tribes. Such groups of warriors were called Foederati, primarily composed of Germanic tribes led by Germanic chieftains. In hindsight, one can see the transformation of the Roman military from a force composed at least 90% of Italians in the early empire, to one where only the commanding elite was Italian at the beginning of the 3rd century, and finally to one that was virtually entirely barbarian for the century before the ultimate fall of Rome. It is not surprising, you might rightly say, that putting the control of your armed forces effectively in the hands of your enemies (and in course becoming dependent on them) should come back to bite you one day. Indeed, the very leader of the people who sacked Rome in 410 AD, Alaric of the Visigoths, was a commander in a Roman foederatus (federated legion) in his early years, even spending some of his youth in Rome itself. Laxness, and even plain stupidity of the later rulers of the Empire may be blamed to a large extent for Rome eventually succumbing to foreigners – yet this does not even approach the core of the issue. It was noted by the historian Tacitus in his own time that the virtues upheld by the Germanic tribes, while differing greatly in certain ways, resembled in many respects the ancient Roman ones, and were crucially upheld while Rome was full of decay, especially well the luxuries of the civilised world could least penetrate. The warlike and ferocious nature encouraged in these tribal societies may not have made them a civilised or advanced people, but they excelled at one thing in particular: fighting.

This summarises what are considered to be the primary causes of this great civilisation’s collapse, despite other relatively fringe theories having appeared in recent times. Undoubtedly, such occurrences as widespread plague, environmental change would have contributed to the downfall, though it is rather unlikely they would have been the sole causes. Perhaps one of the most intriguing of these more minor theories is that of lead poisoning. Unknown to even the most sagely scientists of the era was the fact that lead is a highly toxic element, lethal in sufficient dosages. As the Romans, above all the aristocracy, would consume much food and wine that had been prepared in lead pots. and consequently had lead concentrations in their bodies over ten times that of their own slaves, and up to 100 times of that of humans alive today. The failure of the elite classes of Roman society to reproduce sufficiently, for this grave biological and social reason, might have lead to their ultimate demise, possibly even accounting for the insanity of several emperors such as the notorious Nero. In recent years this most curious theory had even started to enter the mainstream.

Labelling one, or even several, “true causes” of the fall of Rome, is a reductionist explanation that does not even come close to conveying the complexities of human affairs that existed during the decline and fall of the civilisation, or indeed, at any time. In my view, only by considering the circumstances in a holistic (and tactful) manner, can one gain at best a fair impression of the ultimate reasons from the available written and archaeological data. I firmly believe that all of the points given above had significant roles to play in Rome’s demise, to varying degrees, yet I would not want to go much further than this, and only to point out that there are surely factors unbeknown to me or anyone alive today (or perhaps ever) that were involved.

Rome’s Legacy

To many, including myself, it is quite astounding at some level that Roman civilisation flourished as long as it actually did. Saying this, there was no true reason why it could not have continued even until this present day, except, perhaps, for human fallibility. The bedrock of civilisation that was the Roman Republic might have resulted in a vastly different alternate history. Nevertheless, the contributions and achievements of this magnificent civilisation to humanity, ranging from society, law, art, and literature to warfare, technology, and most prominently religion, are beyond question. Whether one considers the following centuries of relative primitive and largely barbaric existence that dominated most of Europe until the dawn of the Italian Renaissance in 1300 either a great tragedy or an inevitable spoke in the wheel of time, understanding and appreciating the life and death of such an important civilisation and culture is in my mind of no less importance than the newsworthy events of recent years. If you are romantically inclined, you might find it enlightening as I do to envisage the happenings of the past as droplets that trickle down the stream of time into the vast sea that is today’s world.

Read-Only Collections in .NET

Posted in Programming on December 22nd, 2009 by Noldorin – 1 Comment

In the recent course of developing my IRC.NET library I was hit (quite plainly) by a scenario where I needed to expose an immutable (read-only) version of a generic Dictionary object, and found no immediate solution in the BCL (base class library). Shortly thereafter I had a similar situation, except involving the exposing of a generic HashSet object. Unfortunately, unlike for Collection<T> objects (or in fact anything that implements IList<T>), there are no read-only equivalents of these classes in the BCL, in the manner of ReadOnlyCollection<T> – not even, I may add, in the latest .NET 4.0 Beta 2. Many developers have complained about the lack of a ReadOnlyDictionary class, and a quick Google search should show up several older and more recent blog posts as well as a couple of Microsoft Connect reports on the subject. No news from the guys at Microsoft, unfortunately.

Note: Don’t be fooled by the naive solution of simply casting the collection object to an IEnumerable<T> and exposing that instead – I’ve seen this on more than one occasion in code I’ve viewed. The problem here, in case it isn’t obvious, is that the user can simply cast the IEnumerable<T> back to the mutable collection type and modify that. More often that not, you want to expose more than just an iterator, anyway.

Having racked my mind for a quick and elegant solution to this issue of exposing read-only collection objects, and not being enticed to tarnish an otherwise well-designed library with nasty hacks, I decided that I would implement immutable wrappers around the IDictionary<TKey, TValue>and ISet<T> interfaces. It turned out this in fact only required a minimal amount of effort, yet I was pleased with what I ended up with, and feel that my implementations are complete and well crafted enough to share with the community.

Download the ReadOnlyDictionary<TKey, TValue> class.

Download the ReadOnlySet<T> class.

Suggestions and comments on the design and code are, of course, most welcome.

The Future of Space Exploration

Posted in Maths & Science, Personal, Philosophy on December 19th, 2009 by Noldorin – Be the first to comment

In case anyone is interested in reading the essay I wrote for a college assignment, entitlted “The Future of Space Exploration” (no need to explain the topic I think), I’ve made the full article available to read here. Be warned, however, it is around 3,500 words of mainly rambling – though the content isn’t too technical, I’d like to believe. As always, I would be curious to hear whatever opinions readers have on the subject and my writings.

Leaner CSS

Posted in Programming, Software, Web Design on December 14th, 2009 by Noldorin – Be the first to comment

In my wanderings today, I just happened to stumble across a relatively new project by the name of LESS, which might appeal to anyone interested in web design. LESS has the simple of aim of making CSS “leaner” by extending the language with such constructs as variables, mixins, operations, and nested rules.

Now, I haven’t gotten around to trying it out yet, but it immediately strucky me as a pretty cool little system – it seems to vastly extend the usability of CSS in a very similar way to what JQuery did with Javascript (despite plain CSS being somewhat less horrible than plain Javascript). We’ll have to wait and see whether this project takes off however, though I have an inkling it just may – it has the innovation, for a start.

I will undoubtedly report back whenever I can find some free time to squeeze between my studying and ongoing computational projects. For the moment, I thought I would simply spread the word, as the creators seem most keen to promote.

“A witty saying proves nothing”

Posted in Fun, Maths & Science, Philosophy on December 1st, 2009 by Noldorin – Be the first to comment

These  famous words of the French philosopher Voltaire are probably better understood as one of the many examples of his keen wit, rather than a profound statement; yet they do contain a certain poignancy. The self-referential nature of this quotation makes it so wonderfully ironic and perhaps even paradoxical. As with so many quotes that are worth knowing, there are often several levels of meanings: some obvious, others concaled; some sincere, others facetious. I would in fact beg to disagree with the title of this post (though I, as perhaps anyone) cannot say whether Voltaire made this comment literally or not. To me, it is the very nature of most, if not all, witty quotes, to in some way express a deeper truth – in some respect I think it is part of the definition. After all, truth is beauty, they say.

Enough babbling, though. The purpose of this post is really just to share the small selection of the more memorable quotes I’ve picked up over the years (or at least the ones I’ve managed to jot down before they slipped away). Indeed, rather than launching into a commentary here of all the quotes, I thought it would be better simply to list them as a (hopefully dynamic) collection, leaving it as an “exercise for the reader” to gather what interpretation they will from the words. It is my opinion that they are both better understood and appreciated in such a way – at best it gives the reader undesirable preconceptions, at worst it demeans the thing.

Well, here they are then: my collection of quotations, aphorisms, adages, or whatever you want to call them. I’ve written them in what I believe to be their most commonly accepted form, and attributed them to their most widely acknowledged sources. Nonetheless, I have little doubt that some of them have been distorted, and may even be apophrycal, yet this never made a difference to me and I don’t see why it ever should from any but a historical perspective. Good sayings are often improved over time, sometimes so much that they cannot be attributed to any more than folk wisdom. Whatever they are, they certainly give pause to ponder.

Note: The juxtaposition between the more profound and the more humurous quotes below may seem slightly awkward, but I feel it would be too artificial to separate them out in a clear-cut fashion, so read them as you will.

Socrates (469-399 BC) – Ancient Greek philospher

I cannot teach anybody anything, I can only make them think.

Education is the kindling of a flame, not the filling of a vessel.

I know that I am intelligent, because I know that I know nothing.

The unexamined life is not worth living.

Plato (428 – 348 BC) -  Ancient Greek philospher

Be kind, for everyone you meet is fighting a hard battle.

For a man to conquer himself is the first and noblest of all victories.

Courage is knowing what not to fear.

Excess of liberty, whether it lies in state or individuals, seems only to pass into excess of slavery.

Wise men talk because they have something to say; fools, because they have to say something.

Voltaire (1694 – 1778 AD) – French Enlightenment philosopher

Judge a person by their questions, rather than their answers.

He who thinks himself wise, O heavens! is a great fool.

Prejudice is opinion without judgement.

The multitude of books is making us ignorant.

I disapprove of what you say, but I will defend to the death your right to say it.

Common sense is not so common.

This agglomeration which was called and which still calls itself the Holy Roman Empire was neither holy, nor Roman, nor an empire.

Oscar Wilde (1854 – 1900 AD) – Irish poet and playright

Man can believe the impossible, but can never believe the improbable.

What is a cynic? A man who knows the price of everything and the value of nothing.

A man who does not think for himself does not think at all.

Nothing that is worth knowing can be taught.

Albert Einstein (1879 – 1955 AD) – German theoretical physicist

There are two ways to live: you can live as if nothing is a miracle; you can live as if everything is a miracle.

Science without religion is lame, religion without science is blind.

Logic will get you from A to B. Imagination will take you everywhere.

The important thing is not to stop questioning. Curiosity has its own reason for existing.

Everything should be as simple as it is, but not simpler.

Once we accept our limits, we go beyond them.

Small is the number of people who see with their eyes and think with their minds.

Try not to become a man of success but rather to become a man of value.

Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.

Common sense is the collection of prejudices acquired by age eighteen.

Mark Twain (1835 – 1910 AD) – American author

All generalizations are false, including this one.

Do not put off till tomorrow what can be put off till day-after-tomorrow just as well.

Good friends, good books and a sleepy conscience: this is the ideal life.

The man who does not read good books has no advantage over the man who cannot read them.

Never let formal education get in the way of your learning.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt.

Karl Weierstrass (1815- 1897) – German mathematician

When I wrote this, only God and I understood what I was doing. Now, God only knows.

Oliver Heaviside (1850 – 1925) – English mathematician and physicist

Why should I refuse a good dinner simply because I do not understand the digestive processes involved?

As I said, I hope to update this list over time as I pick up more – do however please feel free to suggest any particularly worthwhile along the same themes expressed here.

Electronic Lecture Notes

Posted in Personal, Projects, Software on November 28th, 2009 by Noldorin – Be the first to comment

Lectures at college and the inseparable hours of studying have been taking up much of my time recently, and in this mindset have made me start thinking about how I could somehow improve that wonderfully tedious and hand-cramping task of taking lectures notes from the board. Ok, so taking lecture notes by hand is far from the biggest inconvenience any student experiences on a regular basis; nonetheless, the idea came upon me that if I could create and store all these notes electronically, I’d be saving myself a good deal of pain (presently and during exam season).

The main challenge of this plan was finding some way to make the input/conversion process for turning what’s written on the blackboard ultimately into some prettily formatted pages, quickly and trivially. Although I’m sure it’s been done by many before, using MS Word or the like immediately struck me as impractical – indeed, worse than pen and paper, in my mind. Hence, my initial thoughts were centered on using a lightweight markup of some sort, such as YAML, Markdown, or perhaps simply plain text. (The text could then be rendered nicely by a program at some later stage.) My plans were to write a small editor application specifically for some format, with facilities such as auto-completion and an in-built previewer to make the note-taking even more efficient.

In the end, my mind was decided when my friend David suggested that I simply use the widespread wiki markup language reST as the primary format. This turns out to be almost perfect, since the Python docutils package contains an advanced and stable reST-to-LaTeX converter – and what could be prettier than LaTeX for displaying notes full of complex formulae. He also kindly offerred to lend me his Eee PC. I daresay this seems like an ideal combination…

Now, I must confess that I have not in fact yet begun to adopt this wonderful approach of taking notes, despite my being quite eager to start. Given that there are only about two weeks remaining before the current courses finish and Christmas holidays begin, I thought that I’d just set up my environment and at best give the plan a “test run”. Beginning in January, however, I very much intend to be using nothing but the Eee PC for notes. I will of course duly report back how the matter turns out, and with any luck, begin a weekly routine of uploading lovely LaTeX PDFs of (not so lovely) physics material!