Shortcut to seniority
Home
Go to main page
Section level: Junior
A journey into the programming realm
Section level: Intermediate
The point of no return
Section level: Senior
Leaping into the unknown
                    Go to main page
A journey into the programming realm
The point of no return
Leaping into the unknown
Documentation refers to the media (text / images / video) that explains a product or service.
Do you search online for troubleshooting? That’s documentation.
Do you like tutorials in video games, or would you prefer to simply be left alone trying to figure out what each button does? That’s also documentation.
Do you like to see a trailer before watching the movie? That’s documentation right there.
Documentation allows the users / developers to help themselves, and not contact the support (or the developer that initially wrote the code).
Do you enjoy constantly receiving mails such as the following: ‘Hey, I would like to use your library but I have no idea how it works, can we schedule a half an hour call to help me use it’ ?
First of all, you need to figure out if you have to write the documentation for the users (non-technical) or for developers.
Could be that you want to separate these two sides in two different documentation spaces.
The documentation should be comprehensive, and provide feature examples, so developers would know how to use the code properly. At least the most common usecases should be detailed.
Other than that, the documentation should be kept up-to-date, which is usually not the case. To fix that, it should be part of the team’s definition of done.
High-level design (HLD) explains the architecture that will be used when creating the software. The architecture diagram provides an overview of the entire system, identifying the components that would be developed and the external interfaces (as means of communication).
The HLD should briefly describe the platforms, systems, products, services and processes that it depends on.
A high-level design document (HLDD / HDD) is the architectural model that should be used for coding. The purpose of such document is to give the reader a general understanding of the system or component.
The document should contain the high level architecture diagram and further information, such as:
A component design document (CDD) is a technical design document that provides detailed information about a specific component within the software. The document should contain information such as:
Doxygen is a tool that can extract information from the code (such as comments) and generate documentation and class diagrams. These generated items can be further pushed into the CDD of that component.
Docbook is a general purpose XML document type which is well suited for books related to computer hardware and software.
Documentation allows stakeholders to have a general view regarding the system, and can reveal problems such as system vulnerabilities. Keeping documentation up to date is great for newcomers, as they would need some design documents as part of the induction training, to be more familiar with the code and the systems.
The high level document should be updated each time an architectural change takes place, while the CDD documents should be updated once every month / every two months.
You will have to read and understand the code written more than 6 months ago.
You may not understand it, and not recognize it even if it was you the one that wrote it.
If the code is open-source, you want people to be able to use it - because it’s so great, so useful.
But people need to understand what the code does.
If they don’t know what the code does, at a glimpse of an eye, they will not waste more time.
If they don’t know how to install it, they will not use it.
If you want people to use your code, document it!
Writing the code is not enough; You have to also make sure it’s the best possible code you could write.
If you put your API and design decisions in a document, you will think about it in a different way, and it could give you ideas about how to improve it.
People who read that documentation can also understand what your intentions were and continue updating your code like you would want.
While documentation is usually not something we signed up for, the documentation should be kept up to date for the current team members, for newcomers, and for knowledge transfer. Other than that, you can always point out at documentation when people ask you how the system works, so you can go back to coding !
                                            
                                                MyProject
                                                ========
                                                MyProject will solve all your problems.
                                                If you want to use it, here's a code snippet:
                                                    #include "MyProject.hpp"
                                                    MyProject proj;
                                                    proj.solveEverything();
                                                Features / Sections
                                                --------
                                                - Solve everything
                                                Installation
                                                ------------
                                                MyProject do not require any installation, since it is a header-only library.
                                                Just include it in your solution and use it.
                                                Contributions
                                                ----------
                                                - Issue Tracker: insert url here 
                                                - Source Code:   insert url here 
                                                Support
                                                -------
                                                If you encounter any issues, please contact the writer at: MyProject@my_mail_address.ro
                                                License
                                                -------
                                                The project is licensed under the BSD license.
                                            
                                        
                                        
                                        The documentation is usually left as ‘nice to have’ in the projects, so in order to assure that it is kept up to date, tasks should be created and properly reviewed. Architectural changes should not be approved without having the HDD update.
You should add what your project does, provide a small example or introduction (equivalent of a ‘hello world’ application), a link to the sources, some instructions to install the project, and most importantly, a list of Frequently Asked Questions (FAQ).
Another important thing would be the project’s license, which allows the developers to know how they can use your source code.
Package diagram is a view displaying the coupled classes and their encapsulation into a group (similar to namespace).
Activity diagram is a view representing the flow from one activity to another, describing an operation within a system.
Reserve is a function that pre-allocates a specific memory size, to accommodate new data.
The act of exploiting a bug in order to get administrator access.
Composition refer to two classes (composite and component) in which one of them (composite) contain an instance of the other one (component), creating a ‘has a’ relationship. The composite object has ownership over the component, meaning that the lifetime of the component object starts and ends at the same time as the composite class. In simple terms: A class contains an instance of another class.