Category Archives: CS-343

Software product development common mistakes to avoid

Software developers play a critical role in creating to deploying an application, the amount of works and effort that they have to put in is tremendous. Therefore, mistakes are inevitable. According to Hackernoon, a well-known blog for developers, there are seven pitfalls that developers should limit during the development and the solutions.

Planning fallacy (Time creep)
Time is essential while creating a product. Developers want to ship their applications on time and also not taking too much time to develop. The managers want them to meet the deadline without hitting any barriers. The best way to prevent time-consuming as the deadline loomed is to have the best time management. By doing so, we avoid running out of time at the end of the developing cycle and deploy the product on time.

Insufficient budget

Budgets, like time creep, can easily be overloaded if they are not kept in check. Time itself will exceed the cost since time is money. However, We don’t talk enough about this issue and it’s hard to find a good approach to solve the problem. Hence, limiting the time of development and the delays would eventually lead to narrow the cost of production.

Conflicting Communication

Since the pandemic started, we all feel like human interacting and communication have gotten less appreciated. We spent countless hours on video call conferences, did not have face-to-face interactions, and made the connection between us felt apart. As developers, we spend the entire day on laptops, and previously we already get so little human communication unless when we discuss the problem with our team. Pandemic widened that gap between developers and led to miscommunication between each team member. Working remotely makes it harder to express our ideas and thoughts to our team members. As the perception is not demonstrating enough, this might lead to communication breakdown and ultimately causes conflict among team members.

Security

Security has always been a big deal in this industry and especially to developers. Security vulnerability always exists. It’s part of software developer life. Software is among one of the most important things when it comes to secure user’s data. Billions of users have been affected by massive data breaches each year, showing that even big companies can sometimes make mistakes in developing the product. All we can do to minimize the risk of data breaches is to ensure the credibility of that software. By testing as often as developers could, they help cut back that possibility.

Many of the things in this blog is what I think is consequential to developers. More topics need to be covered, but personally, time, money, and security are needed to deserve more attention than the rest while developing a product in the Computer Science industry or in any other industry.

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

cs@worcester – Dream to Reality 2021-09-26 23:53:59

What are UML Class Diagrams

Foremost, UML diagrams

UML stands for Unified Modeling Language and was invented by Grady Booch, Ivar Jacobson, and James Rumbaugh in 1995 while working at Rational Software. We create UML diagrams to help us comprehend the system more clearly and simply. A single diagram does not represent all aspects of the system. UML defines various kinds of diagrams to cover most of the aspects of a system. UML diagram has two categories of diagrams, Structural Diagrams and Behavioral Diagram. Inside Structural Diagrams, there is Class diagram, Object diagram, Component diagram, and Deployment diagram.

UML class diagrams

Class diagrams are the most common diagrams used in UML. Classes, interfaces, relationships, and collaboration are all represented in class diagrams. The features and activities of a class, as well as the system’s restrictions, are depicted in a class diagram. Class diagrams are often used in the design of object-oriented systems since they are the only UML diagrams that can be directly mapped with object-oriented languages.

What is Class?

A Class is an object’s blueprint. Objects and classes are inextricably linked. We can’t discuss one without discussing the other. And, because we utilize classes to generate objects, the entire objective of Object-Oriented Design is not about objects, but about classes. As a result, while a class describes what an object will be, it is not the object itself. Classes, on the other hand, specify the types of things, whereas objects are useable instances of classes. Each Object was constructed using the same blueprints and so has the same components (properties and methods). An object is a member of a class and has states and behaviors, according to the standard definition.

Examples

An example can be such as there is a base class as an animal dog and we create an instance like Bobby, which is a dog. A dog has properties such as color, eye color, height, weight. And the method example for a dog can be such as a dog can jump, can sit, can eat. And for the object which is Bobby, Bobby has property value. Bobby is a yellow color, he has brown color eye; he is 17 inches tall, and he weights 24 pounds. For the methods Bobby can jump, he can sit, can eat as well.

Why UML class diagrams?

I chose this topic because UML diagrams have always made it easier for me to understand the topic/code. It helps me figure out which classes are inherited from which, which classes are abstract, and so on. For example, a class may override a method, but with the UML diagram/markdown preview, I can easily tell where the original method was created and why I have override that method. Also, since our 1st assignment is about markdown preview and UML diagrams, why not. So far, these two websites have helped me gain a better understanding of UML diagrams. https://www.tutorialspoint.com/uml/uml_standard_diagrams.htm https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/

