Life & much, much more

Architecture’s existential crisis

Four posts ago, I took a break from the usual technical and on-going project posts, and instead went on a four part spree talking about Architecture. In particular, I tackled the question of Architecture’s existential crisis. It talks about issues about discipline and professionalism (actually inspired by Bob Martin’s similar talks in the software industry), the philosophies that architecture idolises, and overarching goals of the profession and the world in general.

The reason I spent so much time on this is because I believe that it is wrong to treat architecture as superficially as an art form. It is not a commodified object of entertainment like a book or movie. It isn’t something where people are given the choice to consume it. Instead, it is inherently part of our day to day lives and affects everyone. This means architects have a responsibility to others.

I’ve converted the rather long post into a LaTeX-compiled PDF, so those who haven’t read it due to the sheer size can enjoy it. Download it here.

Will resume to the usual topics after this.

Life & much, much more

I’m sick and tired of this ebook nonsense.

No. I like ebooks. At least the concept. I would love to be able to read books in beautiful, standardised print similar to that produced by LaTeX, on any device, on any screensize, without any problems like math reflow, images, and usage of ridiculous fonts. Oh, and DRM too. But that’s hell in itself.

But no. Ebooks are a mess. A big, honkin’ ridiculous pile of crap. A prime example of what not to do when converting a traditional medium to an electronic form. Why? Because of a lack of standardisation. There is no single format, due to (in a nutshell) firms not being able to talk nicely to one another, swallow their egos and agree. So now we’re stuck with 27 major formats (yes, count them) and each with its own little annoyance. Oh, and that’s without considering potential DRM being slapped on each one of them.

It’s not just the electronic format that is a mess – it’s the physical formatting too. Ebooks can be related to the pre-CSS days of HTML, filled with non-semantic markup and tables stuck around everywhere. Anybody who has experienced the LaTeX nirvana that is "this is a title, not a bold, size 26, centered font" can relate to this – whilst creative freedom is good, computers unfortunately suck at this and are unable to tell what is title and what is paragraph. Thus I am stuck with some ebooks doing nonsense like linebreaking at 80 characters, not telling me when paragraphs start and end, and oh yes- every single plaintext ebook with its own flavour of markdown.

Terror doesn’t stop there. It continues by plaguing the now-necessary routine of converting from format to format whenever you want to transfer from one device to another. Every time you format, it is inevitable that more non-semantic formatting is lost. This, of course, only happens if you can even convert it in the first place, thanks to our lovely friend DRM.

So what is the solution? The solution is threefold – 1) force (taunts and physical violence may and shall be used) all publishers to agree to use a single, open format, such as EPUB, and make that format use TeX markup. Thus ebooks will be distributed in plaintext with attached and compressed images. 2) Force (see previous) all publishers to agree to use a single repository to prevent duplication of effort (another of my pet peeves, thank you for noticing) and spend time manually and painstakenly correctly converting existing ebooks to this new format and dumping it in the repo. 3) Fix all the kinks to allow this TeX-structured ebook source to be then rendered or converted to any other format (eg: LaTeX-generated PDFs cannot reflow) should the retailer or consumer want, even if it means the retailer wants to affix some sort of DRM at this stage. If you noticed, this follows a very much source (TeX-structured format) and binary (whatever you render the TeX into) way of distributing ebooks. This is a win-win situation. Anybody can buy from anywhere without fearing incompatibility. Retailers still can satisfy their craving for DRM. EBooks are semantically-marked and rendered beautifully. Even the plaintext looks beautiful.

It turns out I’m not the first to come up with an alike proposal. A firm known as River-Valley has been cashing in on this opportunity by reformatting ebooks for their rather technical clients, and have made significant progress towards this goal, unfortunately though this project has been stalled for quite some time apparently. A few hopefuls at the MobileRead Forums have tried to make a start, but again I think it just died from lack of love.

