Author Archives: Ben Gelineau

REST API Understood

Throughout the year we have used REST API in class more and more. Through the microservices kit activities I found more interest in the use of REST API. I sought out more information on them to expand my knowledge through an article on REST APIs. The article I found is REST APIs: How They Work and What You Need to Know by Jamie Juviler

The article begins by explaining the importance of REST APIs. They are a widely used framework that allows applications to communicate over the web by following a set of design principles. The article explains it is used to enable data sharing and integrations between systems, allowing software to interact with external services, improving functionality and user experience. The article continues by explaining how they work. By allowing clients to make requests to a server for resources, the server then responds with the current state of the requested resource, usually in a standard format like JSON. The API can also allow clients to modify or add resources on the server. The article explains there are six key principles to know:

  1. Client-Server Separation: REST APIs separate the client and server, meaning that the client can interact with the server without needing to know how the server works internally.
  2. Uniform Interface: RESTful APIs require a standardized way of interacting, usually through these HTTP methods: GET: Retrieve data. POST: Create new data. DELETE: Delete data. PUT: Update existing data.
  3. Stateless: Each request to the server is independent and must contain all the information necessary for the server to fulfill the request.
  4. Layered System: In a REST API, there can be intermediary layers (e.g., security layers, load balancers, or caching layers) between the client and the server. These layers should not impact the client-server communication and should be transparent to the client.
  5. Cacheable: Responses from the server may be cacheable, meaning that the client can store the data locally and avoid repeated requests for the same resource.
  6. Code on Demand (Optional): This optional feature allows servers to send executable code (like JavaScript) to the client, enabling the client to execute this code locally.

The article then explains the benefits of REST APIs, which include flexibility, scalability, interoperability, simplicity, and cost-effectiveness. Juviler then explains how to set up REST APIs with an admin and the article concludes with some examples of the use of REST APIs. 

Rest API has become something very important in class and because of recent assignments I wanted to learn more. Through this blog I understand REST more thoroughly, and the reasons for using it. I understand its feasibility and use for microservices back-end architecture as seen in Thea’s Pantry.

Source:

https://blog.hubspot.com/website/what-is-rest-api

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Docker: Diving In

After understanding the team aspects of software development, I wanted to shift focus to the tools at a team’s disposal. In conjunction with version control software, development environments become among the most important tools at a tem’s disposal. In projects outside of class I am working closely with docker, and we briefly utilized it to prepare for CS-448 capstone. I wanted to spend more time learning about these development environments. To do so I found an article on the basics of understanding Docker. The article’s title is In-depth Docker by Walter Code

This blog post begins by outlining what it contains. The article expands on configuration management, Docker’s technical components, and Dockerfile commands. Walter explains that configuration management builds on Docker’s layered image management, which addresses issues with traditional “golden image” models that often lead to unmanageable images. Docker’s approach allows for faster iteration and better flexibility. The article continues to highlight some key technical components such as isolation of filesystems, processes, and networks, and resource management via cgroups. Docker is extremely flexible and can run on any x64 host with a modern Linux kernel, and is compatible with OS X and Windows via virtual machines. The post also introduces Docker’s user interfaces, such as Shipyard, Portainer, and Kitematic, which help with container management. Walter also touches on essential Dockerfile commands, like ADD, CMD, and RUN, which are covered to help users configure containers. The article wraps up by discussing Docker’s filesystem layers that allow changes to be applied to a writable layer while keeping underlying read-only layers intact. Additionally, Docker Compose enables users to manage multi-container application stacks, while Docker Swarm helps scale workloads across container clusters. The post finishes by highlighting Docker’s simplicity, security, and rapid deployment, making it a compelling tool for developers, with more practical examples to follow in future posts.

This article helped me better understand how Docker can be essential for teams. It also provided me with more knowledge to aid me in my personal projects that utilize docker. This is a key step for me in understanding how best to work with a team with these tools. What I found most helpful was an explanation of how Docker’s configuration management could be used, and why docker compose is so useful. Next in my blog I will cover more strategies or tools to help me better function in a team for software development. 

Source:https://waltercode.medium.com/in-depth-docker-faa0c4dd9a63

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

SOLID Principles Made Easy

