Category Archives: Week 11

share your knowledge

As my final Apprenticeship Pattern blog post for my capstone course, I found it fitting to write about the “Share What You Learn” pattern. The idea is fairly simple, if you are gaining knowledge on a topic, you should be able to share that knowledge with others effectively to foster mutual growth, which results in everyone building on their ‘craftsmanship,’ which further results in better products from everyone involved.

We don’t work in a vacuum by ourselves, and so communication is incredibly important. We will always be working on teams of software developers, and even in our personal projects, we are working with information that we are informed about from the entirety of the software development ‘community.’ As such, learning to communicate your ideas and share your knowledge is always great for your team.

Different people have different specializations, and in software development, we have our own specializations and interests within this field, and it is beneficial to not only contribute your expertise to the project you are working on with your team, but also share things about that expertise to get everyone on the same board with what you are doing, and perhaps foster growth in them as people and the project as a whole.

The intersting thing is that you can also learn from others’ specializations and expertise when you are sharing your own, and you can also build on your knowledge from ideas and suggestions that others may make when hearing your ideas. It’s a bounce back and forth.

I think everyone has probably experienced this to some extent, even in small circumstances. As the authors mention, simply knowing one small thing more than another person allows you the opportunity to inform that person about your piece of knowledge, and that fosters growth, no matter how small. I know that, for me, I’ve had multiple people ask me about how to do things when they need reminders or help with assignments or issues that they run into at work, and in that situation, it is beneficial to know how to communicate solutions, suggestions and feedback in a way where everyone stands to gain.

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.

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.

“Expose Your Ignorance”: Transforming Vulnerability into Strength

Summary of the Pattern: “Expose Your Ignorance” is a pattern that challenges the common fear of appearing unknowledgeable in professional settings. It encourages individuals to openly acknowledge the areas in which they lack understanding or skill, rather than concealing their ignorance. This approach is presented as a method for accelerating learning and building genuine connections with colleagues who can provide support and knowledge. The pattern emphasizes that admitting ignorance is a step towards expertise, as it directly confronts what one needs to learn.

My Reaction: Encountering “Expose Your Ignorance” was both a relief and a revelation. It addresses a deep-seated fear many of us have: the fear of being judged for what we don’t know. This pattern not only normalizes but celebrates the act of admitting ignorance as a courageous step towards personal and professional growth. It has made me reconsider how I approach learning and collaboration, highlighting the value of vulnerability as a tool for building trust and fostering an environment where knowledge sharing is encouraged.

Insights and Changes in Perspective: This pattern has significantly shifted my perspective on learning and growth within professional contexts. Rather than viewing ignorance as a weakness, I now see it as an opportunity—an invitation to learn and to invite others into my learning journey. This change in mindset has encouraged me to be more proactive in asking questions and seeking out resources, knowing that each act of vulnerability brings me closer to the expertise I aspire to.

Disagreements and Critiques: While the ethos of “Expose Your Ignorance” is powerful, it’s important to acknowledge the varying degrees of safety within different workplace cultures for such vulnerability. In environments where admitting ignorance is not valued or might even be penalized, applying this pattern requires careful navigation. Thus, while I agree with the principle, its application must be adapted to the specific dynamics and culture of one’s workplace.

Conclusion: “Expose Your Ignorance” has profoundly influenced my approach to learning and professional development. It has taught me the strength in vulnerability and the importance of creating a culture that supports growth through openness and curiosity. I think that it is a very strong tool to learn new skills and to master old ones. I have used it many times in the past when feeling overwhelmed about a large task or a new topic. As I continue in my career, I am committed to living this pattern, fostering environments where ignorance is not a stigma but a starting point for collective learning and innovation.

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.

Intro to Software Testing

Software testing != doing homework bt rather, Software testing == checking homework to make sure it’s done right. In this blog we’ll explore the basics: what testing is, how it’s done, and why it’s important. We’ll cover different ways to test, how deep we go into testing, some smart ways to test, and why testing is worth it. Let’s dive in!

What is Software Testing?

Software testing is the process of verifying and validating whether a software or application is bug-free, meets technical requirements, and satisfies user needs. It ensures that the software functions as expected, identifying errors, faults, or missing requirements in contrast to actual specifications. This process aims to enhance efficiency, accuracy, and usability.

Verification and Validation

  1. Verification: Ensures that the software correctly implements specific functions, answering the question, “Are we building the product right?”
  2. Validation: Confirms that the built software aligns with customer requirements, answering the question, “Are we building the right product?”

