Concurrency

For this weeks blog post i have found a website on concurrency. Concurrency is the ability of different parts or units of a program, algoritham, or problem to be executed out of order, without affecting the final outcome. A good example of concurrency can be seen on the website. For this particluar example they used the analogy of traffic. According to https://sceweb.uhcl.edu/ , the owner of the website, they say, “Parallel traffic streams on different roadways having little interaction cause few problems. Parallel streams in adjacent lanes require some coordination for safe interaction, but a much more severe type of interaction occurs at an intersection, where careful coordination is required.” (https://sceweb.uhcl.edu/). As you can see from the example the traffic patterens on two different roadways can happen simultaneously without having any issue towards their final goal, however in an intersection of the two is when issues start to arise. This is a great concept to keep in mind while coding because it nice that you can have multiple things running simultaneously but when you start to intersect the commands to run these programs is when you will start experiencing issues.

https://baptiste-wicht.com/posts/2010/05/java-concurrency-part-1-threads.html

From the blog CS@worcester – Michale Friedrich by mikefriedrich1 and used with permission of the author. All other rights reserved by the author.

Object-Oriented Programming(OOP)

This week’s blog focuses on the aspects of object-oriented programming. Understanding OOP well is essential for any developer who wants to build a high-quality software program.

In object-oriented programming, the program will be divided into many different small, manageable, reusable programs.

Each of them has its own identity, data, logic, and how it’s going to fit with the rest of the others. Usually, we may think about objects, we think about the real-world application. Something we should be able to see, touch, and feel. Then Object-Orientation was intended to be closer to the real world.

As mentioned above something is visible to all of you, like the buildings, Vehicles, Foods. Something that you can’t touch but will be able to feel or not like the time, temperature, events.

Well in programming each object has its attributes, and behavior. Objects are separate from one another as we expect them to behave. They are independent have their history and their own identity.

What are attributes in Objects?

As I said, Objects are independent due to their nature, they have their properties. For example, in the case of a vehicle, its model, color, year, and more. Their roles are to describe the current state of an object because each state is independent of the other. A vehicle might make by Toyota that’s red and another maybe blue.

How do they behave?

Behavior is certain action that the Object can perform. For example, in the case of a vehicle, it will be able to speed, stop, or horn. It’s important to remember that each has independent of the other.  To talk about Objects, Classes become inherently related.

What is a class, and how does it fit into our program?

Well, a class is a place where you can identify the behaviors and properties of an Object. The properties and behavior of an Object will be defined inside a class.

Abstraction, Encapsulation, Inheritance, and Polymorphism play a big part in object-oriented programming. This means that the focus starts on the common properties and behaviors of some Objects and left out the less important things. Separate the program into small pieces. Instead of creating different classes, we can instead create one generic class that has the common, and essential properties and behavior of those classes. use Polymorphism where an object can take the shape of many different forms. This is a very quick statement showing the stage of Object-Oriented Programming

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

Docker

Source:

https://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/

I chose to read and write a blog post about Docker for my Week two post. I chose Docker because it is an important tool in the development community today. And because it runs in the background while we work. What Docker is actually doing, and how it accomplishes that are abstracted from us. So I wanted to learn more about how Docker works, and why so many teams are using it today.

With Docker, developers can run their applications in containers, instead of a virtual machine. A container is a unit of software that contains everything that an application needs to run on a host computer. The container is the same for all developers that access it.

Containers are an enticing alternative to Vitual machines because they have much less intensive system requirements. A VM simulates hardware and has a complete operating system, but a docker container does not. Instead, a container runs on a single linux instance. This allows developers to run multiple docker containers simultaneously. And saves the company money in server costs.

Docker containers also work well with the agile methodology of Continous Deployment. This means that developers are integrating and deploying their code quickly and regularly. Agile methodologies are becoming the industry standard. With Agile, the development process is broken into smaller units of work, that are divided amongsts small teams. Docker helps Agile teams collaborate within a shared version of their application within a container.

Docker is used by large companies in enterprise software where they are sometimes building massive applications. Docker containers make workloads more portable. As different containers can run different versions of an application, that can be running on seperate servers.

Over the summer I did an internship where I worked on enternprise .NET web applications. During my internship, we used docker containers for our Dev environment when building web applications. And we also used a Docker container for our shared PostGreSQL databases. This allowed us to work with the same sample data, in our databases, and work in the same Dev environment, before sending the next update to User Acceptance Testing.