But recently I had a wondrous epiphany to solve my woes once and for all. It was the sheer audacity to go against one of my joys in life – standards and conventions. The idea can be summed up in the two froody words "why bother?" Life is too short to care if your music collection is made up of oggs and not flacs or mp3s. Life is too short to bother to ensure that your metatags are using the ampersand corrently in place of "and". Life is too short to fix everybody else’s stupid mistakes that don’t fit your mental specification. So if you see somebody walking down the street reading a book where every sentence stops sharp at 80 characters, give them a pat on the back and congratulate them on finally getting their priorities straight.

Somebody please fix Nepomuk to make it do something useful like automagically sort my collections for me.

End rant.


Sibelius, Finale, Cakewalk? Real men use Lilypond.

Some of the old-timers on this site might recognise the title’s startling similarity to the introductory article I wrote about LaTeX. I received some questions on how I created the music sheet in the previous post about my upcoming composition, Evan, and the answer is: with Lilypond.

As you’ve probably guessed already, Lilypond is a markup language, just like LaTeX. You don’t use a graphical user interface to insert your notes, rests, and whatnot, but instead just code it into a plain text file and convert it to a, let’s say PDF format when you’re ready to view it.


Music scores are complex. Much, much more complex than your word documents. You might have a good deal of fun formatting wizardry going around with LaTeX, but with music, you have notes, you have staffs, bars, stems, different symbols, different types of annotations, clusters, rests, expression markings, decoration (stuff like trills etc), and don’t even get me started on modern music. A score of a modern music piece is probably a piece of art in itself, my stemless notes, dotted barlines and lack of a time signature in my previous post being nothing compared to what’s out there. All of this has to be pieced together in a readable format, whilst still giving the composer flexibility to modify the score to put whatever they wants.

If anybody here has used the famous notation softwares out there such as Sibelius or Finale, it’s quick and easy to learn but a pain when you get to decently complex scores. You also quickly realise that the stuff you produce on there definitely looks nothing professional and mediocre at best. If you consider creating a score, for, let’s say an orchestral piece, you’d not want to continue using these traditional programs.


Take for example that score above. It’s of decent complexity and created using lilypond. Attempt something like that in other programs and you’d fail horribly.

Lilypond is like LaTeX. You tell it what your score will contain, and Lilypond will work out the best way to format it. That’s the best thing – it ensures readability, something vital in any score and a real pain to do manually. Here is a simple example, as a picture speaks a thousand words:


Lilypond is flexible. It allows you to notate very modern pieces with weird artifacts such as, in my own piece missing stems. Of course you may even have missing notes, or even stems that branch out or waving lines to symbolise a direction. (please, don’t just add these for the fun of it, you need to know why and when they should be used and more importantly how to use them)


It’s also fast. Don’t believe me if you want to, but I would honestly say that creating a score in Lilypond is faster than other software (well, LaTeX in my opinion is also faster than Word Processors). Not only can you chunk in notes as fast as you can possibly type them (and you get used to how to input notes very quickly), you can also use variables. If you have a repeating section of a piece, you can just assign it to a variable, just like in math you can say x = 5, and whenever you want to use that section, or in math, the number 5, you just dump the variable and it does it all automatically.

One other feature some might consider a plus point is that it can output the score in midi format. My personal view is that midi should be marked illegal and anybody who uses it be sent straight to prison, because it sounds like crap and effectively slaughters the beauty of the piece, but – well, it does it anyway if you tell it to.


It’s hard to fully appreciate the capabilities that Lilypond provides but I’d like to stress one: readability. Lilypond takes this very seriously. Just as music has evolved through the ages so has scorewriting, and Lilypond really adds that professional feel to whatever score you produce. If you create scores, I would recommend it.

All well and good, but how do I start using Lilypond?

Just like LaTeX it doesn’t matter if you’re on Windows, Mac or Linux. Lilypond works cross-platform and doesn’t charge a buck. First you’d want to hop over to their website, and proceed to the download page. Their website looks as though somebody ate the stylesheet, but nevertheless I can assure you that the program definitely has style. You’d then want to start reading the documentation.