Different Types of Software Testing

  1. Functional Testing: Validates whether the software functions according to functional requirements.
  2. Non-functional Testing: Assesses non-functional aspects like performance, scalability, and usability.
  3. Maintenance Testing: Involves modifying and updating software to meet evolving customer needs.

Further, testing can be performed manually or through automation, each with its own set of advantages and applications.

Different Types of Software Testing Techniques

  1. Black Box Testing: Conducted without accessing the source code, focusing on software interface.
  2. White Box Testing: Involves knowledge of internal workings and access to source code.
  3. Grey Box Testing: Blends aspects of both black and white box testing, providing testers with partial knowledge of the internal workings. This approach offers a balanced perspective, allowing for effective testing while maintaining a degree of independence from the code’s intricacies.

Additionally, Grey Box Testing combines elements of both approaches.

Different Levels of Software Testing

  1. Unit Testing: Evaluates individual units or components of the software.
  2. Integration Testing: Tests the interaction between integrated units.
  3. System Testing: Assesses the complete, integrated system or software.
  4. Acceptance Testing: Determines system acceptability based on business requirements.

Each level serves a distinct purpose in ensuring software reliability.

Best Practices for Software Testing

  • Continuous Testing: Test each build as it becomes available to reduce risks and improve functionality.
  • User Involvement: Engage users to understand their needs and perspectives during testing.
  • Test Segmentation: Divide tests into smaller parts for efficient analysis and resource utilization.
  • Metrics and Reporting: Track project metrics and share test results for improved collaboration and decision-making.
  • Regression Testing: Continuously validate the application to maintain its integrity.
  • Avoid Programmer Bias: Programmers should refrain from writing tests to maintain objectivity.
  • Service Virtualization: Simulate systems and services to reduce dependencies and start testing sooner.

Benefits of Software Testing

  • Product Quality: Ensures delivery of high-quality software by detecting and fixing errors early.
  • Customer Satisfaction: Identifies and resolves issues before delivery, enhancing user experience.
  • Cost-effectiveness: Saves time and money by detecting and fixing bugs in early stages.
  • Security: Protects software from internal and external security vulnerabilities.

Sources https://www.geeksforgeeks.org/software-testing-basics/

From the blog CS@Worcester – CS: Start to Finish by mrjfatal and used with permission of the author. All other rights reserved by the author.

Testing Gone Mobile

In another of my classes I am beginning to learn android mobile app development. This gave me a lot of interesting thoughts about how testing might look for mobile app development. As the applications are full-stack applications, and require testing of the back and front ends. I had questions like: “What would testing a front end look like? Simply applying it and clicking around?” and “How might we test back-end functions if they are intrinsically tied to the front-end?”. To find out more I looked on stickyminds, where I find most of my articles. I found an article about Testing Usability in Mobile app Development The title struck me as answering the first of my questions, so I chose to delve into it. The article’s title is Testing Usability for Mobile Applications by Mukesh Sharma.

The article provides an in-depth analysis of the pivotal role of usability in mobile applications. Usability has a profound impact on user engagement and app longevity, and this is something I can corroborate, as I have chosen apps with higher usability over similar apps with better quality and functions, but lesser usability. The article highlights specific usability characteristics: app simplicity to facilitate navigation effectively, helpful error handling mechanisms to guide users through troubleshooting and make it less of a hassle, optimizing efficiency to speed up tasks, and prioritizing user satisfaction to keep the app functional and supported by users. The article also delves into the nuanced focus areas for usability testing, including functionality assessments to verify feature completeness, contextual evaluations to tailor experiences to user preferences and test them against other preferences, rigorous device compatibility testing to ensure seamless performance across diverse models of mobile device and OS, examining in detail and scrutinizing data entry methods, and comprehensive examination of multimodality, to avoid user uncomfortability. The article uses an example of the Skype app to explain these potential problems. When moving the phone away from your ear, it would switch the speaker in your phone from the call speaker, to the loud back speaker. This is similar to the function in my Samsung Galaxybuds. When you take them out of your ear, it stops what’s playing or disconnects entirely. These are examples of uncomfortable features that have not been tested fairly. By adhering to the best practices for testing, developers can fix these issues in the testing phase, and assure no issues come from the software.

This applied extensively to several of my classes. I had been wondering how to think about tailoring mobile applications to the user, since learning about their development in one of my classes. This article has given extensive explanations into some poor features, and how to test to avoid these issues in the creation of the app. This will be very useful not only for mobile applications, but for testing full-stack applications as a whole, as the article covers mainly abstract ideas for testing full-stack applications.

Source:
https://www.stickyminds.com/article/testing-usability-mobile-applications

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Test Driven Development

