"I was really excited to write this article, because it gave me an excuse to really think about what beautiful code is. I still don't think I know, and maybe it's entirely subjective. I do think the two biggest things, for me at least, are stylistic indenting and maximum const-ness. A lot of the stylistic choices are definitely my personal preferences, and I'm sure other programmers will have different opinions. I think the choice of what style to use is up to whoever has to read and write the code, but I certainly think it's something worth thinking about. I would suggest everyone look at the Doom 3 source code because I think it exemplifies beautiful code, as a complete package: from system design down to how to tab space the characters." John Carmack himself replies in the comments.

Being the novice programmer that I am, some of it was over my head, but other parts of it I could comprehend.

One thing that struck me is the part about where to put the braces. Personally, braces just look messy to me, so I'd rather use a language without them. IMHO, having a terminating statement like 'END IF' is a lot more elegant than having braces all over the f**king place.

Not just a matter of aesthetics; it also depends on the tools you use.

With XEmacs, when the cursor is at a closing brace, the line with the matching opening brace is shown in the status bar.
With this setup, it is advantageous to place the opening brace and function definition on the same line for quick reference.

Especially when programmers tend to have atleast 1200 pixels of height on their screens (well atleast I hope programmers are smarter than average consumer and don't give in into 16:9 fad just because it's cheaper for Samsung to make 23" 16:9 than 23" 16:10...).

One thing that struck me is the part about where to put the braces. Personally, braces just look messy to me, so I'd rather use a language without them. IMHO, having a terminating statement like 'END IF' is a lot more elegant than having braces all over the f**king place.

And don't even get me started on semi-colons

I'll agree with you on the semicolons and I do like Python's indent-based block syntax, but using words rather than curly braces is one of the reasons I've never tried to learn Ruby and refer to it as the bastard child of Java, Perl, and BASIC.

(Though by no means the only reason. The standard library and core language syntax are full of caveats, the Unicode support is inferior to Python's, it's not used much outside of Rails and apps based on it, etc.)

I think curly braces stand out more from the rest of the code than yet another word.

Agreed. The only thing that stands out more is probably the indenting itself.

You'll learn to love them; like the most of us

You can start flamewars just because of mentioning where the curly braces should be!!

I actually prefer writing:

int main()
{
}

to

int main() {
}

but, apart of feeling it more natural and making easier to see where a block starts and ends, I do not have any excuse to prefer it over the other one.

Seeing all that wasted vertical space just drives me nuts. (Partly because it means more scrolling, more time spent repositioning my Vim cursor when scrolling drags it along for the ride, and more time reacquiring my train of thought when scrolling sometimes disrupts it)

...not to mention it doesn't fit as nicely with my Python-originated mental model that an indent level (syntactic block) is generally associated with the first line prior.

In fact, I'm sure that, in some places, I've been guilty of writing slightly less than ideal code using things like the ternary operator (PHP, mostly) and list comprehensions (Python) in order to vertically-compact my code.

In fact, I'm sure that, in some places, I've been guilty of writing slightly less than ideal code using things like the ternary operator (PHP, mostly) and list comprehensions (Python) in order to vertically-compact my code.

I personally think list comprehensions are a cool feature and should be used more, not just in Python. It may be harder to figure out what it does, but at a glance, at least you can tell what kind of things are in the list.

1
--
Badly formatted code will make even the most readable of languages a struggle to follow.

2
--
It doesn't matter how well you format your code, if your function / variable names are badly chosen (eg abbreviated names that mean nothing to anyone but the developer) and there's no clear naming convention, then it can be a tough job understanding what the routine does.

I will also add, overly verbose names are bad too (I have one colleague who uses entire sentences in their function names. While it's helps explain what the function does, it makes code readability more challenging).

3
--
Bad program design is a more subjective topic. Most (if not all) developers roughly agree on indentation; and naming conventions only have to be readable, concise and consistent. Not everyone agrees on the specifics of naming conventions, but as long as those 3 criteria are met, then anyone new to the code can quickly understand the standards applied to that particular project.

However bad program design is about the code design of the code - when to you objects, functions, iteration and so on. Sometimes application performance is paramount, which often means writing clever routines in a manner that isn't ideal for a human reading back. Other times you'll be writing a program which isn't going to tax the processor much, so you can afford to opt for readability over performance (Sometimes you're lucky and the optimised code is also the most readable code).

Then you have people using obscure language features or unpopular features (goto is a great example of that. But thankfully there's very few occasions when a goto is the better method of writing a routine).

And after all that, you have the topic of code separation (eg using MVC's in web development to keep server side code separate from HTML).

----------

At the end of the day, it doesn't really matter whether your language uses English words or braces - a good developer can make their code readable.

But also, a lot of it comes down to practice. If you've never spent any time developing in C-derived languages, then the C syntax will naturally look a mess. But most developers get used to it and even come to love braces (that certainly happened to me).

IMHO, having a terminating statement like 'END IF' is a lot more elegant than having braces all over the f**king place.

No, no it's not. You try to maintain someone else's VB.Net app... "End If"'s (and "End ..." blocks in general) are complete crud. Braces are only complicated if you don't line them up correctly.. but most modern IDE's don't even make that hard. I far prefer '}' to working out which flavour of 'End ...' is missing in a VB method that some idiot made span 3 or 4 screens. Dometimes life is too short to not refactor, and moving VB code to C# is not all that hard. In fact, the last time I did that I fixed about 3 or 4 obscure bugs that VB introduced due to it's utter shit syntax (and this is with Option Explicit and Option Strict on.)

Having come from a Pascal background (but having done a lot of C++ in my BeOS days, ADA at university and BASIC before that), the "begin .. end" block teaches you much better practices than C's braces. There are plenty of places I will use a block where other programmers will not, mainly because it saves time in the long run.

And don't even get me started on semi-colons

The semi-colon is a fairly unambiguous end of statement marker. If that is hard to understand, you are pretty much doomed.

TBH a lot of the problems you describe are more to do with the way the applications have been written and not the language itself. I am sure I can point you to some of the atrocities I have seen in C# (my favourite being the INullObject interface I recently found).

Personally I like VB.NET, while the syntax is odd you can write code pretty quickly. My main issue with the language is that it is difficult to see the difference at a glace between an array and a procedure/function.

A lot of newer developers especially those coming from Python or Ruby find the use of a semi-colon slightly arduous. There was recently a flame war between Douglas Crockford and one of Twitter Bootstrap developer over whether you should make of the JavaScript semi-colon insertion mechanism.