Week 7

In this blog, we are going to learn about Scrum development framework and why its important. Scrum is a lightweight framework that helps people, teams and organizations generate value through adaptive solutions for complex problems. The Scrum team consists of one scrum master, one product owner and developers and there are no sub-teams or hierarchies. The good thing about a scum team is that it is cross-functional meaning all the members have all the skills necessary to create value each sprint. Usually, the scrum team has 10 or fewer people and this helps teams communicate better and be more productive. The scrum team is responsible for all product related activities from stakeholder collaboration, verification, maintenance and more.

The blog I chose talks about the getting started as a scrum master and some of the steps to getting started. Some of the steps in the blog to getting started are getting to know your new team and this is important to understand who’s in the team and building healthy relationships. It is also important to understand your new team’s purpose and goals because sometimes action is confused with progress and it’s crucial to know what’s driving them. Mapping out the stakeholders is important because as a scrum master, you’re responsible for ensuring the team can run as efficiently as they can. When you’ve identified a tricky stakeholder, you can work with them to ensure they interface with the product owner rather than the team. Another important aspect as a scrum master is asking your team if the Agile framework like scrum is working for them. This is to make sure the team is aligned on different things like sprint planning. Looking after yourself and development as a scrum master is one of the most important steps when starting with a new team. This is because the role of a scrum master requires you to think differently a lot of the time which can be tiring therefore you need other people to get advice from or to bounce your ideas off.

I think this blog post gives an insight of the role of a scrum master in more detail. It explains some important aspects involved with being a scrum master and what the role looks like. The scrum team consists of other members like developers who keep the database working and product owner who is responsible for commuting the product goal and what it should do. This goes to show that this isn’t a one man’s job, and several people are required for completion of a successful task.

References.

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

Golden Rules for APIs

This week I have decided to view a source regarding APIs since that has been our focus in class recently. I had come across an article written by Jordan Ambra, an experienced software engineer from Pennsylvania, describing a few “rules” to keep in mind to create the best API possible and better maintain its health in the long run.

Jordan starts with his first point being proper documentation, he states “ask [a developer] to follow a tutorial or build something really basic in about 15 minutes. If they can’t have a basic integration with your API in 15 minutes, you have more work to do.” It’s important to have proper documentation because without such, having an expansive and robust API is great but what isn’t great is if the implementation of said API is very limited caused by developer confusion due to the lack of documentation.

The next point Jordan describes is the importance of API stability and consistency. This is key in having APIs last in the long run. Jordan uses Facebook as an example to show that while an API’s health won’t make or break a company, most people don’t have the capital or userbase Facebook does so recreating an API is going to be more costly for one person. Keeping track of version numbers by incorporating a change log is a great way to document changes so users know how and why to upgrade.

Another practice is to maintain API flexibility, if an API is or over time becomes too rigid it can cause integration to be difficult. Not all platforms are consistent, Jordan states, “It’s good to have at least some degree of flexibility or tolerance with regard to your input and output constraints.” So by keeping the API flexible, it’ll allow for the widest implementation without a large margin of error.

A very important aspect of APIs to prioritize is security. With malicious actors always looking for new weaknesses and ways to hijack or manipulate things for their gain, it is more important than ever to implement security safeguards to act as a preventive measure to prevent people with the wrong intentions from harming others.

Finally, the last thing Jordan brings up is the importance of an API’s ease of adoption. If things are overly complex or not universal enough it can turn people away from wanting to interact with your API. If you’re not able to efficiently use your API then how is anyone else going to be able to?

After reading this article, I hope to now be better equipped to create healthier and longer-lasting API(s) among a majority of APIs that are not easy to use which can be due to one, a combination, or all of the factors above. Focusing and prioritizing the rules set by Jordan will help in the future to improve my work.

Article Link: https://www.toptal.com/api-developers/5-golden-rules-for-designing-a-great-web-api

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.

Anti-Patterns

So what even is an anti-pattern? Well, anti-patterns are solutions to ineffective problems that eventually cause more problems than they solve them. They are often used because they seem to work very well but the long-term consequences are not usually thought of. Anti-patterns are just like a regular pattern but instead of a solution, they give a superficial solution but really isn’t one at all. Programming anti-patterns are known for common mistakes, they can lead to problems like maintainability. The spaghetti code is a good example of anti-pattern, it’s a code with no structure. There are random files scattered into random directories, the whole thing is difficult to follow and is tangled together. This usually happens when someone isn’t carefully thinking out their program and how smoothly it should be running before actually coding. It makes it basically impossible to add any new functionality, no matter how many changes you try to make and try to understand those changes you will still end up with countless issues with your code. Another example of anti-patterns is the boat anchor. The boat anchor happens when someone leaves a piece of code in the codebase because they believe that they will need it later but doing this actually can keep your project from moving forward, can cause your coding time to slow down, and mess up your codebase.