You’d want to read that documentation carefully and ensure you understand what’s going on especially if you’re new to markup languages. Go through step by step – it contains many cross-links but I would recommend just doing it in the order it presents itself in. I cannot say the first score you ever produce with Lilypond will be up and running within 5 minutes, but you’ll get used to it, and when you do, you’ll be really glad you did.

Note (no pun intended): the images were shamelessly ripped off various parts of their site, but all with good promotional intention.


Word Processing? Real Men use LaTeX!

Step right up! This article is technophobe friendly, relatable, and contains hardly any made up words! And it makes you go away thinking “What the hell was I on about?”

You remember the epiphany you had when you were sitting down with notepad when somebody said “What are you, crazy? Use Vim!” The very word “Vim” would strike a sense of pure awesomeness into you, and you’d be converted. Or perhaps when you were typing your regular kabillion lines of ifelse in PHP, when somebody said “MVC is life, kid, use a framework“. Then when you first downloaded Vim or learned about MVC and frameworks, every new line of code, every thing you did was golden, it was perfect, it was … the true way of doing it? Well, johnny come back! Here’s another one!

What a lot of people don’t realise is that using your friendly OpenOffice Writer or not-so-friendly Microsoft Word to honk out your usual blabber isn’t the only way of doing it. Those that know programming can probably relate to this by the difference between good ol’ Microsoft Frontpage and honking out blabber in Vim. They produce the same thing. Somewhat. So it’s time to introduce the hidden secrets of text-authoring.

I never thought one day I would be blabbering on about writing stuff, seeing as it isn’t my forte, but here I am again. What you’re all used to is WYSIWYG. For the technophobes, that’s an acronym for What You See Is What You Get. Basically whatever you type on the screen is what your printer is going to spit out at the end of the day.

Oh, and to go a little off topic here, it’s always been amazing to see what happens if things were invented the other way around, such as the typewriter after the computer/printer combo. “Hey look honey, you get the hard copy right away! No tedious two step processes!

Back on topic. The alternative to WYSIWYG is called WYMIWYG. It’s the same thing except the S has turned into an M. This stands for What You Mean Is What You Get. Though in general we’re all thicker than the Hong Kong phone book, we try to look smart and with a sense of purpose to others. This is what sprung the theory of why don’t we just decide what we’re trying to convey, and let the standards decide how best to express it? The alternative is let’s express something we know bonkers about. Why is the text bold? Dunno, looks good.

The processing goes somewhat like this:

  1. You say “I want this bold.”
  2. Beam me up scotty, your “code” get’s processed.
  3. You get an output format, all pretty with the proper way of bolding things, along with generating all the other things you always wanted with your document.

As you can see, it’s a little step in between before you can see your work slapped on paper.

Explain to me why again I want to create extra work for myself?

Standards and presentation are paramount when taking your brilliant idea/essay/book/article/thesis (yes, thesis’ are very popular about this. Even the University of Cambridge has got online help to get people to use this workflow.)/slides to the big guys, be it your primary teachers, secondary “facilitators”, college guidance or university lecturers. If you sort of skimmed through that last (long) sentence, you might’ve missed the big about thesis’. This is big, when it comes to making things like books and thesis’. Especially long and technical ones. It’s massively popular, even though you might not have heard of it before. Oh, and the people who tell you it’s not used are probably using it themselves in secret and just want a better grade. Shame on them.

This system is called LaTeX (pronounced lah/lay – tech). Basically you write your document in a code form, which’ll then turn into your final product. Here’s an example (not using real LaTeX code, just pseudo code for a simplicity):

{this-is-a-booklet} [double sided, A4paper, 10pt]
{title: My Test Page}
{author: Dion Moult}
{document starts}
This is some [emphasize{special}] text.
{document ends}

