Author Archives: Guilherme Salazar Almeida Nazareth

Black Box Testing

URL: https://www.testscenario.com/black-box-testing/

Black box testing is a great tool for improving functionality, identifying issues within the user interface, and, in many cases, it does not require any programming knowledge. It also plays a key role in validating system acceptance, pre-launch stability, security, and third-party integrations. These aspects make black box testing a highly valuable method not only for developers but also for testers and stakeholders.

It offers great advantages when it comes to presenting results to the customer in order to gain approval. Because it follows a more user-oriented approach, black box testing produces results that are of interest to clients and stakeholders. This approach is referred to as Functional Testing. Additionally, black box testing can be used to assess user-friendliness, usability, and reliability—all of which help ensure that the software runs smoothly and provides meaningful feedback. This type of testing is known as Non-Functional Testing.

Regression Testing, another form of black box testing, ensures that new features or updates do not break any existing functionalities. This is especially important when a software release includes significant or breaking changes. User Acceptance Testing (UAT) typically takes place in the final phase of the testing cycle, where end users verify whether the software meets the necessary business requirements before its official release. Lastly, Security Testing serves as a method of vulnerability assessment, aiming to expose a system’s weaknesses and protect it against potential cyber threats.

The main reason I chose this article is because black box testing, to me, always seemed a little meaningless. Why would anyone test something without reading the code? But after reading the article, I realized that developers actually perform this kind of testing quite often—especially in web development. We constantly test various inputs without necessarily diving into the source code. The article also helped me understand that black box testing is an excellent tool for non-developers, allowing them to effectively test and better understand the product without having to read hundreds of lines of code.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Sprint 2 Blog Post

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/64
                  Create a local instance of the database in order to have it perpetuate along runs of the backend during development.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/63

                  Create validation in order to avoid negative quantity in inventory.

I also worked directly with one peer to help him resolve some merge conflicts with him Nodemon Implementation issue.

During Sprint 2, I went through some difficulty in getting work done in the correct way. What I mean by this is that I would produce some output to the system without first thinking about how that would affect certain areas, like not considering the physical limits of the system. This led to one of my merge requests this Sprint. The merge request to avoid negative values in the inventory was purely created because I was developing without thinking first. This led me to develop a sense of thinking first and developing second. This helped a lot more during Sprint 2, as I would have a complete and definite idea of what to code even before I sat down and typed it.

What I think did not work so well for me this past Sprint, and I believe was the reason why I produced much less than the first one, was the lack of a due date to deliver something. I have realized during this past month that, in order for me to produce anything myself, I need a due date. If I do not have any due date set to deliver something, I will most likely procrastinate. This is not related to the amount of work I had to do or the length of the Sprint at all. This is something personal, where I should have set due dates for myself in order to produce more and better. This correlates to something I spoke about in my Sprint Blog Post for Sprint 1—the enthusiasm and anxiety of delivering work. This is something that I need to get balanced out, with the use of due dates and time management.

As a team, we entered a really nice spot where we all became close, so working with each other is not an issue at all. During some classes, I would even be worried myself, because sometimes we would be the only group to laugh or have some kind of friendly conversation. Which is great, but we need to be careful that it doesn’t undermine our work. This is also something that I believe could be what is not working so well. Even though this does not happen all the time, some days the chit-chat has slowed us down.

The pattern I chose is called Retreat into Competence. It shows us that sometimes, when we find ourselves with no idea where to go, or find ourselves behind everybody else, or simply lost, we should take a step back, go back to what we know and are comfortable with, and finally launch ourselves forward just like a catapult. Sometimes, in order to take three steps forward, you need to take one back.

Retreat into Competence became a sequence to what I wrote about in the first Sprint. I dove deep, so deep that sometimes I found myself somewhere where I had no idea where to go or how to proceed. I would feel behind compared to my peers. And even without knowing this pattern, it correlates to something I learned from my first programming professor: sometimes all you have to do is retreat, leave the code aside, or go do something else related to it. And honestly, as magical as it may sound, the solution will just come to you. Brainstorming can sometimes happen in a quiet place. If I had read this pattern before, I would have applied it more often. Sometimes, even though I was familiar with such practice, I would still find myself lost.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Mocha, Chai, and Why

