Author Archives: alidanordquist

Writing Good Documentation

Sources: Ángel Cereijo and GeeksForGeeks

Writing documentation for your project can be tedious and boring. Say you just finished your project, you published it, and you’re excited to see people use it… but they don’t know how. You need documentation to explain your project. 

Software documentation is the writing that goes along with your project, ranging from what your program does, how you plan to build the program, or any notes you may have for your team. There are four types of documentation: requirement, architectural, technical, and end-user. Requirement documentation explains the requirements for the program and how it should perform. Architectural documentation explains how the program should be structured and how processes should work with each other. Technical documentation explains the technical parts of the program, like the API and algorithms. End-user documentation explains how the software works for the user. 

Good documentation should be created throughout the development process. Saving it all until the end will burn you out and set you back. To prevent this, progress the documentation as you build the project. Split your project into smaller pieces, like how it is done in an Agile setting, and improve the documentation as new features are developed. 

Documentation should explain the purpose of the project as well. It should set up a problem that your program solves and why it is useful to solve the problem. Communicate with your team on how the problem is going to be solved and a plan to get there. Then, split the project up into tasks and assign them to the team members. Explain in detail any information needed for each task. Having the research and plan in writing makes it so anyone can complete the task at any time. As tasks are completed, update the documentation to the project before calling it completed. 

Having explanatory documentation also ensures that tests can be written easily, even without the actual code that is being tested. Then, as you write the code for that task, the tests are already completed and you can move on. 

As your team progresses through the project, your initial plan and process will probably change. With new resources and findings, the initial documentation needs to be updated as well. 

Once your project is published, your documentation is there to help the users easily use your program. It needs to be written in simple language for any reader and avoid ambiguity/unneeded repetition. 

Writing documentation is necessary for every project, helping to communicate with your development team and to serve as a guide to the users. It is important to write good documentation and keep in mind how other people will use it. Having the basics down of writing good documentation will help me in the future and give me a step up as a new software developer. 

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

7 Essential Design Patterns

Design patterns are important for developers to use in their code. They make your programs easy to read and implement and they are able to be adapted to many situations. There are 3 kinds of design patterns: creational, structural, and behavioral. 

Creational patterns are used for creating objects. They give flexibility to change the creation process and allow for many types of objects to be created using the same method. The singleton pattern is used when there should only be one instance of an object. Instead of creating a new object every time you need to call it, you call a method that will call an instance of the object. The builder pattern is used when an object has a lot of optional parameters that make it difficult to know what is being applied when it is created. Using a builder pattern creates an empty or default object and then calls set methods to add each parameter you want to use. The factory pattern is for when there are a lot of objects of a certain type, but with different forms. Instead of creating many new objects, you call a factory to create the objects with the specifications hidden in the factory code. 

Structural patterns are used for how objects relate to each other. These patterns allow for high level code to be readable and simple, while keeping the intricacies hidden below the surface. The facade pattern is used when there are many operations and calculations behind the scenes of a process and those are all hidden with encapsulation. On a high level, one method will, for example, purchase a product, but deeper, there is a payment being processed, shipping calculations, inventory checks, etc. The adapter pattern is for when a program needs to be adapted to fit your code. It can be used for implementing public libraries where their units do not match what your program expects, and each time you use the public library, it calls the adapter to modify the output. 

Behavioral patterns are used for how objects interact with each other. The strategy pattern is used when you have multiple ways of doing a process. Instead of using a lot of if else statements, you can define several strategies and set each object to have a strategy. The observer pattern is used for objects that watch for something. It works by “subscribing” to receive a notification of an event. If a program is watching for errors, it would be automatically notified of any errors so it can add it to a log. 

In class, we went over the strategy, factory, and singleton patterns for the Duck example. These 7 patterns are common practice in the software development field and it’s important to know how to implement them. I watched a video explaining these patterns and now I have a deeper understanding of the three we learned and the four that were new to me. I feel confident I can expand on these in a professional setting.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

Licensing Your Projects

