Author Archives: CoffeeLegend

Software Frameworks

One day we played with “Hello world”, a couple arrays, and some text input from the user, and the next, we messed with a small terminal-based game, and ran an algorithm on some data. Up to this point, much, if not all, of the software most students have produced has been a relatively small, fairly local program, communicating with no more than a few other files within the same application, or to a tool like Docker.

When it comes to building applications with feature-sets that a business needs to operate smoothly, and ultimately make money, the scale and complexity of the applications being developed grows rapidly. Developing software to fully satisfy business requirements can be a very complicated and tedious process, and that is just the reality of engineering software.

In light of the challenges of efficiently and reliably producing software that works for a business’ use-case, developers have come up with many ways to streamline the process. One of the most popular ways to do this is to utilize a “framework”. To gain a better understanding of what a framework is in software engineering, I read through a blog post on Contentful, linked here:

https://www.contentful.com/blog/what-is-a-framework/

A programming framework is essentially a pre-built skeleton for an application. There are many different types of framework, those for the frontend, the backend, servers, mobile, and whichever it is, ultimately the goal is always the same; almost every application ever made is going to use these exact same functionalities, so now they are just bundled together for us to extend with our specific business logic.

Naturally, having a ton of parts of your application already put together and ready to be extended comes with major advantages, and unsurprisingly, a couple potential disadvantages.

The most significant upsides for frameworks come in the form of faster development, fewer accidental set-up errors, built-in security, and a baseline ground-level for applications, so all developers can know we’re working with a “Django” framework, for example. All of these benefits are massive, for both developers, and businesses.

The downside with a framework is that it’s already put together as it should be, and you probably shouldn’t change that skeleton, leaving you with less freedom to develop the application exactly as you might like. It also requires onboarding developers into that framework, as even if someone has worked with Python before, using the Django framework requires learning some more specific implementation methods and best practices related to everything Django is, not just Python.

I’ve enjoyed reading about software frameworks, as even though I’d heard of Angular, or Ruby on Rails, I didn’t fully understand what exactly was so important about these frameworks, and why so many of them were present on job postings everywhere. After reading about them, the answer couldn’t be more obvious. Professional developers will utilize these tools to improve and streamline their workflows, and that’s that!

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

Software Architecture Patterns

Architecture of software systems is not something I’ve delved into very deeply in the past. For the most part, the systems I’ve worked on have been mostly self-contained and small-scale, and only recently, particularly in my work environment, have I been exposed to the importance and relevance of architecting the entire system in a smart manner, which involves much more than just the code lines within.

As I learn to develop larger-scale software, it becomes increasingly important for me to develop a capability of looking at the big picture, goals, and possible implementations of a desired software system. The number of individual moving parts just grows and grows when you need to accommodate logic, data, processes, and more, and I need to be as capable as possible of designing and implementing them, or otherwise working within them, while having an understanding of how they work, and how they affect what I’m making.

Software architecture concerns the overall structure of a system, including its components, relationships, and guiding principles.

The ultimate goal of thinking about your software’s architecture is to aid you and your team in creating the most performant, maintainable, scalable, and secure software systems possible for your use case and business requirements.

In order to learn more about architecture, I decided to take a look at a post on GeeksForGeeks that takes a look into the different types of architecture styles, their use cases, advantages and disadvantages, and inherent limitations.

https://www.geeksforgeeks.org/software-engineering/types-of-software-architecture-patterns/

The post explained how architecture patterns exist, just like design patterns do, and how they differ. Conceptually, the design patterns are lower-level implementation strategies, involving the individual components of a system, such as the Duck Simulator’s “factory” design pattern option. Architecture patterns, on the other hand, involve higher-level strategies for the entire software system, like the concept of client-server architecture, which will almost certainly now require some web-based components, or the concept of layered architecture, which involves splitting the system into four “layers”, the presentation layer, the business layer, the application layer, and the data layer.

Each architecture pattern has advantages and disadvantages just as the design patterns do. For example, the layered architecture pattern splits the system into four specialized parts, allowing for a more focused scope within each component, as in, the presentation layer is focused on UI components, and the data layer focuses just on data writing, retrieval, and storage.