URL: TestoMat Mocha and Chai Web Application Testing
The chosen article walks us through the implementation and inner workings of two JavaScript testing tools. Mocha and Chai are two different testing tools that, when combined, form a powerful addition to any software development project. Mocha serves as a test runner, being responsible for executing the test suites. While Mocha can function independently and does not necessarily require any additional tools, combining it with Chai, an assertion library, allows for the validation of expected outcomes in test cases.

The blog post also provides us with several reasons why the utilization of both tools can help improve your software development speed and quality. Among the listed benefits are:

Mocha:

  • Flexible and customizable testing.
  • Simplifies the testing of asynchronous code.
  • The ability to apply before, beforeEach, after, and afterEach.
  • Runs tests in both browser and Node.js environments.

Chai:

  • Provides clear and expressive assertions that improve the readability of your test scripts.
  • Allows you to write descriptive tests using natural language constructions.
  • Enables the creation of custom assertions tailored to your specific testing requirements.
  • Supports assertions on complex data structures such as arrays, objects, etc.

At the end of the article, it presents an opportunity to implement Mocha with some real-world examples, which is great and especially helpful for anyone unfamiliar with the framework.

The reason I chose this article relates mainly to another class. I will be taking on the task of developing test suites for the Thea’s Pantry app. I also found it interesting because it explains why you would use both Mocha and Chai instead of using other tools or Mocha alone.

The content is helpful and does not seem to include any bias by presenting Mocha and Chai as the only testing environment for JavaScript. Instead, it highlights their pros and invites the reader to determine whether these tools will suit their specific use case. One thing that caught my attention about using Mocha is its ability to generate documentation through testing. This is great, as it will help me better understand how documentation related to testing is created and how useful it can be.

Mocha and Chai’s use of natural, human-like language makes testing much easier. The use of natural or human-like language in programming often makes me skeptical of such tools, libraries, or frameworks. Sometimes, this characteristic is marketed as a way to draw people in, as if it will help them code more effectively. Although Mocha and Chai are distinct tools, their implementation of this characteristic leans more toward improving readability for the programmer rather than for just anyone. What I mean by this is that they avoid technical or overly formal wording in favor of keywords that resemble everyday human language.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Sprint 1 – Reflection

During Sprint 1, I went through many ups and downs regarding time management. At first, I was not able to manage my time correctly in order to be more productive, which held me back slightly, and this happened over the course of a couple of weeks. Although, soon enough, I realized that in order to get some work done, I would have to organize my time better. This is when I began to write or research solutions that either I or some teammate needed. Sometimes, even during free time while waiting for something else, I would try to brainstorm for solutions.

Enthusiasm and anxiety were not the biggest help to me during Sprint 1. I got so excited that even before we had any meetings or anything figured out, I was already working on code. As much as the changes got implemented, this is not the best practice. This proved to be correct another time during the Sprint, where I did not realize that I implemented something without verification. As I mentioned in one of my commits, I implemented a way to store the inventory weight in a single database document instance. In order to remove or add any weight to it, that single instance would be modified. I was so excited and had so much work to put in, along with things that I thought could work, that I even forgot one of the most basic practices of programming. I forgot to make sure to add a way to prevent the inventory weight from becoming negative. Enthusiasm is good — it was not the problem. It is actually something that worked well for me. However, the problem was combining it with anxiety. It led to a mess of willingness to get something working against being proactive regarding limits.

Personally, I should try to improve my willingness to get something done while leaving aside the pressure of showing some work. Sometimes the pressure of having something done by the end of the week comes to mind, causing some faulty code to be written.

