Category Archives: Week 9

CS343 Blog Post for Week of November 6, 2023

This week, I wanted to continue writing about the SOLID software design principles. We’ve reached the letter “I”, which represents the Interface Segregation Principle. I’ve been noticing a theme across the SOLID design principles that as many parts of your software as you can manage should be independent of one another, so that modifications can be made to a part without compromising the whole. The Interface Segregation Principle brings the relationship between the software user and designer into focus.

Once again defined by Robert C. Martin, the Interface Segregation Principle is “Clients should not be forced to depend upon interfaces that they do not use.” This principle goes hand-in-hand with the previously defined Single Responsibility Principle, which declares that “A class should have one, and only one, reason to change.” The goal of abiding by these principles is to produce code that is resilient to future modifications and fostering that resilience by building independent software components.

The article provides the real-life example of a years-old piece of software being iterated on. The designers may want to add new methods to existing interfaces, even though that may introduce new dependencies to the interface and violate the Single Responsibility Principle. The author introduces the term “interface pollution”, referring to the phenomenon of existing interfaces becoming cluttered with new methods that introduce new responsibilities to the interface, rather than building new interfaces that handle those responsibilities.

The author provides a practical example of this principle through another Coffee Machine implementation. A new EspressoMachine class is proposed but requires a new method that the BasicCoffeeMachine interface doesn’t include. The problem of interface pollution is illustrated simply in this example, when a brewEspresso() method is added to the CoffeeMachine interface to support the new EspressoMachine class. No other kinds of CoffeeMachine would use this method. This approach also introduces the issue that BasicCoffeeMachine could try calling brewEspresso(), or EspressoMachine could try calling brewFilterCoffee(), and either case would throw an exception.

The solution in this case is to create new interfaces from the existing CoffeeMachine interface, FilterCoffeeMachine and EspressoCoffeeMachine. This way, only the methods required by either type of concrete CoffeeMachine class can be accessed. This approach strengthens the independence of the concrete classes. If a new CoffeeMachine design demands methods from both interfaces, it can simply implement from both.

I chose to write about this topic because I’m still learning how to assign responsibilities to different parts of my software. Having interfaces that contain too many methods rather than continuing to further specialize them is an issue I’ve faced in software that I’ve written myself. Studying the SOLID principles and actively applying them to my work will help save me a lot of time and effort in my future projects.

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

Exploring the Significance of REST APIs

REST APIs: How They Work and What You Need to Know: https://blog.hubspot.com/website/what-is-rest-api

Introduction: In the ever-evolving landscape of software applications, the demand for seamless data sharing and communication has propelled the prominence of Representational State Transfer Application Programming Interfaces (REST APIs). The blog post titled “What is REST API?” serves as a comprehensive guide, shedding light on the fundamental concepts, principles, and practical applications of REST APIs.

Reason for Selection: The selection of this resource stems from its ability to provide a clear and concise overview of REST APIs, making it accessible for both beginners and those seeking a refresher. The blog’s structured approach, starting with basic terms and progressing to the principles of REST, makes it an ideal starting point for anyone looking to understand the role of APIs in modern software development.

Content Overview: The blog begins by defining key terms such as clients, resources, and servers, setting the stage for a nuanced understanding of REST APIs. It then introduces the concept of REST as a set of guidelines facilitating internet communication for efficient integrations. The six rules of REST APIs, including client-server separation, a uniform interface, and statelessness, are elucidated, providing a solid foundation for grasping the core principles.

Reflection on Material: The content not only explains what REST APIs are but also delves into the reasoning behind each rule, offering insights into their importance. The emphasis on statelessness, for instance, is justified by the reduction in server memory requirements and improved scalability. The layered system principle is exposed, highlighting the role of intermediary servers without disrupting client-server interactions.

Applicability in Future Practice: Understanding REST APIs is crucial for anyone venturing into software development or related fields. The blog’s breakdown of HTTP methods, URLs, and the common language of communication, HTTP, provides practical knowledge that a student can directly apply in API development. The explanation of caching and its role in enhancing server efficiency offers a valuable insight that can be leveraged to optimize web applications.

The blog’s real-world examples of REST APIs, such as Twitter, Instagram, Spotify, and HubSpot, illustrate the versatility of REST in various domains. For a student aspiring to build applications with social media functionalities or integrate music-related features, this resource serves as a roadmap for leveraging existing APIs effectively.

