What you linked to is great, but it uses a different approach to explain the subject. That approach presents the correct thing to do, and explains some of it. The benefit of this approach is that it's short and sweet, but the downside is it's easy to miss subtle points. For example, what you linked to never explains why you have to call sys_exit. Someone reading this would know that's the right thing to do, but they may never really understand why that's so.
An alternative approach - which the posted article does - is to try the obvious but wrong thing, then explain why it fails. Fix that problem, and try the next obvious but wrong thing and keep iterating. The problem with this approach it can be a long process, particularly if you just want to know how to do something and are less interested in the why. But the benefit is that by seeing how things fail, and then seeing the fix for them, the reader can gain a deeper understanding of what's going on.
In general terms, one is more of a reference, and the other is more of a lesson. I like the try, fail, fix iteration for explaining things. I've used it many times when teaching. I find that it matches well with what we would actually do on our own, and for that reason, tends to stick with people better than simply saying "this is how to do it."