From the blog cs@worcester – Dream to Reality by tamusandesh99 and used with permission of the author. All other rights reserved by the author.

But what really is API?

API, absolutely not the IPA’s beers (unless there really is the API beer) that Petr Gazarov, a software developer with more than 3600 followers on medium, mentioned in his blog, is an acronym of Application Programming Interface. Hmm, you might have heard about it but what it really is?

When we type the URL, for example, facebook.com, we send the request to Facebook’s remote server, which is a remotely located computer, and that computer, which is a server, processes the request through an API to display the webpage. From that instance, Gazarov defined that “An API isn’t the same as the remote server–rather it is the part of the server that receives, requires and sends responses.”

One example is the Object–Oriented Design, code is organized into objects, which will later be used to interact with one another. From my own experience, the first time I was aware of using the API was in the Data Structure class, the Oracle API provides specifications for the JVM Platform, Standard Edition, and the instructions on how to use those methods are documented. I was working with Stack in Java and I want to look at the object at the top of this stack without removing it, I will use peek() instead of pop() as instructed from the API documentation to request relevant operations. The Stack is the object designed by Oracle and the peek() function is a public method in that object, and a set of public methods and properties is an API. Web Server API is similar, the idea is to receive requests and responses.

The difference is the format of the request and response, in my case, it was simply just a function with a small operation, in other cases, different APIs provide flexible responses with tons of uses. One thing I learned from his blog is that to render the whole web page, the browser expects a response in HTML containing presentational code, Google Calendar’s API call would return the JSON formatted data.

Another experience that I’ve got when I was working with my friend in a web project is creating the backend of this project, which is developing the GET, POST, PUT, DELETE functions to respond to his request for his frontend application. The role of this API is to return the data, formatted in JSON, which is stored in Firebase database to the person working in the frontend in order to design the graphical user interface.

In short, Gazarov concluded” any piece of software that can be distinctly separated from its environment, can be an “A” in API, and will probably also have some sort of API”. Since this blog consolidates my understanding about API, I hope you will also find it useful.

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

SOLID

Solid principles are divided into five different parts of programming and a design that addresses objects. Robert Cecil Martin or also known as “Uncle Bob”, was the one who introduced this type of anchoring or principle also called SOLID. This is one of the principles, where each letter represents a method which is represented by three letters, and which basically has a principle. When we work with software, which has a poorly managed management mode, we are dealing with a code that can become rigid, a fragile mode, and this makes this software difficult to use. When the code is rigid we are dealing with a code that is difficult to modify, it is difficult to change the way it currently works, or even more difficult to add any other features.

·  Single Responsibility Principle (SRP)

·  Open-Closed Principle (OCP)

·  Liskov Substitution Principle (LSP)

·  Interface Segregation Principle (ISP)

·  Dependency Inversion Principle (DIP)

Single Responsibility Prinnciple

The Principle of Sole Responsibility (SRP) at its core for a class not to change, there should be no more than one reason. And this results in every different class having to work with one method. However, each member in the class is related has a direct connection to what is called the primary function of the class. Unlike the example where a class has multiple responsibilities within it, in this method the possibility that it needs to be changed increases even more. And from all of this, we have an increased risk of presenting flaws whenever a class starts to modify. But by focusing only on one responsibility, this risk is even more limited.

Open-Closed Principle (OCP)

The Open / Closed Principle (OCP) means that classes for extension should generally be open, but for modification they should be closed. “Open for extension” aims to open the creation of our classrooms in order to add new functionality, while new requirements are generated. “Closed for modification” means not modifying a class after we have developed it, as it should never be modified, except to correct defects. These two parts of the principle seem to be contradictory to each other. However, if we structure our classes and their dependencies well, we can add functionality without having to reduce the existing source code.

Liskov Substitution Principle (LSP)

The Liskov Substitution Principle (LSP) can be formed in a variety of ways. LSP is applicable to inheritance hierarchies. He emphasizes that we need to create as many of our classes as possible, so that client dependencies are replaced with subclasses without the client being aware of this change. For this reason, all subclasses are based on functioning in the same way as the basic classes they have. Subclasses do not have to apply only the methods and properties that the class bases have so that they are the true type of behavior. But they must also be consistent with her behavior. And this requires compliance with some basic rules.

Interface Segregation Principle (ISP)

There are some classes that have public interfaces and that are not cohesive. The principle of interface sharing (ISP) explains that clients are not tasked with dependent on interfaces that are not usable by them.

– The first rule is the existence of contradictions between the parameters of the methods that the base class has and that of the compliance in the subclasses.