Avoid anti-patterns with better system management. You can avoid anti-patterns in your code by being more consistent with your system. By reviewing your code, looking through and making sure you have no typos and grammatical errors. These code reviews help improve the quality of your code and make it easier to find better solutions for any common problems your’re having. Always have someone else take a look at your code in case you did miss something that you didn’t see it’s always helpful to have a set of fresh eyes look at your code so it can help you tighten up your code. The process of engaging in code refactoring can also help make adjustments that will strengthen your code’s structure and framework without impacting the user experience. Refactoring is very helpful in simplifying your code construction.  It will make it easier for someone to take a look at your code and understand how you put the code together and be able to add any new functionality to the code as well. Making the code a visual can help give you as well as others a better understanding of the information presented to them. It can help you show the workflows, and analyze and brainstorm for any new improvements.

https://www.lucidchart.com/blog/what-are-software-anti-patterns

https://www.baeldung.com/cs/anti-patterns

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

Navigating Software Pitfalls: Understanding Anti-Patterns

In the intricate world of software development, as developers strive to create elegant and efficient solutions, they encounter not only best practices but also pitfalls to avoid. These pitfalls, often referred to as anti-patterns, are common design and coding practices that may initially seem like solutions but ultimately lead to more problems than they solve. Understanding and recognizing these anti-patterns is a crucial part of becoming a seasoned software developer.

At its core, an anti-pattern is a recurring design or coding practice that appears to be helpful but is counterproductive in the long run. It’s like a mirage in the desert – promising relief but ultimately leaving you more parched. Anti-patterns often arise from misapplications of well-intentioned ideas or a lack of experience in software development.

One common anti-pattern is known as “Spaghetti Code,” where the codebase becomes entangled and challenging to maintain. While quick fixes and shortcuts may seem like a solution, they often lead to a tangled mess that hampers productivity.

Another notorious anti-pattern is “Cargo Cult Programming,” where developers mimic code without understanding its purpose. This blind imitation can lead to code that lacks context and may introduce errors.

By studying anti-patterns, developers can proactively identify and avoid these pitfalls. It’s akin to recognizing warning signs on the road and taking detours to smoother coding practices. In the ever-evolving landscape of software development, understanding what not to do is as important as knowing what to do. Recognizing anti-patterns empowers developers to make informed decisions and craft robust and maintainable software solutions.

References:

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.

What it Means to be Agile

