Category Archives: Week 9

The Troubles Of Learning Codebases

Often when joining a new job, you won’t be writing a new codebase from the ground up. Often we’ll have to familiarize ourselves with the preexisting codebase. Sometimes this codebase is old and needs to be updated or refactored. But how should we go about doing this? It is challenging enough to try to learn a new codebase, let alone trying to change or add to it. That’s what the question the article “Reducing The Learning Curve For Supporting Aging Codebases” by Scott Fitzpatrick aims to answer. The articles offer some dos and don’ts when it comes to trying to make it easier to learn a code base.

One of the first don’ts is to not rely on face-to face conversations and messages/email conversations. While these conversations can be helpful for developers in the moment, they offer little for someone trying to learn the codebase. Plus they can be hard to find and subject to deletion. I think the main point to take away from this article is the importance of good documentation and other resources. When it comes to making a codebase easier to understand, not just for newcomers. Having multiple avenues to try to learn from is important. Beyond just looking at the code, things like data flow and entity-relationship graphs. 

Other aspects beyond code are important too. Like good documentation on local environment set-up and system requirements/dependencies. Making these clear not only makes it easier from the newcomer, but also it helps learn about the frameworks and why they were chosen for the project. Knowing why an application uses certain frameworks and projects can help a new developer understand the reasoning and choices of the team.

Learning a new codebase is very challenging for anyone. I think this article offers good insights as to why certain practices are good and why some are bad. This also once again highlights why I think communication is the most important skill for a software developer. Being able to communicate with other developers not only through code, but through documentation is a very important skill. Making the lives of fellow developers easier by finding as many ways to communicate design and ideas. Although most developers hate writing documentation, it is a necessary evil that must be done.

I will definitely keep this in mind when writing code. Of course writing code that is readable takes precedence. But keeping up to date documentation is also vital to keep projects on track. I personally haven’t worked on a large project involving a large codebase before. So I haven’t had to write documentation for something that I didn’t write. Most of the time I don’t feel the need to write what the function or class does because I made it, so I already know. I think that’s a habit a lot of programmers have, that leads to a lot of lack or bad documentation. It’s something that I don’t have a lot of practice in, so its a skill I’ll have to start honing.

From the blog CS@Worcester – Code Craft by Kyle Tucker and used with permission of the author. All other rights reserved by the author.

Speed Over Design

The following blog I would like to talk about is called “The Hidden Cost of Speed” by Brayden H. Hord. He begins with a quick story about a project he worked on. In this story he describes how he, in an attempt to impress his bosses and meet his co-workers needs, pushed out a product as fast as possible. This worked for the moment. His bosses were happy and he continued his work. However months later, bugs and issues are arriving daily. The software he quickly developed was being used on a daily basis, something he had not anticipated. Now all the shortcuts he had taken earlier had come back to bite him. Now he had something that was being used extensively that was built poorly. 

Now he and his team had to work laboriously to try to fix these fundamental issues. Fixing the problems but also trying to interface between management and stakeholders. The truth is that these problems could have been avoided. If he had better planned and took more time to access the needs and requirements of the project. The moral of the story is that taking time to build right saves headaches down the line. The rest of the blog goes into more detail about why planning and communication are fundamental for all software developers. 

The reason I choose this blog is because I think it highlights one of the most important factors when it comes to software development, Communication. Most software is not built by one person, but rather a team of people. What makes a good team is communication, making sure everyone is on the same page. I think this is important to remember because building without a plan is a recipe for failure. It’s easy to get excited and try to push something that works. But something built on shoddy foundations is always destined to fall. 

Sure your code may work at the moment, but somewhere down the line issues will arise. As needs and more complex architecture is needed, the holes in the code will rear their ugly head. That’s why building code that takes into account not only the needs of now, but also the needs of the future. Building architecture that makes life easier in the future, not harder. I think that this is an important lesson for any software developer to know. Because building something right not only makes your life easier, but everyone else on the team’s lives easier as well.