Having a plan goes a long way when it comes to building software, and understanding architecture patterns is just another way to get better at planning, and working within, great software. I’ll continue to keep these concepts in mind as I create and work on more systems, and further my understanding of software architecture.

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

REST APIs and Data

I decided to dive further into what REST APIs really are, and how they are used, as they now appear both in my course syllabus, and as a possible solution for progressing my own internship work.

While searching for information, I came across a blog post titled, What Is a REST API? Examples, Uses, and Challenges (https://blog.postman.com/rest-api-examples/). This post goes over what REST APIs are, how they are used, and what you can do with them.

The post also included a YouTube video, demonstrating setting up a REST API, and this part I found particularly interesting. I saw the person in the video utilize GET, and a command to filter for a specific Id associated with the data they wish to retrieve. This rings a bell for me, as I index database instances with an Id very often at my workplace. As I now need to export some of the data produced by my workplace software, in particular by fetching and filtering various attributes such as by Id, for other platforms, utilizing a REST API to aid me in transferring data could provide the data bridge I need to produce analytics from the software I’ve created.

The post delves into the history of the APIs as well, and talks about how REST can be more efficient than SOAP, and how big names like Facebook and Instagram utilized, and still do utilize, REST APIs to transfer data for their users. I was also intrigued to find out that the Amazon S3 storage buckets also utilize REST APIs, and I’ve worked with them in data courses already.

Some of the benefits of using REST APIs include scalability, flexibility, portability, light-weight, and language/platform independence.

The challenges that need to be accounted for when using REST APIs include ensuring endpoint consistency, keeping the URL structures uniform across teams, versioning, maintaining old APIs while introducing new ones, authentication complexity, including basic or bearer tokens, API keys, or OAuth tokens and passwords, as well as accounting for and preventing security risks, such as through encryption, or protecting keys.

Some best practices recommended by the poster include using correct HTTP status codes, 200, 400, 404, etc, returning informative error messages, making sure to secure your APIs via encryption, input validation, and role-based access. Documentation is also naturally very helpful for reminding yourself what you’ve done or made, and share that information with your team or other coders.

I hope to successfully implement a REST API in the near future!

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

Introductory Post – CS343 – Software Construction, Design, and Architecture

Constructing, designing, and architecting software comprises a vast set of topics. I’ll be learning about proper methods and ways of thinking in terms of creating useful software over the next semester.

As I progress through a course on these topics, I will share related independent research that I work through within these ensuing blog posts. Here’s to a successful and educational time with this course!

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

Learning About Spies in Unit Testing

In my software testing class, we’ve been learning a lot about unit testing and how to make sure our tests are clean and focused. For our group project, I needed to learn more about spies specifically. I came across a blog post on testRigor called “Mocks, Spies, and Stubs” that seemed to offer everything I wanted. I already knew a good bit about mocks and stubs, but spies were still kind of confusing to me, and it doesn’t hurt to review.

Summary of the Blog Post

The post explains how testing tools like mocks, stubs, and spies help isolate the code you’re testing. That just means you’re testing one piece of code without depending on other stuff like a real database or API.

Spies are used when you want to track what happens during a test. For example, you can use a spy to see if a method was called, how many times it was called, and what it was called with. What’s different about spies is they don’t change what the function does unless you want them to. They just track what happens for you.

Why I Picked This

I picked this blog because we’ve been working on our spies POGIL, and we haven’t covered these ourselves in class. I figured now was a good time to figure it out. It also helped me understand how spies are different from mocks and stubs, which I didn’t fully get before.

What I Learned

The main thing I learned is that spies are great when you want to see what a method did without actually changing how it works. That sounds really useful for stuff like tracking clicks or making sure a method only runs once. It also helped me realize that mocks and stubs have different purposes too, as mocks check behavior and stubs give fake data.

How I’ll Use Spies

I think I’ll try using spies when I need to test things that happen in the background or when I just want to see if something got called. They seem useful when you don’t want to mess with the actual code but still want to make sure it’s doing what it’s supposed to, and in a pretty safe manner.

Conclusion

After reading this blog, I understand spies way better. They’re another helpful tool for writing good tests, and now I know when to use them instead of just guessing.

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

Understanding Mocks and Stubs in Testing

In software development, testing is key to making sure applications work the way they are supposed to. The blog post “Software Testing: Mocks and Stub” by Nicholas Lexi talks about two major tools in testing: mocks and stubs. This connects closely to what we have been learning in class about unit testing and keeping tests focused.

Summary of the Blog Post

The post starts by explaining why test isolation matters. When testing a piece of code, you want to make sure you are only testing that piece, not its outside dependencies. This keeps tests more reliable and easier to understand when they fail.

To help with isolation, the blog introduces mocks and stubs.

Mocks are fake versions of real objects that let you check if your code interacts with something the right way. You can use mocks to see if a method was called, or if it was called with the right information.

Stubs are simpler. They just return fixed responses when called. Stubs are useful when you want a test to run without relying on a real database, server, or other complicated system.

The post gives short examples showing how both mocks and stubs can be used.

Why I Picked This

I picked this post because we have been working with unit testing in class, and I wanted to better understand how mocks and stubs fit into writing cleaner tests. I had heard about them before but did not really get how they were different. Since isolation is so important in testing, I thought it made sense to dive deeper now.

Thoughts and Takeaways

One thing that stood out is how mocks and stubs have different goals. Mocks check behavior and stubs control data. That makes it easier to decide which one to use depending on what the test is trying to do.

Another big takeaway is how test isolation is about more than just making tests pass. It is about writing tests that fail for the right reasons, which makes fixing problems a lot easier.

Applying Mocks and Stubs

Going forward, I want to use mocks and stubs more when I am testing. Especially for anything that depends on APIs or databases, they will help keep my tests clean and focused. Practicing this now will help a lot when projects get bigger.

Conclusion

This blog gave me a better understanding of mocks, stubs, and why test isolation matters. Using them the right way will definitely help me write better, more reliable code.

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

Why Test-Driven Development Is More Useful Than I Thought

In software development, strong design habits are key to building software that is easy to understand and change. The blog post “Test-Driven Development: The Best Thing That Has Happened to Software Design” from Thoughtworks talks about how Test-Driven Development, or TDD, improves both code quality and design. This connects directly to what we have been learning in class about writing better, more reliable code.

Summary of the Blog Post

The post explains that TDD is not just about writing tests before coding. It is a way of working that leads to cleaner, better-organized software.

Writing tests first forces developers to think about what they want the code to do. It also leads to smaller, more focused units of code that are easier to test and maintain.

TDD also encourages better object-oriented design. Since you are planning behavior early, classes and methods tend to have clearer responsibilities. Another major point is that TDD makes refactoring safer, since a full set of tests can quickly catch mistakes.

Even though TDD can feel slower at first, the blog points out that it saves time in the long run by reducing bugs and making changes easier.

Why I Picked This

I picked this blog post because we have been learning about TDD in class, and I wanted to understand why it is considered such a big deal. Before reading this, I thought TDD was just extra work. This post showed me that it is really about designing better code from the start. Since TDD is common in real-world development, it made sense to learn more about it now.

Thoughts and Takeaways

One thing that stood out to me is how TDD helps you spot design problems early. If your code is hard to test, that is usually a sign it needs to be simpler. I had not thought about testing as a way to catch bad design, but now it makes perfect sense.

Another takeaway was how TDD makes refactoring less scary. In the past, I was nervous to change code that already worked because I was afraid of breaking it. With a strong set of tests, making improvements feels a lot safer.

Applying TDD

I want to start practicing TDD more, even on smaller projects. It might take some extra effort at first, but if it helps me write better, more flexible code, it is definitely worth it. Getting into good habits now will only help me later on bigger assignments and real-world work.

Conclusion

This blog post gave me a much better understanding of why TDD matters. It is not just about finding bugs, it is about building software that is better from the start. I am definitely motivated to practice TDD more and make it part of how I approach coding.

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

Software Quality Assurance & Testing

This is the start of a blog series for a class I’m currently taking, named as per the title. This will document some of the journey I go on as I discover how Q & A is performed on software. I can’t wait to keep on learning!

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

Understanding the Software Development Life Cycle (SDLC)

In software development, having a structured plan is crucial for creating reliable and efficient software. The blog post “What Is the Software Development Life Cycle (SDLC)?” explains what the SDLC process actually is. This directly relates to our coursework, as it lays out the core stages involved in creating software that we’ve discussed in class.

Summary of the Blog Post

The post breaks the SDLC into six main phases:

1. Requirement Analysis – Figuring out what the software needs to do.

2. System Design – Mapping out how the system will work.

3. Implementation – Writing the actual code.

4. Testing – Making sure everything functions as expected.

5. Deployment – Releasing the finished product.

6. Maintenance – Keeping the software updated and fixing bugs after launch.

The post also touches on different SDLC methodologies like Waterfall, Agile, and DevOps.

Why I Picked This

I chose this post because the SDLC is something we covered in class, and I felt like I could benefit from looking into it more. This post explained things in a simple way that helped me review and learn more about the process. Plus, SDLC is something I’ll definitely encounter in any future dev job, so it feels suitable to dive deeper into it now.

Thoughts and Takeaways

This blog really helped me get a better grip on SDLC. I knew the general ideas, but breaking down the phases step by step helped me realize how important each stage is. For example, I hadn’t thought much about how critical the requirement analysis phase is. If you get that wrong, everything else suffers!

I also liked the section about Agile. I’ve heard a lot about Agile but didn’t fully get how it compares to other models like Waterfall. The idea of working in iterations and being flexible with changes makes sense, especially for real-world projects where things don’t always go as planned. I think this will be useful for group projects where feedback loops are constant.

Another thing that stood out is how much emphasis the post put on maintenance. In class and in the blog post, its been made much more clear that maintenance is actually the far lengthier phase, and sometimes never really intended to end.

Applying SDLC

Going forward, I’m going to start structuring my projects with SDLC in mind. Even on smaller assignments, I’ll try to break tasks into phases, just to get into the habit. I also want to experiment more with Agile practices in team projects since it seems to encourage collaboration and adaptability, and is mentioned in a decent amount of job posts.

Conclusion

This blog post gave me a much clearer understanding of SDLC and why it’s such a core idea of software development. It affects nearly every bit of how software comes to be, and all software developers will encounter or deal with it in one way or another!

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

What is Git?

A Beginner’s Guide to Git and Version Control

Git is a useful tool for software developers, yet its many features can be intimidating or confusing to beginners. This GitHub blog post “What is Git? Our Beginner’s Guide to Version Control” offers a clearer, more concise explanation of Git, its purpose, and what its practical applications are. This blog post is an excellent resource for anyone early on in their journey through software development, as the knowledge will be useful for years to come. I myself still needed some more practice with git commands, and benefited from reading the post.

Summary of the GitHub Post

The post explains important concepts such as what repositories, branches, commits, and merges are, and emphasizes how Git helps developers collaborate effectively on projects while maintaining a complete history of those changes.

The author discusses and defines many crucial Git commands like git init, git clone, git add, and git commit, breaking them down into much simpler, more easily understandable terms. Lastly, the post also discusses the importance of version control systems like Git and GitHub in preventing data loss, enhancing collaboration, and improving code quality overall.

Why I Chose This Post

I chose this post because Git is a critical tool in software development and is directly related to our current course material. As someone with limited experience with Git and GitHub, I often had to practice extra with its terminology and commands. Understanding Git is vital for success in our coursework, and future careers in software development, where collaborative coding is a big deal and a common occurrence.

Reflection

One takeaway from this post and course for me was the significance of version control in teamwork. The post reinforced the idea that Git is not just a tool for managing personal projects in the way that I have experience using it, but also a way to collaborate more effectively with others on software projects.

Upon learning all this about Git and GitHub, I planned to apply what I’d learned by setting up repositories for all my future projects, creating meaningful commit messages, and leveraging GitHub to store and maintain my history of works. Through that, I’ve been able to build up my own portfolio and showcase my works to others.

Conclusion

This blog post serves as an excellent starting point for anyone looking to begin learning Git, and to understand its role and uses in version control. Its practical approach and clear explanations make it accessible to complete beginners, while laying down the foundation for much more advanced concepts later on down the line. As I continue my journey in software development, I’m confident that the skills I’ve gained from this resource will be invaluable, and I do continue to use Git and GitHub very frequently.

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