As a team, we went through many stages during the Sprint. There were stages where communication was missing from some parts. There were stages where not everyone would speak up their opinion. Thankfully, we are past those and seem to be moving on to a stage where there could be slightly more joking around than we should. I am taking myself out of this equation, although I believe that we are all guilty of this, even if not in the same amount. I believe that this should be the next thing our team should work on — to take meetings a little bit more seriously.

The pattern I chose is called The Deep End. It talks about challenging yourself with the work. Sometimes we may procrastinate the decision to go deep, to dive deep into problems. The only problem is that such behavior will only hold us back and lead to no result. You should not wait until you are ready and fully prepared. Always take your shot, go ahead, do it, and do your best.

This pattern relates to my experience since I decided to take this project as the biggest learning opportunity I have had so far. I decided to dive deep, not to look to the sides and overthink about drowning myself with all that there is to learn. This pattern is the literal reflection of how I decided to tackle this class. If I had read this pattern before, I would have come into Sprint 1 with a different mindset. I would understand that it is not just a learning opportunity, but also a chance for me to learn, break, and build without career-threatening risks.

Contributions done to the Project during Sprint 1

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/54

  • Fixed lint indentation problem on openapi.yaml Added a line so lint ignores the API Version long pattern Changed all 401 responses to 400

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/53

  • Changed inventory document instance creation to a single one. Allowing increment and decrement actions to be performed.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/55

  • Removed 2 difference endpoints for increment and decrement, made a single one for both actions.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/inventorybackend/-/merge_requests/56

  • Changed where the verification if a document to store the weight exists in the database.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/checkinventoryfrontend/-/merge_requests/27

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/checkoutguestfrontend/-/merge_requests/35

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem-weight-based/addinventoryfrontend/-/merge_requests/36

  • Updated devcontainer file with new image.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Test-driven Development

URL: https://semaphoreci.com/blog/test-driven-development
The blog in question was written by Ferdinando Santacroce on Sephamore. The title is Test-Driven Development (TDD): A Time-Tested Recipe for Quality Software. He walks his readers through many topics related to Test-Driven Development. These topics include TDD as a design practice, TDD as a well-established engineering practice, and many others.

Test-Driven Development caught my attention because it implies that the inverse of traditional testing should be done. Instead of writing tests for existing code, you should rather write tests for code that has yet to be written. This is confusing in some ways and also misleading when considering only the phrase “Test-Driven Development.” However, as we all know, every concept means more than just the words it comprises. And TDD (or Test-Driven Development) follows the same rule—it is much more than simply writing tests first.

I would personally call it a way of thinking or a different point of view on how tests and code are written. TDD resembles Agile and Scrum’s approach to software development. It shifts the developer’s focus from simply producing and creating large amounts of code—where everything eventually becomes one big entity—to a much more structured and manageable process. As Agile methodology suggests, it is better to build, review, test, and repeat. This method, combined with Scrum, takes this perspective further. Small chunks of functionality are built in shorter time frames, allowing for continuous review and feedback.

TDD applies the same principle with one key difference: test first—or at least, write your tests first. By writing down what should be tested and what a program should return or produce, you now have a clear goal. This method shifts the traditional way of thinking and provides a clear path to the main objective. This objective is then broken down into many smaller pieces that are easier to understand. Another benefit of TDD is the constant feedback, often called a “pleasing side effect.” Continuously receiving feedback on your code gives you a steady sense of accomplishment.

The outcomes of introducing Test-Driven Development into one’s development process can bring many benefits. However, beneficial outcomes are not guaranteed for every single person who applies this methodology. That said, I would argue that certain developers may benefit more than others. Developers who often feel lost, confused, or disoriented may benefit greatly from Test-Driven Development. This approach provides them with a clear understanding of the code’s structure in a more modular and organized way. By separating the code’s functions into different sections, building blocks, or containers, TDD creates a more structured and efficient development environment.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns

I am honestly not the biggest reader; it is something that I have not tried to develop as a hobby. Although there were a couple of books throughout my life that caught my attention deeply, I never developed reading as a hobby. Chapter One of Apprenticeship Patterns lit a spark of curiosity in me. And I believe the reason this event happened was the following statement:

