Category Archives: CS-348

Uncle Bob – Lesson 1

In this presentation we are presented with a veteran of the IT industry, an author of the AGILE manifesto and manifesto for Software Craftmanship, and a man who hates that AGILE has been kidnapped by consultants and conference organizers and abandoned programmers, Robert C. Martin or better known as Uncle Bob. Now I wanted to watch this because I wanted to understand who this Uncle Bob person was and what he really meant by “Clean Code”. Uncle Bob’s first lesson starts off by giving us some examples of the scope and reality of software in our current day and age. He tells us how a person generally “can’t go more than 60 seconds without interacting with a software system” and then imparts some quick knowledge about why programmers are so slow. After this he then begins to break down this concept of “Clean Code” showing us what established and respected programmers think it us and giving us some examples of horrible first drafts of code that are nearly unreadable. Then after this showing us what refactoring this code looks like and then after this explaining some essential rules to follow when making your code clean. First and foremost, I really like listening to Uncle Bob as presents a lot of this information in an easily digestible manner and has excellent oratory skills that helped me really stay focused on the topic. The actual topic at hand was actually rather interesting, such as Uncle Bob explaining how teams get progressively slower and slower as they add features into a program due to the program becoming a bit of a monolithic mess. Or outlining a rule for functions to be as small as possible as “Long code is bad code”. Some of the topics Uncle Bob talked about were things I had no idea about like this Lambda feature he kept talking about in Java code, but that’ll have to be something I look into in the future. I think personally all of this has really given me a better perspective into what I should expect to be doing as a developer and how I should think about my code as I’m writing it. Mainly how my code should be organized and structured and especially what my workflow would look like, where I first write the code and get it working and then go back and make it clean. In the future I fully expect to be administering these principles into my code and career, and it would probably make sense to continually do this as it will not only make all my work easier for myself but also easier for my colleagues.

-Antonio Romeo

Also, here’s a link to Uncle Bob’s first lesson.

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

Code Review

For my first real blog entry, I would like to talk about Code Review. I chose this topic because we are doing in-person activities based on clean code, in my Software Process Management class. When discussing how to make code cleaner and more readable, I looked more into the topic for more information. Code Review is a process performed by a person or more to examine and improve the code. I found this blog titled “How to Review Code – Tips and Best Practices” by ‘AK DevCraft’ and noticed that some of the points and practices are the same as we learned in class.

The blog highlights three important tips to be aware of when reviewing code, the first tip being Intention. This tip explained what the dos and don’ts are when reviewing code. When you review someone’s work, it’s pivotal to be positive and respectable. Giving constructive criticism, and explaining precisely what changes need to be made to improve the code. The blog also made sure to emphasize not to leave comments where you didn’t need one. Adding multiple comments to code is unnecessary and makes the code harder to read. The summary of the first tip was to be respectful to the ones who wrote the code and make it a collaboration when reviewing the code.

The second tip the author said was important was Standards. When reviewing code, making the code easy to read while making it easy to understand is what coding is all about. This can be done by sticking to a consistent format, which can be having meaningful whitespace, removing unnecessary gaps, or breaking larger functions into smaller ones. Understanding the standards of variables by creating clear and concise names for every variable. By knowing to avoid abbreviations and add values to variables such as “gallon” or “mL” to make the variable clear on what unit it is. A good practice we learned in class is to avoid duplication, duplication of code can lead to unnecessary code or more confusing messes like bugs or error messages.

The last tip the author highlighted was to review. When finishing the code review, keeping the big picture in mind can verify if your changes were necessary. GitHub is a platform we are using in class for our in-class discussions the platform has a review system to look over the source code and can help you double-check the code.

The blog shined a light on tips I believe are important when reviewing code, when my group did discussions on reviewing code, we used the same tips listed in this blog in our discussion. The blog gave me information on taking reviewing code to the next level, informing me of the GitHub feature to review the source code and always keeping a strict format in mind when reviewing code. I would recommend this blog to someone who is new to reviewing code or just wants a different approach when reviewing code with another person.

Source: https://dev.to/akdevcraft/how-to-review-code-2gam

From the blog Mike's Byte-sized by mclark141cbd9e67b5 and used with permission of the author. All other rights reserved by the author.