Test driven development is an important method of developing which is based on first writing a test for what you want your program to do, this test will fail as you do not have any code written in orde for the test to pass but you then write the code which is necessary for the test to pass and then you continue repeating this process of writing a test then writing the code for said test to pass. You are encouraged to write the simplest possible code in order to make your test pass before moving on to the next test but you may need to do some refactoring between tests in order to ensure you do not have unused code, confusing methods or variables, etc. Test driven development is very helpful when it comes to testing the specifications of a system as you can write simple unit tests which would pass if a specification was met and when it fails you know that you still must add or change your code in order to make sure the specification was met for the end product. Other types of testing are also important to perform but test driven development can help you steer away from over complicated code and make sure that you do not have recurring duplication present when you regularly refactor between cycles.

I found this article to be particularly helpful when researching test driven development as it clearly breaks down the steps of test driven development in order for the reader to fully understand the process you must go through in order to follow this development method. Along with the thoroughly explained process this article also compares and shows how both acceptance test driven development and developer test driven development work together. As we just started working with test driven development in class I found this article to provide valuable insight into the definition and process of this testing/development model as it is something rather different compared to what we have worked on previously regarding testing as we usually have worked with code that needed tests written and not with tests that needed code to be written. Being new to TDD made it seem very confusing at first as it did not feel right to be writing the tests for code which did not even exist yet but the benefits of TDD are much easier to understand once you put this method into practice.

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

Test-Driven Development

For this week’s blog, I decided to find a blog that discusses test-driven development (TDD). I found a blog called “Test Driven Development is the best thing that has happened to software design” by Arek Torczuk. In this blog, the author walks through how they apply key elements through real examples. Throughout the blog, they explain their reasons for implementing TDD and walk through how to use TDD on code that is impossible to test. They split their explanation of how to test impossible code into small sections that include bits of example code to aid in the explanation. I found the organization of the blog along with the various examples to be particularly helpful in aiding the reader understand the topic and stay engaged.

The author first explains that TDD is implemented in a fail, pass, refactor cycle approach. They shorten the idea by explaining that “our focus remains on the ‘what’, and our knowledge of ‘how’ is postponed.” In this section, the author also provides a visual which I find to be effective in blatantly pointing out the important details of this section. They then go on to explain the differences between when tests are driven by code and when code is driven by tests. When tests are driven by code although the tests written for the code may pass it may not be the right approach as feedback about implementation and design may be lacking. There are 2 questions that one has to ask themselves when they take this approach: “When should I stop adding new tests?” And “Am I sure the implementation is finished?”. The latter approach (when code is driven by tests) forces you to ask yourself “What do I expect from the code?”. When code is driven by tests, you know when to stop. TDD provides fast feedback.

The various examples of code that are impossible to test were interesting to read through. One example I found fascinating was the “Bloated setup” and the “Mocking Hell” scenarios. The first scenario is where an object either has too many dependencies or the Single Responsibility principle has been broken. The author explained that in this case you should you should rethink your design. The latter is where a mock returns a mock that returns a mock.

Overall, I think this was an interesting read. I think reading through the various examples of how to test impossible code will be useful for the future as I will have to think through how to test different kinds of code and when I should rethink certain designs.

From the blog CS@Worcester – Live Laugh Code by Shamarah Ramirez and used with permission of the author. All other rights reserved by the author.

Week 11 Blog

This week’s blog will cover the main purpose of Object Oriented Testing and its usefulness. You most likely have heard the term “Object Oriented Programming”, which refers to a style of programming that utilizes classes, abstract classes, inheritance, polymorphism, concurrency, and more as a way of organizing code. These tools can be useful when dealing with multiple lines of code because it can be broken down into multiple files creating a more organized and readable product. Having a file with thousands of lines of code is a developers nightmare. Object Oriented Testing aims to test these systems and ensure they are behaving as expected. It is possible to have too much inheritance in a program, making it difficult to find where a piece of code is located, slowing down development. Unlike other test methods that primarily test function behavior, Object Oriented Testing analyzes the behavior of the entire class and its interactions with other files.

There are multiple techniques to Object Oriented Testing: Unit Testing, Integration Testing, Inheritance Testing, Polymorphism Testing, and Encapsulation Testing just to name a few. Unit testing refers to testing of individual components of the class before testing the interactions it has with other classes. Initially testing the classes functions will prevent scenarios where you can’t locate the bug in the program because there are too many inherited classes. An example is testing each function and ensuring the behavior. Integration testing refers to testing objects of different classes and ensuring they behave properly with all the components. Inheritance testing aims to test the relationship between parent and child classes. This technique of testing also tests overridden functions are properly implemented and are actually overriding the function. Polymorphism testing aims to verify that objects of different types can be used interchangeably. This type of testing ensures the behavior across all types of objects. Encapsulation testing tests access control and ensures the data being accessed is allowed to be accessed by the user.