From the blog CS@Worcester – Code Craft by Kyle Tucker and used with permission of the author. All other rights reserved by the author.

The Apprentice’s Superpower!

Hey Everyone ! As a computer science student embarking on my journey towards becoming a software development professional, the pattern “Unleash Your Enthusiasm” from the Apprenticeship Patterns book has matched deeply with me. This pattern emphasizes the importance of embracing and expressing the excitement and curiosity that often characterize the early stages of one’s career.
The pattern highlights the interesting attributes that apprentices bring to their teams, such as a fresh perspective, diverse ideas, and an exciting drive for learning. It acknowledges that while this level of enthusiasm may be seen as rare or even risky by more experienced team members.
What I found particularly thought-provoking about this pattern is the way it challenges the common tendency to conform to the norms of a team or organization. The pattern encourages apprentices to resist the urge to suppress their enthusiasm and instead to embrace it as a valuable contribution to the collective intelligence of the group.
Moreover, the pattern’s weight on the diversity of thought that enthusiastic apprentices can bring to a team resonates with my understanding of the importance of diverse perspectives in problem-solving and innovation. As I progress in my studies and eventually enter the workforce, I am eager to leverage my background and mindset to offer new upcoming solutions and challenge the current state.
In my own context, as a computer science student, I can see the value of this pattern in the classroom, where I can actively engage with my peers and professors, offering new ideas and questioning established practices. I am also excited to bring this mindset to any internships or entry-level positions I may pursue, with the goal of not only accelerating my own learning but also contributing to the growth and success of the teams I work with.
Overall, the “Unleash Your Enthusiasm” pattern has inspired me to embrace my natural curiosity and excitement for the field of software development, while also modifying that enthusiasm with an understanding of the importance of navigating team dynamics and building strong relationships with my colleagues. As I continue on my apprenticeship journey, I am committed to maintaining this balance, using my enthusiasm as a catalyst for learning and growth, and ultimately, becoming a valued contributor to the software development community.

April 7, 2024

andicuni

From the blog CS@Worcester – A Day in the Life as a CS Blogger by andicuni and used with permission of the author. All other rights reserved by the author.

Unleash Your Enthusiasm

For this week’s blog, I decided to discuss the pattern from Chapter 2 called “Unleash Your Enthusiasm”. This pattern discusses the enthusiasm for learning that many software engineering apprentices experience and how you should show it because, at this point in your career, you can provide unique qualities. This section discusses the situation where you may find yourself holding back because you may find that you have more enthusiasm than your colleagues. This is because there may be pressure to conform to the norm whenever you work on a team. In addition to this, many teams mainly focus on delivering the next product or improving on the aspects of the development life cycle. It also explains the risk of exposing your enthusiasm to an established team. In this situation, the text explains if the morale of the team is low or if they are not very welcoming to newcomers, you might make a poor impression. In this case, the text mentions that the advice in the section should not be applied blindly because you need to consider team dynamics.

The reason that I decided to pick this pattern is that I have never thought of concealing or holding back my enthusiasm for my craft. Every team that I have gotten the pleasure of joining in some way really valued my enthusiasm and the skills that they could learn from me. I have always been on a team where we all encouraged each other to learn from someone else on the team. Needless to say, I have never thought about the possibility of making a bad impression because of my enthusiasm for the task. In hindsight, I can see how exposing your ignorance of a topic can upset a team that values competence over enthusiasm for learning. I do think this quote from the text holds truth to it because of my own experience: “it is actually healthier for a team to consist of people with varying levels of experience”. Tech is a fast-paced industry so everyone is forced to keep up with new trends. A team that has a diverse set of skills at different levels is bound to create a healthy environment. With that being said, I can’t say that I disagree with anything from this section but I will be more aware of unleashing my enthusiasm on certain teams.

From the blog CS@Worcester – Live Laugh Code by Shamarah Ramirez and used with permission of the author. All other rights reserved by the author.

Draw Your Own Map

