Scientific Writing
This page aims at helping you to write your thesis/lab-report
Structure your text
A well-organized text structure aids readers in easily following your arguments and the progression of your text. Simultaneously, it provides a framework for systematically organizing your content during the writing process.
In computer science, the structure of scientific texts typically mirrors the research workflow. Initially, you identify a problem to solve, gather background information, and review existing work. You then develop innovative ideas, implement them, and assess the outcomes. Each phase involves various sub-steps, like formulating hypotheses, weighing pros and cons, or tackling individual tasks.
Similarly, the text structure is hierarchical. The main theme is divided into several chapters, further broken down into sections, sub-sections, and paragraphs and sentences. Each level of this hierarchy serves a specific purpose, which will be explained in the upcoming sections.
Chapters
Chapters form the broadest sections of your text. Consequently, the selection and organization of chapters depend on your specific content; there isn't a universal template that suits every scenario.
Here are some typical structures adopted by many theses, reports, and papers:
- Structure 1 for studies,
- Structure 2 for software projects, and
- Structure 3 for literature research.
These frameworks serve as starting points to tailor your document's structure according to your work's nature and requirements.
The titles of these chapters are not cut in stone. You may modify them as needed.
Be aware that some terms may serve similar purposes or overlap:
- Related Work and Literature Review
- Methodology, Methods, and Approach
In certain instances, alternative terms may be more suitable; for example, for studies, "Study Design" might be preferred over "Methodology."
Additionally, you have the option to combine or separate sections; for instance, a brief "Background" section could be included within your "Introduction," or "Future Work" could be incorporated into your "Conclusion."
Structure 1 |
Structure 2 |
Structure 3 |
Abstract | Abstract | Abstract |
Introduction | Introduction | Introduction |
Related Work | Background | Literature Review |
Methodology | Approach | Data Collection |
Results | Implementation | Analysis |
Discussion | Analysis | Conclusion |
Conclusion | Evaluation | Bibliography |
Future Work | Related Work | Appendix |
Bibliography | Conclusion | |
Appendix | Future Work | |
Bibliography | ||
Appendix |
Abstract
The Abstract provides a concise and precise summary of your text, typically 200 to 250 words. It should:
- offer a brief motivation,
- set the context,
- describe your achievements and methodologies and
- highlight key results,
without delving into extensive details.
It's advisable to write the abstract later once you have a clear overview of the entire document's content.
Introduction
The Introduction serves as the opening segment of your thesis, aiming to engage and motivate the reader. Here, you:
- present your hypothesis or define the problem and
- outline your contributions in this work.
The Introduction usually spans one to two pages, providing a deeper context than the abstract but maintaining brevity. Like the abstract, it may be best to compose the introduction at a later point in time.
Related Work/Literature Review
In this section, you'll position your research within the broader field by reviewing relevant literature. This includes studies on foundational theories, similar research, or alternative methodologies. It's essential to:
- provide clear and concise descriptions,
- identify any parallels with existing work, and
- emphasize your distinctions and improvements.
Related work can be sourced from a variety of materials, including academic papers, books, theses, online resources, or even oral presentations and discussions. Reviewing these resources early in your project sets a solid foundation. The placement of this chapter varies: place it early if explaining foundational concepts and prior research, or later to contrast and compare your findings with existing solutions.
Background
Including a background chapter helps ensure all readers have the necessary understanding to grasp your work, regardless of their specialty within computer science. While you can assume a general level of knowledge, remember that not all computer scientists will be familiar with specific subfields or concepts. For instance, they might understand what a binary search tree is and how to read code, but not the nuances of symmetric vs. asymmetric encryption or the differences between black-box and white-box testing.
Main Part
The main part details all the work you've conducted independently. This extensive section unfolds across several chapters and constitutes the bulk of your document. In this segment, you should:
- explain all your methodologies, approaches, and designs,
- justify your choices and detail their application,
- present the evaluations, and
- discuss the outcomes and implications of your findings.
Conclusion
The conclusion wraps up your research, summarizing your work and presenting your findings, unanswered questions, potential edge cases, and limitations. It may also contain a section on Future Work, suggesting paths for forthcoming research and enhancements.
Use this section to prepare a comprehensive handover: imagine providing a successor with all they need to advance your work, offering a clear and comprehensive guide for potential future directions.
Bibliography
The bibliography section enumerates all the references you've cited in your work. For more details on how to manage citations effectively, refer to the section on Use citations and Citations in LaTeX.
Appendix
The appendix serves as a repository for supplementary material that supports your main text, such as study questionnaires or additional datasets. If you include this information on a CD/DVD, ensure you catalog the contents provided—be it source code, digital copies of referenced materials, outcomes of studies, or benchmark results.
Work and write hierarchically
Each chapter in your text will address multiple topics. However, presenting all these topics within a single block would be overwhelming for the reader. Therefore, it is crucial that you divide your content into increasingly smaller units of text. The structural elements provided by LaTeX are:
- chapters,
- sections,
- sub-sections,
- sub-sub-sections,
- paragraphs, and
- sub-paragraphs.
For instance, your "Study Design" chapter may cover all essential elements like study type, metrics, and participants. Each topic should occupy its section, likely broken down into various sub-sections.
It is important that you maintain structural integrity: avoid skipping levels directly from a section to a sub-sub-section without a corresponding sub-section. Similarly, you don't introduce a sub-section at the very beginning of a section without at least an introductory paragraph in front. More precisely, do not put a sub-section heading directly behind a section heading without any text in-between. However, this rule does not apply to paragraphs wtih headings; they can be placed as needed for clarity and flow.
Ensure that chapters, sections, sub-sections, and paragraphs are meaningful and contain more than a mere heading or single sentence. Each paragraph typically should elaborate on the contained idea or topic, extending beyond just one sentence.
If you plan, for example, to include a sub-section within a section, ensure there is more than one sub-section to justify the segmentation. Otherwise, consider integrating the content into the main section body.
In situations where sub-sections or sub-sub-sections are concise or cover minor points, captioned paragraphs could serve as a more appropriate alternative.
Internal Structure
The content within these chapters generally follows a logical progression of five steps:
- Motivate,
- provide an overview,
- state the details,
- summarize, and
- conclude.
This sequence applies not just to the entire text but also to individual components. For instance, in the "Study Design" chapter, you'll start by providing a comprehensive overview and rationale for your study design. You will then delve into specifics such as study type, metrics, participants, and so forth.
Thus, you might begin with an introductory paragraph outlining your motivation, followed by individual sections addressing each criterion. For instance, in the "Participants" section, you could offer insights into your recruitment process, explain your choices for specific participant groups, and detail their characteristics.
It is not mandatory for every component to follow all five steps. For example, in certain sections, summarizing and concluding may not be necessary.
Paragraphs
For paragraphs, adhere to the principle:
Each paragraph should focus on a single topic, problem, or idea.
In your document, you'll frequently start new paragraphs to separate ideas. At times, you might want to underscore a paragraph's significance with a heading, especially when introducing specific terms. You can add paragraph headings inline at the paragraph's start. However, it's not necessary for every paragraph to have a heading; unheaded paragraphs are more common than headed ones.
Cite a lot
Your work will likely relate to or even incorporate the work of others. To ensure fairness and academic integrity, it is important to accurately attribute these sources through references and citations. This not only credits the original authors but also directs your readers to additional information and safeguards you against plagiarism accusations. Therefore, understanding how to reference others, quote directly, and provide access to further information is essential.
We recommend adopting a numeric citation style where each source is referenced by a number enclosed in square brackets. This approach is standard in computer science literature and tends to be less cluttered than citation styles that use author names, publication years, or footnotes. We adopt these rules from IEEE.
Note that you might come across other rules in literature.
Add citation of your sources
Employ citations whenever you discuss, summarize, or contextualize someone else's work. Clearly indicate when you are referring to someone else’s work.
Bring the sources into context
Simply changing a few words, altering sentence structures, or linking phrases together does not suffice for proper citation!
Original1:
It is well known that the security of a networked computer is only as strong as its weakest component.
Incorrect citation (lacks context, is merely a word substitution):
Note that a networked computer is only as secure as its weakest component [2].
Correct citation (references a primary souce, summarizes their findings):
Considering the five properties of security by Whitten et al. [2], our primary focus was on identifying the weakest security components.
Define the scope of your citations
The position of the citation is important, as it defines the citation's scope. You usually cite the source after the respective word or sentence that contains or relates to someone else's work. In case a single source is used throughout a whole paragraph, you can introduce the source in an introductory phrase and make clear that it applies to the whole paragraph, or you can also specify the citation at the very end of the paragraph after the punctuation.
Citation for a sentence (placed before the punctuation):
Case studies are an appropriate method for assessing security concepts [2].
Citation for a specific term or concept (placed before the punctuation):
Various study types are well-suited for evaluating security concepts, such as case studies [2], ...
Citation for a whole paragraph (placed after the punctuation)2:
The DES, 3DES and AES ciphers are specified in the standard, in addition to the null cipher for cleartext. The standard also provides for the use of vendor-specific proprietary algorithms (such as 40 bit RC4 for radios aimed at the export market). [13]
Introductory phrase:
Whitten et al. [2] conducted a case study on the usability of PGP 5.0. They ... (additional details about their study) ...
Note that citations for paragraphs must apply to the entire paragraph. Do not use paragraph-wide citations if there are multiple sources in a paragraph. If citations only apply to a part, you must resort to word- or sentence-specific citations. Consequently, it is not sufficient to simply tack all citations from parts of the paragraph onto the end. The goal of citations is to make the origin of ideas clear, use appropriate ways of citation that make clear which statements can be attributed to which source.
Name the authors sparingly, do not name the titles of your sources
It is common to name the authors only when the primary source originates from them or when their name carries weight in the field. Otherwise, it is sufficient to refer to the source solely by the reference number.
When citing works with multiple authors, it's common to name only the first author followed by "et al.", which is a Latin abrreviation for "and others".
It is very uncommon to name the titles of your sources within your text, except for your reference section, where it is very common.
Find multiple sources
By citing multiple sources, you enhance the credibility and reliability of your statement. It shows that you have done thorough research and that your fact is not based on a single source, which might be biased or incorrect. Instead, if several reputable sources agree on a fact, it is more likely to be accurate. On the other hand, if the sources contradict each other, you should refrain from stating this fact, or instead explicitely state is as controversial.
Different sources may present the same fact in different contexts or with different emphases. Furthermore, facts and interpretations can change over time as new research is conducted. For many information, there are primary sources that have been cited directly or indirectly by others. By consulting multiple sources, especially up-to-date ones, you can ensure that you state the current understanding of the topic.
Remember, it's not just about finding multiple sources but about finding credible, relevant, and up-to-date sources that adequately support your thesis.
You can choose, whether you put multiple reference numbers in one pair of square brackets or in multiple ones, but stick to one method:
Case studies are an appropriate method for assessing security concepts [2] [4] [16].
Case studies are an appropriate method for assessing security concepts [2, 4, 16].
Cite at the first occurence
Every time you take or reference something from another work, you need to cite this work. Do this always the first time you talk about this content. If you later-on mention the same thing again, you can but you don't need to cite again. (Note that you will still need to cite the same work for each thing at least once.) In your related work chapter you might need to repeat.
Example:
Case studies are an appropriate method for assessing security concepts [2] [4] [16]. ... Considering the five properties of security by Whitten et al. [2], our primary focus was on identifying the weakest security components. ... We conduct a case study [2] that ...
Here, the work by Whitten et al. is cited for two things: case studies and the properties of security. Hence, the first two references are required. From now on, you can assume that the reader will know that these informations are adopted from this source. Whereas, the last sentence references the same thing as the first one, therefore it does not give any new information and hence a repeated citation is not necessary here.
Figure sources
If you provide figures created by someone else, you need to reference the original work in the caption.
The same applies, if you do not copy the original figure, but adopt content, snippets, layouts or designs.


