Reading List

As the title of this section suggests, it is solely focused on creating a reading list. On the surface, this section has to be the most straightforward in the book, and yet the one I practice/experience the least. With the ever-growing importance of broadening my learning through reading, I wanted to focus on this section as it feels like the obvious place to start.

The idea of creating a reading list seems simple, yet so open-ended that it may also feel impossible. The section focuses on ways you can expand your reading list without feeling so overwhelmed with the endless knowledge that is available. When it comes to learning what books are important and useful enough to add to your list, it makes sense to ask mentors. Other online sources can offer reading lists from other people which may give a good insight of which books should be added to your list. The third way of finding useful sources was to pay attention to which sources are commonly referenced and cited in other readings. Seeing the same book cited multiple times can be a great indicator that it is an important book to add to your list. 

Having a list of which books to read next is a great way to stay organized however, having a reading list will also keep track of what books you have read. One of the points the reading made was that this list is also a reflection of your past reading habits. My list right now would reflect awful reading habits, and I must change that. When I first started to read through the patterns at the start of the semester I saw the entire chapter dedicated to reading and how important it was to broaden my education and craft with the use of reading. Starting a reading list from scratch felt like it was going to be an impossible task, with zero clue where to start or what books would be worth my time. With simple solutions provided by the reading, such as looking for likeminded lists from other people, asking mentors, and paying attention to the cited sources, I now feel way more comfortable with being able to develop my reading list.

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

Unit Testing