“A willingness to experiment and be proven wrong. This means we try stuff. We fail. Then we use the lessons from that failure in the next experiment.”

The statement that I mentioned reflects and describes deeply how I feel about software development in general. This section has brought me back to what made me fall in love with coding in the first place.

Most of the time, we see people choosing the path of Computer Science as a way to make money. And there is definitely nothing wrong with it, although for me, it is not about that. I truly feel like an apprentice, with an aspiration to be a journeyman. Learning new skills and techniques each and every day intrigues me. It is, in my opinion, the broadest subject there is. The text has enlightened me towards a greater understanding of how my journey could be. I understand that this journey is not short by any means, but it will be a long one. And honestly, I would go even further—I believe it may never end. We are always learning, improving, becoming better. Better than our colleagues? No, better than ourselves. This should be our goal: to become a better software developer than we were yesterday.

There was only one chapter that changed my opinion on a topic. Chapter 6, Construct Your Curriculum, showed and answered a question that I have had for a long time. Being part of a new generation that has access to basically any information, I have sometimes struggled to grasp the deep reasoning behind why certain things in Software Development were done in such a way.

Books, books, books—these are the key to understanding the deep meanings behind how everything was built.

My reading of the introduction portions of the book became a journey itself. I started my reading with an idea and ended it with a completely different one. Not being the biggest reader and having never developed the habit in my life, I now find myself more willing to read. To understand and be willing to start a new routine of reading more books.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Introductory Post

Hello World!

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Collaboration is key

URL: https://getdx.com/blog/software-collaboration/

During this past semester, I learned more about what collaboration is and why it is so important. Collaboration is something that I personally find essential and key in software development. However, this semester, I learned the hard way how problematic the lack of collaboration from someone can be and how harmful it can be to a team. It doesn’t just divert attention from the focus, but it also disrupts the workflow and creates unnecessary stress. I don’t say this because I am the most collaborative person—believe me, I’m not. At times, I can be a difficult person to collaborate with. But through experience, I learned an important lesson: when team members don’t collaborate effectively, progress is slowed, creativity is hindered, and learning opportunities are missed.

You might ask me, “How would you bring together four or five different people from diverse origins, cultures, and sometimes even languages, and make them work seamlessly as a team?” Well, I don’t expect perfect communication or total synchronization—such perfection is simply unattainable. However, that doesn’t mean that everyone shouldn’t do their best to contribute. Does this mean the solution is cherry-picking people with similar backgrounds, races, and beliefs to simplify communication? The answer is still no. The strength of a team lies not in how similar its members are but in what they can contribute and their shared desire to grow and succeed.

Diversity within a team is also essential for solving complex problems. Individuals with different experiences and perspectives can offer unique insights and approaches that others might never consider. When people bring their varied backgrounds and creativity to the table, the possibilities for innovation and success increase significantly.

Ultimately, what matters most is the effort and willingness of each team member to collaborate and complete the work. Agile methodologies and Scrum are two approaches that I have found particularly effective in fostering a culture of communication and collaboration. Frequent check-ins, meetings, and milestone-based planning make it easier to stay aligned and on track as a team.

One blog post I came across this semester made me reflect on the importance of addressing issues directly. Ignoring problems, whether personal or within a team, doesn’t make them go away; it only exacerbates them. This realization pushed me to focus on self-improvement by being more open to new and different ideas. Even if an idea isn’t the most ideal solution, it can still lead to success.

Finally, open-source software is something I was unfamiliar with before. Now, I’m eager to contribute to such projects, especially those aimed at making a positive impact on the world.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

How unpredictable bad code can be…

URLs:
Article on SOLID: https://www.freecodecamp.org/news/solid-principles-explained-in-plain-english/
Video mentioned: https://www.youtube.com/watch?v=j-6N3bLgYyQ

One video has always caught my attention because it clearly illustrates why SOLID principles are so important. I will reference two sources in this post for better understanding, in case you want to explore the topic further. However, I kindly ask you to watch the video linked at the beginning for my comments to make sense.

