Category Archives: CS-343

Front/ Back End | Week 11

In this article it goes on a topic of what Front End and Back End, how they differentiate and work and many more! They reach out on topics that attach themselves around front end development such as what is HTML, CSS, JAVA Script and how they work/operate. Throughout my years in college I have come across this website many times while informing me as well as just guiding me a bit more to help me with why and how they work. It’s safe to say it’s a good catch. 

Selecting this article has helped me and given me more clarity to our recent topic in class in which we were taking on frontend and backend development. Whether it being the homework projects and in class work sometimes things may still be unclear or maybe you just want to know more about what can be extended out of this specific topic and what it branches it out to.

The introduction to this article is immediately getting to what Front End is and its development. Knowing that Front End is the operation of creating a user interface so that the user can use set features. Now what about Back End, well Back End is the composing and building the parts for a running application. So you see without the Back End you can’t have a Front End. Looking past this now we wonder what languages go with it best. In class we started talking about the use of HTML but you can also use CSS or Javascript. That being said though each has their own set of pros and cons of use. Though it does seem that HTML is the default mostly used. Some other interesting points that can help you maybe moving forward are right here. For example you can take a look at Front End Development Frameworks such as Angular, React, jQuery etc and pick up what they are as well which may be best for you to use. You can also find answers to particular questions like what is a responsive web development and how it is used out in the world. The remaining topics progress into more a personal take relating if you have a business and ways to go at it and which approach to take using both ends in it, or take a look at how to enhance application performances along with Front End Security. Overall this article is very informative and does a great job focusing on the general theme of Back End and Front End and more. 

https://cloudinary.com/guides/front-end-development/front-end-development-the-complete-guide#fe-3

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

Week 12: CS-343

Refactoring Code

Refactoring is an important process when maintaining code bases. The goal of refactoring is to change the implementation, definition, and/or the structure of the code without changing pre-existing functionality of the application. Refactoring allows for better extensibility, maintainability, and readability. Refactoring usually results in smaller and simpler code bases, allowing new functionality easier to implement.

When to refactor?

Because refactoring results in simpler code bases, refactoring should be done before adding new features. Working with clean code after refactoring makes the process of adding new functionality easier. For example, if the code base is not extensible, then adding new functionality might break the code leading to more work to fix the problem. Refactoring should also be done before code reviews or before addressing bugs.

What code needs refactoring?

Code smells can be defined as structures in the code that indicate violations of fundamental design principles and negatively impact design quality. Code smells can be used to identify what needs to be refactored. There are over 70 refactoring techniques that help identify problems and provide a known solution. Some techniques are the Extract Method, Replacing Temp with Query, and Encapsulation of a Field.

Refactoring techniques

Extract Method

The Extract Method can be used when code can be grouped together. For example, there is a class called ‘Student’ that has two print statements that prints student details such as name and year. Refactoring would include grouping the two print statements together into its own function. This is helpful because if you wanted to add more details to be printed, you only have to add one line to the function.

Replace Temp with Query

Temp refers to a temporary variable that holds a value of an expression to be used later in the code. This technique replaces the temp variable with a query method that returns the result of an expression. For example, there is a variable where ‘basePrice = quantity * costPerItem’. The variable can be represented as a new method called ‘basePrice()’ that returns the expression, ‘quantity * costPerItem’. If the temp variable is used among multiple classes, having a common method would more manageable.

Encapsulate Field

Encapsulating a field involves using methods that read and write data rather than accessing data directly. When accessing variables directly, they are often set to public which allows the data to be modified without a way to validate the change. Getter and Setter methods should be used to access class variables instead because the access level for the variables can be set to private, meaning the data itself cannot be accessed unless using the access methods. Using access methods provides a way to validate changes.

Reflection

This resource was used because it was clear and concise, making the content easy to understand. The article also included code examples of the techniques which improved comprehension. Before reading, I was unaware of some of the techniques listed which will be helpful when refactoring in the future.

Resources:

https://www.geeksforgeeks.org/refactoring-introduction-and-its-techniques/#

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

The 9 Principles of GRASP | Part 1