As my year progressed I wanted to better understand the basic principles of software design and sought out the SOLID principles after hearing about them throughout college. I had not yet put the time into properly learning and practicing them and came across a blog putting the principles into text simply and with excellent examples. The article’s title is The SOLID Principles of Object-Oriented Programming Explained in Plain English By Yiğit Kemal Erinç

The article begins by identifying what the SOLID principles are and their importance. These principles are five key guidelines for object-oriented design that help developers create maintainable, flexible, and understandable code. These principles are provided in great detail, with several coding examples and potential drawbacks or dangerous pitfalls. They are the:

  1. Single Responsibility Principle (SRP): A class should have one responsibility and one reason to change. By adhering to the SRP, you minimize complexity, avoid conflicting changes, and simplify version control and collaboration.
  2. Open-Closed Principle (OCP): Classes should be open for extension but closed for modification. This means new functionality can be added without altering existing code. This is often done by using interfaces or abstract classes. 
  3. Liskov Substitution Principle (LSP): Subtypes must be substitutable for their base types without altering the correctness of the program. 
  4. Interface Segregation Principle (ISP): Clients should not be forced to depend on interfaces they don’t use. This principle advocates for creating small, specific interfaces rather than large, general-purpose ones. It ensures that classes only implement methods relevant to their functionality, and there is less bloat and redundancy in the code.
  5. Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules, but both should depend on abstractions. This means This promotes flexibility and low coupling, making systems easier to extend and modify.

The key takeaway presented in the conclusion is that by following SOLID principles, developers can write cleaner, more testable, and scalable code.

The SOLID principles are essential and key learning blocks for building efficient code. This is a topic that has been addressed in class as design smells and patterns. By learning this through the lens of SOLID I was able to reconcile the importance of that topic in building good code. Through the CS-343 course, I was looking to understand those design patterns better, and by understanding them as SOLID principles I am able to better grasp them. I will be prepared to answer questions regarding SOLID principles in context thanks to this article in combination with the class material.

Source:https://www.freecodecamp.org/news/solid-principles-explained-in-plain-english/

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Transparency and Autonomy: Better Together

In continuing my research on team management strategies, I delved deeper and more specifically into the Software Development side of team management. In doing so I discovered the scrum.org blog, which has many different articles based on understanding Scrum. Two of the most important principles in Scrum are transparency and autonomy, and I wished to delve deeper into understanding how to achieve those in a team setting. The article I found explained how those two play into each other greatly. The article’s title is Transparency and Autonomy: Two Sides of the Same Coin by Sanjay Saini

The article begins by explaining agile’s fast-paced style of producing working code. How autonomy and independence can be essential for fast results. The article explains that in Agile, teams seek this autonomy to make decisions and deliver value without excessive oversight. Transparency can become essential for fostering this autonomy. The article explains that by making work visible, tracking progress, and openly addressing challenges, more autonomy and trust can be given. The article highlights five key points to help allow for this trust and efficiency:

  1. Visibility Creates Trust: By sharing progress and challenges during Scrum events like Daily Scrums and Sprint Reviews, it shows that the team is accountable and can be trusted to be autonomous.
  2. Transparency in Challenges Leads to Solutions: Being open about struggles encourages collaboration and problem-solving, proving the team can manage setbacks and seek out help when they need it independently.
  3. Data-Driven Transparency Builds Confidence: Using metrics like velocity and burndown charts shows consistent results, building leadership confidence in the team’s capability.
  4. Transparency Causes Better Decision-Making: When a team has full visibility into goals, priorities, and feedback, they can make informed decisions independently. Information needs to be freely shared for autonomy to occur, and good decisions.
  5. Open Communication Builds Long-Term Autonomy: Regular, open communication about decision-making processes helps cultivate trust and secure more autonomy over time, as the team can continue to build trust through constant demonstration of these values.

The article concludes by saying that, transparency creates a culture of trust and accountability, enabling Scrum teams to earn the autonomy needed to make decisions and drive value.

This article helped me understand the importance of these values to a Scrum team’s operation. This is a key step in understanding Scrum’s importance in the operation of a team, as things such as transparency can make a smoother work environment for everyone by providing autonomy. Next in my blog, I will look into articles relating to development environments such as Docker or GitPod and their importance for maintaining a productive team.

Source:

https://www.scrum.org/resources/blog/transparency-and-autonomy-two-sides-same-coin

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Team Management Strategies

