Category Archives: CS@Worcester

Week 13 – Benchmarking

This week I had a bit of trouble thinking about what to write…until I lucky remembered what went on today. That being the Benchmark Trailer for Final Fantasy XIV: Dawntrail, a benchmarking tool that made sure your pc was up to specifications for the new expansion pack, but also tease some of the new gameplay, locations, animations and classes to come with it!

Which got me thinking…benchmarking is a great tool when it comes to testing not only hardware, but also software too! I think the two go hand in hand, “the two” being software and hardware, when it comes to testing. And then it hit me what I should write about: I should talk about what a benchmark is, and why it is important to testing!

For this, I consulted our favorite search engine, Google, and found this site!

https://testsigma.com/blog/benchmark-testing

So, what is a benchmark exactly? According to this site a benchmark “is a subset of performance testing that refers to a set of metrics or a reference point against which you can quality check your software or applications. The purpose of this testing is to compare the previous, present, and future updates of the application against a set reference.”

Now lets break that down a bit into digestible pieces…basically, every time you create a set of tests or even a set of functions for a program, you wanna make sure its always working, whether that be in general when its compiled, or on different device. Say you want to ship out a program to users on both Windows AND Mac. Youll want to create a benchmark environment where you can test and see how well the program functions on those.

There’s various ways you can do a benchmark, either by checking the programs functionality and tests on a Virtual Machine, testing it on hardware that differs from your own, or even running it on a frien’d computer as opposed to your own.

The reverse is true as well, as seen with the Final Fantasy Benchmark shown above. The test, while it sees if the functionality works on certain machines, it also lets you know if your machine/hardware is also unable to run the software. Sometimes your hardware might be so outdated that certain kinds of software are incompatible or unable to be run due to the older processing systems or runtime of the machine.

I am interested to see if we cover this at all in class, as it definitely seems like something that is a major part of testing when it comes to both hardware and software.

But thats all from me, until next week!

From the blog CS@Worcester – You're Telling Me A Shrimp Wrote This Code?! by tempurashrimple and used with permission of the author. All other rights reserved by the author.

Finding Mentors

This section really emphasizes the importance a mentor can have on someone’s apprenticeship. Guidance from someone who has already experienced the same or similar issues that you are going through is invaluable. On top of that, it establishes what realistic expectations one should have for a mentor. With computer science being such a vast field that is only getting larger, it’s unrealistic to expect one person to know everything about every topic. The last major point the section covers is that the flow of knowledge does not stop at you. An apprentice must be willing and able to pass on knowledge to other apprentices. 

Thinking back to my most impactful teachers and professors, it’s clear to see that their impact comes from their ability to mentor their students.  Having those impactful mentors throughout my education is what inspired me to seek a career in computer science. The best example I can come up with to relate the impact a mentor can have on an apprentice is this: Imagine trying to solve a hidden picture puzzle or “Where’s Waldo” and you can’t seem to figure it out. Having a mentor is like having a magnifying glass to help narrow down where you should be looking. This sense of direction is great to focus your efforts into researching helpful information. Considering how large the computer science field has grown.

When it comes to choosing a mentor in the computer science field, it is important to realize how large the field is. I have said it three times now, and I still don’t think that is enough to emphasize it. It is best to try and find a mentor that specializes in the field you want to learn about. Although, from my experiences, a mentor that does not specialize in the same field as you is still worth having. A mentor that specializes in any field can still give you tips on how they got to where they are. With the same mentality of teaching a person to fish over giving them a fish, learning how to learn is better than being taught something directly. With information so readily at our fingertips, the ability to research and find solutions is crucial in our world and especially the computer science field.

Bringing everything full circle is the idea that what separates an apprentice from a journeyman is the responsibility to help teach and mentor other apprentices. It makes sense that as I continue down the long path that there will be others behind me. I, personally, have always loved the spark that my mentors have ignited in me and it would be great to be able to pass that sling to others in the future.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Recording the Journey

Pattern Summary:
“Record What You Learn” from the book “Apprenticeship Patterns” emphasizes the importance of documenting and organizing your learning experiences as a software craftsman. It encourages apprentices to maintain a journal or log of their progress, insights, challenges, and solutions throughout their journey of learning and mastering software development.

