Category Archives: CS-348

Week 12 – 12/3

For this week, I wanted to talk about the creation of comic books, and how it relates to Software Process Management and Software Design. Within the article linked below, it describes the process of how a comic is created, and the steps needed to reach a final project. I specifically wanted to look more into this as the process is quite similar to how software is developed.

The first step is coming up with an idea for what the comic would be about. Some stories might be a story needed to be told to convey a message or present a solution, which is things that we have been learning about in Software Process Management. Or perhaps you have a creative idea you want to put out there, which can relate to the creation of software on your own, like we are doing in Software Design.

The second step is writing a plot, which is much like creating a backlog for your process, planning the beginning, middle and end of the process.

Then, its off to creating the art, which is a multi-step process, which is much like creating the code. For the artists, they need to sketch, then line, then ink and even maybe color the panels of the comic, which parallels how code will need a framework, then main code, supplemental code, and comments to build on top of each other. This process isn’t always in a predetermined order, and can vary from project to project.

And then theres editing and review. Everyone looks over the draft of the work they’ve made, and then tweaks whatever needs adjustments as needed. This process might lead to the recreation of art or code, depending on which process we’re discussing. Once a review gets a pass, they’re ready to finalize and move onto the last step, which is…

Publishing and marketing! Once you’re done, you send the finished copy of the work to consumers to receive, and perhaps you’ll even advertise it, if its not well-known. This can include things like advertisements, sponsorships, and even word of mouth.

The parallels of the dynamics in which these processes interest me a ton as someone whos also minoring in art, and wants to go into a digital design or digital-art focused field, whether it be game design or webcomics. It’s kinda awesome to see that theres a sort of venn diagram between my two passions, and that they can intersect.

EDIT: I meant to post this earlier before, but I had connectivity issues and it never posted when I thought it did. I only realized because a friend wanted to read my blog, haha. To clarify, this blog is intended for Week-12, and for both classes, not 13, it just was posted late due to issues. My apologies for this inconvenience.

From the blog CS@Worcester – You're Telling Me A Shrimp Wrote This Code?! by tempurashrimple and used with permission of the author. All other rights reserved by the author.

Guide: Clean Code

Now I know what everyone is thinking, ‘You lied in your last blog.’ Yes, I did, and guess what? This is my blog, so that’s okay. You see, I could not pass up on this beautiful opportunity to kill two birds with one stone. As you may remember from my last blog, I complained about how hard it was to come up with topic ideas for CS-343. Well, well, if by some miracle I read that if topics intertwine between your two classes (343/348), we could count one blog for both classes (shoutout Prof Wurst :)).

Enough yapping, clean code time. I believe it was only a year ago when I first started taking coding seriously, and I can recall how awful my code looked. It worked… but if you wanted to debug, you had to pray before opening it. We are talking about one-function programs, with no formatting and variable names that would drive any professor mad. I quickly realized how important clean code was after watching some YouTube videos and seeing how much easier debugging was if your code had a good flow and was properly formatted. This is where I stopped when it came to clean code, unknowing that there were 100+ other factors that all combine to make clean code.

While exploring LinkedIn, I came across this article by Oleabhiele Donald titled ‘Benefits of Clean Code In Your Application Development.’ I gave this a full read and was really surprised about all the little ways I could make my code even better than it already was. Now I 1000% recommend giving it a full read, but I’m going to talk about some of the techniques that were mentioned that I didn’t know at the time or found most beneficial to me.

Use comments sparingly:

  • Limit the use of comments to when necessary, ensuring clarity and conciseness. Overusing comments can clutter the code, making it harder to read. Aim for clear and concise comments that add value.

Write small, focused methods:

  • Break down larger methods into smaller, focused ones, each with a single responsibility. This approach improves code understanding and facilitates easier modification.

Use unit testing:

  • Incorporate unit testing practices to verify code functionality and prevent the introduction of errors. Well-designed unit tests contribute to clean and reliable code.

Avoid duplication:

  • Identify and eliminate code duplication by utilizing methods, classes, and inheritance. Reducing duplication enhances code maintainability and modifiability.