On the subject of Clean Coding…

This week, I am going to provide some insights/opinions regarding the practicality of some clean code principles, along with an example of when over-optimization for the sake of readability might actually be counterproductive. The resource I will be referencing this week can be found here. This article documents many of the same clean-code principles we discussed in class, plus or minus a few. For each principle, it provides an explanation as well as a coded example to demonstrate the principle and/or the difference between good and bad code according to the principle. I chose this article because I felt it was comprehensive enough to cover the key points for clean coding, and because I tend to use many of the principles outlined in the article in my own code.

I am currently involved in a project where the Single Responsibility Principle (SRP) might actually be counterproductive to my primary objective. In general, I tend to agree with this principle, and I understand its benefits well. It makes code far easier to read and follow, and, as we discussed in class, modern compilers can optimize functions to where there is almost no difference in execution time by offloading logic into its own function.

My program runs an ultra-fast search on a set of numbers (speaking very loosely), and needs to update numbers around 250 times per second. Thus, my time to find what I am searching for and act on it is ~4ms before all the data is useless (think: cracking Enigma in The Imitation Game). Now, factor in that I need the majority of the ~4ms to actually execute based on my search result, and one arrives at the conclusion that the search needs to take <1ms (or as little time as possible). Now to my point: sometimes, to accomplish this, I found that I had to violate the SRP. This means that I call search(), and search() immediately calls execute() if it finds what it’s looking for, eliminating the time it would have taken to return the value to main() and then pass the value back to execute(). This is obviously a miniscule difference, but in my testing and gathering data, I found that when multiplied out to larger and larger numbers, this little hack shaved off a noticeable amount of time.
This might all be more related to Command-Query Separation or the “No Side Effects Principle” than it is to the SRP, but my points still stand. What I am getting at in the big picture is that these principles, while applicable and preferable a massive portion of the time, are not always the right way to go. Sometimes, you have to sacrifice one or more in pursuit of your primary objective. All this said, my largest takeaway going forward is that I should remember and implement clean code principles whenever/wherever possible, but I will always try to remember that they are not law, and sometimes variance is necessary.

From the blog CS@Worcester – Mr. Lancer 987&#039;s Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Learning the Basics of Software Copyrighting and Licensing

When I first started studying how code and software is protected by law, I was lost. I’d never explored the realm of who owns what, or when one can utilize another’s code. I decided to delve further into these concepts after I was inspired to by a software development course.

I came across two fantastic pages on TechTarget, one on software licenses, and the other on copyright (1,2), that covered many topics of software law, including what licenses and copyrights are, do, and where they come from. Through reading these pages, I developed a better understanding of the these legal topics.

Licenses

Licenses are contracts between the people who developed or own the software, and the people or organizations who want to use the software. They cover how the software can be used, what the rights of the owners are, and what the users are allowed to do with the software. They can also include how the software is paid for, how many copies can be downloaded, or what level of access to the source code users can have.

This image from TechTarget gives an overview of strictness of different types of software licenses. To apply a license to software, the legal text of the license must be included with the software when shipped. This can be accomplished by including a file called “License” that contains the legal text alongside your software.

Obtaining a license from the software owner generally involves paying the owner to use the software. An example of this exchange is when someone purchases a video game. The person pays the price of the game, accepts the end-user license agreement upon loading the game up, and can then use the software forever.

This concept of payment for license is essentially the same when scaled up for business applications. One company can pay a software company for the license to utilize their software. This will likely cost more money than purchasing a video game, and can potentially involve other stipulations depending on license choice.

Copyrights

Copyright prevents others from copying or otherwise exploiting your creations, but works differently than licensing. For one, copyrighting in most countries, including the USA, is automatic. When software is written, the developer, or company the developer works for, automatically gains copyright over that work. This prevents others from stealing, reusing, or altering the work without permission. The copyright holder can also formally apply for a copyright with their country’s relevant organizations.

Interestingly, copyright can have a time limit in terms of years, with some companies, such as Disney, fighting to lengthen or alter the laws to allow them to protect their original mouse design for as many years as possible.

One huge difference with copyrighting is that someone else can use parts of your work legally without specifically asking you or your company. This is called “Fair-Use” by the non-owner, and includes uses such as for criticism and comment, parody, education, public good, and non-commercial activities.

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