– The other rule is for preconditions and unconditional. The other LSP considers invariant.

-The other rule is to limit history.

– The last rule of LSP states that a subclass should not throw exceptions that are not thrown from the other base class.

Dependency Inversion Principle (DIP)

(DIP) indicates that high-level modules should not be dependent on low-level modules. Both should be dependent on abstraction. These abstractions should not depend on the details, but these should depend on the abstractions. The idea is that high and low-level modules have, categorizes classes hierarchically. High-level classes or modules are those that deal with much larger groups of their functionality.

References

https://www.jrebel.com/blog/solid-principles-in-java

https://www.geeksforgeeks.org/solid-principle-in-programming-understand-with-real-life-examples/

https://www.educative.io/edpresso/what-are-the-solid-principles-in-java

From the blog CS@worcester – Xhulja's Blogs by xmurati and used with permission of the author. All other rights reserved by the author.

What is Backend Development?

Backend development is the server side of a website. This is everything that the users of the webpage do not see. Backend is mainly focused on databases, APIs, and Servers. In order to help the website, communicate the data being used, programmers who are backend develops write code in order to store data from the webpage into databases. The code written can be read, updated and deleted from the database.

An example of this is when you create an account on amazon. When you click ‘Create Account’ is takes all the information you just submitted, processes that data and stores it into a database. Amazon now have the details you shared into their database. However, you didn’t see it happen because it happened behind the scenes. This is what happens in the backend of the webpage. This is just the beginning of the backend.

Since we mentioned backend developers, lets go into depth on what they do. Backend developers are responsible for building the structure of a software application. Unlike frontend developers who mostly uses only three tools such as HTML, CSS, and JavaScript. Backend developers uses various tools such server-side languages, databases, and servers. Some server-side languages could be Java, Ruby, NodeJS, and .NET. These languages are what most backend developers use to create codes that help the backend of the website work. Databases and servers that are used could be MYSQL, Oracle and SQL server. Databases and servers are where the data from the websites get stored, such as addresses, emails, and any other kind of useful information for the customer or what the website may have. To become a decent backend developer, the skills you must have knowledge of programming languages, and how to use databases, servers, and APIs.

The reason why I chose to write about backend development is because I have an interest in it. I eventually want to become a full stack developer and that means I will have to know both front end and back development. As technology gets more advance, there will be more need for individuals who process such skills. Not only that but I plan take my skills further and someday develop my own websites and other useful applications.

A blog I found that I would recommend is: https://www.interviewbit.com/blog/backend-developer-skills/. This website contains a lot of useful information on backend development for those who are interested in where they should start and understand what it takes on becoming a backend developer.

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

Docker and It’s Components

I chose this article because it explains in detail the components of docker and how they each are applied in different phases of software development. I believe this will help unfamiliar students learn more about the components of docker beyond that of a general understanding. Given that we are already using docker in this course, I imagine we will be using it for future projects as well. A deeper understanding of this platform would be highly beneficial.

The docker service is made up of several components. A container is like a stripped-down virtual machine where programs can be run in isolation. A Docker image is what defines what will make up a container and contains the directions for how and what will run. For example, a MySQL Docker image would contain the instructions for running an instance of MySQL server and exposing the necessary ports. What runs the docker image is called the Docker Engine and is responsible for virtualizing the container on the host machine. The last major component is docker-compose, which allows one to configure storage, network, and interaction between Docker image containers. The purpose of docker is to allow pre-configured containers to run exactly the same wherever docker is installed. Because all containers are identical to the image they are created on, multiple containers can be run to quickly scale to meet performance demands.

I have used docker in the past on multiple occasions, the last being for my database design final project building a full-stack web application. To see how docker is used in a full-stack application, you can review the source code here gitlab.com/mjared94/todo-app inside the server directory. In the app, we used docker to streamline team development and simplify the backend services in use. The application required a database and a way to manage the database during development. Rather than installing the software individually on each of our computers, we used docker to quickly launch the services identically on each machine. This can be done using docker-compose, which allows you to outline how you want your containers to interact with each other as mentioned above.

Our web server was run directly from the terminal relying on the docker services. In production, we could have also containerized our web server to run in conjunction with the other containers. Doing so would have enabled anyone with docker to run our todo application, along with the required backend services, without any prior configuration. Containerizing our application would also make deployment seamless because our pre-configured container could be launched on virtually any web host. After reading this article and understanding the docker components in more detail, I will be better able to use them in the future. 