These techniques stood out to me mostly because they were things I just didn’t think about. I love to keep a list on my desktop notepad that always reminds me of some of the key steps to clean code.

Why Clean Code? This a very simple answer thanks to the article, clean code is important enhances readability, making it easier for developers to understand, maintain, and collaborate on software projects. It also improves efficiency, scalability, and reduces the likelihood of introducing bugs, ultimately leading to more reliable software and a happier programmer.

Source: https://www.linkedin.com/pulse/benefits-clean-code-your-application-development-daniel-donald/

From the blog CS@Worcester – CS: Start to Finish by mrjfatal and used with permission of the author. All other rights reserved by the author.

Gitpod: A Cloud-Based Development Environment

What is it and how does it work?

In this episode of Behind the Source, Mike Street talks to Pauline Narvas about Gitpod, a cloud-based development environment. Gitpod is a platform that allows developers to code, build, and test their projects in a cloud-based environment. This means that developers can access their development environment from anywhere, and they don’t need to install any software on their local machine.

How does Gitpod work?

Gitpod works by creating a pre-configured development environment for each project. This environment includes all of the tools and dependencies that the developer needs to work on the project. The developer can then access this environment from any web browser.

What are the benefits of using Gitpod?

There are many benefits to using Gitpod. Some of the benefits include:

  • Increased productivity: Gitpod can help developers to be more productive by providing them with a pre-configured development environment that is ready to use.
  • Improved collaboration: Gitpod can help developers to collaborate more effectively by making it easy to share their development environment with others.
  • Reduced costs: Gitpod can help to reduce costs by eliminating the need to purchase and maintain hardware and software.

How to get started with Gitpod

Getting started with Gitpod is easy. Simply create an account and then connect your Git repository. Gitpod will then create a pre-configured development environment for your project. You can then access this environment from any web browser.

Conclusion

Gitpod is a powerful tool that can help developers to be more productive, collaborate more effectively, and reduce costs. If you are a developer, I encourage you to try Gitpod today.

Podcast used for this blog: https://podcasts.apple.com/us/podcast/gitpod-with-pauline-narvas/id1645278976?i=1000581227601

From the blog CS@Worcester – Site Title by Iman Kondakciu and used with permission of the author. All other rights reserved by the author.

The Art of Coding: Clean Code.