The draw-your-own-map pattern talks about how people should take control of their career paths and not rely on others to define their path. This pattern talks about identifying the next logical steps, visualizing how to achieve those steps, and continuing to evaluate their goals and values. Draw-your-own-map pattern suggests that getting help from like-minded people and being open to adjusting one’s map to any changes that came up. This pattern shows stories about people who go into programming despite challenges from employers and orginizational limits. Draw-your-own-map encourages people to set a specific goal rather than setting a goal that isnt reachable. That step not only helps provide feedback but it also makes you seek guidance from like-minded people, those people can give you resources and support when trying to achieve your goals. One of the key ideas of this pattern is flexibility, it supports the idea of one’s mind to keep reassuring themselves that it’s okay to make changes. This pattern promotes an approach to career development and make sure to empower people to find their way through there careers with a purpose.

I thought this pattern was interesting because it encourages people to be creative and not rely on other people to define our paths, it should be our decision. I also thought the steps that the pattern talks about was very helpful, it’s important to set realistic goals so that you don’t overwork yourself to reach that goal. Visualizing the steps to achieving those goals also help make sure you don’t rush through the process and able to have a set plan. Evaluating your goal and values are also important as you go on to make sure that you can still reach your goal and be okay with any changes that come. This pattern has changed the way I think about achieving my goals, I know now to set a more realistic goal for myself and not be scared to get help from people who think like me. I don’t disagree with this pattern because I feel like this will help a lot of people with reaching their goals and make them think more realistically while getting support from others.

From the blog CS@Worcester – Kaylene Noel's Blog by Kaylene Noel and used with permission of the author. All other rights reserved by the author.

CS-448 Week 9 Be the Worst

The “Be the Worst” pattern encourages you to surround yourself with individuals who excel in their craft, even if it means being the least skilled person in the group. By doing this, you engage yourself in an environment that fosters continuous learning and growth, as it exposes individuals to new perspectives, challenges, and techniques that may not occur otherwise.

I find this pattern both interesting and thought-provoking because it challenges the traditional notion of seeking out environments where one is the most skilled or experienced. Instead, it encourages the embracement of discomfort and for individuals to seek out opportunities for improvement, even if it means initially feeling inadequate or out of place.

Embracing this pattern has caused me to reconsider how I approach my career and professional development. I have been inclined to seek out roles or teams where I felt confident in my abilities in the past, always fearing the possibility of struggling or being overshadowed by more experienced peers. However, I can see the value in seeking out environments where I am the weakest member after my reflection on this pattern. This will give me the chance to push myself to learn and grow at a faster pace, ultimately becoming a stronger and more versatile developer.

While I generally agree with the principles outlined in this pattern, I do acknowledge that it may not be suitable for everyone or in every situation. Some individuals may thrive in environments where they are the most skilled, finding comfort and confidence in their expertise. Additionally, constantly being the least skilled member of a team can be emotionally challenging and may require a certain level of resilience and self-confidence to navigate successfully.

Overall, the “Be the Worst” pattern serves as a reminder of the importance of humility, curiosity, and continuous learning in one’s professional journey. By seeking out opportunities to surround oneself with individuals who are better than them, individuals can unlock their full potential and achieve greater success in their chosen field.

4. Accurate Self-Assessment | Apprenticeship Patterns (oreilly.com)

From the blog CS@Worcester – Jason Lee Computer Science Blog by jlee3811 and used with permission of the author. All other rights reserved by the author.

Week 9 Blog Post

Choosing a topic for this week I tried to find something we had recently touched upon. Last week we went over mocking and expanding my knowledge of this topic can benefit me and the class. Searching for articles about mocking I stumbled upon one that shares the negatives of using mocking data. To counter-attack the ideas we learned in class it is always great to know both sides to using a concept. 