Blog resource link: https://www.infoworld.com/article/3204171/what-is-docker-the-spark-for-the-container-revolution.html

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

From Umass Lowell to Unified Modeling Language: A History of My Experience With the Term “UML”

Believe it or not, I have been coding since the year 2015. As the title implies, the first university that I attended (right out of high school) was the University of Massachusetts – Lowell. Interestingly enough, within my very first textbook at UML, I would be exposed to another kind of “UML” – Unified Modeling Language. At this time, Unified Modeling Language was little more than a reference at the back of the book; there was more written on the subject, but my mind was concentrating on concepts such as how to “calloc()” in C.

Fast forward 5 years, and now Unified Modeling Language takes on a larger role; it is being used for visual representations of classes and inheritance in Java code. This can be seen with the following YouTube video, “How To Make Easy UML Sequence Diagrams and Flow Charts with PlantUML” by user “Be A Better Dev”. Essentially, the video shows how Java code can be written and then turned into a UML chart for a visual representation of classes and their features.

Personally, I selected this particular video due to the fact that I enjoy using YouTube more than any other social media; this way, I can use the app for educational purposes as well as recreational ones. This nine minute video is a great way to learn about how to code for UML in a format that is digestible on a busy schedule (when at work, for example). In addition, I expect the material to be applicable to aspects of the course (such as homework and exams) due to it being another form of practice. Practice, practice and yet more practice is the most important way to retain any type of coding/programming knowledge, and UML is no different.

It’s crazy to think that something barely glossed over from my educational journey five years ago would be so prevalent in the present day. However, it makes sense; programming practices such as using an arrow (->) operator or parentheses for a method are given new meanings when working with UML. Extending this further, programming syntax can create additional effects within the PlantUML environment. For example, placing an arrow on one side or another of an entity will effect exactly where it extends from on said entity.

As a final note, I am glad that I am able to work with this newfound technology. Ever since my days at UML, I have been wondering about when my code would leave the IDE environment and tackle more “lively” features (such as a graphical interface). Thanks to Unified Modeling Language, I now have a method of making my code come to life.

Article Link: https://www.youtube.com/watch?v=xObBUVDMbQs

From the blog CS@Worcester – mpekim.code by Mike Morley (mpekim) and used with permission of the author. All other rights reserved by the author.

Docker Explained.

This week in class we’ve gone over UML Diagrams and the importance of being able to translate back and forth between writing code from the diagram and making a diagram based on the code. The professor told us to download Visual Studio and Docker, which I’m assuming will be used for the entirety of the semester. I didn’t have a single clue as to what Docker was or why it may have been needed. After a brief explanation prof told me to do a little bit of reading myself and so I did. I’m by no means not a Docker expert but the picture has become a bit clearer.

Docker is a container based application that allows you to run services independent of each other. Containers tend to be pretty compact and only carry the information neccesary for a service to work. Docker containers are created through docker images. An image is basically just a template that tells the system how to make the container. An image can consist of many layers, of which each layer is just a previous working version of the image. It’s important to note that an image is read-only. The purpose of the image is to load the container. The top most layer (when the container is created) is what the user works with, whether it’s making changes to the container itself or using the tools that come with the container. When reading about how this technology works the thought of how something like this could be secure kept on swimming through my mind but as each layer of the image is created it becomes a completely new and immutable image. I’m still not entirely sure how this works and will have to spend more time trying to understand, but for now I’ll just take it for what its worth.

Where Docker really becomes a useful tools is in its portablilty and reusabilty. For example, the use of a virtual machine to run certain programs or applications isn’t frowned upon, but it does tend to be costly in terms of using space and memory. A 500MB application could take heaps of memory to run because the guest OS and libraries would need to run before being able to use a desired application. If you wanted to run multiple instances of that application you would need to run multiple VMs. That’s where Docker delivers and gives the user what they need in terms of reusability.

Now Docker containers are not a one stop shop when it comes to solving issues. If a user is trying to use multiple servers and tries to adminstrate them only using Docker containers, they will find themselves in a pinch due to the stripped down capabilties of a container. A container only holds enough information for what actions are necessary to ensure task completion in terms of portabilty. In a scenario like this you would probably want to stick with using a VM to get the full use of the OS and all it’s resources to maintain multiple servers.

Here’s two videos that brought me up to speed on just what type of software Docker is and why it is extremely useful in just over 15 minutes. The explanations are given in a low level manner that allows people like me who couldn’t even begin to understand the concept grasp it better. I hope you enjoy the content, I did!

