Author Archives: Kyle Tucker

Manual Versus Automated Tests

Manual and automated testing are the two ways to run tests. One involves human touch while the other needs very little from a third party to work. While one would think automated testing is better in almost every case. That’s not necessarily true. To start, in most cases automated tests are just better. They are more efficient and save people a lot of time. They can be run over and over again. And can be run every time code is pushed, instead of having to be manually runned. Oftentimes the only times manual testing is useful is when things are tested for use by humans. Meaning things like testing how an app feels to use or how the functions in practice. These areas require testing things that are hard for a computer or code to test.

Manual testing can be more cost effective depending on the circumstances. But manual testing is also subject to more error due to the nature of human involvement. Tests are more adaptable because they can be changed more easily. While automated tests being changed might take more time to change to make sure they work with the code. Automated testing offers more coverage since they can be made small and can cover various areas of coding. Automated tests can also handle larger test cases that span over a large area. While manual testing struggles to handle something so large. Overall I’d say that automated tests seem better to use in general. Aside from things like testing for human feel, automated tests seem to handle most things better.

https://www.testrail.com/blog/manual-vs-automated-testing/

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 Importance Of Security Testing

Security testing is a major area of testing that is very important. In today’s world, security is imperative to a softwares effectiveness. Without security software will be targeted and used against people. The cost of data breaches result in humongous money loss. Some of the goals in security testing is to find weakness in code, finding the impact of security breaches, report findings, and eliminating risks. Some of the principles of security testing is having realistic tests that test real world applications. Tests that are through and wide spanning. Continuous testing because the nature of security and attacks is always changing. Testing should be a collaboration of all parties involved in the software development process.

We always hear on the news about data breaches for some company that cost billions of dollars. It’s hard to put into perspective how much money that is and how that actually affects people. The security of software has real world consequences on people. It’s not something to take lightly. We have to protect software in order to protect the people using it. It’s just as important as testing to make sure the software works. In the blog it said that negligence in security breaches leads to a higher fine. Which makes sense since if you willingly ignore security breaches you’re putting peoples livelihoods at stake, not just at the company. There are many different areas to security testing. API testing, HTTPS, Cloud, basically any area that requires communication is subject to hackers. 

https://fluidattacks.com/blog/security-testing-fundamentals/

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 Benefits of Test Driven Development

TDD or test driven development is a method of building software by creating tests first and then writing the implementation of the code. This blog breaks down what TDD is and the steps to the process. TDD aims to help developers build a program that meets the requirements. By building to meet certain criteria, programmers will always keep the goal in mind. Building with certain behaviors or outputs in mind. The first step is to write a test list. Essentially you are writing tests with the end behavior in mind. It is writing tests, but this stage is also an analysis. An analysis of what the programmer or team or whoever thinks the final program behavior looks like. The next step is to write a test, one that is robust and fully implemented. With one test implemented, the program implementation is now taking shape. Because the program must be made in a way so that it will work for the test. Now that you have a test, the next goal is to make that test pass, by any means necessary. After that you can refactor depending if the tests or implementation needs to be changed to make the program better. Then it becomes a matter of repeating the process until the test list is through.

I think TDD is a very interesting approach to programming. Usually we think of the typical process of build first and then testing. But TDD reverses that, and it creates a very dynamic when it comes to building software. I never really thought about it before but the way you build a test does affect the way the program is implemented. Like if your test is expecting a string or integers, you have to build the implementation in a way that returns those types. There are many ways to make a test that does the same thing. But those tests go about it in a different way. Thus that changes the way you program the implementation. I also think TDD adds focus and direction to programming. As you always know what you need to return or what the expected output looks like.

https://tidyfirst.substack.com/p/canon-tdd

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

Black Box Testing

Black box testing is one of many testing paradigms in the world of testing. I think black box testing stuck out to me because it has the coolest sounding name. This blog is an overview of what black box testing is, when and where to use it, and the pros and cons. The main idea around black box testing is to test a program without knowing the inner workings of the program. Essentially you give the inputs to the program and receive the outputs. But you don’t know what’s going on in the in-between. Black box testing can also be split into even smaller forms that each serve a different purpose. For example, there is functional testing that aims to assess the program’s ability to return outputs that match the specifications. Another example would be system testing, which aims to test the program as part of a larger system. Testing to make sure that the entirety of the program works. Some of the pros of black box testing is that it simplifies testing because it focuses on user requirements. Cutting out on other factors to make sure that the user experience is good. Cons include limited test cases because of limited knowledge of the program. Tests are often simple due to the nature of the lack of information.

I think black box testing is an important part of testing because it’s testing based on the perspective of the users. Most users of an application don’t know the inner workings of said application. So making sure that everything is working on the user side ensures that the user experience is quality. After all, if the people using the application hate it, then they want to use it. And they probably dont want you to work for them again.

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