Reaction to the Pattern:
This pattern resonated deeply with me as it highlights a crucial aspect of professional growth: continuous learning and reflection. What I found most interesting and useful about this pattern is its emphasis on active engagement with one’s learning process. By recording what we learn, whether it’s new programming techniques, problem-solving strategies, or insights from failures, we create a valuable resource for future reference and self-improvement. This pattern has significantly influenced my approach to learning and working in the software development field.

Impact on Professional Perspective:
“Record What You Learn” has caused a notable shift in how I perceive my intended profession and my approach to work. Previously, I often relied on memory or scattered notes to capture my learning experiences. However, this pattern has taught me the immense value of structured documentation. I now see my journal as a treasure trove of lessons learned, growth milestones, and areas for improvement. It has become a tool for self-assessment, goal-setting, and tracking progress, ultimately enhancing my effectiveness as a software craftsman.

Disagreements and Critiques:
While I wholeheartedly agree with the importance of recording what we learn, one potential challenge is maintaining consistency and discipline in documenting every learning experience. Balancing work responsibilities, learning endeavors, and documentation efforts can be demanding. However, I’ve found that integrating journaling into my daily or weekly routine has helped mitigate this challenge.

Overall Reflection:
Incorporating the “Record What You Learn” pattern into my professional journey has been transformative. It has instilled in me a sense of accountability and mindfulness in my learning process. I now approach challenges with a more structured mindset, knowing that each solution, mistake, or insight contributes to my growth. This pattern has reinforced the idea that true mastery in software development comes not just from technical skills but also from continuous learning, reflection, and adaptation.

“Record What You Learn” serves as a guiding principle for aspiring software craftsmen, reminding us that our learning journey is as valuable as the destination. By embracing the discipline of documenting our experiences, we pave the way for continuous improvement, innovation, and success in our profession.

From the blog CS@Worcester – Hieu Tran Blog by Trung Hiếu and used with permission of the author. All other rights reserved by the author.

Nurture Your Passion Individual Apprenticeship Pattern

This week, I chose to focus on the Nurture Your Passion individual apprenticeship pattern as I found it applicable to myself as I am looking for post-grad jobs and in one respect must find a job to support myself financially but also look to further myself as a software craftsmen and in my career in general. This pattern underscores the significance of fostering and sustaining enthusiasm for software development. It acknowledges the vastness and perpetual evolution of software engineering, urging developers to actively delve into their interests within the field.

To effectively nurture one’s passion, the pattern recommends the following strategies:

Explore Diverse Areas: Dedicate time to investigating various facets of software development, including web development, mobile app development, artificial intelligence, and game development. Experiment with different technologies, languages, and frameworks to discover personal resonances.

Engage in Personal Projects: Undertake personal projects aligned with individual interests and aspirations. Whether it involves crafting a mobile app, contributing to open-source software, or developing a game, personal projects offer valuable opportunities for skill application, learning, and portfolio enhancement.

Seek Mentorship and Guidance: Surround oneself with mentors, colleagues, and communities sharing similar passions, capable of providing guidance, support, and constructive feedback. Participation in forums, attendance at meetups and conferences, and networking within the software development community fosters idea exchange and shared experiences.

Continuous Learning: Embrace lifelong learning and professional development. Stay abreast of the latest industry trends, tools, and technologies through literature, online courses, workshops, and conferences. Continuously challenge oneself to refine and broaden skill sets.

Balance and Well-being: Strive for equilibrium between passion pursuit and well-being. Guard against burnout by establishing achievable goals, managing time effectively, and prioritizing self-care practices, such as physical activity, relaxation, and quality time with loved ones.

By nurturing a passion for software development, individuals can discover heightened fulfillment, creativity, and satisfaction in their work, ultimately leading to a more gratifying and successful career. I found this apprenticeship pattern to be particularly helpful and relatable as it also complements the Breakable Toys strategy which I covered in a previous post. Even if craftsmen find themselves in a position or situation where they struggle to pursue projects their passionate about, they should devote time to creating a breakable toy to enjoy and continue to learn and grow with.

Sources: Hoover, Dave, and Adewale Oshineye. “Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman.” O’Reilly Media, 2009.

From the blog CS@Worcester – Tech. Worth Talking About by jelbirt and used with permission of the author. All other rights reserved by the author.

Code Reviews for Quality Assurance

As we continue in CS443 – Software Quality Assurance and Testing, we’ve delved into the test strategy/skill of group code reviews for debugging. So, this week I chose to search for a blog about effective code reviews with a focus on good practices to extract the most value from participating in them and found a valuable article posted on Vates.com. This article is from August 2023, so it is modestly recent and applicable to our current learning materials and discusses best practices and habits.