GRASP stands for General Responsibility Assignment Software Patterns. It is a set of principles applied to Object Oriented Programming.

There are nine principles or “patterns” which help programmers understand the responsibilities in software design. In10se on Medium writes a detailed summary on each principle in the article, Mastering GRASP Design Principles for Better Software Design.

  1. Information Expert
  2. Creator
  3. Controller
  4. Low Coupling
  5. High Cohesion
  6. Indirection
  7. Polymorphism
  8. Pure Fabrication
  9. Protected Variations

When developing code, programmers need to identify where to assign responsibility in the code. In software design, responsibility refers to two things: behavior (doing) and data (knowing). Different parts of the code have the responsibility or obligation to “do” the thing itself, such as creating an object or modifying the data.

Programmers can also assign responsibility to the data used by the code such as when the data is public or private, or when to relate data objects for reference, or how the data can be used to generate dependent data.

To keep this post within the acceptable length, I will cover the first four principles this week.

  1. Information expert: this principle states that “responsibility should be assigned to the class with the most knowledge or information required to fulfill the responsibility” (In10se).
    For example, a professor object that has access to every student’s homework and test scores should be responsible for calculating each student’s final grade since this object has access to all the necessary data to do it.
  2. Low Coupling: there should be as little dependencies as possible to reduce the effects of changes in the data and code so to keep different systems separate from each other.
    Instead of having one object be dependent on another, it would be better to create a separate interface that connects the two.
  3. High Cohesion: groups that have related responsibilities should be simplified to a single class for better clarity and maintainability. This also means keeping things that have no related responsibilities separate.
  4. Controller: this principle says that all system events should be handled through a single class that manages and coordinates the system behavior. In10se gives the example of a UserController class that is dedicated to handling user-related events like registering and logging in. However, the actual processes are in other classes.

While writing code is certainly difficult, I find designing the code the hardest part. Just as being fluent in a language doesn’t make me an excellent author, so too does knowing a programming language well not necessarily mean that I can write software that is efficient and effective.

Designing software requires a strong understanding of how to assign responsibility in the code. GRASP contains principles that help guide a programmer’s decision making when designing the software structure so to write a program that not only works, but is also secure and maintainable.

Source: https://medium.com/@in10se/mastering-grasp-design-principles-for-better-software-design-a21b5ec29e89

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.

Taking REST API to the DEEP END.

Rest API and CS-343 are a duo that just sounds right. When trying to give to come up with a blog idea for such a class, I couldn’t picture a clearer GIF than our dear friend Patrick Star

I try my best to not compare but it is hard not to when I compare my blog process to CS-348 and made the sudden realization I have over a hundred ideas for that class.

However, in the short two-minute comparison, I realized that since my class was approaching MS-Billion-Gillion-Trillion in Micrroservice Activity, it would be a great time to take a deep dive into Rest API.

A lot of the articles I had a chance to come across I noticed to have lots of gaps in the information provided. Noticed in some there was missing clarification, simplified introductions, and Chat-GPT “Whats Rest API” money makers. REST API and API in a Nutshell. Deep Diving Into REST API by Krunal Chauhan offered the best of both worlds in offering me a crash course on Rest API and a challenging question started on the advanced side of such a topic.

Crash Course KNOWS:

  1. Definition of API:
    • API stands for Application Programming Interface.
    • It acts as a software intermediary allowing communication between different applications or devices.
  2. Need for API:
    • Necessary for communication with various devices and services.
    • Enables interaction with web browsers, mobile devices, and third-party software.
  3. API Explanation (Metaphor):
    • Describes API as a mediator, like a waiter in a restaurant, facilitating communication between the client (user) and the backend (kitchen).
  4. How API Works:
    • APIs communicate through rules/protocols.
    • Typically works over the internet via HTTP, built on top of the TCP/IP protocol.
    • Analogizes API communication to a customer (user) placing an order through a waiter (API) to the kitchen (backend).
  5. REST API:
    • Represents a style of API architecture that uses HTTP and is user-friendly.
    • Introduced by Roy Fielding and is considered a standard protocol for web APIs.
    • Works with HTTP methods like GET, PUT, POST, and DELETE.

CRASH CROUSE DEEP DIVE:

  1. Building Blocks of API:
    • API Interface Block: Defines specifications for the API, often using HTTP.
    • API Controller Block: Manages traffic, and handles authentication, and authorization.
    • API Runtime Block: Executes the business logic of the API.
    • API Data Bridge Block: Facilitates seamless access to shared data storage.
  2. API Management:
    • Involves designing, publishing, documenting, and analyzing APIs in a secure environment.
    • Components include API design, API gateway, API store/developer portal, and API analytics/dashboard.
  3. Types of API:
    • Open APIs (Public API): No restrictions on access.
    • Partner APIs: Requires specific rights or licenses.
    • Internal APIs (Private APIs): Used within a company for internal purposes.
  4. REST API Architecture Components:
    • REST Client: Code or app accessing REST services.
    • REST Server: Offers API and resources.
    • REST API: Defines endpoints and methods.
    • Endpoint/URI: Specifies where to find a resource.
    • REST Request: Includes HTTP method, endpoint, headers, and body.
    • REST Response: The server sends a representation of the resource, often in XML or JSON.

I enjoyed reading these types of articles when the reading flow is smooth and coherent to the subject. If you can believe it or even if you check the article yourself, the summary above is my notes for the article and about how 99% of the article flowed.

A good chunk of the reading was a good reminder of things I already learned but there was also a few sections that required me to go back as we have not had the chance to talk in-depth about them.

Specifically, the Rest API Management as this was the first time I ever heard these terms before and was not a section we were able to cover just yet. Out of the article I was able to break down the Rest API Management into 4 sections.

  1. API Design:
    • This block enables users, including developers and partners, to design, publish, and deploy APIs. It includes recording documentation, security policies, descriptions, usage limits, runtime capabilities, and other relevant information.
  2. API Gateway:
    • The API Gateway acts as a gatekeeper for all APIs. It handles tasks such as routing requests, composition, and protocol translation. It enforces relevant API security policies, ensures authorization, and guarantees the security of requests.
  3. API Store / Developer Portal:
    • This component provides a place to keep APIs in a store or catalog, exposing them to internal and/or external stakeholders. The API store serves as a marketplace where users can subscribe to APIs, obtain support from the community, and access other relevant information.
  4. API Analytics/Dashboard:
    • API management solutions offer analytics and dashboards that allow users to monitor API usage, load, transaction logs, historical data, and other metrics. This information helps in understanding the status and success of the available APIs, facilitating data-driven decision-making.

Now I’m not sure why I found this part so interesting and why I found myself watching a 30-minute YouTube video on how API dashboards work and operate, but hey whos going to judge? This is a section I believe we are going to cover/hope we do as it’s been a great experience learning how to build and read complicated APIs. I feel like I am ready to take another step and properly learn how I would manage one of these APIs that I created.

PS: “Advantages of API vs ******** ” (Stay Tuned)

Until Next Time ?

Source: https://medium.com/@krunalchauhan_/article-worth-reading-on-what-is-an-api-what-is-a-rest-api-and-deep-diving-into-rest-api-fea074dacaed

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.

Navigating the Labyrinth of Anti-Patterns in Software Development

As a student navigating the intricate world of software development, stumbling upon Andreas Schöngruber’s insightful article on anti-patterns was like discovering a treasure map through the labyrinth of coding pitfalls. Titled “What Is an Anti-pattern?”, the article serves as a comprehensive guide to understanding, identifying, and avoiding anti-patterns in the software development lifecycle.
Schöngruber’s article begins by defining anti-patterns as deceptive solutions that appear effective but ultimately create more problems than they solve. These pitfalls manifest in various aspects of software development, from programming practices to methodological and testing phases. The article covers programming anti-patterns like Spaghetti Code, Lava Flow, Accidental Complexity, God Object, Hard Code, and Magic Numbers. It further explores methodological anti-patterns such as Premature Optimization, Reinventing the Wheel, and Copy and Paste Programming. The discussion extends to software testing anti-patterns like the Wrong Kind of Test, Testing Internal Implementation, and the Happy Path.

