Putting code examples in BSC thesis
I am writing my bachelor's thesis in software engineering. It is split into two parts: a theoretical part where I analyze existing literature, compare models and draw conclusions; and a part where I present my software solution to a problem using the patterns defined in the theoretical part.
A chapter in the theoretical part is about a process called Domain Driven Design, where it is natural to put code examples as they make it easier to understand the concepts. My code examples are not connected to the software I created.
Should I put code examples not directly connected to my app in the theoretical part of a thesis? Or is it enough if I only define concepts without examples? (in the second part they will be referenced anyways during the analysis of my app)
This post was sourced from https://writers.stackexchange.com/q/34679. It is licensed under CC BY-SA 3.0.
1 answer
Theoretical concepts are always difficult to understand without examples. Plus, the examples can provide evidence of the soundness of the concepts and generally increase the reader's confidence both in their understanding of the concepts and in the soundness of the concepts themselves.
So yes, including examples in you conceptual material is a good idea. If the concept you are explaining is complex or unfamiliar, it is also good to build it up in layers with examples for each layer as you introduce it. An example that is built up piece by piece from simpler parts is usually easier to comprehend than one that is presented as a single entity with all of its complexity. It is very easy to overestimate the clarity of concepts we are familiar with, so breaking it down into pieces and explaining and illustrating each piece is a good thing, even if it seems unnecessarily slow to you.
Finally, consider whether it might be better to show your examples in pseudocode rather than actual code. Not only does this avoid issues with some readers not being familiar with the language of the code, but pseudocode can be written to highlight the concept you are explaining while avoiding bits of technical complexity not relevant to the point at hand.
0 comment threads