I chose an article to complement the video because it offers a more approachable explanation of SOLID principles and, as stated, explains them in plain English. The video features a dad following instructions from his kids to make a peanut butter and jelly sandwich. The issue here is that such a task may have become so automatic for us that we no longer think about every single detail involved.

How is that related to programming and SOLID principles? Well, it’s quite similar. At its core, code consists of lines and lines of instructions written for a machine to execute. To achieve the intended goal, these instructions must be precise and correct; otherwise, we can encounter numerous issues. As the video demonstrates, the lack of precision in the kids’ instructions led to some funny outcomes: first, the dad stacked two slices of bread on top of each other without doing anything else. In another instance, he ended up with a piece of bread with a “bit” of peanut butter on it, a whole bottle of jelly, and another slice of bread on top.

Did I just make a typo by saying a bottle of jelly was between two slices of bread? No, that did happen. This highlights what occurs when you assign certain instructions—or, in programming, functions (Single Responsibility Principle)—more than one purpose or intent. While a peanut butter and jelly sandwich recipe might not fully embody all five SOLID principles, the Single Responsibility Principle (S in SOLID) alone is enough to demonstrate the importance of clear and focused design in coding.

The lack of clarity and precision in the sandwich instructions led to various unwanted results. Although the instructions made sense to the kids, they didn’t work well for anyone else. Similarly, when writing code—whether for homework, work, or even personal projects—these principles should never be overlooked. I believe following such practices is part of a developer’s ethical responsibility.

At the end of the day, even if I’m the one reviewing my code a year later, I might struggle to understand it without proper adherence to these principles. You might wonder, “How is it possible not to understand what you wrote yourself?” Well, that’s exactly what happened to me yesterday while refactoring some old code. I encountered several parts that I couldn’t make sense of, so I had to revise and apply these principles to make them comprehensible.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Takes on how to become an effective team

URL: https://www.youtube.com/watch?v=7zDX8VqvBa0

I came across another interesting podcast episode from Beyond Coding. This time, the episode I watched focused on Effective Product Teams, featuring Anne Kooijman, currently a Product Owner at Coolblue. The conversation between her and the host covered various topics related to team management and ways to build an effective product team.

The reason I chose this resource is that it provides real-world solutions to straightforward questions. The host, Patrick Akil, mentioned that he recently took on an assignment as a Project Manager. He asked many interesting questions, some of which I had myself.

A couple of specific points caught my attention, and I’d like to share them with you. The first was Anne’s perspective on what is required for a team to deliver quality work. She said, “Give them the necessary tools and the theoretical background.” I found this fascinating because you shouldn’t give developers half-baked solutions or dictate how to solve a problem. Doing so might make it harder for them to translate someone else’s idea into code. Instead, provide them with the necessary knowledge and tools to figure out solutions on their own and let them do it.

Another topic Anne discussed was how companies sometimes deviate from the core principles of Scrum and the potential outcomes of those deviations. She pointed out that there’s no issue with straying from what the “constitution” of Scrum dictates if it leads to improvements. This is intriguing because Scrum is meant to provide a framework, not a rulebook. Different teams consist of different people who may respond differently to certain changes. Personally, I imagine that I wouldn’t react well to constantly changing sprint durations.

They also discussed goal-driven teams and how having goals is essential for team effectiveness. This resonates with me, as it aligns with a practice, I adopted this semester. This isn’t meant to criticize how others manage their responsibilities but to connect the podcast’s ideas with my own experience. For the first time this semester, I decided to only consume entertainment during my free hours once all my tasks were completed. It sounds simple and cliché, but it works—just like Scrum. Teams need a singular goal, and the focus should remain on that goal.

This brings us to the final topic: timelines, and how even flexible and inconsistent timelines can be better than having none. This concept challenged something I’ve always believed—that if you’re going to do something, do it right and to the best of your abilities, or don’t do it at all. However, I realized that some flexibility in timelines is necessary to allow for adaptation and growth.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.