Live data from Hacker News

Ask HN: What are some examples of beautiful software?

news.ycombinator.com

221–230 of 262 posts

Re: Ask HN: What are some examples of beautiful software?

#221
post #212
post #190

I'm seeing a lot of meanings to "beautiful" here, please, let's define what we're talking about. Does "beautiful" means "the code is clean"? If so, the Quake source code is "beautiful", while Duke3D Build engine is "ugly". Does "beaufitul" means "the code is clever"? If so, gcc, ffmpeg and ODE are "beautiful", and Google's Ninja is "tasteless". Does "beautiful" means "the code is modular" (I mean "open-closed" here)?…

> Does "beautiful" means "the software can be twisted in lots of interesting ways"? If so, dynamic language interpreters are "beautiful", while static language compilers are "ugly". You'd be surprised what people do to static language compilers. C++'s template are turing complete, after all.

One could argue that's precisely because they stuff a dynamic language interpreter inside a static language compiler. :)

Re: Ask HN: What are some examples of beautiful software?

#223

Rust. It's god damn beautiful. It's design is magnificent, so much so that it seems easy to write beautiful rust code myself.

Also, the documentation is one of the best among all languages I have used

Thank you so much!

Re: Ask HN: What are some examples of beautiful software?

#224
The Emacs source code was always impressive to me. Much is lisp, but even the primitives (like buffer) that are written in C use macros to maintain semantic parity with the lisp code, defining macros like EQ and DEFUN. It's kind of fun to read (for me, anyway). https://github.com/emacs-mirror/emacs/blob/master/src/buffer...

Re: Ask HN: What are some examples of beautiful software?

#225
post #220
post #212

Earlier quoted context omitted.

> Does "beautiful" means "the software can be twisted in lots of interesting ways"? If so, dynamic language interpreters are "beautiful", while static language compilers are "ugly". You'd be surprised what people do to static language compilers. C++'s template are turing complete, after all.

Templates can achieve "towering soviet concrete brutalist monument to ugliness" levels of ugly.

Best metaphore ever!

Re: Ask HN: What are some examples of beautiful software?

#226

Earlier quoted context omitted.

>C: anything by antirez (redis, etc...) Redis is the epitome of well written understandable C. The first file I opened has 3 gotos but maybe it's pure randomness... ;p

gotos are sometimes used in C for error handling (to release resources), it's a simple way to do cleanup: void foo() { int* foo = malloc(...) if (foo == NULL) goto err_foo; int* bar = malloc(...) if (bar == NULL) goto err_bar; /* code */ err_bar: free(bar); err_foo: free(foo); } That's a use of goto that's often considered non-evil, probably because the alternatives are typically a lot more ugly.

Sorry to be a stickler, but the error handling in your method "frees" a resource even when nothing was allocated to it. Freeing a null pointer is as such an undefined behavior.

Re: Ask HN: What are some examples of beautiful software?

#227
post #27

Beautiful software =/= beautiful code. Beautiful software: Java Virtual Machine (the code? could be entirely un-beautiful ;)

I'm genuinely puzzled. What can be beautiful anywhere in the JVM?!?

It's a really clean abstraction of a computing environment, which is as well defined and predicatable that is possible.

I tend to prefer that to performance cludges, arcane architectural hand waving, and undefined behaviour.

Some people thinks it's useless, since they do no see the benefits, as there are costs.

(There are some obvious UX-flaws, especially on the desktop, where it takes a bit to start up, and clearly failes to define a jxe file-extension for executable jars... Not to mention all the enterprise-level shit that goes on...)

Re: Ask HN: What are some examples of beautiful software?

#228

Anything by Zach Tellman: https://github.com/ztellman/aleph https://github.com/ztellman/automat In terms of his ideas, watch "Always be composing": https://www.youtube.com/watch?v=3oQTSP4FngY And he offers some great thoughts about queues and backpressure in "Everything will flow": https://www.youtube.com/watch?v=1bNOO3xxMc0

> "Always be composing" the ideas were stolen from the Wizards talk http://ocw.mit.edu/courses/electrical-engineering-and-comput...

I wasn't aware of this talk, so I'm not sure how I could have stolen anything from it. Cool link, though, thanks.

Re: Ask HN: What are some examples of beautiful software?

#229
post #190

I'm seeing a lot of meanings to "beautiful" here, please, let's define what we're talking about. Does "beautiful" means "the code is clean"? If so, the Quake source code is "beautiful", while Duke3D Build engine is "ugly". Does "beaufitul" means "the code is clever"? If so, gcc, ffmpeg and ODE are "beautiful", and Google's Ninja is "tasteless". Does "beautiful" means "the code is modular" (I mean "open-closed" here)?…

I completely agree with wingerlang here, and I think the fact that the OP ends with > ... and what makes it beautiful. makes this clear. It's a subjective question deliberately looking to elicit subjective answers, with the point of interest being the individual justifications behind those answers. However, despite my disagreement with your sentiment (calling for a more objective question), you did actually answer th…

Hi, that is exactly what I meant. The reasoning behind it is just as important as what it is your example.

Paul Graham says in Hacker's and Painters that “... If there is such a thing as beauty, we need to be able to recognize it. We need good taste to make good things. Instead of treating beauty as an airy abstraction, to be either blathered about or avoided depending on how one feels about airy abstractions, let's try considering it as a practical question: how do you make good stuff?”

So I'm really looking for patterns here. 'Clean code' seems to be a characteristic of beautiful software. Another one seems to be ' code is clever ' from what I see.

That's all I'm doing here, finding some patterns. So if I would've asked what are some example of beautiful software ( where beautiful means 'clean code') I might've gotten a more focused set of responses, but then I would've missed out on the other dimensions of beautiful.

Re: Ask HN: What are some examples of beautiful software?

#230
post #55

"Beautiful Code: Leading Programmers Explain How They Think" is a book that attempts to to tackle this topic. "The authors think aloud as they work through their project's architecture, the tradeoffs made in its construction, and when it was important to break rules." The book has been sitting in my to-read stack forever. You might want to check it out. http://shop.oreilly.com/product/9780596510046.do

I need to get myself a copy!
Post reply on HN