On the subject of Licensing your Code…

This week, I am going to discuss the importance of licensing your code – something that I did not know was important until this week. The blog post I will be referencing can be found here. I chose it because it provides both a simple explanation of the importance of licensing and it explicitly describes the fallacy that causes most developers (myself included) to not license their code. The blog also references some of the same specific licenses we discussed in class, which (along with some research) indicated to me that there is a small set of very popular licenses that can serve a variety of purposes and target a variety of different intents and audiences.

After reading this blog post, reading others, looking at different open source projects on GitHub, and having discussions in class, the conclusion I’ve come to is this: the top reason people don’t license their code is because they don’t understand that licensing actually gives people more rights, not less. Many (again, my prior self included) likely think that if you just code something and throw it onto GitHub, that anybody can use it as open-source. This is not the case; that is actually incredibly restrictive, because you own the copyright to that work, and nobody can use that code without running into some legal barriers. Whether those barriers will ever be realized is another question, but not including a license may be enough to deter people from expanding on your work. A well-chosen license clearly communicates how others can use, modify, and distribute your work. This not only protects the rights of the original creator, but also allows others to expand on the work without the constant worry of stepping on legal toes. Licensing is better thought of as a way to invite others to engage with your code, rather than a barrier that restricts access.

The MIT License, to give an example, is concise and straightforward, allowing users to do almost anything with the code, as long as they include the original license and copyright notice. This simplicity has made it a favorite in the open-source community, encouraging collaboration and making it easier for developers to share their projects without too many legal constraints.

Understanding code licensing not only protects your work but also leads to a more collaborative and innovative development environment. Whether you want to encourage broad usage with an MIT license or ensure that your project remains open-source with a GPL, the right license can significantly impact how your code is shared and utilized. Moving forward, I plan to include licenses in any open source code I write. Though I never thought it was important before, I’ve learned now that it actually is critical if I want my code to actually be usable by others.

From the blog CS@Worcester – Mr. Lancer 987&#039;s Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Scrum

Pushing the Ball Forward Together

Photo by Ollie Craig on Pexels.com

Hello Debug Ducker here and recently I studied a framework used by Software Developers referred to as Scrum. Scrum is a framework that is meant to help teams find adaptive solutions for complex tasks. In layman’s is, it is a way to get hard things done small pieces at a time.

If you are wondering if Scrum is an acronym, well no it is a reference to a scrum in rugby in which teams in rugby work together to move the ball forward, which relates to teams working together to move the product forward.

The idea of Scrum is based on empiricism which is a theory that knowledge comes from experience and lean thinking to which means to focus on the essentials. The Scrum framework consists of the Scrum Team which encompasses the Product Owner, Developer, and Scrum Master who have different accountabilities on a project.

There are also very important pillars to take into account when talking about sprint which are Transparency, Inspection, and Adaptation, which can’t work well without each other. Inspection and adaption work as there is a lot of ongoing feedback during the process.

I was interested in the topic as I have recently learned about it in my software processes class and wanted to share my thoughts on it. As my understanding of it goes, it is based on reducing complexity by having different roles and small teams to handle the task. It also has steps that should be followed that are in specific time boxes, time boxes being the maximum amount of time the step can go on. The Scrum involves a time length for the task, referred to as a Sprint, that goes on specifically for 1 month or less.

I can see myself using this framework in the future, as it helps make those complex tasks easier to handle, especially in group projects. If a task is too great, then perhaps Scrum should be used to make sure the task is not as bad and easier to handle for the groups’ sake. Even though Scrum in this instance refers to Software Development, I can see it being used in other possible fields that involve working together, but that’s just me. There is more to Scrum than just what is referred to here, there is a free guide online that I recommend any viewer interested in software development to check up known as the Scrum Guide that can guide you through it. The link to is down below.

The Scrum Guide

 That will be all from, have a nice day.

The 2020 scrum GUIDETM. Scrum Guide | Scrum Guides. (n.d.). https://scrumguides.org/scrum-guide.html#the-sprint

What is Scrum?. Scrum.org. (n.d.). https://www.scrum.org/resources/what-scrum-module

From the blog CS@Worcester – Debug Duck by debugducker and used with permission of the author. All other rights reserved by the author.