Code review is a pivotal practice in software development, offering more than just bug detection. It serves as a collaborative process where developers meticulously inspect code changes before integration into the main codebase. By doing so, it not only identifies defects but also enhances code quality, ensures alignment with project requirements, and upholds coding standards. The process fosters collaboration among team members, facilitates knowledge sharing, and integrates multiple perspectives, ultimately leading to the creation of reliable, maintainable, and efficient software.

To maximize the benefits of code review, it’s essential to implement effective strategies. This begins with establishing clear objectives tailored to the project’s goals. By defining specific focuses, such as code quality improvements, security enhancements, or performance optimizations, teams can streamline the review process and prioritize areas of concern.

Moreover, involving the right team members is crucial. Senior developers, subject matter experts, and team leads contribute diverse viewpoints, enriching the review process and leading to better outcomes. Adhering to a comprehensive code style guide ensures consistency in coding practices, which is vital for long-term maintainability. Utilizing code review tools further enhances efficiency by automating checks, highlighting changes, and facilitating collaborative discussions.

Promoting a culture of constructive feedback is equally important. Emphasizing that reviews aim to enhance overall code quality rather than criticize individuals encourages open communication and continuous improvement. Balancing review speed with depth ensures timely feedback without compromising quality, fostering agility while maintaining code integrity.

Lastly, following up on review feedback is essential for iterative improvement. Addressing comments promptly, clarifying questions, and implementing necessary changes contribute to a learning culture within the team, leading to continuous enhancement of development practices.

Vates is a leading provider of IT and software services and the host of this blog. They provide tools and resources to enable teams to unlock the full potential of code review, IoT consulting, and software testing services. This collaboration empowers organizations to elevate their software development practices, delivering exceptional value to stakeholders through collaborative development and effective code review implementation.

Source:

https://www.vates.com/the-art-of-code-review-effective-strategies-for-collaborative-development

From the blog CS@Worcester – Tech. Worth Talking About by jelbirt and used with permission of the author. All other rights reserved by the author.

CS-443: Week 13

Levels of Testing

Levels of testing refers to the different stages of testing software during the development cycle. Each level of testing aims to test specific aspects of the functionality of the software. The most common types of testing levels are unit, integration, system, and acceptance testing. Unit tests focuses on individual components, or units, of the system such as functions. Integration testing is used to ensure that these units work together as intended. System tests verify that the entire system meets the requirements specified by the customer. Acceptance testing is similar to system testing in that the whole system is verified. However while system testing tests the entire system, acceptance testing tests the final system.

Unit Testing

Unit testing is conducted at the code level, where each individual component is tested and the results are analyzed. Rather than manually testing each component, automating unit tests is highly recommended to reduce errors in analyzing and for increased efficiency. When making a unit test, an outline stating the expected results of the code should be made.

An example of an outline for a unit test for a calculator app that simply adds to numbers together would look like:

  • Program should accept two numbers
  • Program should return the sum of the two given numbers
  • Program should handle negative values appropriately

Once the outline for the unit tests are made, then the actual code for the unit test should be written. The test will then check the code to verify it is doing what is expected once the test has run.

Integration Testing

Integration testing tests groups of individual components that are integrated into a system. This type of testing helps to identify any issue that may occur from coding errors or errors from the integration between units.

System Testing

System testing is performed on the application as a whole. All components are assessed against specific requirements made by the customer.

Acceptance Testing

Acceptance testing involves testing the final system. This includes the system’s functional and non-functional aspects such as performance, security, usability, and more. In this testing level, end users are given access to the software to ensure the end users’ needs are being met.

Conclusion

This resource was chosen because it clearly described the different testing levels, their purpose, and why each level is important. I enjoyed reading this article because it was written in a way that made understanding easy. In the future, when creating a complex system, I will be sure to follow the different stages of testing at the appropriate time in the development cycle to prevent issues later in development.

Resources:

https://testsigma.com/blog/levels-of-testing

From the blog CS@Worcester – Zack's CS Blog by ztram1 and used with permission of the author. All other rights reserved by the author.

The Impact of Test-Driven Development: Insights from InfoQ

In my quest to deepen my understanding of effective software development methodologies, I delved into the principles of Test-Driven Development (TDD) through the article “Why Test-Driven Development Works” on InfoQ. This article serves as a comprehensive guide to the fundamentals and benefits of TDD, articulated through the lens of seasoned developers.

