Category Archives: CS-343

Object-Oriented Programming

Object Oriented Programming is a topic that I wanted to brush up on because it has been a long time since I have programmed with it or learned about it.

 I read a blog by Omar Elgar called “The Story of Object-Oriented Programming” which was a great help with relearning the terms and use of object-oriented programming. Omar goes over the major aspects of object-oriented programming which are objects, abstraction, encapsulation, inheritance, and polymorphism. Omar explains objects in programming are meant to represent real-world objects like a car, phone, etc. When Omar gets to abstraction, he sums it up by saying it is focusing on common properties and behaviors of objects and getting rid of what is not important. For encapsulation, Omar explains it is breaking down a program into small mini-programs in the form of classes as well as hiding content that is not necessary to expose. Inheritance is when we take the common properties we created in an abstract class and apply them to the class that is more specific. The last topic Omar covered was polymorphism which is when an object takes the shape of many different forms. Omar even gives some code at the end of his post to show the readers a real example of object-oriented programming being used which is a nice touch and helps to see.

I chose this blog post to read because I wanted to get a clearer understanding of object-oriented programming and how it worked. I have coded using object-oriented programming in the past, but I do not think I had completely understood it and how useful it can be until now. Omar did a great job going over all the important pieces of object-oriented programming and explained them in an easy to understand way.  After reading his blog I feel like I got exactly what I was looking for out of his work. I will be able to apply what I learned from Omar’s blog to my programming and be able to effectively explain object-oriented programming to someone else if I needed to. I have a feeling that having a strong understanding of how object-oriented programming works is going to be important to have not only for my university classes but my future career as a software developer. I would highly recommend this blog post to someone who needs a straightforward and easy to understand overview of object-oriented programming.

Link: https://medium.com/omarelgabrys-blog/the-story-of-object-oriented-programming-12d1901a1825

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

Code, Test, Refactor!

In my last post discussing testing and QA development, I went into depth about a project I was working on last year. I was developing an app that was supposed to track one’s financial history. It was the first project I had ever worked on that gave me free liberty to do whatever I wanted. I explained that it took a lot of my time and I ran into a lot of issues regarding the organization of the code, for the most part, I was most concerned about making something that worked rather than making something that worked effectively. Recently, I read a blog from Thesoftarch discussing how to write object-orientated code effectively.

The blog “Simple & Effective Way to Write Object Oriented Code” basically explains that most developers, like me, will only look to write code to reach functional requirements and not advocate for the technical quality of the code. The blog post explains that writing code to be functional can be acceptable during initial releases but can slowly turn complex if not managed correctly. So, it is important to maintain quality so that in the long term we can avoid struggling with maintaining the application. Different ways of writing effective, approachable code include making it simple to read, easy to test/verify, and having a low cost of change. The blogger goes by explaining the three basic steps of writing effective and well-designed code.

First, they go on to say that writing is easy but writing effective code is not easy, especially when you don’t have an approach. There are many design principles that developers go through in order to design good code. This includes SOLID, DRY, Design to Interface, and many more.

The second step is Unit Testing, as explained in my last blog post, it’s important to ensure that the code written works as intended. it’s best to write unit tests every time a method or class is created instead of writing the unit tests all at once.

The third and final step is to refactor. Refactoring is an activity to improve the quality of code without affecting its behavior. Making this a habit will help “maintain the code in the long run without adding much effort or risk.” As the blogger puts it, the coder should be able to identify “smells” in the code, refactor code to remove the smell and fix unit tests. Smells are certain structures that indicate violations of fundamental principles and negatively impact quality.

While reading this blog I’ve been able to keep note of what I need to do and look out for when it comes to developing a program. If I had read these steps last year, I think I would have had a better time developing my phone application. Reading this over I realized that there is a lot that goes into the development process and simply writing the code isn’t enough. It’s like baking a cake, everyone can follow the instructions to bake one but if key details are left out then it might not taste good, software development is the same way. It’s important that the code is designed in a way so that it can last. In my next project, I want to focus on refactoring for the most part. Code quality is very important and being able to make quality code will save me time and prevent any struggle.

Link to “Simple & Effective Way to Write Object Oriented Code”:

From the blog CS@Worcester – FindKelvin by Kelvin Nina and used with permission of the author. All other rights reserved by the author.

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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

Third time’s the charm… (or not?)

My previous two attempts at getting my blog aggregated to the CS@Worcester blog have failed for one reason or another! (I assume). I must, however attempt posting once more and hope that through divine intervention, the aggregator decides to pick it up this time.

This situation reminds me of a quote by the famous pirate war-lord Vaas Montenegro: “The definition of insanity is doing the same thing over and over and expecting different results.”

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