Why I Chose This Resource:

In the ever-evolving landscape of software development, understanding what to avoid is as crucial as knowing best practices. The article’s clarity in categorizing and explaining various anti-patterns appealed to me as a student eager to enhance my coding skills. It provides a roadmap to steer clear of common pitfalls and promotes a proactive approach to creating efficient and maintainable code.

Reflection on the Content:

As I delved into the programming anti-patterns, the concept of Spaghetti Code resonated with me. Schöngruber’s emphasis on modularity and readability struck a chord, prompting me to reflect on past coding practices. The discussion on Hard Code also resonated, making me rethink my approach to configuration management. The article prompted a realization that simplicity, adhering to the “Keep it simple, stupid” (KISS) principle, is not just a preference but a necessity.

Moving into methodological anti-patterns, the notion of Reinventing the Wheel made me reconsider some instances where I may have overlooked existing solutions. The discussion on Premature Optimization underscored the importance of balancing performance improvements with actual needs, a valuable insight for optimizing code efficiently.

Application in Future Practice:

Armed with the knowledge gained from this article, I envision a more discerning and proactive approach to my future coding endeavors. Recognizing anti-patterns will not only enhance the quality of my code but also contribute to a more efficient development process. I plan to integrate the principles discussed, such as modularity, simplicity, and avoiding unnecessary optimizations, into my coding practices. Additionally, the insights on testing anti-patterns will guide me towards more effective quality assurance strategies.

For those eager to navigate the labyrinth of software development with fewer missteps, I highly recommend reading Schöngruber’s article. It’s a valuable addition to any student’s toolkit, providing insights that transcend textbooks and delve into the practical nuances of writing robust and maintainable code. You can access the article with the link below.

https://www.baeldung.com/cs/anti-patterns#:~:text=Anti%2Dpatterns%20are%20the%20opposite,project%20management%2C%20and%20organizational%20behavior.

From the blog CS-343 – Hieu Tran Blog by Trung Hiếu and used with permission of the author. All other rights reserved by the author.

Remote Work

     Ever since the pandemic, the modern workplace has gone through many shifts. The realization that workers can still be effective members of the company from their home has changed a lot of people’s perspective on the corporate work environment. Many workers have pushed for remote work to become a staple of the modern job market. It is easy to see the appeal of remote work: No commute, stuffy office, or even stuffier dress code sounds very appealing to me. I personally enjoy the ease of access to one’s job right in their own home. All of that said, the infrastructure for remote work has been in the works for longer than we realized that there was a need for it. In the modern era, cloud computing has become a necessity for almost any job regardless of whether it is remote or not. Services such as AWS, Azure, and Git hub/lab has supplemented developers with the tools to contribute to their workplace from anywhere on the globe. Now teams can be comprised of any developer within the company and can pull from about any talent pool. This comes with its own set of unique challenges though, as remote work moves developers from a singular office space to their respective homes. Balancing time zones, long-distance communication between team members, increased risk to cybersecurity and more come with the territory of all your developers working from their house. Fortunately, Cloud computing answers some of these problems by providing more security and reliability to development teams. Azure and AWS provide secure repositories for teams and reliable access to their work wherever they are. Then there are Applications such as Zoom, which provides communication between team members and can even facilitate daily scrum meetings if needed. Developers have been using git for a long time, and it has served to supplement collaboration in software development. While the pandemic is over and most companies have tried to push their employees to go back to the office, remote work has become a fixture in the modern work landscape. For some companies, it is an economic option since it is cheaper to subscribe to several cloud services than to rent an entire office space. For other companies, it is simply the efficient option. I believe companies should incorporate these innovative technologies to expand their reach, and to shift society further down the path of better work life balance. The past few years have shown us that the old ninetofive has become outdated, and possibly unsustainable.  

https://socpub.com/articles/how-can-cloud-computing-enable-remote-teams-work-more-productively-17895

https://aws.amazon.com/application-hosting/benefits/

https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-azure

From the blog CS@Worcester Alejandro Professional Blog by amontesdeoca and used with permission of the author. All other rights reserved by the author.