This article doesn’t fully dispose of mocking but gives ideas when it’s good to use. It gives a variety of examples including “Isolating the unit under test from other components or dependencies that are not relevant to the test, Speeding up the test execution by avoiding network calls or database queries that can be slow or unreliable, and Controlling the test input and output by creating predictable and consistent data that can be easily verified”. These ideas are then counterposed to the negatives such as “Introducing errors or inconsistencies between the mock data and the real data, which can lead to false positives or false negatives in the test results, Reducing the coverage and confidence of the test, by not testing the actual behavior and logic of the external source or the interaction with it, and Increasing the maintenance and complexity of the test, by requiring extra code and logic to create and manage the mock data”. The flaws of mocking data are mainly it does not use real data making it much more different from the real data creating disparities between the two. These tests ignore scenarios with much more complexity and these error and bugs can go unseen. The author assures the reader to use a data source to improve the tests.

After reading this article it gave me insight into the negatives of using mocking. The week prior activities made the use of mocking reduce time in creating classes but it’s good to know when it should be used and when it shouldn’t. I wish there was a perfect solution for every test but to find bugs in your code you must expand your horizon. Reading this article made me see that a variety of tests testing different things can overall benefit you. You never have to completely ignore a type of test but being able to see the positives and negatives can save you in the long run. Plus it will allow you to have a broader knowledge knowing that this may have flaws but there are things I can add to have a satisfactory end product.       

https://medium.com/@queenskisivuli/why-mocking-data-is-a-bad-practice-for-testing-a20d2d7104aa

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

Unit Testing

This week I decided to discuss Unit testing because although we have finished a few activities on the subject, I would like to read up on it to get a better understanding of it. While searching for a blog to discuss, I found this blog called “Unit Testing Best Practices: 9 to Ensure You Do It Right” from Testim. This blog also discusses what a unit test is, why we write them, the benefits of unit testing, how to achieve testable code, who creates them, and the difference between unit testing and integration testing.

The text begins by explaining that unit tests focus on very small parts of the application in complete isolation and compare their actual behavior with the expected behavior. In this section, the idea of complete isolation is thoroughly explained with the idea that “you don’t typically connect your application with external dependencies”. This is what makes unit tests so fast and stable.

The next section explains why they are created in bullet points and have the main ideas bolded. This structuring is helpful to simplify the ideas for the reader and make sure that the main ideas stick out for them. These were the bolded parts of the bullet points in the section: unit tests help you find and fix bugs earlier, your suite of unit tests becomes a safety net for developers, unit tests can contribute to higher code quality, unit tests might contribute to better application architecture, unit tests can act as documentation, and detect code smells in your codebase. I think a lot of the ideas presented were easy to comprehend based on the bolded part but I had to read more about the last bullet point because the term” code smells”(signs that something is wrong with your code ) was not obvious to me. 

The section that explained the difference between integration testing and unit testing was fairly short because they narrowed the main idea down to a few sentences: “It’s all about the level of isolation. While unit tests have to be completely isolated, integration tests don’t shy away from using external dependencies….integration tests offer a more high-level view of the application than unit tests do. Because of that, the feedback they provide is both more realistic and less focused.”

The 9 best practices at the end are titled: Tests Should Be Fast, Tests Should Be Simple, Test Shouldn’t Duplicate Implementation Logic, Tests Should Be Readable, Tests Should Be Deterministic, Make Sure They’re Part of the Build Process, Distinguish Between The Many Types of Test Doubles and Use Them Appropriately, Adopt a Sound Naming Convention for Your Tests, and Don’t Couple Your Tests With Implementation Details. These tips are easy to understand based off of the title alone but throughout each section, the author uses bits of code as examples and bullet points to thoroughly explain each idea. In the future, I will refer to these tips when I need to write tests for a project I will work on.

From the blog CS@Worcester – Live Laugh Code by Shamarah Ramirez and used with permission of the author. All other rights reserved by the author.

A Deeper Dive into Mocking

In class, we began learning about the use of mocking in software testing. After doing an activity, I realized I only slightly understood the purpose of it. So, I decided to investigate, which is when I found The Art of Mocking by Gil Zilberfeld and Dror Helper.

