Category Archives: CS-443

Elevating Code Reviews

A Path to Enhanced Development

Code reviews are an essential practice in software development, pivotal not only for error detection but also for fostering an environment of continuous learning and collaboration. When executed effectively, they can significantly enhance both individual skills and organizational efficiency.

The Foundation of Effective Code Reviews

An effective review scrutinizes how the proposed changes integrate with the existing codebase, focusing on clarity, correctness, and adherence to established coding practices. Reviewers should critically evaluate the necessity and implementation of the changes, suggesting more granular modifications if the changes are too expansive.

The Art of Communication

The tone in which feedback is delivered can dramatically influence team dynamics. Constructive feedback should be presented through open-ended questions and thoughtful suggestions rather than direct criticism. This approach encourages a collaborative atmosphere and reduces the likelihood of defensive responses. It is essential to recognize the efforts of developers and maintain an empathetic and supportive tone throughout the review process.

Decision Making in Reviews

The decision to approve changes, request modifications, or leave comments unresolved should be clearly communicated. Reviews should be flexible, allowing for follow-up changes when necessary, with reviewers making themselves available for quick re-assessments to accommodate urgent updates.

From Written Reviews to Direct Conversations

When extensive feedback from a review indicates potential misunderstandings, switching from written comments to direct conversations can be beneficial. This transition can help clarify issues more effectively and expedite the review process, especially in cases of complex or contentious changes.

Navigating Challenges in Remote Reviews

Remote and asynchronous reviews present unique challenges, particularly when reviewers are in different time zones. To mitigate these challenges, it’s advantageous to schedule discussions during overlapping working hours or to utilize video calls, enhancing clarity and collaboration.

Cultivating a Supportive Review Culture

Organizations should strive to create a culture that values thorough and empathetic code reviews, recognizing them as crucial to the development process. Continuous improvement in review practices should be encouraged, and engineers should feel empowered to both contribute to and learn from each review session.

By prioritizing effective communication, thoughtful feedback, and continuous improvement, organizations can make code reviews a cornerstone of development excellence, leading to higher quality software and more productive teams.

Integrating Newcomers through Code Reviews

For new team members, adapting to a new codebase and review process can be daunting. A supportive review culture is crucial in easing this transition. Experienced reviewers should use the initial code reviews to not only evaluate the technical aspects but also to mentor and guide newcomers. By explaining alternative approaches, pointing to coding guidelines, and maintaining a positive tone, reviewers can help new engineers integrate effectively while maintaining high standards. This practice ensures that new developers feel welcomed and supported as they navigate their initial contributions to the team.

Based on this blog link: https://stackoverflow.blog/2019/09/30/how-to-make-good-code-reviews-better/

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

SOFTWARE TECHNICAL REVIEW.

Software technical review is a systematic examination of software artifacts, such as source code, design documents, requirements specifications, and test plans, by a team of peers or experts. The primary objective is to identify defects, inconsistencies, inefficiencies, and potential improvements early in the development lifecycle. Some types of software technical review include code review. It involves a thorough examination of source code by peers to ensure coding standards are met, to identify buys and to improve code readability. Another type is design review. It focuses on evaluating the software architecture and design documents to ensure they meet the project’s requirements, are scalable, maintainable, and align with best practices and architectural principles. Requirements review. It aims to validate the completeness, correctness, and clarity of the project requirements, ensuring they accurately represent the stakeholders’ needs and are feasible to implement. The last one is test plan review. It examines the test plans and strategies to verify that they cover all the functional and non-functional requirements and provide sufficient test coverage.

Importance of doing software technical reviews include bug detection and prevention. Software technical review helps identify defects, inconsistencies, and potential issues early in the development process, reducing the likelihood of bugs and improving software quality. Knowledge sharing and collaboration is also important. By involving multiple team members in the review process, knowledge sharing, and collaboration are promoted, leading to improved understanding of the codebase, better solutions, and fostering a culture of learning and improvement. Code quality and consistency. Through code reviews, developers can ensure that the codebase adheres to coding standards, best practices, and design principles, resulting in better code quality, readability, and maintainability. Some of the impacts of software reviews on industries include 51% of young adults searched on the internet daily as opposed to weekly or monthly. 52% of young adults researched online reviews, 41% of young adults preferred online reviews to personal suggestions, and on average, readers read ten reviews for a company or software before trusting it. The top reasons for writing an effective software review is to create reviews with quality content. Readers turn on reviewers from the moment that they feel their opinions can no longer be trusted. It creates a negative impact on the industry, especially when it comes to decent products. The reason I chose this article is it goes into depth about software reviews and why they are used in the industry. It helps improve the product features and to also check for bugs.