The blog written by Krishna Teja Dinavahi, “Unit Testing – Is it Really Helpful?” (https://engineering.zoominfo.com/unit-testing-is-it-really-helpful) does a great job explaining the importance of writing unit testable code. What is also mentioned is how unit testing and integration testing are two different forms of testing that are both equally important. I specifically enjoyed this blog because of the great examples of code that was not unit testable along with the steps taken to refactor the code. 

As it’s mentioned in the blog, looking up unit testing online will give you the textbook definition, “Unit tests help you test individual parts of your application in isolation.” This is the same thing that was described to me in class, but I had the same general reaction to unit testing as Dinavahi describes. Unit testing can sometimes feel tedious and redundant. However, the real importance of unit testing is clear when you explore code that is not unit testable. Unit testing can not be done on code that is written poorly. This was the biggest eye opener for me as I read this blog, especially with the great examples provided. Notably, the one where having the external dependencies in its own function allows for easy bug fixing if anything was to change in the eternal API.

As I recently began refactoring old code with some of the new techniques and agile methods, I noticed the largest hurdle for me is being able to create “pure functions.” These are functions that are limited to doing one task and are very clear what that task is. From my experiences, having pure functions and good naming conventions are the two most important aspects to readable and scalable code. Approaching the code with unit testing in mind, the should automatically be written in a way that you will create pure functions. 

As someone who strives to write clean, readable code, I feel like I share the motivation Dinavahi expresses in the blog when it comes to learning unit testing. Each time I have refactored my code, I have always felt like it was just not finished. However, using unit testing I will be able to identify which parts of my code are not written properly and need to be refactored again. This time, with the knowledge of the steps I can take to get to unit testable code. 

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

Knowing Test-Driven Development (TDD)

Hello everyone,

Today I want to talk about test-driven development (TDD), which plays an important role in software development and testing, and improves the reliability and quality of software products. Through my recent exploration of software testing knowledge, I learned the importance of TDD. So I recommend this blog. This blog provides an in-depth discussion of understanding TDD, its impact on software development, and how I foresee integrating this approach into my future practice.

Link: https://semaphoreci.com/blog/test-driven-development

By Ferdinando Santacroce

This blog explains the three-step cycle of TDD (write tests that fail, write minimal code to pass the test, and refactor) and the benefits associated with this approach. It illustrates how TDD promotes improved code quality, faster development cycles, and better software design, all of which resonate with what I learned in the course.

My personal code writing habit is to write the functional part first, and then write the corresponding test function to test its completeness. But TDD gave me a new choice, which is to write the test part first and then write the functional part. This gave me new inspiration. Maybe the TDD model will be more conducive to our work.

The author also wrote several interesting examples to help us understand how TDD works. He also reiterated that “TDD is a code technique, not a testing technique.” My personal understanding is that TDD can not only be used in the field of testing, but also can be used to think about any code-related issues, not just Just used for testing functionality.

Overall, TDD is not just about testing. it is also a mindset that prioritizes testing and quality from the outset of the development process. By adopting TDD, developers can build software with greater confidence, knowing that it has been thoroughly tested and meets the specified requirements.

From the blog CS@Worcester – Ty-Blog by Tianyuan Wang and used with permission of the author. All other rights reserved by the author.

Week 12

Considering that we have been working on the Mars rover for the past two weeks, I decided to find an article that correlated with this. I went straight to the source and found something about the actual Mars rover. I was able to find an article that piqued my interest. This article was specifically about the real rover and the people who worked on it. I chose this article to show the broad potential we all have inside the CS field that none of us even heard about. I hope to open your minds to all the possibilities you can do with code.

    The article begins by introducing the reader to Melody Ho a full-stack developer for the Nasa Mars website. She has a multitude of responsibilities she has to publish information about every mission and create data pipelines to be accessible to the public. Her journey began by working on a basic HTML book and playing computer games. She gives her reflection on her journey to inspire the next generation of women in space and technology. She most enjoys programming code that is efficient and adapting it to the best version of code possible. When she was growing up she was considering a career in computer games because she hadn’t yet seen the opportunities available for programming. She leaves the article by advising the next generation. She says to embrace new things and don’t be scared because these are opportunities that are needed to succeed. Technology is constantly changing don’t be discouraged if all doesn’t click it will take time.

   Reading this article gave me more of an introspective view of someone’s life in coding. This article doesn’t have much connection to the code we do in class but I think it’s very interesting to see the whole perspective of a coding journey. This article touches upon aspects that you may not think about every day but it gives much attention to what is important. Melody trying to inspire the next generation is very touching. She didn’t have to do this but she did. For me, it gave me a broader view of programming because sometimes you may have a tunnel vision of what you can do with your code but the possibilities are endless. There are a lot of connections that you may not see on an everyday basis. She mentioned how she double majored in business and I didn’t even see the correlation of coding in a management setting but it’s there. There are a lot of connections in programming with other skills there are some I haven’t thought about.

https://airandspace.si.edu/stories/editorial/coding-brings-mars-data-down-earth

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

CS-448 Sprint 2 Retrospective

Merge branch ‘verify-pipeline-tests’ into ‘main’ (490e4d29) · Commits · LibreFoodPantry / Client Solutions / Theas Pantry / ReportingSystem / General · GitLab

Last sprint teams were focused on changing the pipeline tests and extensions for certain repositories and so this sprint teams were assigned to verify the correct linters and extensions were added as well as running the correct tests when committing the changes to Gitlab. ReportingSystem General does not build a Docker image nor does it have release number. For this repository, we only need to run the linter pipeline tests and ensure that they all passed with no errors.

Merge branch ‘verifying-that-reportingsystem-10’ into ‘main’ (e7755051) · Commits · LibreFoodPantry / Client Solutions / Theas Pantry / ReportingSystem / Documentation · GitLab

Like ReportingSystem General, the Documentation repository did not need to run through all the pipeline tests in Gitlab such as the build, test, or release stages. This means that we only had the linter tests run through the pipeline when committing any changes to this repository.

Merge branch ‘jlee1999/verifying-that-generatewcfbreportfrontend-38’ into ‘main’ (6e5d198e) · Commits · LibreFoodPantry / Client Solutions / Theas Pantry / ReportingSystem / GenerateWCFBReportFrontend · GitLab

GenerateWCFBReportFrontend is different than the other two repositories that I worked on as it does require pipeline tests such as build, test, and release. Originally, the tests were passed with a warning, which was okay at the time, but our goal was to ensure all the tests passed with no warnings.

Files · jlee1999/research-functionality-122 · LibreFoodPantry / Client Solutions / Theas Pantry / GuestInfoSystem / GuestInfoBackend · GitLab

Once I completed the verification related issues in our sprint backlog, I shifted focus on the first steps of hot reloading GuestInfoBackend servers for development mode. First, I researched what the command “nodemon” is and how I can properly integrate it into the code. This command allows for the server to restart after any changes are made in the folders specified prior. I created a separate folder in this branch called “express-example” with a simple JavaScript file as well as the package.json file and any other required files needed. This allowed me to mess around with the functionality of the command without completely rearranging the main branch.

feat: merge branch ‘jlee1999/edit-scripts-to-allow-123’ into ‘main’ (f145cdc1) · Commits · LibreFoodPantry / Client Solutions / Theas Pantry / GuestInfoSystem / GuestInfoBackend · GitLab

After messing around with nodemon in the sample branch, I was ready to implement it to the main branch of GuestInfoBackend. I was having trouble making sure the nodemon command works while also ensuring the pipeline tests passed. If I was able to get the pipeline tests to pass then the functionality of nodemon was not working, and if nodemon was working then the pipeline tests would fail. I was struggling trying to figure out why this issue kept occurring, but after a while I was able to get both the functionality to work along with the pipeline tests to pass simultaneously. The cause of this problem was because the repository was using both npm and yarn when building the pipeline tests which caused problems. I decided to stick with strictly npm for the repository which then fixed the issue.

Files · update-checkinventory-29 · LibreFoodPantry / Client Solutions / Theas Pantry / InventorySystem / CheckInventoryFrontend · GitLab

I did not get to work too much on CheckInventoryFrontend this sprint but was able to get a general idea of some issues that could be arising. I noticed that this repository also has both npm and yarn together which has caused some issues with the pipeline tests. Hopefully the next sprint my team and I can solve this issue and provide a simple and working frontend for the InventorySystem.

This was the second sprint for the team, and I believe that it went better this time around compared to the first sprint. I felt more comfortable with the whole set-up of our sprints and the team was able to get the work done we needed to. Around half of the issues this sprint revolved around verifying pipeline tests and extensions in repositories that will help in the future to allow people to focus on bigger parts of the project with more ease. While I worked on 3 of the issues around verifying pipeline tests, our team had 5 overall which made it easy for us to communicate what worked for the other issues. The continued work in Gitpod/Gitlab has gotten me even more comfortable committing changes along with merging branches. There was only one issue that I messed up the commit message when squashing the commits for GuestInfoBackend, but it did not affect the overall functionality of the repository and the pipeline tests were still able to pass.

While I would like to say everything worked out perfectly during this sprint, it would be a lie. There were some small hiccups in progression through this sprint, but I would say it was less severe than the issues holding us back last sprint. I believe the higher level of comfort in the progress helped allow the team to get passed any hiccups. The biggest issue I was running into was during the GuestInfoBackend issue about hot reloading the servers. I touched on it earlier, but the combination of npm and yarn in the repository was causing me the most issues during this sprint, but I was able to solve it before the end of the sprint which was the goal.

Overall, I believe the team can still improve on communications in some respects, but I would say we were all on the same page more often this sprint compared to last. I would make sure I would notify the team in Discord about any issues I was running into or if I needed a review on a merge request, and the team would be able to see it and help continue the progress of the sprint. I did a better job this sprint focusing on one issue at a time rather than trying to work on multiple issues at once.

From the blog CS@Worcester – Jason Lee Computer Science Blog by jlee3811 and used with permission of the author. All other rights reserved by the author.

Test-Driven Development

Usually, the traditional method to developing code is to start with a design, implement that design, and then test the implementation to ensure that it runs as smoothly as intended. However, test-driven development (TDD) completely changes the software development process by emphasizing writing tests before code, turning tests into an iterative, ongoing practice.

Unlike the traditional waterfall model where testing is an end-of-cycle event, TDD integrates testing at every step. The TDD cycle consists of writing a failing test, implementing the feature to pass the test, and then refactoring the code. It’s deeply rooted in Agile principles, promoting iterative development, customer feedback, and adaptability.

Good adaptability comes from TDD’s ability to ensure that each development round begins with a clear, testable goal, which fosters collaboration and ensures that there is quality assurance in every phase. This is done by writing unit tests for core functionalities before implementing the feature. Once the feature is implemented, the code is refined to pass the test. Eventually, through iterative cycles, the entire application is built.

TDD offers numerous benefits for software delivery teams, including improved collaboration, robustness, and cost-effectiveness. Applications developed using TDD tend to be more robust due to the quick feedback loop, allowing bugs to be detected and resolved early on in the development cycle.

Moreover, by starting simple, organizing tests, regular refactoring, and building a comprehensive test suite, TDD leads to improved design and architecture, lowered long-term costs, increased confidence in code changes, and effective documentation.

Practicing the TDD method in class was an eye-opening experience. I was able to learn so much about testing and developing software at the same time. Because I am often guilty of neglecting to write my test cases, this type of development is good for getting me more comfortable and into the habit of writing stronger test cases.

Overall, TDD brings reliability, efficiency, and reduced maintenance costs to software development. Its structured testing approach, coupled with comprehensive test cases to optimize the development process, improving the code quality. TDD’s compatibility with CI/CD practices makes it essential for delivering reliable and high-quality software efficiently. I will definitely practice writing code using the TDD method more.

Source: Test-driven development explained by Jacob Schmitt

From the blog Stories by Namson Nguyen on Medium by Namson Nguyen and used with permission of the author. All other rights reserved by the author.

sprint 2 retrospective

During the course of this sprint, I spent most of my time looking at the ReportingBackend repository to figure out what was going wrong with the testing suite. I also had assigned myself to configuring the pipeline specifically in ReportingAPI with the linters, but unfortunately was unable to complete this issue because the team responsible for actually adding the linters to the repository was not able to push their changes before the sprint ended. I continued to act as the scrum master for the team, taking an active approach to making sure everyone is doing work, getting credit for their work, and setting up meetings when necessary. I had to help out a bit with other team member’s issues as well, providing some guidance.

Verify the Testing Suite works: Investigate the testing suite and see if I can get it to work, or at least figure out the magnitude of the problem. I applied a couple of fixes (one of which was in the build.sh script that I had a separate 0 weight issue created for, as I had already found the bug and fix prior to the sprint starting.), but it seems like the issue transcends the testing suite and is moreso an issue with the build process with the server.

This sprint was pretty rough, if I’m being honest. For what we did well, our communication overall improved, and the team was better able to utilize GitLab for their work. I think that everything on GitLab was better organized and most of the issues had better descriptions on them than what we had last sprint, and the weight assigned to issues seemed fairly accurate all things considered, aside from the testing issue (which I did spend a lot of time on). We also did work with each other more than we did on the last sprint.

Most of the issues that were assigned to our team were rushed together during the last week of the sprint (from my perspective at least, there may have been some confusion with pushing to GitLab). As such, we weren’t able to get to all of the issues, and only got 14 weight out of the 24 weight assigned to our team fully merged in. I was offering support during the whole sprint, but it seemed like team members were not able to coordinate into a meeting at the same time for most of the sprint. I don’t really have a great reasoning for this, it seems like things weren’t being done until the time was very short to were we couldn’t get everything done, taking all of our other schoolwork into account.

Ultimately, I think for next sprint our team really just needs to work on spreading work out during the entire sprint rather than getting things done last minute. We should also work on coordination and being more present, as when anyone asked if we wanted to do a meeting, the team would all say they were available and no one would take the initiative to actually begin the meeting. Part of that is on me as scrum master, but ultimately we should be willing to meet without having everyone on board if we are working on specific issues.

I was able to spread out my work fairly well as an individual, but I can’t say the same for other team members, and so as scrum master I should be more active in making sure everyone is doing their work not just so the project moves forward, but so everyone gets the credit they need for the course.

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.

mocking review (and more)

A while ago, we used the Mockito framework in Java during an in-class activity. If I’m being honest, I wasn’t paying full attention to the material, and so I wanted to review some of the material in addition to looking into mocking more.

The idea with mocking is that unit testing without the actual classes being written is problematic solely because we can’t actually test stuff that isn’t written. This mostly applies to a specification-based testing environment, a subset of black-box testing. Mocking solves this by simulating the construction of objects and allowing set values to pass through for tests, which can then be refactored once the classes are actually created. As such, we can have tests created for the behaviors we want in our project, without having written the project yet, which is great if we’re applying specifications to tests.

This contrasts with stubs, pieces of code that are written as minimally as possible to get the test suite to function. Stubs are useful in that they can quickly provide the correct result for a test without the need of an outside resource, but what seems to happen is that as you write more tests, you end up writing the actual program in the process to make the tests match. This is good for test-driven development, where we actively write tests while we code the actual program, but if our interest is solely on writing the tests based on specifications, this isn’t a great approach.

According to a blog post by Rohit Khankhoje, mocks are great in that they are more cost-effective, acccessible and efficient than writing stubs or creating fakes. By setting up mocks, you have less set-up time for tests because you don’t need to have the system accessible in order to have a fully functioning test suite. While this is great, there are some obvious drawbacks. For example, tests that utilize mocking will still frequently have to adapt to new code changes when functionality is added to the project. This is more pressing with the idea in mind that tests will continue to pass with mocks despite code in the actual project changing, and so mocked tests need to be developed side-by-side with the actual code, otherwise the testing suite isn’t actually portraying accurate information regarding the accuracy and performance of the system.

As such, while mocking is a very strong tool, it seems to only be very useful in an environment where we don’t have access to code, and when we do have access to code (or we are also the coders ourselves, not just testers) it seems much more efficient to implement test-driven development.

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.

Draw Your Own Map

The draw-your-own-map pattern talks about how people should take control of their career paths and not rely on others to define their path. This pattern talks about identifying the next logical steps, visualizing how to achieve those steps, and continuing to evaluate their goals and values. Draw-your-own-map pattern suggests that getting help from like-minded people and being open to adjusting one’s map to any changes that came up. This pattern shows stories about people who go into programming despite challenges from employers and orginizational limits. Draw-your-own-map encourages people to set a specific goal rather than setting a goal that isnt reachable. That step not only helps provide feedback but it also makes you seek guidance from like-minded people, those people can give you resources and support when trying to achieve your goals. One of the key ideas of this pattern is flexibility, it supports the idea of one’s mind to keep reassuring themselves that it’s okay to make changes. This pattern promotes an approach to career development and make sure to empower people to find their way through there careers with a purpose.

I thought this pattern was interesting because it encourages people to be creative and not rely on other people to define our paths, it should be our decision. I also thought the steps that the pattern talks about was very helpful, it’s important to set realistic goals so that you don’t overwork yourself to reach that goal. Visualizing the steps to achieving those goals also help make sure you don’t rush through the process and able to have a set plan. Evaluating your goal and values are also important as you go on to make sure that you can still reach your goal and be okay with any changes that come. This pattern has changed the way I think about achieving my goals, I know now to set a more realistic goal for myself and not be scared to get help from people who think like me. I don’t disagree with this pattern because I feel like this will help a lot of people with reaching their goals and make them think more realistically while getting support from others.

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

Expand Your Bandwidth, Expand Your Mind

In the fast paced Software Development field, staying ahead is not just advantageous but essential. Yet, many of us tend to find ourselves stuck in a rut, focused solely on the task at hand and neglecting the broader landscape of knowledge and innovation. The Expand Your Bandwidth pattern emphasizes the importance of continually expanding our knowledge and skills beyond just the day to day tasks we complete. Additionally, the importance of actively seeking out new information and participating in various learning opportunities to help accelerate our professional growth.

What I found particularly interesting regarding the pattern is the notion that we all want to achieve mastery following the long road, but achieving that mastery level is more than just mastering a specific technique or technology, but rather about cultivating a broad and adaptable skill set. The pattern also presents an analogy for learning through a straw and a fire hose. By immersing ourselves in a fire hose of information, while it may be overwhelming, is incredibly empowering. Therefore challenging the notion of compliance and encouraging us to continually learn, explore, and experiment.

After reading more about this pattern, it has changed the way I think about my approach to learning and professional growth. Previously, I tended to focus solely on completing immediate tasks, projects, and work, ignoring the broader landscape of knowledge and innovation. However, this pattern has inspired me to adopt a more expansive mindset and go out of the box to seek different opportunities for learning and growth. 

While I embrace the message from this pattern, I do think it is important to limit how much information we try taking in all at once. If we don’t manage all the information properly or carefully, it could lead to an information overload and overwhelm or stress us out.

With this being said, the Expand Your Bandwidth pattern helps serve as a powerful reminder of the always changing and evolving field and the importance of continually trying to learn more and more to increase our skillset. By embracing this pattern, I am confident that I will not only enhance my skills as a developer but also create a mindset of lifelong learning and adaptation, which is essential for success in our dynamic field.

From the blog CS@Worcester – Conner Moniz Blog by connermoniz1 and used with permission of the author. All other rights reserved by the author.