Sprint 1 Blog Retrospective

GitLab Issues

SSH Keys:

https://gitlab.com/Libre

FoodPantry/client-solutions/theas-pantry/deployment/gitlab-profile/-/issues/17

I research how to make ssh keys to make logging into the server easier. I created documentation on how and what commands to run to create the keys. Now everyone in the future can create keys to access the server in a safer manner. 

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/deployment/gitlab-profile/-/issues/4

Researched into how git pipelines work. I looked into the gitlab_ci.yaml files because that is what I thought we would need. But it seems we’re living in the direction of cron jobs for CI.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/deployment/gitlab-profile/-/issues/5

Tested nginx serving the basic webpage on my browser from the server.

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/deployment/gitlab-profile/-/issues/18

Worked on trying to solve the SSL certificate problem with everyone else. 

Reflection

One of the things I think we did well as a team is making use of work class time. Often for our project we hit many roadblocks. We used the class time as a way to put all of our heads together to tackle a problem that was holding us all up. Especially in the first few weeks since I think we are all pretty new to this side of computer science. We would convene and help each understand things like docker-compose or port-mapping. Another aspect that I think we did well was our general attitude and teamwork. I think we were all willing to participate in the conversation and contribute. Though I will admit I was the quietest one. 

One thing I think we need to work on is gitlab issues. First, I think we need to split them up or maybe name them better. I think all of our issues are very broad so it’s hard to talk about what we did because there are so many layers to the issue. For instance, the SSL certificate implementation. It covers a lot of work and troubleshooting so it can be hard to talk about since work can change quickly. Maybe that’s the nature of our project, but I think it’s something we could improve on. On the same note for gitlab issues, you mention commenting on the issue so that it describes what we’ve done. I’m not sure if any of us have done that. And I’m not sure where to do it either. Some of the things I could work on for myself as an individual. I think I need to ask for help more often, either from my team or you. For when I’m stuck or I just need some direction on what to work on next. Sometimes it feels like I’m not doing enough

Pattern

The software pattern that I often talked about during the period of our spring was “Exposing Your Ignorance”. To summarize, in the software industry it is expected that we are professionals and are experienced in our area. However, that is not always the case. Especially for new apprentices like ourselves. It is important to accept that you do not know everything. So ask questions and swallow your pride to allow yourself to learn something new. I chose this pattern because I think we all were a bit inexperienced in this area, but for me especially this was very new. It felt some of this stuff I should have known or I wasn’t really all too familiar with it. Definitely never worked with it before. So very early on I had to accept that didnt much have much to learn as I went along. I read this pattern before the sprint, but I think it’s something I least thought subconsciously. I think it’s just something I incorporate into all aspects of my life. Skill and experience come from time and work. It’s impossible to know everything or understand everything at first. 

.

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

Finding A Way

Comparing software development to an apprenticeship like blacksmithing makes a lot of sense. The analogy can work for other professions but I think it works especially well with software development. The reason being that software development compared to other fields offers a lot of freedom and different ways of doing things. In other fields, you often only have a few ways of doing things. For programming there are often many ways to solve problems. Not every solution is good, but it can be used. I think it is a lot black smithing in that way. Many techniques are capable of getting the job done. You can go your whole life without knowing about them, but still be component enough to do good work. In the beginning, you are capable of doing very little or bare bones work. But as you increase your knowledge and experience you become more capable of doing much more. And maybe most importantly create work that can last in the most efficient way. Smithing a sword and building good software are not so different.

One of the most profound patterns to me was the “Exposing Your Ignorance”. Accepting that you are not perfect and there is no way to know everything. Especially, as a beginner it feels like a need to master so many things in such a small time. I feel like I never know enough. I often feel like “how can I get a job like this, I know so little”. Everyone seems to know more than me so it can get discouraging. But I like what this pattern is trying to instill. Accept that you are a beginner and that you will need help. This also goes into the finding mentors pattern. Having someone who can guide or help out of a tight spot. 

I think I like all the patterns about finding your own way. Like the long road pattern. Accepting that maybe you learn in a different way or approach something in a way that best suits you. No one person floors the same path. The software field is so diverse with some many different areas of specialization. There’s no one path that suits the goals you have in mind. Overall the biggest lesson I took away was not criticizing myself for not being a master. Accept that proficiency comes with time and no road is without bumps.

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

This is my intro blog for CS-443

hello

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

Technical Debt As Maintenance