Why This Article?

I chose this article because of its practical approach and real-world relevance. InfoQ is known for its high-quality content aimed at software professionals, making it a reliable source for learning about cutting-edge practices like TDD. The article provides a mix of expert opinions and case studies, which helps bridge the gap between theory and practice—a crucial aspect for students and new developers.

Insights and Reflections

The article outlines the core process of TDD which involves writing tests prior to code, ensuring that software development is led by requirements that are continuously tested against. This process is detailed through the cycle commonly known as red-green-refactor:

  1. Red: Write a test that fails.
  2. Green: Write code that makes the test pass.
  3. Refactor: Improve the existing code with confidence.

What resonated with me was the emphasis on how TDD enhances code quality and robustness. By focusing on requirements before implementation, TDD helps prevent future defects and reduces the time spent on debugging and maintenance. Furthermore, the article discusses the psychological benefits of TDD—providing developers with immediate feedback and a sense of accomplishment, which can boost morale and productivity.

Reflecting on these aspects, I recognize the value of TDD not just in preventing bugs but in fostering a disciplined approach to software development. It instills a mindset of accountability and precision, which are invaluable traits for any developer.

Application to Future Practices

Adopting the principles discussed in the article, I plan to incorporate TDD into my academic projects and future professional work. Embracing the red-green-refactor cycle will be crucial, especially in collaborative environments where code quality and consistency are paramount. By practicing TDD, I expect to enhance not only the technical quality of my projects but also the collaborative dynamics within development teams.

Conclusion

The InfoQ article “Why Test-Driven Development Works” is an essential resource for anyone looking to implement TDD effectively. It offers a blend of theoretical underpinnings and practical advice, making it particularly useful for students and new developers. The insights gained from this article will undoubtedly influence my approach to software development, guiding me towards more structured, efficient, and reliable coding practices.

From the blog CS@Worcester – Abe's Programming Blog by Abraham Passmore and used with permission of the author. All other rights reserved by the author.

test-driven development

I’ve been working on a homework assignment where I’ve been tasked with undergoing the process of test-driven development while working on a code kata where I am to count the number of times each word in a string appears whilst ignoring special characters, spaces and new lines.

To summarize what test-driven development entails quickly, I consulted a blog post by Denis Peganov. Basically, when you do test-driven development, you write tests before you write the code. In practice, this means you have to figure out what the inputs and outputs should be for the code you’re working on, then organize the order with which you should be fulfilling tests in. Denis also mentions the cycle of test-driven development with the red, green and refactor phases. You start with a failing test in the red phase, write the minimum code to make the test pass in the green phase, then, as the name implies, refactor the program to enhance the program’s design if necessary. Denis goes further to make a great point that the iterative nature of test-driven development lends itself to modularity and can create a flow to the evolution of the codebase where this strategy is being applied.

I have to say, doing this in practice is fairly enjoyable up until the point where you have to rewrite everything. The flaw (while it is based upon the practitioner of this strategy of software development) is that if you ‘mess up’ the order of the tests, you can reach a point at which your design needs to change so drastically that you are effectively working backwards. This doesn’t necessarily mean that the strategy is bad, it’s moreso that it does require practice and experience in order to have a smooth development. It also requires the willpower to refactor massive chunks of code when you reach a critical refactor point, which for me it may just be that I’m rusty with regard to coding.

Regardless of this critique, test-driven development does seem to be the best of both worlds. Not only are you able to properly plan software from specifications, but you also get to actively see the results of your code while developing it. It seems incredibly efficient in comparison to other philosophies of software testing, and for me it’s honestly more engaging to write tests and write the code than just writing tests and reading the code that already exists or the specifications alone.

From the blog CS@Worcester – V's CompSCi Blog by V and used with permission of the author. All other rights reserved by the author.

Define-Use Testing

A little while ago we learned how Define-Use Testing works as well as how to use it ourselves. However at the time, it still confused me a bit and I wasn’t really sure what it was used for. After reviewing the previous work we’ve done and coming back across this topic, I realized that I still didn’t fully understand what was going on. I decided to look further into it and to do some research in order to understand it more. As a result, I found a website called testsigma which I believe does a really good job at explaining what Define-Use case testing is, its advantages and its disadvantages, and when to use it.