Reading this blog has helped me understand how Docker works and why it is popular. And has given me a new perspective on why my company uses Docker. I will be using this knowledge as we are using Docker in this course, and the Software Development Capstone project. I will most likely use this knowledge in my career, as so many companies are using docker today.

From the blog CS@Worcester – Jim Spisto by jspisto and used with permission of the author. All other rights reserved by the author.

UML Class Diagram Arrows

Seeing how one of my CS classes just recently introduced me to UML class diagrams, I wanted to conduct some research on the formation and comprehension of the diagrams. I looked for blog posts that showed examples of the diagrams and how they would be written, since I like reading written explanations and visual representations.

I stumbled across a blog covering the different arrows used in the diagrams, as well as when and how they can be used. That blog can be accessed at https://www.gleek.io/blog/class-diagram-arrows.html.

The blog presents to us six different types of class diagram arrows: directed association, inheritance, composition, realization/implementation, aggregation, and dependency. I had already seen directed association, inheritance, and implementation arrows, but I had not yet familiarized myself with the others. I learned the following from the blog:

A composition arrow in a UML diagram does not have an actual arrowhead, but instead looks like a solid diamond at the end of a solid line. The solid diamond is at the sub-object end of the solid line, and indicates that the sub-object cannot exist without the container class. It can be shown using -<*>.

The aggregation arrow looks just like the composition arrow, except that the diamond is hollow/white. The aggregation arrow is used to show association between two classes, but the subclass can still exist without the super class. It is shown with -<>.

Dependency arrows have a thin arrowhead and a dashed line. They show that two elements depend on each other but the dependency is weaker than standard association. Making changes to the parent class will have an impact on the child class. It is shown with -.->.

This blog was a great source to understand the usage of different arrows for UML diagrams. It provided great examples of when to use aggregation and composition, and I now know to take those into account for when I will need to make my own UML class diagrams in the future. It was easy to understand how the relationship between a library class and a book class can use the aggregation arrow because books can still exist after they are borrowed from the library. It was also easy to see how the relationship between a shirt class and pocket class can be composition association because a shirt pocket would not exist without the shirt. I also think it was a nice touch for the blog to include a video on the page where it explains the arrows and shows how the examples would be typed up on gleek.io.

From the blog CS@Worcester – CS With Sarah by Sarah T and used with permission of the author. All other rights reserved by the author.

Introductory Post

Hello hello, testing to see if I finally got this thing working. Looks like this should serve as another archive for my dumb words. Hopefully I check in from time to time after this course and read up on what I was struggling with. Or maybe somebody will stumble across a problem that I’ve solved and posted about – who knows?

From the blog CS@worcester – Dummies that Code by howbrash and used with permission of the author. All other rights reserved by the author.

POGIL… the way we’re learning.

POGIL is an acronym which stands for Process Oriented Guided Inquiry Learning.

We’re using this style of teaching in my Computer Architecture and Desig… One of my Software Development courses this semester (the name of the course is significantly long). I can see how this style of teaching can be beneficial to showing how teams get work done in the real world. Each person in the team has a role that they must fulfill. In almost all the groups there are four participants. Each person will have to fill one of four roles; Manager, Recorder, Reflector, and Presenter and be responsible for that role solely. While we are all working as a team to achieve a common goal, I do find it particularly difficult to not impede on my teammates roles and essentially “do their job” for them. I’m not saying that my teammates aren’t doing their jobs adequately. For example, it seems like a far easier task to correct a typo our Recorder has made in our write-ups, but instead I remind myself to tell my teammate “Hey you may have spelled this word wrong, could you go back and fix this please?” While this seems silly the practice makes some type of sense to me.

There’s a joke a friend told me once.

“How many Software devs does it take to fix a light bulb?”

“…”

“None, it’s a hardware problem.”

I must admit he got a hearty chuckle from me when he delivered the corny joke, but there is some truth to this. Each department in a company has a team of people who’s expertise is in a certain area. While they maybe able to fix something that may have gone wrong, their time is a precious resource that they could utilize to focus on other important tasks than to be bogged down by a task that is someone else’s job. While I did highlight a strong point of this type of strategy, I also want to note that I can see how this type of strategy can cause more time to elapse while getting a task completed, but in a sense it is the least complicated way of getting work done I suppose.

