Author Archives: mikefriedrich1

Your First Language

For this week’s blog post, I have decided to look at the apprenticeship pattern “Your Fist Language”. The idea of this pattern is when you first start your programming journey. This is when you only know one or tow languages. The main concept of this chapter is to isolate what langue you would like to use as your main language. According to Dave H. Hoover and Adewale Oshineye, the authors of the book, they say on this, “Pick a language. Become fluent in it. For the next few years this will be the main language you use to solve problems, as well as the default skill you hone whenever you are practicing. Making this choice is a challenge. It is important that you carefully weigh the options, as this is the foundation upon which your early career will be built.” (Dave H. Hoover & Adewale Oshineye).

When first reading about this pattern, it really grabbed my attention. At Worcester State we learn an abundance of different languages to be able to be prepared for the outside world. However, something that has always been a question for me is “What language do I stick with?”. What was cool about this chapter was that it said to have a main language under your belt, but it never said to toss aside the other languages. As an example, they talked about a job requiring a specific language to be able to be hired there. Rather than disregarding the job and looking for something else, they suggest making a toy application to learn a basic understanding of that language. Some of these toy programs will involve a problem to solve. Unlike a simple “Hello World” application, solving a problem will give you a more in-depth dive of the language. Another good thing to add to your toy application is a test class. Test classes always help ensure that what you are coding is spitting out the correct information.

With this chapter in the book, I agree with everything that they are saying about your first language. I loved how they talked about having a min langue but not disregarding the other languages you have learned or will learn.  It also made me consider more what will be my main langue when I go out into the field and what language I’m willing to put more research into.

Book: Apprenticeship Patterns, Dave H. Hoover & Adewale Oshineye

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

LibreFoodPantry

From the LibreFoodPantry, I have chosen for this blog post to talk about the 16 FOSSisms all educators should know. Hedi Ellis, the inventor of “FOSSisms”, came up with this idea to try and convey the idea that engaging computer science students in open-source communities can engage them more than what can be achieved in other classes. This idea was conveyed to a group of 20 faculty members from colleges from all around the United States. The 16 FOSSims are “It’s all about community, be productively lost, give back, if it isn’t public, it didn’t happen, embrace radical transparency, ask forgiveness not permission, branches are free, keep a history, begin with finishing touches, it’s not the work you know; It’s what you want to learn, release early release often, push to upstream, show me the code, remember shallow bugs, and avoid uncommunicated work”. (Heidi Ellis)

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

Encapsulation

For this week’s blog post, I have found an article about encapsulation. Encapsulation is more than defining accessor and mutator methods. It also follows two main objectives hiding complexity and hiding the sources of change. To understand more about encapsulation, we will first need to understand the two concepts of modularity and abstraction. In the article, Edwin Dalorzo, the author of the article, uses the example of a car to understand abstraction. He says on this, “A car is complex in its internal working. They have several subsystems, like the transmission system, the break system, the fuel system, etc. However, we have simplified its abstraction, … we know that all cars have a steering wheel through which we control direction, they have a pedal that when we press it we accelerate the car and control speed, … These features constitute the public interface of the car abstraction” (Edwin Dalorzo). This is a great example because we can use abstraction to simplify unnecessary parts that the users would not need to understand. This concept is similar to modularity. In his book Code Complete, Steve McConnell said on complexity “ the interface should reveal as little possible about its inner workings”. So now that we understand the two concepts, the idea of encapsulation starts to unravel.

One of the things that we want to always encapsulate in Java is the state of a class. This should only be accessed through its public interface. Edwin says on encapsulation in Java, “In a object-oriented programming language like Java, we achieve encapsulation by hiding details using the accessibility modifiers … With these levels of accessibility we control the level of encapsulation, the less restrictive the level, the more expensive change is when it happens and the more coupled the class is with other dependent classes (i.e. user classes, subclasses, etc.).” (Edwin Dalorzo).  It is crucial that we keep this idea in mind while we design encapsulation for these public interfaces so that we can foster evolution of our APIs.

As talked about in the article, it is often wondered why we need to use accessor and mutator methods in Java, aka getters and setters. With encapsulation in mind, it is not there to hide the data itself but the implementation details on how the data is being manipulated. So once again we would need a public interface to gain access to this data. However, by exposing this data we risk losing encapsulation. So this is why we would need to encapsulate this information.

https://dzone.com/articles/why-encapsulation-matters

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

Software Framework

For this week’s blog post, I have found an article discussing software framework. Varvana Myllarniemi, Sari Kujala, Mikko Raatikainen, and Piia Sevonn, the authors of the article, say on software framework, “Software frameworks are nowadays extensively used to develop different kinds of software applications efficiently. For example, using a framework, such as Spring, Django, Node.js or Angular.js, is the de facto standard approach for developing web software.” (Varvan Myllarniemi, et. All). When selecting a framework, you will need to keep in mind that it will be a critical design decision. This is because the framework will control the application’s architecture.

There is a drawback that does come when selecting to use a framework. Due to frameworks being very complex and involve specific designs, they are very hard to learn. The current research on frameworks focus on is technical abilities more than anything else. So, there is very little research on how frameworks are picked for use in development. However, when thinking about APIs provided by the framework, there is a plethora of research from different viewpoints. The reliability and usability of the API have been the most studied. This has been more studied to it being able to reduce programmer frustration and potential bugs.

For most companies, customer need cannot be solved by development. Hence, by opening software ecosystems they can give up part of their control for faster speed and wider coverage. A definition on software ecosystems from the article can be seen below,

A software ecosystem is defined as “a set of businesses functioning as a unit and interacting with a shared market for software and services, together with the relationships among them, where relationships are frequently underpinned by a common technological platform or market” (Jansen et al. 2009).

A software ecosystem revolves around a central technology that is often now referred to as a software platform (such as an operating system, end-user application, etc.). These kinds of platforms can be accessed by end-users but also by software developers.

A platform owner will also need to provide a platform boundary resource, so a developer can build off the software platform. The authors of the article say on platform boundary resources, “The platform boundary resources are a way for the platform owner to control and influence what happens in the software ecosystem, while benefiting from the generativity of external application development.” (Varvan Myllarniemi, et. All). This is also good from companies that are also looking for a way to collaborate on similar application builds.

https://jserd.springeropen.com/articles/10.1186/s40411-018-0050-8

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

RESTful API

For this week’s blog post I have found an article on REST API Design. REST or RESTful API design (Representational State Transfer) is designed to use and take advantage of existing protocols. Even though REST API can be used for almost any protocol, normally you will see this design in HTTP web APIs. This design was defined by Dr. Roy Fielding and became notable due to its layer of flexibility. REST can use and execute multiple types of calls, due to the data not being tied to any methods or resources. For your API to be considered “RESTful”, it will need to follow each of the six key constraints. The first thing that it will need is a Client-Server. This is the idea of separating the client and the server from each other and makes it so work can be done independently from each other. For example, I should be able to work on my server without it effecting the mobile client. Secondly your API will need to be stateless. MuleSoft, the company where the article is from, says on stateless API, “REST APIs are stateless, meaning that calls can be made independently of one another, and each call contains all of the data necessary to complete itself successfully. A REST API should not rely on data being stored on the server or sessions to determine what to do with a call, but rather solely rely on the data that is provided in that call itself.” (MuleSoft). For example, I should be able to grab and orders information from an order database by calling its order ID rather than all the information itself due to the APIs design. The third thing that it will need is cache. Cache in computing, is a piece of hardware or software that will store data for future use. For example, an autofill password you would use on Google Chrome. For your API to be truly RESTful it will need to have a way to store cacheable data. This will strongly help your API due to less interaction with it and you will be able to retrieve data quickly for your clients. The fourth thing you will need a Uniform interface. This means having an interface that is not coupled with the API layer. This allows the client to easily navigate the API without knowing the backend. The fifth concept for RESTful API is a layered system. According to MuleSoft, they say on Layered System, “As the name implies, a layered system is a system comprised of layers, with each layer having a specific functionality and responsibility” (MuleSoft). Lastly you will need to be able to code on demand. The concept for this idea is that Code on Demand will allow code or applets to be transmitted via the API. This concept is not widely used due to API being coded in multiple different languages and has been raising security questions.

https://www.mulesoft.com/resources/api/what-is-rest-api-design

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

Unified Modeling Language (UML)

For this week’s blog post I have found a blog on Unified Modeling Language (UML). UML is an object-oriented modeling language. This has become a normal standard for documentation of a software system. It is a pictorial description of classes, objects, and relationships. It represents a plan that defines the working hardware or software system. For example, we can use a UML diagram to show what is going on in a three-class software system. For this example, the names of the three classes will be Student, Classroom, and Teacher. For each class, a box is used in UML to show the entire class with three lines separating class name, methods, and instance variables. Each variable is listed as the variable type and name separated by a colon (for example, String : Id). While the methods are listed as method name with parameters (if any) and the return variable type (if any) separated by a colon (for example, getId() : String)  Now if we wanted to show that the class named Class borrows objects from the student class, we would draw a arrow pointing from student to Class. If we wanted to show that it extends the class, we would draw a dotted arrow instead.

UML was designed and created back in the 90’s. This was a period where object-oriented languages (OOL) such as C++ were being used to build complex but compelling systems. The issue during this time was that we had complex systems but no good way of showing on paper what the system is doing. This was until in 1994 when software engineers Grady Booch, Ivar Jacobson, and James Rumbaugh of Rational Software created the UML language. This development of the language was finished two years later in 1996. Each of the designers came together to find a language they will reduce the complexity. According to Study Section, the website with the blog, they say on their process of reducing this complexity, “Booch’s method was flexible to work with throughout the design and creation of objects. Jacobson’s method contributed a great way to work on use-cases. It further has a great approach for high-level design. Rumbaugh’s method turned out to be useful while handling sensitive systems. Behavioral models and state-charts were added in the UML by David Harel.” (Study Section) In 1997, the Object Management Group (OMG) acknowledged UML as a normal language. They now are responsible for maintaining the UML language and updating with new languages that come out.  

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

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.

Introduce Yourself (Michale Friedrich)

Hello,

My name is Michale Friedrich and I’m a senior Computer Science Student. I’m hoping to use this blog as a diving board for the professional world. As D.R Wurst said these blogs are used by professional’s and it used to show what they have done for future use.

Look forward to working with all of you,

Mike

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