Sources: Codecademy, TLDR Legal, and Choose A License

Choosing a License

All projects should have a license, but choosing a license for your project can seem daunting. By breaking it down into simple goals you want to achieve, the process can be much easier! 

First, choose how you want your users to interact with your project. Do you want to preserve your original code in future versions or do you want users to be free in how they modify it? There are two main kinds of licenses to choose from, permissive and copyleft. 

Permissive licenses do not restrict the user from modifying the code or using it how they like. Some popular examples are the MIT license and Apache license. Both of these licenses state the user can modify, distribute, and sublicense the code how they want, and do not require future versions to use the same license. 

Copyleft licenses preserve the original code and protect the creators and users. Some examples of a copyleft license are General Public license (GPL) and Lesser General Public license (LGPL). Both of these licenses allow the users to modify and distribute the code how they like, but require the same license to be used on all future versions and require user protections like install instructions and a change log. 

One license is not better than another, all that matters is that your project has a license and it’s what is best for you. If you are still unsure of which one to choose, try looking at the licenses of similar projects or projects from people like you. 

Why Do You Need a License

Licenses state the rights of you as a creator and of all the people that interact with your code. Without a license, users do not know where you stand on using, modifying, and sharing your work. Attaching a license allows you to have peace of mind your code is being used how you want it to and allows people using your code to have it clearly laid out what they can and cannot do with your work. 

Choosing a License For Your Code’s Documentation

Now that you have a project with a license, you need to apply a license to your documentation as well. Most of the time, it will use the same license you chose for the code by default, but in the case you do not want it to, you can choose any license that you feel applies.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

REST API Parameters and Filters

This past week in class, we were working on a homework assignment on REST APIs. In the first part of the homework, we had to create new endpoints for the inventory path. The part I struggled with was writing the query parameters. I was pretty confused and felt like I was going in headfirst to something I didn’t understand. I found a site that explains the API’s parameter syntax to help. 

For path parameters, the name of the parameter is the same as the one in the path.

For query parameters, the name is not in the path and can be anything. 

The body of the parameter is the exact same. It needs a name, a declaration of if it’s a path or query parameter, if it’s required, a description, and the format of the input. 

After reading through the site, I realized I was over-complicating it, and all I had to do was use the same format as the already created parameter bodies and alter it to what I needed. 

————————————————————————

The next part of the homework assignment was to use GET methods to filter for results. I did not end up completing this part of the assignment, but I was still curious on how it worked. I found a site that explains all the ways you can filter for results, like having an attribute be equal, less than, or greater than a value. 

To filter for an attribute with a specific value, use this line: 

GET /path-name?attribute=value 

You can link filters with an &:

GET /path-name-1?attribute-1=value-1&attribute-2=value-2

Less than, less than or equal to, greater than, and greater than or equal to is achieved by the shorthand lt, lte, gt, and gte, respectively. Greater than would be shown like this:

GET /path-name?attribute_gt=number-value

The homework asks us to filter for guest age in the right path, using equal to, less than, less than or equal to, greater than, and greater than or equal to. To solve this, I would use the GET method with the guests path and the appropriate ending, like:

GET /guests?age=40
GET /guests?age_gt=40

————————————————————————

Understanding the format and syntax of REST APIs will be very useful for the Software Development Capstone next semester. I understand parameters, how to create schemas, how to reference the schemas and error codes, which are all extremely useful for future projects and in a job setting. As we continue to learn how to use REST APIs and expand our knowledge, I feel comfortable adding REST API design and implementation into my skillset.

From the blog CS@Worcester – ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

Working in Agile and Scrum Teams

Source: Hapticmedia and The Scrum Guide

Agile is a methodology that allows for iterative development that is constantly being improved upon for the best product and efficiency. Those who use Agile follow the manifesto, consisting of 4 values and 12 principles of best practices. 

The values are: 

  1. Individuals and Interactions Over Processes and Tools
  2. Working Software Over Comprehensive Documentation
  3. Customer Collaboration Over Contract Negotiation
  4. Responding to Change Over Following a Plan