With the website’s help, I’m going to explain everything that you need to know about Define-Use case testing in order to understand it and to know when to use it. As for what a use-case itself is, the website states “The concept of a Use Case can be likened to a real-life scenario in which users and their objectives are present. A Use Case outlines the events unfolding when these users interact with the system to achieve their objectives. The Use Case allows for a thorough understanding of the overall behavior and functionality of the system from the user’s point of view.” Essentially this means that a Use Case shows all of the decisions that were made while the user was trying to achieve their outcome, allowing you to understand all of the behavior and functionality from the user’s perspective. Use Case Testing was designed to make sure that the system that is currently being tested meets all of the expectations. It essentially simulates different real-life scenarios in order to make sure the software does everything that it is supposed to. While the website gives a lot of different advantages and disadvantages of Use Case testing, I’m just going to list a few. Some advantages include helping to identify and validate the functional requirements of a system or software, explaining how the software will be used in real-world scenarios, and helping uncover potential defects. Some disadvantages include it could be time-consuming and require a lot of effort, it may not cover all scenarios which could leave to gaps in test coverage, and it relies on the accuracy of the use case documentation. As for when to use Use Case testing, the website gives a checklist which I found to be extremely useful in my understanding of when to use it. I’m really glad I found this website as it further helped my understanding of the topic, and it has helped me prepare for my final exam. The checklist states:

“1. Review the software requirements, specifications, design documentation, and use case scenarios. 

2. Identify the possible scenarios related to the use case. 

3. Determine the functional requirements of the use case. 

4. Create test cases for each possible use case scenario. 

5. Define the expected results of the use case scenarios. 

6. Execute the test cases and compare them with the expected results. 

7. Retest the fixes after identifying failed test cases. 

8. Check for exceptions and errors for each use case scenario. 

9. Verify compliance and security requirements for each use case scenario. 

10. Monitor the system’s overall functionality across use scenarios. 

11. Validate the overall system performance with user expectations”

From the blog CS@Worcester – One pixel at a time by gizmo10203 and used with permission of the author. All other rights reserved by the author.

Test-driven Development

Test-driven development is a software development approach that emphasizes writing tests before writing the actual code. By using this technique, developers ensure that their code is thoroughly tested, reliable and maintainable. Test driven development typically consists of three main steps, writing a failing test, writing the minimum code to pass the test, and then refactoring the code while ensuring that all tests still pass. In more detail of the three cycles, one is writing a failing test. Developers start by writing a test case that defines the desired behavior of the code. Since there’s no code yet, this test will inevitably fail. Write the Minimum Code: After writing the failing test, developers write the minimum amount of code necessary to make the test pass. The goal is to write just enough code to satisfy the requirements of the test. Refactor the Code: Once the test passes, developers refactor the code to improve its design, readability, and performance. Refactoring ensures that the code remains maintainable and scalable over time. Some benefits of using test-driven development are improved code quality. TDD encourages developers to write modular, well-structures code that is easier to understand and maintain. Faster development cycles. By writing tests upfront, developers can catch bugs early in the development cycle, leading to faster iteration cycles.

Another benefit is enhanced code coverage. TDD ensures test coverage, reducing the likelihood of undetected defects in the codebase. Increased confidence. Developers have greater confidence in making changes to their codebase without introducing regressions. The last benefit is better collaboration. TDD promotes better collaboration between developers, testers, and stakeholders by providing a shared understanding of the system’s behavior. Some practices for test-driven development include keeping tests simple. Write simple, focused tests that verify one aspect of the code’s behavior. Refactor Regularly: Refactor your code continuously to keep it clean, concise, and maintainable. Automate Tests: Use automated testing frameworks to run tests frequently and detect regressions early. Write Meaningful Tests: Ensure that your tests are descriptive and provide clear feedback when they fail. The last one is seeking feedback. Get feedback from peers and stakeholders to validate your tests and ensure they accurately reflect the desired behavior. Test-driven development is a powerful software development technique that promotes code quality, reliability, and maintainability. By adopting TDD principles and best practices, developers can write better code, deliver features faster, and build more robust software systems. I chose this source because it goes into detail explaining everything about Test driven development and what it does, why it is important for developers.

References.

https://testdriven.io/test-driven-development

https://www.browserstack.com/guide/what-is-test-driven-development

From the blog CS@Worcester – Site Title by lynnnsubuga and used with permission of the author. All other rights reserved by the author.