Category Archives: Blog

What is DRY?

First of all, what does DRY stand for? It is a term “don’t repeat yourself”. In the software engineering world, this is a principle of reducing repetition in the code, referring to a single source-or “snippet” -of reusable code whenever you need it.

An example of this could be an app that your programed that throws a ball for your dog once an hour throughout the day. Instead of writing the entire code out for finding the ball, picking up the ball, and throwing the ball every hour, you can write the code once and give it a name such as toss.ball. This will then allow you to just type toss.ball each time to call it. This saves a lot of time writing the code.

Not only are we saving time when first writing out the code, but it also means that there will be less human error as well. From the example, if we were to write out the code entirely 24 times (1 for each hour), you would be bound to make some sort of error at least once. Another reason how this is also effective is that if you wanted to change the object being thrown for example a stick, all you would have to do is change the term ball once, instead of doing it 24 times.

In terms of real life, we can see this being used when we let websites save our information such as logins, password, or any other type of information we would have to type in each time. The same goes for music. If we are using sites such as Spotify, most of us create playlists so we don’t have to constantly look for the song we want to listen to.

I chose to write about this topic because it is part of our curriculum. We will be learning about this principle along with others as it is an important part of coding. I will post a link that will take you to a blog I read. https://zapier.com/blog/dont-repeat-yourself/ I really enjoyed going taking the time to go through this blog because it taught me and showed the importance of reducing time when it comes to coding. I also recommend this blog to anyone who plans to become a software engineer because it goes into depth about DRY and uses many examples to help you understand how it works. It amazes me how a simple principle could do so much such as saving time, less human errors, and overall having a simple code.

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.

Interface vs Abstract class vs Concrete class

Summary:

As a programmer, java is all about classes and there are design patterns that we must follow, and it is our duty to question them. Java is an object orientated programming language where we have the ability to write our code in the form of reusable classes. Code re-usability doesn’t start by creating objects out of classes, it starts way before that when we are creating the classes itself. The class types that we have available to us are Interface, Abstract, and Concrete classes.

Reason:

The reason why I chose this article was because I thought this article would help us understand why we us certain classes and when to use them. In class we have gone over different design patterns where the uses of every class are different depending on what we want to achieve. I believe that it is important to fully understand how they each function as it will make understanding the design patterns much easier.

What I’ve Learned:

Interfaces are a blueprint for your class that can be used to implement a class and an interface cannot have any concrete methods. What your interface can have are static members and method signatures. All methods that you declare in an interface can have static, default or abstract modifiers. Abstract methods cannot have a body; all they can have is a method signature. Variables are not allowed in interface. Hence any data declaration is public static final. Interfaces can extend other interfaces (one or more) but not classes (abstract or not). Interfaces cannot be instantiated as they are not concrete classes. Methods and constants cannot be declared private, methods cannot be declared final.

Abstract classes are a bit different from interfaces. These are also used to create blueprints for concrete classes but abstract classes may have implemented methods. Abstract classes can implement one or more interfaces and can extend one abstract class at most. A class can be an abstract class without having any methods inside it. But if it has any methods inside it, it must have at least one abstract method. This rule does not apply to static methods. As abstract classes can have both abstract and non abstract methods. Static members are allowed. Abstract classes can extend other at most one abstract or concrete class and implement several interfaces. Any class that does not implement all the abstract methods of it’s super class has to be an abstract class itself.

Concrete classes are the usual stuff that every java programmer has come across for sure. It is like the final implementation of a blueprint in case you are extending it some abstract super class. A concrete class is complete in itself and can extend and can be extended by any class. The only condition is that all the methods have to be implemented in order for it to qualify as a concrete class.

From the blog CS@Worcester – Life as a CS Student by Dylan Nguyen and used with permission of the author. All other rights reserved by the author.

What Is Unified Model Language (UML)?

Unified Model Language is the standardized modeling language that consists of integrated set of diagrams, that were developed to help system and software developers. This allowed them to specify, visualize, construct, and document software systems which also works well for business modeling and non-software systems. The UML consists of some of the best engineering practices that have been proven successful in large and complex systems. When becoming a developer, it is important to learn UML because it is a very important part of developing object-oriented software and the software development process. The way UML are expressed is mostly through graphical notations to show the design of software projects. UML is very useful for project teams because it helps them communicate, explore potential design and validate the architectural design of the software.

UML has many uses and one of them is the uses of diagrams. The diagrams are divided into three categories. The three categories are Structure Diagrams, Behavior Diagrams, and Interaction Diagrams. Structure Diagrams is a category that includes Class, Object, Component, Composite, Package, and Deployment Diagrams. Another category is the Behavior Diagrams include the Use Case Diagram, Activity Diagram, and State Machine Diagram. The last category is the Interaction Diagram which is derived from the general category of Behavior but also includes the Sequence, Communication, Timing, and Interaction Overview Diagram. Other things that are useful with UML is that it has tools to analyze existing source code and reverse-engineer it into a set of UML diagrams. There are also tools that allow the UML models to be executed. Another interesting tool I found is that you can generate a program language code from UML, that is mostly bug-free. There’s also several tools that can generate Test and Verification Suites from UML models.