The first value relates to prioritizing how the team is working as a whole rather than following a strict set of protocols that may hinder productivity. The second value focuses on getting a working product to show the customer over spending too much time on documentation that does not progress the project. The third value involves the customer in the development process, allowing for constant feedback and a product the customer will love. The fourth value is similar to the first, reacting to changes the team needs to make to be more efficient and create a working product is more important than sticking to a plan created in the beginning. 

A type of the Agile methodology is called Scrum. Scrum breaks down a project into small “sprints” where the team works on a small increment of the whole project. In each team there are the Developers, a Product Owner, and a Scrum Master. The Product Owner acts as the communicator between the developers and the customer and maintains a priority list of what needs to be done. The Scrum Master oversees the developers and ensures they are being as effective as they can be. During each sprint, there are 4 main components, the planning meeting, the daily scrum, the sprint review, and the sprint retrospective. The planning meeting happens at the beginning of the sprint and is where the team decides what they will accomplish this sprint. The daily scrum is a daily meeting where everyone decides what they will do that day and what they will do better from the day before. The sprint review is a meeting with the customers/stakeholders where everything that was accomplished is presented. The sprint retrospective is a meeting between the scrum team where they discuss what went well overall and what needs to change for the next sprint. 

Agile is a very effective methodology for software development. Over 85% of developers use it and it improves delivery time and team morale. It also allows for all team members to be on the same level where everyone is important and always making valuable progress. I hope to be in a team that uses Agile because it is the most effective compared to other methods of software development, like Waterfall. I am looking forward to experiencing the Scrum process first-hand in the Software Development Capstone next semester and I have high hopes of what it will do for my long term career.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

Application Programming Interfaces

Source: altexsoft

Application Programming Interfaces, or APIs, are the communicating code between a client and server, kind of like a user interface for the computer. They are what receives information from the user interface, sends it to the server to get a result, and sends that result back to the user interface. APIs can be private, partnered, or public. Private is where the API is only available for an organization to use. Partnered is where the API is available to a group of organizations that are in partnership with each other share it. Public is where the API is available to everyone. In our setting, the Thea’s Pantry API is public, mainly used by food pantry volunteers, but the code is openly available on GitLab. 

There are also different types/formats of APIs, like Remote Procedure Call (RPC), Service Object Access Protocol (SOAP), and Representational State Transfer (REST). RPC is when the client requests data from the server and the server sends it. SOAP is a protocol that exchanges data in a decentralized environment, it uses XML messaging between the client and server through HTTP or SMTP. SOAP is known for its high security of data. REST is a protocol where resources are given a URL that can be used to request the data using HTTP methods. REST is simpler and more versatile than SOAP because it requires less complex code writing and uses many formats beyond XML. 

In class and in the homework assignments, we focused on REST API with JSON messaging. We practiced sending requests for GET, POST, PUT, PATCH, and DELETE and some of their different responses like success, entry error, and server error. We also learned how to write our own requests for creating guests, changing a guest’s information, retrieving a guest’s information, and deleting a guest from the system. Some methods, like POST, require arguments as well. To post a new guest, the request needs to have the new UUID and all the information their user will have, like if they are a resident and if they receive financial assistance. To receive a list of users that fit a certain criteria, the GET request needs to have a specific tag in the URL to specify the endpoint. 

Learning APIs will be extremely helpful for the future. In software development, APIs are everywhere. While REST is the most common, it is still useful to know the other kinds as well, like SOAP, and how to use them. Everyone uses APIs: Google, Amazon, Microsoft, Netflix, and many, many more. Getting first hand experience using and building APIs allows me to expand my skillset for real-life applications.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

UML Diagrams With PlantUML

Week 5

This week I chose to expand my knowledge on UML class diagrams in PlantUML. I referred to the PlantUML website where they go over every command that is available to use and how they work. I wanted to read up on class diagrams to prepare myself for creating them in the homework assignment on UML diagrams and for refreshing my knowledge on UML. 

