Live data from Hacker News

Reading OpenBSD source code daily

blog.tintagel.pl

21–30 of 86 posts

Re: Reading OpenBSD source code daily

#21

How about using a static security source code analyzer and going through all findings? The very good ones, the commercial ones, are free to use for open source projects. That would be real benefit to the project I think.

It's missing the point entirely, their primary goal is to become better developer and to improve their C knowledge, hence the effort being mostly focused on reading and understanding a fair amount of code, including its context. Fixes and improvements are positive side-effects of the original effort, not goals in and of themselves.

If you want to improve your C knowledge there are probably more efficient ways to do it instead of randomly reading OpenBSD sources such as reading more advanced C books or reading source codes of projects which are known for their good code quality (sqlite maybe?).

One of problem of static source code analyzers are false positive. Soon or later you will have to reading code and understand the context. I assume it's better way to improve your C knowledge because you REALLY must understand the code . And besides that the positive effect are more valuable.

Re: Reading OpenBSD source code daily

#22

Earlier quoted context omitted.

It's missing the point entirely, their primary goal is to become better developer and to improve their C knowledge, hence the effort being mostly focused on reading and understanding a fair amount of code, including its context. Fixes and improvements are positive side-effects of the original effort, not goals in and of themselves.

If you want to improve your C knowledge there are probably more efficient ways to do it instead of randomly reading OpenBSD sources such as reading more advanced C books or reading source codes of projects which are known for their good code quality (sqlite maybe?). One of problem of static source code analyzers are false positive. Soon or later you will have to reading code and understand the context. I assume it's…

>... such as ... reading source codes of projects which are known for their good code quality (sqlite maybe?).

OpenBSD is one such project.

Re: Reading OpenBSD source code daily

#23
post #6

Great idea. What other code bases are there that lend themselves to this? Some kind of curated genius.com for source code would be interesting.

The Go standard library is very well written and depending on which parts you read you can learn about lots of things like file operations, HTTP, crypto, etc.

It's easy to read it all on the web, the docs are here: https://golang.org/pkg/ and clicking on a function name shows the source.

Re: Reading OpenBSD source code daily

#26
This is fantastic! I've recently decided to begin reading web browser source code, even though I understand very little of it at the moment.

For now, what's been fun is to load up the same file in both Chromium and Firefox source, and compare the two and how both browsers work.

Chromium source: https://cs.chromium.org/chromium/src/third_party/WebKit/Sour...

Firefox source: https://dxr.mozilla.org/mozilla-central/source/

Re: Reading OpenBSD source code daily

#27

Earlier quoted context omitted.

It's missing the point entirely, their primary goal is to become better developer and to improve their C knowledge, hence the effort being mostly focused on reading and understanding a fair amount of code, including its context. Fixes and improvements are positive side-effects of the original effort, not goals in and of themselves.

If you want to improve your C knowledge there are probably more efficient ways to do it instead of randomly reading OpenBSD sources such as reading more advanced C books or reading source codes of projects which are known for their good code quality (sqlite maybe?). One of problem of static source code analyzers are false positive. Soon or later you will have to reading code and understand the context. I assume it's…

I disagree, reading quality code, which I would argue that the OpenBSD source is, is one of the best ways to improve.

Also, being able to read and understand code is an important skill in itself.

Re: Reading OpenBSD source code daily

#28

Earlier quoted context omitted.

It's missing the point entirely, their primary goal is to become better developer and to improve their C knowledge, hence the effort being mostly focused on reading and understanding a fair amount of code, including its context. Fixes and improvements are positive side-effects of the original effort, not goals in and of themselves.

If you want to improve your C knowledge there are probably more efficient ways to do it instead of randomly reading OpenBSD sources such as reading more advanced C books or reading source codes of projects which are known for their good code quality (sqlite maybe?). One of problem of static source code analyzers are false positive. Soon or later you will have to reading code and understand the context. I assume it's…

> more efficient ways to do it instead of randomly reading OpenBSD sources such as reading source codes of projects which are known for their good code quality

Yes they could be reading the source of projects known for their code quality…

> OpenSSL is not an OpenBSD project and the code quality is markedly different :-)[…] and yes, OpenSSL is a bit of a code quality difference than the OpenBSD norm. [nb: these comments were not praising OpenSSL's code quality]

> OpenBSD has proven great at configuration, code quality, and minimalism.

> OpenBSD's incredible code quality quite obviously doesn't apply to the ports tree (and that's not their fault)

> OpenBSD […] has a slower evolution pace and a more carefully planned development model which leads to better code quality overall. Its well deserved reputation of being an ultra secure operating system is the byproduct of a no compromise attitude valuing simplicity, correctness, and most importantly proactivity. OpenBSD also deletes code, a lot of code.

> After scouring the lists and other resources I've yet to find an official reason for OpenBSD dropping LKM support, but would wager it's due to security or code quality/openness ideals.

> OpenBSD, a project that has a frankly psychotic focus on code quality. […] some examples of great code quality. OpenBSD is undoubtedly one of the pin-up projects of the Open Source world, featuring code that is almost supernaturally clean, consistent and direct.

> SELinux, etc. is not that picky about audits and code quality as OpenBSD is.

> “I think our code quality is higher, just because that’s really a big focus for us,” De Raadt says.

such as OpenBSD.

Re: Reading OpenBSD source code daily

#29
post #6

Great idea. What other code bases are there that lend themselves to this? Some kind of curated genius.com for source code would be interesting.

The D standard library's Algorithms and ranges are nice. Realistically, most production code for things people depend on is quite well done: e.g. LLVM is pretty easy to read.

Opposite of this: STL implementations come to mind.

Re: Reading OpenBSD source code daily

#30
post #6

Great idea. What other code bases are there that lend themselves to this? Some kind of curated genius.com for source code would be interesting.

Doom 3's source code is a pleasure to read, and this overview is very well done.

http://fabiensanglard.net/doom3/index.php

Post reply on HN