In certain settings there may only be one answer to getting a problem correct. But the pathways that lead towards that answer may be limitless. This is where the POGIL approach seems to put its emphasis on its effectiveness of getting students/participants to realize that “logical thinking and teamwork are prized above simply getting the ‘right’ answer”.

You can read more about POGIL here. https://pogil.org/about-pogil/what-is-pogil

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.

Why is HTML Important

HTML which is also known as ‘Hypertext Markup Language’ is a programming language used to describe information you may find on a web page. When used with CSS and JavaScript, these three makes up the essential foundation of any website found worldwide. A website may be broken down into three components. First, we have the page’s appearance which is made with CSS. CSS is also known as ‘Cascading Style Sheets’ is used to design the appearance of a webpage. This allows you to set things from the size and font of texts shown, to the color of the page, and so on.  Then we have the functionality of the page using JavaScript. JavaScript is a language used to program the page. For example, if you were to click on “shopping cart” on amazon, this would navigate you to a page that were to show you what’s in your cart that you want to buy.  Lastly, we have what some call the ‘bones’ of the webpage. This is where HTML is used.
CSS is known as ‘Cascading Style Sheets’ is used to design the appearance of a webpage.
When designing a webpage, many contains important information that may recede in headings, paragraphs, or many other types of data. HTML is used to specify what kind of information goes into these types of things on a webpage. This type of work is mainly used by Front-end developers. These developers use HTML language to code different things that relates to the overall structure of the page.
HTML is something every website uses no matter what browser you use. From social media web pages like Facebook and Google, to web players like YouTube or Spotify. If you were to look at the coding behind done for these pages, you would see that they all use HTML. That’s why HTML is important.
To become a front-end or full-stack web developer, HTML is a good place to start off with. Combine HTML with CSS and JavaScript will provide you all the necessary to create an interactive webpage.

A blog I would like to share is https://www.theblogstarter.com/html-for-beginners/. This blog has a lot of useful information about HTML and if you’re looking into become a front-end developer or a full-stacked developer I highly encourage it!
I chose to write about HTML because I am highly interested in learning full-stacked development. I think it will be very useful in the type of career I will choose once I graduate from Worcester State University. Another reason why I chose to research and write about it, is because it is on our syllabus, we will be learning about front-end development, so I thought it was appropriate to talk about HTML.

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

Blog Discovery

Michael Feathers is a software developer, founder, and director of R7K Research & Conveyance. R7K Research & Conveyance is a company located in Miami Florida. Specializing in software design, they use the importance of the need of the business and intensive planning to meet company demands, plus on top of that to be able to design software where you are aware of the code to make adaptable adjustments in the long run such as, adding new features that are newly needed vs features that are easily removed to make room for new upcoming changes which is referred to as planning. 

He helps other teams and developers to refactor code to improve its performance without rewriting the existing code. Gives best practices to maintain their software with ease such as making test programs as you can optimize it at the same time to keep tabs on it. 

I chose this blog because he provides helpful tips whether they are in Java, Python, C++, etc. and leaks information from his Book “Legacy Code”. Also mentions UML which I could learn more in depth of when we progress further into CS-343. 

In one of his blogs about code refactoring, he discusses that before we make tests for our own code we write, we must evaluate and rethink towards ourselves whether if it is going to fail. He stated, “As you make any change, know with every edit whether that edit changes behavior.” https://michaelfeathers.silvrback.com/testing-yourself, meaning we can’t compile code if it is incomplete, if there is something going wrong, we must figure out the missing piece of the puzzle. I could’ve used this type of thinking back in my other core classes like Data structures, or intro to programming class, because it can only take a small mistake to make your entire code and/or program to fail. Another reason is that Michael gives an example about when working in groups, and the type of challenges you may face such as having trouble putting heads together, not seeing each other’s perspectives. Providing tips and trick to get around obstacles like these. In CS-343, we do POGIL activities when we come into class, each member has roles of their own to keep the teamwork intact, but as he exemplified before we may also “glitch” and we have to figure out why and what can do about it. Depending on how we think and how we get ideas.

Reference blog resource: https://michaelfeathers.silvrback.com , https://www.r7krecon.com

From the blog cs@worcester – Dahwal Dev by Dahwal Charles and used with permission of the author. All other rights reserved by the author.

REST Introduction