The article begins by giving an introduction to unit tests for those who might not be familiar. They also give an example in C#, which is the language they use for the rest of the article. However, this does not impact information about mocking besides the syntax of the examples.

Once unit tests are covered, hand-rolled mock tests are introduced: they are classes that the developer(s) code which take the place of the real objects for testing purposes. It might not accurately test the system, but it ensures the business logic of the class works. 

The types of mocking listed are those manually made by the developers and those auto generated by mocking frameworks (Mockito or Moq). The article goes quite in depth into mocking frameworks, in their types, what they do, and what to look for when choosing one. Zilberfeld and Helper also discuss the benefits of mocking, which generally boils down to the fact that mocking cuts loose extra requirements for testing, such as databases and other external/complex resources.

Lastly, the best practices and potential hazards are listed. From what I gathered, the important ones were:

  • Only use fake objects when necessary, as too many can create weak/fragile tests
  • Understand what you’re testing and the dependency
  • At most two assertions/verifications per test

I selected this article because I was struggling a little bit with what mocking was and why it was useful. I had somewhat understood the concept and the idea behind it in class, but needed to go on a deeper dive to get a better grip on it. This resource also seems pretty real, in the sense of it feels homemade and focused; all the important stuff is in the articles themselves, not a subscription or anything. 

This article is superb with its examples and clear, in-depth explanations of unit tests and mocking. The formatting is easy to follow and allows for smooth learning and transitions from concept to concept. I personally believe that mocking is quite useful when applied lightly. I learned that Verify should only be used in fake objects when it’s the only way your program can pass or fail; otherwise, it might not matter whether every method actually calls the expected method. 

This affected me in a positive way as it gave me greater insight to mocking and more confidence in my personal understanding as to why we use it. I expect to apply this in a future job when I might need to test a method that uses database information, but it would take too many resources to use the database for testing purposes.

From the blog CS@Worcester – Josh's Coding Journey by joshuafife and used with permission of the author. All other rights reserved by the author.

Week 9 – Better late than never.

Jesus, yeah I’ve kinda been slacking on my blog writings huh? So sorry for the radio silence coming from this place. Going forwards I can hopefully write every week moving forwards.

Anyways, for my first time writing for this class with Professor Wurst, being Software Quality and Testing, I wanted to talk specifically more in depth about what I had already sent him earlier this semester in our course’s Discord server, that being a video by Matt McMuscles about Sonic The Hedgehog (2006)

I have personal experience with this game, as I specifically remember going to BlockBuster when it was still around, wanting to get the game LittleBigPlanet, and my father reaching into the the bargain bin to find Sonic 06, as its better known to fans (quite the mouthful the real title is, and better to differentiate it from the original game on Sega Genesis), and handing it to me. Unfortunately, I had left the store only with Sonic 06.

The reason I relate this to Software Quality and Testing, is because this game is a heavy example of what happens when you rush it, as the video shows. This game was rushed out to shelves for the Christmas of 2006, so SEGA could make a good profit off of it, benefitting off of the increased demand that comes with Christmas.

Many things in this game show that it was improperly tested, with bugs, glitches, and even crashes all about the game. The game is held back due to this, as there is a proper and interesting idea underneath the surface. However, the lack of finding these extremely prevalent bugs and glitches lead to this being one of the worst selling titles in the Sonic franchise.

This goes to show why testing and quality assurance is so important, even in the gaming field. Video Games are software after all, just specifically for entertainment and enjoyment.

I specifically wanted to cover this for this class because it shows me why making sure the testing is as fluid as the programming to create a perfect product. This is especially true in the gaming field, which I hope to have a future in.

Needless to say, I don’t own my own copy anymore. I snapped my PlayStation 3 disc a long time ago. And months after I got it, I did end up getting LittleBigPlanet, and played it way more than this travesty.

tl;dr dont get the game in bargain bin.

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.