References for further reading
Also use references when mentioning others' work that you wish to acknowledge but did not directly cite as a source, such as a repository for a tool you utilized. These references are not mandatory, thus more flexible in formatting. You can decide whether to mention them in-line, enclosed in square brackets as seen earlier, or as a footnote, based on your preference and the flow of your text.
Quotations
Use quotations whenever you want to repeat the exact wording of someone else. This can be, for example, a famous quote, some common saying, a definition or an answer in an interview. In all these cases, you mark the quote with quotation marks and name the authors. In case of a study, use the participants' identifiers.
S1 noted: "Task A was easier than task B," contrary to: "Task B was the easiest" (S4, S6).
For longer quotes, you can optionally use block quotes.
"It is well known that the security of a networked computer is only as strong as its weakest component."
(Whitten et al. [2])
Quality of your sources
Ensure that your most relevant sources are of high quality. Therefore, you should check whether these sources come from reputable authors, have been published at leading conferences or the like, or have had a notable impact on the research field. Indicators of this include:
- the content of the source; does it look legit?; Is the methodology sound?; Does it cite other relevant work?
- the publication venue is peer reviewed,
- the conference has a high rating,
- the work has been frequently referenced, or
- other works by the authors have been frequently cited.
Note that these indicators and not requirements. For example, SOUPS is of high quality but has only a B1 ranking according to Qualis.
In this context, it's important to know that, unfortunately, many conferences exist that will publish anything as long as the authors pay for it.
Whenever possible, you should prefer using scientific sources, e.g., from peer-reviewed conferences or journals. However, not all of your information will come from conferences or journals. You can also use internet sources (including Wikipedia) and other theses, provided you verify their statements. If you use important statements from these sources, you can look for other sources to legitimize these statements. As described above, in this case, you cite multiple sources.
Internet or other non-peer-reviewed sources can directly be used to illustrate current phenomena, e.g. for introductory statements like:
Recently, ransomware attacks have hit hospitals [1], educational institutions [2] and governmental bodies [3] in Germany.
[1] news article, [2] university website, [3] news article
However, for important main points in your report, you should look for more reputable sources.
Bibliography
The bibliography enumerates the details of all your references, such that your readers can easily identify and find the respective source. Depending on the source type, it states the authors, full title, publication year and location, the URL, etc.
1. Example taken from Whitten et al.: Why Johnny Can’t Encrypt: A Usability Evaluation of PGP 5. ↩
2. Example taken from Clark et al.: Why (Special Agent) Johnny (Still) Can’t Encrypt: A Security Analysis of the APCO Project 25 Two-Way Radio System. ↩
Check your language and grammar
You have the liberty to select the variant of English for your writing. If uncertain, opt for American English, as it's prevalently used in scientific contexts.
For non-native English speakers, particularly those from German-speaking backgrounds, navigating (American) English can present typical pitfalls. The following tips, while aimed primarily at native German speakers, may also benefit those from different linguistic backgrounds.
Keep it simple
In contrast to German, which often features lengthy and complex sentences, aim for shorter and simpler sentences in English. If you find yourself linking many main clauses or employing numerous nested clauses, consider breaking them up.
Favor the active voice for a more direct and engaging narrative. Use the first person plural "we" to describe actions taken in your research, even if it feels unusual for solo projects.
The implementation of out tool was done in Java.
We implemented our tool in Java.
Despite the strongest efforts, no solution was found.
Despite our strongest efforts, we could not find a solution.
Be Precise
Your text should be a collection of facts. These facts must be correct and precise. Therefore, it is crucial that your written words convey exactly what you intend to say.
Do not seek synonyms merely for the sake of variety
Often, synonyms do not carry the exact same meaning in specific contexts. Therefore, do not attempt to find synonyms for critical terms. Even for synonyms whose meaning is exactly the same, the variety does not aid the reader but could confuse them. Hence, it is acceptable to repeat the same term consistently.
Assume A
is the superclass of
B
and C
. ... B
overrides the method foo()
of its parent class superclass. ... Because A
is the base class superclass of B
, any instance of B
can be used where an instance of type A
is required.
Similarly, repeating the same sentence structure multiple times can aid in clarity:
A
is the superclass of B
. B
is a subclass of A
and the superclass of B1
. C
is a subclass of A
and the superclass of C1
and C2
.
Be objective and avoid unnecessary rhetorical devices
Rhetorical devices are powerful linguistic tools to articulate your thoughts. However, they should not be overused.
Avoid Fillers
Rhetorical devices are powerful linguistic tools to articulate your thoughts. However, they should not be overused.
Punctuation
The punctuation rules differ between German and English.
Periods and commas of abbreviations
Deciding on where to place periods and commas in abbreviations can be confusing. Below are examples of commonly used abbreviations and how to apply them correctly.
Examples using "e.g." (commas before and after):
Some color combinations, e.g., red and green, are not accessible to color-blind individuals.
Rephrase using "i.e." (commas before and after):
Our best solution contravenes Occam's Razor, i.e., it is not the simplest one.
Referencing multiple authors with "et al." (period only after "al"):
Whitten et al. [2] conducted a case study on PGP 5.0.
Indicating a list continuation with "etc." (only one period):
Chapters, sections, subsections, etc., are vital for structuring your text.
Commas within sentences
In English, you use far less commas than in German. Still, you cannot just omit all of them. Here are a few thumb of rules for the most common scenarios.
Cambridge comma
The Cambidge comma is often used to prevent ambiguity in sentences with conjunctions, such as "and" or "or". You are free to choose whether you want to use it.
The colors of traffic lights are red, yellow, and green. (with)
The colors of traffic lights are red, yellow and green. (without)
Shared subject
If two clauses share the subject, usually no comma is needed.
It is the fastest but not the cheapest solution.
It is the fastest solution, but it is not the cheapest one.
Introductary phrases and interruperts
Set commas behind introductory phrases and around interrupters. You would also make a break when reading them out loud.
Hence, we decided to use our only option.
That and which
The words "that" and "which" have multiple meanings, hence the comma rules for them depend on their usage.
Non-defining clauses are surrounded by commas, defining clauses are not. You can simply distinguish them on whether they could be dropped without breaking the sentence. If the sentence breaks, it is defining, otherwise, it is non-defining but just an additional information. In scientific writing, it is common to begin defining clauses with "that" and non-defining clauses with "which".
Defining clause:
This is the only solution that we could find.
Non-defining clause:
This is our best solution, which is also better than we expected.
Indirect questions:
We are not sure which solution to apply.
Prepositional clause:
We could not decide on which solution to chose.
Conjunction:
We concluded (that) this is our best option.
See also
For more detailed information, have a look at guides such as in this Grammarly blog.
Floating content
You can and should support your text by using figures, tables, and listings. They allow you to provide additional information in a structured way, which is usually more compact than in prose. Further, they float separately from the text so you can easily refer to them from wherever you want.
Nevertheless, you should not just include them and let them be, but involve them in your text! How you do that depends on their purpose:
- If they show an example, mention that and describe their reason/implications.
- If they show some data, either describe all of it or highlight the most important parts.
- If they describe some process, elaborate the steps.
Black color on a white sheet is clearly visible (see Figure 4).
The test results are depicted in Figure 6. Both groups achieved similar results for task B, C, and D, while the first group performed significantly better than the second one in task A.
We have collected a few free tools (see Table 3) that you might find useful. We considered version controls, IDEs, and text editors from different vendors. Just as an example, we also added some random numbers (last column).
Additionally, describe their purpose in their caption above/below. When necessary, also describe their structure, colors, symbols, etc. The captions will be shown in the lists of figures, tables, and listings. If they are too long, provide the optional short version as well.
For layout reasons, you should place figures, tables, and listings preferably at the top of the page. This also prevents single lines of text from hiding in between them. However, the layout algorithms of LaTeX do not always position them at the obvious position. Hence, you should not waste time and fiddle around with them but postpone it to the very end, when you know the complete content of your text.
Use artificial intelligences
Artificial intelligence (AI) tools are powerful aids that can assist you significantly with your text. They are capable of generating and enhancing your texts and visuals to some extent. We recommend that you use them!
However, bear in mind that your text is essentially an examination where you must demonstrate your capability to conduct and present research. As such, directly copying and pasting responses from AI tools into your text is not advisable.
Below, we outline some general guidelines for utilizing AI effectively:
Learn About New Topics
Traditionally, learning about a new topic involved searching the internet and reading articles. Now, asking an AI has become a viable alternative, with some search engines incorporating AI functionalities directly. Moreover, AI can suggest where to find reputable sources for your research.
Despite these conveniences, you need to verify the information and consult primary sources if you plan to include this data in your text.
Fact-Check Everything
Bear in mind that AIs can provide incorrect, outdated, or imprecise information. It is your responsibility to verify the accuracy of the information provided by AI. You will need to use non-AI information sources to check claims made by AI. Make sure to actually look up sources provided by AI, e.g., through Google Scholar, IEEE Explore, the ACM Digital Library, or the conference proceedings of your source. Read the paper to check that it actually contains the information that AI is claiming it does.
Enhance Grammar and Spelling
AI tools can refine your texts by correcting mistakes and suggesting synonyms.
However, be cautious as they might produce text that is too uniform, overly formal, or suggest inappropriate synonyms. Furthermore, many responses add superfluous information. It is important that you review and adjust the suggestions to ensure they match the desired tone and context of your text.
Protect Your and Others' Data
If you conduct a study with sensitive data from participants, do not share it with the AI! Replace the data with random data beforehand.
Generate LaTeX, Design Figures, ...
Large Language Models (LLMs) such as ChatGPT can easily generate LaTeX, TiKZ, and other visual and structured elements for you. For very complex elements, they provide minimal working examples that you can then adjust to your needs.
For example, the following three requests generate a basic TikZ figure:
> I need a tikz diagram for a TLS handshake between Client and Server. > I need the steps: ClientHello, ServerHello, ServerCertificate, ClientKeyExchange, ChangeCipherSpec, ChangeCipherSpec, Application data, Application data. The arrow shall have a space of 0.7cm. > Use the south anchors instead of east and west. Client arrows shall be dark red. Server arrows shall be dark blue.
The result is not laid out correctly, but with some manual adjustments, this results in:
