Live data from Hacker News

Ask HN: What are some well written/engineered open source software?

news.ycombinator.com

51–60 of 72 posts

Re: Ask HN: What are some well written/engineered open source software?

#54

Asterisk PBX. Well-chosen small set of module types (channel drivers, applications, functions, resources, codecs & formats), allowing to implement literally any behaviour, and converge with any thinkable external technology. Not working in VoIP anymore for quite long time, but the clarity of design of Asterisk has deeply influenced me. Gstreamer. Pipeline is very powerful model for software, the potential of it is tr…

Just in case anyone were to be led to believe this:

Asterisk's code base is a pile of crap.

It's been getting a bit better over the years, but it still is terrible, tons of conceptual blunder, protocol implementations are only losely inspired by the specification, system APIs are used incorrectly, lots of code doesn't bother with dynamic string lengths, but instead simply truncates strings arbitrarily if they don't fit into some fixed-size buffer, ...

The only reason it kindof works is because bugs that happen often enough do end up being fixed at some point, but that's about it. If you know your C and POSIX APIs and you don't believe me, just go and have a look at the code, I promise you'll find a bug in less than an hour.

Re: Ask HN: What are some well written/engineered open source software?

#55

Google's Guava library, at least the parts I've seen, is incredibly well written and organized. A assume most "standard library" type stuff is where you will find the cleanest code.

Digging into the code reviews of Guava is impressive: if you've ever felt a code reviewer was being too strict, that's probably nothing compared to Guava reviews. And it shows in the quality of the library.

Re: Ask HN: What are some well written/engineered open source software?

#56

Asterisk PBX. Well-chosen small set of module types (channel drivers, applications, functions, resources, codecs & formats), allowing to implement literally any behaviour, and converge with any thinkable external technology. Not working in VoIP anymore for quite long time, but the clarity of design of Asterisk has deeply influenced me. Gstreamer. Pipeline is very powerful model for software, the potential of it is tr…

This is surprising to read considering the following article:

https://freeswitch.org/how-does-freeswitch-compare-to-asteri...

FreeSWITCH is an alternative to Asterisk.

Re: Ask HN: What are some well written/engineered open source software?

#57
post #55

Google's Guava library, at least the parts I've seen, is incredibly well written and organized. A assume most "standard library" type stuff is where you will find the cleanest code.

Digging into the code reviews of Guava is impressive: if you've ever felt a code reviewer was being too strict, that's probably nothing compared to Guava reviews. And it shows in the quality of the library.

I implemented a data structure similar to one in guava and I thought my code was pretty good. I looked at guava source out of curiosity and immediately refactored my data structure.

I ended up refactoring it again, and the code is still not as clear as guava.

For instance, I noticed they were using an enum for functions and I was like WTF who does that? Later I decided to make my library serializable so we can save to disk. Well, turns out that's exactly why they used an enum. My solution was to make a utility class to wrap the non-serializable objects but their solution was much clearer and less code

Re: Ask HN: What are some well written/engineered open source software?

#58
post #35

Discourse is a really solid codebase with some nice patterns (their auth/auth checking, for example); probably the best OSS Rails app I know. I routinely answer questions about how the product or API works with 30 seconds of examination of the code.

Thank you! Came here to mention them. Thrilled to see you feel the same way about the readability of that code base.
Post reply on HN