Understanding APIs

As a teen, I remember the first time a video game prompted me to share an achievement with my friends through facebook.  How could a game not related to facebook in any way communicate with the servers to make a post?  Connecting applications together is vital for keeping up with the expanding technical world.  This is done with APIs.

Jason Johl does a great job explaining what APIs are and how they are useful in the real world in his blog,  “What Are APIs, and How Does an API Work?”. (https://blogs.mulesoft.com/learn-apis/api-led-connectivity/what-are-apis-how-do-apis-work/#:~:text=Share%20post&text=API%20stands%20for%20application%20programming,the%20response%20back%20to%20you)  He starts of by explaining the importance of APIs and how they enable speed and agility in software.  Then, gives a great example of how APIs can relate to a real life waitstaff at a restaurant.  Followed up by examples of actual APIs used in booking a flight.  Finally, listing different types of APIs, specifically the Web APIs, which I will be exploring more in detail later.

API stands for application programming interface, and is a messenger between software that handles delivery of the request and response.  Much like how a waitstaff in a restaurant is trained to take a customer’s order to the kitchen and then return with the food.  Kitchens take orders a certain way and it is the waitstaff’s job to translate the customers order into a format designed for the kitchen. Customers can’t interact directly with the kitchen, and must use the waitstaff to handle the requests. 

Travel sites are a great way to visualize APIs in work and how they are useful.  The travel site collects information from a user on the client side and is able to take that information and search all different airlines databases to compile available flights.  To do this, the client, in this case a web browser you are using to access the site, sends an individual request to each of the airlines servers through the use of an API.  Then, the API in the airline servers takes that request, and returns all flights that match the fields such as dates and airports.

APIs can be designed and used for any software such as Java APIs allowing two objects to communicate with each other.  In most cases, I will be working with Web API’s that communicate between a client and server.  The most common Web APIs are Representational State Transfer (REST), Simple Object Access Protocol (SOAP), and Remote Procedure Call (RPC).

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

Work Smarter, Not Harder

This week I was viewing the syllabus topics and found a short article written by Rosie Faulkner, LAMP stack developer, where she describes the principle of least knowledge relating to software development.

Rosie coins the principle of least knowledge as “One of the most important software design principles” and defines the principle as “loose coupling, in that your code or your class depends on the least number of other classes in order to function.”

Rosie also states that the principle’s main focus is modularity and that a code’s modularity is important as to reduce the chances of code becoming overly complex/opaque and/or causing naturally occurring errors to become a frequent issue. By keeping our code as simple as possible, developers can create and maintain code while being more confident that new changes or updates will not affect/break anything. The less dependent (where possible) your code can become from third-party libraries the more secure and clear your code becomes overall by allowing others to view what is being done directly versus having to familiarize themselves with a new library.

By following the principle of least knowledge a developer can avoid their code from becoming Rigid, Fragile, Immobile, Overly Complex, and/or Unclear (or Opaque). By restraining from using third-party code, you can reduce the reliance on outside systems (where possible) which in turn will help not only yourself but also others in being able to view and understand your code directly. This will allow everyone to meaningfully contribute to whatever the project may be since all will have a proper understanding of what is being done.

An example where this can be displayed, given by Rosie, is a class that allows you to locate a user’s country using the IP of the given user. Rosie states “You could use a third-party class to do so” but security may become an issue over time and unsuspected updates may cause outages resulting in downtime and/or errors for users. Instead, if you create your method to return a user’s country you can directly change and update the code as needed and be able to view and tweak code with more transparency.

I often find when I am coding that I tend to over-complicate whatever I am trying to do. One example would be looking for ways to work around creating functions myself by using external systems instead. After reviewing this article, It’s more prevalent to me that trying to create the least amount of lines for a block of code doesn’t always relate to the health of the code as well. By taking a step back and reviewing what I am trying to complete and what remains to be done, I will be able in the future to partition which code should be used and what should be refactored to create the most healthy and maintainable coding environment possible. This will save me from future headaches due to negating the risk of unexpected changes/updates breaking things.

Article Link: https://medium.com/@faulknerproject/the-principle-of-least-knowledge-in-software-development-499b7a28aa14

From the blog CS@Worcester – Eli's Corner of the Internet by Eli and used with permission of the author. All other rights reserved by the author.

Understanding Copyright and Licensing:

In this blog post, we will delve into the realm of copyright protection, licensing, and explore how to use content ethically on your blog.

Copyright Fundamentals

Copyright is the legal foundation asserting that creative works such as art, writing, images, and music belong to their creators. Anything you create and record in a lasting form is your intellectual property. Others cannot legally copy or profit from your work without your permission.

Types of Licensing: Traditional Copyright, Creative Commons, and Public Domain

  1. Traditional Copyright: Strict protection; requires permission for use, adaptation, copying, or publishing.
  2. Creative Commons: Allows usage under specific conditions set by the creator (e.g., attribution, non-commercial use, no derivative works).
  3. Public Domain: Completely unrestricted use, no permission needed (applies to works published before 1923, creations of long-dead creators, or works intentionally placed in the public domain).

Using Public Domain and Creative Commons Content

Public Domain Content

No restrictions on usage, but identifying such content can be challenging. Useful sites include:

  • Prelinger Archives
  • U.S. Government Photos and Images

Creative Commons Content

Free to use but with conditions set by the creator. License types include attribution, non-commercial use, no derivative works, and share alike. Sites for finding such content include:

  • Wikimedia Commons
  • Flickr’s Creative Commons Search
  • Creative Commons Search

Using Copyrighted Material

Fair Use Guidelines

Fair Use allows limited use of copyrighted material for purposes like commentary, criticism, reporting, and teaching. Guidelines include:

  • Majority of content must be your own.
  • Properly credit the copyright holder.
  • Non-commercial use is generally safer.

Misusing Copyrighted Material

Even with good intentions, a copyright holder may disagree. Consequences may include blog shutdown or legal action. Remove contested content if requested.

Licensing Copyrighted Content

To use copyrighted material outside of Fair Use, obtain a license. Stock photo sites for licensed content include:

  • iStockphoto
  • Photos.com
  • Fotolia

Sharing Copyrighted Videos

Embedding videos from YouTube or Vimeo is common, but beware of copyright violations. Ensure the video creator is credited. Illegally shared videos may lead to removal.

Protecting Your Intellectual Property

Your content is also protected by copyright. Safeguard it by:

  • Using plagiarism search services (e.g., Copyscape).
  • Setting up Google Alerts for excerpts of your posts.
  • Adding watermarks to your images.

What to Do if Your Content Is Misused

Contact the blogger or site using your content, requesting removal or proper credit. If unsuccessful, consider filing a DMCA takedown request, following legal procedures outlined in the Digital Millennium Copyright Act. Remember, respecting copyright and licensing not only preserves the rights of content creators but also upholds the integrity of your blog. Happy and responsible blogging!

https://edu.gcfglobal.org/en/blogbasics/copyright-and-fair-use/1/#

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

Scrumming through the Semester

As we go towards the last “Sprint” of this semester I find it obligated to write about the Scrum methodology and how what at first appears as just “something” you deal with during a course, surprisingly turns out to be a methodology that can help you ace your academic endeavors.

Photo by cottonbro studio on Pexels.com

An explanation to my readers who are first reading about Scrum here:

Scrum is a framework used in the agile project management methodology, primarily in software development, to enhance collaboration, flexibility, and the speed of development. It provides a structured yet flexible way for teams to work together on complex projects. Key elements of Scrum include:

  1. Roles:
    • Product Owner: Represents the stakeholders and is responsible for defining the product backlog.
    • Scrum Master: Facilitates the Scrum process and removes impediments to the team’s progress.
    • Development Team: Cross-functional individuals responsible for delivering the product increment.
  2. Artifacts:
    • Product Backlog: A prioritized list of features, enhancements, and bug fixes that constitute the product.
    • Sprint Backlog: The subset of items from the product backlog that the team commits to completing during a sprint.
    • Increment: The sum of all completed backlog items at the end of a sprint, representing a potentially shippable product.
  3. Events:
    • Sprint: A time-boxed period (usually 2-4 weeks) during which a potentially shippable product increment is created.
    • Sprint Planning: A meeting at the beginning of each sprint where the team plans the work to be done.
    • Daily Scrum: A brief daily meeting where the team discusses progress, plans for the day, and identifies and removes obstacles.
    • Sprint Review: A meeting at the end of each sprint where the team demonstrates the completed work to stakeholders.
    • Sprint Retrospective: A meeting at the end of each sprint where the team reflects on its performance and identifies areas for improvement.1

Now that we got that out of the way let me show you how applying Scrum methodology as a student can help you manage your time, stay organized, and drastically enhance collaboration during those obligatory group projects.

My first step would be creating a “Student Backlog” which Identifies your academic goals, assignments, and projects. Break them down into smaller more manageable tasks and prioritize the tasks based on deadlines and importance.
Secondly, define your “Sprint length” by which I mean study periods. You can determine the duration of your “sprints” by a week or two depending on your own preferences and the nature of your tasks or assignments.
The Third point would be “Sprint Planning”. At the beginning of each sprint plan what tasks you will focus on considering your class schedule, deadlines, and other commitments. Remember to have realistic time estimates for each task.
The Fourth point is having a personal “Daily Scrum” in which you review your progress and plan for the day while identifying any challenges or roadblocks that you may face.
Scrum is all about enhancing collaboration in groups so if you have group projects, introduce scrum to your groupmates and try to implement Sprint Planning and Daily Scrums to keep everyone on the same page. I found that using tools that boost collaboration also works miracles during group projects. Tools like “Jira” or “Trello” can help you succeed during these said projects. Adaptability is a huge part of Scrum so try to be open to adjusting your plan as needed when unexpected events and new priorities arise.
The last and most important lesson that I’ve learned from scrum is to track continuous improvement. Try to get feedback from your professors, friends, mentors, and even from yourself to continually improve your studying and refine your methods based on what works best for you.

Photo by ThisIsEngineering on Pexels.com

With all that being said, I wish that everyone achieves their goals in one way or another, remember that for all of this to happen you first need to stay fit and healthy so don’t sacrifice your well-being in order to achieve “fast” results. Success takes time.

Ano out.

  1. Information from Scrum.org ↩︎

From the blog CS@Worcester – Anairdo's WSU Computer Science Blog by anairdoduri and used with permission of the author. All other rights reserved by the author.

The Evolution of Kanban: A dive into another methodology

having taken a look at Kanban (which was part of our homework task), a powerful framework for software development teams, has become a cornerstone for teams aiming to enhance efficiency and transparency in their workflow. Originating over 50 years ago from Toyota’s manufacturing processes, the methodology has seamlessly transitioned into the realm of software development. In this blog post, we’ll delve into the key principles of Kanban, its historical roots, and its application in modern agile practices.

from what information i was able to gather, Kanban is grounded in the just-in-time (JIT) manufacturing process that Toyota pioneered in the late 1940s. it draws inspiration from supermarkets stocking products based on consumer demand, to which Toyota aimed to align their factory inventory levels with actual material consumption. The implementation involved passing a visual signal, known as a “kanban,” between teams to communicate real-time capacity on the factory floor and with suppliers.

Fast forward to today, and agile software development teams have embraced these JIT principles to optimize work in progress (WIP) and match it with the team’s capacity. The heart of Kanban lies in visualizing work, limiting WIP, and ensuring real-time communication of capacity.

Central to the Kanban methodology is the Kanban board, a visual project management tool available in physical or digital form. This tool aids in visualizing work, limiting work-in-progress, and maximizing efficiency or flow. Whether physical or virtual, the Kanban board serves as the single source of truth for the team’s work, ensuring transparency and real-time communication of capacity.

Kanban offers a plethora of advantages for software developing teams, making it one of the most popular software development methodologies today. The flexibility in planning, shortened time cycles, fewer bottlenecks, and the use of visual metrics contribute to its widespread adoption. The ability to adjust priorities without disrupting the team, optimize cycle time, and limit WIP ensures that Kanban is not only effective but also adaptable to different team structures and objectives.

in terms of what stuck with me the most after reading the article, i’d say the historical connection to Toyota’s manufacturing processes highlighted the enduring nature of concepts like just-in-time manufacturing and efficient inventory management. Understanding how these principles seamlessly translated into the realm of software development underscored the universal applicability of Kanban aswell as the emphasis on visualization through Kanban boards and the use of cards for each work item struck me as a simple yet powerful way to enhance collaboration and transparency within a team. The flexibility in planning, especially the ability to reprioritize work without disrupting the ongoing tasks, stood out as a valuable feature. This aligns well with the dynamic nature of software development, where changes in priorities are not uncommon.

https://www.atlassian.com/agile/kanban

From the blog CS@Worcester – CSTips by Jamaal Gedeon and used with permission of the author. All other rights reserved by the author.

Navigating Success with Scrum: A Journey Through Agile Evolution

when it comes to the ever-evolving landscape of software development, i’d say it’s imperative to keep pace with methodologies that not In the ever-evolving landscape of software development, it’s imperative to keep pace with methodologies that not only foster innovation but also ensure efficiency and quality. Scrum, a natural evolution of Agile Management, emerges as a powerful ally in this quest. I wanted to try explore in this blog post some of the intricacies of Scrum, the roles it defines, its numerous benefits, and the heartbeat of the framework – Scrum ceremonies.only foster innovation but also ensure efficiency and quality. Scrum, a natural evolution of Agile Management, emerges as a powerful ally in this quest.

Our journey through Scrum begins with the understanding that it’s a flexible methodology firmly grounded in the 12 agile principles. It operates in time-bound blocks known as Sprints, where the emphasis is on delivering tangible results efficiently. A critical element is the Product Owner, who ensures alignment with the project’s goals and client priorities.

I wanted to choose this due to its holistic approach to Scrum, covering both its foundational concepts and its profound impact on software development and beyond. It’s particularly relevant to our course as it provides insights into harnessing technology for project management.

The article underscores Scrum’s suitability for modern demands – the need for quality, fast delivery at lower costs. Its ability to adapt to changing requirements is an invaluable asset. Scrum’s emphasis on the most important functionalities first ensures swift client access and timely risk management. The definition of roles, especially the Product Owner and Scrum Master, is pivotal to maintaining a balance between business priorities and agile development.

This resource served as a reminder of Scrum’s pivotal role in the software development ecosystem. It reinforced my belief in the importance of flexibility, adaptability, and efficiency in project management. The incorporation of Scrum’s ceremonies ensures that every aspect of the project is aligned with the overarching goal, promoting collaboration, transparency, and improvement. I see myself applying this knowledge in future projects, advocating for scrum methodologies to achieve better results.

As we conclude our exploration of Scrum, it’s evident that its application extends beyond software development, seeping into various organizational models. The benefits of scalability, expectation compliance, flexibility, and risk reduction make Scrum a cornerstone in project management methodologies. The Scrum ceremonies, with their structured yet flexible approach, not only foster collaboration and transparency but also ensure timely progress and continuous improvement.

https://www.nimblework.com/agile/scrum-methodology/

From the blog CS@Worcester – CSTips by Jamaal Gedeon and used with permission of the author. All other rights reserved by the author.

Embracing the Future of Coding with Gitpod

In the ever-evolving landscape of programming, developers often find themselves grappling with unforeseen challenges. Recently, I encountered one such obstacle during my computer science class, which eventually led me to explore a game-changing solution – Gitpod. This is the story of how Gitpod came to my rescue when Docker, a crucial part of an in-class activity, failed to run on my M1 Mac Pro, and my professor recommended Gitpod as a solution.

The Problem

As the class assignment required me to work with Docker containers for a web application, I was excited to get started. However, I hit a roadblock when I attempted to use Docker on my M1 Mac Pro. Due to compatibility issues with the M1 chip, I found myself unable to run Docker containers, leaving me perplexed and frustrated. My professor, understanding my predicament, suggested an alternative solution – Gitpod.

A Quest for a Solution

Eager to continue with my assignment and make the most out of the in-class activity, I immediately began researching Gitpod. This cloud-based development environment promised to provide a solution to my Docker woes while offering a host of other benefits. Without further ado, I dived into the world of Gitpod.

The Gitpod Experience

Upon signing up for Gitpod, I discovered the true power of cloud-based development environments. Gitpod provides an intuitive interface that closely resembles VSCode, making the transition remarkably smooth. It offers a wide range of programming languages and frameworks, ensuring that it can cater to almost any development needs. One of the most remarkable features of Gitpod is its ability to create a development environment based on a Git repository, making collaboration with peers more efficient.

Additionally, Gitpod’s integration with GitHub is seamless, as it allowed me to work directly with my project’s repository. This feature made it easy to commit and push code changes, ensuring that my work was well-organized and readily accessible.

The Benefits of Using Gitpod

  1. Compatibility: Gitpod works seamlessly on M1 Macs, resolving the compatibility issues that I faced with Docker.
  2. Accessibility: Gitpod is accessible from anywhere with an internet connection, which is a major advantage, especially for students and developers who are always on the move.
  3. Time Efficiency: Gitpod’s pre-configured environments saved me hours of troubleshooting and setup, enabling me to focus on coding and project development.
  4. Scalability: As my project expanded, Gitpod effortlessly scaled to accommodate my needs without compromising performance.
  5. Collaboration: The collaborative features of Gitpod made working with my classmates on group projects a breeze. We could effortlessly share and collaborate on code in real time.

Conclusion

In the end, the incompatibility of Docker with my M1 Mac Pro might have been a setback, but my encounter with Gitpod was nothing short of transformative. It provided a solution to my immediate problem and introduced me to a world of cloud-based development environments. Gitpod has become a valuable tool in my programming arsenal, and I encourage every developer to explore its capabilities.

References:

  1. Gitpod – The Dev Environment Built for the Cloud
  2. Visual Studio Code – Docker Extension
  3. GitHub – The World’s Leading Software Development Platform

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.

choosing the right software development mythology: Agile, or Waterfall?

whether you’re beginning a new project or complementing a change in your developmental approach, it can be difficult to choose whether Agile methodology can assist us to successfully develop our idea or Waterfall methodology. choosing the right approach is tremendously crucial to successfully developing the project. In this blog, we will analyze the specifics of Agile, and Waterfall methologies to help you make an informed decision that is tailored to your projects needs.

understanding Agile

Agile methodology is often praised for its customer-centric, and flexible approach to software development. In Agile, projects are divided into small increments with minimal planning, and teams work in short cycles, known as iterations or sprints. The methodology emphasizes collaboration, customer feedback, and the flexibility to adapt to changing requirements in which results in continuous delivery of functional software, close collaboration between cross-functional teams, stakeholders, and the customers.

understanding Waterfall

Unlike Agile, the Waterfall methodology follows a linear and step-by-step approach. the project is divided into distinct stages where each stage build’s upon the previous one. The development process flows steadily downwards similar to an actual waterfall, through stages like requirements, design, implementation, testing, deployment, and maintenance. Each stage must be completed before the next one begins, and changes are discouraged once a phase is underway.

So, how do you choose which methodology is the right fit for your project? The choice depends on several factors, such as project requirements, team expertise, and customer involvement in your development process. If the project requirements are clearly defined from the beginning, and changes won’t be necessary during the development process, then the Waterfall methodology could be the right choice for you. However, I personally believe that Agile methodology is usually the right choice for most projects. In today’s world of constant change, adaptability is crucial in any developmental process. Additionally, based on my experience in various customer-service jobs I have had, I’ve realized that customers often don’t know exactly what they want. Therefore, having the ability to adapt if the customer’s needs change slightly is incredibly important.

From the blog CS@Worcester – The Bits & Bytes Universe by skarkonan and used with permission of the author. All other rights reserved by the author.

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.