Author Archives: Petraq Mele

Using environments to develop software

Different environments in software development, outlining the roles of Development, Testing, Staging, and Production environments.

So you want to get started with developing a piece of software but aren’t quite sure where exactly you are meant to do that. Well luckily for us we have environments created specifically for developing software.

Introduction to development environments

Put simply, it is an environment which provides developers with a workspace that features programming software and other resources and processes required to develop source code for an application.

Some key components of development environments can include:

  • A physical or virtual machine, including an underlying operating system, database system, and so on.
  • Development tools, including development environments, compilers, and libraries.
  • Data management solutions
  • Associated services, including internally hosted resources and external environments, such as those running in the cloud.

Environments must be able to support a few things like:

  • Writing code
  • Debugging
  • Testing
  • Version control

The importance of these environments

All developers can find benefits to using these environments. It helps improve productivity, stability, reliability, and more towards development. The usage of these environments speaks for themselves as to just how beneficial they truly are to software developers.

Integrated development environments (IDE):

An overview of Integrated Development Environments (IDE), highlighting key features like writing, debugging, and running code.

IDEs are a very popular form of Software development environments. Some popular IDEs, a few of which you have almost guaranteed heard of, include:

  • The JetBrains environments (CLion, GoLand, PyCharm, RubyLand)
  • Visual Studio
  • Eclipse
  • XCode
  • Android Studio
A bar chart displaying the most popular integrated development environments (IDEs) from 2004 to 2019, highlighting Android Studio and Visual Studio as top choices.

What makes these environments to attractive is that they are fairly user friendly, with a little practice of course, and paired with the fact that they can be extremely customizable therefore giving a software developer the freedom to focus on other things related to their developments.

Final thoughts

Doing my research in development environments taught me just how many different development environments there are, all useful in their own respective ways, and many open-source as well. I am used to using a few IDEs like Eclipse for Java development or Visual Studio for general development but expanding my knowledge of environments is very useful for specialized projects. If you wish to learn more I would highly suggest reading this article from devzero.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

The art of REST API design

Something I have personally never worked on as a developer is REST API. AWS is a piloting force in the sphere of web development so there was no better place to read up on this subject than there. Going through you can really see why REST API is so vital to the modern web.

An overview of REST API design principles, methods, and benefits, illustrating key concepts for web development.

What is an API?

API stands for Application Programming Interface, this defines the rules you must follow to communicate with other software systems.

API is a gateway betweek:

  • Clients: Users who want to access information from the web
  • Resources: The information that different applications provide to their clients.

What is REST?

REST stands for Representational State Transfer, this is a software architecture that imposes conditions on how an API should work. It was originally created as a guideline to manage communication on complex networks. As a result one architecture developers can use is RESTful API.

Here are some of the principles of the REST architectural style:

  • Uniform interface
    • Indicates the server transfers information in a standard format
    • 4 architectural contraints:
      • Requests should identify resources
      • Clients have enough info in the resource representation to modify or delete the resource if wanted
      • Clients receive info about how to process the representation further
      • Clients receive info about all other related resources they need to complete a task.
  • Statelessness
    • A communication method in which the server completes every client request independently of all previous requests
  • Layered System
    • Client can connect to other authorized intermediaries between the client & server, and it will still receive responses between the server
  • Cache-ability
    • Able to store some responses on the client or on an intermediary to improve response time
  • Code on demand
    • Servers can temporarily extend or customize client functionality by transferring programming code to the client.

Benefits to REST API:

Here are the few of the benefits AWS includes:

  • Scalability
  • Flexibility
  • Independence

How it works:

The basic functions are similar to browsing the internet, here are the general steps towards any REST API call:

  1. The client sends a request to the server
  2. The server authenticates the client and confirms permissions to make request
  3. The server receives request and processes it
  4. The server returns a response to the client.