I chose to write about the topic of Unified Model Language (UML) because it is part of our curriculum. It is one of the first topics we touched in our CS343 class. Also, I believe it is very important to understand how UML works as a developer. This allows teams to work together and understand what needs to be done and the connections that are being made. While researching this topic I found a few sites that elaborates on what UML is and I recommend anyone who’s thinking of becoming a developer to look at the links I provided down below.

Links:
https://www.uml.org/what-is-uml.htm
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-uml/

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.

Why Encapsulation Matters

Summary:

In this article, they don’t show us examples of encapsulation but instead explain to us the importance of it and why we do it as software engineers. Initially, they start off with how encapsulation helps us hide the complexity of our code. The beauty of hiding our code is not having to understand all the details in order to be able to use it, we just need to understand a broader abstract concept and how it works and how we interact with it. They also explain to us what happens when are not able to achieve the proper levels of encapsulation in our design. That article continues as to why we need accessor and mutator methods in Java.

Reason:

The reason why I chose this article was because in class we have done a lot coding in regards to encapsulation and I thought that this would help me fully grasp the purpose and meaning of encapsulation. Encapsulation is the very essence of API’s and how they work and being able to understand this is very important since we may be creating API’s in the future.

What I’ve Learned:

Encapsulation is more than just defining accessor and mutator methods for a class. It is a broader concept of programming, not necessarily object-oriented programming, that consists in minimizing the interdependence between modules and it’s typically implemented through information hiding. Our software designs the visible parts of our modules/classes constitute their public interface, and this is exposed to the outside world, the rest of it should be hidden to the naked eye. With encapsulation us as humans deal with complexity by defining abstractions with public interfaces so that we are able to interact with them and all of the code that lies beneath it is unnecessary in order for use it. It is like an iceberg, only a small portion of it is visible on the surface, but most of its true size is hidden underwater where we cannot see it. Changes can we made in directional systems because internal implementation is encapsulated and because of that, changes can we safely done without affecting it’ public interface. By minimizing the impact of changes and independence of modules, we can achieve proper levels of encapsulation in our software that can handle change without breaking its users. Information hiding is important because it decouples modules that compromise a system and it allows for them to be tested, optimized, used, understood, and modified in isolation. This allows for other modules to be developed in parallel and eases the burden of maintenance without the fear of affecting other modules. Encapsulation is a desirable attribute that allows for the evolution of APIs and as long as we respect public interfaces of our abstractions, we are free to change whatever has been encapsulated. Failing to define proper abstraction with proper levels of encapsulation will end up causing difficulties when change happens. There is no way to change the public interface of an abstraction without breaking its users. Encapsulation is one of the tools we use that help us create good abstractions, but no level of encapsulation is going to make bad abstraction work.

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

From the blog CS@Worcester – Life as a CS Student by Dylan Nguyen and used with permission of the author. All other rights reserved by the author.

What is an API?

From my other posts, I mentioned APIs quite a few times. But what exactly are they? API’s also known as Application Programming Interface, is a software that allows different applications to connect to each other. Some examples that we see all the time could be when you’re sending a message on a social media platform, using a program, or just checking things on your phone. Doing any of these activities, you’re using an API.

An API works to communication data to different applications. When one is using an application, the application would connect to the internet and send data over to a server. Once the data is retrieved from the server, it then gets interpreted and will perform the necessary actions to send the data back to the application. From here the application will take the data it received and interpret and present the data requested in a way it is readable. This is what an API do. Not only does APIs act like a way for different applications to send and retrieve data, but it also acts like a layer of security. When using any type of application, your phone’s data is never fully exposed to a server its retrieving data from, same goes for the server. This is because instead of sharing every bit of information, only small packets of information are being shared or what is ‘necessary’.

A more in depth example I found while researching this topic is to imagine you’re sitting at a t able in a restaurant with a menu to order from. In the restaurant, the kitchen is a part of the system that will make your order. However how the kitchen is missing the details for what you ordered. In order to receive the order, they must communicate with the server. This is the API. The server communicates to the kitchen with your order in order to make it for you. This is basically what an API does. It connects two applications, so they can connect with each other and deliver the data.

The reason why I chose to write about API is because we will be learning it in class. Not only that but from my previous posts, I have talked about my interest in becoming a full stacked developer. This means I will have to proficient knowledge in both front and backend development. API is used in both. APIs are important to know because it will help me when I decided to create my own application as well, so it is very crucial I know how API’s work.

A post I would recommend to read about API is:
https://www.mulesoft.com/resources/api/what-is-an-api.
Not only does it describe what APIs do, but gives examples and has other links that teaches you more about APIs.

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.

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.

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's Developer Blog by michaelchaau and used with permission of the author. All other rights reserved by the author.

Using an Agile as approach to scope software projects

Summary:

This article starts off by explaining what software scoping is and that doing it well will help establish requirements and expectations between the customer and user, reduce friction during the development process, and help outline budget and timescales. Agile is well suited to support processes because it encourages you to establish high-level requirements first, and finer details later. The article continues by going into certain topics such as how to facilitate engagement, the drawbacks of a highly detailed initial scope, adapting to change, and preventing project creep. Scoping software projects the Agile way means developers can concentrate more of their time creating fantastic code, and business stakeholders have peace of mind that their organization is taking full advantage of the latest digital opportunities.

Reason:

The reason I chose this article is because I know that in software development, we must learn how to create applications in an efficient and straight forward manner. I know that it is difficult to measure the amount of effort it may take to accomplish a task as well as unexpected challenges that might occur. The importance of a well-run team allows for applications to be developed to the best of its abilities.

What I Learned:

I learned that Agile principles help instill a certain level of discipline early on to support the development of software. The agile methodology focuses on a highly detailed initial scop but that doesn’t mean it’s always the best. In doing something so highly detailed, you consume valuable time, create unnecessary delays, there may be a lack of budget clarity, and may be complicated by organizations that don’t know what they need. A lot of the time you don’t know what is going to happen so a team need to be equipped to tackle those issues and agile is built for it. Agile helps absorb negative impact of change by incorporating it at the scoping stage and throughout the rest of the project. Project creep is also something that occurs and that is when the work requirements begin to inflate after a project has begun. With the agile approach, it helps diminish project creep by not being distracted beyond the immediate horizon, like-for-like workload swapping, and contingency tolerance. Not being distracted allows for a developer’s understanding of future stages in a project to remain loosely defined as long as it is practical even with changes to the cope. Like-for-like workload swapping is the last minute desire to abandon requirement X while simultaneously prioritizing the creation of a new requirement Y. A contingency tolerance is when Agile tricks have been exhausted, there is essentially an emergency fund of time that can be dipped into so that the project timelines stay on track.

Source: https://developer.ibm.com/articles/d-scope-software-agile/

From the blog CS@Worcester – Life as a CS Student by Dylan Nguyen and used with permission of the author. All other rights reserved by the author.

Introduction

Welcome to my blog, here you will be able to follow my journey about the things I learn and the projects I will be working on. As an aspiring software engineer, this blog will be able to show employers and others not only what I am capable of but the also how much fun I have coding the things that I want.

From the blog CS@Worcester – Life as a CS Student by Dylan Nguyen and used with permission of the author. All other rights reserved by the author.

Dig Deeper: Depth not Breadth

Photo by Laura Stanley on Pexels.com

Learning things is difficult much of the time, and when being pressured to learn something (or even multiple things at a time) for some impending deadline or project responsibility, it can feel like there just isn’t enough time to warrant building a truly deep understanding during that period. The more items on the todo-list, the less time then is able to be spent on each item, leaving a very shallow understanding which is simply good enough to satisfy the given problem or context exactly.

The idea of learning in a shallow sense versus learning deeply is discussed in chapter 6 of Apprenticeship Patterns. Dig Deeper refers to the idea of making an effort to learn about tools, languages, or other areas of study to more than just the necessary degree to complete the current project. The authors argue that to always remain focused on finding a solution, rather than learning about why that solution works can make the overall understanding of the subject relatively shallow. Focusing solely on “your part” of the project can leave you lacking in comprehension regarding everything else, and so it is beneficial to look into relevant context, supporting ideas which build the foundations of the solution to the problem, and the documentation associated with the solution. The idea is to focus on depth of understanding, rather than breadth of topics covered.

In practice this seems difficult to implement one-hundred percent of the time, as time constraints will likely impede any efforts to understand everything in a way which is absolutely comprehensive. But for important ideas, subjects which will likely form integral, foundational aspects of a program or project, it makes sense to learn as much as possible about them so that if something goes wrong, you will have the knowledge to fix it. Choosing which topics to use this sort of approach for is a judgement call which should most likely rely heavily on context (as with most of the patterns discussed in this book).

While I wouldn’t necessarily want to use this approach all the time, I can definitely see the benefit of learning about the context and deeper ideas associated with topics such as new programming languages, database management, or frameworks like the .NET framework, which is associated with Windows-based development. Topics which are especially interesting in this regard (in my opinion) are game development and GUI frameworks, where there are often a large array of interconnecting components, panels, windows and tools associated. Learning the tools becomes almost like learning another language within the language itself.

Book referenced:

Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman

https://learning.oreilly.com/library/view/Apprenticeship+Patterns/9780596806842/ch06s04.html

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