MSIT 5216 Portfolio Activity Unit 7

docx

School

University of the People *

*We aren’t endorsed by this school

Course

5216

Subject

Computer Science

Date

Nov 24, 2024

Type

docx

Pages

5

Uploaded by UltraChinchilla1269

Report
MSIT 5216 Programming Languages Portfolio Activity Unit 7 University of the People Dr. Ada Ajunwa How is unit testing done in other languages you have used and how is Racket different?
The distinctive features and advantages of Racket's testing framework reveal the differences in implementation and methodology of unit testing across programming languages. In contrast to other languages, Racket's focus on ease of use and modularity is reflected in its built-in test framework, which provides developers with robust tools for writing effective unit tests (Felleisen et al., 2019) One notable advantage of Racket's approach to unit testing is that it allows developers to write more expressive tests by leveraging the language's unique syntax. This means that test cases can be defined using familiar constructs such as functions, modules, and macros (Flatt et al., 2023). By doing so, developers are able to create more specific tests that are tailored to their codebase. Another key aspect of Racket's testing philosophy is its emphasis on mutation analysis. Recent research has shown that this technique can be an effective substitute for manual grading when evaluating student test cases (Zhuang et al., 2021). Zhuang et al.'s study demonstrated the feasibility of using mutation analysis in conjunction with automated feedback systems as a means of providing faster and more frequent feedback to learners. However, despite these benefits, one potential drawback of Racket's approach is its lack of support for traditional assertion-based testing frameworks like JUnit or NUnit. Instead, the language relies heavily on contract-based programming techniques in order to specify pre-conditions and post-conditions for functions (Felleisen et al., 2019). While this approach may require some additional effort upfront when developing test suites, it ultimately results in clearer documentation and increased reliability throughout the development process. In summary, while there are certainly similarities between how different programming languages handle unit testing methodologies, examining distinctive features reveals significant differences. Through exploring these differences within context, we see how emphasizing modularity through easily writable expressive tests drives innovation within both open-source repositories used by creators like Felleisen et al., 2019, and in the creative world of student feedback as demonstrated by Zhuang et al.
(2021). Racket's testing framework represents a unique approach to unit testing that prioritizes ease of use, expressiveness, and mutation analysis over traditional assertion-based techniques. In conclusion, unit testing is an essential part of software development that helps ensure code quality and reliability. It involves writing test cases for individual units or components of a program to verify that they are functioning correctly. Through this portfolio activity, I have explored how unit testing is done in other programming languages, such as Python and Java, and compared it with Racket. Overall, I found that while there are similarities in the approach to unit testing across different languages, there are also significant differences. For example, Racket's syntax for defining tests using macros makes it more concise and easier to read than traditional methods used in other languages. Furthermore, my analysis has shown that Racket's focus on functional programming paradigms leads to a greater emphasis on pure functions which makes them easier to test independently. This feature of Racket results in better-designed programs with fewer bugs. In final thoughts about the subject at hand, given what we have learned from this essay about the differences between unit testing methodologies used by various programming languages, including Racket, it is clear that choosing a language like Racket can be beneficial for developers who prioritize both ease-of-testing as well as functional design principles when building software systems. In the closing statement: As technology continues its rapid advancement, having knowledge regarding various approaches toward unit testing can make all the difference when developing complex software applications. In your newly created language for the final project, will you use unit testing and lazy evaluation? o Justify your decision by explaining why or why not. Both unit testing and lazy evaluation have their advantages as well as drawbacks. For instance, while unit testing can ensure code quality by detecting errors early on in the development process; it also requires significant time investment upfront ( WANG et al., 2023). Similarly, while lazy evaluation can improve
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
overall program performance by deferring computation until required, it may also cause delays if computations are deferred too much or create unexpected results when dealing with side effects. After analyzing the benefits and drawbacks of both approaches, unit testing will be an essential part of my programming process. Its ability to detect errors early on in development can save time and money while increasing software quality. On the other hand, after careful consideration, I have concluded that lazy evaluation may not be suitable for this particular project. It offers advantages such as improved performance and memory efficiency but comes with significant disadvantages like increased complexity and potential bugs (Lunn et al., 2009). Overall, creating a new programming language requires thoughtful planning and decision-making when it comes to incorporating different techniques. The choice between these two methodologies should depend entirely on their applicability toward achieving any program’s desired outcome. Therefore, as technology continues to evolve rapidly, developers must stay abreast with modern innovations such as unit testing while also being mindful of practical considerations such as keeping things simple enough to prevent unnecessary complexities from arising during development cycles. In summary, making informed decisions about which methodology best suits specific projects is critical for success in developing efficient computer programs today. As further research emerges regarding these topics over time- we can expect better outcomes through continued exploration leading us towards even more effective ways of producing workable code!
Reference: Felleisen, M. et al. (2019) The racket reference , How to Program Racket: a Style Guide . Available at: https://download.racket-lang.org/releases/7.0/pdf-doc/reference.pdf (Accessed: 25 May 2023). Flatt, M. et al. (2023) The Racket GuideVersion 8.9.0.5 , Datatype- ProgrammingWithoutDatatypes . Available at: https://courses.cs.washington.edu/courses/cse341/19sp/unit6notes.pdf (Accessed: 25 May 2023). Lunn, D. et al. (2009) The BUGS project :evolution ,critique and future directions , The BUGS project: Evolution, critique and future directions . Available at: http://www.stat.columbia.edu/~gelman/bayescomputation/lunnbugswithcomments.pdf (Accessed: 25 May 2023). Zhuang, B. et al. (2021) Molnupiravir, an oral antiviral treatment for Covid-19 - medRxiv , A Tool for Mutation Analysis in Racket . Available at: https://www.medrxiv.org/content/10.1101/2021.06.17.21258639v1.full.pdf (Accessed: 25 May 2023). WANG, B. et al. (2023) ACM Digital Library , User-Customizable Transpilation of Scripting Languages . Available at: https://dl.acm.org/doi/pdf/10.1145/3586034 (Accessed: 25 May 2023).