The main benefits of running these tests is to detect defects early on rather than later in the development process. For this reason, it’s recommended to run tests throughout development. Object Oriented Testing ensures our project is modular, making it easier to maintain. In addition, it becomes easier to implement new features and classes without impacting existing code. Due to the never-ending demands of modern applications and the ever-evolving tech industry, the scalability of a program is crucial.

Blogs chosen: https://medium.com/@hamzakhan522001/object-oriented-testing-1f9619da40d0
and https://www.h2kinfosys.com/blog/object-oriented-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.

Test Driven Development

When you go to write code, maybe you already know what you want the code to do, knowing what it should give you as outputs and answers, but you might not know how to go about writing the code itself. In test driven development, you start with writing the tests first, and then trying to pass those tests, slowly as you go. It sounds like a strange approach to it but it is not as bad as it sounds.

In this blog post, Arek Torczuk talks about test driven development, and how it is the best thing that can happen to software development. First, they start off by describing test driven development, where they say it is, simply, a failing phase, a passing phase, and then a refactoring phase. In the failing phase, we create a test that will fail. In the passing phase, we create or write code, minimal code, that will pass the test. In the refactoring phase, we clean up the tests. Typically with coding, you would write the code, and then write tests. However, Torczuk presents some problems with this way of code development, like when to stop writing tests, or when you are sure implementation is finished. With test driven development, they say there are benefits, such as when writing tests, it makes you ask yourself, what do you want the code to do. They say that you should know the answers to these tests before the code is written. They then go on to provide situations where code may be impossible to test, and how test driven development can be used to help that, like using mocking. They provide code examples with these too, to further help visualize solutions. They provide some additional sources at the end of the article in the event you would like to learn more about test driven development. 

This is a strange way to write code, and for those used to writing code before everything else, this can be a difficult adjustment. Personally, I found it fairly difficult to start, but afterwards I was able to write the tests, and then write the code to pass those tests, and then keep doing that. The tests do provide a build up of the code, instead of doing everything all at once, which was what Torczuk was trying to get at with his blog post. It allows the tests to provide the framework of the code and lay it out. 

From the blog CS@Worcester – Cao's Thoughts by antcao and used with permission of the author. All other rights reserved by the author.

Testing With Stubs

Recently in my Cs-443 class, Software Quality Assurance and Testing, we have been talking about unit testing using stubs. Honestly, I didn’t understand what stubs were during the classes themselves, but a blog called Why Stubs in Unit Testing Improve Integration Testing helped me understand what a stub is, as well as where and when it is used. In this blog written by Miroslaw Zielinski, he states ” Unit testing is more about isolating the function, method, or procedure, otherwise referred to as a unit. This isolation is done by stubbing out dependencies and forcing specific paths of execution. Stubs take the place of the code in the unit that is dependent on code outside the unit.” Stubs allow the person testing the code to test specific paths of execution within the code, allowing them to view different things such as if different parts of the code work and are reliable. I think that Zielinski gives a great example of why these stubs are used in his article. He states, “Once the stub is added, it will be consistently applied to the tested code. A user working on the “allocation failure” test case will have an easy way to install a special callback function into the stub, which will simulate the desired effect: allocation failure or do nothing since by default the stub returns a null pointer, which is expected for the test case.” This helped me understand why stubs are used, and the rest of the article helped me understand when they are used.

After reading more of the article, Zielinski began to explain why stubs are used. Although his explanation confused me a bit, I believe I got the jist of what he was trying to say. I believe that they are being used when you are trying to test lower-level modules while the upper-level modules have not been developed yet. Therefore you can use a stub, which acts like an upper-level module, in order to see how it will be treated. Zielinski also gives examples of when stubs aren’t good to use and what the limitations are “In instances where there’s not an original definition available for a stubbed function, what happens? How does the stub behave without a callback that defines the alternative behavior? The beauty of C/C++test is that it automatically detects this kind of situation. The stub will reconfigure itself during the test harness build time. It won’t call the original definition when no callback is installed and will return a safe default value.” I’m not really sure what he means by this, but I hope to learn more in the future.

Link: https://www.parasoft.com/blog/using-stubs-in-integration-level-testing/#:~:text=Unit%20testing%20is%20more%20about,on%20code%20outside%20the%20unit.

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.