References.

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

Code Review

Although I wasn’t present for the class in which code reviewing was introduced, it seems like a pretty simple topic to understand. It consists of… well, reviewing code; the only thing is, it can’t be done alone. Code review’s core and effectiveness lies in cooperation with others, where two or more people are required to even attempt code review. Of course, you can literally “code review,” as in, you review your own code but this refers to something more. 

What does it mean to review when it comes to code? Well, everyone is human, for the most part, and humans are prone to mistakes; and in the case of developers, these end up as bugs, errors, and everything in between. Code review allows others to look through one’s code to find these mishaps that the original developers may have missed or overlooked. I am also human and have had many cases in which I get stuck and have to ask a friend to look through my code just for them to point out something so simple and easy to spot yet I managed to miss. 

Code reviews encompass not only the spotting of mistakes but also the improvement of overall code, so as to have a better, more-refined end product before merging and such. This improvement of overall code includes but is not limited to structure, cohesion, cleanliness, and readability. Clean code is something that I hadn’t heard of until somewhat recently, so that aspect of my code from the past and even now can be improved upon heavily and would be greatly appreciated. 

Code reviews are usually chances for the one being reviewed to correct their mistakes and improve their code but there is also an opportunity for the reviewer to learn. The reviewer may encounter new techniques, solutions, and perspectives through this process, ultimately benefiting both reviewer and reviewee. 

One of the major downsides to code review is that the length and content of them depends entirely on the length of the code; and code can get to some very large sizes. The time spent reviewing especially large code could potentially be put into the current project, workflow, or what have you. 

As someone who is not so confident in their coding skill and proficiency, I believe that code reviews are great opportunities to learn and improve, which will in turn improve my confidence in my skill. There is much to be gained with code review and the downsides seem to only apply to much larger projects; so as a student and novice developer, they will be great to implement to my learning.

https://medium.com/@priyanthinisivasubramaniyam/everything-to-know-about-code-review-as-a-beginner-2a360cdd89ca

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

Sprint 2 planning

Throughout our team discussions, we addressed several key points:

Some tasks (OL-1) weren’t completed by another group, who claimed they were done or unnecessary. We need to inform the professor (#26).

We need to ensure that the guestinfofrontend knows which server address it’s using. Adjusting the Gitpod ci.yaml file can help with this.

The backend server is encountering issues and isn’t running properly, especially affecting weight increment functionalities.

Creating a Gitpod initialization task will automate setting up the workspace’s address, streamlining our workflow.

We should utilize environment variables to manage URLs, distinguishing between local and Gitpod environments for better configuration.

Setting a backend base URL will prevent hardcoding and make it easier for the frontend to access.

We need to troubleshoot module not found errors, which may be related to exports or syntax issues.

Enhancing our debugging capabilities with JavaScript tools will improve error detection and resolution.

Conducting experiments and documenting findings will help guide our future actions and decisions.

Thorough documentation is crucial for the benefit of future teams, especially if time is limited.

We must prepare for presentations during exams, focusing on showcasing our team’s progress.

Improving our planning and testing processes will lead to smoother project execution and fewer setbacks.

Providing clear integration examples and deployment instructions will facilitate seamless implementation.

Utilizing collaborative tools will enhance efficiency in task management and communication.

Lastly, we should compile promising solutions into a shortlist for further evaluation and consideration.

From the blog CS@Worcester – THE SOLID by isaacstephencs and used with permission of the author. All other rights reserved by the author.

Chapter 2 of “Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman”.

In Chapter 2 of “Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman,” called “Emptying the Cup,” the focus is on the notion that effective learning requires individuals to recognize and accept their current shortcomings and biases. The chapter emphasizes the significance of maintaining an open mind and welcoming new concepts, even when they contradict what one already knows.

In the opening of the chapter, the idea of an “empty cup” is explained using a story about a martial arts student who seeks guidance from a master. However, the student’s mind is already filled with his own beliefs and assumptions, making it difficult for the master to impart knowledge effectively. The student must metaphorically empty his cup, shedding his preconceived notions, to be receptive to genuine learning.

The key lesson is to embrace humility and openness in career advancement, acknowledging constant room for improvement and discarding outdated habits, assumptions, and biases to facilitate growth.

The chapter offers useful guidance on how to embrace the concept of “emptying the cup” by urging readers to actively pursue experiences that push the boundaries of their current understanding and beliefs. This might entail taking on projects that are unfamiliar, soliciting input from colleagues, or deliberately practicing to enhance skills in weaker areas.

What’s interesting about this chapter is its emphasis on the importance of mindset in the learning process. It underscores that achieving mastery isn’t solely about amassing information and abilities, but also hinges on cultivating a receptive attitude toward learning and development. Embracing the notion of the “empty cup,” readers are motivated to approach their evolution as software craftsmen with curiosity, humility, and an open-minded outlook.

This chapter proves useful as it provides actionable methods for overcoming cognitive biases and constraints that may hinder personal development. By acknowledging the significance of embracing new perspectives, readers can foster a mindset conducive to ongoing progress and expertise. This approach can enhance creativity, innovation, and effectiveness in software development, while also fostering personal fulfillment and satisfaction in one’s professional endeavors. Ultimately, “Emptying the Cup” serves as a beneficial reminder of the essential role humility and open-mindedness play in striving for excellence.

Reflecting on Chapter 2 of “Apprenticeship Patterns,” I recognize the need to critically assess my choice of programming language. Considering factors like ecosystem, learning style alignment, and industry relevance, I understand that my initial assumptions may require reassessment. Embracing this change in perspective prompts a more intentional approach to learning, potentially leading to greater mastery and fulfillment in my profession.

From the blog CS@Worcester – THE SOLID by isaacstephencs and used with permission of the author. All other rights reserved by the author.

A Guide to Unit Testing

Unit testing is an important method that hammers out bugs in our code and verifies its behavior. Every line of code is critical to keep our projects functioning, so we must understand the benefits and best practices for unit testing to maintain our code correctly. As the title suggests, this blog post, “Unit Testing | What it is, How it Works, Types & Top Benefits”, lays out the principles of unit testing, the different types, and the benefits for software development.

 Diane Wong’s blog is a concise guide to unit testing and its benefits. It covers the types, techniques, advantages/disadvantages, and best practices of unit testing, giving an overview for newcomers to coding and those well-versed in it. I chose this resource due to its simplistic coverage of many essentials to unit testing. The blog is organized with a table of contents that leads those seeking information on a particular aspect of unit testing. It was a good start for my understanding of unit testing, and those new to the method would benefit from the blog.

I found the information concise and direct when reflecting on the blog post. This isn’t a blog that will delve into specifics on any technique or method of testing but will give you a general overview, which is what I wanted. We discussed many aspects of unit testing in class, including testing techniques like Black Box, White Box, Gray Box, Mocking, and Stubs, so some information was a refresher. The main benefit I got from this blog is a better understanding of the advantages unit testing brings, best practices, and why we use it. It lowers overall costs, allows for automation, makes debugging more manageable, and increases the team’s efficiency. The best practices were short but something to remember when conducting unit testing, like focusing on one module at a time or using conventional naming practices. The blog recommended unit testing tools besides JUnit, like Jasmine, TestNG, PHPUnit, and Mocha, which I may look into if they have better features than JUnit. Overall, the blog filled in gaps in my knowledge, and it was something I could quickly go back to or recommend to people new to the concept.

 I intend to use that knowledge for future software development projects and teach those who are unaware so we can effectively build and debug our code. Before using unit testing in practice, developers must understand the fundamentals, best practices, and advantages so they can develop good habits from the beginning. 

Link to the blog: https://testsigma.com/blog/unit-testing/

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

Week 13

The next classes will be about Software technical review it would be great to get a step ahead by delving into the concept. We only started with the review section of the code but fully understood it before the class could skip the barriers of never implementing this idea. Whenever doing something new there is always a barrier which can be difficult at first but with practical knowledge, it can be implemented with a greater effect.  

This article first talks about why there is a technical review. There are technical reviews for the company’s higher-ups who may not be fully aware of the coding process and the difficulties that come with it. They have to understand the developer’s importance to the business because they are spending a lot of money with ineffective results. Many times deliveries aren’t are time and come in fault states having several bugs. This is where a technical review comes in handy it’s a deep dive that provides a suitable perspective. Their definition of a technical review is a deep dive assessment of your software that provides findings and recommendations that be later adapted or discussed amongst your team. Common finds inside a technical review include slow or late deliveries which are just not meeting the due date, random or persistent bugs an example would be fixing the same thing over and over again, and sleepless nights because of worrying too much. These aren’t the end be it all every technical review is different and should be focussed on your team’s goals. The main discussion should be of pain points the things that keep you up at night to make the software complete. Process and team review is another key ingredient that makes sure everyone is working on the right task or if there are changes that need to be made plus an idea to every team member’s contribution to the project. The last thing the team should do is an effective summary that can be graded with a brief description. Detailed findings and recommendations that can be read by people not in depth with coding so they can get an idea of what is being done behind the scenes and can tell the team what needs to change.

Reading this article gave me an idea as to why we do technical reviews because when doing mine I was stuck trying to figure out problems in the code. I didn’t want to nitpick and find small issues that would seem redundant because at times it is better to keep it clean and simple. But understanding that this needs to be done to prove to people on the other side of the business that work is being done is a great insight. It makes a lot of sense that other people in a company would want to know what is happening on other sides of the department.

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

Week 13 Blog

This week’s blog post topic covers Pairwise and Combinatorial Testing. I chose this topic because we will soon cover it in class and having some background information prior to any activities involving this method will be useful to relate back to.

Pairwise Testing, also known as All-Pairs Testing, focuses on efficiency by testing every possible pair of input parameters, rather than every single combination. For instance, if you have a form with fields for name, email, and phone number, Pairwise Testing would cover combinations like name and email, name and phone number, and email and phone number. It’s a straightforward way to catch potential bugs without an overwhelming number of test cases. With Combinatorial Testing, it builds on Pairwise Testing by considering combinations of three or more parameters together. Using our form example, Combinatorial Testing would include triples like name, email, and phone number. This comprehensive approach aims to uncover bugs that might only appear with specific combinations of inputs. This testing method aims to optimize efficiency and coverage. Software testing can be time-consuming, especially with numerous parameters and scenarios. Pairwise and Combinatorial Testing streamline the process, allowing you to detect more bugs in less time.

The key benefits to this method is it helps in reducing the number of test cases needed to achieve “good” coverage. Instead of exhaustive testing, you’re strategically covering the most important combinations. Secondly, it helps in identifying interactions between parameters that might lead to unexpected behavior. By testing these combinations, you’re better prepared for real-world usage scenarios.

Of course, there are disadvantages to Pairwise and Combinatorial Testing. One, It can become tedious due to the large number of test cases required to cover all input combinations. Two, It relies on the interaction of pairs of parameters to determine outcomes, but this assumption may not always hold true, potentially missing bugs. And three, additional tests might be necessary to complement pairwise testing, adding extra time and effort to the testing process.

The main challenge when using this method is selecting the correct input parameters. The choice of relevant parameters impacts software behavior. Careful selection ensures thorough test coverage and defect detection. However, accurately determining parameter interactions is equally as difficult, because it could potentially result in the selection of incorrect combinations.

Some of the tools used by teams are PICT, IBM FoCuS, ACTS, Hexawise, Jenny, etc. These tools help automate the test case design process by generating a compact set of parameter value choices as the desired test cases. This is done by applying the all-pairs testing technique, which involves testing all possible combinations of two parameters.

Blog Post: https://testsigma.com/blog/pairwise-testing/

From the blog CS@Worcester – Computer Science Through a Junior by Winston Luu and used with permission of the author. All other rights reserved by the author.

Blog #2: In Defense of Dynamic Testing

While writing about static testing, I spoke about my positive disposition toward dynamic testing due to its ease of access. Over the time spent writing the last blog In Defense of Static Testing, I grew to understand the benefits of testing with that approach. Now I seek to learn why dynamic testing may not be as “easy” as I once understood it to be.

One lesson I learned from the previous reading on static testing was the idea of ‘time and place’. Both testing methods are to be used under certain circumstances, rather than interchangeably. The blog post, Dynamic Testing, written by Swati Twade brings up this very idea. Twade states that due to dynamic testing’s cost, it ought to be used in effective ways. Furthermore, she warns that if dynamic testing is not used enough during the early stages of development, then there will be much more costly issues down the line. Here a certain balance must be found. The development team must use dynamic testing sparingly to reduce costs, yet must use it frequently enough to prevent larger issues from forming during the final stages of production. In these situations, static testing may be appropriate, as between dynamic testing intervals the development team can review the code and documentation to ensure that all aspects of the program are meeting their specifications. Naturally, if the team was only focused on these two aspects, then static testing could help in minimizing the use of dynamic testing however, dynamic testing captures much more than the code. According to Twade’s definition of dynamic testing, it seeks to capture both errors during the program’s runtime and how the execution of the software affects the hardware. These two focuses of testing cannot be captured by static testing, and require resources to use dynamic testing.

Through this reading, I’ve slowly begun to understand why both dynamic and static tests must be used under certain circumstances. Before researching this topic, I thought the two could be used interchangeably, without considering the resources it takes to conduct each test. Furthermore, each test focuses on reviewing specific content. Dynamic testing places high priority how on the program behaves once executed, meanwhile static testing places its priority on both the source code and documentation. Using these tests interchangeably without first understanding the conditions they work most effectively under will yield less than successful findings. Ultimately between these two blog posts, I have reinforced my knowledge of the testing processes, and have learned under what circumstances each thrives in.

-AG

Link to Original Post:

https://www.educba.com/dynamic-testing

From the blog CS@Worcester – Computer Science Progression by ageorge4756 and used with permission of the author. All other rights reserved by the author.

Sharing Strategies for Effective Exploration!

As a student studying computer science and software testing, I found the blog post “Mushroom Picking and Testing” to be a fascinating and insightful exploration of the parallels between the art of mushroom foraging and the practice of software testing. The author, a seasoned mushroom picker from Estonia, skillfully draws connections between the two various activities, highlighting the similarities in the decision-making processes, risk assessment, and the development of observational skills.
The blog post begins by describing the author’s love for mushroom picking, a tradition rooted in their Estonian heritage. Interestingly, the author finds this activity to be a meditative and reflective experience, where one part of the mind focuses on the task at hand while the other have multiple thoughts and ideas. It is within this state that the author discovers the similarities between mushroom picking and software testing.
One of the key parallels drawn is the concept of “choice of location vs. product coverage.” Just as the author visits familiar forests to efficiently collect a good amount of mushrooms, software testers may focus on keep on testing the same areas of a product, limiting their vision and potentially missing new or exciting discoveries. The blog post encourages readers to pinpoint a balance between depth and breadth, considering the mission and objectives when deciding how to grant their time and resources.
Another comparison I found is the importance of making preparations before starting on either attempt. The author discusses the need to gather the necessary tools and equipment, as well as staying informed about environmental factors and recent changes that could impact the success of the task. Similarly, in software testing, it is crucial to have the right tools and knowledge about the product and its recent updates to make informed decisions and effectively approach the testing process.
I would say the most eye opening aspect of the blog post is the discussion around “knowing your oracles.” The author explains the importance of recognizing poisonous mushrooms, a skill passed down through generations. This concept directly translates to software testing, where testers must develop a deep understanding of the product’s characteristics and potential issues, rather than relying on a more questioning or searching.
As a software testing student, I found this blog post to be a refreshing and wise point of view on the craft of testing. The author’s ability to draw parallels between these two seemingly unrelated activities has provided me with a new lens through which to approach my studies and future practice. The emphasis on searching for more, risk-taking, and the development of observational skills are all elements that I will strive to plug into my testing methodology. This blog post has not only expanded my understanding of software testing but has also inspired me to continue the unexpected connections between the physical world and the digital realm.

April 14, 2024
andicuni

https://thepainandgainofedwardbear.wordpress.com/2017/09

From the blog CS@Worcester – A Day in the Life as a CS Blogger by andicuni and used with permission of the author. All other rights reserved by the author.