The client request contains these main components:

  • Unique resource identifier
  • Method
    • GET
      • Access resources at URL
    • POST
      • Send data to server
    • PUT
      • Update existing resources on the server
    • DELETE
      • Request to remove resource
  • HTTP headers
    • Data
    • Parameters
      • Path: Specifies URL details
      • Query: Requests more info about resource
      • Cookie: Provides authentication

Final Thoughts:

My understanding of REST APIs was very limited but leave it to the best in the business to have all the information necessary to learn. I definitely think it would take time to implement nonetheless but having this basic understanding is important in the end. If you want to learn more yourself visit this page on AWS.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Importance of version control in the process of development

An infographic illustrating version control processes in Git, showcasing key operations like fork, merge, and pull request.

As a software developer version control you will undoubtedly run into version control of any projects which you are working on. Eventually a developer will have to fix bugs or add a feature to a product. In order to learn more about version control there is no better website to learn from than Github.

What is Version Control?

Illustration of distributed version control system showing interactions between developers and the main repository.

Github gives an amazing allegory: Imagine you’re a violinist in a 100-piece orchestra, but you and the other musicians can’t see the conductor or hear one another. Instead of synchronized instruments playing music, the result is just noise.

Version control is a tool used to prevent this noise from happening. It helps streamline development, keep track of any changes, and allow for upscaling of projects.

Version Control tool factors

Version control may not be necessary depending on the scale of your project, however most of the time it is useful to have it set up. Some of the factors of deciding to use version control include:

  • Scalability: Large projects with many developers and files benefit from VC
  • Ease of Use: User friendly UI helps manage learning curves and adoption.
  • Collaboration features: Supporting multiple contributors and communication between them.
  • Integration with existing tools: Using tools everyone already has access to.
  • Supports branching: Ability for developers to work on different parts of development benefits a project greatly.

Common Version Control pplications

  • Git: Git is an open-source distributed version control tool preferred by developers for its speed, flexibility, and because contributors can work on the same codebase simultaneously.
  • Subversion (SVN): Subversion is a centralized version control tool used by enterprise teams and is known for its speed and scalability.
  • Azure DevOps Server: Previously known as Microsoft Team Foundation Server (TFS), Azure DevOps Server is a set of modern development services, a centralized version control, and reporting system hosted on-premises.
  • Mercurial: Like Git in scalability and flexibility, Mercurial is a distributed version control system.
  • Perforce: Used in large-scale software development projects, Perforce is a centralized version control system valued for its simplicity and ease of use.

Final thoughts

Every developer has at one point heard of Git, and without a doubt it may be one of the best developer tool ever invented. I have prior experience using version control but this research was an important refresher to learn from. If you wish to learn directly from Github you can read the article this blog was inspired by here.

From the blog CS@Worcester – Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Refactoring your program

Sometimes when a program undergoes consistent updates it can get messy, in cases like this it can be useful to refactor it. I’ve had a few experienced cleaning a program however I have never refactored an entire program. The developers over at refactoring guru luckily have a website dedicated to this subject.

An illustrated depiction of a programming refactoring process, highlighting the importance of clean code.

Purpose for refactoring

When you refactor a program you are fighting something they call technical debt and create clean code. With clean code comes a few benefits including:

  • Obvious for other programmers
  • Doesn’t contain duplicate code
  • Minimal number of classes and other moving parts
  • Passing of all tests
  • Easier and cheaper to maintain

What is technical debt?

“Technical debt” as a metaphor was originally suggested by Ward Cunningham using bank loans as an example.

You can make purchases faster If you get a loan from a bank however now on top of principal you have interest. and with time you can rack up so much interest that the amount of interest exceeds your total income, making full repayment impossible.

The same concept can be applied to code. Speeding up without testing new features will gradually slow your progress.

Some causes of technical debt include:

  • Business pressure
  • Lack of understanding the consequence
  • Failing to combat the strict coherence of components
  • Lack of tests, documentation, communication.
  • Long-term simultaneous development in several branches
  • Delayed refactoring
  • Incompetence

