Most active commenters

    ←back to thread

    521 points OlympicMarmoto | 14 comments | | HN request time: 1.012s | source | bottom
    Show context
    jnwatson ◴[] No.45067216[source]
    I've written a lot of low level software, BSPs, and most of an OS, and the main reason to not write your own OS these days is silicon vendors. Back in the day, they would provide you a spec detailed enough that you could feasibly write your own drivers.

    These days, you get a medium-level description and a Linux driver of questionable quality. Part of this is just laziness, but mostly this is a function of complexity. Modern hardware is just so complicated it would take a long time to completely document, and even longer to write a driver for.

    replies(13): >>45067491 #>>45069282 #>>45069287 #>>45069349 #>>45069690 #>>45070345 #>>45071036 #>>45071086 #>>45072259 #>>45072391 #>>45073789 #>>45075476 #>>45081942 #
    1. bbarnett ◴[] No.45069349[source]
    Modern hardware is just so complicated it would take a long time to completely document, and even longer to write a driver for.

    That's what's claimed. That's what people say, yet it's just an excuse. I've heard the same sort of excuse people have, after they write a massive codebase, then say "Oops, sorry, didn't get around to documenting it".

    And no, hardware is not more difficult than software to document.

    If the system is complex, there's more need to document, just as with a huge codebase. On their end, they have new employees to train up, and they have to manage testing. So any excuse that silicon vendors have to deal with such immense complexity? My violin plays for them.

    replies(3): >>45069603 #>>45070341 #>>45073345 #
    2. supermatt ◴[] No.45069603[source]
    > If the system is complex, there's more need to document

    It’s not first party documentation that’s the problem. The problem is that they don’t share that documentation, so in order to get documentation for an “unsupported” OS a 3rd party needs to reverse engineer it.

    3. makeitdouble ◴[] No.45070341[source]
    > "Oops, sorry, didn't get around to documenting it".

    That's obviously the wrong message. They should say "Go ask the engineering VP to get us off any other projects for another cycle while we're writing 'satisfying' documentation".

    Extensive documentation comes at a price few companies are willing to pay (and that's not just a matter of resources. Look at Apple's documentation)

    replies(3): >>45071005 #>>45072212 #>>45072560 #
    4. MathMonkeyMan ◴[] No.45071005[source]
    I write documentation as I'm writing the code. In my opinion, the code is only as good as its documentation -- they're two parts of the same thing. It's mostly comments at the top of files, and sometimes a markdown file in the same directory.

    This way, good documentation is priced into my estimate for the project. I don't have a work item "spend a few days documenting." Nope, if I'm doing a foo then that includes documenting a foo at the same time.

    replies(3): >>45071326 #>>45072618 #>>45073289 #
    5. branko_d ◴[] No.45071326{3}[source]
    In my experience, coding is much faster when doing it this way.

    Yes, you can produce a small amount of code faster if you don’t “waste” your time on documentation, but that becomes counterproductive as soon as you can no longer keep the entire codebase in your head.

    6. throwaway2037 ◴[] No.45072212[source]

        > Look at Apple's documentation
    
    To clarify for me: Is this good or bad?
    replies(1): >>45072300 #
    7. simonw ◴[] No.45072300{3}[source]
    It's bad. Apple's documentation is notoriously weak, despite them being one of the most well-resourced companies in the world.
    replies(1): >>45073279 #
    8. PeterStuer ◴[] No.45072560[source]
    With documentation one of the major hurdles is the maintainance. It is caring for a set of documents, created by people with different specializations, that describe the artefact from specific perspectives, but need to be kept in sync with the active creation and evolution of the artefact itself.

    This is not impossible, but the effort and costs required are substantial and often lose out on a priority basis to just fixing or improving the product itself.

    9. PeterStuer ◴[] No.45072618{3}[source]
    Documenting what is there usually is not the hard part (and AI is getting pretty good at that part btw).

    Documenting how to use or interact with it in a specific context, which often includes perspectives on interactions with other components, or e.g. protocols not explicit in the code, deciding where to draw the lines of what can assumed trivial common knowledge and what should be specified or explicitly not specified without notices not to rely on these etc. , that is a different thing.

    If it wasn't, then truly as they used to say, the source code would be it's own best documentation (I am a big fan of programming for readability, but even the best readable code, while it will be correct and up to date, will never be enough nor the best for all)

    10. saagarjha ◴[] No.45073279{4}[source]
    Don't worry they're writing documentation now for AI agents
    replies(1): >>45073867 #
    11. makeitdouble ◴[] No.45073289{3}[source]
    > the code is only as good as its documentation

    This heavily depends on your niche I think. If you're writing closed source vendor software and your client's only guiding light is your documentation, it's 100% true.

    If you're working on a 5 people project that evolves at a fast pace, and everyone touching the code is expected to be familiar with the domain and operations, you'll mostly leave comments (todos, meta info, external ticket links etc), not documentation per se.

    replies(1): >>45076157 #
    12. WalterBright ◴[] No.45073345[source]
    I find myself largely unable to document code as I write it. It all seems obvious at the time. It's when I go back to it later, and I re-figure it out, that the documentation then can be written.
    13. A4ET8a8uTh0_v2 ◴[] No.45073867{5}[source]
    Honestly, this is by far the most amusing side effect of AI thus far -- management demanding better documentation to help AI digest it.
    14. MathMonkeyMan ◴[] No.45076157{4}[source]
    Everywhere I've worked, there is software written by those five people, who are now all rich and don't write code anymore, and I still would appreciate the courtesy of an explainer.

    The trouble with good docs is that they are work to maintain, like good code. If we decide to change this component in a substantial way soon, which we likely will, I'd have to practically rewrite the docs! Why bother?

    Because the docs are part of the code. Write the docs.

    I don't expect to win this crusade, but I'll keep writing docs anyway. Then later people will modify the code without modifying the docs, and so the docs will be a lie, but still useful, I think.

    It's like asking three people who are not closely familiar with a component, but who have worked with it, "what is this thing, how does it work?" You will get three different answers. It would be nice if one of them were a written description straight from the horse's mouth, even if the component is now more of a camel.