Remote Work

     Ever since the pandemic, the modern workplace has gone through many shifts. The realization that workers can still be effective members of the company from their home has changed a lot of people’s perspective on the corporate work environment. Many workers have pushed for remote work to become a staple of the modern job market. It is easy to see the appeal of remote work: No commute, stuffy office, or even stuffier dress code sounds very appealing to me. I personally enjoy the ease of access to one’s job right in their own home. All of that said, the infrastructure for remote work has been in the works for longer than we realized that there was a need for it. In the modern era, cloud computing has become a necessity for almost any job regardless of whether it is remote or not. Services such as AWS, Azure, and Git hub/lab has supplemented developers with the tools to contribute to their workplace from anywhere on the globe. Now teams can be comprised of any developer within the company and can pull from about any talent pool. This comes with its own set of unique challenges though, as remote work moves developers from a singular office space to their respective homes. Balancing time zones, long-distance communication between team members, increased risk to cybersecurity and more come with the territory of all your developers working from their house. Fortunately, Cloud computing answers some of these problems by providing more security and reliability to development teams. Azure and AWS provide secure repositories for teams and reliable access to their work wherever they are. Then there are Applications such as Zoom, which provides communication between team members and can even facilitate daily scrum meetings if needed. Developers have been using git for a long time, and it has served to supplement collaboration in software development. While the pandemic is over and most companies have tried to push their employees to go back to the office, remote work has become a fixture in the modern work landscape. For some companies, it is an economic option since it is cheaper to subscribe to several cloud services than to rent an entire office space. For other companies, it is simply the efficient option. I believe companies should incorporate these innovative technologies to expand their reach, and to shift society further down the path of better work life balance. The past few years have shown us that the old ninetofive has become outdated, and possibly unsustainable.  

https://socpub.com/articles/how-can-cloud-computing-enable-remote-teams-work-more-productively-17895

https://aws.amazon.com/application-hosting/benefits/

https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-azure

From the blog CS@Worcester Alejandro Professional Blog by amontesdeoca and used with permission of the author. All other rights reserved by the author.

Remote Work

     Ever since the pandemic, the modern workplace has gone through many shifts. The realization that workers can still be effective members of the company from their home has changed a lot of people’s perspective on the corporate work environment. Many workers have pushed for remote work to become a staple of the modern job market. It is easy to see the appeal of remote work: No commute, stuffy office, or even stuffier dress code sounds very appealing to me. I personally enjoy the ease of access to one’s job right in their own home. All of that said, the infrastructure for remote work has been in the works for longer than we realized that there was a need for it. In the modern era, cloud computing has become a necessity for almost any job regardless of whether it is remote or not. Services such as AWS, Azure, and Git hub/lab has supplemented developers with the tools to contribute to their workplace from anywhere on the globe. Now teams can be comprised of any developer within the company and can pull from about any talent pool. This comes with its own set of unique challenges though, as remote work moves developers from a singular office space to their respective homes. Balancing time zones, long-distance communication between team members, increased risk to cybersecurity and more come with the territory of all your developers working from their house. Fortunately, Cloud computing answers some of these problems by providing more security and reliability to development teams. Azure and AWS provide secure repositories for teams and reliable access to their work wherever they are. Then there are Applications such as Zoom, which provides communication between team members and can even facilitate daily scrum meetings if needed. Developers have been using git for a long time, and it has served to supplement collaboration in software development. While the pandemic is over and most companies have tried to push their employees to go back to the office, remote work has become a fixture in the modern work landscape. For some companies, it is an economic option since it is cheaper to subscribe to several cloud services than to rent an entire office space. For other companies, it is simply the efficient option. I believe companies should incorporate these innovative technologies to expand their reach, and to shift society further down the path of better work life balance. The past few years have shown us that the old ninetofive has become outdated, and possibly unsustainable.  

https://socpub.com/articles/how-can-cloud-computing-enable-remote-teams-work-more-productively-17895

https://aws.amazon.com/application-hosting/benefits/

https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-azure

From the blog CS@Worcester Alejandro Professional Blog by amontesdeoca and used with permission of the author. All other rights reserved by the author.