version control

For this week’s blog post, I will be focusing on Version control. Version control is a software tool  that helps software teams and programmers keep track  of updates when working on a project. In a software team, there are multiple people in a group and there are multiple changes made  in a project. Multiple users in a team are working on different files under the same project folder, and  through version control  each team mate’s work progress is saved. For software teams and programmers, through version control, updates and changes in a project folder can be traced, and a user can view what lines in a file have been modified, deleted, added. During times when dealing with errors, with  version control  users can track back to where exactly in their code an error is occurring.

When I was choosing a topic for this week, this topic was important to me because I wanted to build upon what I know about git. I am glad that in this course we are going to spend time on git. Over the summer, I worked on a few different software projects. When I was first starting off, I didn’t know much about version control. As time went on, I became familiar with how  version control works. I had used a version control called Git. With git, I was able to use version control in visual studio code. When I was doing these projects, I wished that I had used version control to fix or prevent errors. In  Introduction to programming and in unix programming, we are taught   to test or run code in small bits,  and not build a whole program and run it at once. When I was doing these projects, I was building a whole program and running it, but as time went on, I realized that I should work with simple parts of code at a time. 

Moving forward, I want to double check my code, and I can do that through version control, and make that when working with code to apply the techniques taught to me in previous classes. For software teams, there  is a branch where software teams work independently on parts of a project,  and can merge their parts together. 

Branch can be effective as teammates can work on their parts  of code, make sure there are no errors, and bring together their error free parts of a  program. 

Blog url:  What is version control | Atlassian Git Tutorial

From the blog CS@Worcester – jonathan&#039;s computer journey by Jonathan Mujjumbi and used with permission of the author. All other rights reserved by the author.

Scrum: Is it really that bad?

I was reading an article called “Why Scrum Fails” by Jason Godesky. The link is here: Why Scrum Fails | Better Programming. It is pretty a list of much all the pitfalls Scrum contains. The author lists many points for why Scrum is not a good wat to achieve Agility. He criticized the increments saying that they do not focus on customers and giving working software. He then criticizes self-managing teams by saying that managers can interfere. They could see their positions threatened, since there are no managers in scrum teams, and try to squeeze themselves into teams. Managers may try to take management task from the developer’s shoulders as a good gesture but in actuality they take away the team’s autonomy. No one is willing to just give up their role in the company. The author also mentions a “monkey’s paw” situation where companies that want to have a quick and painless way to improve output get it and later stunt the company growth. This is mainly because companies refuse to use Scrum to transform the company but instead delegate it to a developer only thing.

This made me think of what I learned previously about Scrum. I thought it was a structured and reasonable process. First there is the Sprint where ideas turn to value. Then Sprint Planning to plan for the work that will be done. Then the Daily Scrum which acts as a progress report. After that the Scrum Review which inspects outcomes and determines future adaptations. Finally, Review Retrospective which plans for the future. All of this seems reasonable. Although, after reading the article I can start to understand the criticisms. There is no role for the managers. But to counteract this I want to add that the managers could just become Scrum Masters. Maybe the role could be divided into two and have middle managers be involved. Also, there is no focus on working software but that could be added to the Definition of Done. Easy fix. To be honest it is strange to be introduced to something as a positive and helpful and then to immediate learn that it has so many faults.

To conclude, Scrum is not perfect which makes sense since it is man made. Also, a lot of the problems in Scrum is just how the companies enact it. For example, one critism was that Scum is mostly limited to developers and not companywide. Still there are still flaws. Nevertheless, I still think it is relevant to companies and would like to use it in the future. Overall, Scrum is not scum.

From the blog CS@Worcester – My Journey through Comp Sci by Joanna Presume and used with permission of the author. All other rights reserved by the author.

Performance Testing – should never be overlooked

URL: https://blog.scottlogic.com/2024/09/17/performance-testing-the-often-overlooked-ingredient-in-web-application-success.html

Performance testing—the often overlooked ingredient in the success of web applications—was written by Andrew Whitmell. In his post, Andrew explores a certain type of software testing method that he claims is sometimes overlooked. He also discusses various topics to show that performance testing is vital. One of his main points is that, over the years, users and companies have been seeking more and more performance. As Andrew demonstrates with various external data, better software performance leads to better business performance. The different topics presented by Andrew relate to the various benefits that performance testing brings.