In another podcast from Stack Overflow again by Ben Popper with special guest Johnathan Schneider, discusses the nature of technical debt surrounding open-source projects. The main example used throughout the podcast is refactoring code, switching from java 7 to java 8. And in later examples sometimes java 8 to like java 17. As they explain the difficulty when switching, especially when more manual work is needed, talk about the ways technical debt is created. After more discussion around the software he made to help refactoring, goes into more detail about the nature of technical debt. We think of technical debt as something that we impose on ourselves. Like taking shortcuts or code that needs to be updated. One of the main points of this podcast is to think about technical debt more as maintenance. Obviously sometimes it is self-inflicted, but often it just comes with the territory. As new things come out, things will need to be updated. It’s easier to think of it as something that needs to be done for the sake of the health of the program. Rather than as something I did that I need to fix because of my own short sightedness. 

I chose this podcast because it is related to our discussions of technical debt and refactoring code. In class, we talked about the nature of technical debt and how often it is a code structure thing or maybe a breaking change. It is more thought of as something that comes as a result of not thinking ahead. While I think that is true in many cases. I think a lot of the time it can’t be avoided, like in the case of code versions. Thus it’s better to think of it as maintenance rather than something that could have been avoided. For me, mentally saying that this problem is something that couldn’t have been avoided is better. If I think it’s my fault then I feel like an idiot and get down on myself. Maybe it is just a mental thing, but it goes a long way for the mentality of a person or team. Another aspect of the podcast I think it is important to think about is how the open-source nature plays a part in this. Code is being worked on at all times, different people. So when the code is updated and your code no longer works. It’s important to realize that this isn’t your fault and just is the nature of things. The code not working is not your fault and just needs to be maintained so it works again.

Citations

https://the-stack-overflow-podcast.simplecast.com/episodes/open-source-ecosystem-reduce-tech-debt/transcript

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 Future Of Technical Writing

In this podcast episode from Stack Overflow by Ben Popper with special guest Ryan Donovan, discusses the evolution of documentation and the future of technical writing. The whole episode is about the nature of writing documentation is changing fast. With the advent of generative AI and other tools like linters that can automatically write or run tests make technical writing more automated now more than ever. One of the first talking points is why documentation is being pushed a lot more now. Increasingly because programmers don’t like writing documentation this job is delegated to technical writers. Who will go into code repositories and write documentation.These technical writers end up being some of the most important people when it comes to code structure. Since they write the documentation that defines how the program is specified and built. 

After moving through some background information the next talking point is the future of technical writing. This was of the most interesting parts to me because it discusses not only just the AI aspect, but things like how other tools play a role. The question then becomes will AI replace technical writers? The answer they concluded was no. Although it is able to generate and automate documentation. Often that documentation needs to be looked over. For the moment AI is not able to create fully functioning documentation to that level yet.

I chose this podcast because it directly relates to what we have been doing in class lately. Looking at the Open API yaml and documentation related files. I don’t think there is a specific lesson to be learned from this podcast. More about just thinking about the future of technical writing. As programmers, we will all have to interact with documentation at some point. Whether that be something like java docs or yaml files. I think it’s important to know what goes into making documentation and the people who write. Because it really is a career all in of itself. Like I mentioned before, one of the most interesting aspects of technical writing is how AI is changing the landscape. Like many areas right now, people are worried if their jobs are in danger. I think with a lot of other cases human supervision is still needed. Another point that I didn’t really think about before now is the importance of documentation other than just information. Like in the case of yaml files that define structure. Is how important it is because it literally specifies how software operates. Like the definitions of endpoints that must be fulfilled and other specifications.

Citations

https://the-stack-overflow-podcast.simplecast.com/episodes/your-docs-are-your-infrastructure/transcript

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

A Simple API

RESTful APIs are a common and standard structure used to develop software applications. Lately in class we have been delving into how these APIs work using Thea’s Pantry as an example. I found this blog that gives a concise and easy to understand explanation of REST works. He gives a brief overview of what REST stands for and then explains its purpose. It used to make data transfer between client and server easier and more encapsulated. One of the points that was interesting to me and made a connection to what we learned in class about coding principles. The principle of encapsulation and keeping things as independent as possible. Trying to keep the server and client as independent as possible to make scalability and maintenance more efficient. The REST API serves as an interface between client servers that serves to communicate for them so they don’t have to.

It then goes into more detail about resources and URLs and return formats. It was also interesting to me that return formats could be more than JSON, the example they used was XML. You just have to specify, but I don’t know a reason why you wouldn’t use JSON. The Reason I chose this blog is because it is a simple explanation of what REST API is. For me personally, APIs can be kind of hard to understand, but this blog explains in a way that makes it easy to understand. The picture was a big help. Other than that I don’t really have anything to say. 

https://medium.com/@MakeComputerScienceGreatAgain/understanding-rest-api-a-comprehensive-guide-52fc10f6c9ed

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