So when should one refactor?

Refactoring guru comes up with a few instances on when to refactor.

  • Rule of three:
    • When doing something for the first time, just get it done.
    • When doing something similar for the second time, cringe at having to repeat but do the same thing anyway.
    • When doing something for the third time, start refactoring.
  • Adding a feature:
    • If you have to deal with someone else’s dirty code, try refactoring it first; Easier for future features.
  • Fixing a bug:
    • Clean the code and errors will discover themselves
  • Code reviews:
    • Last chance to tidy up the code
    • Best to perform these reviews in pair with an author

We know when, but how?

Refactoring is done via a series of small changes, each making the existing code slightly better while leaving the program in working order.

Here is a checklist on refactoring done the right way:

  • The code is cleaner
  • There should not be new functionality
  • All existing tests pass

Final Thoughts:

Overall, I found this website on refactoring to be really informative and would recommend refactoring guru as a starting point. The most important thing that I got out of this is that developers should always try to write clean code or clean code as its undergoing development. Unfortunately sometimes software development can be very time containing and its not always possible which is why refactoring is important.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Principle of Least Knowledge (AKA Law of Demeter)

Hello everyone, today I will be talking about the Principle of Least Knowledge (AKA Law of Demeter). When first looking into this topic I was unsure of exactly what this was and how it would be applied to programming. When doing my research I found the Khouri College of Computer Sciences at North Eastern University had a page dedicated to this topic, where this law was first introduced.

General Formulation

Illustration of the Law of Demeter, highlighting the principle of limiting interactions between objects.

The LoD is essentially a simple style rule for designing object oriented systems.

“Only talk to your immediate friends” is the motto. 

Professor Leiberherr, the author, states a formulation of “Each unit should have only limited knowledge about other units: only units “closely” related to the current unit.Its main motivation is to control information overload thus helping memory management as each item is closely related.

You can informally summarize the Law with these three formulations:

  • Each method can only send messages to a limited set of objects, namely to the argument objects and to the immediate subparts of the class to which the method is attached.
  • Each method is “dependent” on a limited set of objects (organize dependencies)
  • Each method “collaborates” with a limited set of objects (organize collaborations)

To formulate the Law we can choose from the following independent possibilities:

  • Object/Class
    • Class formulation is intended to be compile-time
    • Object formulation is intended to be followed conceptually
  • Messages/Generic functions/Methods
  • Weak/Strong
    • If we interpret it as all instance variables, including the inherited ones, we get the weak form of the Law. If we exclude the inherited instance variables, we get the strong form of the Law.

Benefits

In a paper written by Leiberherr, there are a couple facts stated for the benefits:

  • If the weak or strong LoD is followed and if class A’s protocol is renamed, then at most the preferred client methods of A and A’s subclasses require modification.
  • If the weak or strong LoD is followed and if the protocol of class A changes, then only preferred client methods of A and its subclasses need to be modified and only methods in the set of potential preferred clients of A and its subclasses need to be added
  • There’s even more benefits highlighted in the paper pertaining to limiting information overload.

Final Thoughts:

Prior to this webpage I knew nothing about this law/principle, however I now understand that it is a fairly useful rule or its respective use case. The law teaches you a way to program Classes, Inheritance, Abstraction, and a few other techniques. Infact There is so much more depth to this that I cant even fully fit it into this blog post. I would highly recommend you check out this page as It contains all the information you need along with sources to learn this.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

How to become a SOLID software developer.

By Petraq Mele

Hello again to those reading this blog, this time I want to talk about an extremely topic relevant in the programming atmosphere, that being a concept known as SOLID. I managed to find a great section written by Manoj Phandis on these principles.

SOLID is an acronym of five OOP design principles designed to help make it more understandable, flexible, and maintainable.

What are the main 5 design principles?

SINGLE RESPONSIBILITY PRINCIPLE: This principle states a class should have one, and only one, reason to change. Lets take an Animal class example, as opposed to the animal class having a sound and feed parameter, separate those responsibilities into separate classes.

