Category Archives: CS-343

Smells and Senses

I want to focus this blog post not on something that I’m interested in but rather something I think that I should know. I decided to put some more research into design smells, this topic seemed valuable because I have this perception that understanding and looking at code is not a skill that I have yet to developed. I wish to improve upon this, so I found this presentation on code refactoring and design smells that is pretty in depth and it goes into a little more detail about what we had discussed in class. In the class activity we connected technical uses of the word to technical definitions based on our understanding of the common definition. This activity provided a basis for understanding different smells. This led me to find a higher-level presentation on design smells and grasp some level of understanding of what was being discussed. In the video the speaker Sandi Metz suggests that when you can identify a code smell you can then refactor the code to better suite future use. What refactoring is, is the ability to rearrange code without changing its behavior. The ability to look at code and associate information is exactly what I am looking for.

There were a couple of ideas that stood out to me. The presenter offered an analogy that stood out to me that  refactoring is kind of like a recipe. Sandi then provides a valuable resource that maps specific code smells to a reference in Martin Fowlers book , a refactoring recipe that is “curative”  to that code smell. This leads me to another suggestion that it is okay at some level to “own your code smell” if it is working and won’t change in the future. This reference to Martin Fowlers books immediately reminded me of his very informative blog. The book itself seems very interesting to me and could potentially offer a wealth of valuable knowledge that could vastly improve my abilities.

As an avid home cook this analogy spoke to my soul, all this talk of smells and recipes sparked an understanding of code that I was not familiar with. In my journey as a home cook, I have been exploring the ability to make food more creatively as instructed by a transformative cookbook that I have been reading. There is an idea that I have been working on that suggests not following a recipe and relying on your senses and being actively involved to create a wonderful dish. I find that this relates heavily to my journey in becoming a software developer, taking information from outside resources and interpreting it in a practical way all while relying on my senses and built intuition.

From the blog CS@Worcester – Sovibol's Glass Case by Sovibol Keo and used with permission of the author. All other rights reserved by the author.

Software Development Approaches

A software development approach is a methodology that is used to guide the processes involved in the development of a software system. Different software development approaches provide different ways of organizing and coordinating the activities and tasks involved in the development of software. Some of the most common software development approaches include Agile development, Extreme programming (XP), Lean development, Test-driven development (TDD), and Waterfall model among many much more. These are just a few of the many different approaches to software development. Each approach has its own unique set of principles and practices that help guide the development process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that emphasizes collaboration, flexibility, and continuous improvement. Extreme programming (XP) is a software development approach that emphasizes collaboration, simplicity, and feedback. Lean development is a software development approach that emphasizes the elimination of waste and the continuous improvement of processes. The Waterfall model is a software development approach in which the development process is organized into distinct phases, and each phase must be completed before the next phase can begin.

Test-driven development (TDD) is a software development approach in which tests are written for a new piece of code before the code itself is written. The goal of this approach is to ensure that the new code meets the required specifications and behaves as expected. In TDD, developers write a test that defines the desired behavior of the new code, and then they write the code itself. Once the code is written, it is run against the test to see if it passes the test. If it does, the code is correct and is ready for integration with the rest of the system. If it does not, the code is revised until it passes the test.

I selected thisblog post because I am interested in learning more about Test-driven development. After reading this blog post, I learned about the principles and practices of TDD and how it can be applied in the software development process. I also learned about the steps involved in TDD, including writing a test that defines the desired behavior of new code, writing the code itself, and running the code against the test to see if it passes. I found this process to be logical and straightforward, and I can see how it would be a useful approach for ensuring the quality of new code. I made use of this method (to a degree) while working on the homework assignments for this class. I believe that it significantly simplified the process as having a set goal in the form of tests, made it easier to update/ add code that will work with it. Overall, I found this blog post to be very informative and useful. I learned a lot about development approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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

Blog Post 3