The website goes through all the types of elements you can create, relationships between them, putting labels on relations, defining visibility, adding methods and variables, and how to add notes. 

-The UML block is contained in “@startuml” and “@enduml”. In the dev container we used in class it is contained in ““`plantuml" and ““`”.
-To create a class, use “class <name> {<body>}”. If you want to make an abstract class or interface, you would do “abstract <name> {<body>}” or “interface <name> {<body>}”. 
-To define visibility modifiers for attributes and properties, use + for public, – for private, # for protected, and ~ for package private. By default, the diagram will show these symbols in colors and shapes, but that can be changed if wanted. A static attribute is defined with
“{static}” before the name.
-The site shows a lot of ways to create notes and all the things you can do to change them, like location, size, color, line breaks, etc, which can be useful to categorize notes in your diagram. 
-You can also change the colors of classes and elements, which can help to organize as well.
-Another element you utilize is arrows, when a class is defined, you can say “implements <class>” or “extends <class>” and it will automatically use the correct arrow. But, you can create your own arrows for associations by using “–>”, “-[bold]->”, “-[dashed->”, “-[hidden]->, or “-[plain]->” with the class names on either side. Notes can be attached to arrows as well. For example: Order “many” –> “1” Customer

I referenced the site a lot while doing the UML homework for a refresher. While working on the base assignment, I was cross referencing a lot to make sure I was doing it correctly, but when I got to the advanced assignment, I felt a lot more confident and comfortable with creating UML diagrams in VSCode and only needed to reference it for creating static variables. 

UML diagrams are essential for smooth code developing and finding any structural issues before you’re too deep in a project. Having the knowledge and practice to create them will definitely help me outside of this class. Using PlantUML is now something I feel like I can say I can do in real life. In the future, if we make more diagrams in class or if in a job they ask me to make one, I feel comfortable telling them I can make one.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

Understanding GitHub

Quarter One Blog

The video I watched is a basic tutorial for GitHub. Corbin, the creator, explains that GitHub is essential for version control and organization, and how important it is when your code becomes more complex. He starts off by explaining what a repository is and how to make one in GitHub. Then, he shows one of his repositories for a project with a working program. He says if he wants to start making changes and adding to the code, he would create a branch to prevent the code from breaking and save a lot of time if he needed to backtrack and fix it. He shows how to make a branch, as well. He provides the basics for what we went over in class and in GitKit chapters and explains how to do it in a slightly different way than what was said in class. I chose this video because I find it useful when I have multiple ways to explain a topic and I can understand it better.

The process for creating a repository is not something that we went in depth on in class, so having Corbin explain how to go through that process was helpful. He touches on what the difference between public and private repositories are. In class and in FOSS applications, they would all be public repositories, but if you were just using GitHub to put your private code in the cloud and for your own version control, a private repository would be more useful.

Corbin provides a visual and explanation for what branches and forks do, but it is not as clear as what was shown in class. Having the different explanations of both is helpful for a deeper understanding. He goes over having a completed branch, how to merge it back to main, and explains what the version control deletions and additions look like. 

Outside of the Software Process Management class, understanding GitHub is super useful in the real world. Other classes, like the Software Development Capstone, will require the understanding of GitHub to complete the final project. A lot of companies use Git for version control and collaboration, and look for those skills on applicants’ resumes. I feel confident and comfortable that I can navigate and use GitHub in my life going forward. 

Last year, I took Software Testing before understanding Git. While I was able to figure it out and get through the class, having the knowledge I do now with the actual process and reasonings of it, I feel like I would’ve spent less time troubleshooting silly issues.

From the blog CS@Worcester – ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

CS348 Introduction

Hello! This will be my blog page for CS-348 Software Process Management.

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.

CS343 Introduction

Hello! This will be my blog page for Software Construction, Design, and Architecture!

From the blog ALIDA NORDQUIST by alidanordquist and used with permission of the author. All other rights reserved by the author.