Throughout the beginning half of my Fall 2024 semester, I’ve learned about development processes such as environments, strategies, and team policies. As the year has progressed I wanted to know more about the development process of software before beginning my blogs. After tackling AGILE and Scrum I have been interested in seeing other ways of team management, and potential connections back to AGILE. To begin in understanding these processes I first found an article designed around general team management. This article is found on desktime.com, and it is not focused particularly on computer science, but on managing a team. The article’s title is A guide to team management: Strategies and techniques to help you succeed by Viesturs Abelis

This post outlines key strategies for effective team management to boost productivity and morale. It first emphasizes the importance of creating a supportive team culture, where employees feel valued and heard, mentioning Google’s Project Aristotle which found that psychological safety and feeling heard are crucial for team success. The article states that managers should engage actively with their team, foster inclusivity, and lead confidently. It is stressed that managers must be considered part of the team. The article also mentions the need for a clear vision and direction, including both long-term goals like a mission statement and short-term objectives like Key Performance Indicators and Objectives and Key Results. It highlights that employees are more motivated when they connect personally to the organization’s values. The use of productivity software is also recommended to improve team management. Tools for time tracking, performance evaluation, and project tracking provide valuable data, helping managers optimize team performance and streamline workflow. The article continues to reaffirm that team management combines fostering a positive culture, setting a clear direction, and using the right tools to enhance productivity and success.

This was a good article to step into team and development-based blogs, as it is a very broad and applicable subject matter. This is a key step in constructing a blog based on understanding development environments and processes. Without having a baseline understanding of team management, tactics like AGILE can be confusing to grasp. I wish to refine my knowledge in this area and prepare for working in and managing teams going forward into classes like CS-448. Next in my blog I will look into articles relating to development environments, such as Docker or GitPod, or look into articles based around AGILE and Scrum principles.

Source:https://desktime.com/blog/team-management

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Consistent Hashing Algorithm

After spending some time exploring algorithms and blogs, I came across a post on a consistent hashing algorithm. I have had an interest in hashing and have found growing use for hashing algorithms as my classes and programming complexity progresses. This article is found on highscalability.com, and it is focused on providing a tutorial to understand how to use a consistent hashing algorithm for partitioning and load-balancing. The article’s title is Consistent Hashing Algorithm by NK

The blog identifies consistent hashing as an algorithm used to distribute data across multiple nodes in a distributed system, minimizing data movement when nodes are added or removed. It works by placing both nodes and data keys on a virtual hash ring. A virtual hash ring is a technique where each node is assigned a position on the ring based on the hash value of its identifier. The blog explains further that data keys are also hashed to determine their position on the rin as well. When a key needs to be stored or retrieved, the system traverses the ring in a clockwise direction until it finds the first node that is closest to the key’s hash position. This method ensures that only a small portion of the data needs to be redistributed when nodes are added or removed, making the system more easily scalable. The blog identifies these strategies and techniques to be best used in web development to handle caches. Through several figures, NK identifies as a way to improve load balancing and avoid hotspots, consistent hashing can use virtual versions of these nodes, where each physical node is mapped to multiple positions on the ring virtually. This technique can be essential for scaling distributed systems, like caching systems and distributed databases, that need to handle dynamic loads while maintaining high availability.

This is a topic that interested me greatly as I have–in conversations with friends in Computer Science–been consistently recommended to learn more about hashing. Through the CS-343 course, I have been looking for more ideas for algorithms and techniques to learn to improve my understanding as my senior year progresses. I will be prepared to answer questions regarding consistent hashing thanks to this article. This is of great value to me as I will continue to look for more on this topic, as I explore software development. While I did not cover every example or style found in the article, I found it all extremely interesting and comprehensive. This blog has many examples and well-made figures to explain things in a simple manner, and I will continue to use highscalability to learn more.

Source:https://highscalability.com/consistent-hashing-algorithm/

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Introductory Post CS-348

This is my blog for CS-348 Ben Gelineau

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Introductory Post CS-343

This is my CS 343 Blog

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

The Deadly Sins of Mobile Testing

To round out my semester, before beginning my summer research opportunity, I looked into extraneous material for my classes as I finish up. In looking for a blog for the final week of finals, I went with something more akin to basic general information regarding testing. I selected an article based around the common mistakes or sins in mobile testing. This connected with my most recent final project for another class regarding mobile development. I struggled to test my project for this class, and I am sure I committed many of these sins. The article’s title is Five Sins of Mobile Testing by Josh Galde