Some benefits include:

  • more readable, that is easier to understand
  • less error prone
  • more robust
  • better testable
  • better maintainable and extendable
  • maximizes the cohesion of classes.

OPEN CLOSED PRINCIPLE: “Open for extension” means the behavior of a module can be extended. “Closed for extension” means when we are adding/extending a modules behavior it should not result in changes to a modules source or binary code.

Demonstration of the Open/Closed Principle in object-oriented programming.

An example Manoj gives is a credit card company wanting to introduce a new preferred credit card product with double reward points. Instead of using conditionals, you create an extension via implementation inheritance or interface abstraction.

LISKOV SUBSTITUTION PRINCIPLE: LSP states functions that use references to base classes must be able to use objects of the derived class without knowing it. For LSP compliance we need to follow some rules that can be categorized into 2 groups:

  • Contract rules
    • Preconditions cannot be strengthened or weakened in a subtype
    • Invariants must be maintained
  • Variance rules
    • There must be contra-variance of the method argument in the subtype & be covariance of the return type in the subtype
    • No new exceptions can be thrown by the subtype unless they are part of the existing exception hierarchy.

INTERFACE SEGREGATION PRINCIPLE: Clients should not be forced to depend on methods they do not use. Interface segregation violations result in classes depending on things they don’t need & an increase of coupling and reduced flexibility/maintainability.

Tips to follow:

  • Prefer small, cohesive interfaces to “fat” interfaces
  • Creating smaller interfaces with just what we need
  • Have the fat interface implement your new interface.
  • Dependency of one class to another should depend on the smallest possible interface.

DEPENDENCY INVERSION PRINCIPLE: This principle has two parts. The first part says high-level modules should not depend on low-level modules. Both should depend on abstractions. The second part says Abstractions should not depend on details. Details should depend on abstractions.

Part one example:

Part two example:

Final thoughts:

Overall these principles are very useful when it comes to object-oriented software development. I learned quite a good amount and I want to thank Manoj Phandis for their amazing outline of the SOLID principles, I would advise you to check them out in his website incase you’re interested in learning more.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Team management in software development

As a software developer there is a significant chance that you will develop software in a team environment. I know as an entry level developer gaining this experience beforehand would be a massive boost for my career but what exactly does team management entail?

The importance of team management

In a perfect world a team of developers all work perfectly together synchronously & complete a task in the best way possible. In reality, each team will have people of different skillsets, creativity, and ideas for development. Therefore, teams need to be managed in order to optimize development as much as possible.

Diagram illustrating the roles within a software project development team.

Creating a team

Before assembling a team for a project its important to highlight the scope & needs in order to figure out how many, and the type of, developers. According to itrex, some examples of developers you may need would be:

– Software Developer: Engineers and stabilizes the product & solves any technical problems emerging during the development lifecycle
– Software Architect:
Designs a high-level software architecture, selects appropriate tools and platforms to implement the product vision, & sets up code quality standards and performs code reviews
– UI/UX Developer:
Transforms a product vision into user-friendly designs & creates user journeys for the best user experience and highest conversion rates
– QA(quality assurance) Engineer:
Makes sure an application performs according to requirements & spots functional and non-functional defects
-Test Automation Engineer: Designs a test automation ecosystem & writes and maintains test scripts for automated testing
– DevOps Engineer: Facilitates cooperation between development and operations teams & builds continuous integration and continuous delivery (CI/CD) pipelines for faster delivery
– Business Analyst: Understands customers business processes and translates business needs to requirements.
– Project Manager: Makes sure a product or its part is delivered on time and within budget & manages and motivates the software development team
– Project Owner: Holds responsibility for a product vision and evolution & makes sure the final product meets customer requirements

Infographic illustrating the challenges of managing software development teams, including communication, role clarity, and meeting deadlines.

Post-team assembly