This weeks blog of choice was from a source called altexsoft. Since the last couple of weeks in class and for homework we have been talking about REST API. I decided to pick a blog in that area so that I would help me refresh memory for some of the homework and also help me study for our third exam that why I picked this blog post called “REST API: key concepts, best practices and benefits” this blog post touches a lot on the things we learned in class which was a nice refresher but one of the things I like the most about it was the graphics that came with it. I am a very visual learner so seeing some diagrams really help put everything together. They had one of the diagrams about layered architecture, and how clients interact with the API layer reaching the server via a proxy. This help me view the order and understand it fully. One of the most interesting things I did find about this blog post was then they talked about different features that made a REST stand out. And how there were different Main API types like REST, RPC, SOAP GRAPHQL. Since in class we only most of the time dealt with REST. It was like to get a different perspective and different once and how they can be used differently how REST is good for mostly web, RPC for complex microservices systems, SOAP for financial services and last GraphQL is good for mobile applications. Seeing what all the different things they are used for, really helped paint a picture of the different systems and quality they have. During the read in this post what was coming to mind was all the different ways to implement the REST API. What I hope to take away from this blog post and what I have learned in class is different was to use it to create different applications. One of the ones I would really like to dig deeper into would be GraphQL because of the high performance mobile apps. REST was good and all to get information and request but it can have a chance of slowing down the request processing so that’s when GraphQL came in. GraphQL starts defining a schema that describes how a data is structured on the server which makes a single query and gets a precise response. Since mobile devices aren’t the most reliable when it comes to network multiple request have a high chance of failure so that’s why GraphQL is more efficient.

https://www.altexsoft.com/blog/rest-api-design/

From the blog CS@Worcester – CS- Raquel Penha by raqpenha and used with permission of the author. All other rights reserved by the author.

Keeping It SOLID

SOLID is a popular set of design principles that are often used in object-oriented software development. The acronym stands for five key design principles which are: single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle. Together these principles are intended to reduce dependencies along with making designs easier to understand, maintain, extend, and avoid issues to build an adaptive, effective, and agile software. 

The single responsibility principle is a basic principle that many of us developers are already using daily in our own coding. The idea behind this principle is that every class, module, or function in the program should only have one responsibility or purpose in the program. A commonly used definition to describe this principle is that “every class should have only one reason to change.” Implementing this principle is sure to make your code easier to test, maintain, implement, and can help avoid unanticipated side effects of future changes. 

The Open-Closed Principle in summary, is that you should be able to extend a class’s behavior without modifying it. By following this principle can make our code writing easier to maintain and also revise in the future. Our classes would compile with this principle if it is open for extension and closed for modification. Open for extension means that the class’s behavior can be extended. While on the other hand, closed for modification means that the code is set and cannot be changed. This implies that such entities, like classes, functions, objects and so on, should be created in a way that their core functionalities can be extended to other entities without altering the initial entity’s source code.

The Liskov Substitution Principle is one of the most difficult to understand out of the five SOLID principles. This principle simply requires that every derived class should be substitutable for its parent class. The Liskov substitution principle implies that when an instance of a class is passed/extended to another class, the inheriting class should have a use case for all the properties and behavior of the inherited class. So, if we were to extend a class, if some of the properties of the initial class are not useful for the new class, then the principle will be violated. We can easily fix this though by creating an interface that matches the needs of the inheriting class. Following this principle helps to avoid unexpected consequences of changes and avoids having to open a closed class in order to make changes. It leads to easy extensions of software, and, while it might slow down the development process, following this principle during development can avoid lots of issues during updates and extensions.

The Interface Segregation Principle states that it’s better to have a lot of smaller interfaces than a few bigger ones. This means that you don’t want to just start with an existing interface and add new methods. Instead, start by building a new interface and then let your class implement multiple interfaces as needed. This principle makes us understand that it is unnecessary and unreasonable to create an interface with a lot of methods as some of these methods may be irrelevant to the needs of a particular user when extended. 

The Dependency Inversion Principle, simply put, is that developers should depend more on abstractions, not on concretions. For example we should make our classes rely on properties in our interfaces instead of relying on each other. The implications of violating this principle would result in a rigid system where testing blocks of code independently would be very difficult, reusability of code would be near impossible, and the addition or removal of code would lead to further complexity of the system and introduce bugs. High level modules should not depend upon low level modules. Both should depend on abstractions. Furthermore, abstractions should not depend on details. Details should depend upon abstractions. 