Remote Work

     Ever since the pandemic, the modern workplace has gone through many shifts. The realization that workers can still be effective members of the company from their home has changed a lot of people’s perspective on the corporate work environment. Many workers have pushed for remote work to become a staple of the modern job market. It is easy to see the appeal of remote work: No commute, stuffy office, or even stuffier dress code sounds very appealing to me. I personally enjoy the ease of access to one’s job right in their own home. All of that said, the infrastructure for remote work has been in the works for longer than we realized that there was a need for it. In the modern era, cloud computing has become a necessity for almost any job regardless of whether it is remote or not. Services such as AWS, Azure, and Git hub/lab has supplemented developers with the tools to contribute to their workplace from anywhere on the globe. Now teams can be comprised of any developer within the company and can pull from about any talent pool. This comes with its own set of unique challenges though, as remote work moves developers from a singular office space to their respective homes. Balancing time zones, long-distance communication between team members, increased risk to cybersecurity and more come with the territory of all your developers working from their house. Fortunately, Cloud computing answers some of these problems by providing more security and reliability to development teams. Azure and AWS provide secure repositories for teams and reliable access to their work wherever they are. Then there are Applications such as Zoom, which provides communication between team members and can even facilitate daily scrum meetings if needed. Developers have been using git for a long time, and it has served to supplement collaboration in software development. While the pandemic is over and most companies have tried to push their employees to go back to the office, remote work has become a fixture in the modern work landscape. For some companies, it is an economic option since it is cheaper to subscribe to several cloud services than to rent an entire office space. For other companies, it is simply the efficient option. I believe companies should incorporate these innovative technologies to expand their reach, and to shift society further down the path of better work life balance. The past few years have shown us that the old ninetofive has become outdated, and possibly unsustainable.  

https://socpub.com/articles/how-can-cloud-computing-enable-remote-teams-work-more-productively-17895

https://aws.amazon.com/application-hosting/benefits/

https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-azure

From the blog CS@Worcester Alejandro Professional Blog by amontesdeoca and used with permission of the author. All other rights reserved by the author.

Remote Work

     Ever since the pandemic, the modern workplace has gone through many shifts. The realization that workers can still be effective members of the company from their home has changed a lot of people’s perspective on the corporate work environment. Many workers have pushed for remote work to become a staple of the modern job market. It is easy to see the appeal of remote work: No commute, stuffy office, or even stuffier dress code sounds very appealing to me. I personally enjoy the ease of access to one’s job right in their own home. All of that said, the infrastructure for remote work has been in the works for longer than we realized that there was a need for it. In the modern era, cloud computing has become a necessity for almost any job regardless of whether it is remote or not. Services such as AWS, Azure, and Git hub/lab has supplemented developers with the tools to contribute to their workplace from anywhere on the globe. Now teams can be comprised of any developer within the company and can pull from about any talent pool. This comes with its own set of unique challenges though, as remote work moves developers from a singular office space to their respective homes. Balancing time zones, long-distance communication between team members, increased risk to cybersecurity and more come with the territory of all your developers working from their house. Fortunately, Cloud computing answers some of these problems by providing more security and reliability to development teams. Azure and AWS provide secure repositories for teams and reliable access to their work wherever they are. Then there are Applications such as Zoom, which provides communication between team members and can even facilitate daily scrum meetings if needed. Developers have been using git for a long time, and it has served to supplement collaboration in software development. While the pandemic is over and most companies have tried to push their employees to go back to the office, remote work has become a fixture in the modern work landscape. For some companies, it is an economic option since it is cheaper to subscribe to several cloud services than to rent an entire office space. For other companies, it is simply the efficient option. I believe companies should incorporate these innovative technologies to expand their reach, and to shift society further down the path of better work life balance. The past few years have shown us that the old ninetofive has become outdated, and possibly unsustainable.  

https://socpub.com/articles/how-can-cloud-computing-enable-remote-teams-work-more-productively-17895

https://aws.amazon.com/application-hosting/benefits/

https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-azure

From the blog CS@Worcester Alejandro Professional Blog by amontesdeoca and used with permission of the author. All other rights reserved by the author.