In the everyday life of a computer science enthusiast we are caught up in complex stuff like algorithms and coding languages, but there is a crucial aspect that we cannot overlook, writing clean code. In this blog post, I will show you some coding principles that make your code look good and make life easier for you and whoever reads your code.

  1. Clean Code is not just a fancy choice, it’s a must. Robert C. Martin says, “Clean code is simple and direct. It reads like well-written prose.” This basically means writing a clean code isn’t just for others, it’s a great help to you as well.
  2. Naming things by what they are supposed to do makes total sense. Dont aim for cryptic names, go for clarity. Think of good names as a map, it tells you what is what without a guide.

    Python Example:
    <<
    #Confusing variable name
    x = 5
    #Clear variable name
    total_items = 5
    >>

  3. Consistent formatting is your code’s best friend. Follow a set of indenting and formatting rules and stick by it till the end. Most IDE’s or coding tools make your code look neat automatically but putting some effort yourself goes a long way.

    Java example:
    <<
    // Messy formatting
    public void exampleMethod(){
    if(condition){
    statement();
    }
    }
    // Clean formatting
    public void exampleMethod() {
    if (condition) {
    statement();
    }
    >>

  4. Break things down and chop your code into smaller bits (this part exists in all of my blog posts by now). Each bit needs to have one main job or function. This makes your code easier to understand and saves you from later headaches.
  5. A little comment goes a long way. Try to think of comments as salt, a pinch is just right, and a lot ruins the dish (and gives you high blood pressure). Use your comments for tricky parts and remember to keep them updated.
  6. A lot of us are familiar with Legos which makes Test-Driven Development somewhat easier to grasp. Before building a great pyramid, try to plan it out with smaller bricks (tests). Not only does it ensure your code works but it helps in keeping things organized.

To conclude: Diving deeper into the coding world the smartest move you can make is writing clean code. Not only to impress the others but to make your life smoother. To put this in other words my generation understands writing clean code is the “ultimate flex”. Until next time keep it clean.

Ano out.

References: 
“The Clean Code Blog

by Robert C. Martin (Uncle Bob)” – https://blog.cleancoder.com/

From the blog CS@Worcester – Anairdo&#039;s WSU Computer Science Blog by anairdoduri and used with permission of the author. All other rights reserved by the author.

Week 12 Project Coordination

While we have been working on our projects I have wondered what we should expect in our upcoming work. That is why I searched for an article that would give me insight into the later parts of our project. Just finishing up the project set up a few days ago will help me map out the rest of the project itself. I targeted my article on projects in GitLab to have a more precise understanding rather than a broad project understanding with no correlation to our own.  Hopefully, giving you the knowledge I gained will help your journey of developing your project.

This article gives the reader an insight into how GitLab coordinates its scheduling, planning, tracking, and releasing. To decide on their release date they use the Good Docs Projects template which emphasizes two updates per year. So for GitLab, they work from Jan – May release mid-June, then a three-week break, then back to work from July to December, have a release, then another break starting the cycle over again. In their six-month work, it’s similar to scrum where the team meets up in the beginning and establishes goals. During those months they do general community meetings to see if they’re on track and assign issues by weight of importance. On release day, all the team members meet up to build the team artifacts including their zip files and tarballs. If everything goes right and all their merge requests are complete they try to make sure everyone is credited and then go on a three-week vacation where the cycle begins again all over again. 

After reading this article it showed me a new and effective way to complete a project. This way of doing a project has many similarities to scrum but in the grand scheme of things, all you need is a cycle that is effective and can be repeated. In this particular project, I can’t use their scheme but I can try to concise it into a smaller scale understanding the time constraints. I think it’s very effective to have a break after finishing a project. Some people may want to take a break in between projects but in my opinion, it’s better to finish it overall then take time for yourself. In the article, there was no research on the effects of the break but I believe their workers come back replenished and ready to work when they do come back. 

https://about.gitlab.com/blog/2023/08/24/coordinating-documentation-projects-gitlab/

From the blog cs-wsu – DCO by dcastillo360 and used with permission of the author. All other rights reserved by the author.

Happy path and “The Pride lands”

In the realm of user experience and product development, the concept of the
“Happy Path” is crucial. It refers to a streamlined, problem-free journey a user experiences when interacting with a product or service, aligning perfectly with their needs and expectations. This idea, vividly explained in a blog post by UserPilot (https://userpilot.com/blog/happy-path/), resonates deeply with the narrative of Disney’s classic, “The Lion King.” Here, I draw parallels between the Happy Path and the Pride Lands, contrasting it with the deviations that lead to the Elephants Graveyard, to underscore the importance of this concept in our course material.

The Pride Lands, in “The Lion King”, represents the ideal state or the happy path in user experience terms. This lush and vibrant ecosystem where everything works in harmony symbolizes a users journey where needs are met effortlessly, and satisfaction is guaranteed. The Pride Lands thrive under Mufasa’s reign, much like how a well-designed product or service flourishes when it aligns perfectly with user expectations and provides a seamless experience.

On the other hand, the Elephant Graveyard symbolizes deviation from the happy path. It is a place of chaos, danger and poor outcomes, the opposite of the Pride Lands. In our course, we learned that straying from the happy path in a product development or user experience can lead to complicated, unsatisfactory user interactions, Much like how Simba’s venture into the Elephant Graveyard leads to peril.

My interest in this particular blog post stems from its clear, engaging explanation of the Happy Path Concept. Making it highly relevant to our course material on product development. The analogy with “The Lion King” further sparked my curiosity, as it creatively demonstrates the importance of maintaining the Happy Path in real-world scenarios.

Reflecting on the content, I have learned that like in “The Lion King” where the well being of the Pride Lands depends on wise leadership and balance, the success of a product or services hinges on thoughtful design and understanding user needs. This has affected me by highlighting the importance of user-centered design and has made me more aware of the user journeys in the products I use daily.

In my future practices, I plan to apply these lessons by prioritizing user needs and striving to maintain the Happy Path in my designs. This approach will not only enhance user satisfaction but also contribute to the overall success of the products I will be involved with.

In conclusion, the Happy Path is a fundamental concept in user experience and product development. The comparison of the Happy Path with the Pride Lands provides a vivid illustration of its importance, straying from this path, akin to venturing into the Elephants Graveyard, can lead to unfavorable outcomes.

From the blog CS@Worcester – Josies Notes by josielrivas and used with permission of the author. All other rights reserved by the author.

Following Clean Practices

When I first started coding in AP Computer Science, I found it fun. It was like solving a puzzle, a difficult one at first, but it slowly made sense. One thing I struggled with was clean code. I remember vaguely writing code that was disgustingly dirty, as in unorganized, unreadable to others, and all around messed up. I’m surprised I was able to get something to work in those conditions. I soon realized that clean code would be a game changer, as I would be able to read it clearly, and follow along easily.

Clean code consists of some points, having good and descriptive method and variable names, appropriate spacing between different lines of code, and good sectioning are some examples. Ultimately, these can go further based on context. Some variables may not need overly descriptive names if there’s enough context to imply what it is used for. 

In this blog post, Karolina Tóth interviews Robert C. Martin, or Uncle Bob, on his way of building quality code. The post is fairly lengthy but it has very good tips. Uncle Bob talks about what clean code is, its benefits, how not using clean code can negatively affect you, and many more. One tip he gives is keeping your functions as small as possible, because once they start to get large, the method starts to become confusing. By not writing clean code, you slow everything down. On a team, it’s difficult to work together if someone’s code looks like a 5 year old wrote it. By writing clean code, the team can work effectively and efficiently, ensuring quality code. 

I think this is a good post, Uncle Bob has good information, not only on clean code, but also boosting team morale and how to ease into using clean code. His knowledge in teamwork comes from his own experience and mistakes, which I like. Someone has to make mistakes for others to learn, and fortunately, Uncle Bob has done just that.

Clean code is important, whether you work in a team, or alone. It’s good practice to do so. When I first started, it was sloppy code. But now, I can’t stand seeing unorganized code. Even after we had learned clean code in class, I realized that mine wasn’t exactly perfect either. I liked my variable names to be descriptive, but short, and I made the short part priority because I’m lazy. But after reading this post, I understood that it’s not always good to keep them like that, having overly descriptive names can be beneficial, but when they have to be. I like things to be clean, and orderly, and neat, and whatnot, so I’ll be sure to refer back to this post, and the rest of Uncle Bob’s resources later down the line.

From the blog CS@Worcester – Cao&#039;s Thoughts by antcao and used with permission of the author. All other rights reserved by the author.

The Principles of Writing Clean Code

In the realm of software development, the challenge of deciphering convoluted and tangled code, often referred to as “spaghetti code,” has persisted. This final blog explores the significance of writing clean code—a practice that not only caters to machines but, crucially, facilitates human collaboration, ensuring project success.

I selected this resource since it delves into the importance of clean code in software development. i feel as though it emphasizes readability, consistency, and meaningful naming conventions, addressing the challenges posed by complex and unclear code structures. The text advocates for clean coding practices that enhance collaboration and ease of understanding among developers.

i picked this since it stood out due to its comprehensive coverage of clean coding principles, ranging from intuitive code structure to the strategic use of comments and robust error handling. Its relevance lies in providing practical insights into writing code that is not just functional but also maintainable and adaptable, aligning with the collaborative nature of software development.

The content underscores the pivotal role of developers in the software industry and how clean code is indispensable for creating software with easy usability. Consistency, meaningful names, simplicity, strategic comments, and robust error handling are identified as key components of clean programming. The emphasis on collaborative practices, such as code reviews and refactoring, highlights the continuous learning and improvement inherent in writing clean code.

The use of AI in code reviews and automated testing aligns with current technological trends, enhancing the efficiency of maintaining clean codebases. The resource effectively communicates that writing clean code is not just a good practice but a fundamental aspect of sustainable software development.

This material reinforces the profound impact of clean coding on the collaborative and productive aspects of software development. It has heightened my awareness of the long-term benefits of investing time and effort in writing clean code. I understand that clean code is not just about pleasing aesthetics; it’s a strategic approach that ensures maintainability, efficiency, and scalability throughout the software development lifecycle.

https://reflectoring.io/clean-code/

From the blog CS@Worcester – CSTips by Jamaal Gedeon and used with permission of the author. All other rights reserved by the author.

Code Documentation

One of the most important aspects of code is to make sure that others who work on or are reading your code can understand what is happening. In class, we have been discussing clean code and improving readability which is where the correlation comes into play which is what inspired me to read further onto the fine details of what entails good code documentation. The blog post I chose for this week’s post was “Shaping better software: The benefits of effective code documentation” by Anabelle Zaluski. The goal of the post was to discuss the importance of having good code documentation and what qualifies as good code documentation.

The blog post starts off with explaining why code documentation is very important as it is like a map for your code. Good code documentation is what allows people to navigate your code effectively and efficiently. According to Zaluski the main information that should be included to qualify as effective code documentation is: “Dos and Don’ts, Clear explanations of each aspect of the application, Illustrative images, including sequence and entity relationship diagrams, and API documentation explaining each class, method, and return value”. She then explained the different types of code documentation as internal, external, low-level, walk through and high-level. With the end of the post explaining the benefits and challenges of implementing good code documentation into your team’s work routine. Some of the benefits included improving team collaboration, supporting maintenance and bug fixing, as well as increasing organizational growth. However, some of the challenges mentioned were staying up to date, managing documentation of non-linear code, and knowing how to document things for various knowledge levels.

I chose this blog post since we have been discussing what clean code is and why we should be using it in our own work. Due to that I thought this blog post was perfect to allow me to connect other ways I should be working to improve the quality of my work. To me this blog post was a very useful lesson reinforcing key points about documentation as well as teaching me aspects that I was unaware of. As we are learning more and more about how to structure our code to improve the quality as well as the efficiency of our team based code. From this blog, I feel like I will be able to implement the strategies and qualities mentioned for good code documentation to improve how I document my work in the future.

https://www.notion.so/blog/code-documentation

From the blog CS@Worcester – Giovanni Casiano – Software Development by Giovanni Casiano and used with permission of the author. All other rights reserved by the author.

Writing Clean Code

Overview

It is very important for every software developer to be able to write clean, understandable, and maintainable code. Writing clean code will not only be confusing to the user, but it can also confuse the author who is still in the process of writing the code. In my opinion, organization and neatness is the foundation of reaching success in anything. The two main components that will decide if your code is clean are the naming of variables and how functions are written. An article I read by Yiğit Kemal Erinç explained this well.

Naming Variables

We give variables names because they are far easier to remember than its memory address, which is a mixture of numbers and letters. Names give you more information about the variable as well. Someone using your code would likely have a tough time understanding a variable just by the memory address.

The name of a variable should be meaningful. If you need to attach a comment next to the variable to explain its purpose, then you need to rename the variable. The name should already tell you the variable’s purpose and why it exists, and how it should be used. If a name requires a comment, it does not reveal its intent. 

When naming variables, it’s important to avoid disinformation. For example, a variable that has the suffix “-list”  should be a linked list. For a variable to have the “-list” suffix and not be a linked list would be disinformation and lead to confusion.

Writing Functions

There are plenty of tips for how to design clean, easy-to-follow functions. One very helpful tip is to keep the functions small. Functions should be nowhere near 20 lines long. The longer a function gets, the more likely it is to do multiple things and have side effects. From the article, the most important concept was to make sure that your functions only do one thing. If your function only does one thing, it is guaranteed that your function will be small. A good way to check if your function is doing multiple things is if you can create another function out of it. As for side effects, unintended consequences of your code. Side effects can involve changing passed parameters and global variables, which will leave your code tangled up.

Conclusion

Clean coding is not a skill that you learn overnight. Like anything else you want to be good at, it takes practice and repetition. When you write code, make a habit of the clean code principles, so it becomes second nature.

Source

https://www.freecodecamp.org/news/clean-coding-for-beginners/

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