It’s somewhat more complex than that, but that’s a good gist of what’s going on. After converting the code to your final product, you might have a .html or .pdf document which you can print. (Sorry, no .doc or .odt, but you don’t need those anyway)

Before I continue waffling on, you also get a lot of control over your document, take this for example:


Yes, all through the power of LaTeX. Even though you might not type a lot of Aaaaargh in your documents, it’s pretty cool to see proper functionality.

Alright, let’s take for example the page layouts used in professional documents. Here’s a nifty diagram to help:


As you can see, there are a lot of measurements. All of these have standards, and all for a good reason, too. Tell you what, pick up any average book by a reputable publisher and count the number of characters in a row of text. It rarely exceeds 66. Surprised? Studies shows that’s the optimum length to ensure readability. It’s all justified too, and there’s often a notes margin on the left in textbooks, and plenty of header/footer space for references. That’s just mentioning one page, when it comes to standards on displaying theories, important concepts, graphs and figures, or even a simple contents or bibliography page, each has standards. There are rules on where words can be broken up (hyphenated) when justifying text. There are difference between the minus sign, a hyphen, and em, and an en hypen. (yeah, there are four types of dashes!) There are standards on currency signs, proper display of greek/mathemagical symbols. Take for example your average tilde. Here’s what it looks like¬† ~.¬† Type that in word and it’ll be unnaturally shifted to the top like it was supered. What about quotes? Even worse. Proper heading sizes, proper indentations on content pages, don’t even get me started.

LaTeX allows you to disregard all these unimportant hindrances to a beautiful document and focus on what really matters. What you are trying to convey. It does a good job of it too. For one thing, you can now do all your documents in a text editor like Vim, which will increase productivity spectacularly. Not only due to the key shortcuts Vim provides, but also due to the lack of moronic clutter word processing applications try to stuff on your screen.

Don’t be frightened! You can literally write anything you want with LaTeX that is and isn’t possible with Word. Those who have battled with huge documents (50+ pages) will start to hate word processors. What with images and tables jumping here and there for no apparent reason, losing justification, and so many widows and orphans you’d think you’d been through an apocalypse.


Ahh, the rule of thumb of documents. This is actually true. Especially with huge thick books full of technical information. You need a standard for examples, for tips, for optional information, for important stuff, for each header type, for references, for citations, for links, for emphasized text, for everything, really.


Advanced math? It’s all easy pie for LaTeX. It can put whatever you want.


Need to put in graphs? No problem. Yes, that was made with pure text, no graphic apps. Heck, I could even write a musical score with LaTeX!

Here’s an example of a crappy economics essay I found in my “tobedeleted” folder exported to PDF with some examples of LaTeX usage.


Yes, it’s neat, thin (66 characters), easy on the eyes, plenty of good spacing, and looking seriously tight. Even the font and text spacing has been optimised for ultra readability. If you try printing it, you can distinctly notice the professional quality the document has compared to your previous works.

This is all well and good, but how do I get started?

I’m glad you asked! If you’re on Linux, simply use your package manager to install a distribution of LaTeX. Use TeXlive. If you’re on a Mac, there are precompiled binaries available from searching online. If you’re on Windows, well, there’s something for it there but I’m not going to bother to search for it. (It exists, though)

Once you’ve gotten it installed, you should float over to the regular #latex channel in They provide help with syntax and as far as I can see, they’re pretty newbie friendly. You should then download lshort from here, then go through it as you would any other reasonable documentation. Learn some syntax, convert your crappy Econs essays, then the next document you’re asked to produce? Smile at them in the face, say it’ll be a pleasure, and start up Vim.

Note for Vim users: there is a LaTeX plugin/script for Vim called LaTeX suite (search on It gives some menus for generating some of the syntax or characters (such as mathematical stuff) and useful page headers. It also has shortcuts for compiling, which you can set to go right to pdf instead of dvi, which’ll make things super fast.