I always try to break down my process of selecting something to read or listen to into steps. I do not like to base my decision solely on an article’s title, as it can be misleading. However, I tend to read the article’s title, open it, and also read the subheading. First, Andrew’s title caught my attention because he considers performance testing something that is often overlooked. In my opinion, performance testing should be a priority among testing methods. I chose to write about this post because it presents a different point of view from mine. An application, or the idea of an app, always arises from a need to resolve some kind of issue. Taking this into consideration, we can say that performance should always be a goal of any application.

I would like to highlight a couple of topics covered by Andrew, namely the identification of bottlenecks, the optimization of resource utilization, and SEO boosting. I had not heard of bottleneck identification as a method for improving application performance. Interestingly enough, I was talking to a friend of mine a few days ago about software runtime complexities. We discussed a well-known programming problem called Two-Sum, and he mentioned that utilizing hash maps for this problem improves the runtime complexity from O(n²) to O(n). Just as Andrew points out, the identification of existing bottlenecks in an application can enhance its performance.

The optimization of resource utilization involves testing the program under extreme conditions that are not expected to occur daily. The results from such testing will allow us to identify whether we can better utilize what we have or if we are overspending on certain services. I would also like to mention that SEO boosting is vital for large companies, but not as much for small or local ones. I have seen many local or small companies that do not necessarily provide a web application but have a website for their product. Most of those companies overlook SEO boosting. The amount of time users spend on a certain page depends on its performance, and SEO rankings are highly affected by performance.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

The downfall of “Scrum”

This week, I will discuss the subject that was recently discussed in class. The topic is “Scrum”, understanding its purpose, application, and limitations compared to Agile. Understanding the specifics of Scrum can enhance teamwork within projects, particularly in software development, where it is a widely utilized project management approach.

The information I researched offered a detailed explanation of the factors that could lead to the failure of Scrum. An essential realization was that following Scrum rules without adapting them to a team’s specific needs could result in too much inflexibility. This really affected me because I have seen situations where teams got stuck in processes and forgot the main objective: delivering value to customers. It caused me to think about past projects in which team members prioritized adhering to protocols over achieving the end goal of creating a useful, practical product. The resource I examined offered a detailed explanation of the factors contributing to the possible downfall of Scrum. One crucial finding was that adhering strictly to Scrum guidelines without adapting them to suit a team’s specific needs could result in too much rigidity. This had a significant effect on me as I have seen situations where teams got stuck in processes, ignoring the main objective of delivering value to customers. It led me to think about past projects where team members prioritized following procedures over delivering a successful, useful end product.

I found out that Scrum offers a structured way of working, but its success depends on teams embracing Agile principles, not just following a set of tasks. The article pointed out that even the best-designed Scrum plans may fail if team members lack commitment or the necessary skills. This has emphasized the significance of establishing a solid team environment in which every member is valued and motivated to take part. The article also delved into how focusing too much on Scrum practices could result in unnecessary bureaucracy, hindering efficiency and restricting innovation.

I chose this blog because I plan to incorporate these lessons by promoting a culture of flexibility in my team. I intend to prioritize the Agile principles of collaboration, customer focus, and adaptability over strictly adhering to Scrum methodologies in our process. Regularly meeting with the team to evaluate our advancement and adaptability will be of utmost importance. Effective communication will allow us to adapt our strategies according to the project’s objectives and the team’s abilities.

Reflecting on the Scrum blog, I discovered its thoughts on the restrictions of the framework to be very informative. It highlighted how sticking strictly to Scrum may impede success, underscoring the need for flexibility. This mirrored my own experiences, as a lack of flexibility frequently resulted in difficulties. I discovered that emphasizing teamwork and transparent communication is essential for providing value. In the future, I intend to foster a flexible culture among my team, consistently communicating to ensure our practices are in line with our goals. This research has enhanced my comprehension of Agile methods and emphasized the importance of flexibility and dedication in project management.

Blog URL: https://medium.com/better-programming/why-scrum-fails-ac92cab05c6a

From the blog CS@Worcester – Matchaman10 by tam nguyen and used with permission of the author. All other rights reserved by the author.