Conclusion: In conclusion, the blog post serves as an excellent resource for grasping the fundamentals of REST APIs. Its adherence to the recommended length, coupled with its clear and informative content, makes it a valuable asset for students and professionals alike. The insights gained from this resource can empower students to navigate the complex world of API development with confidence, laying the groundwork for successful future practices in software development.

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

Enhancing Development Environments with Dev Containers

When you work in a codespace, the environment you are working in is created using a development container, or dev container, hosted on a virtual machine.

Dev Containers are Docker containers that are specifically configured to provide a fully featured development environment. They are a crucial part of our course material, and this blog post will explore their significance and functionality.

Summary of Dev Containers

Dev Containers are isolated development environments created in virtual machines, ensuring a consistent setup for everyone working on a project. They can be customized to match the specific requirements of a repository, enabling the inclusion of frameworks, tools, extensions, and port forwarding.

Why Dev Containers Matter

The reason for selecting Dev Containers as our topic is simple: they are a game-changer for modern software development. With write permissions to a repository, you can create or edit the codespace configuration, allowing teams to work in a tailored environment. They eliminate the “it works on my machine” problem, providing a consistent, reproducible setup for all team members.

Reflection on Dev Containers

As I delved into this topic, I was particularly struck by the flexibility and versatility of Dev Containers. The ability to create custom configurations, use predefined setups, or rely on default configurations makes it adaptable to various scenarios. It’s not just about convenience; it’s about ensuring that development environments are well-structured and efficient.

What I Learned

One key takeaway from studying Dev Containers is the importance of clear and standardized development environments. This is especially vital in large repositories that contain code in different programming languages or for various projects. It’s not just about having the right tools; it’s about having them consistently available to every team member.

The use of Dockerfiles, referenced in the devcontainer.json file, is another fascinating aspect. Dockerfiles allow you to specify the steps needed to create a Docker container image, making it easy to reproduce your development environment.

Applying What I Learned

In my future practice, I plan to leverage Dev Containers in collaborative projects. The ability to define a single dev container configuration for a repository or multiple configurations for different branches or teams is a feature I intend to use strategically. By tailoring development environments to the specific needs of a project, I aim to improve productivity and ensure that every team member has the tools they require.

Resource Link

Introduction to Dev Containers

In conclusion, Dev Containers are a powerful tool in modern software development, ensuring consistency, efficiency, and collaboration within development teams. By understanding how to create, customize, and apply Dev Containers, we can take our projects to the next level and tackle complex coding challenges more effectively. This topic directly relates to our course material, offering practical knowledge that can be applied in real-world scenarios.

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.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Find Mentors

Hello and thanks for coming back to another week of my blog! This week, I took a look at chapter 4 in the book Apprenticeship Patterns by Dave Hoover, called “Find Mentors.” Having a mentor can help you get guidance, support, and feedback to help you get better in your field. This apprenticeship pattern gives tips on how to find a mentor, like looking for people who are respected in your industry, going to conferences, and asking for feedback from your colleagues. It is also important to be open to feedback and find more than one mentor to get different perspectives. The computer science field is still relatively new, so there are not that many truly skilled mentors that excel in all computer science areas that are available to look up to. The pattern also says that you may encounter mentors that you may not be able to talk to, such as people making informative YouTube videos who live overseas. But those people are still mentors who inspire you. The pattern also emphasizes how hard it actually is to find a mentor. While there are many skilled people in the computer science field, not all of them are open to mentoring. Therefore, you should always ask if they are interested in mentoring people because you never know if they will accept being a mentor.

As an aspiring computer science major myself, I should also be on the lookout for mentors. There are several ways I can find mentors. The book says I should pick a tool, library, or a community that has an active mailing list and sign up for it. Other ways include asking faculty members at university, who are definitely more skilled than me and are always open to answering questions. Reaching out to alumni is a great option as well, since they were in the same boat as me when they started out. They could mentor me themselves or redirect me to someone they know who is skilled enough to answer my questions. Attending computer science events could be another option since it is a great way to network with professionals and ask them for advice. I would also have to keep in mind that as I get more experience, others may look up to me as a mentor and I would have to guide them on their long journey as well.

Thank you for reading.

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.