APIs play an integral role in the development of modern-day applications. Whether you are writing your API or integrating someone else’s, it is crucial to understand their functioning. There are many APIs, but the most common types are REST APIs that operate using HTTP and HTTPS. I chose to write about REST APIs because we will be working with them in this class. They are essential to understand for most development projects. The blog post “Best practices for REST API design” discusses the basics of a REST API, how they work, and development practices. The post also provides code examples using NodeJS with the ExpressJS library showing how the concept of a REST API is implemented.

According to the article, a REST API follows a set of standard design principles that allow users to quickly be able to work with the API. For example, a REST API should include method endpoints such as /GET /POST /PUT and /DELETE. These endpoints are used to send and receive data between the server and the client. The difference between the endpoints is the operations they perform. Sending a request to a GET endpoint will send the client data, a POST request will add data, and a DELETE request will remove data.

Although there are a set of rules a REST API must follow, there are many best practices left up to the developer that they should follow. For example, a REST API should send and receive data in JSON. JSON makes working with data simpler because it is in an easily transferable and structured format. The API should also run over HTTPS rather than HTTP to add an extra level of security between communication.

A REST API closely resembles the structure of a URL where each method is separated by a forward slash. To pass a parameter, a question mark is used followed by the variable name equal to a value. In order to be readable, the developer must name and structure the API paths wisely, based on the function an endpoint is responsible for. For example, a GET request to find a user by ID could look something like /user/findOne?id=120. In this example, the findOne method is prefaced by /user/, and we know the user id we are finding is 120. If the API replaced the word user for record, then the developer using the API would not know what type of data to receive in the request.

Finally, a REST API should be versioned, meaning the highest level path of the URL structure should be the API’s version number. Using the find user example, a versioned API would read /v1/user/findOne?id=120. If we made a change to our API, we could modify that in the v2 API without breaking the code written using the v1 API.

I will definitely use these tips while developing a REST API in the future. One of the most important guidelines I learned was to always send and receive data in JSON. In the past, I have made a REST endpoint return a single value such as a number. Without any context, the data from the API would be hard to understand. If the values were named in JSON then it would be easier to work with and manipulate.


Reference blog resource: stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design

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

Just A Refresher For OOP Concepts

Hello and welcome back to my blog! I had a really fun time during the first few weeks of the semester and I am looking forward to the rest of it. The first POGIL group activity we did caught me off guard since I did not remember what the terms abstraction, encapsulation, polymorphism, and inheritance meant. These concepts were taught in one of the earlier programming classes and I have done school projects and labs that involved these concepts in the past. But I don’t actually remember the terms or the clear cut definitions of them. Maybe part of the reason why I did not remember them is because we briefly went over those topics and we were also not forced to remember them since those classes were more about if you could write the code correctly. So that is why I decided to focus my blog around those four concepts. The in-class activity was a good refresher but I wanted to do research to fully have a firm understanding of them. Having a strong understanding of these concepts will help me later on in my computer science journey since these concepts are going to be seen over and over again in object orientated programming.

Let’s start with abstraction. Abstraction is basically hiding unnecessary details and leaving only the necessary and relevant details. Hiding unnecessary information is useful because, well, it is not needed to show that information to the user. An example in real life is your smart phone. All that’s important to the user is the screen and they do not need to know what processor or how much RAM the phone has.

Encapsulation is bundling data with the code that modifies the data and it can also prevent outside sources from accessing that data. In Java, encapsulation is used in classes where data can be declared as private and outside methods cannot access that data.

Polymorphism is the ability to take on many forms. In Java, that means you can perform one tank many ways. An example of that is calculating the area of a shape. You can use the same method area() to calculate the area of a triangle, octagon, or any other shape. There’s also overriding methods where the child class has the same method as the parent class.

Inheritance is gaining the properties of one class to another class. It’s like a parent-child relationship. In Java, a child class inherits all the methods and attributes from its parent class. The vehicle example is a really good one. Vehicle would be the parent class and car and truck would be the child classes. Both car and truck would share the same attributes from vehicle but also have their own attributes as well.

This has been a good review for me and the website really helped me understand what the four OOP concepts are. In the future I hope to apply all of these concepts into my work.

Site used: https://www.nerd.vision/post/polymorphism-encapsulation-data-abstraction-and-inheritance-in-object-oriented-programming

 

From the blog Comfy Blogging by and used with permission of the author. All other rights reserved by the author.