Containers vs VMs https://www.youtube.com/watch?v=cjXI-yxqGTI
Containerization Explained https://www.youtube.com/watch?v=0qotVMX-J5s

From the blog CS@Worcester – You have reached the upper bound by cloudtech360 and used with permission of the author. All other rights reserved by the author.

Self-Directed Professional Development Post #2

The article I’ve decided to read for this blog entry is titled, “Getting Started – An overview of Markdown, how it works, and what you can do with it.” The reason I picked this article is because it is connected to our first homework assignment. Our first homework assignment has us working with UML class diagrams and when I clicked on the web IDE on GitLab, I was brought to a file that was written in Markdown language where I would have to add my Java code and create PlantUML class diagrams. I’m not too familiar with Markdown language and since I would be interacting with it for my first homework assignment, I figured I’d do some research to learn more about it. 

The article I read starts out by defining Markdown language, “Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.” The article then goes into explaining why people use Markdown. I’ve learned that Markdown can be used for essentially anything: from websites, documents, notes, books, presentations, email messages, to technical documentation. I also learned that Markdown is platform independent and that the content that is created on it doesn’t get locked into a proprietary file format like Microsoft Word. 

Next, the article discusses how Markdown works. This process can be generalized into four steps:

  1. Create a Markdown file.

  2. Open the file in an Markdown application.

  3. Use the Markdown application to convert the file to an HTML document.

  4. Render the HTML document to a web browser (or another document).

During this part of the article, we also learn more about Dillinger, a Markdown editor that combines these steps. It was useful for me to learn the name of this editor because if I were to ever use Markdown for myself, I now know a common and popular editor to do so.

Lastly, the article’s main ending point is that there are many different “flavors of Markdown” and that using Markdown with one editor may provide a very different experience than using Markdown with a different editor. Many of the basic syntax may be the same but there are extended syntax elements that likely differ.

One of the biggest takeaways for me is that after I finished reading this article, I looked into other kinds of markup languages and learned how they are different from programming languages and scripting languages. Unlike programming and scripting languages, markup languages are presentation languages that do not do logical operations. It’s safe to say that, now that I’ve learned about Markdown, I feel more confident moving forward with my homework assignment (even if what I learned was going to be only a minor piece of my overall assignment).

Article: https://www.markdownguide.org/getting-started/

From the blog Sensinci's Blog by Sensinci's Blog and used with permission of the author. All other rights reserved by the author.

Understanding UML Diagram Relationships

Recently in my Software Construction, Design and Architecture class, we have been getting into UML class diagrams. The class diagrams provide an understandable system structure and the relationships among the objects. Each relationship has a distinct visual representation based on arrows:

In this case, we started using Visual Studio Code and PlantUML to model class diagrams. I referred to the UML documentation that was provided to get a better understanding of how to display each type of arrow in PlantUML.

As shown above, there are three kinds of relationships that can be represented in PlantUML: Extension, Composition, and Aggregation. I am not totally familiar with the use of composition and aggregation as we’ve only been focusing on models that use extends and implements in class. I wanted to get a better understanding on how to read UML class diagrams and to be able to tell the relationships between the objects on the diagram.

With PlantUML and Markdown preview in Visual Studio Code, you can see changes to the UML diagram in real time as you modify the code. What you write in the code will reflect what shows on the diagram. You can also manually draw the relationship, which provides more customization such as arrow length, direction, etc. In addition to solid lines, you can use dotted lines to represent dependencies.

Extends is represented on a UML diagram as a solid line with an empty arrow. By writing that Class A extends Class B, you will see the diagram update show a line with an empty arrow point from Class A to Class B. Instead, you can also write Class A <|– Class B in order to display it on the diagram. When viewing the diagram alone, you can assume that Class A has access to all attributes and operations available in Class B.

Implements is represented on a UML diagram as a variation of the extension arrow, with a dotted line instead. By writing that Class A implements Interface, the diagram will be updated to show a dotted line with an empty arrow pointing from Class A to Interface. To draw an inheritance arrow on the diagram, you can write Class A <|.. Interface. When taking a look at the diagram, you can assume that Class A has access to the operations of Interface and contains the code for them.

I found the PlantUML documentation very useful as it contains basically everything you need to know about using PlantUML to create class diagrams. I also really enjoyed the functionality to modify the example diagrams to experiment with the features that you just read up on. Overall, I think that UML class diagrams are a good way to visualize a class structure. The arrows are easy to follow and help in understanding the relationship between classes.

From the blog CS@Worcester – Null Pointer by vrotimmy and used with permission of the author. All other rights reserved by the author.