Depending on your project you now have an idea on what team you have, the next step is actually managing them. This entails setting clear objectives/goals, creating a timeline, allocating resources, setting communication strategies, delegating, implementing, tracking progress, monitoring project, managing risks/challenges & maintaining flexibility.

Overview of a project manager’s essential roles and responsibilities in software development.

Final thoughts

I now have a better understanding the importance of team management in software development. In order to maximize efficiency towards a project/goal you definitely need to manage a significant amount of aspects related to development. The ability for a team to work together is also valuable & must be taken into account. Overall, I really enjoyed researching this topic, the main sources I used in my research was this section in Atlassians website as well as this section in the itrexgroup website.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Beginners guide to Software Licensing

by Petraq Mele

Hello to all reading this blog today, the topic this time is software licensing and its importance in the development of software. I began researching about it as I had very limited knowledge about it and its importance. I ended up reading a blog written by an experienced developer named Rahul Awati titled “What is a software license?”, and I ended up learning quite a lot about the importance of this topic.

Various icons representing software licensing concepts and principles.

So what exactly is Software Licensing?

Practically speaking software licensing is a document that provides legally binding guidelines for the use and distribution of software. You can think of all software licenses as essentially a contract between the developer(s) and its user(s). It outlines the rights between these two parties for a piece of software along with the terms and conditions. All software comes with a license/product key which is important for identity & verification.

Its fairly simple to license software. Legally you already have, as the author of your software, a natural right recognized by copyright laws. If you want to add anything else to a license many developers but it in a text file within their software packages. Some sources like choosealicense.com or www.gnu.org are useful for finding templates or examples.

Some things that you may find included in a license are:
– Basic information(Names, Contacts, Address)
– Charges
– Duration
– Distribution rules
– Terms of service/cancellation
– Governing law
– Maintenance
– Etc.

Types of software licenses:

A visual representation of the 5 approaches to software licensing, ranging from public domain to proprietary licenses.

A few software licenses include:
Free and open source(FOSS): Allow anyone to use software, and even to study, change or copy its source code.
Proprietary: Often referred to as “closed source”, this software has strict rules towards obtainability & alterations.
Public domain: Like open source but should be cautiously used by businesses as it might not meet their expectations.
Lesser general public: Developers can link to open source libraries within their software and use any licensing type for the code.
Permissive: Allows users to modify & distribute a piece of open source software but with some requirements for them as well as preservation of license notices, copyrights, or trademarks.
Copyleft: Open source as long as they make the modifications freely available. New products containing old code with a copyleft license must comply with the restrictions laid out in the old code’s license.

Why do we need licenses?

Licenses are important because of all the reasons we have outlined earlier. It helps protect both the developer & the user.

A few beneficial protections for developers include: Protection of intellectual property, ensuring control over their creation, limiting liability, & monetization of products.

As for the users, the benefits are: Prevents misuse/unintentional mistakes causing damage, protect from infringement claims/ liability, create positive relationship with other developers/users/vendors, & establish clear parameters of how many licenses an organization needs.

Based on these few protections you can see the importance of licensing. It keeps a professional structure towards the spread of software and encourages a just environment.

Final thoughts

Understanding software licensing is something each software developer should take the time to learn whether for their own personal gains, or as a way to safely use/produce software. Aside from the legal aspect of it, licensing is about respecting a developer and their work. As I mentioned earlier I want to give credit to Rahuls’ amazing blog as inspiration for mine. Be sure to read his blog if you want more insight on this topic.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Software Process Management Introduction

Petraq Mele

This is the blog where I will be posting things related to this course, I am excited to learn and write about this course in this semester.

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.

Software Construction, Design, & Architecture Introduction

Petraq Mele

This is the first blog for this course, I am excited to learn everything it has to offer.

CS-343
CS-443
CS@Worcester

From the blog Petraq Mele blog posts by Petraq Mele and used with permission of the author. All other rights reserved by the author.