If you search online for Agile methodology blogs, you will find a lot of them mentioning what it means to be Agile by referencing the 4 main values and 12 principles from the Agile Manifesto. (https://www.agilealliance.org/agile101/the-agile-manifesto/).  While these core values and principles define what it means to be Agile, I was looking for more of a general definition. In my quest to discover what it means to be Agile in today’s software development world, I have come across a blog that, in my opinion, does a great job in explaining that. “What is Agile methodology? (+ how you’re already using it)” (https://www.lucidchart.com/blog/what-is-agile-methodology) starts off by giving a great, simple, explanation of Agile methodology: “Agile methodology breaks the developmental process into iterative steps and encourages flexibility, testing, and change throughout the life cycle of a project.”.  The simplicity of this definition really drives home how intuitively flexible this methodology is and how so many different frameworks are able to adopt Agile methods.

The blog has a great analogy for Agile methods being like a detailed to-do-list. Prioritizing must-have features to add to a project is the first step in being Agile. Step two involves estimating the time required for each feature and adjusting priorities as needed. Lastly, step 3, involves setting up a schedule for a sprint.

Sprints are typically two week periods where the team has prioritized features they are working on. The goal of each sprint is to have a working product that has been tested by the end. Having a working product at the end of each sprint allows the stakeholders to have input on the current development and the future plans. Further emphasizing the need for flexibility as a project can shift focus at any point in development. 

There are so many Agile frameworks already designed, such as Scrum, Kanban, and XP, just to name a few. With so many to choose from, where do you start? The beauty behind the flexibility of Agile methodologies is that no framework is rigid either. This means each team can adapt processes that work for them. 

As I will be working in Scrum teams, I hope to develop skills to maintain an agile environment for me and my team. Staying flexible to change while following the values and principles of the Agile manifesto will help me develop skills needed to work in a professional environment.

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

rest apis

REST stands for Representational State Transfer. This means that when a client requests a resource using a REST API, the server transfers back the current state of the resource in a standardized representation.

From the blog CS@Worcester – Andres Ovalles by ergonutt and used with permission of the author. All other rights reserved by the author.

Comparing REST and SOAP API

APIs are what allow different applications to communicate with one another, making the intricate web we have access to today possible. Because the present world basically runs on the web, it is important to understand how the API system operates.

REST and SOAP API are the two main standardized types of APIs, and while the two work towards the same goal, that is, application-to-application communication, they operate differently.

Simple Object Access Protocol or SOAP API was developed by Microsoft in the late 90s. It was designed to be highly extensible so that future created functionalities could be added depending on the task for the API would be used.

Because of this extensible design, SOAP needed to be highly standardized, which is both an advantage and disadvantage. On one side, services written using SOAP API are very easy to error handle. SOAP is able to implement a built-in error handling system that even gives code suggestions for automated solutions, making it especially useful for users who do not own the web service.

However, on the other hand, while SOAP is compatible with any programming language, it was designed to rely solely on XML for messaging services. Though much of the process of writing the XML file can be automated or at least heavily simplified by the IDE using the Web Services Description Language (WSDL), this tool can only be used by NET languages (such as C# or F#). Other languages like JavaScript have to write each XML structure separately for each task, something programmers would rather not do.

Because of the more complicated nature of SOAP API, programmers later developed a simpler API system called REST.

Representational State Transfer or REST API operates using URL instead of XML to make requests. These requests are made through four basic methods: PUT, POST, GET, DELETE.

REST API is simpler than SOAP because it has the ability to use smaller messaging formats. It is also easier and often cheaper to use as it does not require the expensive tools to interact with web services that SOAP often utilizes. REST is also often faster than SOAP because it does not require extensive processing and can utilize the cache system.

Overall, the general consensus is that both systems are good at what they do and have their advantages and disadvantages. Programmers select which API to used based on multiple factors such as the language used, the environment, and requirements for the system or project.

In terms of my personal experience with APIs, I partook in an internship last summer which involved using Slack API and Python bolt — which are based on JSON-RPC — to send commands from a Slack channel to a raspberry pi. It was a simple program, but it helped me learn more about how APIs work and their important role in facilitating application-to-application communication.

For the future, I hope to look more into XML files/structures and familiarize myself with HTTP to learn more about using other APIs like REST or SOAP.

Source: https://blog.postman.com/rest-api-examples/

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.

law of demeter

During the course of this course (Software Construction, Design, and Architecture), there have been design concepts that are very easy to grasp at first glance, and those that take much more time to digest. I was surprised to see that the Law of Demeter, or Principle of Least Knowledge, is a fairly intuitive rule, but feels almost too restrictive in nature.

Essentially, the Law of Demeter is the concept that methods in an object should not communicate with any element that isn’t ‘adjacent’ to it. According to a blog post by JavaDevGuy (and thinking of a Java application to the rule), the elements that are allowed by the law are the object itself (this), objects in the argument of the method, instance variables of the object, objects created by the method, global variables, and methods that the method calls.

This is most easily explained by a negative example. For example, if a class Car has a method with a Dashboard object as an argument, it can technically call something like dashboard.getVersion(). But if a class Garage method has a Car argument, the method should not call something like car.getDashboard().getVersion(). Maybe this is a silly example, but this applies to more practical code as well.

JavaDevGuy goes further to say that most Getter methods violate this law. This interpretation seems restrictive, as it makes it much more difficult to just get work done (of course, I’m not the most experienced in the design aspect of software engineering so I could be wrong). It seems more practical to use the law to get rid of chaining in your code, as it causes needless complexity. Chaining methods together, regardless of how necessary it is, always ends up looking kind of ugly. I do feel like it is a necessary evil sometimes though.

As it stands, I can understand that this sort of practice can minimize that amount of complexity and reduce code repetition, but it does feel like sometimes you sort of need to put things together in this way to get the desired output. The aforementioned blog post seems to explain when code is violating the law, but unless my eyes and brain are too tired to read properly, the author doesn’t really give any good replacement options for the code. The few alternatives given don’t seem very desirable. This is typically the problem with negative rules, it imposes a restriction without a solution, and so you have to scramble to figure out how to work it.

Perhaps I’ll understand better when we cover this material in class.

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

CS343 – Week 7

SOLID is an acronym that stands for the 5 different principles that help write high-quality, maintainable, and scalable code. These include Single Responsibility Principle (SRP), Open-Closed Principle (OCP), Liskov Substitution Principle (LSP), Interface Segregation Principle (ISP) and Dependency Inversion Principle (DIP). Each provide their own benefits and work in tandem together when designing a program.

SRP states that a class should only have one responsibility, meaning only one reason to change. This helps prevent a class from having too many responsibilities that can affect each other when one is changed. Following SRP ensures that the code will be easier to comprehend and prone to fewer errors. However, it is harder than it sounds to fulfill this principle. The quickest solution to adding a new method or functionality would be to add it to existing code, but this could lead to trouble down the road when trying to maintain the code.

OCP states that software classes, modules, functions, etc. should be open for extension but closed for modification. This is essential because it allows entities to be extended without modification so that developers can add new functionality without risking the chance of breaking the code. Adding an additional level of abstraction with the use of interfaces help design the program to provide loose coupling.

LSP states that any instance of a derived class should be substitutable for an instance of its base class without affecting the program in a harmful way. The importance of this principle revolves around the ability to ensure the behavior of the program remains consistent and predictable. Unfortunately, there is no easy way to enforce this principle, so the user must add their own test cases for the objects of each subclass to ensure that the code does not significantly change the functionality.

ISP focuses on designing interfaces that are specific to a user’s needs. Instead of creating a large interface that covers all methods, it is more beneficial to split up the methods across smaller, more focused interfaces that are less coupled. For example, having too many methods in an interface can sometimes cause issues in the code, so separating the methods into individual interfaces that can be implemented by a certain class.

DIP states that high-level modules should not depend on lower-level modules but should depend on abstractions. This approach aims to reduce coupling between modules, increase modularity, and make the code easier to maintain, test, and extend. An important thing to note is that both high-level and low-level modules depend on abstractions. Dependency Inversion utilizes the SOLID principles which in turn leads to a more refined and maintainable code.

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

Copyright and licenses in Software creation.

In today’s technology-driven world, software development has become a cornerstone of innovation. Whether you’re a professional software engineer or just a hobbyist coder, understanding the legal aspects of software creation is crucial. This blog post explores copyright and licenses in the realm of software development, shedding light on how they affect developers and users alike.

  1. Copyright in Software

Copyright law plays a pivotal role in protecting the intellectual property of software creators. When you write code, you automatically gain copyright protection over it. This means that no one else can copy, distribute, or modify your code without your permission.

Key points about copyright in software:

  • Copyright protection is automatic: As soon as you create code, it’s protected under copyright law, without any need for registration.
  • Exclusive rights: Copyright grants you exclusive rights to control how your software is used, reproduced, distributed, and modified.
  • Duration: Copyright protection typically lasts for the lifetime of the author plus 70 years, or for a set period in the case of works created by corporations.
  1. Open Source and Licensing

While copyright protects software by default, developers often choose to use open-source licenses to specify how others can use their code. Open-source software is critical to the tech industry, fostering collaboration and innovation by allowing others to use, modify, and distribute the code.

Key points about open-source licensing:

  • Types of licenses: There are various open-source licenses, including the MIT License, GNU General Public License (GPL), Apache License, and more. Each has its own terms and conditions.
  • Permissive vs. copyleft licenses: Some licenses are permissive, allowing for wide usage, while others, like the GPL, enforce certain restrictions to ensure derivative works remain open source.
  • Attribution: Many open-source licenses require users to give credit to the original author when they use the code.
  1. Proprietary Software Licenses

Not all software is open source. Proprietary software is protected by strict licenses that limit how it can be used, modified, and distributed. These licenses may restrict users from viewing or modifying the source code.

Key points about proprietary software licenses:

  • Closed source: Proprietary software is typically closed source, meaning the source code is not freely available for inspection or modification.
  • End-user agreements: Users must agree to terms and conditions specified in end-user license agreements (EULAs) before using the software.
  • Restrictive vs. permissive licenses: Proprietary software licenses can vary widely in terms of the restrictions they impose on users.
  1. Dual Licensing

Some software developers choose to offer their software under both open-source and proprietary licenses. This approach allows them to provide a free, open-source version while also offering a commercial version with additional features and support.

Key points about dual licensing:

  • Monetization: Dual licensing provides a way for developers to generate revenue from their open-source projects.
  • Flexibility: Users can choose the license that best suits their needs, depending on whether they want a free, open-source version or a commercial one with extra features.
  1. Compliance and Enforcement

Both open-source and proprietary software licenses come with rules and conditions that must be followed. Non-compliance can lead to legal action and damages.

Key points about compliance and enforcement:

  • Legal consequences: Violating a software license can result in lawsuits, injunctions, and monetary damages.
  • Compliance tools: There are tools and services available to help developers and organizations track and ensure license compliance.

Conclusion

Understanding copyright and licenses in software creation is essential for developers and users. Whether you’re contributing to open source, building proprietary software, or using software created by others, awareness of these legal aspects is vital for fostering collaboration and innovation while respecting intellectual property rights. Always be sure to read and adhere to the terms and conditions specified in software licenses to avoid legal complications and contribute positively to the software development ecosystem.

From the blog cs@worcester – A Journey through CS by mgl1990 and used with permission of the author. All other rights reserved by the author.