Overall, the goal of the SOLID principles is to reduce dependencies so that we can change one software without impacting others. With the  SOLID principles we can  make our code more maintainable, extensible, and flexible. These principles provide a set of guidelines for object-oriented programming and design, with the aim of making code easier to understand, debug, and modify. By following the SOLID principles, developers can write code that is more cohesive and less prone to errors, and that can be easily adapted to changing requirements or new features. Ultimately, the goal of the SOLID principles is to help developers create software that is of high quality, and that is easy to maintain and evolve over time. 

https://www.bmc.com/blogs/solid-design-principles/

From the blog CS@Worcester – Conner Moniz Blog by connermoniz1 and used with permission of the author. All other rights reserved by the author.

The Law of Least Knowledge

The Principle of Least Knowledge can go by many different names but the most common name today is the Law of Demeter. The Law of Demeter for Functions/Methods (LoD-F) is a design principle which is used for designing a system with minimal dependencies. It is typically summarized as “Only talk to your immediate friends.” This principle/law is more of a guideline than anything else. Some of its guidelines may include, each unit only having a limited knowledge about other units or objects and they should only be units or objects that are closely related to the current unit, each unit should communicate with its friends while not “talking to strangers”, and should only communicate with immediate friends.  

The main idea behind this principle is that inside of our applications, the code that we write should only express knowledge of its surroundings. The guidelines of LoD promote a notion of Loose Coupling in our codebase, which can lead to cleaner code with more maintainability. 

If we had a class that would implement a method, then the method should only be able to call a few objects. These include:

  1. The object that owns the method.
  2. Objects passed as arguments to the method.
  3. Objects that are dependencies of the owner instance, which are held in instance variables.
  4. Any object which is created locally in the method.
  5. Global objects that can be accessed by the owner instance within the method. 

On the other hand, if an object was to know too much about another, then this could be considered a bad design as the object would then have to traverse from top to bottom of the chain to get actual dependencies it needs to work with. 

Overall, The Law of Demeter gives us a guideline on how to achieve loose coupling in our code and helps to properly encapsulate the knowledge of some complicated operations or logic into the places where they should be. By keeping this law in mind when producing our own codes and programs, it is sure to help us have cleaner code with increased maintainability and can help benefit the code we are producing when running it.

Principle of Least Knowledge

From the blog CS@Worcester – Conner Moniz Blog by connermoniz1 and used with permission of the author. All other rights reserved by the author.

Software Development Approaches

A software development approach is a methodology that is
used to guide the processes involved in the development of a software system.
Different software development approaches provide different ways of organizing
and coordinating the activities and tasks involved in the development of
software. Some of the most common software development approaches include Agile
development, Extreme programming (XP), Lean development, Test-driven
development (TDD), and Waterfall model among many much more. These are just a
few of the many different approaches to software development. Each approach has
its own unique set of principles and practices that help guide the development
process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that
emphasizes collaboration, flexibility, and continuous improvement. Extreme
programming (XP) is a software development approach that emphasizes
collaboration, simplicity, and feedback. Lean development is a software
development approach that emphasizes the elimination of waste and the
continuous improvement of processes. The Waterfall model is a software
development approach in which the development process is organized into
distinct phases, and each phase must be completed before the next phase can
begin.

Test-driven development (TDD) is a software development
approach in which tests are written for a new piece of code before the code
itself is written. The goal of this approach is to ensure that the new code
meets the required specifications and behaves as expected. In TDD, developers
write a test that defines the desired behavior of the new code, and then they
write the code itself. Once the code is written, it is run against the test to
see if it passes the test. If it does, the code is correct and is ready for
integration with the rest of the system. If it does not, the code is revised
until it passes the test.