This article is quite dated, and Galde begins with describing the demand for mobile devices, which has since skyrocketed. Companies at the time aimed to expand their web presence to mobile platforms, but often overlooked the constraints, leading to rushed development and potential errors. This is something I experienced in my own project, having trouble with the visual aspect of app development. The necessity to develop multiple versions of the same app to accommodate different devices and configurations. Is something of an issue outlined by Galde, and one I experienced when switching between different size devices. This is similar to a non-responsive website in web development. Glade explains that to create successful, user-friendly, and reliable mobile apps, we should follow the best practices and avoid common mistakes, or “sins,”. The first sin is relying solely on emulation software, as problematic because emulators can’t fully replicate real device behavior, especially with carrier networks.This is something I experienced through only emulator testing. The second sin is using jail broken devices, which can alter their functionality, leading to inaccurate testing results. The third sin is not utilizing automation. Automated testing can save time and reduce errors by efficiently handling the repetitive testing process across multiple devices and platforms, which might be tedious to do individually. The fourth sin is ignoring the need to support internal apps. This can be a dangerous error for applications developed for businesses, as it ignores the possibility of employees or members utilizing their own devices for organization apps. And one of the most egregious, and fifth sin is skipping testing on real devices. This is a common but risky practice, rushing app development without thorough testing. This can lead to catastrophic failures in the app. Proper testing is critical to ensure app reliability and success.

At the end of the semester, reflecting on my learning is paramount to actually achieve a change in how I think. My final project presentation just ended a week ago, and already I reflect on mistakes and poor practices to improve going forward. These sins are many I have committed and will now avoid going forward to improve as a programmer.

Source:https://www.stickyminds.com/article/five-sins-mobile-testing

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.

Automated Python Testing

Going into my future projects, especially those for my summer fellowship, I have taken a distinct interest in Python. Throughout this course I have learned a great deal of how to test for object oriented compiler languages, using Java as our learning tool. I have wondered how testing might differ across different languages. And with a large project in Python coming up, I’d like to prioritize doing this the right way. I would like to practice in python testing to prepare. Luckily, recently posted last week, there was an article on the home page of Stickyminds surrounding python testing. The article’s title is Ensuring Reliable Cloud Applications: A Guide to Testing State Machines with Python by Konstantin Sakhchinskiy

Testing state machines in cloud applications involves heavy use of APIs. Python scripting is effective to help to ensure reliability, performance, and resilience. This is one way that an efficient library-heavy scripting language like Python would be useful for cloud applications. It is very effective at being implemented for many applications now utilizing the language itself, if only as an effective testing language. In the case of a cloud app for example, managing external browser profiles for automation and web scraping, users interact via API to execute their needed functions. Python can be used to expedite this process, as a way to manage state machines necessary to operate this cloud app. General approaches to testing on these state machines include separating output generation from state transition logic, focusing on individual states and transitions, testing each possible state transition, exploring boundary conditions, testing resilience to invalid input or disruptions, and checking system interaction within the broader context. The article also mentions some key tactics for mastering state machine testing, including testing for race conditions, assessing external disruptions and network challenges, handling heavy loads, and understanding technical details such as hidden states. Python scripting can automate testing processes. Using asyncio and httpx, scripts can simulate user interactions with the cloud service, testing responsiveness. Tailoring tests to specific needs and monitoring system performance using tools like Grafana and Kibana are essentia, and made more efficient with Python’s wide variety of usable systems. Overall, testing state machines is crucial for ensuring application reliability, and Python scripting offers effective ways to automate and simulate real-world scenarios for comprehensive testing.

My view on testing applications was expanded greatly by this article. The prevalence of automated testing libraries throughout other languages to enforce scripting was a surprise to me. And this article has helped me to understand the real role of specific and intentional testing of software. I was also surprised to find that state machines were very important to understanding how to test and break down code, as this is something I learned a lot about in the fall. I am not working with external applications or languages outside of Python for this project, so I will not utilize these libraries to automate my testing, but going forward this knowledge is imperative.

Source:

https://www.stickyminds.com/article/ensuring-reliable-cloud-applications-guide-testing-state-machines-python

From the blog CS@Worcester – WSU CS Blog: Ben Gelineau by Ben Gelineau and used with permission of the author. All other rights reserved by the author.