I selected this
blog post because I am interested in learning more about Test-driven
development. After reading this blog post, I learned about the principles
and practices of TDD and how it can be applied in the software development
process. I also learned about the steps involved in TDD, including writing a
test that defines the desired behavior of new code, writing the code itself,
and running the code against the test to see if it passes. I found this process
to be logical and straightforward, and I can see how it would be a useful
approach for ensuring the quality of new code. I made use of this method (to a
degree) while working on the homework assignments for this class. I believe
that it significantly simplified the process as having a set goal in the form
of tests, made it easier to update/ add code that will work with it. Overall, I
found this blog post to be very informative and useful. I learned a lot about development
approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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

Software Development Approaches

A software development approach is a methodology that is
used to guide the processes involved in the development of a software system.
Different software development approaches provide different ways of organizing
and coordinating the activities and tasks involved in the development of
software. Some of the most common software development approaches include Agile
development, Extreme programming (XP), Lean development, Test-driven
development (TDD), and Waterfall model among many much more. These are just a
few of the many different approaches to software development. Each approach has
its own unique set of principles and practices that help guide the development
process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that
emphasizes collaboration, flexibility, and continuous improvement. Extreme
programming (XP) is a software development approach that emphasizes
collaboration, simplicity, and feedback. Lean development is a software
development approach that emphasizes the elimination of waste and the
continuous improvement of processes. The Waterfall model is a software
development approach in which the development process is organized into
distinct phases, and each phase must be completed before the next phase can
begin.

Test-driven development (TDD) is a software development
approach in which tests are written for a new piece of code before the code
itself is written. The goal of this approach is to ensure that the new code
meets the required specifications and behaves as expected. In TDD, developers
write a test that defines the desired behavior of the new code, and then they
write the code itself. Once the code is written, it is run against the test to
see if it passes the test. If it does, the code is correct and is ready for
integration with the rest of the system. If it does not, the code is revised
until it passes the test.

I selected this
blog post because I am interested in learning more about Test-driven
development. After reading this blog post, I learned about the principles
and practices of TDD and how it can be applied in the software development
process. I also learned about the steps involved in TDD, including writing a
test that defines the desired behavior of new code, writing the code itself,
and running the code against the test to see if it passes. I found this process
to be logical and straightforward, and I can see how it would be a useful
approach for ensuring the quality of new code. I made use of this method (to a
degree) while working on the homework assignments for this class. I believe
that it significantly simplified the process as having a set goal in the form
of tests, made it easier to update/ add code that will work with it. Overall, I
found this blog post to be very informative and useful. I learned a lot about development
approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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

Software Development Approaches

A software development approach is a methodology that is
used to guide the processes involved in the development of a software system.
Different software development approaches provide different ways of organizing
and coordinating the activities and tasks involved in the development of
software. Some of the most common software development approaches include Agile
development, Extreme programming (XP), Lean development, Test-driven
development (TDD), and Waterfall model among many much more. These are just a
few of the many different approaches to software development. Each approach has
its own unique set of principles and practices that help guide the development
process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that
emphasizes collaboration, flexibility, and continuous improvement. Extreme
programming (XP) is a software development approach that emphasizes
collaboration, simplicity, and feedback. Lean development is a software
development approach that emphasizes the elimination of waste and the
continuous improvement of processes. The Waterfall model is a software
development approach in which the development process is organized into
distinct phases, and each phase must be completed before the next phase can
begin.

Test-driven development (TDD) is a software development
approach in which tests are written for a new piece of code before the code
itself is written. The goal of this approach is to ensure that the new code
meets the required specifications and behaves as expected. In TDD, developers
write a test that defines the desired behavior of the new code, and then they
write the code itself. Once the code is written, it is run against the test to
see if it passes the test. If it does, the code is correct and is ready for
integration with the rest of the system. If it does not, the code is revised
until it passes the test.

I selected this
blog post because I am interested in learning more about Test-driven
development. After reading this blog post, I learned about the principles
and practices of TDD and how it can be applied in the software development
process. I also learned about the steps involved in TDD, including writing a
test that defines the desired behavior of new code, writing the code itself,
and running the code against the test to see if it passes. I found this process
to be logical and straightforward, and I can see how it would be a useful
approach for ensuring the quality of new code. I made use of this method (to a
degree) while working on the homework assignments for this class. I believe
that it significantly simplified the process as having a set goal in the form
of tests, made it easier to update/ add code that will work with it. Overall, I
found this blog post to be very informative and useful. I learned a lot about development
approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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

Software Development Approaches

A software development approach is a methodology that is
used to guide the processes involved in the development of a software system.
Different software development approaches provide different ways of organizing
and coordinating the activities and tasks involved in the development of
software. Some of the most common software development approaches include Agile
development, Extreme programming (XP), Lean development, Test-driven
development (TDD), and Waterfall model among many much more. These are just a
few of the many different approaches to software development. Each approach has
its own unique set of principles and practices that help guide the development
process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that
emphasizes collaboration, flexibility, and continuous improvement. Extreme
programming (XP) is a software development approach that emphasizes
collaboration, simplicity, and feedback. Lean development is a software
development approach that emphasizes the elimination of waste and the
continuous improvement of processes. The Waterfall model is a software
development approach in which the development process is organized into
distinct phases, and each phase must be completed before the next phase can
begin.

Test-driven development (TDD) is a software development
approach in which tests are written for a new piece of code before the code
itself is written. The goal of this approach is to ensure that the new code
meets the required specifications and behaves as expected. In TDD, developers
write a test that defines the desired behavior of the new code, and then they
write the code itself. Once the code is written, it is run against the test to
see if it passes the test. If it does, the code is correct and is ready for
integration with the rest of the system. If it does not, the code is revised
until it passes the test.

I selected this
blog post because I am interested in learning more about Test-driven
development. After reading this blog post, I learned about the principles
and practices of TDD and how it can be applied in the software development
process. I also learned about the steps involved in TDD, including writing a
test that defines the desired behavior of new code, writing the code itself,
and running the code against the test to see if it passes. I found this process
to be logical and straightforward, and I can see how it would be a useful
approach for ensuring the quality of new code. I made use of this method (to a
degree) while working on the homework assignments for this class. I believe
that it significantly simplified the process as having a set goal in the form
of tests, made it easier to update/ add code that will work with it. Overall, I
found this blog post to be very informative and useful. I learned a lot about development
approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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

Software Development Approaches

A software development approach is a methodology that is
used to guide the processes involved in the development of a software system.
Different software development approaches provide different ways of organizing
and coordinating the activities and tasks involved in the development of
software. Some of the most common software development approaches include Agile
development, Extreme programming (XP), Lean development, Test-driven
development (TDD), and Waterfall model among many much more. These are just a
few of the many different approaches to software development. Each approach has
its own unique set of principles and practices that help guide the development
process and ensure the successful delivery of high-quality software.

Agile development is a software development approach that
emphasizes collaboration, flexibility, and continuous improvement. Extreme
programming (XP) is a software development approach that emphasizes
collaboration, simplicity, and feedback. Lean development is a software
development approach that emphasizes the elimination of waste and the
continuous improvement of processes. The Waterfall model is a software
development approach in which the development process is organized into
distinct phases, and each phase must be completed before the next phase can
begin.

Test-driven development (TDD) is a software development
approach in which tests are written for a new piece of code before the code
itself is written. The goal of this approach is to ensure that the new code
meets the required specifications and behaves as expected. In TDD, developers
write a test that defines the desired behavior of the new code, and then they
write the code itself. Once the code is written, it is run against the test to
see if it passes the test. If it does, the code is correct and is ready for
integration with the rest of the system. If it does not, the code is revised
until it passes the test.

I selected this
blog post because I am interested in learning more about Test-driven
development. After reading this blog post, I learned about the principles
and practices of TDD and how it can be applied in the software development
process. I also learned about the steps involved in TDD, including writing a
test that defines the desired behavior of new code, writing the code itself,
and running the code against the test to see if it passes. I found this process
to be logical and straightforward, and I can see how it would be a useful
approach for ensuring the quality of new code. I made use of this method (to a
degree) while working on the homework assignments for this class. I believe
that it significantly simplified the process as having a set goal in the form
of tests, made it easier to update/ add code that will work with it. Overall, I
found this blog post to be very informative and useful. I learned a lot about development
approaches, and I plan to use them for my future projects.

 

Source:

Top 6 Software Development Methodologies

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